build: check for fopencookie() in configure
[netsniff-ng-new.git] / dissector_80211.c
blobecaf355138d881b8c58aeb9da26c7102cae9d26b
1 /*
2 * netsniff-ng - the packet sniffing beast
3 * Copyright 2009, 2010 Daniel Borkmann.
4 * Subject to the GPL, version 2.
5 */
7 #include <stdint.h>
9 #include "hash.h"
10 #include "protos.h"
11 #include "dissector.h"
12 #include "dissector_80211.h"
13 #include "lookup.h"
15 struct hash_table ieee80211_lay2;
17 static inline void dissector_init_entry(int type)
19 dissector_set_print_type(&ieee80211_ops, type);
22 static inline void dissector_init_exit(int type)
24 dissector_set_print_type(&none_ops, type);
27 static void dissector_init_layer_2(int type)
29 init_hash(&ieee80211_lay2);
30 // INSERT_HASH_PROTOS(blubber_ops, ieee80211_lay2);
31 for_each_hash_int(&ieee80211_lay2, dissector_set_print_type, type);
34 void dissector_init_ieee80211(int fnttype)
36 dissector_init_entry(fnttype);
37 dissector_init_layer_2(fnttype);
38 dissector_init_exit(fnttype);
39 lookup_init(LT_OUI);
42 void dissector_cleanup_ieee80211(void)
44 free_hash(&ieee80211_lay2);
45 lookup_cleanup(LT_OUI);