DOCSIS: added vsif general extension dissection
Change-Id: Ic61815b967fac412fb1a324c470ff5171b97acbb Reviewed-on: https://code.wireshark.org/review/23840 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
6172627534
commit
471736ece0
|
@ -46,6 +46,7 @@
|
|||
|
||||
/* Define Vendor ID's here */
|
||||
#define VENDOR_CISCO 0x00000C
|
||||
#define VENDOR_GENERAL 0xFFFFFF
|
||||
|
||||
void proto_register_docsis_vsif(void);
|
||||
void proto_reg_handoff_docsis_vsif(void);
|
||||
|
@ -60,18 +61,83 @@ static int hf_docsis_vsif_cisco_ipprec_val = -1;
|
|||
static int hf_docsis_vsif_cisco_ipprec_bw = -1;
|
||||
static int hf_docsis_vsif_cisco_config_file = -1;
|
||||
|
||||
static int hf_docsis_vsif_gex_loadbal_policy_id = -1;
|
||||
static int hf_docsis_vsif_gex_loadbal_priority = -1;
|
||||
static int hf_docsis_vsif_gex_loadbal_group_id = -1;
|
||||
static int hf_docsis_vsif_gex_ranging_class_id_extension = -1;
|
||||
static int hf_docsis_vsif_gex_l2vpn_encoding = -1;
|
||||
static int hf_docsis_vsif_gex_ecm = -1;
|
||||
static int hf_docsis_vsif_gex_sav = -1;
|
||||
static int hf_docsis_vsif_gex_cmam = -1;
|
||||
static int hf_docsis_vsif_gex_imja = -1;
|
||||
static int hf_docsis_vsif_gex_service_type_identifier = -1;
|
||||
|
||||
static int hf_docsis_vsif_gex_ecm_extended_cmts_mic_hmac_type = -1;
|
||||
static int hf_docsis_vsif_gex_ecm_extended_cmts_mic_bitmap = -1;
|
||||
static int hf_docsis_vsif_gex_ecm_explicit_extended_cmts_mic_digest_subtype = -1;
|
||||
|
||||
static int hf_docsis_vsif_gex_sav_group_name = -1;
|
||||
static int hf_docsis_vsif_gex_sav_static_prefix_rule = -1;
|
||||
|
||||
static int hf_docsis_vsif_gex_sav_static_prefix_addressv4 = -1;
|
||||
static int hf_docsis_vsif_gex_sav_static_prefix_addressv6 = -1;
|
||||
static int hf_docsis_vsif_gex_sav_static_prefix_length = -1;
|
||||
|
||||
static int hf_docsis_vsif_gex_cmam_cm_required_downstream_attribute_mask = -1;
|
||||
static int hf_docsis_vsif_gex_cmam_cm_forbidden_downstream_attribute_mask = -1;
|
||||
static int hf_docsis_vsif_gex_cmam_cm_required_upstream_attribute_mask = -1;
|
||||
static int hf_docsis_vsif_gex_cmam_cm_forbidden_upstream_attribute_mask = -1;
|
||||
|
||||
static int hf_docsis_vsif_gex_imja_ip_multicast_profile_name = -1;
|
||||
static int hf_docsis_vsif_gex_imja_ssr = -1;
|
||||
static int hf_docsis_vsif_gex_imja_maximum_multicast_sessions = -1;
|
||||
|
||||
static int hf_docsis_vsif_gex_imja_ssr_rule_priority = -1;
|
||||
static int hf_docsis_vsif_gex_imja_ssr_authorization_action = -1;
|
||||
static int hf_docsis_vsif_gex_imja_ssr_source_prefix_addressv4 = -1;
|
||||
static int hf_docsis_vsif_gex_imja_ssr_source_prefix_addressv6 = -1;
|
||||
static int hf_docsis_vsif_gex_imja_ssr_source_prefix_length = -1;
|
||||
static int hf_docsis_vsif_gex_imja_ssr_group_prefix_addressv4 = -1;
|
||||
static int hf_docsis_vsif_gex_imja_ssr_group_prefix_addressv6 = -1;
|
||||
static int hf_docsis_vsif_gex_imja_ssr_group_prefix_length = -1;
|
||||
|
||||
static int hf_docsis_vsif_tlv_unknown = -1;
|
||||
|
||||
|
||||
/* Initialize the subtree pointers */
|
||||
static gint ett_docsis_vsif = -1;
|
||||
static gint ett_docsis_vsif_ipprec = -1;
|
||||
static gint ett_docsis_vsif_gex_ecm = -1;
|
||||
static gint ett_docsis_vsif_gex_sav = -1;
|
||||
static gint ett_docsis_vsif_gex_sav_spr = -1;
|
||||
static gint ett_docsis_vsif_gex_cmam = -1;
|
||||
static gint ett_docsis_vsif_gex_imja = -1;
|
||||
static gint ett_docsis_vsif_gex_imja_ssr = -1;
|
||||
|
||||
|
||||
static expert_field ei_docsis_vsif_tlvlen_bad = EI_INIT;
|
||||
static expert_field ei_docsis_vsif_tlvtype_unknown = EI_INIT;
|
||||
|
||||
static const value_string vendorid_vals[] = {
|
||||
{VENDOR_CISCO, "Cisco Systems, Inc."},
|
||||
{VENDOR_GENERAL, "General Extension Information"},
|
||||
{0, NULL},
|
||||
};
|
||||
|
||||
static const value_string hmac_vals[] = {
|
||||
{1, "MD5 HMAC [RFC 2104]"},
|
||||
{2, "MMH16-sigma-n HMAC [DOCSIS SECv3.0]"},
|
||||
{43, "Vendor Specific"},
|
||||
{0, NULL},
|
||||
};
|
||||
|
||||
static const value_string authorization_action_vals[] = {
|
||||
{0, "permit"},
|
||||
{1, "deny"},
|
||||
{0, NULL},
|
||||
};
|
||||
|
||||
|
||||
/* Dissector for Cisco Vendor Specific TLV's */
|
||||
|
||||
#define NUM_PHONES 0x0a
|
||||
|
@ -80,6 +146,10 @@ static const value_string vendorid_vals[] = {
|
|||
#define IP_PREC_VAL 0x01
|
||||
#define IP_PREC_BW 0x02
|
||||
|
||||
static void dissect_general_extension_information (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
|
||||
gint vsif_len);
|
||||
|
||||
|
||||
static void
|
||||
dissect_cisco (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, gint vsif_len)
|
||||
{
|
||||
|
@ -184,12 +254,16 @@ dissect_vsif (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data
|
|||
switch (value)
|
||||
{
|
||||
case VENDOR_CISCO:
|
||||
proto_item_append_text (it, " (Cisco)");
|
||||
dissect_cisco (tvb, pinfo, vsif_tree, vsif_len);
|
||||
break;
|
||||
proto_item_append_text (it, " (Cisco)");
|
||||
dissect_cisco (tvb, pinfo, vsif_tree, vsif_len);
|
||||
break;
|
||||
case VENDOR_GENERAL:
|
||||
proto_item_append_text (it, " (General Extension Information)");
|
||||
dissect_general_extension_information (tvb, pinfo, vsif_tree, vsif_len);
|
||||
break;
|
||||
default:
|
||||
proto_item_append_text (it, " (Unknown)");
|
||||
proto_tree_add_item (vsif_tree, hf_docsis_vsif_vendor_unknown, tvb,
|
||||
proto_item_append_text (it, " (Unknown)");
|
||||
proto_tree_add_item (vsif_tree, hf_docsis_vsif_vendor_unknown, tvb,
|
||||
0, -1, ENC_NA);
|
||||
break;
|
||||
}
|
||||
|
@ -197,6 +271,365 @@ dissect_vsif (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data
|
|||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
||||
|
||||
#define GEX_ECM_EXTENDED_CMTS_MIC_HMAC_TYPE 1
|
||||
#define GEX_ECM_EXTENDED_CMTS_MIC_BITMAP 2
|
||||
#define GEX_ECM_EXPLICIT_EXTENDED_CMTS_MIC_DIGEST_SUBTYPE 3
|
||||
|
||||
static void
|
||||
dissect_extended_cmts_mic(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
|
||||
{
|
||||
proto_item *ecm_it;
|
||||
proto_tree *ecm_tree;
|
||||
guint8 type, length;
|
||||
int pos = start;
|
||||
|
||||
ecm_it = proto_tree_add_item (tree, hf_docsis_vsif_gex_ecm, tvb, start, len, ENC_NA);
|
||||
ecm_tree = proto_item_add_subtree(ecm_it, ett_docsis_vsif_gex_ecm);
|
||||
|
||||
while (pos < (start + len))
|
||||
{
|
||||
type = tvb_get_guint8 (tvb, pos++);
|
||||
length = tvb_get_guint8 (tvb, pos++);
|
||||
switch (type)
|
||||
{
|
||||
case GEX_ECM_EXTENDED_CMTS_MIC_HMAC_TYPE:
|
||||
proto_tree_add_item (ecm_tree, hf_docsis_vsif_gex_ecm_extended_cmts_mic_hmac_type, tvb, pos, length, ENC_BIG_ENDIAN);
|
||||
break;
|
||||
case GEX_ECM_EXTENDED_CMTS_MIC_BITMAP:
|
||||
proto_tree_add_item (ecm_tree, hf_docsis_vsif_gex_ecm_extended_cmts_mic_bitmap, tvb, pos, length, ENC_NA);
|
||||
break;
|
||||
case GEX_ECM_EXPLICIT_EXTENDED_CMTS_MIC_DIGEST_SUBTYPE:
|
||||
proto_tree_add_item (ecm_tree, hf_docsis_vsif_gex_ecm_explicit_extended_cmts_mic_digest_subtype, tvb, pos, length, ENC_NA);
|
||||
break;
|
||||
default:
|
||||
proto_tree_add_item (ecm_tree, hf_docsis_vsif_tlv_unknown, tvb, pos, length, ENC_NA);
|
||||
break;
|
||||
} /* switch */
|
||||
pos += length;
|
||||
} /* while */
|
||||
}
|
||||
|
||||
#define GEX_SAV_STATIC_PREFIX_ADDRESS 1
|
||||
#define GEX_SAV_STATIC_PREFIX_LENGTH 2
|
||||
|
||||
static void
|
||||
dissect_sav_static_prefix_rule(tvbuff_t * tvb, packet_info * pinfo, proto_tree *tree, int start, guint16 len)
|
||||
{
|
||||
proto_item *sav_spr_it;
|
||||
proto_tree *sav_spr_tree;
|
||||
guint8 type, length;
|
||||
int pos = start;
|
||||
|
||||
sav_spr_it = proto_tree_add_item (tree, hf_docsis_vsif_gex_sav_static_prefix_rule, tvb, start, len, ENC_NA);
|
||||
sav_spr_tree = proto_item_add_subtree(sav_spr_it, ett_docsis_vsif_gex_sav_spr);
|
||||
|
||||
while (pos < (start + len))
|
||||
{
|
||||
type = tvb_get_guint8 (tvb, pos++);
|
||||
length = tvb_get_guint8 (tvb, pos++);
|
||||
switch (type)
|
||||
{
|
||||
case GEX_SAV_STATIC_PREFIX_ADDRESS:
|
||||
if (length == 4) {
|
||||
proto_tree_add_item (sav_spr_tree, hf_docsis_vsif_gex_sav_static_prefix_addressv4, tvb, pos, length, ENC_BIG_ENDIAN);
|
||||
} else if (length == 6) {
|
||||
proto_tree_add_item (sav_spr_tree, hf_docsis_vsif_gex_sav_static_prefix_addressv6, tvb, pos, length, ENC_NA);
|
||||
} else {
|
||||
expert_add_info_format(pinfo, sav_spr_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
||||
}
|
||||
break;
|
||||
case GEX_SAV_STATIC_PREFIX_LENGTH:
|
||||
if (length == 1) {
|
||||
proto_tree_add_item (sav_spr_tree, hf_docsis_vsif_gex_sav_static_prefix_length, tvb, pos, length, ENC_BIG_ENDIAN);
|
||||
} else {
|
||||
expert_add_info_format(pinfo, sav_spr_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
proto_tree_add_item (sav_spr_tree, hf_docsis_vsif_tlv_unknown, tvb, pos, length, ENC_NA);
|
||||
break;
|
||||
} /* switch */
|
||||
pos += length;
|
||||
} /* while */
|
||||
}
|
||||
|
||||
|
||||
|
||||
#define GEX_SAV_GROUP_NAME 1
|
||||
#define GEX_SAV_STATIC_PREFIX_RULE 2
|
||||
|
||||
|
||||
static void
|
||||
dissect_sav(tvbuff_t * tvb, packet_info * pinfo, proto_tree *tree, int start, guint16 len)
|
||||
{
|
||||
proto_item *sav_it;
|
||||
proto_tree *sav_tree;
|
||||
guint8 type, length;
|
||||
int pos = start;
|
||||
|
||||
sav_it = proto_tree_add_item (tree, hf_docsis_vsif_gex_sav, tvb, start, len, ENC_NA);
|
||||
sav_tree = proto_item_add_subtree(sav_it, ett_docsis_vsif_gex_sav);
|
||||
|
||||
while (pos < (start + len))
|
||||
{
|
||||
type = tvb_get_guint8 (tvb, pos++);
|
||||
length = tvb_get_guint8 (tvb, pos++);
|
||||
switch (type)
|
||||
{
|
||||
case GEX_SAV_GROUP_NAME:
|
||||
proto_tree_add_item (sav_tree, hf_docsis_vsif_gex_sav_group_name, tvb, pos, length, ENC_ASCII|ENC_NA);
|
||||
break;
|
||||
case GEX_SAV_STATIC_PREFIX_RULE:
|
||||
dissect_sav_static_prefix_rule(tvb, pinfo, sav_tree, pos, length);
|
||||
break;
|
||||
default:
|
||||
proto_tree_add_item (sav_tree, hf_docsis_vsif_tlv_unknown, tvb, pos, length, ENC_NA);
|
||||
break;
|
||||
} /* switch */
|
||||
pos += length;
|
||||
} /* while */
|
||||
}
|
||||
|
||||
|
||||
#define GEX_CM_REQUIRED_DOWNSTREAM_ATTRIBUTE_MASK 1
|
||||
#define GEX_CM_FORBIDDEN_DOWNSTREAM_ATTRIBUTE_MASK 2
|
||||
#define GEX_CM_REQUIRED_UPSTREAM_ATTRIBUTE_MASK 3
|
||||
#define GEX_CM_FORBIDDEN_UPSTREAM_ATTRIBUTE_MASK 4
|
||||
|
||||
static void
|
||||
dissect_cable_modem_attribute_masks(tvbuff_t * tvb, packet_info * pinfo, proto_tree *tree, int start, guint16 len)
|
||||
{
|
||||
proto_item *cmam_it;
|
||||
proto_tree *cmam_tree;
|
||||
guint8 type, length;
|
||||
int pos = start;
|
||||
|
||||
cmam_it = proto_tree_add_item (tree, hf_docsis_vsif_gex_cmam, tvb, start, len, ENC_NA);
|
||||
cmam_tree = proto_item_add_subtree(cmam_it, ett_docsis_vsif_gex_cmam);
|
||||
|
||||
while (pos < (start + len))
|
||||
{
|
||||
type = tvb_get_guint8 (tvb, pos++);
|
||||
length = tvb_get_guint8 (tvb, pos++);
|
||||
switch (type)
|
||||
{
|
||||
case GEX_CM_REQUIRED_DOWNSTREAM_ATTRIBUTE_MASK:
|
||||
if (length != 4) {
|
||||
expert_add_info_format(pinfo, cmam_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
||||
}
|
||||
proto_tree_add_item (cmam_tree, hf_docsis_vsif_gex_cmam_cm_required_downstream_attribute_mask, tvb, pos, length, ENC_NA);
|
||||
break;
|
||||
case GEX_CM_FORBIDDEN_DOWNSTREAM_ATTRIBUTE_MASK:
|
||||
if (length != 4) {
|
||||
expert_add_info_format(pinfo, cmam_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
||||
}
|
||||
proto_tree_add_item (cmam_tree, hf_docsis_vsif_gex_cmam_cm_forbidden_downstream_attribute_mask, tvb, pos, length, ENC_NA);
|
||||
break;
|
||||
case GEX_CM_REQUIRED_UPSTREAM_ATTRIBUTE_MASK:
|
||||
if (length != 4) {
|
||||
expert_add_info_format(pinfo, cmam_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
||||
}
|
||||
proto_tree_add_item (cmam_tree, hf_docsis_vsif_gex_cmam_cm_required_upstream_attribute_mask, tvb, pos, length, ENC_NA);
|
||||
break;
|
||||
case GEX_CM_FORBIDDEN_UPSTREAM_ATTRIBUTE_MASK:
|
||||
if (length != 4) {
|
||||
expert_add_info_format(pinfo, cmam_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
||||
}
|
||||
proto_tree_add_item (cmam_tree, hf_docsis_vsif_gex_cmam_cm_forbidden_upstream_attribute_mask, tvb, pos, length, ENC_NA);
|
||||
break;
|
||||
default: proto_tree_add_item (cmam_tree, hf_docsis_vsif_tlv_unknown, tvb, pos, length, ENC_NA);
|
||||
} /* switch */
|
||||
pos += length;
|
||||
} /* while */
|
||||
}
|
||||
|
||||
|
||||
#define GEX_IMJA_SSR_RULE_PRIORITY 1
|
||||
#define GEX_IMJA_SSR_AUTHORIZATION_ACTION 2
|
||||
#define GEX_IMJA_SSR_AUTHORIZATION_SOURCE_PREFIX_ADDRESS 3
|
||||
#define GEX_IMJA_SSR_AUTHORIZATION_SOURCE_PREFIX_LENGTH 4
|
||||
#define GEX_IMJA_SSR_AUTHORIZATION_GROUP_PREFIX_ADDRESS 5
|
||||
#define GEX_IMJA_SSR_AUTHORIZATION_GROUP_PREFIX_LENGTH 6
|
||||
|
||||
|
||||
static void
|
||||
dissect_ip_multicast_join_authorization_static_session_rule(tvbuff_t * tvb, packet_info * pinfo, proto_tree *tree, int start, guint16 len)
|
||||
{
|
||||
proto_item *imja_ssr_it;
|
||||
proto_tree *imja_ssr_tree;
|
||||
guint8 type, length;
|
||||
int pos = start;
|
||||
|
||||
imja_ssr_it = proto_tree_add_item (tree, hf_docsis_vsif_gex_imja_ssr, tvb, start, len, ENC_NA);
|
||||
imja_ssr_tree = proto_item_add_subtree(imja_ssr_it, ett_docsis_vsif_gex_imja_ssr);
|
||||
|
||||
while (pos < (start + len))
|
||||
{
|
||||
type = tvb_get_guint8 (tvb, pos++);
|
||||
length = tvb_get_guint8 (tvb, pos++);
|
||||
switch (type)
|
||||
{
|
||||
case GEX_IMJA_SSR_RULE_PRIORITY:
|
||||
if (length != 1) {
|
||||
expert_add_info_format(pinfo, imja_ssr_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
||||
}
|
||||
proto_tree_add_item (imja_ssr_tree, hf_docsis_vsif_gex_imja_ssr_rule_priority, tvb, pos, length, ENC_BIG_ENDIAN);
|
||||
break;
|
||||
case GEX_IMJA_SSR_AUTHORIZATION_ACTION:
|
||||
if (length != 1) {
|
||||
expert_add_info_format(pinfo, imja_ssr_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
||||
}
|
||||
proto_tree_add_item (imja_ssr_tree, hf_docsis_vsif_gex_imja_ssr_authorization_action, tvb, pos, length, ENC_BIG_ENDIAN);
|
||||
break;
|
||||
case GEX_IMJA_SSR_AUTHORIZATION_SOURCE_PREFIX_ADDRESS:
|
||||
if (length == 4) {
|
||||
proto_tree_add_item (imja_ssr_tree, hf_docsis_vsif_gex_imja_ssr_source_prefix_addressv4, tvb, pos, length, ENC_BIG_ENDIAN);
|
||||
} else if (length == 6) {
|
||||
proto_tree_add_item (imja_ssr_tree, hf_docsis_vsif_gex_imja_ssr_source_prefix_addressv6, tvb, pos, length, ENC_NA);
|
||||
} else {
|
||||
expert_add_info_format(pinfo, imja_ssr_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
||||
}
|
||||
break;
|
||||
case GEX_IMJA_SSR_AUTHORIZATION_SOURCE_PREFIX_LENGTH:
|
||||
if (length != 1) {
|
||||
expert_add_info_format(pinfo, imja_ssr_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
||||
}
|
||||
proto_tree_add_item (imja_ssr_tree, hf_docsis_vsif_gex_imja_ssr_source_prefix_length, tvb, pos, length, ENC_BIG_ENDIAN);
|
||||
break;
|
||||
case GEX_IMJA_SSR_AUTHORIZATION_GROUP_PREFIX_ADDRESS:
|
||||
if (length == 4) {
|
||||
proto_tree_add_item (imja_ssr_tree, hf_docsis_vsif_gex_imja_ssr_group_prefix_addressv4, tvb, pos, length, ENC_BIG_ENDIAN);
|
||||
} else if (length == 6) {
|
||||
proto_tree_add_item (imja_ssr_tree, hf_docsis_vsif_gex_imja_ssr_group_prefix_addressv6, tvb, pos, length, ENC_NA);
|
||||
} else {
|
||||
expert_add_info_format(pinfo, imja_ssr_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
||||
}
|
||||
break;
|
||||
case GEX_IMJA_SSR_AUTHORIZATION_GROUP_PREFIX_LENGTH:
|
||||
if (length != 1) {
|
||||
expert_add_info_format(pinfo, imja_ssr_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
||||
}
|
||||
proto_tree_add_item (imja_ssr_tree, hf_docsis_vsif_gex_imja_ssr_group_prefix_length, tvb, pos, length, ENC_BIG_ENDIAN);
|
||||
break;
|
||||
default: proto_tree_add_item (imja_ssr_tree, hf_docsis_vsif_tlv_unknown, tvb, pos, length, ENC_NA);
|
||||
} /* switch */
|
||||
pos += length;
|
||||
} /* while */
|
||||
}
|
||||
|
||||
#define GEX_IMJA_IP_MULTICAST_PROFILE_NAME 1
|
||||
#define GEX_IMJA_IP_MULTICAST_PROFILE_JOIN_AUTHORIZATION_STATIC_SESSION_RULE 2
|
||||
#define GEX_IMJA_MAXIMUM_MULTICAST_SESSIONS 3
|
||||
|
||||
|
||||
static void
|
||||
dissect_ip_multicast_join_authorization(tvbuff_t * tvb, packet_info * pinfo, proto_tree *tree, int start, guint16 len)
|
||||
{
|
||||
proto_item *imja_it;
|
||||
proto_tree *imja_tree;
|
||||
guint8 type, length;
|
||||
int pos = start;
|
||||
|
||||
imja_it = proto_tree_add_item (tree, hf_docsis_vsif_gex_imja, tvb, start, len, ENC_NA);
|
||||
imja_tree = proto_item_add_subtree(imja_it, ett_docsis_vsif_gex_imja);
|
||||
|
||||
while (pos < (start + len))
|
||||
{
|
||||
type = tvb_get_guint8 (tvb, pos++);
|
||||
length = tvb_get_guint8 (tvb, pos++);
|
||||
switch (type)
|
||||
{
|
||||
case GEX_IMJA_IP_MULTICAST_PROFILE_NAME:
|
||||
if ((length < 1) || (length > 15)) {
|
||||
expert_add_info_format(pinfo, imja_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
||||
}
|
||||
proto_tree_add_item (imja_tree, hf_docsis_vsif_gex_imja_ip_multicast_profile_name, tvb, pos, length, ENC_ASCII|ENC_NA);
|
||||
break;
|
||||
case GEX_IMJA_IP_MULTICAST_PROFILE_JOIN_AUTHORIZATION_STATIC_SESSION_RULE:
|
||||
dissect_ip_multicast_join_authorization_static_session_rule(tvb, pinfo, imja_tree, pos, length);
|
||||
break;
|
||||
case GEX_IMJA_MAXIMUM_MULTICAST_SESSIONS:
|
||||
if (length != 2) {
|
||||
expert_add_info_format(pinfo, imja_it, &ei_docsis_vsif_tlvlen_bad, "Wrong TLV length: %u", length);
|
||||
}
|
||||
proto_tree_add_item (imja_tree, hf_docsis_vsif_gex_imja_maximum_multicast_sessions, tvb, pos, length, ENC_BIG_ENDIAN);
|
||||
break;
|
||||
default: proto_tree_add_item (imja_tree, hf_docsis_vsif_tlv_unknown, tvb, pos, length, ENC_NA);
|
||||
} /* switch */
|
||||
pos += length;
|
||||
} /* while */
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Dissector for General Extension TLV's */
|
||||
|
||||
#define GEX_CM_LOAD_BALANCING_POLICY_ID 1
|
||||
#define GEX_CM_LOAD_BALANCING_PRIORITY 2
|
||||
#define GEX_CM_LOAD_BALANCING_GROUP_ID 3
|
||||
#define GEX_CM_RANGING_CLASS_ID_EXTENSION 4
|
||||
#define GEX_L2VPN_ENCODING 5
|
||||
#define GEX_EXTENDED_CMTS_MIC_CONFIGURATION_SETTING 6
|
||||
#define GEX_EXTENDED_SAV 7
|
||||
#define GEX_CABLE_MODEM_ATTRIBUTE_MASKS 9
|
||||
#define GEX_IP_MULTICAST_JOIN_AUTHORIZATION 10
|
||||
#define GEX_SERVICE_TYPE_IDENTIFIER 11
|
||||
|
||||
|
||||
|
||||
static void
|
||||
dissect_general_extension_information (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, gint vsif_len)
|
||||
{
|
||||
/* Start at pos = 5, since tvb includes the Vendor ID field */
|
||||
int pos = 5;
|
||||
guint8 type, length;
|
||||
|
||||
while (pos < vsif_len)
|
||||
{
|
||||
/* Extract the type and length Fields from the TLV */
|
||||
type = tvb_get_guint8 (tvb, pos++);
|
||||
length = tvb_get_guint8 (tvb, pos++);
|
||||
switch (type)
|
||||
{
|
||||
case GEX_CM_LOAD_BALANCING_POLICY_ID:
|
||||
proto_tree_add_item (tree, hf_docsis_vsif_gex_loadbal_policy_id, tvb, pos, length, ENC_BIG_ENDIAN);
|
||||
break;
|
||||
case GEX_CM_LOAD_BALANCING_PRIORITY:
|
||||
proto_tree_add_item (tree, hf_docsis_vsif_gex_loadbal_priority, tvb, pos, length, ENC_BIG_ENDIAN);
|
||||
break;
|
||||
case GEX_CM_LOAD_BALANCING_GROUP_ID:
|
||||
proto_tree_add_item (tree, hf_docsis_vsif_gex_loadbal_group_id, tvb, pos, length, ENC_BIG_ENDIAN);
|
||||
break;
|
||||
case GEX_CM_RANGING_CLASS_ID_EXTENSION:
|
||||
proto_tree_add_item (tree, hf_docsis_vsif_gex_ranging_class_id_extension, tvb, pos, length, ENC_BIG_ENDIAN);
|
||||
break;
|
||||
case GEX_L2VPN_ENCODING:
|
||||
proto_tree_add_item (tree, hf_docsis_vsif_gex_l2vpn_encoding, tvb, pos, length, ENC_NA);
|
||||
break;
|
||||
case GEX_EXTENDED_CMTS_MIC_CONFIGURATION_SETTING:
|
||||
dissect_extended_cmts_mic(tvb, tree, pos, length);
|
||||
break;
|
||||
case GEX_EXTENDED_SAV:
|
||||
dissect_sav(tvb, pinfo, tree, pos, length);
|
||||
break;
|
||||
case GEX_CABLE_MODEM_ATTRIBUTE_MASKS:
|
||||
dissect_cable_modem_attribute_masks(tvb, pinfo, tree, pos, length);
|
||||
break;
|
||||
case GEX_IP_MULTICAST_JOIN_AUTHORIZATION:
|
||||
dissect_ip_multicast_join_authorization(tvb, pinfo, tree, pos, length);
|
||||
break;
|
||||
case GEX_SERVICE_TYPE_IDENTIFIER:
|
||||
proto_tree_add_item (tree, hf_docsis_vsif_gex_service_type_identifier, tvb, pos, length, ENC_ASCII|ENC_NA);
|
||||
break;
|
||||
default:
|
||||
proto_tree_add_item (tree, hf_docsis_vsif_tlv_unknown, tvb, pos, length, ENC_NA);
|
||||
}
|
||||
pos += length;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Register the protocol with Wireshark */
|
||||
void
|
||||
proto_register_docsis_vsif (void)
|
||||
|
@ -239,11 +672,187 @@ proto_register_docsis_vsif (void)
|
|||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_loadbal_policy_id,
|
||||
{".1 CM Load Balancing Policy ID", "docsis_vsif.gex.loadbal_policyid",
|
||||
FT_UINT32, BASE_DEC, NULL, 0x0,
|
||||
"General Extension Information - CM Load Balancing Policy ID", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_loadbal_priority,
|
||||
{".2 CM Load Balancing Priority", "docsis_vsif.gex.loadbal_priority",
|
||||
FT_UINT32, BASE_DEC, NULL, 0x0,
|
||||
"General Extension Information - CM Load Balancing Priority", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_loadbal_group_id,
|
||||
{".3 CM Load Balancing Group ID", "docsis_vsif.gex.loadbal_group_id",
|
||||
FT_UINT32, BASE_DEC, NULL, 0x0,
|
||||
"General Extension Information - CM Load Balancing Group ID", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_ranging_class_id_extension,
|
||||
{".4 CM Ranging Class ID Extension", "docsis_vsif.gex.ranging_class_id_extension",
|
||||
FT_UINT32, BASE_DEC, NULL, 0x0,
|
||||
"General Extension Information - CM Ranging Class ID Extension", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_l2vpn_encoding,
|
||||
{".5 L2VPN Encoding", "docsis_vsif.gex.l2vpn_encoding",
|
||||
FT_BYTES, BASE_NONE, NULL, 0x0,
|
||||
"General Extension Information - L2VPN Encoding", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_ecm,
|
||||
{".6 Extended CMTS MIC Configuration Setting", "docsis_vsif.gex.extended_cmts_mic_configuration_setting",
|
||||
FT_BYTES, BASE_NONE, NULL, 0x0,
|
||||
"General Extension Information - Extended CMTS MIC Configuration Setting", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_ecm_extended_cmts_mic_hmac_type,
|
||||
{"..1 Extended CMTS MIC Hmac type", "docsis_vsif.gex.extended_cmts_mic_hmac_type",
|
||||
FT_UINT8, BASE_DEC, VALS(hmac_vals), 0x0,
|
||||
"General Extension Information - Extended CMTS MIC Hmac type", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_ecm_extended_cmts_mic_bitmap,
|
||||
{"..2 Extended CMTS MIC Bitmap", "docsis_vsif.gex.extended_cmts_mic_hmac_type",
|
||||
FT_BYTES, BASE_NONE, NULL, 0x0,
|
||||
"General Extension Information - Extended CMTS MIC Bitmap", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_ecm_explicit_extended_cmts_mic_digest_subtype,
|
||||
{"..3 Explicit Extended CMTS MIC Digest Subtype", "docsis_vsif.gex.extended_cmts_mic_digest_subtype",
|
||||
FT_BYTES, BASE_NONE, NULL, 0x0,
|
||||
"General Extension Information - Explicit Extended CMTS MIC Digest Subtype", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_sav,
|
||||
{".7 Source Address Verification (SAV) Authorization Encoding", "docsis_vsif.gex.sav",
|
||||
FT_BYTES, BASE_NONE, NULL, 0x0,
|
||||
"General Extension Information - Source Address Verification (SAV) Authorization Encoding", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_sav_group_name,
|
||||
{"..1 SAV Group Name", "docsis_vsif.gex.sav.sav_group_name",
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
"General Extension Information - SAV - SAV Group Name", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_sav_static_prefix_rule,
|
||||
{"..2 SAV Static Prefix Rule", "docsis_vsif.gex.sav.static_prefix_rule",
|
||||
FT_BYTES, BASE_NONE, NULL, 0x0,
|
||||
"General Extension Information - SAV -Static Prefix Rule", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_sav_static_prefix_addressv4,
|
||||
{"...1 SAV Static Prefix Address", "docsis_vsif.gex.sav.spr.static_prefix_address",
|
||||
FT_IPv4, BASE_NONE, NULL, 0x0,
|
||||
"General Extension Information - SAV -Static Prefix Rule - Static Prefix Address", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_sav_static_prefix_addressv6,
|
||||
{"...1 SAV Static Prefix Address", "docsis_vsif.gex.sav.spr.static_prefix_address",
|
||||
FT_IPv6, BASE_NONE, NULL, 0x0,
|
||||
"General Extension Information - SAV -Static Prefix Rule - Static Prefix Address", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_sav_static_prefix_length,
|
||||
{"...2 SAV Static Prefix Length", "docsis_vsif.gex.sav.spr.static_prefix_length",
|
||||
FT_UINT8, BASE_DEC, NULL, 0x0,
|
||||
"General Extension Information - SAV -Static Prefix Rule - Static Prefix Length", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_cmam,
|
||||
{".9 CM Attribute Mask", "docsis_vsif.gex.cmam",
|
||||
FT_BYTES, BASE_NONE, NULL, 0x0,
|
||||
"General Extension Information - CM Attribute Mask", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_cmam_cm_required_downstream_attribute_mask,
|
||||
{"..1 CM Required Downstream Attribute", "docsis_vsif.gex.cmam.cm_required_downstream_attribute",
|
||||
FT_BYTES, BASE_NONE, NULL, 0x0,
|
||||
"General Extension Information - CM Attribute Mask - CM Required Downstream Attribute", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_cmam_cm_forbidden_downstream_attribute_mask,
|
||||
{"..2 CM Forbidden Downstream Attribute", "docsis_vsif.gex.cmam.cm_forbidden_downstream_attribute",
|
||||
FT_BYTES, BASE_NONE, NULL, 0x0,
|
||||
"General Extension Information - CM Attribute Mask - CM Forbidden Downstream Attribute", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_cmam_cm_required_upstream_attribute_mask,
|
||||
{"..3 CM Required Upstream Attribute", "docsis_vsif.gex.cmam.cm_required_upstream_attribute",
|
||||
FT_BYTES, BASE_NONE, NULL, 0x0,
|
||||
"General Extension Information - CM Attribute Mask - CM Required Upstream Attribute", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_cmam_cm_forbidden_upstream_attribute_mask,
|
||||
{"..4 CM Forbidden Upstream Attribute", "docsis_vsif.gex.cmam.cm_forbidden_upstream_attribute",
|
||||
FT_BYTES, BASE_NONE, NULL, 0x0,
|
||||
"General Extension Information - CM Attribute Mask - CM Forbidden Upstream Attribute", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_imja,
|
||||
{".10 IP Multicast Join Authorization", "docsis_vsif.gex.imja",
|
||||
FT_BYTES, BASE_NONE, NULL, 0x0,
|
||||
"General Extension Information - IP Multicast Join Authorization", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_imja_ip_multicast_profile_name,
|
||||
{"..1 IP Multicast Profile Name", "docsis_vsif.gex.imja.ip_multicast_profile_name",
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
"General Extension Information - IP Multicast Join Authorization - IP Multicast Profile Name", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_imja_ssr,
|
||||
{"..2 IP Multicast Profile Join Authorization Static Session Rule", "docsis_vsif.gex.imja.ip_multicast_join_authorization_static_session_rule",
|
||||
FT_BYTES, BASE_NONE, NULL, 0x0,
|
||||
"General Extension Information - IP Multicast Join Authorization - IP Multicast Profile Join Authorization Static Session Rule", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_imja_ssr_rule_priority,
|
||||
{"...1 Rule Priority", "docsis_vsif.gex.imja.imja_ssr_rule_priority",
|
||||
FT_UINT8, BASE_DEC, NULL, 0x0,
|
||||
"General Extension Information - IP Multicast Join Authorization - IP Multicast Profile Join Authorization Static Session Rule - Rule Priority", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_imja_ssr_authorization_action,
|
||||
{"...2 Authorization Action", "docsis_vsif.gex.imja.imja_ssr_authorization_action",
|
||||
FT_UINT8, BASE_DEC, VALS(authorization_action_vals), 0x0,
|
||||
"General Extension Information - IP Multicast Join Authorization - IP Multicast Profile Join Authorization Static Session Rule - Rule Priority", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_imja_ssr_source_prefix_addressv4,
|
||||
{"...3 Source Prefix Address", "docsis_vsif.gex.imja.imja_ssr_source_prefix_address",
|
||||
FT_IPv4, BASE_NONE, NULL, 0x0,
|
||||
"General Extension Information - IP Multicast Join Authorization - IP Multicast Profile Join Authorization Static Session Rule - Source Prefix Address", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_imja_ssr_source_prefix_addressv6,
|
||||
{"...3 Source Prefix Address", "docsis_vsif.gex.imja.imja_ssr_source_prefix_address",
|
||||
FT_IPv6, BASE_NONE, NULL, 0x0,
|
||||
"General Extension Information - IP Multicast Join Authorization - IP Multicast Profile Join Authorization Static Session Rule - Source Prefix Address", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_imja_ssr_source_prefix_length,
|
||||
{"...4 Source Prefix Length", "docsis_vsif.gex.imja.imja_ssr_source_prefix_length",
|
||||
FT_UINT8, BASE_DEC, NULL, 0x0,
|
||||
"General Extension Information - IP Multicast Join Authorization - IP Multicast Profile Join Authorization Static Session Rule - Source Prefix Length", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_imja_ssr_group_prefix_addressv4,
|
||||
{"...5 Group Prefix Address", "docsis_vsif.gex.imja.imja_ssr_group_prefix_address",
|
||||
FT_IPv4, BASE_NONE, NULL, 0x0,
|
||||
"General Extension Information - IP Multicast Join Authorization - IP Multicast Profile Join Authorization Static Session Rule - Group Prefix Address", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_imja_ssr_group_prefix_addressv6,
|
||||
{"...5 Group Prefix Address", "docsis_vsif.gex.imja.imja_ssr_group_prefix_address",
|
||||
FT_IPv6, BASE_NONE, NULL, 0x0,
|
||||
"General Extension Information - IP Multicast Join Authorization - IP Multicast Profile Join Authorization Static Session Rule - Group Prefix Address", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_imja_ssr_group_prefix_length,
|
||||
{"...6 Group Prefix Length", "docsis_vsif.gex.imja.imja_ssr_group_prefix_length",
|
||||
FT_UINT8, BASE_DEC, NULL, 0x0,
|
||||
"General Extension Information - IP Multicast Join Authorization - IP Multicast Profile Join Authorization Static Session Rule - Group Prefix Length", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_imja_maximum_multicast_sessions,
|
||||
{"..3 Maximum Multicast Sessions", "docsis_vsif.gex.imja.imja_maximum_multicast_sessions",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
"General Extension Information - IP Multicast Join Authorization - Maximum Multicast Sessions", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_gex_service_type_identifier,
|
||||
{".11 Service Type Identifier", "docsis_vsif.gex.service_type_identifier",
|
||||
FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
"General Extension Information - Service Type Identifier", HFILL}
|
||||
},
|
||||
{&hf_docsis_vsif_tlv_unknown,
|
||||
{"Unknown VSIF TLV", "docsis_vsif.unknown",
|
||||
FT_BYTES, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL}
|
||||
},
|
||||
};
|
||||
|
||||
static gint *ett[] = {
|
||||
&ett_docsis_vsif,
|
||||
&ett_docsis_vsif_ipprec,
|
||||
&ett_docsis_vsif_gex_ecm,
|
||||
&ett_docsis_vsif_gex_sav,
|
||||
&ett_docsis_vsif_gex_sav_spr,
|
||||
&ett_docsis_vsif_gex_cmam,
|
||||
&ett_docsis_vsif_gex_imja,
|
||||
&ett_docsis_vsif_gex_imja_ssr
|
||||
};
|
||||
|
||||
expert_module_t* expert_docsis_vsif;
|
||||
|
|
Loading…
Reference in New Issue