man: improvements to mausezahn.8: CoS (PCP), DEI (CFI)
[netsniff-ng.git] / dissector_eth.h
blob85106bc6eac3b154720f8b1e7d862a6a3bd39e80
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 "proto.h"
12 #include "protos.h"
13 #include "tprintf.h"
14 #include "oui.h"
16 extern struct hash_table eth_lay2;
17 extern struct hash_table eth_lay3;
19 extern void dissector_init_ethernet(int fnttype);
20 extern void dissector_cleanup_ethernet(void);
22 extern char *lookup_port_udp(unsigned int id);
23 extern char *lookup_port_tcp(unsigned int id);
24 extern char *lookup_ether_type(unsigned int id);
26 #ifdef __WITH_PROTOS
27 static inline struct protocol *dissector_get_ethernet_entry_point(void)
29 return &ethernet_ops;
32 static inline struct protocol *dissector_get_ethernet_exit_point(void)
34 return &none_ops;
36 #else
37 static inline struct protocol *dissector_get_ethernet_entry_point(void)
39 return NULL;
42 static inline struct protocol *dissector_get_ethernet_exit_point(void)
44 return NULL;
46 #endif /* __WITH_PROTOS */
47 #endif /* DISSECTOR_ETH_H */