netsniff-ng: Print process name of the netlink message origin
[netsniff-ng.git] / dissector_eth.h
blobc02213f5f8d98d21a8a39026f65b117fad1eb022
1 /*
2 * netsniff-ng - the packet sniffing beast
3 * Copyright 2009, 2010 Daniel Borkmann.
4 * Subject to the GPL, version 2.
5 */
7 #ifndef DISSECTOR_ETH_H
8 #define DISSECTOR_ETH_H
10 #include "hash.h"
11 #include "protos.h"
13 extern struct hash_table eth_lay2;
14 extern struct hash_table eth_lay3;
16 extern void dissector_init_ethernet(int fnttype);
17 extern void dissector_cleanup_ethernet(void);
19 extern char *lookup_port_udp(unsigned int id);
20 extern char *lookup_port_tcp(unsigned int id);
21 extern char *lookup_ether_type(unsigned int id);
23 #ifdef HAVE_DISSECTOR_PROTOS
24 static inline struct protocol *dissector_get_ethernet_entry_point(void)
26 return &ethernet_ops;
29 static inline struct protocol *dissector_get_ethernet_exit_point(void)
31 return &none_ops;
33 #else
34 static inline struct protocol *dissector_get_ethernet_entry_point(void)
36 return NULL;
39 static inline struct protocol *dissector_get_ethernet_exit_point(void)
41 return NULL;
43 #endif
44 #endif /* DISSECTOR_ETH_H */