aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-cfm.c31
1 files changed, 22 insertions, 9 deletions
diff --git a/epan/dissectors/packet-cfm.c b/epan/dissectors/packet-cfm.c
index f36db338da..b7057a8b62 100644
--- a/epan/dissectors/packet-cfm.c
+++ b/epan/dissectors/packet-cfm.c
@@ -40,6 +40,7 @@
#include <epan/packet.h>
#include <epan/etypes.h>
+#include <epan/addr_resolv.h>
/** Value declarations for CFM EOAM (IEEE 802.1ag) dissection */
#define IEEE8021 0x00
@@ -815,6 +816,7 @@ static int dissect_cfm_mcc(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
gint cfm_tlv_offset;
proto_item *ti;
proto_item *fi;
+ proto_item *oi;
proto_tree *cfm_pdu_tree;
proto_tree *cfm_flag_tree;
@@ -829,7 +831,8 @@ static int dissect_cfm_mcc(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
proto_tree_add_item(cfm_pdu_tree, hf_cfm_first_tlv_offset, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- proto_tree_add_item(cfm_pdu_tree, hf_tlv_org_spec_oui, tvb, offset, 3, ENC_NA);
+ oi = proto_tree_add_item(cfm_pdu_tree, hf_tlv_org_spec_oui, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_item_append_text(oi, " (%s)", tvb_get_manuf_name(tvb, offset));
offset += 3;
proto_tree_add_item(cfm_pdu_tree, hf_tlv_org_spec_subtype, tvb, offset, 1, ENC_NA);
offset += 1;
@@ -995,6 +998,7 @@ static int dissect_cfm_exm(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
gint cfm_tlv_offset;
proto_item *ti;
proto_item *fi;
+ proto_item *oi;
proto_tree *cfm_pdu_tree;
proto_tree *cfm_flag_tree;
@@ -1009,7 +1013,8 @@ static int dissect_cfm_exm(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
proto_tree_add_item(cfm_pdu_tree, hf_cfm_first_tlv_offset, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- proto_tree_add_item(cfm_pdu_tree, hf_tlv_org_spec_oui, tvb, offset, 3, ENC_NA);
+ oi = proto_tree_add_item(cfm_pdu_tree, hf_tlv_org_spec_oui, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_item_append_text(oi, " (%s)", tvb_get_manuf_name(tvb, offset));
offset += 3;
proto_tree_add_item(cfm_pdu_tree, hf_tlv_org_spec_subtype, tvb, offset, 1, ENC_NA);
offset += 1;
@@ -1033,6 +1038,7 @@ static int dissect_cfm_exr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
gint cfm_tlv_offset;
proto_item *ti;
proto_item *fi;
+ proto_item *oi;
proto_tree *cfm_pdu_tree;
proto_tree *cfm_flag_tree;
@@ -1047,7 +1053,8 @@ static int dissect_cfm_exr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
proto_tree_add_item(cfm_pdu_tree, hf_cfm_first_tlv_offset, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- proto_tree_add_item(cfm_pdu_tree, hf_tlv_org_spec_oui, tvb, offset, 3, ENC_NA);
+ oi = proto_tree_add_item(cfm_pdu_tree, hf_tlv_org_spec_oui, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_item_append_text(oi, " (%s)", tvb_get_manuf_name(tvb, offset));
offset += 3;
proto_tree_add_item(cfm_pdu_tree, hf_tlv_org_spec_subtype, tvb, offset, 1, ENC_NA);
offset += 1;
@@ -1071,6 +1078,7 @@ static int dissect_cfm_vsm(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
gint cfm_tlv_offset;
proto_item *ti;
proto_item *fi;
+ proto_item *oi;
proto_tree *cfm_pdu_tree;
proto_tree *cfm_flag_tree;
@@ -1085,7 +1093,8 @@ static int dissect_cfm_vsm(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
proto_tree_add_item(cfm_pdu_tree, hf_cfm_first_tlv_offset, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- proto_tree_add_item(cfm_pdu_tree, hf_tlv_org_spec_oui, tvb, offset, 3, ENC_NA);
+ oi = proto_tree_add_item(cfm_pdu_tree, hf_tlv_org_spec_oui, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_item_append_text(oi, " (%s)", tvb_get_manuf_name(tvb, offset));
offset += 3;
proto_tree_add_item(cfm_pdu_tree, hf_tlv_org_spec_subtype, tvb, offset, 1, ENC_NA);
offset += 1;
@@ -1109,6 +1118,7 @@ static int dissect_cfm_vsr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
gint cfm_tlv_offset;
proto_item *ti;
proto_item *fi;
+ proto_item *oi;
proto_tree *cfm_pdu_tree;
proto_tree *cfm_flag_tree;
@@ -1123,7 +1133,8 @@ static int dissect_cfm_vsr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
proto_tree_add_item(cfm_pdu_tree, hf_cfm_first_tlv_offset, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- proto_tree_add_item(cfm_pdu_tree, hf_tlv_org_spec_oui, tvb, offset, 3, ENC_NA);
+ oi = proto_tree_add_item(cfm_pdu_tree, hf_tlv_org_spec_oui, tvb, offset, 3, ENC_BIG_ENDIAN);
+ proto_item_append_text(oi, " (%s)", tvb_get_manuf_name(tvb, offset));
offset += 3;
proto_tree_add_item(cfm_pdu_tree, hf_tlv_org_spec_subtype, tvb, offset, 1, ENC_NA);
offset += 1;
@@ -1228,6 +1239,7 @@ static int dissect_cfm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
if (tree) { /* we are being asked for details */
gint cfm_tlv_offset;
proto_item *ti;
+ proto_item *oi;
proto_tree *cfm_tree;
/* isolate the payload of the packet */
@@ -1504,8 +1516,9 @@ static int dissect_cfm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
* and the subtype.
*/
if (cfm_tlv_length > 3) {
- proto_tree_add_item(cfm_tlv_tree, hf_tlv_org_spec_oui,
- tvb, tlv_data_offset, 3, ENC_NA);
+ oi = proto_tree_add_item(cfm_tlv_tree, hf_tlv_org_spec_oui,
+ tvb, tlv_data_offset, 3, ENC_BIG_ENDIAN);
+ proto_item_append_text(oi, " (%s)", tvb_get_manuf_name(tvb, tlv_data_offset));
tlv_data_offset += 3;
proto_tree_add_item(cfm_tlv_tree, hf_tlv_org_spec_subtype,
tvb, tlv_data_offset, 1, ENC_NA);
@@ -2104,8 +2117,8 @@ void proto_register_cfm(void)
/* Organization-Specific TLV */
{ &hf_tlv_org_spec_oui,
- { "OUI", "cfm.tlv.org.spec.oui", FT_BYTES,
- BASE_NONE, NULL, 0x0, NULL, HFILL }
+ { "OUI", "cfm.tlv.org.spec.oui", FT_UINT24,
+ BASE_HEX, NULL, 0x0, NULL, HFILL }
},
{ &hf_tlv_org_spec_subtype,
{ "Sub-Type", "cfm.tlv.org.spec.subtype", FT_BYTES,