rough framework
[lemu] / common.h
diff --git a/common.h b/common.h
new file mode 100644 (file)
index 0000000..f7c0987
--- /dev/null
+++ b/common.h
@@ -0,0 +1,20 @@
+#ifndef COMMON_H
+#define COMMON_H
+
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+
+#define UNUSED __attribute__((__unused__))
+
+int
+timeval_diff(struct timeval *result, struct timeval *x, struct timeval *y);
+
+void
+timeval_increment(struct timeval *result, struct timeval *diff);
+
+int
+string_to_addrinfo_call(char *in, unsigned int flags, int (*ai_cb)(struct addrinfo *, void *), void *cb_data);
+
+#endif /* COMMON_H */