Catalli's threaded switch
[sliver-openvswitch.git] / lib / dispatch.h
diff --git a/lib/dispatch.h b/lib/dispatch.h
new file mode 100644 (file)
index 0000000..1bc1167
--- /dev/null
@@ -0,0 +1,16 @@
+#include <sys/types.h>
+#include <sys/time.h>
+
+#ifndef DISPATCH_H
+#define DISPATCH_H 1
+
+struct pkthdr {
+       struct timeval ts;      /* time stamp */
+       uint32_t caplen;        /* length of portion present */
+       uint32_t len;   /* length this packet (off wire) */
+};
+
+typedef void (*pkt_handler)(u_char *user, const struct pkthdr *h, 
+        const u_char *pkt);
+
+#endif /* DISPATCH_H */