summaryrefslogtreecommitdiff
path: root/dissector_eth.h
diff options
context:
space:
mode:
Diffstat (limited to 'dissector_eth.h')
-rw-r--r--dissector_eth.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/dissector_eth.h b/dissector_eth.h
new file mode 100644
index 0000000..4c49f28
--- /dev/null
+++ b/dissector_eth.h
@@ -0,0 +1,48 @@
+/*
+ * netsniff-ng - the packet sniffing beast
+ * Copyright 2009, 2010 Daniel Borkmann.
+ * Subject to the GPL, version 2.
+ */
+
+#ifndef DISSECTOR_ETH_H
+#define DISSECTOR_ETH_H
+
+#include "hash.h"
+#include "proto.h"
+#include "protos.h"
+#include "tprintf.h"
+#include "xutils.h"
+#include "oui.h"
+
+extern struct hash_table eth_lay2;
+extern struct hash_table eth_lay3;
+
+extern void dissector_init_ethernet(int fnttype);
+extern void dissector_cleanup_ethernet(void);
+
+extern char *lookup_port_udp(unsigned int id);
+extern char *lookup_port_tcp(unsigned int id);
+extern char *lookup_ether_type(unsigned int id);
+
+#ifdef __WITH_PROTOS
+static inline struct protocol *dissector_get_ethernet_entry_point(void)
+{
+ return &ethernet_ops;
+}
+
+static inline struct protocol *dissector_get_ethernet_exit_point(void)
+{
+ return &none_ops;
+}
+#else
+static inline struct protocol *dissector_get_ethernet_entry_point(void)
+{
+ return NULL;
+}
+
+static inline struct protocol *dissector_get_ethernet_exit_point(void)
+{
+ return NULL;
+}
+#endif /* __WITH_PROTOS */
+#endif /* DISSECTOR_ETH_H */