Wireshark-dev: Re: [Wireshark-dev] wlccp dissector scm advertisement
From: Jochen Bartl <jochen.bartl@xxxxxxxxx>
Date: Mon, 11 Aug 2008 21:35:15 +0200
Hi everyone, I just want to mention that I'm trying to fix the problem myself and learn at least how to patch existing dissector code. I will open a bug report, when the patch is in a better shape. best regards, jochen
--- packet-wlccp.c 2008-07-10 19:39:22.000000000 +0200 +++ packet-wlccp-new.c 2008-08-11 21:27:05.673590581 +0200 @@ -511,6 +511,21 @@ static int hf_wlccp_priority = -1; static int hf_wlccp_age = -1; static int hf_wlccp_period = -1; static int hf_wlccp_ipv4_address = -1; + +/* SCM Advertisement */ +static int hf_wlccp_scm_hop_address = -1; +static int hf_wlccp_scm_flags = -1; +static int hf_wlccp_scm_election_group = -1; +static int hf_wlccp_scm_attach_count = -1; +static int hf_wlccp_scm_priority = -1; +static int hf_wlccp_scm_bridge_priority = -1; +static int hf_wlccp_scm_node_id = -1; +static int hf_wlccp_scm_unknown_short = -1; +static int hf_wlccp_scm_age = -1; +static int hf_wlccp_scm_path_cost = -1; +static int hf_wlccp_scm_hop_count = -1; +static int hf_wlccp_scm_period = -1; + /*kan for apRegistration messages*/ static int hf_wlccp_timestamp = -1; static int hf_wlccp_apregstatus = -1; @@ -1151,8 +1166,53 @@ static guint dissect_wlccp_ccm_msg(proto case 0x01: { + proto_tree_add_item(_tree, hf_wlccp_scm_hop_address, + _tvb, _offset, 6, FALSE); + _offset += 6; - break; + proto_tree_add_item(_tree, hf_wlccp_scm_flags, + _tvb, _offset, 2, FALSE); + _offset += 2; + + proto_tree_add_item(_tree, hf_wlccp_scm_election_group, + _tvb, _offset, 1, FALSE); + _offset += 1; + + proto_tree_add_item(_tree, hf_wlccp_scm_attach_count, + _tvb, _offset, 1, FALSE); + _offset += 1; + + proto_tree_add_item(_tree, hf_wlccp_scm_priority, + _tvb, _offset, 1, FALSE); + _offset += 1; + + proto_tree_add_item(_tree, hf_wlccp_scm_bridge_priority, + _tvb, _offset, 1, FALSE); + _offset += 1; + + proto_tree_add_item(_tree, hf_wlccp_scm_node_id, + _tvb, _offset, 6, FALSE); + _offset += 6; + + proto_tree_add_item(_tree, hf_wlccp_scm_unknown_short, + _tvb, _offset, 2, FALSE); + _offset += 2; + + proto_tree_add_item(_tree, hf_wlccp_scm_age, + _tvb, _offset, 4, FALSE); + _offset += 4; + + proto_tree_add_item(_tree, hf_wlccp_scm_path_cost, + _tvb, _offset, 2, FALSE); + _offset += 2; + + proto_tree_add_item(_tree, hf_wlccp_scm_hop_count, + _tvb, _offset, 1, FALSE); + _offset += 1; + + proto_tree_add_item(_tree, hf_wlccp_scm_period, + _tvb, _offset, 1, FALSE); + _offset += 1; } /* case 0x01 */ case 0x02: @@ -3228,7 +3288,79 @@ proto_register_wlccp(void) FT_IPv4, BASE_NONE, NULL, 0, "IPv4 address", HFILL } }, - + + { &hf_wlccp_scm_hop_address, + { "SCM Hop Address", "wlccp.scm_hop_address", + FT_ETHER, BASE_NONE, NULL, + 0x0, "Source 802 Port Address", HFILL } + }, + + { &hf_wlccp_scm_flags, + { "SCM Flags", "wlccp.scm_flags", + FT_UINT16, BASE_HEX, NULL, + 0x0, "SCM Flags", HFILL } + }, + + { &hf_wlccp_scm_election_group, + { "SCM Election Group", "wlccp.scm_election_group", + FT_UINT8, BASE_DEC, NULL, 0, + "SCM Election Group", HFILL } + }, + + { &hf_wlccp_scm_attach_count, + { "SCM Attach Count", "wlccp.scm_attach_count", + FT_UINT8, BASE_DEC, NULL, 0, + "SCM Attach Count", HFILL } + }, + + { &hf_wlccp_scm_priority, + { "SCM Priority", "wlccp.scm_priority", + FT_UINT8, BASE_DEC, NULL, 0, + "SCM Priority", HFILL } + }, + + { &hf_wlccp_scm_bridge_priority, + { "Bridge Priority", "wlccp.scm_bridge_priority", + FT_UINT8, BASE_DEC, NULL, 0, + "Bridge Priority", HFILL } + }, + + { &hf_wlccp_scm_node_id, + { "SCM Node ID", "wlccp.scm_node_id", + FT_ETHER, BASE_NONE, NULL, + 0x0, "SCM Node ID", HFILL } + }, + + { &hf_wlccp_scm_unknown_short, + { "Unknown Short", "wlccp.scm_unknown_short", + FT_UINT16, BASE_HEX, NULL, + 0x0, "SCM Unknown Short Value", HFILL } + }, + + { &hf_wlccp_scm_age, + { "SCM Age", "wlccp.scm_age", + FT_UINT32, BASE_DEC, NULL, 0, + "Instance Age", HFILL } + }, + + { &hf_wlccp_scm_path_cost, + { "Path cost", "wlccp.scm_path_cost", + FT_UINT16, BASE_DEC, NULL, + 0x0, "Path cost", HFILL } + }, + + { &hf_wlccp_scm_hop_count, + { "Hop Count", "wlccp.scm_hop_count", + FT_UINT8, BASE_DEC, NULL, 0, + "Number of wireless hops on path to SCM", HFILL } + }, + + { &hf_wlccp_scm_period, + { "Period", "wlccp.scm_period", + FT_UINT8, BASE_DEC, NULL, 0, + "Advertisement Period", HFILL } + }, + { &hf_wlccp_timestamp, { "Timestamp", "wlccp.timestamp", FT_UINT64, BASE_DEC, NULL, 0,
Attachment:
signature.asc
Description: This is a digitally signed message part
- References:
- Prev by Date: Re: [Wireshark-dev] Generic call_dissector()
- Next by Date: Re: [Wireshark-dev] LLRP dissector support
- Previous by thread: [Wireshark-dev] performing cpu/time intensive computation in a protocol dissector
- Next by thread: Re: [Wireshark-dev] [PATCH] bugfix for Ethernet POWERLINK dissector
- Index(es):