diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2006-11-11 01:29:43 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2006-11-11 01:29:43 +0000 |
commit | aca83662506bffa7a03a058a2f3bdf54cf563acd (patch) | |
tree | 0818d4e4647d295ae9bcb598e15ae56d9fd70423 /epan/dissectors/packet-lldp.c | |
parent | d8c269be98479cb9dc8951659d5ba8d4fe6d5a1b (diff) | |
download | wireshark-aca83662506bffa7a03a058a2f3bdf54cf563acd.tar.gz wireshark-aca83662506bffa7a03a058a2f3bdf54cf563acd.tar.bz2 wireshark-aca83662506bffa7a03a058a2f3bdf54cf563acd.zip |
add dissection of PROFINET "MRP Port Status"
svn path=/trunk/; revision=19876
Diffstat (limited to 'epan/dissectors/packet-lldp.c')
-rw-r--r-- | epan/dissectors/packet-lldp.c | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/epan/dissectors/packet-lldp.c b/epan/dissectors/packet-lldp.c index 2a240ea09b..6460c28cac 100644 --- a/epan/dissectors/packet-lldp.c +++ b/epan/dissectors/packet-lldp.c @@ -94,6 +94,8 @@ static int hf_profinet_port_rx_delay_remote = -1; static int hf_profinet_port_tx_delay_local = -1; static int hf_profinet_port_tx_delay_remote = -1; static int hf_profinet_cable_delay_local = -1; +static int hf_profinet_mrp_domain_uuid = -1; +static int hf_profinet_mrrt_port_status = -1; static int hf_profinet_cm_mac = -1; static int hf_unknown_subtype = -1; @@ -430,6 +432,14 @@ const value_string profinet_port3_status_vals[] = { { 0, NULL } }; +const value_string profinet_mrrt_port_status_vals[] = { + { 0, "OFF" }, + { 1, "MRRT_CONFIGURED" }, + { 2, "MRRT_UP" }, + /* all other bits reserved */ + { 0, NULL } +}; + /* Calculate Latitude and Longitude string */ /* Parameters: @@ -2059,6 +2069,8 @@ dissect_profinet_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gu guint32 port_tx_delay_remote; guint32 cable_delay_local; guint8 mac_addr[6]; + e_guid_t * uuid; + guint16 mrrt_PortStatus; /* Get subtype */ @@ -2124,7 +2136,19 @@ dissect_profinet_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gu break; } /*case 3:*/ /* XXX - Alias */ - /*case 4:*/ /* XXX - MRP Port Status */ + case 4: /* MRP Port Status */ + { + /* DomainUUID */ + tvb_get_ntohguid (tvb, offset, (e_guid_t *) &uuid); + proto_tree_add_guid(tree, hf_profinet_mrp_domain_uuid, tvb, offset, 16, (e_guid_t *) &uuid); + offset += 16; + + /* MRRT PortStatus */ + mrrt_PortStatus = tvb_get_ntohs(tvb, offset); + proto_tree_add_uint(tree, hf_profinet_mrrt_port_status, tvb, offset, 2, mrrt_PortStatus); + offset+=2; + break; + } case 5: /* Chassis MAC */ { proto_tree_add_ether(tree, hf_profinet_cm_mac, tvb, offset, 6, mac_addr); @@ -2498,6 +2522,14 @@ proto_register_lldp(void) { "RTClass3 Port Status", "lldp.profinet.rtc3_port_status", FT_UINT16, BASE_HEX, VALS(profinet_port3_status_vals), 0x0, "", HFILL } }, + { &hf_profinet_mrp_domain_uuid, + { "MRP DomainUUID", "lldp.profinet.mrp_domain_uuid", FT_GUID, BASE_NONE, + NULL, 0x0, "", HFILL } + }, + { &hf_profinet_mrrt_port_status, + { "MRRT PortStatus", "lldp.profinet.mrrt_port_status", FT_UINT16, BASE_HEX, + VALS(profinet_mrrt_port_status_vals), 0x0, "", HFILL } + }, { &hf_profinet_cm_mac, { "CMMacAdd", "lldp.profinet.rtc3_port_status", FT_ETHER, BASE_NONE, NULL, 0x0, "CMResponderMacAdd or CMInitiatorMacAdd", HFILL } |