trafgen: proto: Zero out newly allocated struct packet
[netsniff-ng-new.git] / lookup.h
blob38161b6c175d33857bfbe9902a51432253ef0495
1 /*
2 * netsniff-ng - the packet sniffing beast
3 * Copyright 2009, 2010 Daniel Borkmann.
4 * Copyright 2014, 2015 Tobias Klauser
5 * Subject to the GPL, version 2.
6 */
8 #ifndef LOOKUP_H
9 #define LOOKUP_H
11 enum lookup_type {
12 LT_PORTS_UDP,
13 LT_PORTS_TCP,
14 LT_ETHERTYPES,
15 LT_OUI,
16 LT_MAX,
19 extern void lookup_init(enum lookup_type which);
20 extern void lookup_cleanup(enum lookup_type which);
22 extern const char *lookup_port_udp(unsigned int id);
23 extern const char *lookup_port_tcp(unsigned int id);
24 extern const char *lookup_ether_type(unsigned int id);
25 extern const char *lookup_vendor(unsigned int id);
27 static inline const char *lookup_vendor_str(unsigned int id)
29 return lookup_vendor(id) ? : "Unknown";
32 #endif /* LOOKUP_H */