diff options
author | sfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-01-26 20:29:44 +0000 |
---|---|---|
committer | sfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-01-26 20:29:44 +0000 |
commit | 83edcfab41db8e22f63b9e8c544ceaa81e41ddf8 (patch) | |
tree | 1bba61a02e40937c4efe811017f83189a90ecf8e /epan/dissectors/packet-nbns.c | |
parent | a75a7a50d23df9316dd2676989e55af5654695f6 (diff) |
Minor changs to NetBIOS Session Service code:
- Simplify a proto_tree_add_uint() call into proto_tree_add_item()
- Mention RFC 1002 in comment above message type definitions
- Expand field descriptions for length field
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35668 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-nbns.c')
-rw-r--r-- | epan/dissectors/packet-nbns.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/epan/dissectors/packet-nbns.c b/epan/dissectors/packet-nbns.c index e99839cad3..85d288ed93 100644 --- a/epan/dissectors/packet-nbns.c +++ b/epan/dissectors/packet-nbns.c @@ -1352,7 +1352,7 @@ dissect_nbdgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } /* - * NetBIOS Session Service message types. + * NetBIOS Session Service message types (RFC 1002). */ #define SESSION_MESSAGE 0x00 #define SESSION_REQUEST 0x81 @@ -1493,12 +1493,7 @@ dissect_nbss_packet(tvbuff_t *tvb, int offset, packet_info *pinfo, ti = proto_tree_add_item(tree, proto_nbss, tvb, offset, length + 4, FALSE); nbss_tree = proto_item_add_subtree(ti, ett_nbss); - proto_tree_add_uint_format(nbss_tree, hf_nbss_type, tvb, - offset, 1, - msg_type, - "Message Type: %s", - val_to_str(msg_type, message_types, - "Unknown (%x)")); + proto_tree_add_item(nbss_tree, hf_nbss_type, tvb, offset, 1, ENC_NA); } offset += 1; @@ -1928,7 +1923,7 @@ proto_register_nbt(void) static hf_register_info hf_nbss[] = { { &hf_nbss_type, { "Message Type", "nbss.type", - FT_UINT8, BASE_DEC, NULL, 0x0, + FT_UINT8, BASE_HEX, VALS(message_types), 0x0, "NBSS message type", HFILL }}, { &hf_nbss_flags, { "Flags", "nbss.flags", @@ -1937,11 +1932,11 @@ proto_register_nbt(void) { &hf_nbss_length, { "Length", "nbss.length", FT_UINT16, BASE_DEC, NULL, 0x0, - "NBSS message length", HFILL }}, + "Length of trailer (payload) following this field in bytes", HFILL }}, { &hf_nbss_cifs_length, { "Length", "nbss.length", FT_UINT24, BASE_DEC, NULL, 0x0, - "NBSS message length", HFILL }} + "Length trailer (payload) following this field in bytes", HFILL }} }; static gint *ett[] = { &ett_nbns, |