diff options
author | Anders Broman <anders.broman@ericsson.com> | 2005-10-12 05:34:36 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2005-10-12 05:34:36 +0000 |
commit | 2145d152340c41c0f01c476d023a661f5b6d79bc (patch) | |
tree | 778bbcd72588a267d5bbff94653e827dd93ba7a9 /epan/dissectors/packet-gprs-llc.c | |
parent | 8409491a8a9d11982af902c7b10f70defb1db717 (diff) | |
download | wireshark-2145d152340c41c0f01c476d023a661f5b6d79bc.tar.gz |
From Rene Pilz:
- LLC XID patch (reaability patch).
- Dissection of the MS Radio Capabilities.
svn path=/trunk/; revision=16199
Diffstat (limited to 'epan/dissectors/packet-gprs-llc.c')
-rw-r--r-- | epan/dissectors/packet-gprs-llc.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/epan/dissectors/packet-gprs-llc.c b/epan/dissectors/packet-gprs-llc.c index 8c84e4b442..cb11d1a0cc 100644 --- a/epan/dissectors/packet-gprs-llc.c +++ b/epan/dissectors/packet-gprs-llc.c @@ -890,7 +890,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) m_bits = ctrl_fld_fb & 0x0F; info_len = crc_start - offset; - + switch (m_bits) { case U_DM: @@ -1054,9 +1054,23 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tmp = byte1 & 0x7C; tmp = tmp >> 2; - uinfo_field = proto_tree_add_text(ui_tree, tvb, location, (ending - 1), - "XID Parameter Type: %s", - val_to_str(tmp, xid_param_type_str,"Reserved Type:%X")); + + if (( xid_param_len > 0 ) && ( xid_param_len <=4 )) + { + unsigned long value = 0; + int i; + for (i=1;i<=xid_param_len;i++) { + value <<= 8; + value |= (unsigned long)tvb_get_guint8(tvb, location+i ); + } + uinfo_field = proto_tree_add_text(ui_tree, tvb, location, (ending - 1), + "XID Parameter Type: %s - Value: %lu", + val_to_str(tmp, xid_param_type_str,"Reserved Type:%X"),value); + } + else + uinfo_field = proto_tree_add_text(ui_tree, tvb, location, (ending - 1), + "XID Parameter Type: %s", + val_to_str(tmp, xid_param_type_str,"Reserved Type:%X")); uinfo_tree = proto_item_add_subtree(uinfo_field, ett_ui); proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_xl, tvb, location, |