aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-09-23 18:54:39 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-09-23 18:54:39 +0000
commitac2c509c8e86ec70294ed3fecd21afc18de2c934 (patch)
tree3450a23dad52a06a8bb8db7307d678fe2fe6fe84 /epan
parentec072a3445808a05605ba9e4989c86836ecd6a24 (diff)
Fix the dissection of the Reply function - it has a "receipt number"
field, and the data isn't at a fixed offset of 4. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12075 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-loop.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/epan/dissectors/packet-loop.c b/epan/dissectors/packet-loop.c
index 3403b7cc90..10404646fc 100644
--- a/epan/dissectors/packet-loop.c
+++ b/epan/dissectors/packet-loop.c
@@ -37,6 +37,7 @@
static int proto_loop = -1;
static int hf_loop_skipcount = -1;
static int hf_loop_function = -1;
+static int hf_loop_receipt_number = -1;
static int hf_loop_forwarding_address = -1;
static gint ett_loop = -1;
@@ -90,8 +91,11 @@ dissect_loop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch (function) {
case FUNC_REPLY:
- default:
- next_tvb = tvb_new_subset(tvb, 4, -1, -1);
+ if (tree)
+ proto_tree_add_item(loop_tree, hf_loop_receipt_number, tvb, offset, 2,
+ FALSE);
+ offset += 2;
+ next_tvb = tvb_new_subset(tvb, offset, -1, -1);
call_dissector(data_handle, next_tvb, pinfo, tree);
return;
@@ -101,6 +105,11 @@ dissect_loop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
6, FALSE);
offset += 6;
break;
+
+ default:
+ next_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ call_dissector(data_handle, next_tvb, pinfo, tree);
+ return;
}
}
}
@@ -115,12 +124,17 @@ proto_register_loop(void)
"", HFILL }},
{ &hf_loop_function,
- { "function", "loop.function",
+ { "Function", "loop.function",
FT_UINT16, BASE_DEC, VALS(function_vals), 0x0,
"", HFILL }},
+ { &hf_loop_receipt_number,
+ { "Receipt number", "loop.receipt_number",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "", HFILL }},
+
{ &hf_loop_forwarding_address,
- { "Forwarding address", "loop.forwarding_address",
+ { "Forwarding address", "loop.forwarding_address",
FT_ETHER, BASE_NONE, NULL, 0x0,
"", HFILL }},
};