summaryrefslogtreecommitdiff
path: root/dissector_eth.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2015-11-16 08:46:00 +0100
committerTobias Klauser <tklauser@distanz.ch>2015-11-16 08:46:00 +0100
commit04b2adac4e5d460f39454b59ed4f2d3374cb796b (patch)
treecaf1aeb824fcfeba9437dea02741dd9921ad718b /dissector_eth.c
parent7cec7def47bf55762c422508bac1b6e2e142b24e (diff)
lookup: Use lookup module for OUI lookup as well
Do not needlessly duplicate code between the oui and the lookup module. Instead, add an additional lookup table for OUIs to the lookup module. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'dissector_eth.c')
-rw-r--r--dissector_eth.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/dissector_eth.c b/dissector_eth.c
index b2c44df..7041aac 100644
--- a/dissector_eth.c
+++ b/dissector_eth.c
@@ -7,7 +7,6 @@
#include <stdint.h>
#include "hash.h"
-#include "oui.h"
#include "proto.h"
#include "protos.h"
#include "dissector.h"
@@ -68,11 +67,10 @@ void dissector_init_ethernet(int fnttype)
dissector_init_layer_3(fnttype);
dissector_init_exit(fnttype);
- dissector_init_oui();
-
lookup_init(LT_PORTS_UDP);
lookup_init(LT_PORTS_TCP);
lookup_init(LT_ETHERTYPES);
+ lookup_init(LT_OUI);
}
void dissector_cleanup_ethernet(void)
@@ -80,9 +78,8 @@ void dissector_cleanup_ethernet(void)
free_hash(&eth_lay2);
free_hash(&eth_lay3);
+ lookup_cleanup(LT_OUI);
lookup_cleanup(LT_ETHERTYPES);
lookup_cleanup(LT_PORTS_TCP);
lookup_cleanup(LT_PORTS_UDP);
-
- dissector_cleanup_oui();
}