aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Verstuyft <bruno.verstuyft@excentis.com>2017-09-26 15:32:03 +0200
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2017-09-26 15:49:09 +0000
commitcd6ca0da41ce2af151670486e724d47870705d44 (patch)
tree6f8071ac9904972d6558bc4353991225c715cacf
parent85c0a7807333d379ca1e0d747b9a424daea2352e (diff)
DOCSIS: Adding Attribute masks to Service Flow
Change-Id: I626b8a1d85e3062c58f9e3bd7bd6c6123c4b8272 Reviewed-on: https://code.wireshark.org/review/23749 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
-rw-r--r--plugins/docsis/packet-tlv.c55
-rw-r--r--plugins/docsis/packet-tlv.h3
2 files changed, 58 insertions, 0 deletions
diff --git a/plugins/docsis/packet-tlv.c b/plugins/docsis/packet-tlv.c
index 05f44e7785..561e8ef97b 100644
--- a/plugins/docsis/packet-tlv.c
+++ b/plugins/docsis/packet-tlv.c
@@ -222,6 +222,9 @@ static int hf_docsis_tlv_sflow_min_traf = -1;
static int hf_docsis_tlv_sflow_ass_min_pkt_size = -1;
static int hf_docsis_tlv_sflow_timeout_active = -1;
static int hf_docsis_tlv_sflow_timeout_admitted = -1;
+static int hf_docsis_tlv_sflow_req_attr_mask = -1;
+static int hf_docsis_tlv_sflow_forb_attr_mask = -1;
+static int hf_docsis_tlv_sflow_attr_aggr_rule_mask = -1;
static int hf_docsis_tlv_sflow_vendor_spec = -1;
static int hf_docsis_tlv_sflow_max_concat_burst = -1;
static int hf_docsis_tlv_sflow_sched_type = -1;
@@ -1296,6 +1299,43 @@ dissect_sflow (tvbuff_t * tvb, packet_info* pinfo, proto_tree * tree, int start,
expert_add_info_format(pinfo, sflow_item, &ei_docsis_tlv_tlvlen_bad, "Wrong TLV length: %u", length);
}
break;
+ case SFW_REQUIRED_ATTRIBUTE_MASK:
+ if (length == 4)
+ {
+ proto_tree_add_item (sflow_tree,
+ hf_docsis_tlv_sflow_req_attr_mask, tvb,
+ pos, length, ENC_NA);
+ }
+ else
+ {
+ expert_add_info_format(pinfo, sflow_item, &ei_docsis_tlv_tlvlen_bad, "Wrong TLV length: %u", length);
+
+ }
+ break;
+ case SFW_FORBIDDEN_ATTRIBUTE_MASK:
+ if (length == 4)
+ {
+ proto_tree_add_item (sflow_tree,
+ hf_docsis_tlv_sflow_forb_attr_mask, tvb,
+ pos, length, ENC_NA);
+ }
+ else
+ {
+ expert_add_info_format(pinfo, sflow_item, &ei_docsis_tlv_tlvlen_bad, "Wrong TLV length: %u", length);
+ }
+ break;
+ case SFW_ATTRIBUTE_AGGREGATION_RULE_MASK:
+ if (length == 4)
+ {
+ proto_tree_add_item (sflow_tree,
+ hf_docsis_tlv_sflow_attr_aggr_rule_mask, tvb,
+ pos, length, ENC_NA);
+ }
+ else
+ {
+ expert_add_info_format(pinfo, sflow_item, &ei_docsis_tlv_tlvlen_bad, "Wrong TLV length: %u", length);
+ }
+ break;
case SFW_VENDOR_SPEC:
proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_vendor_spec,
tvb, pos, length, ENC_NA);
@@ -5160,6 +5200,21 @@ proto_register_docsis_tlv (void)
FT_UINT32, BASE_DEC, NULL, 0x0,
"UGS Time Reference", HFILL}
},
+ {&hf_docsis_tlv_sflow_req_attr_mask,
+ {".31 Required Attribute Mask", "docsis_tlv.sflow.req_attr_mask",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ "Required Attribute Mask", HFILL}
+ },
+ {&hf_docsis_tlv_sflow_forb_attr_mask,
+ {".32 Forbidden Attribute Mask", "docsis_tlv.sflow.forb_attr_mask",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ "Forbidden Attribute Mask", HFILL}
+ },
+ {&hf_docsis_tlv_sflow_attr_aggr_rule_mask,
+ {".33 Attribute Aggregation Rule Mask", "docsis_tlv.sflow.attr_aggr_rule_mask",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ "Attribute Aggregation Rule Mask", HFILL}
+ },
{&hf_docsis_tlv_sflow_vendor_spec,
{".43 Vendor Specific Encodings", "docsis_tlv.sflow.vendorspec",
FT_BYTES, BASE_NONE, NULL, 0x0,
diff --git a/plugins/docsis/packet-tlv.h b/plugins/docsis/packet-tlv.h
index dbf1a81f1f..4ce1489929 100644
--- a/plugins/docsis/packet-tlv.h
+++ b/plugins/docsis/packet-tlv.h
@@ -226,6 +226,9 @@
#define SFW_MIN_RSVD_PACKETSIZE 11
#define SFW_ACTIVE_QOS_TIMEOUT 12
#define SFW_ADMITT_QOS_TIMEOUT 13
+#define SFW_REQUIRED_ATTRIBUTE_MASK 31
+#define SFW_FORBIDDEN_ATTRIBUTE_MASK 32
+#define SFW_ATTRIBUTE_AGGREGATION_RULE_MASK 33
#define SFW_VENDOR_SPEC 43
/* The following types only apply to
* TLV_UPSTREAM_SERVICE_FLOW (24)