diff options
author | Anders Broman <anders.broman@ericsson.com> | 2009-03-03 19:26:45 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2009-03-03 19:26:45 +0000 |
commit | d74b26303c23b587c066bf73ac1e6a7182d959fa (patch) | |
tree | ff7a1cc21d15d0007b7b10671980ab8ccd04e1d4 | |
parent | f638e28b2191d84dcea1346178b721c31f14d59e (diff) |
From Sven Eckelmann:
Support aggregated originator messages in B.A.T.M.A.N. dissector.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3268
svn path=/trunk/; revision=27588
-rw-r--r-- | epan/dissectors/packet-bat.c | 23 | ||||
-rw-r--r-- | epan/dissectors/packet-bat.h | 2 |
2 files changed, 13 insertions, 12 deletions
diff --git a/epan/dissectors/packet-bat.c b/epan/dissectors/packet-bat.c index ca9720e936..a87286a1c6 100644 --- a/epan/dissectors/packet-bat.c +++ b/epan/dissectors/packet-bat.c @@ -1,6 +1,6 @@ /* packet-bat.c * Routines for B.A.T.M.A.N. Layer 3 dissection - * Copyright 2008, Sven Eckelmann <sven.eckelmann@gmx.de> + * Copyright 2008-2009 Sven Eckelmann <sven.eckelmann@gmx.de> * * $Id$ * @@ -253,19 +253,19 @@ static void dissect_bat_batman_v5(tvbuff_t *tvb, packet_info *pinfo, proto_tree proto_tree_add_item(bat_batman_tree, hf_bat_batman_hna_len, tvb, offset, 1, FALSE); offset += 1; - } - tap_queue_packet(bat_tap, pinfo, batman_packeth); + tap_queue_packet(bat_tap, pinfo, batman_packeth); - for (i = 0; i < batman_packeth->hna_len; i++) { - next_tvb = tvb_new_subset(tvb, offset, 5, 5); + for (i = 0; i < batman_packeth->hna_len; i++) { + next_tvb = tvb_new_subset(tvb, offset, 5, 5); - if (have_tap_listener(bat_follow_tap)) { - tap_queue_packet(bat_follow_tap, pinfo, next_tvb); - } + if (have_tap_listener(bat_follow_tap)) { + tap_queue_packet(bat_follow_tap, pinfo, next_tvb); + } - dissect_bat_hna(next_tvb, pinfo, tree); - offset += 5; + dissect_bat_hna(next_tvb, pinfo, bat_batman_tree); + offset += 5; + } } length_remaining = tvb_reported_length_remaining(tvb, offset); @@ -276,7 +276,7 @@ static void dissect_bat_batman_v5(tvbuff_t *tvb, packet_info *pinfo, proto_tree tap_queue_packet(bat_follow_tap, pinfo, next_tvb); } - call_dissector(data_handle, next_tvb, pinfo, tree); + dissect_bat_batman(next_tvb, pinfo, tree); } } @@ -687,6 +687,7 @@ static void dissect_vis_entry_v23(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t proto_tree_add_ipv4(bat_vis_entry_tree, hf_bat_vis_data_ip, tvb, 2, 4, ip); } } + void proto_register_bat(void) { module_t *bat_module = NULL; diff --git a/epan/dissectors/packet-bat.h b/epan/dissectors/packet-bat.h index 9f8393c1f0..62bb72c2ed 100644 --- a/epan/dissectors/packet-bat.h +++ b/epan/dissectors/packet-bat.h @@ -1,6 +1,6 @@ /* packet-bat.h * Routines for B.A.T.M.A.N. Layer 3 dissection - * Copyright (C) 2007-2008 B.A.T.M.A.N. contributors: + * Copyright (C) 2007-2009 B.A.T.M.A.N. contributors: * Marek Lindner * * $Id$ |