ring: add necessary structures and helper functions for v3
[netsniff-ng.git] / dissector_eth.h
blob4c49f289fff27ce28eb6ccd87cbf7b61e33ba916
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 "xutils.h"
15 #include "oui.h"
17 extern struct hash_table eth_lay2;
18 extern struct hash_table eth_lay3;
20 extern void dissector_init_ethernet(int fnttype);
21 extern void dissector_cleanup_ethernet(void);
23 extern char *lookup_port_udp(unsigned int id);
24 extern char *lookup_port_tcp(unsigned int id);
25 extern char *lookup_ether_type(unsigned int id);
27 #ifdef __WITH_PROTOS
28 static inline struct protocol *dissector_get_ethernet_entry_point(void)
30 return &ethernet_ops;
33 static inline struct protocol *dissector_get_ethernet_exit_point(void)
35 return &none_ops;
37 #else
38 static inline struct protocol *dissector_get_ethernet_entry_point(void)
40 return NULL;
43 static inline struct protocol *dissector_get_ethernet_exit_point(void)
45 return NULL;
47 #endif /* __WITH_PROTOS */
48 #endif /* DISSECTOR_ETH_H */