summaryrefslogtreecommitdiff
path: root/plugins/docsis
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2014-10-05 16:12:34 -0400
committerBill Meier <wmeier@newsguy.com>2014-10-05 20:19:53 +0000
commitad6134bb4b686e7c70503ff169eb10f8fe463c97 (patch)
treeed5ab5bb2f8d8e2bc9ef2c4613adeab62a7df1d6 /plugins/docsis
parent0b18d6cb77022494a875e6e0d9d2ad27fb6ac6d9 (diff)
downloadwireshark-ad6134bb4b686e7c70503ff169eb10f8fe463c97.tar.gz
docsis: Add editor modelines; Adjust whitespace; Remove boilerplate comments.
Change-Id: I78f9815616f4fc3c14204339c5826f0ca7d0680e Reviewed-on: https://code.wireshark.org/review/4485 Reviewed-by: Bill Meier <wmeier@newsguy.com>
Diffstat (limited to 'plugins/docsis')
-rw-r--r--plugins/docsis/packet-bintrngreq.c56
-rw-r--r--plugins/docsis/packet-bpkmattr.c441
-rw-r--r--plugins/docsis/packet-bpkmreq.c82
-rw-r--r--plugins/docsis/packet-bpkmrsp.c78
-rw-r--r--plugins/docsis/packet-cmctrlreq.c52
-rw-r--r--plugins/docsis/packet-cmctrlrsp.c45
-rw-r--r--plugins/docsis/packet-cmstatus.c237
-rw-r--r--plugins/docsis/packet-dbcack.c53
-rw-r--r--plugins/docsis/packet-dbcreq.c61
-rw-r--r--plugins/docsis/packet-dbcrsp.c58
-rw-r--r--plugins/docsis/packet-dccack.c143
-rw-r--r--plugins/docsis/packet-dccreq.c770
-rw-r--r--plugins/docsis/packet-dccrsp.c251
-rw-r--r--plugins/docsis/packet-dcd.c1119
-rw-r--r--plugins/docsis/packet-docsis.c501
-rw-r--r--plugins/docsis/packet-dpvreq.c79
-rw-r--r--plugins/docsis/packet-dpvrsp.c81
-rw-r--r--plugins/docsis/packet-dsaack.c55
-rw-r--r--plugins/docsis/packet-dsareq.c50
-rw-r--r--plugins/docsis/packet-dsarsp.c59
-rw-r--r--plugins/docsis/packet-dscack.c58
-rw-r--r--plugins/docsis/packet-dscreq.c51
-rw-r--r--plugins/docsis/packet-dscrsp.c55
-rw-r--r--plugins/docsis/packet-dsdreq.c59
-rw-r--r--plugins/docsis/packet-dsdrsp.c57
-rw-r--r--plugins/docsis/packet-intrngreq.c60
-rw-r--r--plugins/docsis/packet-macmgmt.c144
-rw-r--r--plugins/docsis/packet-map.c159
-rw-r--r--plugins/docsis/packet-mdd.c1020
-rw-r--r--plugins/docsis/packet-regack.c61
-rw-r--r--plugins/docsis/packet-regreq.c49
-rw-r--r--plugins/docsis/packet-regreqmp.c135
-rw-r--r--plugins/docsis/packet-regrsp.c53
-rw-r--r--plugins/docsis/packet-regrspmp.c156
-rw-r--r--plugins/docsis/packet-rngreq.c63
-rw-r--r--plugins/docsis/packet-rngrsp.c195
-rw-r--r--plugins/docsis/packet-sync.c100
-rw-r--r--plugins/docsis/packet-tlv-cmctrl.c57
-rw-r--r--plugins/docsis/packet-tlv.c6074
-rw-r--r--plugins/docsis/packet-type29ucd.c1402
-rw-r--r--plugins/docsis/packet-uccreq.c59
-rw-r--r--plugins/docsis/packet-uccrsp.c52
-rw-r--r--plugins/docsis/packet-ucd.c1092
-rw-r--r--plugins/docsis/packet-vendor.c161
44 files changed, 7702 insertions, 7941 deletions
diff --git a/plugins/docsis/packet-bintrngreq.c b/plugins/docsis/packet-bintrngreq.c
index 24eaab39c5..d3455cd014 100644
--- a/plugins/docsis/packet-bintrngreq.c
+++ b/plugins/docsis/packet-bintrngreq.c
@@ -37,11 +37,10 @@ static int hf_docsis_bintrngreq_up_chid = -1;
static int hf_docsis_bintrngreq_capflags_frag = -1;
static int hf_docsis_bintrngreq_capflags_encrypt = -1;
-
/* Initialize the subtree pointers */
static gint ett_docsis_bintrngreq = -1;
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_bintrngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
@@ -52,55 +51,49 @@ dissect_bintrngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
md_ds_sg_id = tvb_get_ntohs (tvb, 0);
col_add_fstr (pinfo->cinfo, COL_INFO, "Bonded Ranging Request: MD-DS-SG-ID = %u (0x%X)",
- md_ds_sg_id, md_ds_sg_id );
+ md_ds_sg_id, md_ds_sg_id );
if (tree)
{
guint16 offset = 0;
bintrngreq_item = proto_tree_add_protocol_format (tree, proto_docsis_bintrngreq,
- tvb, offset, tvb_length_remaining (tvb, 0),
- "Bonded Initial Ranging Request");
+ tvb, offset, tvb_length_remaining (tvb, 0),
+ "Bonded Initial Ranging Request");
bintrngreq_tree = proto_item_add_subtree (bintrngreq_item, ett_docsis_bintrngreq);
proto_tree_add_item (bintrngreq_tree, hf_docsis_bintrngreq_capflags,
- tvb, offset, 1, ENC_BIG_ENDIAN);
+ tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item( bintrngreq_tree, hf_docsis_bintrngreq_capflags_frag,
- tvb, offset, 1, ENC_BIG_ENDIAN );
+ tvb, offset, 1, ENC_BIG_ENDIAN );
proto_tree_add_item( bintrngreq_tree, hf_docsis_bintrngreq_capflags_encrypt,
- tvb, offset, 1, ENC_BIG_ENDIAN );
+ tvb, offset, 1, ENC_BIG_ENDIAN );
offset++;
proto_tree_add_item (bintrngreq_tree, hf_docsis_bintrngreq_mddsgid,
- tvb, offset, 1, ENC_BIG_ENDIAN);
+ tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
proto_tree_add_item (bintrngreq_tree, hf_docsis_bintrngreq_down_chid,
- tvb, offset, 1, ENC_BIG_ENDIAN);
+ tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
proto_tree_add_item (bintrngreq_tree, hf_docsis_bintrngreq_up_chid,
- tvb, offset, 1, ENC_BIG_ENDIAN);
+ tvb, offset, 1, ENC_BIG_ENDIAN);
}
}
/* Register the protocol with Wireshark */
-
-/*
- * this format is required because a script is used to build the C function
- * that calls all the protocol registration.
- */
void
proto_register_docsis_bintrngreq (void)
{
- /* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_bintrngreq_capflags,
{"Capability Flags", "docsis_bintrngreq.capflags",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL}
},
- { &hf_docsis_bintrngreq_capflags_frag,
+ {&hf_docsis_bintrngreq_capflags_frag,
{"Pre-3.0 Fragmentation", "docsis_bintrngreq.capflags.frag",
FT_BOOLEAN, 8, NULL, (1<<7),
"Pre-3.0 DOCSIS fragmentation is supported prior to registration", HFILL }
},
- { &hf_docsis_bintrngreq_capflags_encrypt,
+ {&hf_docsis_bintrngreq_capflags_encrypt,
{"Early Auth. & Encrypt", "docsis_bintrngreq.capflags.encrypt",
FT_BOOLEAN, 8, NULL, (1<<6),
"Early Authentication and Encryption supported", HFILL }
@@ -122,28 +115,20 @@ proto_register_docsis_bintrngreq (void)
},
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_bintrngreq,
};
-/* Register the protocol name and description */
proto_docsis_bintrngreq = proto_register_protocol ("DOCSIS Bonded Initial Ranging Message",
- "DOCSIS B-INT-RNG-REQ",
- "docsis_bintrngreq");
+ "DOCSIS B-INT-RNG-REQ",
+ "docsis_bintrngreq");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_bintrngreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_bintrngreq", dissect_bintrngreq, proto_docsis_bintrngreq);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_bintrngreq (void)
{
@@ -152,3 +137,16 @@ proto_reg_handoff_docsis_bintrngreq (void)
docsis_bintrngreq_handle = find_dissector ("docsis_bintrngreq");
dissector_add_uint ("docsis_mgmt", 0x22, docsis_bintrngreq_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-bpkmattr.c b/plugins/docsis/packet-bpkmattr.c
index c7428bedee..7fc5e43318 100644
--- a/plugins/docsis/packet-bpkmattr.c
+++ b/plugins/docsis/packet-bpkmattr.c
@@ -94,8 +94,6 @@ static int hf_docsis_bpkmattr_sa_query_type = -1;
static int hf_docsis_bpkmattr_ip_address = -1;
/* static int hf_docsis_bpkmattr_download_param = -1; */
-
-
/* Initialize the subtree pointers */
static gint ett_docsis_bpkmattr = -1;
static gint ett_docsis_bpkmattr_cmid = -1;
@@ -133,8 +131,6 @@ static const value_string bpi_ver_vals[] = {
{0, NULL},
};
-/* Code to actually dissect the packets */
-
/* The dissect_attrs() function does the actual work to dissect the
* attributes. It's called recursively, to dissect embedded attributes
*/
@@ -158,186 +154,186 @@ dissect_attrs (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
pos += 2;
switch (type)
{
- case BPKM_RESERVED:
- break;
- case BPKM_SERIAL_NUM:
- proto_tree_add_item (tree, hf_docsis_bpkmattr_serial_num, tvb, pos,
- length, ENC_ASCII|ENC_NA);
- break;
- case BPKM_MANUFACTURER_ID:
- if (length == 3)
- proto_tree_add_item (tree, hf_docsis_bpkmattr_manf_id, tvb, pos,
+ case BPKM_RESERVED:
+ break;
+ case BPKM_SERIAL_NUM:
+ proto_tree_add_item (tree, hf_docsis_bpkmattr_serial_num, tvb, pos,
+ length, ENC_ASCII|ENC_NA);
+ break;
+ case BPKM_MANUFACTURER_ID:
+ if (length == 3)
+ proto_tree_add_item (tree, hf_docsis_bpkmattr_manf_id, tvb, pos,
+ length, ENC_NA);
+ else
+ THROW (ReportedBoundsError);
+ break;
+ case BPKM_MAC_ADDR:
+ if (length == 6)
+ proto_tree_add_item (tree, hf_docsis_bpkmattr_mac_addr, tvb, pos,
+ length, ENC_NA);
+ else
+ THROW (ReportedBoundsError);
+ break;
+ case BPKM_RSA_PUB_KEY:
+ proto_tree_add_item (tree, hf_docsis_bpkmattr_rsa_pub_key, tvb, pos,
length, ENC_NA);
- else
- THROW (ReportedBoundsError);
- break;
- case BPKM_MAC_ADDR:
- if (length == 6)
- proto_tree_add_item (tree, hf_docsis_bpkmattr_mac_addr, tvb, pos,
+ break;
+ case BPKM_CM_ID:
+ cmid_tree =
+ proto_tree_add_subtree(tree, tvb, pos, length,
+ ett_docsis_bpkmattr_cmid, NULL, "5 CM Identification");
+ cmid_tvb = tvb_new_subset_length (tvb, pos, length);
+ dissect_attrs (cmid_tvb, pinfo, cmid_tree);
+ break;
+ case BPKM_DISPLAY_STR:
+ proto_tree_add_item (tree, hf_docsis_bpkmattr_display_str, tvb, pos,
+ length, ENC_ASCII|ENC_NA);
+ break;
+ case BPKM_AUTH_KEY:
+ if ((length == 96) || (length == 128))
+ proto_tree_add_item (tree, hf_docsis_bpkmattr_auth_key, tvb, pos,
+ length, ENC_NA);
+ else
+ THROW (ReportedBoundsError);
+ break;
+ case BPKM_TEK:
+ if (length == 8 || length == 16)
+ proto_tree_add_item (tree, hf_docsis_bpkmattr_tek, tvb, pos,
+ length, ENC_NA);
+ else
+ THROW (ReportedBoundsError);
+ break;
+ case BPKM_KEY_LIFETIME:
+ if (length == 4)
+ proto_tree_add_item (tree, hf_docsis_bpkmattr_key_life, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ else
+ THROW (ReportedBoundsError);
+ break;
+ case BPKM_KEY_SEQ_NUM:
+ if (length == 1)
+ proto_tree_add_item (tree, hf_docsis_bpkmattr_key_seq, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ else
+ THROW (ReportedBoundsError);
+ break;
+ case BPKM_HMAC_DIGEST:
+ if (length == 20)
+ proto_tree_add_item (tree, hf_docsis_bpkmattr_hmac_digest, tvb,
+ pos, length, ENC_NA);
+ else
+ THROW (ReportedBoundsError);
+ break;
+ case BPKM_SAID:
+ if (length == 2)
+ proto_tree_add_item (tree, hf_docsis_bpkmattr_said, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ else
+ THROW (ReportedBoundsError);
+ break;
+ case BPKM_TEK_PARAM:
+ tekp_tree =
+ proto_tree_add_subtree(tree, tvb, pos, length, ett_docsis_bpkmattr_tekp, NULL, "13 TEK Parameters");
+ tekp_tvb = tvb_new_subset_length (tvb, pos, length);
+ dissect_attrs (tekp_tvb, pinfo, tekp_tree);
+ break;
+ case BPKM_OBSOLETED:
+ break;
+ case BPKM_CBC_IV:
+ if (length == 8 || length == 16)
+ proto_tree_add_item (tree, hf_docsis_bpkmattr_cbc_iv, tvb, pos,
+ length, ENC_NA);
+ else
+ THROW (ReportedBoundsError);
+ break;
+ case BPKM_ERROR_CODE:
+ if (length == 1)
+ proto_tree_add_item (tree, hf_docsis_bpkmattr_error_code, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ else
+ THROW (ReportedBoundsError);
+ break;
+ case BPKM_CA_CERT:
+ proto_tree_add_item (tree, hf_docsis_bpkmattr_ca_cert, tvb, pos,
length, ENC_NA);
- else
- THROW (ReportedBoundsError);
- break;
- case BPKM_RSA_PUB_KEY:
- proto_tree_add_item (tree, hf_docsis_bpkmattr_rsa_pub_key, tvb, pos,
- length, ENC_NA);
- break;
- case BPKM_CM_ID:
- cmid_tree =
- proto_tree_add_subtree(tree, tvb, pos, length,
- ett_docsis_bpkmattr_cmid, NULL, "5 CM Identification");
- cmid_tvb = tvb_new_subset_length (tvb, pos, length);
- dissect_attrs (cmid_tvb, pinfo, cmid_tree);
- break;
- case BPKM_DISPLAY_STR:
- proto_tree_add_item (tree, hf_docsis_bpkmattr_display_str, tvb, pos,
- length, ENC_ASCII|ENC_NA);
- break;
- case BPKM_AUTH_KEY:
- if ((length == 96) || (length == 128))
- proto_tree_add_item (tree, hf_docsis_bpkmattr_auth_key, tvb, pos,
+ break;
+ case BPKM_CM_CERT:
+ proto_tree_add_item (tree, hf_docsis_bpkmattr_cm_cert, tvb, pos,
length, ENC_NA);
- else
- THROW (ReportedBoundsError);
- break;
- case BPKM_TEK:
- if (length == 8 || length == 16)
- proto_tree_add_item (tree, hf_docsis_bpkmattr_tek, tvb, pos,
+ break;
+ case BPKM_SEC_CAPABILITIES:
+ scap_tree =
+ proto_tree_add_subtree(tree, tvb, pos, length,
+ ett_docsis_bpkmattr_scap, NULL, "19 Security Capabilities");
+ scap_tvb = tvb_new_subset_length (tvb, pos, length);
+ dissect_attrs (scap_tvb, pinfo, scap_tree);
+ break;
+ case BPKM_CRYPTO_SUITE:
+ if (length == 2)
+ proto_tree_add_item (tree, hf_docsis_bpkmattr_crypto_suite, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ else
+ THROW (ReportedBoundsError);
+ break;
+ case BPKM_CRYPTO_SUITE_LIST:
+ proto_tree_add_item (tree, hf_docsis_bpkmattr_crypto_suite_list,
+ tvb, pos, length, ENC_NA);
+ break;
+ case BPKM_BPI_VERSION:
+ if (length == 1)
+ proto_tree_add_item (tree, hf_docsis_bpkmattr_bpi_version, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ else
+ THROW (ReportedBoundsError);
+ break;
+ case BPKM_SA_DESCRIPTOR:
+ sadsc_tree =
+ proto_tree_add_subtree(tree, tvb, pos, length, ett_docsis_bpkmattr_sadsc, NULL, "23 SA Descriptor");
+ sadsc_tvb = tvb_new_subset_length (tvb, pos, length);
+ dissect_attrs (sadsc_tvb, pinfo, sadsc_tree);
+ break;
+ case BPKM_SA_TYPE:
+ if (length == 1)
+ proto_tree_add_item (tree, hf_docsis_bpkmattr_sa_type, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ else
+ THROW (ReportedBoundsError);
+ break;
+ case BPKM_SA_QUERY:
+ saqry_tree =
+ proto_tree_add_subtree(tree, tvb, pos, length, ett_docsis_bpkmattr_saqry, NULL, "25 SA Query");
+ saqry_tvb = tvb_new_subset_length (tvb, pos, length);
+ dissect_attrs (saqry_tvb, pinfo, saqry_tree);
+ break;
+ case BPKM_SA_QUERY_TYPE:
+ if (length == 1)
+ proto_tree_add_item (tree, hf_docsis_bpkmattr_sa_query_type, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ else
+ THROW (ReportedBoundsError);
+ break;
+ case BPKM_IP_ADDRESS:
+ if (length == 4)
+ proto_tree_add_item (tree, hf_docsis_bpkmattr_ip_address, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ else
+ THROW (ReportedBoundsError);
+ break;
+ case BPKM_VENDOR_DEFINED:
+ proto_tree_add_item (tree, hf_docsis_bpkmattr_vendor_def, tvb, pos,
length, ENC_NA);
- else
- THROW (ReportedBoundsError);
- break;
- case BPKM_KEY_LIFETIME:
- if (length == 4)
- proto_tree_add_item (tree, hf_docsis_bpkmattr_key_life, tvb, pos,
- length, ENC_BIG_ENDIAN);
- else
- THROW (ReportedBoundsError);
- break;
- case BPKM_KEY_SEQ_NUM:
- if (length == 1)
- proto_tree_add_item (tree, hf_docsis_bpkmattr_key_seq, tvb, pos,
- length, ENC_BIG_ENDIAN);
- else
- THROW (ReportedBoundsError);
- break;
- case BPKM_HMAC_DIGEST:
- if (length == 20)
- proto_tree_add_item (tree, hf_docsis_bpkmattr_hmac_digest, tvb,
- pos, length, ENC_NA);
- else
- THROW (ReportedBoundsError);
- break;
- case BPKM_SAID:
- if (length == 2)
- proto_tree_add_item (tree, hf_docsis_bpkmattr_said, tvb, pos,
- length, ENC_BIG_ENDIAN);
- else
- THROW (ReportedBoundsError);
- break;
- case BPKM_TEK_PARAM:
- tekp_tree =
- proto_tree_add_subtree(tree, tvb, pos, length, ett_docsis_bpkmattr_tekp, NULL, "13 TEK Parameters");
- tekp_tvb = tvb_new_subset_length (tvb, pos, length);
- dissect_attrs (tekp_tvb, pinfo, tekp_tree);
- break;
- case BPKM_OBSOLETED:
- break;
- case BPKM_CBC_IV:
- if (length == 8 || length == 16)
- proto_tree_add_item (tree, hf_docsis_bpkmattr_cbc_iv, tvb, pos,
+ break;
+ case BPKM_DNLD_PARAMS:
+ dnld_tree =
+ proto_tree_add_subtree(tree, tvb, pos, length,
+ ett_docsis_bpkmattr_dnld, NULL, "28 Download Parameters");
+ dnld_tvb = tvb_new_subset_length (tvb, pos, length);
+ dissect_attrs (dnld_tvb, pinfo, dnld_tree);
+ break;
+ default:
+ proto_tree_add_item (tree, hf_docsis_bpkmattr_vendor_def, tvb, pos,
length, ENC_NA);
- else
- THROW (ReportedBoundsError);
- break;
- case BPKM_ERROR_CODE:
- if (length == 1)
- proto_tree_add_item (tree, hf_docsis_bpkmattr_error_code, tvb,
- pos, length, ENC_BIG_ENDIAN);
- else
- THROW (ReportedBoundsError);
- break;
- case BPKM_CA_CERT:
- proto_tree_add_item (tree, hf_docsis_bpkmattr_ca_cert, tvb, pos,
- length, ENC_NA);
- break;
- case BPKM_CM_CERT:
- proto_tree_add_item (tree, hf_docsis_bpkmattr_cm_cert, tvb, pos,
- length, ENC_NA);
- break;
- case BPKM_SEC_CAPABILITIES:
- scap_tree =
- proto_tree_add_subtree(tree, tvb, pos, length,
- ett_docsis_bpkmattr_scap, NULL, "19 Security Capabilities");
- scap_tvb = tvb_new_subset_length (tvb, pos, length);
- dissect_attrs (scap_tvb, pinfo, scap_tree);
- break;
- case BPKM_CRYPTO_SUITE:
- if (length == 2)
- proto_tree_add_item (tree, hf_docsis_bpkmattr_crypto_suite, tvb,
- pos, length, ENC_BIG_ENDIAN);
- else
- THROW (ReportedBoundsError);
- break;
- case BPKM_CRYPTO_SUITE_LIST:
- proto_tree_add_item (tree, hf_docsis_bpkmattr_crypto_suite_list,
- tvb, pos, length, ENC_NA);
- break;
- case BPKM_BPI_VERSION:
- if (length == 1)
- proto_tree_add_item (tree, hf_docsis_bpkmattr_bpi_version, tvb,
- pos, length, ENC_BIG_ENDIAN);
- else
- THROW (ReportedBoundsError);
- break;
- case BPKM_SA_DESCRIPTOR:
- sadsc_tree =
- proto_tree_add_subtree(tree, tvb, pos, length, ett_docsis_bpkmattr_sadsc, NULL, "23 SA Descriptor");
- sadsc_tvb = tvb_new_subset_length (tvb, pos, length);
- dissect_attrs (sadsc_tvb, pinfo, sadsc_tree);
- break;
- case BPKM_SA_TYPE:
- if (length == 1)
- proto_tree_add_item (tree, hf_docsis_bpkmattr_sa_type, tvb, pos,
- length, ENC_BIG_ENDIAN);
- else
- THROW (ReportedBoundsError);
- break;
- case BPKM_SA_QUERY:
- saqry_tree =
- proto_tree_add_subtree(tree, tvb, pos, length, ett_docsis_bpkmattr_saqry, NULL, "25 SA Query");
- saqry_tvb = tvb_new_subset_length (tvb, pos, length);
- dissect_attrs (saqry_tvb, pinfo, saqry_tree);
- break;
- case BPKM_SA_QUERY_TYPE:
- if (length == 1)
- proto_tree_add_item (tree, hf_docsis_bpkmattr_sa_query_type, tvb,
- pos, length, ENC_BIG_ENDIAN);
- else
- THROW (ReportedBoundsError);
- break;
- case BPKM_IP_ADDRESS:
- if (length == 4)
- proto_tree_add_item (tree, hf_docsis_bpkmattr_ip_address, tvb,
- pos, length, ENC_BIG_ENDIAN);
- else
- THROW (ReportedBoundsError);
- break;
- case BPKM_VENDOR_DEFINED:
- proto_tree_add_item (tree, hf_docsis_bpkmattr_vendor_def, tvb, pos,
- length, ENC_NA);
- break;
- case BPKM_DNLD_PARAMS:
- dnld_tree =
- proto_tree_add_subtree(tree, tvb, pos, length,
- ett_docsis_bpkmattr_dnld, NULL, "28 Download Parameters");
- dnld_tvb = tvb_new_subset_length (tvb, pos, length);
- dissect_attrs (dnld_tvb, pinfo, dnld_tree);
- break;
- default:
- proto_tree_add_item (tree, hf_docsis_bpkmattr_vendor_def, tvb, pos,
- length, ENC_NA);
- break;
+ break;
}
pos += length; /* switch */
} /* while */
@@ -358,179 +354,167 @@ dissect_bpkmattr (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
bpkmattr_tree = proto_item_add_subtree (it, ett_docsis_bpkmattr);
dissect_attrs (tvb, pinfo, bpkmattr_tree);
}
-
}
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_bpkmattr (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_bpkmattr_serial_num,
{"1 Serial Number", "docsis_bpkmattr.serialnum",
FT_STRING, BASE_NONE, NULL, 0x0,
"Serial Number", HFILL}
- },
+ },
{&hf_docsis_bpkmattr_manf_id,
{"2 Manufacturer Id", "docsis_bpkmattr.manfid",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Manufacturer Id", HFILL}
- },
+ },
{&hf_docsis_bpkmattr_mac_addr,
{"3 Mac Address", "docsis_bpkmattr.macaddr",
FT_ETHER, BASE_NONE, NULL, 0x0,
"Mac Address", HFILL}
- },
+ },
{&hf_docsis_bpkmattr_rsa_pub_key,
{"4 RSA Public Key", "docsis_bpkmattr.rsa_pub_key",
FT_BYTES, BASE_NONE, NULL, 0x0,
"RSA Public Key", HFILL}
- },
+ },
#if 0
{&hf_docsis_bpkmattr_cm_id,
{"5 CM Identification", "docsis_bpkmattr.cmid",
FT_BYTES, BASE_NONE, NULL, 0x0,
"CM Identification", HFILL}
- },
+ },
#endif
{&hf_docsis_bpkmattr_display_str,
{"6 Display String", "docsis_bpkmattr.dispstr",
FT_STRING, BASE_NONE, NULL, 0x0,
"Display String", HFILL}
- },
+ },
{&hf_docsis_bpkmattr_auth_key,
{"7 Auth Key", "docsis_bpkmattr.auth_key",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Auth Key", HFILL}
- },
+ },
{&hf_docsis_bpkmattr_tek,
{"8 Traffic Encryption Key", "docsis_bpkmattr.tek",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Traffic Encryption Key", HFILL}
- },
+ },
{&hf_docsis_bpkmattr_key_life,
{"9 Key Lifetime (s)", "docsis_bpkmattr.keylife",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Key Lifetime (s)", HFILL}
- },
+ },
{&hf_docsis_bpkmattr_key_seq,
{"10 Key Sequence Number", "docsis_bpkmattr.keyseq",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Key Sequence Number", HFILL}
- },
+ },
{&hf_docsis_bpkmattr_hmac_digest,
{"11 HMAC Digest", "docsis_bpkmattr.hmacdigest",
FT_BYTES, BASE_NONE, NULL, 0x0,
"HMAC Digest", HFILL}
- },
+ },
{&hf_docsis_bpkmattr_said,
{"12 SAID", "docsis_bpkmattr.said",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Security Association ID", HFILL}
- },
+ },
#if 0
{&hf_docsis_bpkmattr_tek_params,
{"13 TEK Parameters", "docsis_bpkmattr.tekparams",
FT_BYTES, BASE_NONE, NULL, 0x0,
"TEK Parameters", HFILL}
- },
+ },
#endif
{&hf_docsis_bpkmattr_cbc_iv,
{"14 CBC IV", "docsis_bpkmattr.cbciv",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Cypher Block Chaining", HFILL}
- },
+ },
{&hf_docsis_bpkmattr_error_code,
{"16 Error Code", "docsis_bpkmattr.errcode",
FT_UINT8, BASE_DEC, VALS (error_code_vals), 0x0,
"Error Code", HFILL}
- },
+ },
{&hf_docsis_bpkmattr_vendor_def,
{"127 Vendor Defined", "docsis_bpkmattr.vendordef",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Vendor Defined", HFILL}
- },
+ },
{&hf_docsis_bpkmattr_ca_cert,
{"17 CA Certificate", "docsis_bpkmattr.cacert",
FT_BYTES, BASE_NONE, NULL, 0x0,
"CA Certificate", HFILL}
- },
+ },
{&hf_docsis_bpkmattr_cm_cert,
{"18 CM Certificate", "docsis_bpkmattr.cmcert",
FT_BYTES, BASE_NONE, NULL, 0x0,
"CM Certificate", HFILL}
- },
+ },
#if 0
{&hf_docsis_bpkmattr_security_cap,
{"19 Security Capabilities", "docsis_bpkmattr.seccap",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Security Capabilities", HFILL}
- },
+ },
#endif
{&hf_docsis_bpkmattr_crypto_suite,
{"20 Cryptographic Suite", "docsis_bpkmattr.cryptosuite",
FT_UINT16, BASE_HEX, VALS(crypto_suite_attr_vals), 0x0,
"Cryptographic Suite", HFILL}
- },
+ },
{&hf_docsis_bpkmattr_crypto_suite_list,
{"21 Cryptographic Suite List", "docsis_bpkmattr.crypto_suite_lst",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Cryptographic Suite", HFILL}
- },
+ },
{&hf_docsis_bpkmattr_bpi_version,
{"22 BPI Version", "docsis_bpkmattr.bpiver",
FT_UINT8, BASE_DEC, VALS (bpi_ver_vals), 0x0,
"BPKM Attributes", HFILL}
- },
+ },
#if 0
{&hf_docsis_bpkmattr_sa_descr,
{"23 SA Descriptor", "docsis_bpkmattr.sadescr",
FT_BYTES, BASE_NONE, NULL, 0x0,
"SA Descriptor", HFILL}
- },
+ },
#endif
{&hf_docsis_bpkmattr_sa_type,
{"24 SA Type", "docsis_bpkmattr.satype",
FT_UINT8, BASE_DEC, NULL, 0x0,
"SA Type", HFILL}
- },
+ },
#if 0
{&hf_docsis_bpkmattr_sa_query,
{"25 SA Query", "docsis_bpkmattr.saquery",
FT_BYTES, BASE_NONE, NULL, 0x0,
"SA Query", HFILL}
- },
+ },
#endif
{&hf_docsis_bpkmattr_sa_query_type,
{"26 SA Query Type", "docsis_bpkmattr.saquery_type",
FT_UINT8, BASE_HEX, NULL, 0x0,
"SA Query Type", HFILL}
- },
+ },
{&hf_docsis_bpkmattr_ip_address,
{"27 IP Address", "docsis_bpkmattr.ipaddr",
FT_IPv4, BASE_NONE, NULL, 0x0,
"IP Address", HFILL}
- },
+ },
#if 0
{&hf_docsis_bpkmattr_download_param,
{"28 Download Parameters", "docsis_bpkmattr.dnld_params",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Download Parameters", HFILL}
- },
+ },
#endif
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_bpkmattr,
&ett_docsis_bpkmattr_cmid,
@@ -541,13 +525,11 @@ proto_register_docsis_bpkmattr (void)
&ett_docsis_bpkmattr_dnld
};
-/* Register the protocol name and description */
proto_docsis_bpkmattr =
proto_register_protocol
("DOCSIS Baseline Privacy Key Management Attributes", "DOCSIS BPKM-ATTR",
"docsis_bpkmattr");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_bpkmattr, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
@@ -556,10 +538,6 @@ proto_register_docsis_bpkmattr (void)
}
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_bpkmattr (void)
{
@@ -571,3 +549,16 @@ proto_reg_handoff_docsis_bpkmattr (void)
#endif
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-bpkmreq.c b/plugins/docsis/packet-bpkmreq.c
index 76e9f9640a..6f9ba561a6 100644
--- a/plugins/docsis/packet-bpkmreq.c
+++ b/plugins/docsis/packet-bpkmreq.c
@@ -35,16 +35,16 @@ static int hf_docsis_bpkmreq_length = -1;
static int hf_docsis_bpkmreq_ident = -1;
static const value_string code_field_vals[] = {
- {0, "Reserved"},
- {1, "Reserved"},
- {2, "Reserved"},
- {3, "Reserved"},
- {4, "Auth Request"},
- {5, "Auth Reply"},
- {6, "Auth Reject"},
- {7, "Key Request"},
- {8, "Key Reply"},
- {9, "Key Reject"},
+ { 0, "Reserved"},
+ { 1, "Reserved"},
+ { 2, "Reserved"},
+ { 3, "Reserved"},
+ { 4, "Auth Request"},
+ { 5, "Auth Reply"},
+ { 6, "Auth Reject"},
+ { 7, "Key Request"},
+ { 8, "Key Reply"},
+ { 9, "Key Reject"},
{10, "Auth Invalid"},
{11, "TEK Invalid"},
{12, "Authent Info"},
@@ -54,17 +54,15 @@ static const value_string code_field_vals[] = {
{0, NULL},
};
-
/* Initialize the subtree pointers */
static gint ett_docsis_bpkmreq = -1;
static dissector_handle_t attrs_handle;
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_bpkmreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
-
proto_item *it;
proto_tree *bpkmreq_tree;
guint8 code;
@@ -73,86 +71,64 @@ dissect_bpkmreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
code = tvb_get_guint8 (tvb, 0);
col_add_fstr (pinfo->cinfo, COL_INFO, "BPKM Request (%s)",
- val_to_str (code, code_field_vals, "%d"));
+ val_to_str (code, code_field_vals, "%d"));
if (tree)
{
it =
- proto_tree_add_protocol_format (tree, proto_docsis_bpkmreq, tvb, 0, -1,
- "BPKM Request Message");
+ proto_tree_add_protocol_format (tree, proto_docsis_bpkmreq, tvb, 0, -1,
+ "BPKM Request Message");
bpkmreq_tree = proto_item_add_subtree (it, ett_docsis_bpkmreq);
proto_tree_add_item (bpkmreq_tree, hf_docsis_bpkmreq_code, tvb, 0, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (bpkmreq_tree, hf_docsis_bpkmreq_ident, tvb, 1, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (bpkmreq_tree, hf_docsis_bpkmreq_length, tvb, 2, 2,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
}
- /* Code to Call subdissector */
attrs_tvb = tvb_new_subset_remaining (tvb, 4);
call_dissector (attrs_handle, attrs_tvb, pinfo, tree);
-
-
-
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_bpkmreq (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_bpkmreq_code,
{"BPKM Code", "docsis_bpkmreq.code",
FT_UINT8, BASE_DEC, VALS (code_field_vals), 0x0,
"BPKM Request Message", HFILL}
- },
+ },
{&hf_docsis_bpkmreq_ident,
{"BPKM Identifier", "docsis_bpkmreq.ident",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_bpkmreq_length,
{"BPKM Length", "docsis_bpkmreq.length",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_bpkmreq,
};
-/* Register the protocol name and description */
proto_docsis_bpkmreq =
proto_register_protocol ("DOCSIS Baseline Privacy Key Management Request",
- "DOCSIS BPKM-REQ", "docsis_bpkmreq");
+ "DOCSIS BPKM-REQ", "docsis_bpkmreq");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_bpkmreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_bpkmreq", dissect_bpkmreq,
- proto_docsis_bpkmreq);
+ proto_docsis_bpkmreq);
}
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_bpkmreq (void)
{
@@ -161,5 +137,17 @@ proto_reg_handoff_docsis_bpkmreq (void)
docsis_bpkmreq_handle = find_dissector ("docsis_bpkmreq");
attrs_handle = find_dissector ("docsis_bpkmattr");
dissector_add_uint ("docsis_mgmt", 0x0C, docsis_bpkmreq_handle);
-
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-bpkmrsp.c b/plugins/docsis/packet-bpkmrsp.c
index b064d6ef37..6cd5f20f2d 100644
--- a/plugins/docsis/packet-bpkmrsp.c
+++ b/plugins/docsis/packet-bpkmrsp.c
@@ -35,16 +35,16 @@ static int hf_docsis_bpkmrsp_length = -1;
static int hf_docsis_bpkmrsp_ident = -1;
static const value_string code_field_vals[] = {
- {0, "Reserved"},
- {1, "Reserved"},
- {2, "Reserved"},
- {3, "Reserved"},
- {4, "Auth Response"},
- {5, "Auth Reply"},
- {6, "Auth Reject"},
- {7, "Key Response"},
- {8, "Key Reply"},
- {9, "Key Reject"},
+ { 0, "Reserved"},
+ { 1, "Reserved"},
+ { 2, "Reserved"},
+ { 3, "Reserved"},
+ { 4, "Auth Response"},
+ { 5, "Auth Reply"},
+ { 6, "Auth Reject"},
+ { 7, "Key Response"},
+ { 8, "Key Reply"},
+ { 9, "Key Reject"},
{10, "Auth Invalid"},
{11, "TEK Invalid"},
{12, "Authent Info"},
@@ -54,40 +54,37 @@ static const value_string code_field_vals[] = {
{0, NULL},
};
-
/* Initialize the subtree pointers */
static gint ett_docsis_bpkmrsp = -1;
static dissector_handle_t attrs_handle;
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_bpkmrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
-
proto_item *it;
proto_tree *bpkmrsp_tree;
guint8 code;
tvbuff_t *attrs_tvb;
-
code = tvb_get_guint8 (tvb, 0);
col_add_fstr (pinfo->cinfo, COL_INFO, "BPKM Response (%s)",
- val_to_str (code, code_field_vals, "Unknown code %u"));
+ val_to_str (code, code_field_vals, "Unknown code %u"));
if (tree)
{
it =
- proto_tree_add_protocol_format (tree, proto_docsis_bpkmrsp, tvb, 0, -1,
- "BPKM Response Message");
+ proto_tree_add_protocol_format (tree, proto_docsis_bpkmrsp, tvb, 0, -1,
+ "BPKM Response Message");
bpkmrsp_tree = proto_item_add_subtree (it, ett_docsis_bpkmrsp);
proto_tree_add_item (bpkmrsp_tree, hf_docsis_bpkmrsp_code, tvb, 0, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (bpkmrsp_tree, hf_docsis_bpkmrsp_ident, tvb, 1, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (bpkmrsp_tree, hf_docsis_bpkmrsp_length, tvb, 2, 2,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
}
/* Code to Call subdissector */
@@ -95,63 +92,44 @@ dissect_bpkmrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
call_dissector (attrs_handle, attrs_tvb, pinfo, tree);
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_bpkmrsp (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_bpkmrsp_code,
{"BPKM Code", "docsis_bpkmrsp.code",
FT_UINT8, BASE_DEC, VALS (code_field_vals), 0x0,
"BPKM Response Message", HFILL}
- },
+ },
{&hf_docsis_bpkmrsp_ident,
{"BPKM Identifier", "docsis_bpkmrsp.ident",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_bpkmrsp_length,
{"BPKM Length", "docsis_bpkmrsp.length",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_bpkmrsp,
};
-/* Register the protocol name and description */
proto_docsis_bpkmrsp =
proto_register_protocol
("DOCSIS Baseline Privacy Key Management Response", "DOCSIS BPKM-RSP",
"docsis_bpkmrsp");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_bpkmrsp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_bpkmrsp", dissect_bpkmrsp,
- proto_docsis_bpkmrsp);
+ proto_docsis_bpkmrsp);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_bpkmrsp (void)
{
@@ -160,5 +138,17 @@ proto_reg_handoff_docsis_bpkmrsp (void)
docsis_bpkmrsp_handle = find_dissector ("docsis_bpkmrsp");
attrs_handle = find_dissector ("docsis_bpkmattr");
dissector_add_uint ("docsis_mgmt", 0x0D, docsis_bpkmrsp_handle);
-
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-cmctrlreq.c b/plugins/docsis/packet-cmctrlreq.c
index f5b5549471..b909da1c36 100644
--- a/plugins/docsis/packet-cmctrlreq.c
+++ b/plugins/docsis/packet-cmctrlreq.c
@@ -28,7 +28,6 @@
void proto_register_docsis_cmctrlreq(void);
void proto_reg_handoff_docsis_cmctrlreq(void);
-
/* Initialize the protocol and registered fields */
static int proto_docsis_cmctrlreq = -1;
static int hf_docsis_cmctrlreq_tranid = -1;
@@ -37,7 +36,7 @@ static dissector_handle_t cmctrl_tlv_handle;
/* Initialize the subtree pointers */
static gint ett_docsis_cmctrlreq = -1;
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_cmctrlreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
@@ -49,67 +48,49 @@ dissect_cmctrlreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
transid = tvb_get_ntohs (tvb, 0);
col_add_fstr (pinfo->cinfo, COL_INFO,
- "CM Control Request: Transaction-Id = %u", transid);
+ "CM Control Request: Transaction-Id = %u", transid);
if (tree)
{
it =
- proto_tree_add_protocol_format (tree, proto_docsis_cmctrlreq, tvb, 0, -1,
- "CM Control Request");
+ proto_tree_add_protocol_format (tree, proto_docsis_cmctrlreq, tvb, 0, -1,
+ "CM Control Request");
cmctrlreq_tree = proto_item_add_subtree (it, ett_docsis_cmctrlreq);
proto_tree_add_item (cmctrlreq_tree, hf_docsis_cmctrlreq_tranid, tvb, 0, 2,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
}
- /* Call Dissector for Appendix C TLV's */
- next_tvb = tvb_new_subset_remaining (tvb, 2);
- call_dissector (cmctrl_tlv_handle, next_tvb, pinfo, cmctrlreq_tree);
+ /* Call Dissector for Appendix C TLV's */
+ next_tvb = tvb_new_subset_remaining (tvb, 2);
+ call_dissector (cmctrl_tlv_handle, next_tvb, pinfo, cmctrlreq_tree);
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
void
proto_register_docsis_cmctrlreq (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_cmctrlreq_tranid,
{"Transaction Id", "docsis_cmctrlreq.tranid",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_cmctrlreq,
};
-/* Register the protocol name and description */
proto_docsis_cmctrlreq =
proto_register_protocol ("DOCSIS CM Control Request",
- "DOCSIS CM-CTRL-REQ", "docsis_cmctrlreq");
+ "DOCSIS CM-CTRL-REQ", "docsis_cmctrlreq");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_cmctrlreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_cmctrlreq", dissect_cmctrlreq, proto_docsis_cmctrlreq);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_cmctrlreq (void)
{
@@ -119,3 +100,16 @@ proto_reg_handoff_docsis_cmctrlreq (void)
cmctrl_tlv_handle = find_dissector ("cmctrl_tlv");
dissector_add_uint ("docsis_mgmt", 0x2A, docsis_cmctrlreq_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-cmctrlrsp.c b/plugins/docsis/packet-cmctrlrsp.c
index b3667b0966..bd415e35e0 100644
--- a/plugins/docsis/packet-cmctrlrsp.c
+++ b/plugins/docsis/packet-cmctrlrsp.c
@@ -44,7 +44,7 @@ static dissector_handle_t cmctrl_tlv_handle;
/* Initialize the subtree pointers */
static gint ett_docsis_cmctrlrsp = -1;
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_cmctrlrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
@@ -56,16 +56,16 @@ dissect_cmctrlrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
transid = tvb_get_ntohs (tvb, 0);
col_add_fstr (pinfo->cinfo, COL_INFO,
- "CM Control Response: Transaction-Id = %u", transid);
+ "CM Control Response: Transaction-Id = %u", transid);
if (tree)
{
it =
- proto_tree_add_protocol_format (tree, proto_docsis_cmctrlrsp, tvb, 0, -1,
- "CM Control Response");
+ proto_tree_add_protocol_format (tree, proto_docsis_cmctrlrsp, tvb, 0, -1,
+ "CM Control Response");
cmctrlrsp_tree = proto_item_add_subtree (it, ett_docsis_cmctrlrsp);
proto_tree_add_item (cmctrlrsp_tree, hf_docsis_cmctrlrsp_tranid, tvb, 0, 2,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
}
/* Call Dissector for Appendix C TLV's */
@@ -73,50 +73,32 @@ dissect_cmctrlrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
call_dissector (cmctrl_tlv_handle, next_tvb, pinfo, cmctrlrsp_tree);
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
void
proto_register_docsis_cmctrlrsp (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_cmctrlrsp_tranid,
{"Transaction Id", "docsis_cmctrlrsp.tranid",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_cmctrlrsp,
};
-/* Register the protocol name and description */
proto_docsis_cmctrlrsp =
proto_register_protocol ("DOCSIS CM Control Response",
- "DOCSIS CM-CTRL-RSP", "docsis_cmctrlrsp");
+ "DOCSIS CM-CTRL-RSP", "docsis_cmctrlrsp");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_cmctrlrsp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_cmctrlrsp", dissect_cmctrlrsp, proto_docsis_cmctrlrsp);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_cmctrlrsp (void)
{
@@ -126,3 +108,16 @@ proto_reg_handoff_docsis_cmctrlrsp (void)
cmctrl_tlv_handle = find_dissector ("cmctrl_tlv");
dissector_add_uint ("docsis_mgmt", 0x2B, docsis_cmctrlrsp_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-cmstatus.c b/plugins/docsis/packet-cmstatus.c
index 34bbe66cce..58ec608676 100644
--- a/plugins/docsis/packet-cmstatus.c
+++ b/plugins/docsis/packet-cmstatus.c
@@ -63,11 +63,11 @@ static int hf_docsis_cmstatus_us_ch_id = -1;
static int hf_docsis_cmstatus_dsid = -1;
static int hf_docsis_cmstatus_descr = -1;
-
/* Initialize the subtree pointers */
static gint ett_docsis_cmstatus = -1;
static gint ett_docsis_cmstatus_tlv = -1;
+/* Dissection */
/* See Table 6-52 in CM-SP-MULPIv3.0-I14-101008 */
static void
dissect_cmstatus_tlv (tvbuff_t * tvb, proto_tree * tree, guint8 start, guint16 len)
@@ -81,57 +81,57 @@ dissect_cmstatus_tlv (tvbuff_t * tvb, proto_tree * tree, guint8 start, guint16 l
tlv_tree = proto_item_add_subtree (it, ett_docsis_cmstatus_tlv);
while (pos < (len + start + 1))
- {
- length = tvb_get_guint8 (tvb, pos++);
- type = tvb_get_guint8 (tvb, pos++);
- switch (type)
{
- case EVENT_DS_CH_ID:
- if (length == 3)
- {
- proto_tree_add_item (tlv_tree, hf_docsis_cmstatus_ds_ch_id, tvb, pos + 1, 1, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
-
- case EVENT_US_CH_ID:
- if (length == 3)
- {
- proto_tree_add_item (tlv_tree, hf_docsis_cmstatus_us_ch_id, tvb, pos + 1, 1, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
-
- case EVENT_DSID:
- if (length == 5)
- {
- proto_tree_add_item (tlv_tree, hf_docsis_cmstatus_dsid, tvb, pos + 1, 3, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
-
- case EVENT_DESCR:
- if (length >= 3 && length <= 82)
- {
- proto_tree_add_item (tlv_tree, hf_docsis_cmstatus_descr, tvb, pos + 1, length - 2, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- } /* switch */
- pos = pos + length;
- } /* while */
+ length = tvb_get_guint8 (tvb, pos++);
+ type = tvb_get_guint8 (tvb, pos++);
+ switch (type)
+ {
+ case EVENT_DS_CH_ID:
+ if (length == 3)
+ {
+ proto_tree_add_item (tlv_tree, hf_docsis_cmstatus_ds_ch_id, tvb, pos + 1, 1, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+
+ case EVENT_US_CH_ID:
+ if (length == 3)
+ {
+ proto_tree_add_item (tlv_tree, hf_docsis_cmstatus_us_ch_id, tvb, pos + 1, 1, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+
+ case EVENT_DSID:
+ if (length == 5)
+ {
+ proto_tree_add_item (tlv_tree, hf_docsis_cmstatus_dsid, tvb, pos + 1, 3, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+
+ case EVENT_DESCR:
+ if (length >= 3 && length <= 82)
+ {
+ proto_tree_add_item (tlv_tree, hf_docsis_cmstatus_descr, tvb, pos + 1, length - 2, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ } /* switch */
+ pos = pos + length;
+ } /* while */
}
static void
@@ -148,139 +148,125 @@ dissect_cmstatus (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
col_add_fstr (pinfo->cinfo, COL_INFO, "CM-STATUS Report: Transaction ID = %u", transid);
if (tree)
- {
- it = proto_tree_add_protocol_format (tree, proto_docsis_cmstatus, tvb, 0, -1, "CM-STATUS Report");
- cmstatus_tree = proto_item_add_subtree (it, ett_docsis_cmstatus);
- proto_tree_add_item (cmstatus_tree, hf_docsis_cmstatus_tranid, tvb, 0, 2, ENC_BIG_ENDIAN);
-
- switch (event_type)
{
- case SEC_CH_MDD_TIMEOUT:
- proto_tree_add_item (cmstatus_tree, hf_docsis_cmstatus_e_t_mdd_t, tvb, 2, 1, ENC_BIG_ENDIAN);
- break;
+ it = proto_tree_add_protocol_format (tree, proto_docsis_cmstatus, tvb, 0, -1, "CM-STATUS Report");
+ cmstatus_tree = proto_item_add_subtree (it, ett_docsis_cmstatus);
+ proto_tree_add_item (cmstatus_tree, hf_docsis_cmstatus_tranid, tvb, 0, 2, ENC_BIG_ENDIAN);
+
+ switch (event_type)
+ {
+ case SEC_CH_MDD_TIMEOUT:
+ proto_tree_add_item (cmstatus_tree, hf_docsis_cmstatus_e_t_mdd_t, tvb, 2, 1, ENC_BIG_ENDIAN);
+ break;
- case QAM_FEC_LOCK_FAILURE:
- proto_tree_add_item (cmstatus_tree, hf_docsis_cmstatus_e_t_qfl_f, tvb, 2, 1, ENC_BIG_ENDIAN);
- break;
+ case QAM_FEC_LOCK_FAILURE:
+ proto_tree_add_item (cmstatus_tree, hf_docsis_cmstatus_e_t_qfl_f, tvb, 2, 1, ENC_BIG_ENDIAN);
+ break;
- case SEQ_OUT_OF_RANGE:
- proto_tree_add_item (cmstatus_tree, hf_docsis_cmstatus_e_t_s_o, tvb, 2, 1, ENC_BIG_ENDIAN);
- break;
+ case SEQ_OUT_OF_RANGE:
+ proto_tree_add_item (cmstatus_tree, hf_docsis_cmstatus_e_t_s_o, tvb, 2, 1, ENC_BIG_ENDIAN);
+ break;
- case SEC_CH_MDD_RECOVERY:
- proto_tree_add_item (cmstatus_tree, hf_docsis_cmstatus_e_t_mdd_r, tvb, 2, 1, ENC_BIG_ENDIAN);
- break;
+ case SEC_CH_MDD_RECOVERY:
+ proto_tree_add_item (cmstatus_tree, hf_docsis_cmstatus_e_t_mdd_r, tvb, 2, 1, ENC_BIG_ENDIAN);
+ break;
- case QAM_FEC_LOCK_RECOVERY:
- proto_tree_add_item (cmstatus_tree, hf_docsis_cmstatus_e_t_qfl_r, tvb, 2, 1, ENC_BIG_ENDIAN);
- break;
+ case QAM_FEC_LOCK_RECOVERY:
+ proto_tree_add_item (cmstatus_tree, hf_docsis_cmstatus_e_t_qfl_r, tvb, 2, 1, ENC_BIG_ENDIAN);
+ break;
- case T4_TIMEOUT:
- proto_tree_add_item (cmstatus_tree, hf_docsis_cmstatus_e_t_t4_t, tvb, 2, 1, ENC_BIG_ENDIAN);
- break;
+ case T4_TIMEOUT:
+ proto_tree_add_item (cmstatus_tree, hf_docsis_cmstatus_e_t_t4_t, tvb, 2, 1, ENC_BIG_ENDIAN);
+ break;
- case T3_RETRIES_EXCEEDED:
- proto_tree_add_item (cmstatus_tree, hf_docsis_cmstatus_e_t_t3_e, tvb, 2, 1, ENC_BIG_ENDIAN);
- break;
+ case T3_RETRIES_EXCEEDED:
+ proto_tree_add_item (cmstatus_tree, hf_docsis_cmstatus_e_t_t3_e, tvb, 2, 1, ENC_BIG_ENDIAN);
+ break;
- case SUCCESS_RANGING_AFTER_T3_RETRIES_EXCEEDED:
- proto_tree_add_item (cmstatus_tree, hf_docsis_cmstatus_e_t_rng_s, tvb, 2, 1, ENC_BIG_ENDIAN);
- break;
+ case SUCCESS_RANGING_AFTER_T3_RETRIES_EXCEEDED:
+ proto_tree_add_item (cmstatus_tree, hf_docsis_cmstatus_e_t_rng_s, tvb, 2, 1, ENC_BIG_ENDIAN);
+ break;
- case CM_ON_BATTERY:
- proto_tree_add_item (cmstatus_tree, hf_docsis_cmstatus_e_t_cm_b, tvb, 2, 1, ENC_BIG_ENDIAN);
- break;
+ case CM_ON_BATTERY:
+ proto_tree_add_item (cmstatus_tree, hf_docsis_cmstatus_e_t_cm_b, tvb, 2, 1, ENC_BIG_ENDIAN);
+ break;
- case CM_ON_AC_POWER:
- proto_tree_add_item (cmstatus_tree, hf_docsis_cmstatus_e_t_cm_a, tvb, 2, 1, ENC_BIG_ENDIAN);
- break;
- } /* switch */
+ case CM_ON_AC_POWER:
+ proto_tree_add_item (cmstatus_tree, hf_docsis_cmstatus_e_t_cm_a, tvb, 2, 1, ENC_BIG_ENDIAN);
+ break;
+ } /* switch */
- }
- /* Call Dissector TLV's */
+ }
+ /* Call Dissector TLV's */
dissect_cmstatus_tlv(tvb, cmstatus_tree, 3, len);
}
-
-
/* Register the protocol with Wireshark */
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration. */
-
void
proto_register_docsis_cmstatus (void)
{
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_cmstatus_tranid,
- {"Transaction ID", "docsis_cmstatus.tranid",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL}
+ {"Transaction ID", "docsis_cmstatus.tranid",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL}
},
/* See Table 10-3 in CM-SP-MULPIv3.0-I14-101008 */
{&hf_docsis_cmstatus_e_t_mdd_t,
- {"Secondary Channel MDD timeout", "docsis_cmstatus.mdd_timeout", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ {"Secondary Channel MDD timeout", "docsis_cmstatus.mdd_timeout", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
},
{&hf_docsis_cmstatus_e_t_qfl_f,
- {"QAM/FEC lock failure", "docsis_cmstatus.qam_fec_lock_failure", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ {"QAM/FEC lock failure", "docsis_cmstatus.qam_fec_lock_failure", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
},
{&hf_docsis_cmstatus_e_t_s_o,
- {"Sequence out-of-range", "docsis_cmstatus.sequence_out_of_range", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ {"Sequence out-of-range", "docsis_cmstatus.sequence_out_of_range", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
},
{&hf_docsis_cmstatus_e_t_mdd_r,
- {"Secondary Channel MDD Recovery", "docsis_cmstatus.mdd_recovery", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ {"Secondary Channel MDD Recovery", "docsis_cmstatus.mdd_recovery", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
},
{&hf_docsis_cmstatus_e_t_qfl_r,
- {"QAM/FEC Lock Recovery", "docsis_cmstatus.qam_fec_lock_recovery", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ {"QAM/FEC Lock Recovery", "docsis_cmstatus.qam_fec_lock_recovery", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
},
{&hf_docsis_cmstatus_e_t_t4_t,
- {"T4 timeout", "docsis_cmstatus.t4_timeout", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ {"T4 timeout", "docsis_cmstatus.t4_timeout", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
},
{&hf_docsis_cmstatus_e_t_t3_e,
- {"T3 retries exceeded", "docsis_cmstatus.t3_retries_exceeded", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ {"T3 retries exceeded", "docsis_cmstatus.t3_retries_exceeded", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
},
{&hf_docsis_cmstatus_e_t_rng_s,
- {"Successful ranging after T3 retries exceeded", "docsis_cmstatus.successful_ranging_after_t3_retries_exceeded", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ {"Successful ranging after T3 retries exceeded", "docsis_cmstatus.successful_ranging_after_t3_retries_exceeded", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
},
{&hf_docsis_cmstatus_e_t_cm_b,
- {"CM operating on battery backup", "docsis_cmstatus.cm_on_battery", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ {"CM operating on battery backup", "docsis_cmstatus.cm_on_battery", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
},
{&hf_docsis_cmstatus_e_t_cm_a,
- {"CM returned to A/C power", "docsis_cmstatus.cm_on_ac_power", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
+ {"CM returned to A/C power", "docsis_cmstatus.cm_on_ac_power", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
},
{&hf_docsis_cmstatus_descr,
- {"1.2 Description", "docsis_cmstatus.description",FT_BYTES, BASE_NONE, NULL, 0x0,"Description", HFILL}
+ {"1.2 Description", "docsis_cmstatus.description",FT_BYTES, BASE_NONE, NULL, 0x0,"Description", HFILL}
},
{&hf_docsis_cmstatus_ds_ch_id,
- {"1.4 Downstream Channel ID", "docsis_cmstatus.ds_chid",FT_UINT8, BASE_DEC, NULL, 0x0, "Downstream Channel ID", HFILL}
+ {"1.4 Downstream Channel ID", "docsis_cmstatus.ds_chid",FT_UINT8, BASE_DEC, NULL, 0x0, "Downstream Channel ID", HFILL}
},
{&hf_docsis_cmstatus_us_ch_id,
- {"1.5 Upstream Channel ID", "docsis_cmstatus.us_chid",FT_UINT8, BASE_DEC, NULL, 0x0, "Upstream Channel ID", HFILL}
+ {"1.5 Upstream Channel ID", "docsis_cmstatus.us_chid",FT_UINT8, BASE_DEC, NULL, 0x0, "Upstream Channel ID", HFILL}
},
{&hf_docsis_cmstatus_dsid,
- {"1.6 DSID", "docsis_cmstatus.dsid", FT_UINT24, BASE_DEC, NULL, 0x0, "DSID", HFILL}
+ {"1.6 DSID", "docsis_cmstatus.dsid", FT_UINT24, BASE_DEC, NULL, 0x0, "DSID", HFILL}
}
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_cmstatus,
&ett_docsis_cmstatus_tlv
};
-/* Register the protocol name and description */
proto_docsis_cmstatus = proto_register_protocol ("DOCSIS CM-STATUS Report", "DOCSIS CM-STATUS", "docsis_cmstatus");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_cmstatus, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_cmstatus", dissect_cmstatus, proto_docsis_cmstatus);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_cmstatus (void)
{
@@ -288,3 +274,16 @@ proto_reg_handoff_docsis_cmstatus (void)
docsis_cmstatus_handle = find_dissector ("docsis_cmstatus");
dissector_add_uint ("docsis_mgmt", 0x29, docsis_cmstatus_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-dbcack.c b/plugins/docsis/packet-dbcack.c
index fa544428c8..28b4a5fd36 100644
--- a/plugins/docsis/packet-dbcack.c
+++ b/plugins/docsis/packet-dbcack.c
@@ -36,7 +36,7 @@ static dissector_handle_t docsis_tlv_handle;
/* Initialize the subtree pointers */
static gint ett_docsis_dbcack = -1;
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_dbcack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
@@ -48,62 +48,48 @@ dissect_dbcack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
transid = tvb_get_ntohs (tvb, 0);
col_add_fstr (pinfo->cinfo, COL_INFO,
- "Dynamic Bonding Change Acknowledge: Tran-Id = %u", transid);
+ "Dynamic Bonding Change Acknowledge: Tran-Id = %u", transid);
if (tree)
- {
- dbcack_item = proto_tree_add_protocol_format (tree, proto_docsis_dbcack,
- tvb, 0, -1,
- "Dynamic Bonding Change Acknowledge");
- dbcack_tree = proto_item_add_subtree (dbcack_item, ett_docsis_dbcack);
- proto_tree_add_item (dbcack_tree, hf_docsis_dbcack_tranid,
- tvb, 0, 2, ENC_BIG_ENDIAN);
- }
+ {
+ dbcack_item = proto_tree_add_protocol_format (tree, proto_docsis_dbcack,
+ tvb, 0, -1,
+ "Dynamic Bonding Change Acknowledge");
+ dbcack_tree = proto_item_add_subtree (dbcack_item, ett_docsis_dbcack);
+ proto_tree_add_item (dbcack_tree, hf_docsis_dbcack_tranid,
+ tvb, 0, 2, ENC_BIG_ENDIAN);
+ }
/* Call Dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 2);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, dbcack_tree);
}
/* Register the protocol with Wireshark */
-
-/*
- * this format is required because a script is used to build the C function
- * that calls all the protocol registration.
- */
void
proto_register_docsis_dbcack (void)
{
- /* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_dbcack_tranid,
{"Transaction Id", "docsis_dbcack.tranid",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_dbcack,
};
-/* Register the protocol name and description */
proto_docsis_dbcack = proto_register_protocol ("DOCSIS Dynamic Bonding Change Acknowledge",
- "DOCSIS DBC-ACK",
- "docsis_dbcack");
+ "DOCSIS DBC-ACK",
+ "docsis_dbcack");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_dbcack, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_dbcack", dissect_dbcack, proto_docsis_dbcack);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_dbcack (void)
{
@@ -113,3 +99,16 @@ proto_reg_handoff_docsis_dbcack (void)
docsis_tlv_handle = find_dissector ("docsis_tlv");
dissector_add_uint ("docsis_mgmt", 0x26, docsis_dbcack_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-dbcreq.c b/plugins/docsis/packet-dbcreq.c
index 3ff7510f51..5993231554 100644
--- a/plugins/docsis/packet-dbcreq.c
+++ b/plugins/docsis/packet-dbcreq.c
@@ -38,7 +38,7 @@ static dissector_handle_t docsis_tlv_handle;
/* Initialize the subtree pointers */
static gint ett_docsis_dbcreq = -1;
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_dbcreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
@@ -50,42 +50,36 @@ dissect_dbcreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
transid = tvb_get_ntohs (tvb, 0);
col_add_fstr (pinfo->cinfo, COL_INFO,
- "Dynamic Bonding Change Request: Tran-Id = %u", transid);
+ "Dynamic Bonding Change Request: Tran-Id = %u", transid);
if (tree)
- {
- dbcreq_item = proto_tree_add_protocol_format (tree, proto_docsis_dbcreq,
- tvb, 0, -1,
- "Dynamic Bonding Change Request");
- dbcreq_tree = proto_item_add_subtree (dbcreq_item, ett_docsis_dbcreq);
- proto_tree_add_item (dbcreq_tree, hf_docsis_dbcreq_tranid,
- tvb, 0, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item( dbcreq_tree, hf_docsis_dbcreq_number_of_fragments,
- tvb, 2, 1, ENC_BIG_ENDIAN );
- proto_tree_add_item( dbcreq_tree, hf_docsis_dbcreq_fragment_sequence_number ,
- tvb, 3, 1, ENC_BIG_ENDIAN );
- }
+ {
+ dbcreq_item = proto_tree_add_protocol_format (tree, proto_docsis_dbcreq,
+ tvb, 0, -1,
+ "Dynamic Bonding Change Request");
+ dbcreq_tree = proto_item_add_subtree (dbcreq_item, ett_docsis_dbcreq);
+ proto_tree_add_item (dbcreq_tree, hf_docsis_dbcreq_tranid,
+ tvb, 0, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item( dbcreq_tree, hf_docsis_dbcreq_number_of_fragments,
+ tvb, 2, 1, ENC_BIG_ENDIAN );
+ proto_tree_add_item( dbcreq_tree, hf_docsis_dbcreq_fragment_sequence_number ,
+ tvb, 3, 1, ENC_BIG_ENDIAN );
+ }
/* Call Dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 4);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, dbcreq_tree);
}
/* Register the protocol with Wireshark */
-
-/*
- * this format is required because a script is used to build the C function
- * that calls all the protocol registration.
- */
void
proto_register_docsis_dbcreq (void)
{
- /* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_dbcreq_tranid,
{"Transaction Id", "docsis_dbcreq.tranid",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_dbcreq_number_of_fragments,
{"Number of Fragments", "docsis_dbcreq.number_of_fragments",
FT_UINT8, BASE_HEX_DEC, NULL, 0x0,
@@ -98,28 +92,20 @@ proto_register_docsis_dbcreq (void)
},
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_dbcreq,
};
-/* Register the protocol name and description */
proto_docsis_dbcreq = proto_register_protocol ("DOCSIS Dynamic Bonding Change Request",
- "DOCSIS DBC-REQ",
- "docsis_dbcreq");
+ "DOCSIS DBC-REQ",
+ "docsis_dbcreq");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_dbcreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_dbcreq", dissect_dbcreq, proto_docsis_dbcreq);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_dbcreq (void)
{
@@ -129,3 +115,16 @@ proto_reg_handoff_docsis_dbcreq (void)
docsis_tlv_handle = find_dissector ("docsis_tlv");
dissector_add_uint ("docsis_mgmt", 0x24, docsis_dbcreq_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-dbcrsp.c b/plugins/docsis/packet-dbcrsp.c
index 9b9e6d5088..e4f9268590 100644
--- a/plugins/docsis/packet-dbcrsp.c
+++ b/plugins/docsis/packet-dbcrsp.c
@@ -39,7 +39,7 @@ static dissector_handle_t docsis_tlv_handle;
/* Initialize the subtree pointers */
static gint ett_docsis_dbcrsp = -1;
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_dbcrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
@@ -53,41 +53,35 @@ dissect_dbcrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
confcode = tvb_get_guint8 (tvb, 2);
col_add_fstr (pinfo->cinfo, COL_INFO,
- "Dynamic Bonding Change Response: Tran-Id = %u (%s)", transid,
- val_to_str (confcode, docsis_conf_code, "%d"));
+ "Dynamic Bonding Change Response: Tran-Id = %u (%s)", transid,
+ val_to_str (confcode, docsis_conf_code, "%d"));
if (tree)
- {
- dbcrsp_item = proto_tree_add_protocol_format (tree, proto_docsis_dbcrsp,
- tvb, 0, -1,
- "Dynamic Bonding Change Response");
- dbcrsp_tree = proto_item_add_subtree (dbcrsp_item, ett_docsis_dbcrsp);
- proto_tree_add_item (dbcrsp_tree, hf_docsis_dbcrsp_tranid,
- tvb, 0, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item( dbcrsp_tree, hf_docsis_dbcrsp_conf_code,
- tvb, 2, 1, ENC_BIG_ENDIAN );
- }
+ {
+ dbcrsp_item = proto_tree_add_protocol_format (tree, proto_docsis_dbcrsp,
+ tvb, 0, -1,
+ "Dynamic Bonding Change Response");
+ dbcrsp_tree = proto_item_add_subtree (dbcrsp_item, ett_docsis_dbcrsp);
+ proto_tree_add_item (dbcrsp_tree, hf_docsis_dbcrsp_tranid,
+ tvb, 0, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item( dbcrsp_tree, hf_docsis_dbcrsp_conf_code,
+ tvb, 2, 1, ENC_BIG_ENDIAN );
+ }
/* Call Dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 3);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, dbcrsp_tree);
}
/* Register the protocol with Wireshark */
-
-/*
- * this format is required because a script is used to build the C function
- * that calls all the protocol registration.
- */
void
proto_register_docsis_dbcrsp (void)
{
- /* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_dbcrsp_tranid,
{"Transaction Id", "docsis_dbcrsp.tranid",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_dbcrsp_conf_code,
{"Confirmation Code", "docsis_dbcrsp.conf_code",
FT_UINT8, BASE_DEC, VALS (docsis_conf_code), 0x0,
@@ -95,17 +89,14 @@ proto_register_docsis_dbcrsp (void)
},
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_dbcrsp,
};
-/* Register the protocol name and description */
proto_docsis_dbcrsp = proto_register_protocol ("DOCSIS Dynamic Bonding Change Response",
- "DOCSIS DBC-RSP",
- "docsis_dbcrsp");
+ "DOCSIS DBC-RSP",
+ "docsis_dbcrsp");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_dbcrsp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
@@ -113,10 +104,6 @@ proto_register_docsis_dbcrsp (void)
}
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_dbcrsp (void)
{
@@ -126,3 +113,16 @@ proto_reg_handoff_docsis_dbcrsp (void)
docsis_tlv_handle = find_dissector ("docsis_tlv");
dissector_add_uint ("docsis_mgmt", 0x25, docsis_dbcrsp_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-dccack.c b/plugins/docsis/packet-dccack.c
index e6d7eb7f9f..31204ab637 100644
--- a/plugins/docsis/packet-dccack.c
+++ b/plugins/docsis/packet-dccack.c
@@ -42,8 +42,7 @@ static int hf_docsis_dccack_hmac_digest = -1;
/* Initialize the subtree pointers */
static gint ett_docsis_dccack = -1;
-
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_dccack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
@@ -60,110 +59,95 @@ dissect_dccack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
if (tree)
{
dcc_item =
- proto_tree_add_protocol_format (tree, proto_docsis_dccack, tvb, 0,
- -1, "DCC-ACK Message");
+ proto_tree_add_protocol_format (tree, proto_docsis_dccack, tvb, 0,
+ -1, "DCC-ACK Message");
dcc_tree = proto_item_add_subtree (dcc_item, ett_docsis_dccack);
proto_tree_add_item (dcc_tree, hf_docsis_dccack_tran_id, tvb, 0, 2, ENC_BIG_ENDIAN);
pos = 2;
while (pos < len)
- {
- type = tvb_get_guint8 (tvb, pos++);
- length = tvb_get_guint8 (tvb, pos++);
- switch (type)
- {
- case DCCACK_KEY_SEQ_NUM:
- if (length == 1)
- {
- proto_tree_add_item (dcc_tree, hf_docsis_dccack_key_seq_num, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCCACK_HMAC_DIGEST:
- if (length == 20)
- {
- proto_tree_add_item (dcc_tree, hf_docsis_dccack_hmac_digest, tvb,
- pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- } /* switch(type) */
- pos = pos + length;
- } /* while (pos < len) */
- } /* if (tree) */
-
+ {
+ type = tvb_get_guint8 (tvb, pos++);
+ length = tvb_get_guint8 (tvb, pos++);
+ switch (type)
+ {
+ case DCCACK_KEY_SEQ_NUM:
+ if (length == 1)
+ {
+ proto_tree_add_item (dcc_tree, hf_docsis_dccack_key_seq_num, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCCACK_HMAC_DIGEST:
+ if (length == 20)
+ {
+ proto_tree_add_item (dcc_tree, hf_docsis_dccack_hmac_digest, tvb,
+ pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ } /* switch(type) */
+ pos = pos + length;
+ } /* while (pos < len) */
+ } /* if (tree) */
}
-/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
+/* Register the protocol with Wireshark */
void
proto_register_docsis_dccack (void)
{
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_dccack_tran_id ,
- {
- "Transaction ID",
- "docsis_dccack.tran_id",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Transaction ID",
+ "docsis_dccack.tran_id",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccack_key_seq_num ,
- {
- "Auth Key Sequence Number",
- "docsis_dccack.key_seq_num",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Auth Key Sequence Number",
+ "docsis_dccack.key_seq_num",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccack_hmac_digest ,
- {
- "HMAC-DigestNumber",
- "docsis_dccack.hmac_digest",
- FT_BYTES, BASE_NONE, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "HMAC-DigestNumber",
+ "docsis_dccack.hmac_digest",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_dccack,
};
-/* Register the protocol name and description */
proto_docsis_dccack =
proto_register_protocol ("DOCSIS Downstream Channel Change Acknowledge",
- "DOCSIS DCC-ACK", "docsis_dccack");
+ "DOCSIS DCC-ACK", "docsis_dccack");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_dccack, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_dccack", dissect_dccack, proto_docsis_dccack);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_dccack (void)
{
@@ -173,3 +157,16 @@ proto_reg_handoff_docsis_dccack (void)
dissector_add_uint ("docsis_mgmt", 0x19, docsis_dccack_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-dccreq.c b/plugins/docsis/packet-dccreq.c
index dc842e0488..077557c8e4 100644
--- a/plugins/docsis/packet-dccreq.c
+++ b/plugins/docsis/packet-dccreq.c
@@ -87,28 +87,28 @@ static gint ett_docsis_dccreq = -1;
static gint ett_docsis_dccreq_ds_params = -1;
static gint ett_docsis_dccreq_sf_sub = -1;
-
value_string ds_mod_type_vals[] = {
- {0 , "64 QAM"},
- {1 , "256 QAM"},
- {0, NULL}
+ {0 , "64 QAM"},
+ {1 , "256 QAM"},
+ {0, NULL}
};
value_string ds_sym_rate_vals[] = {
- {0 , "5.056941 Msym/sec"},
- {1 , "5.360537 Msym/sec"},
- {2 , "6.952 Msym/sec"},
- {0, NULL}
+ {0 , "5.056941 Msym/sec"},
+ {1 , "5.360537 Msym/sec"},
+ {2 , "6.952 Msym/sec"},
+ {0, NULL}
};
value_string init_tech_vals[] = {
- {0 , "Reinitialize MAC"},
- {1 , "Broadcast Init RNG on new chanbefore normal op"},
- {2 , "Unicast RNG on new chan before normal op"},
- {3 , "Either Unicast or broadcast RNG on new chan before normal op"},
- {4 , "Use new chan directly without re-init or RNG"},
- {0, NULL}
+ {0 , "Reinitialize MAC"},
+ {1 , "Broadcast Init RNG on new chanbefore normal op"},
+ {2 , "Unicast RNG on new chan before normal op"},
+ {3 , "Either Unicast or broadcast RNG on new chan before normal op"},
+ {4 , "Use new chan directly without re-init or RNG"},
+ {0, NULL}
};
-/* Code to actually dissect the packets */
+
+/* Dissection */
static void
dissect_dccreq_ds_params (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
{
@@ -118,81 +118,82 @@ dissect_dccreq_ds_params (tvbuff_t * tvb, proto_tree * tree, int start, guint16
pos = start;
dcc_tree = proto_tree_add_subtree_format( tree, tvb, start, len, ett_docsis_dccreq_ds_params, NULL,
- "2 DCC-REQ Downstream Params Encodings (Length = %u)", len);
+ "2 DCC-REQ Downstream Params Encodings (Length = %u)", len);
while ( pos < ( start + len) )
{
- type = tvb_get_guint8 (tvb, pos++);
- length = tvb_get_guint8 (tvb, pos++);
-
- switch (type)
- {
- case DCCREQ_DS_FREQ:
- if (length == 4)
- {
- proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_freq, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCCREQ_DS_MOD_TYPE:
- if (length == 1)
- {
- proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_mod_type, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCCREQ_DS_SYM_RATE:
- if (length == 1)
- {
- proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_sym_rate, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCCREQ_DS_INTLV_DEPTH:
- if (length == 2)
- {
- proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_intlv_depth_i, tvb,
- pos, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_intlv_depth_j, tvb,
- pos + 1, 1, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCCREQ_DS_CHAN_ID:
- if (length == 1)
- {
- proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_chan_id, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCCREQ_DS_SYNC_SUB:
- proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_sync_sub, tvb,
- pos, length, ENC_BIG_ENDIAN);
- break;
-
- }
- pos = pos + length;
- }
+ type = tvb_get_guint8 (tvb, pos++);
+ length = tvb_get_guint8 (tvb, pos++);
+
+ switch (type)
+ {
+ case DCCREQ_DS_FREQ:
+ if (length == 4)
+ {
+ proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_freq, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCCREQ_DS_MOD_TYPE:
+ if (length == 1)
+ {
+ proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_mod_type, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCCREQ_DS_SYM_RATE:
+ if (length == 1)
+ {
+ proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_sym_rate, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCCREQ_DS_INTLV_DEPTH:
+ if (length == 2)
+ {
+ proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_intlv_depth_i, tvb,
+ pos, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_intlv_depth_j, tvb,
+ pos + 1, 1, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCCREQ_DS_CHAN_ID:
+ if (length == 1)
+ {
+ proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_chan_id, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCCREQ_DS_SYNC_SUB:
+ proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_sync_sub, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ break;
+
+ }
+ pos = pos + length;
+ }
}
+
static void
dissect_dccreq_sf_sub (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
{
@@ -205,52 +206,53 @@ dissect_dccreq_sf_sub (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len
while ( pos < ( start + len) )
{
- type = tvb_get_guint8 (tvb, pos++);
- length = tvb_get_guint8 (tvb, pos++);
-
- switch (type)
- {
- case DCCREQ_SF_SFID:
- if (length == 8)
- {
- proto_tree_add_item (dcc_tree, hf_docsis_dccreq_sf_sfid_cur, tvb,
- pos, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item (dcc_tree, hf_docsis_dccreq_sf_sfid_new, tvb,
- pos + 4, 4, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCCREQ_SF_SID:
- if (length == 4)
- {
- proto_tree_add_item (dcc_tree, hf_docsis_dccreq_sf_sid_cur, tvb,
- pos, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item (dcc_tree, hf_docsis_dccreq_sf_sid_new, tvb,
- pos + 2, 2, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCCREQ_SF_UNSOL_GRANT_TREF:
- if (length == 4)
- {
- proto_tree_add_item (dcc_tree, hf_docsis_dccreq_sf_unsol_grant_tref, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- }
- pos = pos + length;
- }
+ type = tvb_get_guint8 (tvb, pos++);
+ length = tvb_get_guint8 (tvb, pos++);
+
+ switch (type)
+ {
+ case DCCREQ_SF_SFID:
+ if (length == 8)
+ {
+ proto_tree_add_item (dcc_tree, hf_docsis_dccreq_sf_sfid_cur, tvb,
+ pos, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item (dcc_tree, hf_docsis_dccreq_sf_sfid_new, tvb,
+ pos + 4, 4, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCCREQ_SF_SID:
+ if (length == 4)
+ {
+ proto_tree_add_item (dcc_tree, hf_docsis_dccreq_sf_sid_cur, tvb,
+ pos, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item (dcc_tree, hf_docsis_dccreq_sf_sid_new, tvb,
+ pos + 2, 2, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCCREQ_SF_UNSOL_GRANT_TREF:
+ if (length == 4)
+ {
+ proto_tree_add_item (dcc_tree, hf_docsis_dccreq_sf_unsol_grant_tref, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ }
+ pos = pos + length;
+ }
}
+
static void
dissect_dccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
@@ -267,331 +269,316 @@ dissect_dccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
if (tree)
{
dcc_item =
- proto_tree_add_protocol_format (tree, proto_docsis_dccreq, tvb, 0,
- -1, "DCC-REQ Message");
+ proto_tree_add_protocol_format (tree, proto_docsis_dccreq, tvb, 0,
+ -1, "DCC-REQ Message");
dcc_tree = proto_item_add_subtree (dcc_item, ett_docsis_dccreq);
proto_tree_add_item (dcc_tree, hf_docsis_dccreq_tran_id, tvb, 0, 2, ENC_BIG_ENDIAN);
pos = 2;
while (pos < len)
- {
- type = tvb_get_guint8 (tvb, pos++);
- length = tvb_get_guint8 (tvb, pos++);
-
- switch (type)
- {
- case DCCREQ_UP_CHAN_ID:
- if (length == 1)
- {
- proto_tree_add_item (dcc_tree, hf_docsis_dccreq_up_chan_id, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCCREQ_DS_PARAMS:
- dissect_dccreq_ds_params (tvb , dcc_tree , pos , length );
- break;
- case DCCREQ_INIT_TECH:
- if (length == 1)
- {
- proto_tree_add_item (dcc_tree, hf_docsis_dccreq_init_tech, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCCREQ_UCD_SUB:
- proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ucd_sub, tvb,
- pos, length, ENC_NA);
- break;
- case DCCREQ_SAID_SUB:
- if (length == 4)
- {
- proto_tree_add_item (dcc_tree, hf_docsis_dccreq_said_sub_cur, tvb,
- pos, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item (dcc_tree, hf_docsis_dccreq_said_sub_new, tvb,
- pos + 2, 2, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCCREQ_SF_SUB:
- dissect_dccreq_sf_sub (tvb , dcc_tree , pos , length );
- break;
- case DCCREQ_CMTS_MAC_ADDR:
- if (length == 6)
- {
- proto_tree_add_item (dcc_tree, hf_docsis_dccreq_cmts_mac_addr, tvb,
- pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCCREQ_KEY_SEQ_NUM:
- if (length == 1)
- {
- proto_tree_add_item (dcc_tree, hf_docsis_dccreq_key_seq_num, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCCREQ_HMAC_DIGEST:
- if (length == 20)
- {
- proto_tree_add_item (dcc_tree, hf_docsis_dccreq_hmac_digest, tvb,
- pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- } /* switch(type) */
- pos = pos + length;
- } /* while (pos < len) */
- } /* if (tree) */
-
+ {
+ type = tvb_get_guint8 (tvb, pos++);
+ length = tvb_get_guint8 (tvb, pos++);
+
+ switch (type)
+ {
+ case DCCREQ_UP_CHAN_ID:
+ if (length == 1)
+ {
+ proto_tree_add_item (dcc_tree, hf_docsis_dccreq_up_chan_id, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCCREQ_DS_PARAMS:
+ dissect_dccreq_ds_params (tvb , dcc_tree , pos , length );
+ break;
+ case DCCREQ_INIT_TECH:
+ if (length == 1)
+ {
+ proto_tree_add_item (dcc_tree, hf_docsis_dccreq_init_tech, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCCREQ_UCD_SUB:
+ proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ucd_sub, tvb,
+ pos, length, ENC_NA);
+ break;
+ case DCCREQ_SAID_SUB:
+ if (length == 4)
+ {
+ proto_tree_add_item (dcc_tree, hf_docsis_dccreq_said_sub_cur, tvb,
+ pos, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item (dcc_tree, hf_docsis_dccreq_said_sub_new, tvb,
+ pos + 2, 2, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCCREQ_SF_SUB:
+ dissect_dccreq_sf_sub (tvb , dcc_tree , pos , length );
+ break;
+ case DCCREQ_CMTS_MAC_ADDR:
+ if (length == 6)
+ {
+ proto_tree_add_item (dcc_tree, hf_docsis_dccreq_cmts_mac_addr, tvb,
+ pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCCREQ_KEY_SEQ_NUM:
+ if (length == 1)
+ {
+ proto_tree_add_item (dcc_tree, hf_docsis_dccreq_key_seq_num, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCCREQ_HMAC_DIGEST:
+ if (length == 20)
+ {
+ proto_tree_add_item (dcc_tree, hf_docsis_dccreq_hmac_digest, tvb,
+ pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ } /* switch(type) */
+ pos = pos + length;
+ } /* while (pos < len) */
+ } /* if (tree) */
}
-/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
+/* Register the protocol with Wireshark */
void
proto_register_docsis_dccreq (void)
{
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_dccreq_tran_id ,
- {
- "Transaction ID",
- "docsis_dccreq.tran_id",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Transaction ID",
+ "docsis_dccreq.tran_id",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccreq_up_chan_id ,
- {
- "Up Channel ID",
- "docsis_dccreq.up_chan_id",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Up Channel ID",
+ "docsis_dccreq.up_chan_id",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccreq_ds_freq ,
- {
- "Frequency",
- "docsis_dccreq.ds_freq",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Frequency",
+ "docsis_dccreq.ds_freq",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccreq_ds_mod_type ,
- {
- "Modulation Type",
- "docsis_dccreq.ds_mod_type",
- FT_UINT8, BASE_DEC, VALS (ds_mod_type_vals), 0x0,
- NULL,
- HFILL
- }
+ {
+ "Modulation Type",
+ "docsis_dccreq.ds_mod_type",
+ FT_UINT8, BASE_DEC, VALS (ds_mod_type_vals), 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccreq_ds_sym_rate ,
- {
- "Symbol Rate",
- "docsis_dccreq.ds_sym_rate",
- FT_UINT8, BASE_DEC, VALS (ds_sym_rate_vals), 0x0,
- NULL,
- HFILL
- }
+ {
+ "Symbol Rate",
+ "docsis_dccreq.ds_sym_rate",
+ FT_UINT8, BASE_DEC, VALS (ds_sym_rate_vals), 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccreq_ds_intlv_depth_i ,
- {
- "Interleaver Depth I Value",
- "docsis_dccreq.ds_intlv_depth_i",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Interleaver Depth I Value",
+ "docsis_dccreq.ds_intlv_depth_i",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccreq_ds_intlv_depth_j ,
- {
- "Interleaver Depth J Value",
- "docsis_dccreq.ds_intlv_depth_j",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Interleaver Depth J Value",
+ "docsis_dccreq.ds_intlv_depth_j",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccreq_ds_chan_id ,
- {
- "Downstream Channel ID",
- "docsis_dccreq.ds_chan_id",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Downstream Channel ID",
+ "docsis_dccreq.ds_chan_id",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccreq_ds_sync_sub ,
- {
- "SYNC Substitution",
- "docsis_dccreq.ds_sync_sub",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "SYNC Substitution",
+ "docsis_dccreq.ds_sync_sub",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccreq_init_tech ,
- {
- "Initialization Technique",
- "docsis_dccreq.init_tech",
- FT_UINT8, BASE_DEC, VALS (init_tech_vals), 0x0,
- NULL,
- HFILL
- }
+ {
+ "Initialization Technique",
+ "docsis_dccreq.init_tech",
+ FT_UINT8, BASE_DEC, VALS (init_tech_vals), 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccreq_ucd_sub ,
- {
- "UCD Substitution",
- "docsis_dccreq.ucd_sub",
- FT_BYTES, BASE_NONE, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "UCD Substitution",
+ "docsis_dccreq.ucd_sub",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccreq_said_sub_cur ,
- {
- "SAID Sub - Current Value",
- "docsis_dccreq.said_sub_cur",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "SAID Sub - Current Value",
+ "docsis_dccreq.said_sub_cur",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccreq_said_sub_new ,
- {
- "SAID Sub - New Value",
- "docsis_dccreq.said_sub_new",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "SAID Sub - New Value",
+ "docsis_dccreq.said_sub_new",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccreq_sf_sfid_cur ,
- {
- "SF Sub - SFID Current Value",
- "docsis_dccreq.sf_sfid_cur",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "SF Sub - SFID Current Value",
+ "docsis_dccreq.sf_sfid_cur",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccreq_sf_sfid_new ,
- {
- "SF Sub - SFID New Value",
- "docsis_dccreq.sf_sfid_new",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "SF Sub - SFID New Value",
+ "docsis_dccreq.sf_sfid_new",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccreq_sf_sid_cur ,
- {
- "SF Sub - SID Current Value",
- "docsis_dccreq.sf_sid_cur",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "SF Sub - SID Current Value",
+ "docsis_dccreq.sf_sid_cur",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccreq_sf_sid_new ,
- {
- "SF Sub - SID New Value",
- "docsis_dccreq.sf_sid_new",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "SF Sub - SID New Value",
+ "docsis_dccreq.sf_sid_new",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccreq_sf_unsol_grant_tref ,
- {
- "SF Sub - Unsolicited Grant Time Reference",
- "docsis_dccreq.sf_unsol_grant_tref",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "SF Sub - Unsolicited Grant Time Reference",
+ "docsis_dccreq.sf_unsol_grant_tref",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccreq_cmts_mac_addr ,
- {
- "CMTS Mac Address",
- "docsis_dccreq.cmts_mac_addr",
- FT_ETHER, BASE_NONE, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "CMTS Mac Address",
+ "docsis_dccreq.cmts_mac_addr",
+ FT_ETHER, BASE_NONE, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccreq_key_seq_num ,
- {
- "Auth Key Sequence Number",
- "docsis_dccreq.key_seq_num",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Auth Key Sequence Number",
+ "docsis_dccreq.key_seq_num",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccreq_hmac_digest ,
- {
- "HMAC-DigestNumber",
- "docsis_dccreq.hmac_digest",
- FT_BYTES, BASE_NONE, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "HMAC-DigestNumber",
+ "docsis_dccreq.hmac_digest",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_dccreq,
&ett_docsis_dccreq_sf_sub,
&ett_docsis_dccreq_ds_params,
};
-/* Register the protocol name and description */
proto_docsis_dccreq =
proto_register_protocol ("DOCSIS Downstream Channel Change Request",
- "DOCSIS DCC-REQ", "docsis_dccreq");
+ "DOCSIS DCC-REQ", "docsis_dccreq");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_dccreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_dccreq", dissect_dccreq, proto_docsis_dccreq);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_dccreq (void)
{
@@ -601,3 +588,16 @@ proto_reg_handoff_docsis_dccreq (void)
dissector_add_uint ("docsis_mgmt", 0x17, docsis_dccreq_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-dccrsp.c b/plugins/docsis/packet-dccrsp.c
index 4af42ba9f5..68567e23d9 100644
--- a/plugins/docsis/packet-dccrsp.c
+++ b/plugins/docsis/packet-dccrsp.c
@@ -53,8 +53,7 @@ static int hf_docsis_dccrsp_hmac_digest = -1;
static gint ett_docsis_dccrsp = -1;
static gint ett_docsis_dccrsp_cm_jump_time = -1;
-
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_dccrsp_cm_jump_time (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
{
@@ -64,41 +63,42 @@ dissect_dccrsp_cm_jump_time (tvbuff_t * tvb, proto_tree * tree, int start, guint
pos = start;
dcc_tree = proto_tree_add_subtree_format( tree, tvb, start, len, ett_docsis_dccrsp_cm_jump_time, NULL,
- "2 DCC-RSP CM Time Jump Encodings (Length = %u)", len);
+ "2 DCC-RSP CM Time Jump Encodings (Length = %u)", len);
while ( pos < ( start + len) )
{
- type = tvb_get_guint8 (tvb, pos++);
- length = tvb_get_guint8 (tvb, pos++);
+ type = tvb_get_guint8 (tvb, pos++);
+ length = tvb_get_guint8 (tvb, pos++);
- switch (type)
- {
- case DCCRSP_CM_JUMP_TIME_LENGTH:
- if (length == 4)
- {
- proto_tree_add_item (dcc_tree, hf_docsis_dccrsp_cm_jump_time_length, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCCRSP_CM_JUMP_TIME_START:
- if (length == 8)
- {
- proto_tree_add_item (dcc_tree, hf_docsis_dccrsp_cm_jump_time_start, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- }
- pos = pos + length;
- }
+ switch (type)
+ {
+ case DCCRSP_CM_JUMP_TIME_LENGTH:
+ if (length == 4)
+ {
+ proto_tree_add_item (dcc_tree, hf_docsis_dccrsp_cm_jump_time_length, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCCRSP_CM_JUMP_TIME_START:
+ if (length == 8)
+ {
+ proto_tree_add_item (dcc_tree, hf_docsis_dccrsp_cm_jump_time_start, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ }
+ pos = pos + length;
+ }
}
+
static void
dissect_dccrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
@@ -115,142 +115,128 @@ dissect_dccrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
if (tree)
{
dcc_item =
- proto_tree_add_protocol_format (tree, proto_docsis_dccrsp, tvb, 0,
- -1, "DCC-RSP Message");
+ proto_tree_add_protocol_format (tree, proto_docsis_dccrsp, tvb, 0,
+ -1, "DCC-RSP Message");
dcc_tree = proto_item_add_subtree (dcc_item, ett_docsis_dccrsp);
proto_tree_add_item (dcc_tree, hf_docsis_dccrsp_tran_id, tvb, 0, 2, ENC_BIG_ENDIAN);
proto_tree_add_item (dcc_tree, hf_docsis_dccrsp_conf_code, tvb, 2, 1, ENC_BIG_ENDIAN);
pos = 3;
while (pos < len)
- {
- type = tvb_get_guint8 (tvb, pos++);
- length = tvb_get_guint8 (tvb, pos++);
- switch (type)
- {
- case DCCRSP_CM_JUMP_TIME:
- dissect_dccrsp_cm_jump_time (tvb , dcc_tree , pos , length );
- break;
- case DCCRSP_KEY_SEQ_NUM:
- if (length == 1)
- {
- proto_tree_add_item (dcc_tree, hf_docsis_dccrsp_key_seq_num, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCCRSP_HMAC_DIGEST:
- if (length == 20)
- {
- proto_tree_add_item (dcc_tree, hf_docsis_dccrsp_hmac_digest, tvb,
- pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- } /* switch(type) */
- pos = pos + length;
- } /* while (pos < len) */
- } /* if (tree) */
+ {
+ type = tvb_get_guint8 (tvb, pos++);
+ length = tvb_get_guint8 (tvb, pos++);
+ switch (type)
+ {
+ case DCCRSP_CM_JUMP_TIME:
+ dissect_dccrsp_cm_jump_time (tvb , dcc_tree , pos , length );
+ break;
+ case DCCRSP_KEY_SEQ_NUM:
+ if (length == 1)
+ {
+ proto_tree_add_item (dcc_tree, hf_docsis_dccrsp_key_seq_num, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCCRSP_HMAC_DIGEST:
+ if (length == 20)
+ {
+ proto_tree_add_item (dcc_tree, hf_docsis_dccrsp_hmac_digest, tvb,
+ pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ } /* switch(type) */
+ pos = pos + length;
+ } /* while (pos < len) */
+ } /* if (tree) */
}
-/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
+/* Register the protocol with Wireshark */
void
proto_register_docsis_dccrsp (void)
{
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_dccrsp_tran_id ,
- {
- "Transaction ID",
- "docsis_dccrsp.tran_id",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Transaction ID",
+ "docsis_dccrsp.tran_id",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccrsp_conf_code ,
- {
- "Confirmation Code",
- "docsis_dccrsp.conf_code",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Confirmation Code",
+ "docsis_dccrsp.conf_code",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccrsp_cm_jump_time_length ,
- {
- "Jump Time Length",
- "docsis_dccrsp.cm_jump_time_length",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Jump Time Length",
+ "docsis_dccrsp.cm_jump_time_length",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccrsp_cm_jump_time_start ,
- {
- "Jump Time Start",
- "docsis_dccrsp.cm_jump_time_start",
- FT_UINT64, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Jump Time Start",
+ "docsis_dccrsp.cm_jump_time_start",
+ FT_UINT64, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccrsp_key_seq_num ,
- {
- "Auth Key Sequence Number",
- "docsis_dccrsp.key_seq_num",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Auth Key Sequence Number",
+ "docsis_dccrsp.key_seq_num",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dccrsp_hmac_digest ,
- {
- "HMAC-DigestNumber",
- "docsis_dccrsp.hmac_digest",
- FT_BYTES, BASE_NONE, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "HMAC-DigestNumber",
+ "docsis_dccrsp.hmac_digest",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_dccrsp,
&ett_docsis_dccrsp_cm_jump_time,
};
-/* Register the protocol name and description */
proto_docsis_dccrsp =
proto_register_protocol ("DOCSIS Downstream Channel Change Response",
- "DOCSIS DCC-RSP", "docsis_dccrsp");
+ "DOCSIS DCC-RSP", "docsis_dccrsp");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_dccrsp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_dccrsp", dissect_dccrsp, proto_docsis_dccrsp);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_dccrsp (void)
{
@@ -260,3 +246,16 @@ proto_reg_handoff_docsis_dccrsp (void)
dissector_add_uint ("docsis_mgmt", 0x18, docsis_dccrsp_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-dcd.c b/plugins/docsis/packet-dcd.c
index e4573e50f5..e3028b8e2e 100644
--- a/plugins/docsis/packet-dcd.c
+++ b/plugins/docsis/packet-dcd.c
@@ -124,7 +124,7 @@ static gint ett_docsis_dcd_rule = -1;
static gint ett_docsis_dcd_clid = -1;
static gint ett_docsis_dcd_cfg = -1;
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_dcd_dsg_cfg (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
{
@@ -134,79 +134,80 @@ dissect_dcd_dsg_cfg (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
pos = start;
dcd_tree = proto_tree_add_subtree_format( tree, tvb, start, len,
- ett_docsis_dcd_cfg, NULL, "51 DCD DSG Config Encodings (Length = %u)", len);
+ ett_docsis_dcd_cfg, NULL, "51 DCD DSG Config Encodings (Length = %u)", len);
while ( pos < ( start + len) )
{
- type = tvb_get_guint8 (tvb, pos++);
- length = tvb_get_guint8 (tvb, pos++);
-
- switch (type)
- {
- case DCD_CFG_CHAN_LST:
- if (length == 4)
- {
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfg_chan, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCD_CFG_TDSG1:
- if (length == 2)
- {
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfg_tdsg1, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCD_CFG_TDSG2:
- if (length == 2)
- {
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfg_tdsg2, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCD_CFG_TDSG3:
- if (length == 2)
- {
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfg_tdsg3, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCD_CFG_TDSG4:
- if (length == 2)
- {
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfg_tdsg4, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCD_CFG_VENDOR_SPEC:
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfg_vendor_spec, tvb,
- pos, length, ENC_NA);
- break;
-
- }
- pos = pos + length;
- }
+ type = tvb_get_guint8 (tvb, pos++);
+ length = tvb_get_guint8 (tvb, pos++);
+
+ switch (type)
+ {
+ case DCD_CFG_CHAN_LST:
+ if (length == 4)
+ {
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfg_chan, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCD_CFG_TDSG1:
+ if (length == 2)
+ {
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfg_tdsg1, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCD_CFG_TDSG2:
+ if (length == 2)
+ {
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfg_tdsg2, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCD_CFG_TDSG3:
+ if (length == 2)
+ {
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfg_tdsg3, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCD_CFG_TDSG4:
+ if (length == 2)
+ {
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfg_tdsg4, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCD_CFG_VENDOR_SPEC:
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfg_vendor_spec, tvb,
+ pos, length, ENC_NA);
+ break;
+
+ }
+ pos = pos + length;
+ }
}
+
static void
dissect_dcd_down_classifier_ip (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
{
@@ -219,103 +220,104 @@ dissect_dcd_down_classifier_ip (tvbuff_t * tvb, proto_tree * tree, int start, gu
while ( pos < ( start + len) )
{
- type = tvb_get_guint8 (tvb, pos++);
- length = tvb_get_guint8 (tvb, pos++);
-
- switch (type)
- {
- case DCD_CFR_IP_SOURCE_ADDR:
- if (length == 4)
- {
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_ip_source_addr, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCD_CFR_IP_SOURCE_MASK:
- if (length == 4)
- {
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_ip_source_mask, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCD_CFR_IP_DEST_ADDR:
- if (length == 4)
- {
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_ip_dest_addr, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCD_CFR_IP_DEST_MASK:
- if (length == 4)
- {
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_ip_dest_mask, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCD_CFR_TCPUDP_SRCPORT_START:
- if (length == 2)
- {
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_tcpudp_srcport_start, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCD_CFR_TCPUDP_SRCPORT_END:
- if (length == 2)
- {
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_tcpudp_srcport_end, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCD_CFR_TCPUDP_DSTPORT_START:
- if (length == 2)
- {
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_tcpudp_dstport_start, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCD_CFR_TCPUDP_DSTPORT_END:
- if (length == 2)
- {
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_tcpudp_dstport_end, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- }
- pos = pos + length;
- }
+ type = tvb_get_guint8 (tvb, pos++);
+ length = tvb_get_guint8 (tvb, pos++);
+
+ switch (type)
+ {
+ case DCD_CFR_IP_SOURCE_ADDR:
+ if (length == 4)
+ {
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_ip_source_addr, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCD_CFR_IP_SOURCE_MASK:
+ if (length == 4)
+ {
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_ip_source_mask, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCD_CFR_IP_DEST_ADDR:
+ if (length == 4)
+ {
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_ip_dest_addr, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCD_CFR_IP_DEST_MASK:
+ if (length == 4)
+ {
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_ip_dest_mask, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCD_CFR_TCPUDP_SRCPORT_START:
+ if (length == 2)
+ {
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_tcpudp_srcport_start, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCD_CFR_TCPUDP_SRCPORT_END:
+ if (length == 2)
+ {
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_tcpudp_srcport_end, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCD_CFR_TCPUDP_DSTPORT_START:
+ if (length == 2)
+ {
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_tcpudp_dstport_start, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCD_CFR_TCPUDP_DSTPORT_END:
+ if (length == 2)
+ {
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_tcpudp_dstport_end, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ }
+ pos = pos + length;
+ }
}
+
static void
dissect_dcd_clid (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
{
@@ -328,58 +330,59 @@ dissect_dcd_clid (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
while ( pos < ( start + len) )
{
- type = tvb_get_guint8 (tvb, pos++);
- length = tvb_get_guint8 (tvb, pos++);
-
- switch (type)
- {
- case DCD_CLID_BCAST_ID:
- if (length == 2)
- {
- proto_tree_add_item(dcd_tree, hf_docsis_dcd_clid_bcast_id, tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCD_CLID_KNOWN_MAC_ADDR:
- if (length == 6)
- {
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_clid_known_mac_addr, tvb,
- pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCD_CLID_CA_SYS_ID:
- if (length == 2)
- {
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_clid_ca_sys_id, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCD_CLID_APP_ID:
- if (length == 2)
- {
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_clid_app_id, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- }
- pos = pos + length;
- }
+ type = tvb_get_guint8 (tvb, pos++);
+ length = tvb_get_guint8 (tvb, pos++);
+
+ switch (type)
+ {
+ case DCD_CLID_BCAST_ID:
+ if (length == 2)
+ {
+ proto_tree_add_item(dcd_tree, hf_docsis_dcd_clid_bcast_id, tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCD_CLID_KNOWN_MAC_ADDR:
+ if (length == 6)
+ {
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_clid_known_mac_addr, tvb,
+ pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCD_CLID_CA_SYS_ID:
+ if (length == 2)
+ {
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_clid_ca_sys_id, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCD_CLID_APP_ID:
+ if (length == 2)
+ {
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_clid_app_id, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ }
+ pos = pos + length;
+ }
}
+
static void
dissect_dcd_dsg_rule (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
{
@@ -392,71 +395,72 @@ dissect_dcd_dsg_rule (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
while ( pos < ( start + len) )
{
- type = tvb_get_guint8 (tvb, pos++);
- length = tvb_get_guint8 (tvb, pos++);
-
- switch (type)
- {
- case DCD_RULE_ID:
- if (length == 1)
- {
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_rule_id, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCD_RULE_PRI:
- if (length == 1)
- {
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_rule_pri, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCD_RULE_UCID_RNG:
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_rule_ucid_list, tvb,
- pos, length, ENC_NA);
- break;
- case DCD_RULE_CLIENT_ID:
- dissect_dcd_clid (tvb , dcd_tree , pos , length );
- break;
- case DCD_RULE_TUNL_ADDR:
- if (length == 6)
- {
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_rule_tunl_addr, tvb,
- pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCD_RULE_CFR_ID:
- if (length == 2)
- {
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_rule_cfr_id, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCD_RULE_VENDOR_SPEC:
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_rule_vendor_spec, tvb,
- pos, length, ENC_NA);
- break;
-
- }
- pos = pos + length;
- }
+ type = tvb_get_guint8 (tvb, pos++);
+ length = tvb_get_guint8 (tvb, pos++);
+
+ switch (type)
+ {
+ case DCD_RULE_ID:
+ if (length == 1)
+ {
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_rule_id, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCD_RULE_PRI:
+ if (length == 1)
+ {
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_rule_pri, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCD_RULE_UCID_RNG:
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_rule_ucid_list, tvb,
+ pos, length, ENC_NA);
+ break;
+ case DCD_RULE_CLIENT_ID:
+ dissect_dcd_clid (tvb , dcd_tree , pos , length );
+ break;
+ case DCD_RULE_TUNL_ADDR:
+ if (length == 6)
+ {
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_rule_tunl_addr, tvb,
+ pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCD_RULE_CFR_ID:
+ if (length == 2)
+ {
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_rule_cfr_id, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCD_RULE_VENDOR_SPEC:
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_rule_vendor_spec, tvb,
+ pos, length, ENC_NA);
+ break;
+
+ }
+ pos = pos + length;
+ }
}
+
static void
dissect_dcd_down_classifier (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
{
@@ -469,41 +473,42 @@ dissect_dcd_down_classifier (tvbuff_t * tvb, proto_tree * tree, int start, guint
while ( pos < ( start + len) )
{
- type = tvb_get_guint8 (tvb, pos++);
- length = tvb_get_guint8 (tvb, pos++);
-
- switch (type)
- {
- case DCD_CFR_ID:
- if (length == 2)
- {
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_id, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCD_CFR_RULE_PRI:
- if (length == 1)
- {
- proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_rule_pri, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DCD_CFR_IP_CLASSIFIER:
- dissect_dcd_down_classifier_ip (tvb , dcd_tree , pos , length );
- break;
-
- }
- pos = pos + length;
- }
+ type = tvb_get_guint8 (tvb, pos++);
+ length = tvb_get_guint8 (tvb, pos++);
+
+ switch (type)
+ {
+ case DCD_CFR_ID:
+ if (length == 2)
+ {
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_id, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCD_CFR_RULE_PRI:
+ if (length == 1)
+ {
+ proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_rule_pri, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DCD_CFR_IP_CLASSIFIER:
+ dissect_dcd_down_classifier_ip (tvb , dcd_tree , pos , length );
+ break;
+
+ }
+ pos = pos + length;
+ }
}
+
static void
dissect_dcd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
@@ -520,9 +525,9 @@ dissect_dcd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
if (tree)
{
dcd_item =
- proto_tree_add_protocol_format (tree, proto_docsis_dcd, tvb, 0,
- tvb_length_remaining (tvb, 0),
- "DCD Message");
+ proto_tree_add_protocol_format (tree, proto_docsis_dcd, tvb, 0,
+ tvb_length_remaining (tvb, 0),
+ "DCD Message");
dcd_tree = proto_item_add_subtree (dcd_item, ett_docsis_dcd);
proto_tree_add_item (dcd_tree, hf_docsis_dcd_config_ch_cnt, tvb, 0, 1, ENC_BIG_ENDIAN);
proto_tree_add_item (dcd_tree, hf_docsis_dcd_num_of_frag, tvb, 1, 1, ENC_BIG_ENDIAN);
@@ -530,303 +535,297 @@ dissect_dcd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
pos = 3;
while (pos < len)
- {
- type = tvb_get_guint8 (tvb, pos++);
- length = tvb_get_guint8 (tvb, pos++);
- switch (type)
- {
- case DCD_DOWN_CLASSIFIER:
- dissect_dcd_down_classifier (tvb , dcd_tree , pos , length );
- break;
- case DCD_DSG_RULE:
- dissect_dcd_dsg_rule (tvb , dcd_tree , pos , length );
- break;
- case DCD_DSG_CONFIG:
- dissect_dcd_dsg_cfg (tvb , dcd_tree , pos , length );
- break;
- } /* switch(type) */
- pos = pos + length;
- } /* while (pos < len) */
- } /* if (tree) */
+ {
+ type = tvb_get_guint8 (tvb, pos++);
+ length = tvb_get_guint8 (tvb, pos++);
+ switch (type)
+ {
+ case DCD_DOWN_CLASSIFIER:
+ dissect_dcd_down_classifier (tvb , dcd_tree , pos , length );
+ break;
+ case DCD_DSG_RULE:
+ dissect_dcd_dsg_rule (tvb , dcd_tree , pos , length );
+ break;
+ case DCD_DSG_CONFIG:
+ dissect_dcd_dsg_cfg (tvb , dcd_tree , pos , length );
+ break;
+ } /* switch(type) */
+ pos = pos + length;
+ } /* while (pos < len) */
+ } /* if (tree) */
}
-/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
+/* Register the protocol with Wireshark */
void
proto_register_docsis_dcd (void)
{
-/* Setup list of header fields See Section 1.6.1 for details*/
+ /* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_dcd_config_ch_cnt,
- {
- "Configuration Change Count",
- "docsis_dcd.config_ch_cnt",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Configuration Change Count",
+ "docsis_dcd.config_ch_cnt",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_num_of_frag,
- {
- "Number of Fragments",
- "docsis_dcd.num_of_frag",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Number of Fragments",
+ "docsis_dcd.num_of_frag",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_frag_sequence_num,
- {
- "Fragment Sequence Number",
- "docsis_dcd.frag_sequence_num",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Fragment Sequence Number",
+ "docsis_dcd.frag_sequence_num",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_cfr_id,
- {
- "Downstream Classifier Id",
- "docsis_dcd.cfr_id",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Downstream Classifier Id",
+ "docsis_dcd.cfr_id",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_cfr_rule_pri,
- {
- "Downstream Classifier Rule Priority",
- "docsis_dcd.cfr_rule_pri",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Downstream Classifier Rule Priority",
+ "docsis_dcd.cfr_rule_pri",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_cfr_ip_source_addr,
- {
- "Downstream Classifier IP Source Address",
- "docsis_dcd.cfr_ip_source_addr",
- FT_IPv4, BASE_NONE, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Downstream Classifier IP Source Address",
+ "docsis_dcd.cfr_ip_source_addr",
+ FT_IPv4, BASE_NONE, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_cfr_ip_source_mask,
- {
- "Downstream Classifier IP Source Mask",
- "docsis_dcd.cfr_ip_source_mask",
- FT_IPv4, BASE_NONE, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Downstream Classifier IP Source Mask",
+ "docsis_dcd.cfr_ip_source_mask",
+ FT_IPv4, BASE_NONE, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_cfr_ip_dest_addr,
- {
- "Downstream Classifier IP Destination Address",
- "docsis_dcd.cfr_ip_dest_addr",
- FT_IPv4, BASE_NONE, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Downstream Classifier IP Destination Address",
+ "docsis_dcd.cfr_ip_dest_addr",
+ FT_IPv4, BASE_NONE, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_cfr_ip_dest_mask,
- {
- "Downstream Classifier IP Destination Mask",
- "docsis_dcd.cfr_ip_dest_mask",
- FT_IPv4, BASE_NONE, NULL, 0x0,
- "Downstream Classifier IP Destination Address",
- HFILL
- }
+ {
+ "Downstream Classifier IP Destination Mask",
+ "docsis_dcd.cfr_ip_dest_mask",
+ FT_IPv4, BASE_NONE, NULL, 0x0,
+ "Downstream Classifier IP Destination Address",
+ HFILL
+ }
},
{&hf_docsis_dcd_cfr_tcpudp_srcport_start,
- {
- "Downstream Classifier IP TCP/UDP Source Port Start",
- "docsis_dcd.cfr_ip_tcpudp_srcport_start",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Downstream Classifier IP TCP/UDP Source Port Start",
+ "docsis_dcd.cfr_ip_tcpudp_srcport_start",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_cfr_tcpudp_srcport_end,
- {
- "Downstream Classifier IP TCP/UDP Source Port End",
- "docsis_dcd.cfr_ip_tcpudp_srcport_end",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Downstream Classifier IP TCP/UDP Source Port End",
+ "docsis_dcd.cfr_ip_tcpudp_srcport_end",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_cfr_tcpudp_dstport_start,
- {
- "Downstream Classifier IP TCP/UDP Destination Port Start",
- "docsis_dcd.cfr_ip_tcpudp_dstport_start",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Downstream Classifier IP TCP/UDP Destination Port Start",
+ "docsis_dcd.cfr_ip_tcpudp_dstport_start",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_cfr_tcpudp_dstport_end,
- {
- "Downstream Classifier IP TCP/UDP Destination Port End",
- "docsis_dcd.cfr_ip_tcpudp_dstport_end",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "Downstream Classifier IP TCP/UDP Destination Port End",
+ "docsis_dcd.cfr_ip_tcpudp_dstport_end",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_rule_id,
- {
- "DSG Rule Id",
- "docsis_dcd.rule_id",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "DSG Rule Id",
+ "docsis_dcd.rule_id",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_rule_pri,
- {
- "DSG Rule Priority",
- "docsis_dcd.rule_pri",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "DSG Rule Priority",
+ "docsis_dcd.rule_pri",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_rule_ucid_list,
- {
- "DSG Rule UCID Range",
- "docsis_dcd.rule_ucid_list",
- FT_BYTES, BASE_NONE, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "DSG Rule UCID Range",
+ "docsis_dcd.rule_ucid_list",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL,
+ HFILL
+ }
+ },
+ {&hf_docsis_dcd_clid_bcast_id,
+ {
+ "DSG Rule Client ID Broadcast ID",
+ "docsis_dcd.clid_bcast_id",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
- {&hf_docsis_dcd_clid_bcast_id,
- {
- "DSG Rule Client ID Broadcast ID",
- "docsis_dcd.clid_bcast_id",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
- },
{&hf_docsis_dcd_clid_known_mac_addr,
- {
- "DSG Rule Client ID Known MAC Address",
- "docsis_dcd.clid_known_mac_addr",
- FT_ETHER, BASE_NONE, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "DSG Rule Client ID Known MAC Address",
+ "docsis_dcd.clid_known_mac_addr",
+ FT_ETHER, BASE_NONE, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_clid_ca_sys_id,
- {
- "DSG Rule Client ID CA System ID",
- "docsis_dcd.clid_ca_sys_id",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "DSG Rule Client ID CA System ID",
+ "docsis_dcd.clid_ca_sys_id",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_clid_app_id,
- {
- "DSG Rule Client ID Application ID",
- "docsis_dcd.clid_app_id",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "DSG Rule Client ID Application ID",
+ "docsis_dcd.clid_app_id",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_rule_tunl_addr,
- {
- "DSG Rule Tunnel MAC Address",
- "docsis_dcd.rule_tunl_addr",
- FT_ETHER, BASE_NONE, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "DSG Rule Tunnel MAC Address",
+ "docsis_dcd.rule_tunl_addr",
+ FT_ETHER, BASE_NONE, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_rule_cfr_id,
- {
- "DSG Rule Classifier ID",
- "docsis_dcd.rule_cfr_id",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "DSG Rule Classifier ID",
+ "docsis_dcd.rule_cfr_id",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_rule_vendor_spec,
- {
- "DSG Rule Vendor Specific Parameters",
- "docsis_dcd.rule_vendor_spec",
- FT_BYTES, BASE_NONE, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "DSG Rule Vendor Specific Parameters",
+ "docsis_dcd.rule_vendor_spec",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_cfg_chan,
- {
- "DSG Configuration Channel",
- "docsis_dcd.cfg_chan",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "DSG Configuration Channel",
+ "docsis_dcd.cfg_chan",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_cfg_tdsg1,
- {
- "DSG Initialization Timeout (Tdsg1)",
- "docsis_dcd.cfg_tdsg1",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "DSG Initialization Timeout (Tdsg1)",
+ "docsis_dcd.cfg_tdsg1",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_cfg_tdsg2,
- {
- "DSG Operational Timeout (Tdsg2)",
- "docsis_dcd.cfg_tdsg2",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "DSG Operational Timeout (Tdsg2)",
+ "docsis_dcd.cfg_tdsg2",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_cfg_tdsg3,
- {
- "DSG Two-Way Retry Timer (Tdsg3)",
- "docsis_dcd.cfg_tdsg3",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "DSG Two-Way Retry Timer (Tdsg3)",
+ "docsis_dcd.cfg_tdsg3",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_cfg_tdsg4,
- {
- "DSG One-Way Retry Timer (Tdsg4)",
- "docsis_dcd.cfg_tdsg4",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "DSG One-Way Retry Timer (Tdsg4)",
+ "docsis_dcd.cfg_tdsg4",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
{&hf_docsis_dcd_cfg_vendor_spec,
- {
- "DSG Configuration Vendor Specific Parameters",
- "docsis_dcd.cfg_vendor_spec",
- FT_BYTES, BASE_NONE, NULL, 0x0,
- NULL,
- HFILL
- }
+ {
+ "DSG Configuration Vendor Specific Parameters",
+ "docsis_dcd.cfg_vendor_spec",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL,
+ HFILL
+ }
},
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_dcd,
&ett_docsis_dcd_cfr,
@@ -836,23 +835,16 @@ proto_register_docsis_dcd (void)
&ett_docsis_dcd_cfg,
};
-/* Register the protocol name and description */
proto_docsis_dcd =
proto_register_protocol ("DOCSIS Downstream Channel Descriptor",
- "DOCSIS DCD", "docsis_dcd");
+ "DOCSIS DCD", "docsis_dcd");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_dcd, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_dcd", dissect_dcd, proto_docsis_dcd);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_dcd (void)
{
@@ -862,3 +854,16 @@ proto_reg_handoff_docsis_dcd (void)
dissector_add_uint ("docsis_mgmt", 0x20, docsis_dcd_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-docsis.c b/plugins/docsis/packet-docsis.c
index 1d2cb23f15..ea78833087 100644
--- a/plugins/docsis/packet-docsis.c
+++ b/plugins/docsis/packet-docsis.c
@@ -133,23 +133,23 @@ static const value_string fctype_vals[] = {
};
static const value_string eh_type_vals[] = {
- {0, "NULL Configuration Parameter"},
- {EH_REQUEST, "Request"},
- {EH_ACK_REQ, "Acknowledgement Requested"},
- {EH_BP_UP, "Upstream Privacy Element"},
- {EH_BP_DOWN, "Downstream Privacy Element"},
- {EH_SFLOW_HDR_UP, "Service Flow EH; PHS Header Upstream"},
+ {0, "NULL Configuration Parameter"},
+ {EH_REQUEST, "Request"},
+ {EH_ACK_REQ, "Acknowledgement Requested"},
+ {EH_BP_UP, "Upstream Privacy Element"},
+ {EH_BP_DOWN, "Downstream Privacy Element"},
+ {EH_SFLOW_HDR_UP, "Service Flow EH; PHS Header Upstream"},
{EH_SFLOW_HDR_DOWN, "Service Flow EH; PHS Header Downstream"},
- {EH_BP_UP2, "Upstream Privacy with Multi Channel"},
- {EH_DS_SERVICE, "Downstream Service"},
- {EH_RESERVED_9, "Reserved"},
- {EH_RESERVED_10, "Reserved"},
- {EH_RESERVED_10, "Reserved"},
- {EH_RESERVED_11, "Reserved"},
- {EH_RESERVED_12, "Reserved"},
- {EH_RESERVED_13, "Reserved"},
- {EH_RESERVED_14, "Reserved"},
- {EH_EXTENDED, "Extended"},
+ {EH_BP_UP2, "Upstream Privacy with Multi Channel"},
+ {EH_DS_SERVICE, "Downstream Service"},
+ {EH_RESERVED_9, "Reserved"},
+ {EH_RESERVED_10, "Reserved"},
+ {EH_RESERVED_10, "Reserved"},
+ {EH_RESERVED_11, "Reserved"},
+ {EH_RESERVED_12, "Reserved"},
+ {EH_RESERVED_13, "Reserved"},
+ {EH_RESERVED_14, "Reserved"},
+ {EH_EXTENDED, "Extended"},
{0, NULL}
};
@@ -182,7 +182,7 @@ static const true_false_string odd_even_tfs = {
"Even Key",
};
-/* Code to actually dissect the packets */
+/* Dissection */
/* Code to Dissect the extended header */
static void
dissect_ehdr (tvbuff_t * tvb, proto_tree * tree, gboolean isfrag)
@@ -355,16 +355,15 @@ dissect_docsis (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
gboolean isfrag = FALSE;
gint oldconcatlen;
-/* Set up structures needed to add the protocol subtree and manage it */
proto_item *ti;
proto_tree *docsis_tree;
-/* concatlen and concatpos are declared static to allow for recursive calls to
- * the dissect_docsis routine when dissecting Concatenated frames
- */
+ /* concatlen and concatpos are declared static to allow for recursive calls to
+ * the dissect_docsis routine when dissecting Concatenated frames
+ */
static gint concatlen;
static gint concatpos;
-/* Extract important fields */
+ /* Extract important fields */
fc = tvb_get_guint8 (tvb, 0); /* Frame Control Byte */
fctype = (fc >> 6) & 0x03; /* Frame Control Type: 2 MSB Bits */
fcparm = (fc >> 1) & 0x1F; /* Frame Control Parameter: Next 5 Bits */
@@ -373,16 +372,16 @@ dissect_docsis (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
mac_parm = tvb_get_guint8 (tvb, 1); /* Mac Parm */
len_sid = tvb_get_ntohs (tvb, 2); /* Length Or SID */
-/* set Header length based on presence of Extended header */
+ /* set Header length based on presence of Extended header */
if (ehdron == 0x00)
hdrlen = 6;
else
hdrlen = 6 + mac_parm;
-/* Captured PDU Length is based on the length of the header */
+ /* Captured PDU Length is based on the length of the header */
captured_length = tvb_length_remaining (tvb, hdrlen);
-/* If this is a Request Frame, then pdulen is 0 and framelen is 6 */
+ /* If this is a Request Frame, then pdulen is 0 and framelen is 6 */
if ((fctype == FCTYPE_MACSPC) && fcparm == 0x02)
{
pdulen = 0;
@@ -394,409 +393,399 @@ dissect_docsis (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
pdulen = len_sid - (mac_parm + 2);
}
-/* if this is a concatenated frame setup the length of the concatenated
- * frame and set the position to the first byte of the first frame */
+ /* if this is a concatenated frame setup the length of the concatenated
+ * frame and set the position to the first byte of the first frame */
if ((fctype == FCTYPE_MACSPC) && (fcparm == 0x1c))
{
concatlen = len_sid;
concatpos = 6;
}
-/* Make entries in Protocol column and Info column on summary display */
+ /* Make entries in Protocol column and Info column on summary display */
col_set_str (pinfo->cinfo, COL_PROTOCOL, "DOCSIS");
switch (fctype)
{
- case FCTYPE_PACKET:
- col_set_str (pinfo->cinfo, COL_INFO, "Packet PDU");
- break;
- case FCTYPE_ATMPDU:
- col_set_str (pinfo->cinfo, COL_INFO, "ATM PDU");
- break;
- case FCTYPE_RESRVD:
- col_set_str (pinfo->cinfo, COL_INFO, "Reserved PDU");
- break;
- case FCTYPE_MACSPC:
- if (fcparm == 0x02)
- col_add_fstr (pinfo->cinfo, COL_INFO,
- "Request Frame SID = %u Mini Slots = %u", len_sid,
- mac_parm);
- else if (fcparm == 0x03)
- col_set_str (pinfo->cinfo, COL_INFO, "Fragmented Frame");
- else
- col_set_str (pinfo->cinfo, COL_INFO, "Mac Specific");
- break;
+ case FCTYPE_PACKET:
+ col_set_str (pinfo->cinfo, COL_INFO, "Packet PDU");
+ break;
+ case FCTYPE_ATMPDU:
+ col_set_str (pinfo->cinfo, COL_INFO, "ATM PDU");
+ break;
+ case FCTYPE_RESRVD:
+ col_set_str (pinfo->cinfo, COL_INFO, "Reserved PDU");
+ break;
+ case FCTYPE_MACSPC:
+ if (fcparm == 0x02)
+ col_add_fstr (pinfo->cinfo, COL_INFO,
+ "Request Frame SID = %u Mini Slots = %u", len_sid,
+ mac_parm);
+ else if (fcparm == 0x03)
+ col_set_str (pinfo->cinfo, COL_INFO, "Fragmented Frame");
+ else
+ col_set_str (pinfo->cinfo, COL_INFO, "Mac Specific");
+ break;
} /* switch */
-/* In the interest of speed, if "tree" is NULL, don't do any work not
- necessary to generate protocol tree items. */
+ /* In the interest of speed, if "tree" is NULL, don't do any work not
+ necessary to generate protocol tree items. */
if (tree)
{
ti = proto_tree_add_protocol_format (tree, proto_docsis, tvb, 0,
hdrlen, "DOCSIS");
docsis_tree = proto_item_add_subtree (ti, ett_docsis);
-/* add an item to the subtree, see section 1.6 for more information */
+ /* add an item to the subtree, see section 1.6 for more information */
proto_tree_add_item (docsis_tree, hf_docsis_fctype, tvb, 0, 1, ENC_BIG_ENDIAN);
switch (fctype)
{
- case FCTYPE_PACKET:
- case FCTYPE_ATMPDU:
- case FCTYPE_RESRVD:
- proto_tree_add_item (docsis_tree, hf_docsis_fcparm, tvb, 0, 1,
- ENC_BIG_ENDIAN);
- proto_tree_add_item (docsis_tree, hf_docsis_ehdron, tvb, 0, 1,
- ENC_BIG_ENDIAN);
- if (ehdron == 0x01)
- {
- proto_tree_add_item (docsis_tree, hf_docsis_ehdrlen, tvb, 1, 1,
- ENC_BIG_ENDIAN);
- proto_tree_add_item (docsis_tree, hf_docsis_lensid, tvb, 2, 2,
- ENC_BIG_ENDIAN);
- dissect_ehdr (tvb, docsis_tree, isfrag);
- proto_tree_add_item (docsis_tree, hf_docsis_hcs, tvb,
- 4 + mac_parm, 2, ENC_BIG_ENDIAN);
- }
- else
- {
- proto_tree_add_item (docsis_tree, hf_docsis_macparm, tvb, 1, 1,
- ENC_BIG_ENDIAN);
- proto_tree_add_item (docsis_tree, hf_docsis_lensid, tvb, 2, 2,
- ENC_BIG_ENDIAN);
- proto_tree_add_item (docsis_tree, hf_docsis_hcs, tvb, 4, 2,
- ENC_BIG_ENDIAN);
- }
- break;
- case FCTYPE_MACSPC:
- proto_tree_add_item (docsis_tree, hf_docsis_machdr_fcparm, tvb, 0,
- 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (docsis_tree, hf_docsis_ehdron, tvb, 0, 1,
- ENC_BIG_ENDIAN);
- /* Decode for a Request Frame. No extended header */
- if (fcparm == 0x02)
- {
- proto_tree_add_uint (docsis_tree, hf_docsis_mini_slots, tvb, 1,
- 1, mac_parm);
- proto_tree_add_uint (docsis_tree, hf_docsis_sid, tvb, 2, 2,
- len_sid);
- proto_tree_add_item (docsis_tree, hf_docsis_hcs, tvb, 4, 2,
- ENC_BIG_ENDIAN);
- break;
- }
- /* Check if this is a fragmentation header */
- if (fcparm == 0x03)
- {
- isfrag = TRUE;
- }
- /* Decode for a Concatenated Header. No Extended Header */
- if (fcparm == 0x1c)
- {
- proto_item_append_text (ti, " (Concatenated Header)");
- proto_tree_add_item (docsis_tree, hf_docsis_concat_cnt, tvb, 1,
- 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (docsis_tree, hf_docsis_lensid, tvb, 2, 2,
- ENC_BIG_ENDIAN);
- proto_tree_add_item (docsis_tree, hf_docsis_hcs, tvb, 4, 2,
- ENC_BIG_ENDIAN);
- break;
- }
- /* If Extended header is present then decode it */
- if (ehdron == 0x01)
- {
- proto_tree_add_item (docsis_tree, hf_docsis_ehdrlen, tvb, 1, 1,
- ENC_BIG_ENDIAN);
- proto_tree_add_item (docsis_tree, hf_docsis_lensid, tvb, 2, 2,
- ENC_BIG_ENDIAN);
- dissect_ehdr (tvb, docsis_tree, isfrag);
- proto_tree_add_item (docsis_tree, hf_docsis_hcs, tvb,
- 4 + mac_parm, 2, ENC_BIG_ENDIAN);
- break;
- }
- /* default case for all other Mac Frame Types */
- proto_tree_add_item (docsis_tree, hf_docsis_macparm, tvb, 1, 1,
- ENC_BIG_ENDIAN);
- proto_tree_add_item (docsis_tree, hf_docsis_lensid, tvb, 2, 2,
- ENC_BIG_ENDIAN);
- proto_tree_add_item (docsis_tree, hf_docsis_hcs, tvb, 4, 2, ENC_BIG_ENDIAN);
- break;
+ case FCTYPE_PACKET:
+ case FCTYPE_ATMPDU:
+ case FCTYPE_RESRVD:
+ proto_tree_add_item (docsis_tree, hf_docsis_fcparm, tvb, 0, 1,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item (docsis_tree, hf_docsis_ehdron, tvb, 0, 1,
+ ENC_BIG_ENDIAN);
+ if (ehdron == 0x01)
+ {
+ proto_tree_add_item (docsis_tree, hf_docsis_ehdrlen, tvb, 1, 1,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item (docsis_tree, hf_docsis_lensid, tvb, 2, 2,
+ ENC_BIG_ENDIAN);
+ dissect_ehdr (tvb, docsis_tree, isfrag);
+ proto_tree_add_item (docsis_tree, hf_docsis_hcs, tvb,
+ 4 + mac_parm, 2, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ proto_tree_add_item (docsis_tree, hf_docsis_macparm, tvb, 1, 1,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item (docsis_tree, hf_docsis_lensid, tvb, 2, 2,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item (docsis_tree, hf_docsis_hcs, tvb, 4, 2,
+ ENC_BIG_ENDIAN);
+ }
+ break;
+ case FCTYPE_MACSPC:
+ proto_tree_add_item (docsis_tree, hf_docsis_machdr_fcparm, tvb, 0,
+ 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item (docsis_tree, hf_docsis_ehdron, tvb, 0, 1,
+ ENC_BIG_ENDIAN);
+ /* Decode for a Request Frame. No extended header */
+ if (fcparm == 0x02)
+ {
+ proto_tree_add_uint (docsis_tree, hf_docsis_mini_slots, tvb, 1,
+ 1, mac_parm);
+ proto_tree_add_uint (docsis_tree, hf_docsis_sid, tvb, 2, 2,
+ len_sid);
+ proto_tree_add_item (docsis_tree, hf_docsis_hcs, tvb, 4, 2,
+ ENC_BIG_ENDIAN);
+ break;
+ }
+ /* Check if this is a fragmentation header */
+ if (fcparm == 0x03)
+ {
+ isfrag = TRUE;
+ }
+ /* Decode for a Concatenated Header. No Extended Header */
+ if (fcparm == 0x1c)
+ {
+ proto_item_append_text (ti, " (Concatenated Header)");
+ proto_tree_add_item (docsis_tree, hf_docsis_concat_cnt, tvb, 1,
+ 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item (docsis_tree, hf_docsis_lensid, tvb, 2, 2,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item (docsis_tree, hf_docsis_hcs, tvb, 4, 2,
+ ENC_BIG_ENDIAN);
+ break;
+ }
+ /* If Extended header is present then decode it */
+ if (ehdron == 0x01)
+ {
+ proto_tree_add_item (docsis_tree, hf_docsis_ehdrlen, tvb, 1, 1,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item (docsis_tree, hf_docsis_lensid, tvb, 2, 2,
+ ENC_BIG_ENDIAN);
+ dissect_ehdr (tvb, docsis_tree, isfrag);
+ proto_tree_add_item (docsis_tree, hf_docsis_hcs, tvb,
+ 4 + mac_parm, 2, ENC_BIG_ENDIAN);
+ break;
+ }
+ /* default case for all other Mac Frame Types */
+ proto_tree_add_item (docsis_tree, hf_docsis_macparm, tvb, 1, 1,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item (docsis_tree, hf_docsis_lensid, tvb, 2, 2,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item (docsis_tree, hf_docsis_hcs, tvb, 4, 2, ENC_BIG_ENDIAN);
+ break;
}
}
-/* If this protocol has a sub-dissector call it here, see section 1.8 */
switch (fctype)
{
- case FCTYPE_PACKET:
- case FCTYPE_RESRVD:
- if (pdulen >= 0)
- {
- if (pdulen > 0)
- {
- next_tvb = tvb_new_subset (tvb, hdrlen, captured_length, pdulen);
- call_dissector (eth_withoutfcs_handle, next_tvb, pinfo, tree);
- }
- if (concatlen > 0)
- {
- concatlen = concatlen - framelen;
- concatpos += framelen;
- }
- }
- break;
- case FCTYPE_MACSPC:
- switch (fcparm)
- {
- case 0x00:
- case 0x01:
- if (pdulen > 0)
- {
- mgt_tvb = tvb_new_subset (tvb, hdrlen, captured_length, pdulen);
- call_dissector (docsis_mgmt_handle, mgt_tvb, pinfo, tree);
- }
- if (concatlen > 0)
- {
- concatlen = concatlen - framelen;
- concatpos += framelen;
- }
- break;
- case 0x02:
- /* Don't do anything for a Request Frame */
- break;
- case 0x03:
- /* For Fragmentation Frames simply dissect using the data
- * dissector as we don't handle them yet
- */
- if (pdulen > 0)
- {
- mgt_tvb = tvb_new_subset (tvb, hdrlen, captured_length, pdulen);
- call_dissector (data_handle, mgt_tvb, pinfo, tree);
- }
- if (concatlen > 0)
- {
- concatlen = concatlen - framelen;
- concatpos += framelen;
- }
- break;
- case 0x1c:
- /* call the docsis dissector on the same frame
- * to dissect DOCSIS frames within the concatenated
- * frame. concatpos and concatlen are declared
- * static and are decremented and incremented
- * respectively when the inner
- * docsis frames are dissected. */
- while (concatlen > 0)
- {
- oldconcatlen = concatlen;
- next_tvb = tvb_new_subset (tvb, concatpos, -1, concatlen);
- call_dissector (docsis_handle, next_tvb, pinfo, tree);
- if (oldconcatlen <= concatlen)
- THROW(ReportedBoundsError);
- }
- concatlen = 0;
- concatpos = 0;
- col_set_str(pinfo->cinfo, COL_INFO, "Concatenated Frame");
- break;
- }
- break;
+ case FCTYPE_PACKET:
+ case FCTYPE_RESRVD:
+ if (pdulen >= 0)
+ {
+ if (pdulen > 0)
+ {
+ next_tvb = tvb_new_subset (tvb, hdrlen, captured_length, pdulen);
+ call_dissector (eth_withoutfcs_handle, next_tvb, pinfo, tree);
+ }
+ if (concatlen > 0)
+ {
+ concatlen = concatlen - framelen;
+ concatpos += framelen;
+ }
+ }
+ break;
+ case FCTYPE_MACSPC:
+ switch (fcparm)
+ {
+ case 0x00:
+ case 0x01:
+ if (pdulen > 0)
+ {
+ mgt_tvb = tvb_new_subset (tvb, hdrlen, captured_length, pdulen);
+ call_dissector (docsis_mgmt_handle, mgt_tvb, pinfo, tree);
+ }
+ if (concatlen > 0)
+ {
+ concatlen = concatlen - framelen;
+ concatpos += framelen;
+ }
+ break;
+ case 0x02:
+ /* Don't do anything for a Request Frame */
+ break;
+ case 0x03:
+ /* For Fragmentation Frames simply dissect using the data
+ * dissector as we don't handle them yet
+ */
+ if (pdulen > 0)
+ {
+ mgt_tvb = tvb_new_subset (tvb, hdrlen, captured_length, pdulen);
+ call_dissector (data_handle, mgt_tvb, pinfo, tree);
+ }
+ if (concatlen > 0)
+ {
+ concatlen = concatlen - framelen;
+ concatpos += framelen;
+ }
+ break;
+ case 0x1c:
+ /* call the docsis dissector on the same frame
+ * to dissect DOCSIS frames within the concatenated
+ * frame. concatpos and concatlen are declared
+ * static and are decremented and incremented
+ * respectively when the inner
+ * docsis frames are dissected. */
+ while (concatlen > 0)
+ {
+ oldconcatlen = concatlen;
+ next_tvb = tvb_new_subset (tvb, concatpos, -1, concatlen);
+ call_dissector (docsis_handle, next_tvb, pinfo, tree);
+ if (oldconcatlen <= concatlen)
+ THROW(ReportedBoundsError);
+ }
+ concatlen = 0;
+ concatpos = 0;
+ col_set_str(pinfo->cinfo, COL_INFO, "Concatenated Frame");
+ break;
+ }
+ break;
}
}
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_fctype,
{"FCType", "docsis.fctype",
FT_UINT8, BASE_HEX, VALS (fctype_vals), 0xC0,
"Frame Control Type", HFILL}
- },
+ },
{&hf_docsis_fcparm,
{"FCParm", "docsis.fcparm",
FT_UINT8, BASE_DEC, NULL, 0x3E,
"Parameter Field", HFILL}
- },
+ },
{&hf_docsis_machdr_fcparm,
{"FCParm", "docsis.fcparm",
FT_UINT8, BASE_HEX, VALS (fcparm_vals), 0x3E,
"Parameter Field", HFILL}
- },
+ },
{&hf_docsis_ehdron,
{"EHDRON", "docsis.ehdron",
FT_BOOLEAN, 8, TFS (&ehdron_tfs), 0x01,
"Extended Header Presence", HFILL}
- },
+ },
{&hf_docsis_macparm,
{"MacParm", "docsis.macparm",
FT_UINT8, BASE_HEX, NULL, 0x0,
"Mac Parameter Field", HFILL}
- },
+ },
{&hf_docsis_concat_cnt,
{"Number of Concatenated Frames", "docsis.macparm",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_ehdrlen,
{"Extended Header Length (bytes)", "docsis.macparm",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Mac Parameter Field", HFILL}
- },
+ },
{&hf_docsis_lensid,
{"Length after HCS (bytes)", "docsis.lensid",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Length or SID", HFILL}
- },
+ },
{&hf_docsis_eh_type,
{"Type", "docsis.ehdr.type",
FT_UINT8, BASE_DEC, VALS (eh_type_vals), 0xF0,
"TLV Type", HFILL}
- },
+ },
{&hf_docsis_eh_len,
{"Length", "docsis.ehdr.len",
FT_UINT8, BASE_DEC, NULL, 0x0F,
"TLV Len", HFILL}
- },
+ },
{&hf_docsis_eh_val,
{"Value", "docsis.ehdr.value",
FT_BYTES, BASE_NONE, NULL, 0x0,
"TLV Value", HFILL}
- },
+ },
{&hf_docsis_frag_rsvd,
{"Reserved", "docsis.frag_rsvd",
FT_UINT8, BASE_DEC, NULL, 0xC0,
NULL, HFILL}
- },
+ },
{&hf_docsis_frag_first,
{"First Frame", "docsis.frag_first",
FT_BOOLEAN, 8, NULL, 0x20,
NULL, HFILL}
- },
+ },
{&hf_docsis_frag_last,
{"Last Frame", "docsis.frag_last",
FT_BOOLEAN, 8, NULL, 0x10,
NULL, HFILL}
- },
+ },
{&hf_docsis_frag_seq,
{"Fragmentation Sequence #", "docsis.frag_seq",
FT_UINT8, BASE_DEC, NULL, 0x0F,
"Fragmentation Sequence Number", HFILL}
- },
+ },
{&hf_docsis_sid,
{"SID", "docsis.ehdr.sid",
FT_UINT16, BASE_DEC, NULL, 0x3FFF,
"Service Identifier", HFILL}
- },
+ },
{&hf_docsis_said,
{"SAID", "docsis.ehdr.said",
FT_UINT16, BASE_DEC, NULL, 0x3FFF,
"Security Association Identifier", HFILL}
- },
+ },
{&hf_docsis_reserved,
{"Reserved", "docsis.ehdr.rsvd",
FT_UINT8, BASE_HEX, NULL, 0x3FFF,
"Reserved Byte", HFILL}
- },
+ },
{&hf_docsis_mini_slots,
{"MiniSlots", "docsis.ehdr.minislots",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Mini Slots Requested", HFILL}
- },
+ },
{&hf_docsis_key_seq,
{"Key Sequence", "docsis.ehdr.keyseq",
FT_UINT8, BASE_DEC, NULL, 0xF0,
NULL, HFILL}
- },
+ },
{&hf_docsis_ehdr_ver,
{"Version", "docsis.ehdr.ver",
FT_UINT8, BASE_DEC, NULL, 0x0F,
NULL, HFILL}
- },
+ },
{&hf_docsis_ehdr_phsi,
{"Payload Header Suppression Index", "docsis.ehdr.phsi",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_ehdr_qind,
{"Queue Indicator", "docsis.ehdr.qind",
FT_BOOLEAN, 8, TFS(&qind_tfs), 0x80,
NULL, HFILL}
- },
+ },
{&hf_docsis_ehdr_grants,
{"Active Grants", "docsis.ehdr.act_grants",
FT_UINT8, BASE_DEC, NULL, 0x7F,
NULL, HFILL}
- },
+ },
{&hf_docsis_ehdr_bpup2_key_seq,
{"Key Sequence", "docsis.ehdr.bpup2_keyseq",
FT_UINT8, BASE_DEC, NULL, 0xF0,
"NULL", HFILL}
- },
+ },
{&hf_docsis_ehdr_bpup2_ver,
{"Version", "docsis.ehdr.bpup2_ver",
FT_UINT8, BASE_DEC, NULL, 0x0F,
"NULL", HFILL}
- },
+ },
{&hf_docsis_ehdr_bpup2_bpi_en,
{"Encryption", "docsis.ehdr.bpup2_bpi_en",
FT_BOOLEAN, 8, TFS (&ena_dis_tfs), 0x80,
"BPI Enable", HFILL},
- },
+ },
{&hf_docsis_ehdr_bpup2_toggle_bit,
{"Toggle", "docsis.ehdr.bpup2_toggle_bit",
FT_BOOLEAN, 8, TFS (&odd_even_tfs), 0x40,
"NULL", HFILL},
- },
+ },
{&hf_docsis_ehdr_bpup2_sid,
{"SID", "docsis.ehdr.bpup2_sid",
FT_UINT16, BASE_DEC, NULL, 0x3FFF,
"Service Identifier", HFILL}
- },
+ },
{&hf_docsis_ehdr_ds_traffic_pri,
{"DS Traffic Priority", "docsis.ehdr.ds_traffic_pri",
FT_UINT8, BASE_DEC, NULL, 0xE0,
"NULL", HFILL}
- },
+ },
{&hf_docsis_ehdr_ds_seq_chg_cnt,
{"DS Sequence Change Count", "docsis.ehdr.ds_seq_chg_cnt",
FT_UINT8, BASE_DEC, NULL, 0x10,
"NULL", HFILL}
- },
+ },
{&hf_docsis_ehdr_ds_dsid,
{"DS DSID", "docsis.ehdr.ds_dsid",
FT_UINT32, BASE_DEC, NULL, 0x0FFFFF,
"NULL", HFILL}
- },
+ },
{&hf_docsis_ehdr_ds_pkt_seq_num,
{"DS Packet Sequence Number", "docsis.ehdr.ds_pkt_seq_num",
FT_UINT16, BASE_DEC, NULL, 0x0,
"NULL", HFILL}
- },
+ },
{&hf_docsis_hcs,
{"Header check sequence", "docsis.hcs",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL},
- },
+ },
{&hf_docsis_bpi_en,
{"Encryption", "docsis.bpi_en",
FT_BOOLEAN, 8, TFS (&ena_dis_tfs), 0x80,
"BPI Enable", HFILL},
- },
+ },
{&hf_docsis_toggle_bit,
{"Toggle", "docsis.toggle_bit",
FT_BOOLEAN, 8, TFS (&odd_even_tfs), 0x40,
NULL, HFILL},
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis,
&ett_ehdr,
@@ -808,21 +797,14 @@ proto_register_docsis (void)
FT_UINT8, BASE_DEC);
#endif
-/* Register the protocol name and description */
proto_docsis = proto_register_protocol ("DOCSIS 1.1", "DOCSIS", "docsis");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis", dissect_docsis, proto_docsis);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis (void)
{
@@ -834,3 +816,16 @@ proto_reg_handoff_docsis (void)
docsis_mgmt_handle = find_dissector ("docsis_mgmt");
eth_withoutfcs_handle = find_dissector ("eth_withoutfcs");
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-dpvreq.c b/plugins/docsis/packet-dpvreq.c
index 6356409fef..6b7f5a6b15 100644
--- a/plugins/docsis/packet-dpvreq.c
+++ b/plugins/docsis/packet-dpvreq.c
@@ -43,7 +43,7 @@ static int hf_docsis_dpvreq_ts_end = -1;
/* Initialize the subtree pointers */
static gint ett_docsis_dpvreq = -1;
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_dpvreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
@@ -56,120 +56,102 @@ dissect_dpvreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
dschan = tvb_get_guint8 (tvb, 2);
col_add_fstr (pinfo->cinfo, COL_INFO,
- "DOCSIS Path Verify Request: Transaction-Id = %u DS-Ch %d",
- transid, dschan);
+ "DOCSIS Path Verify Request: Transaction-Id = %u DS-Ch %d",
+ transid, dschan);
if (tree)
{
it =
- proto_tree_add_protocol_format (tree, proto_docsis_dpvreq, tvb, 0, -1,
- "DPV Request");
+ proto_tree_add_protocol_format (tree, proto_docsis_dpvreq, tvb, 0, -1,
+ "DPV Request");
dpvreq_tree = proto_item_add_subtree (it, ett_docsis_dpvreq);
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_tranid, tvb,
- 0, 2, ENC_BIG_ENDIAN);
+ 0, 2, ENC_BIG_ENDIAN);
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_dschan, tvb,
- 2, 1, ENC_BIG_ENDIAN);
+ 2, 1, ENC_BIG_ENDIAN);
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_flags, tvb,
- 3, 1, ENC_BIG_ENDIAN);
+ 3, 1, ENC_BIG_ENDIAN);
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_us_sf, tvb,
- 4, 4, ENC_BIG_ENDIAN);
+ 4, 4, ENC_BIG_ENDIAN);
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_n, tvb,
- 8, 2, ENC_BIG_ENDIAN);
+ 8, 2, ENC_BIG_ENDIAN);
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_start, tvb,
- 10, 1, ENC_BIG_ENDIAN);
+ 10, 1, ENC_BIG_ENDIAN);
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_end, tvb,
- 11, 1, ENC_BIG_ENDIAN);
+ 11, 1, ENC_BIG_ENDIAN);
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_ts_start, tvb,
- 12, 4, ENC_BIG_ENDIAN);
+ 12, 4, ENC_BIG_ENDIAN);
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_ts_end, tvb,
- 16, 4, ENC_BIG_ENDIAN);
+ 16, 4, ENC_BIG_ENDIAN);
}
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
void
proto_register_docsis_dpvreq (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_dpvreq_tranid,
{"Transaction Id", "docsis_dpvreq.tranid",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_dpvreq_dschan,
{"Downstream Channel ID", "docsis_dpvreq.dschan",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_dpvreq_flags,
{"Flags", "docsis_dpvreq.flags",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_dpvreq_us_sf,
{"Upstream Service Flow ID", "docsis_dpvreq.us_sf",
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_dpvreq_n,
{"N (Measurement avaraging factor)", "docsis_dpvreq.n",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_dpvreq_start,
{"Start Reference Point", "docsis_dpvreq.start",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_dpvreq_end,
{"End Reference Point", "docsis_dpvreq.end",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_dpvreq_ts_start,
{"Timestamp Start", "docsis_dpvreq.ts_start",
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_dpvreq_ts_end,
{"Timestamp End", "docsis_dpvreq.ts_end",
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_dpvreq,
};
-/* Register the protocol name and description */
proto_docsis_dpvreq =
proto_register_protocol ("DOCSIS Path Verify Request",
- "DOCSIS DPV-REQ", "docsis_dpvreq");
+ "DOCSIS DPV-REQ", "docsis_dpvreq");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_dpvreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_dpvreq", dissect_dpvreq, proto_docsis_dpvreq);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_dpvreq (void)
{
@@ -178,3 +160,16 @@ proto_reg_handoff_docsis_dpvreq (void)
docsis_dpvreq_handle = find_dissector ("docsis_dpvreq");
dissector_add_uint ("docsis_mgmt", 0x27, docsis_dpvreq_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-dpvrsp.c b/plugins/docsis/packet-dpvrsp.c
index db02c1f265..08f6ac1eb1 100644
--- a/plugins/docsis/packet-dpvrsp.c
+++ b/plugins/docsis/packet-dpvrsp.c
@@ -43,7 +43,7 @@ static int hf_docsis_dpvrsp_ts_end = -1;
/* Initialize the subtree pointers */
static gint ett_docsis_dpvrsp = -1;
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_dpvrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
@@ -53,123 +53,105 @@ dissect_dpvrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
guint8 dschan;
transid = tvb_get_ntohs (tvb, 0);
- dschan = tvb_get_guint8 (tvb, 2);
+ dschan = tvb_get_guint8 (tvb, 2);
col_add_fstr (pinfo->cinfo, COL_INFO,
- "DOCSIS Path Verify Response: Transaction-Id = %u DS-Ch %d",
- transid, dschan);
+ "DOCSIS Path Verify Response: Transaction-Id = %u DS-Ch %d",
+ transid, dschan);
if (tree)
{
it =
- proto_tree_add_protocol_format (tree, proto_docsis_dpvrsp, tvb, 0, -1,
- "DPV Response");
+ proto_tree_add_protocol_format (tree, proto_docsis_dpvrsp, tvb, 0, -1,
+ "DPV Response");
dpvrsp_tree = proto_item_add_subtree (it, ett_docsis_dpvrsp);
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_tranid, tvb,
- 0, 2, ENC_BIG_ENDIAN);
+ 0, 2, ENC_BIG_ENDIAN);
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_dschan, tvb,
- 2, 1, ENC_BIG_ENDIAN);
+ 2, 1, ENC_BIG_ENDIAN);
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_flags, tvb,
- 3, 1, ENC_BIG_ENDIAN);
+ 3, 1, ENC_BIG_ENDIAN);
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_us_sf, tvb,
- 4, 4, ENC_BIG_ENDIAN);
+ 4, 4, ENC_BIG_ENDIAN);
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_n, tvb,
- 8, 2, ENC_BIG_ENDIAN);
+ 8, 2, ENC_BIG_ENDIAN);
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_start, tvb,
- 10, 1, ENC_BIG_ENDIAN);
+ 10, 1, ENC_BIG_ENDIAN);
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_end, tvb,
- 11, 1, ENC_BIG_ENDIAN);
+ 11, 1, ENC_BIG_ENDIAN);
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_ts_start, tvb,
- 12, 4, ENC_BIG_ENDIAN);
+ 12, 4, ENC_BIG_ENDIAN);
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_ts_end, tvb,
- 16, 4, ENC_BIG_ENDIAN);
+ 16, 4, ENC_BIG_ENDIAN);
}
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
void
proto_register_docsis_dpvrsp (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_dpvrsp_tranid,
{"Transaction Id", "docsis_dpvrsp.tranid",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_dpvrsp_dschan,
{"Downstream Channel ID", "docsis_dpvrsp.dschan",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_dpvrsp_flags,
{"Flags", "docsis_dpvrsp.flags",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_dpvrsp_us_sf,
{"Upstream Service Flow ID", "docsis_dpvrsp.us_sf",
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_dpvrsp_n,
{"N (Measurement avaraging factor)", "docsis_dpvrsp.n",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_dpvrsp_start,
{"Start Reference Point", "docsis_dpvrsp.start",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_dpvrsp_end,
{"End Reference Point", "docsis_dpvrsp.end",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_dpvrsp_ts_start,
{"Timestamp Start", "docsis_dpvrsp.ts_start",
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_dpvrsp_ts_end,
{"Timestamp End", "docsis_dpvrsp.ts_end",
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_dpvrsp,
};
-/* Register the protocol name and description */
proto_docsis_dpvrsp =
proto_register_protocol ("DOCSIS Path Verify Response",
- "DOCSIS DPV-RSP", "docsis_dpvrsp");
+ "DOCSIS DPV-RSP", "docsis_dpvrsp");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_dpvrsp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_dpvrsp", dissect_dpvrsp, proto_docsis_dpvrsp);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_dpvrsp (void)
{
@@ -178,3 +160,16 @@ proto_reg_handoff_docsis_dpvrsp (void)
docsis_dpvrsp_handle = find_dissector ("docsis_dpvrsp");
dissector_add_uint ("docsis_mgmt", 0x28, docsis_dpvrsp_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-dsaack.c b/plugins/docsis/packet-dsaack.c
index 575786ffcf..85cc0ddf41 100644
--- a/plugins/docsis/packet-dsaack.c
+++ b/plugins/docsis/packet-dsaack.c
@@ -34,17 +34,15 @@ static int hf_docsis_dsaack_tranid = -1;
static int hf_docsis_dsaack_response = -1;
static dissector_handle_t docsis_tlv_handle;
-
/* Initialize the subtree pointers */
static gint ett_docsis_dsaack = -1;
extern value_string docsis_conf_code[];
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_dsaack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
-
proto_item *it;
proto_tree *dsaack_tree = NULL;
guint16 transid;
@@ -55,19 +53,19 @@ dissect_dsaack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
response = tvb_get_guint8 (tvb, 2);
col_add_fstr (pinfo->cinfo, COL_INFO,
- "Dynamic Service Add Ack ID = %u (%s)", transid,
- val_to_str (response, docsis_conf_code, "%d"));
+ "Dynamic Service Add Ack ID = %u (%s)", transid,
+ val_to_str (response, docsis_conf_code, "%d"));
if (tree)
{
it =
- proto_tree_add_protocol_format (tree, proto_docsis_dsaack, tvb, 0, -1,
- "DSA Acknowledge");
+ proto_tree_add_protocol_format (tree, proto_docsis_dsaack, tvb, 0, -1,
+ "DSA Acknowledge");
dsaack_tree = proto_item_add_subtree (it, ett_docsis_dsaack);
proto_tree_add_item (dsaack_tree, hf_docsis_dsaack_tranid, tvb, 0, 2,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (dsaack_tree, hf_docsis_dsaack_response, tvb, 2, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
}
/* Call Dissector for Appendix C TLV's */
@@ -75,56 +73,37 @@ dissect_dsaack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
call_dissector (docsis_tlv_handle, next_tvb, pinfo, dsaack_tree);
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_dsaack (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_dsaack_tranid,
{"Transaction Id", "docsis_dsaack.tranid",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Service Identifier", HFILL}
- },
+ },
{&hf_docsis_dsaack_response,
{"Confirmation Code", "docsis_dsaack.confcode",
FT_UINT8, BASE_DEC, VALS (docsis_conf_code), 0x0,
NULL, HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_dsaack,
};
-/* Register the protocol name and description */
proto_docsis_dsaack =
proto_register_protocol ("DOCSIS Dynamic Service Addition Acknowledge",
- "DOCSIS DSA-ACK", "docsis_dsaack");
+ "DOCSIS DSA-ACK", "docsis_dsaack");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_dsaack, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_dsaack", dissect_dsaack, proto_docsis_dsaack);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_dsaack (void)
{
@@ -133,5 +112,17 @@ proto_reg_handoff_docsis_dsaack (void)
docsis_dsaack_handle = find_dissector ("docsis_dsaack");
docsis_tlv_handle = find_dissector ("docsis_tlv");
dissector_add_uint ("docsis_mgmt", 0x11, docsis_dsaack_handle);
-
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-dsareq.c b/plugins/docsis/packet-dsareq.c
index a3b4ec2bac..ecea28c28c 100644
--- a/plugins/docsis/packet-dsareq.c
+++ b/plugins/docsis/packet-dsareq.c
@@ -33,15 +33,13 @@ static int proto_docsis_dsareq = -1;
static int hf_docsis_dsareq_tranid = -1;
static dissector_handle_t docsis_tlv_handle;
-
/* Initialize the subtree pointers */
static gint ett_docsis_dsareq = -1;
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_dsareq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
-
proto_item *it;
proto_tree *dsareq_tree = NULL;
guint16 transid;
@@ -50,69 +48,49 @@ dissect_dsareq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
transid = tvb_get_ntohs (tvb, 0);
col_add_fstr (pinfo->cinfo, COL_INFO,
- "Dynamic Service Addition Request Tran-id = %u", transid);
+ "Dynamic Service Addition Request Tran-id = %u", transid);
if (tree)
{
it =
- proto_tree_add_protocol_format (tree, proto_docsis_dsareq, tvb, 0, -1,
- "DSA Request");
+ proto_tree_add_protocol_format (tree, proto_docsis_dsareq, tvb, 0, -1,
+ "DSA Request");
dsareq_tree = proto_item_add_subtree (it, ett_docsis_dsareq);
proto_tree_add_item (dsareq_tree, hf_docsis_dsareq_tranid, tvb, 0, 2,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
}
/* Call Dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 2);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, dsareq_tree);
-
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_dsareq (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_dsareq_tranid,
{"Transaction Id", "docsis_dsareq.tranid",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_dsareq,
};
-/* Register the protocol name and description */
proto_docsis_dsareq =
proto_register_protocol ("DOCSIS Dynamic Service Addition Request",
- "DOCSIS DSA-REQ", "docsis_dsareq");
+ "DOCSIS DSA-REQ", "docsis_dsareq");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_dsareq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_dsareq", dissect_dsareq, proto_docsis_dsareq);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_dsareq (void)
{
@@ -121,5 +99,17 @@ proto_reg_handoff_docsis_dsareq (void)
docsis_dsareq_handle = find_dissector ("docsis_dsareq");
docsis_tlv_handle = find_dissector ("docsis_tlv");
dissector_add_uint ("docsis_mgmt", 0x0F, docsis_dsareq_handle);
-
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-dsarsp.c b/plugins/docsis/packet-dsarsp.c
index 033a675bda..1a7c36f992 100644
--- a/plugins/docsis/packet-dsarsp.c
+++ b/plugins/docsis/packet-dsarsp.c
@@ -34,17 +34,15 @@ static int hf_docsis_dsarsp_tranid = -1;
static int hf_docsis_dsarsp_response = -1;
static dissector_handle_t docsis_tlv_handle;
-
/* Initialize the subtree pointers */
static gint ett_docsis_dsarsp = -1;
extern value_string docsis_conf_code[];
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_dsarsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
-
proto_item *it;
proto_tree *dsarsp_tree = NULL;
guint16 transid;
@@ -55,79 +53,57 @@ dissect_dsarsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
response = tvb_get_guint8 (tvb, 2);
col_add_fstr (pinfo->cinfo, COL_INFO,
- "Dynamic Service Add Response ID = %u (%s)", transid,
- val_to_str (response, docsis_conf_code, "%d"));
+ "Dynamic Service Add Response ID = %u (%s)", transid,
+ val_to_str (response, docsis_conf_code, "%d"));
if (tree)
{
it =
- proto_tree_add_protocol_format (tree, proto_docsis_dsarsp, tvb, 0, -1,
- "DSA Response");
+ proto_tree_add_protocol_format (tree, proto_docsis_dsarsp, tvb, 0, -1,
+ "DSA Response");
dsarsp_tree = proto_item_add_subtree (it, ett_docsis_dsarsp);
proto_tree_add_item (dsarsp_tree, hf_docsis_dsarsp_tranid, tvb, 0, 2,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (dsarsp_tree, hf_docsis_dsarsp_response, tvb, 2, 1,
- ENC_BIG_ENDIAN);
-
+ ENC_BIG_ENDIAN);
}
+
/* Call dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 3);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, dsarsp_tree);
-
-
-
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_dsarsp (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_dsarsp_tranid,
{"Transaction Id", "docsis_dsarsp.tranid",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Service Identifier", HFILL}
- },
+ },
{&hf_docsis_dsarsp_response,
{"Confirmation Code", "docsis_dsarsp.confcode",
FT_UINT8, BASE_DEC, VALS (docsis_conf_code), 0x0,
NULL, HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_dsarsp,
};
-/* Register the protocol name and description */
proto_docsis_dsarsp =
proto_register_protocol ("DOCSIS Dynamic Service Addition Response",
- "DOCSIS DSA-RSP", "docsis_dsarsp");
+ "DOCSIS DSA-RSP", "docsis_dsarsp");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_dsarsp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_dsarsp", dissect_dsarsp, proto_docsis_dsarsp);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_dsarsp (void)
{
@@ -138,3 +114,16 @@ proto_reg_handoff_docsis_dsarsp (void)
dissector_add_uint ("docsis_mgmt", 0x10, docsis_dsarsp_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-dscack.c b/plugins/docsis/packet-dscack.c
index 68ffc68f35..3ab6ac8e92 100644
--- a/plugins/docsis/packet-dscack.c
+++ b/plugins/docsis/packet-dscack.c
@@ -34,17 +34,15 @@ static int hf_docsis_dscack_tranid = -1;
static int hf_docsis_dscack_response = -1;
static dissector_handle_t docsis_tlv_handle;
-
/* Initialize the subtree pointers */
static gint ett_docsis_dscack = -1;
extern value_string docsis_conf_code[];
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_dscack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
-
proto_item *it;
proto_tree *dscack_tree = NULL;
guint16 transid;
@@ -55,78 +53,56 @@ dissect_dscack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
response = tvb_get_guint8 (tvb, 2);
col_add_fstr (pinfo->cinfo, COL_INFO,
- "Dynamic Service Change Ack ID = %u (%s)", transid,
- val_to_str (response, docsis_conf_code, "%d"));
+ "Dynamic Service Change Ack ID = %u (%s)", transid,
+ val_to_str (response, docsis_conf_code, "%d"));
if (tree)
{
it =
- proto_tree_add_protocol_format (tree, proto_docsis_dscack, tvb, 0, -1,
- "DSC Acknowledge");
+ proto_tree_add_protocol_format (tree, proto_docsis_dscack, tvb, 0, -1,
+ "DSC Acknowledge");
dscack_tree = proto_item_add_subtree (it, ett_docsis_dscack);
proto_tree_add_item (dscack_tree, hf_docsis_dscack_tranid, tvb, 0, 2,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (dscack_tree, hf_docsis_dscack_response, tvb, 2, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
}
/* Call Dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 3);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, dscack_tree);
-
-
-
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_dscack (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_dscack_tranid,
{"Transaction Id", "docsis_dscack.tranid",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Service Identifier", HFILL}
- },
+ },
{&hf_docsis_dscack_response,
{"Confirmation Code", "docsis_dscack.confcode",
FT_UINT8, BASE_DEC, VALS (docsis_conf_code), 0x0,
NULL, HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_dscack,
};
-/* Register the protocol name and description */
proto_docsis_dscack =
proto_register_protocol ("DOCSIS Dynamic Service Change Acknowledgement",
- "DOCSIS DSC-ACK", "docsis_dscack");
+ "DOCSIS DSC-ACK", "docsis_dscack");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_dscack, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_dscack", dissect_dscack, proto_docsis_dscack);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_dscack (void)
{
@@ -135,5 +111,17 @@ proto_reg_handoff_docsis_dscack (void)
docsis_dscack_handle = find_dissector ("docsis_dscack");
docsis_tlv_handle = find_dissector ("docsis_tlv");
dissector_add_uint ("docsis_mgmt", 0x14, docsis_dscack_handle);
-
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-dscreq.c b/plugins/docsis/packet-dscreq.c
index 8e746649ac..357df0b2b0 100644
--- a/plugins/docsis/packet-dscreq.c
+++ b/plugins/docsis/packet-dscreq.c
@@ -33,87 +33,64 @@ static int proto_docsis_dscreq = -1;
static int hf_docsis_dscreq_tranid = -1;
static dissector_handle_t docsis_tlv_handle;
-
/* Initialize the subtree pointers */
static gint ett_docsis_dscreq = -1;
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_dscreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
-
proto_item *it;
proto_tree *dscreq_tree = NULL;
guint16 transid;
tvbuff_t *next_tvb;
-
transid = tvb_get_ntohs (tvb, 0);
col_add_fstr (pinfo->cinfo, COL_INFO,
- "Dynamic Service Change Request Tran-id = %u", transid);
+ "Dynamic Service Change Request Tran-id = %u", transid);
if (tree)
{
it =
- proto_tree_add_protocol_format (tree, proto_docsis_dscreq, tvb, 0, -1,
- "DSC Request");
+ proto_tree_add_protocol_format (tree, proto_docsis_dscreq, tvb, 0, -1,
+ "DSC Request");
dscreq_tree = proto_item_add_subtree (it, ett_docsis_dscreq);
proto_tree_add_item (dscreq_tree, hf_docsis_dscreq_tranid, tvb, 0, 2,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
}
/* Call dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 2);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, dscreq_tree);
-
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_dscreq (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_dscreq_tranid,
{"Transaction Id", "docsis_dscreq.tranid",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_dscreq,
};
-/* Register the protocol name and description */
proto_docsis_dscreq =
proto_register_protocol ("DOCSIS Dynamic Service Change Request",
- "DOCSIS DSC-REQ", "docsis_dscreq");
+ "DOCSIS DSC-REQ", "docsis_dscreq");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_dscreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_dscreq", dissect_dscreq, proto_docsis_dscreq);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_dscreq (void)
{
@@ -122,5 +99,17 @@ proto_reg_handoff_docsis_dscreq (void)
docsis_dscreq_handle = find_dissector ("docsis_dscreq");
docsis_tlv_handle = find_dissector ("docsis_tlv");
dissector_add_uint ("docsis_mgmt", 0x12, docsis_dscreq_handle);
-
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-dscrsp.c b/plugins/docsis/packet-dscrsp.c
index 657b287a88..2f239b311e 100644
--- a/plugins/docsis/packet-dscrsp.c
+++ b/plugins/docsis/packet-dscrsp.c
@@ -34,41 +34,38 @@ static int hf_docsis_dscrsp_tranid = -1;
static int hf_docsis_dscrsp_response = -1;
static dissector_handle_t docsis_tlv_handle;
-
/* Initialize the subtree pointers */
static gint ett_docsis_dscrsp = -1;
extern value_string docsis_conf_code[];
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_dscrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
-
proto_item *it;
proto_tree *dscrsp_tree = NULL;
guint16 transid;
guint8 response;
tvbuff_t *next_tvb;
-
transid = tvb_get_ntohs (tvb, 0);
response = tvb_get_guint8 (tvb, 2);
col_add_fstr (pinfo->cinfo, COL_INFO,
- "Dynamic Service Change Response ID = %u (%s)", transid,
- val_to_str (response, docsis_conf_code, "%d"));
+ "Dynamic Service Change Response ID = %u (%s)", transid,
+ val_to_str (response, docsis_conf_code, "%d"));
if (tree)
{
it =
- proto_tree_add_protocol_format (tree, proto_docsis_dscrsp, tvb, 0, -1,
- "DSC Response");
+ proto_tree_add_protocol_format (tree, proto_docsis_dscrsp, tvb, 0, -1,
+ "DSC Response");
dscrsp_tree = proto_item_add_subtree (it, ett_docsis_dscrsp);
proto_tree_add_item (dscrsp_tree, hf_docsis_dscrsp_tranid, tvb, 0, 2,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (dscrsp_tree, hf_docsis_dscrsp_response, tvb, 2, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
}
/* Call Dissector for Appendix C TLV's */
@@ -76,56 +73,37 @@ dissect_dscrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
call_dissector (docsis_tlv_handle, next_tvb, pinfo, dscrsp_tree);
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_dscrsp (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_dscrsp_tranid,
{"Transaction Id", "docsis_dscrsp.tranid",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Service Identifier", HFILL}
- },
+ },
{&hf_docsis_dscrsp_response,
{"Confirmation Code", "docsis_dscrsp.confcode",
FT_UINT8, BASE_DEC, VALS (docsis_conf_code), 0x0,
NULL, HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_dscrsp,
};
-/* Register the protocol name and description */
proto_docsis_dscrsp =
proto_register_protocol ("DOCSIS Dynamic Service Change Response",
- "DOCSIS DSC-RSP", "docsis_dscrsp");
+ "DOCSIS DSC-RSP", "docsis_dscrsp");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_dscrsp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_dscrsp", dissect_dscrsp, proto_docsis_dscrsp);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_dscrsp (void)
{
@@ -136,3 +114,16 @@ proto_reg_handoff_docsis_dscrsp (void)
dissector_add_uint ("docsis_mgmt", 0x13, docsis_dscrsp_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-dsdreq.c b/plugins/docsis/packet-dsdreq.c
index a0d4e5cdb0..e84d773ac4 100644
--- a/plugins/docsis/packet-dsdreq.c
+++ b/plugins/docsis/packet-dsdreq.c
@@ -36,15 +36,13 @@ static int hf_docsis_dsdreq_sfid = -1;
static dissector_handle_t docsis_tlv_handle;
-
/* Initialize the subtree pointers */
static gint ett_docsis_dsdreq = -1;
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_dsdreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
-
proto_item *it;
proto_tree *dsdreq_tree = NULL;
guint16 transid;
@@ -53,81 +51,62 @@ dissect_dsdreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
transid = tvb_get_ntohs (tvb, 0);
col_add_fstr (pinfo->cinfo, COL_INFO,
- "Dynamic Service Delete Request Tran-id = %u", transid);
+ "Dynamic Service Delete Request Tran-id = %u", transid);
if (tree)
{
it =
- proto_tree_add_protocol_format (tree, proto_docsis_dsdreq, tvb, 0, -1,
- "DSD Request");
+ proto_tree_add_protocol_format (tree, proto_docsis_dsdreq, tvb, 0, -1,
+ "DSD Request");
dsdreq_tree = proto_item_add_subtree (it, ett_docsis_dsdreq);
proto_tree_add_item (dsdreq_tree, hf_docsis_dsdreq_tranid, tvb, 0, 2,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (dsdreq_tree, hf_docsis_dsdreq_rsvd, tvb, 2, 2,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (dsdreq_tree, hf_docsis_dsdreq_sfid, tvb, 4, 4,
- ENC_BIG_ENDIAN);
-
+ ENC_BIG_ENDIAN);
}
+
/* Call Dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 8);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, dsdreq_tree);
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_dsdreq (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_dsdreq_tranid,
{"Transaction Id", "docsis_dsdreq.tranid",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_dsdreq_rsvd,
{"Reserved", "docsis_dsdreq.rsvd",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_dsdreq_sfid,
{"Service Flow ID", "docsis_dsdreq.sfid",
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_dsdreq,
};
-/* Register the protocol name and description */
proto_docsis_dsdreq =
proto_register_protocol ("DOCSIS Dynamic Service Delete Request",
- "DOCSIS DSD-REQ", "docsis_dsdreq");
+ "DOCSIS DSD-REQ", "docsis_dsdreq");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_dsdreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_dsdreq", dissect_dsdreq, proto_docsis_dsdreq);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_dsdreq (void)
{
@@ -136,5 +115,17 @@ proto_reg_handoff_docsis_dsdreq (void)
docsis_dsdreq_handle = find_dissector ("docsis_dsdreq");
docsis_tlv_handle = find_dissector ("docsis_tlv");
dissector_add_uint ("docsis_mgmt", 0x15, docsis_dsdreq_handle);
-
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-dsdrsp.c b/plugins/docsis/packet-dsdrsp.c
index 826de6a676..14e7471169 100644
--- a/plugins/docsis/packet-dsdrsp.c
+++ b/plugins/docsis/packet-dsdrsp.c
@@ -39,11 +39,10 @@ extern value_string docsis_conf_code[];
/* Initialize the subtree pointers */
static gint ett_docsis_dsdrsp = -1;
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_dsdrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
-
proto_item *it;
proto_tree *dsdrsp_tree;
guint16 tranid;
@@ -53,80 +52,61 @@ dissect_dsdrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
confcode = tvb_get_guint8 (tvb, 2);
col_add_fstr (pinfo->cinfo, COL_INFO,
- "Dynamic Service Delete Response Tran id = %u (%s)",
- tranid, val_to_str (confcode, docsis_conf_code, "%d"));
+ "Dynamic Service Delete Response Tran id = %u (%s)",
+ tranid, val_to_str (confcode, docsis_conf_code, "%d"));
if (tree)
{
it =
- proto_tree_add_protocol_format (tree, proto_docsis_dsdrsp, tvb, 0, -1,
- "DSD Response");
+ proto_tree_add_protocol_format (tree, proto_docsis_dsdrsp, tvb, 0, -1,
+ "DSD Response");
dsdrsp_tree = proto_item_add_subtree (it, ett_docsis_dsdrsp);
proto_tree_add_item (dsdrsp_tree, hf_docsis_dsdrsp_tranid, tvb, 0, 2,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (dsdrsp_tree, hf_docsis_dsdrsp_confcode, tvb, 2, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (dsdrsp_tree, hf_docsis_dsdrsp_rsvd, tvb, 3, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
}
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_dsdrsp (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_dsdrsp_tranid,
{"Transaction Id", "docsis_dsdrsp.tranid",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_dsdrsp_confcode,
{"Confirmation Code", "docsis_dsdrsp.confcode",
FT_UINT8, BASE_DEC, VALS (docsis_conf_code), 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_dsdrsp_rsvd,
{"Reserved", "docsis_dsdrsp.rsvd",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_dsdrsp,
};
-/* Register the protocol name and description */
proto_docsis_dsdrsp =
proto_register_protocol ("DOCSIS Dynamic Service Delete Response",
- "DOCSIS DSD-RSP", "docsis_dsdrsp");
+ "DOCSIS DSD-RSP", "docsis_dsdrsp");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_dsdrsp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_dsdrsp", dissect_dsdrsp, proto_docsis_dsdrsp);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_dsdrsp (void)
{
@@ -136,3 +116,16 @@ proto_reg_handoff_docsis_dsdrsp (void)
dissector_add_uint ("docsis_mgmt", 0x16, docsis_dsdrsp_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-intrngreq.c b/plugins/docsis/packet-intrngreq.c
index 94a94a5d16..f3cae2eae9 100644
--- a/plugins/docsis/packet-intrngreq.c
+++ b/plugins/docsis/packet-intrngreq.c
@@ -25,7 +25,6 @@
#include <epan/packet.h>
-
/* Initialize the protocol and registered fields */
static int proto_docsis_intrngreq = -1;
static int hf_docsis_intrngreq_down_chid = -1;
@@ -38,7 +37,7 @@ void proto_reg_handoff_docsis_intrngreq(void);
/* Initialize the subtree pointers */
static gint ett_docsis_intrngreq = -1;
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_intrngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
@@ -53,77 +52,56 @@ dissect_intrngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
if (tree)
{
intrngreq_item =
- proto_tree_add_protocol_format (tree, proto_docsis_intrngreq, tvb, 0,
- tvb_length_remaining (tvb, 0),
- "Initial Ranging Request");
+ proto_tree_add_protocol_format (tree, proto_docsis_intrngreq, tvb, 0,
+ tvb_length_remaining (tvb, 0),
+ "Initial Ranging Request");
intrngreq_tree = proto_item_add_subtree (intrngreq_item, ett_docsis_intrngreq);
proto_tree_add_item (intrngreq_tree, hf_docsis_intrngreq_sid, tvb, 0, 2,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (intrngreq_tree, hf_docsis_intrngreq_down_chid, tvb, 2, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (intrngreq_tree, hf_docsis_intrngreq_up_chid, tvb, 3,
- 1, ENC_BIG_ENDIAN);
+ 1, ENC_BIG_ENDIAN);
}
-
-
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_intrngreq (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_intrngreq_sid,
{"Service Identifier", "docsis_intrngreq.sid",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_intrngreq_down_chid,
{"Downstream Channel ID", "docsis_intrngreq.downchid",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_intrngreq_up_chid,
{"Upstream Channel ID", "docsis_intrngreq.upchid",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_intrngreq,
};
-/* Register the protocol name and description */
proto_docsis_intrngreq = proto_register_protocol ("DOCSIS Initial Ranging Message",
- "DOCSIS INT-RNG-REQ",
- "docsis_intrngreq");
+ "DOCSIS INT-RNG-REQ",
+ "docsis_intrngreq");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_intrngreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_intrngreq", dissect_intrngreq, proto_docsis_intrngreq);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_intrngreq (void)
{
@@ -131,5 +109,17 @@ proto_reg_handoff_docsis_intrngreq (void)
docsis_intrngreq_handle = find_dissector ("docsis_intrngreq");
dissector_add_uint ("docsis_mgmt", 0x1E, docsis_intrngreq_handle);
-
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-macmgmt.c b/plugins/docsis/packet-macmgmt.c
index 8537ffbb5a..28b2578c31 100644
--- a/plugins/docsis/packet-macmgmt.c
+++ b/plugins/docsis/packet-macmgmt.c
@@ -93,72 +93,70 @@ static dissector_handle_t data_handle;
static gint ett_docsis_mgmt = -1;
static gint ett_mgmt_pay = -1;
-
static const value_string mgmt_type_vals[] = {
- {MGT_SYNC, "Timing Synchronisation"},
- {MGT_UCD, "Upstream Channel Descriptor"},
- {MGT_TYPE29UCD, "Upstream Channel Descriptor Type 29"},
- {MGT_TYPE35UCD, "Upstream Channel Descriptor Type 35"},
- {MGT_MAP, "Upstream Bandwidth Allocation"},
- {MGT_RNG_REQ, "Ranging Request"},
- {MGT_RNG_RSP, "Ranging Response"},
- {MGT_REG_REQ, "Registration Request"},
- {MGT_REG_RSP, "Registration Response"},
- {MGT_UCC_REQ, "Upstream Channel Change Request"},
- {MGT_UCC_RSP, "Upstream Channel Change Response"},
- {MGT_TRI_TCD, "Telephony Channel Descriptor"},
- {MGT_TRI_TSI, "Termination System Information"},
- {MGT_BPKM_REQ, "Privacy Key Management Request"},
- {MGT_BPKM_RSP, "Privacy Key Management Response"},
- {MGT_REG_ACK, "Registration Acknowledge"},
- {MGT_DSA_REQ, "Dynamic Service Addition Request"},
- {MGT_DSA_RSP, "Dynamic Service Addition Response"},
- {MGT_DSA_ACK, "Dynamic Service Addition Acknowledge"},
- {MGT_DSC_REQ, "Dynamic Service Change Request"},
- {MGT_DSC_RSP, "Dynamic Service Change Response"},
- {MGT_DSC_ACK, "Dynamic Service Change Acknowledge"},
- {MGT_DSD_REQ, "Dynamic Service Delete Request"},
- {MGT_DSD_RSP, "Dynamic Service Delete Response"},
- {MGT_DCC_REQ, "Dynamic Channel Change Request"},
- {MGT_DCC_RSP, "Dynamic Channel Change Response"},
- {MGT_DCC_ACK, "Dynamic Channel Change Acknowledge"},
- {MGT_DCI_REQ, "Device Class Identification Request"},
- {MGT_DCI_RSP, "Device Class Identification Response"},
- {MGT_UP_DIS, "Upstream Channel Disable"},
- {MGT_INIT_RNG_REQ, "Initial Ranging Request"},
- {MGT_TEST_REQ, "Test Request Message"},
- {MGT_DS_CH_DESC, "Downstream Channel Descriptor"},
- {MGT_MDD, "MAC Domain Descriptor"},
+ {MGT_SYNC, "Timing Synchronisation"},
+ {MGT_UCD, "Upstream Channel Descriptor"},
+ {MGT_TYPE29UCD, "Upstream Channel Descriptor Type 29"},
+ {MGT_TYPE35UCD, "Upstream Channel Descriptor Type 35"},
+ {MGT_MAP, "Upstream Bandwidth Allocation"},
+ {MGT_RNG_REQ, "Ranging Request"},
+ {MGT_RNG_RSP, "Ranging Response"},
+ {MGT_REG_REQ, "Registration Request"},
+ {MGT_REG_RSP, "Registration Response"},
+ {MGT_UCC_REQ, "Upstream Channel Change Request"},
+ {MGT_UCC_RSP, "Upstream Channel Change Response"},
+ {MGT_TRI_TCD, "Telephony Channel Descriptor"},
+ {MGT_TRI_TSI, "Termination System Information"},
+ {MGT_BPKM_REQ, "Privacy Key Management Request"},
+ {MGT_BPKM_RSP, "Privacy Key Management Response"},
+ {MGT_REG_ACK, "Registration Acknowledge"},
+ {MGT_DSA_REQ, "Dynamic Service Addition Request"},
+ {MGT_DSA_RSP, "Dynamic Service Addition Response"},
+ {MGT_DSA_ACK, "Dynamic Service Addition Acknowledge"},
+ {MGT_DSC_REQ, "Dynamic Service Change Request"},
+ {MGT_DSC_RSP, "Dynamic Service Change Response"},
+ {MGT_DSC_ACK, "Dynamic Service Change Acknowledge"},
+ {MGT_DSD_REQ, "Dynamic Service Delete Request"},
+ {MGT_DSD_RSP, "Dynamic Service Delete Response"},
+ {MGT_DCC_REQ, "Dynamic Channel Change Request"},
+ {MGT_DCC_RSP, "Dynamic Channel Change Response"},
+ {MGT_DCC_ACK, "Dynamic Channel Change Acknowledge"},
+ {MGT_DCI_REQ, "Device Class Identification Request"},
+ {MGT_DCI_RSP, "Device Class Identification Response"},
+ {MGT_UP_DIS, "Upstream Channel Disable"},
+ {MGT_INIT_RNG_REQ, "Initial Ranging Request"},
+ {MGT_TEST_REQ, "Test Request Message"},
+ {MGT_DS_CH_DESC, "Downstream Channel Descriptor"},
+ {MGT_MDD, "MAC Domain Descriptor"},
{MGT_B_INIT_RNG_REQ, "Bonded Initial Ranging Request"},
- {MGT_DBC_REQ, "Dynamic Bonding Change Request"},
- {MGT_DBC_RSP, "Dynamic Bonding Change Response"},
- {MGT_DBC_ACK, "Dynamic Bonding Change Acknowledge"},
- {MGT_DPV_REQ, "DOCSIS Path Verify Request"},
- {MGT_DPV_RSP, "DOCSIS Path Verify Response"},
- {MGT_CM_STATUS, "CM Status Report"},
- {MGT_CM_CTRL_REQ, "CM Control Request"},
- {MGT_CM_CTRL_RSP, "CM Control Response"},
- {MGT_REG_REQ_MP, "Multipart Registration Request"},
- {MGT_REG_RSP_MP, "Multipart Registration Response"},
+ {MGT_DBC_REQ, "Dynamic Bonding Change Request"},
+ {MGT_DBC_RSP, "Dynamic Bonding Change Response"},
+ {MGT_DBC_ACK, "Dynamic Bonding Change Acknowledge"},
+ {MGT_DPV_REQ, "DOCSIS Path Verify Request"},
+ {MGT_DPV_RSP, "DOCSIS Path Verify Response"},
+ {MGT_CM_STATUS, "CM Status Report"},
+ {MGT_CM_CTRL_REQ, "CM Control Request"},
+ {MGT_CM_CTRL_RSP, "CM Control Response"},
+ {MGT_REG_REQ_MP, "Multipart Registration Request"},
+ {MGT_REG_RSP_MP, "Multipart Registration Response"},
{0, NULL}
};
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_macmgmt (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
-
const guint8 *src, *dst;
guint16 msg_len;
proto_item *mgt_hdr_it;
proto_tree *mgt_hdr_tree;
tvbuff_t *payload_tvb;
guint8 type;
+
col_set_str (pinfo->cinfo, COL_PROTOCOL, "DOCSIS MGMT");
col_clear(pinfo->cinfo, COL_INFO);
-
src = tvb_get_ptr (tvb, 6, 6);
dst = tvb_get_ptr (tvb, 0, 6);
SET_ADDRESS (&pinfo->dl_src, AT_ETHER, 6, src);
@@ -190,7 +188,6 @@ dissect_macmgmt (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
ENC_BIG_ENDIAN);
proto_tree_add_item (mgt_hdr_tree, hf_docsis_mgt_rsvd, tvb, 19, 1,
ENC_BIG_ENDIAN);
-
}
/* Code to Call subdissector */
/* sub-dissectors are based on the type field */
@@ -205,69 +202,58 @@ dissect_macmgmt (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
call_dissector (data_handle, payload_tvb, pinfo, tree);
}
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_mgmt (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_mgt_dst_addr,
{"Destination Address", "docsis_mgmt.dst",
FT_ETHER, BASE_NONE, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_mgt_src_addr,
{"Source Address", "docsis_mgmt.src",
FT_ETHER, BASE_NONE, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_mgt_msg_len,
{"Message Length - DSAP to End (Bytes)", "docsis_mgmt.msglen",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Message Length", HFILL}
- },
+ },
{&hf_docsis_mgt_dsap,
{"DSAP [0x00]", "docsis_mgmt.dsap",
FT_UINT8, BASE_HEX, NULL, 0x0,
"Destination SAP", HFILL}
- },
+ },
{&hf_docsis_mgt_ssap,
{"SSAP [0x00]", "docsis_mgmt.ssap",
FT_UINT8, BASE_HEX, NULL, 0x0,
"Source SAP", HFILL}
- },
+ },
{&hf_docsis_mgt_control,
{"Control [0x03]", "docsis_mgmt.control",
FT_UINT8, BASE_HEX, NULL, 0x0,
"Control", HFILL}
- },
+ },
{&hf_docsis_mgt_version,
{"Version", "docsis_mgmt.version",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_mgt_type,
{"Type", "docsis_mgmt.type",
FT_UINT8, BASE_DEC, VALS (mgmt_type_vals), 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_mgt_rsvd,
{"Reserved [0x00]", "docsis_mgmt.rsvd",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Reserved", HFILL}
- },
-
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_mgmt,
&ett_mgmt_pay,
@@ -278,23 +264,16 @@ proto_register_docsis_mgmt (void)
FT_UINT8, BASE_DEC);
-/* Register the protocol name and description */
proto_docsis_mgmt = proto_register_protocol ("DOCSIS Mac Management",
"DOCSIS MAC MGMT",
"docsis_mgmt");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_mgmt, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_mgmt", dissect_macmgmt, proto_docsis_mgmt);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_mgmt (void)
{
@@ -307,3 +286,16 @@ proto_reg_handoff_docsis_mgmt (void)
data_handle = find_dissector ("data");
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-map.c b/plugins/docsis/packet-map.c
index a330b1f2ff..6e9343368a 100644
--- a/plugins/docsis/packet-map.c
+++ b/plugins/docsis/packet-map.c
@@ -86,188 +86,167 @@ dissect_map (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
ucd_count = tvb_get_guint8 (tvb, 1);
if (upchid > 0)
- col_add_fstr (pinfo->cinfo, COL_INFO,
- "Map Message: Channel ID = %u (U%u), UCD Count = %u, # IE's = %u",
- upchid, upchid - 1, ucd_count, numie);
+ col_add_fstr (pinfo->cinfo, COL_INFO,
+ "Map Message: Channel ID = %u (U%u), UCD Count = %u, # IE's = %u",
+ upchid, upchid - 1, ucd_count, numie);
else
- col_add_fstr (pinfo->cinfo, COL_INFO,
- "Map Message: Channel ID = %u (Telephony Return), UCD Count = %u, # IE's = %u",
- upchid, ucd_count, numie);
+ col_add_fstr (pinfo->cinfo, COL_INFO,
+ "Map Message: Channel ID = %u (Telephony Return), UCD Count = %u, # IE's = %u",
+ upchid, ucd_count, numie);
if (tree)
{
it =
- proto_tree_add_protocol_format (tree, proto_docsis_map, tvb, 0, -1,
- "MAP Message");
+ proto_tree_add_protocol_format (tree, proto_docsis_map, tvb, 0, -1,
+ "MAP Message");
map_tree = proto_item_add_subtree (it, ett_docsis_map);
proto_tree_add_item (map_tree, hf_docsis_map_upstream_chid, tvb, 0, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (map_tree, hf_docsis_map_ucd_count, tvb, 1, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (map_tree, hf_docsis_map_numie, tvb, 2, 1, ENC_BIG_ENDIAN);
proto_tree_add_item (map_tree, hf_docsis_map_rsvd, tvb, 3, 1, ENC_BIG_ENDIAN);
proto_tree_add_item (map_tree, hf_docsis_map_alloc_start, tvb, 4, 4,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (map_tree, hf_docsis_map_ack_time, tvb, 8, 4,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (map_tree, hf_docsis_map_rng_start, tvb, 12, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (map_tree, hf_docsis_map_rng_end, tvb, 13, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (map_tree, hf_docsis_map_data_start, tvb, 14, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (map_tree, hf_docsis_map_data_end, tvb, 15, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
pos = 16;
for (i = 0; i < numie; i++)
- {
- ie = tvb_get_ntohl (tvb, pos);
- mask = 0xFFFC0000;
- temp = (ie & mask);
- temp = temp >> 18;
- sid = (guint16) (temp & 0x3FFF);
- mask = 0x3C000;
- temp = (ie & mask);
- temp = temp >> 14;
- iuc = (guint8) (temp & 0x0F);
- mask = 0x3FFF;
- offset = (guint16) (ie & mask);
- item = proto_tree_add_item(map_tree, hf_docsis_map_sid, tvb, pos, 4, ENC_BIG_ENDIAN);
- PROTO_ITEM_SET_HIDDEN(item);
- item = proto_tree_add_item(map_tree, hf_docsis_map_iuc, tvb, pos, 4, ENC_BIG_ENDIAN);
- PROTO_ITEM_SET_HIDDEN(item);
- item = proto_tree_add_item(map_tree, hf_docsis_map_offset, tvb, pos, 4, ENC_BIG_ENDIAN);
- PROTO_ITEM_SET_HIDDEN(item);
- if (sid == 0x3FFF)
- proto_tree_add_uint_format (map_tree, hf_docsis_map_ie, tvb, pos, 4,
- ie, "SID = 0x%x (All CM's), IUC = %s, Offset = %u",
- sid, val_to_str (iuc, iuc_vals, "%d"),
- offset);
- else
- proto_tree_add_uint_format (map_tree, hf_docsis_map_ie, tvb, pos, 4,
- ie, "SID = %u, IUC = %s, Offset = %u",
- sid, val_to_str (iuc, iuc_vals, "%d"),
- offset);
- pos = pos + 4;
- } /* for... */
- } /* if(tree) */
-
-
+ {
+ ie = tvb_get_ntohl (tvb, pos);
+ mask = 0xFFFC0000;
+ temp = (ie & mask);
+ temp = temp >> 18;
+ sid = (guint16) (temp & 0x3FFF);
+ mask = 0x3C000;
+ temp = (ie & mask);
+ temp = temp >> 14;
+ iuc = (guint8) (temp & 0x0F);
+ mask = 0x3FFF;
+ offset = (guint16) (ie & mask);
+ item = proto_tree_add_item(map_tree, hf_docsis_map_sid, tvb, pos, 4, ENC_BIG_ENDIAN);
+ PROTO_ITEM_SET_HIDDEN(item);
+ item = proto_tree_add_item(map_tree, hf_docsis_map_iuc, tvb, pos, 4, ENC_BIG_ENDIAN);
+ PROTO_ITEM_SET_HIDDEN(item);
+ item = proto_tree_add_item(map_tree, hf_docsis_map_offset, tvb, pos, 4, ENC_BIG_ENDIAN);
+ PROTO_ITEM_SET_HIDDEN(item);
+ if (sid == 0x3FFF)
+ proto_tree_add_uint_format (map_tree, hf_docsis_map_ie, tvb, pos, 4,
+ ie, "SID = 0x%x (All CM's), IUC = %s, Offset = %u",
+ sid, val_to_str (iuc, iuc_vals, "%d"),
+ offset);
+ else
+ proto_tree_add_uint_format (map_tree, hf_docsis_map_ie, tvb, pos, 4,
+ ie, "SID = %u, IUC = %s, Offset = %u",
+ sid, val_to_str (iuc, iuc_vals, "%d"),
+ offset);
+ pos = pos + 4;
+ } /* for... */
+ } /* if(tree) */
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_map (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_map_ucd_count,
{"UCD Count", "docsis_map.ucdcount",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Map UCD Count", HFILL}
- },
+ },
{&hf_docsis_map_upstream_chid,
{"Upstream Channel ID", "docsis_map.upchid",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_map_numie,
{"Number of IE's", "docsis_map.numie",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Number of Information Elements", HFILL}
- },
+ },
{&hf_docsis_map_alloc_start,
{"Alloc Start Time (minislots)", "docsis_map.allocstart",
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_map_ack_time,
{"ACK Time (minislots)", "docsis_map.acktime",
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_map_rng_start,
{"Ranging Backoff Start", "docsis_map.rng_start",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_map_rng_end,
{"Ranging Backoff End", "docsis_map.rng_end",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_map_data_start,
{"Data Backoff Start", "docsis_map.data_start",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_map_data_end,
{"Data Backoff End", "docsis_map.data_end",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_map_ie,
{"Information Element", "docsis_map.ie",
FT_UINT32, BASE_HEX, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_map_rsvd,
{"Reserved [0x00]", "docsis_map.rsvd",
FT_UINT8, BASE_HEX, NULL, 0x0,
"Reserved Byte", HFILL}
- },
+ },
{&hf_docsis_map_sid,
{"Service Identifier", "docsis_map.sid",
FT_UINT32, BASE_DEC, NULL, 0xFFFC0000,
NULL, HFILL}
- },
+ },
{&hf_docsis_map_iuc,
{"Interval Usage Code", "docsis_map.iuc",
FT_UINT32, BASE_DEC, VALS(iuc_vals), 0x0003c000,
NULL, HFILL}
- },
+ },
{&hf_docsis_map_offset,
{"Offset", "docsis_map.offset",
FT_UINT32, BASE_DEC, NULL, 0x00003fff,
NULL, HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_map,
};
-/* Register the protocol name and description */
proto_docsis_map =
proto_register_protocol ("DOCSIS Upstream Bandwidth Allocation",
- "DOCSIS MAP", "docsis_map");
+ "DOCSIS MAP", "docsis_map");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_map, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_map", dissect_map, proto_docsis_map);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_map (void)
{
@@ -275,5 +254,17 @@ proto_reg_handoff_docsis_map (void)
docsis_map_handle = find_dissector ("docsis_map");
dissector_add_uint ("docsis_mgmt", 0x03, docsis_map_handle);
-
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-mdd.c b/plugins/docsis/packet-mdd.c
index 764d84aff3..0c5125bf55 100644
--- a/plugins/docsis/packet-mdd.c
+++ b/plugins/docsis/packet-mdd.c
@@ -135,102 +135,100 @@ void proto_register_docsis_mdd(void);
void proto_reg_handoff_docsis_mdd(void);
static const value_string J83_annex_vals[] = {
- {J83_ANNEX_A, "J.83 Annex A"},
- {J83_ANNEX_B, "J.83 Annex B"},
- {J83_ANNEX_C, "J.83 Annex C"},
- {0, NULL}
+ {J83_ANNEX_A, "J.83 Annex A"},
+ {J83_ANNEX_B, "J.83 Annex B"},
+ {J83_ANNEX_C, "J.83 Annex C"},
+ {0, NULL}
};
-
static const value_string modulation_order_vals[] = {
- {QAM64, "64 QAM"},
- {QAM256, "256 QAM"},
- {0, NULL}
+ {QAM64, "64 QAM"},
+ {QAM256, "256 QAM"},
+ {0, NULL}
};
static const value_string primary_capable_vals[] = {
- {NOT_PRIMARY_CAPABLE, "Channel is not primary-capable"},
- {PRIMARY_CAPABLE, "channel is primary-capable"},
- {0, NULL}
+ {NOT_PRIMARY_CAPABLE, "Channel is not primary-capable"},
+ {PRIMARY_CAPABLE, "channel is primary-capable"},
+ {0, NULL}
};
-
static const value_string mdd_tlv_vals[] = {
- {DOWNSTREAM_ACTIVE_CHANNEL_LIST, "Downstream Active Channel List"},
- {MAC_DOMAIN_DOWNSTREAM_SERVICE_GROUP, "Mac Domain Downstream Service Group"},
- {DOWNSTREAM_AMBIGUITY_RESOLUTION_FREQUENCY_LIST, "Downstream Ambiguity Resolution Frequency List "},
- {RECEIVE_CHANNEL_PROFILE_REPORTING_CONTROL , "Receive Channel Profile Reporting Control"},
- {IP_INITIALIZATION_PARAMETERS , "IP Initialization Parameters"},
- {EARLY_AUTHENTICATION_AND_ENCRYPTION , "Early Authentication and Encryption"},
- {UPSTREAM_ACTIVE_CHANNEL_LIST , "Upstream Active Channel List"},
- {UPSTREAM_AMBIGUITY_RESOLUTION_CHANNEL_LIST , "Upstream Ambiguity Resolution Channel List"},
- {UPSTREAM_FREQUENCY_RANGE , "Upstream Frequency Range"},
- {SYMBOL_CLOCK_LOCKING_INDICATOR , "Symbol Clock Locking Indicator"},
- {CM_STATUS_EVENT_CONTROL , "CM-STATUS Event Control"},
- {UPSTREAM_TRANSMIT_POWER_REPORTING , "Upstream Transmit Power Reporting"},
- {DSG_DA_TO_DSID_ASSOCIATION_ENTRY , "DSG DA-to-DSID Association Entry"},
- {CM_STATUS_EVENT_ENABLE_NON_CHANNEL_SPECIFIC_EVENTS , "CM-STATUS Event Enable for Non-Channel-Specific-Events"},
- {EXTENDED_UPSTREAM_TRANSMIT_POWER_SUPPORT , "Extended Upstream Transmit Power Support"},
- {0, NULL}
+ {DOWNSTREAM_ACTIVE_CHANNEL_LIST, "Downstream Active Channel List"},
+ {MAC_DOMAIN_DOWNSTREAM_SERVICE_GROUP, "Mac Domain Downstream Service Group"},
+ {DOWNSTREAM_AMBIGUITY_RESOLUTION_FREQUENCY_LIST, "Downstream Ambiguity Resolution Frequency List "},
+ {RECEIVE_CHANNEL_PROFILE_REPORTING_CONTROL , "Receive Channel Profile Reporting Control"},
+ {IP_INITIALIZATION_PARAMETERS , "IP Initialization Parameters"},
+ {EARLY_AUTHENTICATION_AND_ENCRYPTION , "Early Authentication and Encryption"},
+ {UPSTREAM_ACTIVE_CHANNEL_LIST , "Upstream Active Channel List"},
+ {UPSTREAM_AMBIGUITY_RESOLUTION_CHANNEL_LIST , "Upstream Ambiguity Resolution Channel List"},
+ {UPSTREAM_FREQUENCY_RANGE , "Upstream Frequency Range"},
+ {SYMBOL_CLOCK_LOCKING_INDICATOR , "Symbol Clock Locking Indicator"},
+ {CM_STATUS_EVENT_CONTROL , "CM-STATUS Event Control"},
+ {UPSTREAM_TRANSMIT_POWER_REPORTING , "Upstream Transmit Power Reporting"},
+ {DSG_DA_TO_DSID_ASSOCIATION_ENTRY , "DSG DA-to-DSID Association Entry"},
+ {CM_STATUS_EVENT_ENABLE_NON_CHANNEL_SPECIFIC_EVENTS , "CM-STATUS Event Enable for Non-Channel-Specific-Events"},
+ {EXTENDED_UPSTREAM_TRANSMIT_POWER_SUPPORT , "Extended Upstream Transmit Power Support"},
+ {0, NULL}
};
static const value_string rpc_center_frequency_spacing_vals[] = {
- {ASSUME_6MHZ_CENTER_FREQUENCY_SPACING , "CM MUST report only Receive Channel Profiles assuming 6 MHz center frequency spacing"},
- {ASSUME_8MHZ_CENTER_FREQUENCY_SPACING , "CM MUST report only Receive Channel Profiles assuming 8 MHz center frequency spacing"},
- {0, NULL}
+ {ASSUME_6MHZ_CENTER_FREQUENCY_SPACING , "CM MUST report only Receive Channel Profiles assuming 6 MHz center frequency spacing"},
+ {ASSUME_8MHZ_CENTER_FREQUENCY_SPACING , "CM MUST report only Receive Channel Profiles assuming 8 MHz center frequency spacing"},
+ {0, NULL}
};
static const value_string verbose_rpc_reporting_vals[] = {
- {RCP_NO_VERBOSE_REPORTING , "CM MUST NOT provide verbose reporting of all its Receive Channel Profile(s) (both standard profiles and manufacturers profiles)."},
- {RCP_VERBOSE_REPORTING , "CM MUST provide verbose reporting of Receive Channel Profile(s) (both standard profiles and manufacturers profiles)."},
- {0, NULL}
+ {RCP_NO_VERBOSE_REPORTING , "CM MUST NOT provide verbose reporting of all its Receive Channel Profile(s) (both standard profiles and manufacturers profiles)."},
+ {RCP_VERBOSE_REPORTING , "CM MUST provide verbose reporting of Receive Channel Profile(s) (both standard profiles and manufacturers profiles)."},
+ {0, NULL}
};
static const value_string ip_provisioning_mode_vals[] = {
- {IPv4_ONLY , "IPv4 Only"},
- {IPv6_ONLY , "IPv6 Only"},
- {IP_ALTERNATE, "Alternate"},
- {DUAL_STACK , "Dual Stack"},
- {0, NULL}
+ {IPv4_ONLY , "IPv4 Only"},
+ {IPv6_ONLY , "IPv6 Only"},
+ {IP_ALTERNATE, "Alternate"},
+ {DUAL_STACK , "Dual Stack"},
+ {0, NULL}
};
static const value_string eae_vals[] = {
- {EAE_DISABLED , "early authentication and encryption disabled"},
- {EAE_ENABLED , "early authentication and encryption enabled"},
- {0, NULL}
+ {EAE_DISABLED , "early authentication and encryption disabled"},
+ {EAE_ENABLED , "early authentication and encryption enabled"},
+ {0, NULL}
};
static const value_string upstream_frequency_range_vals[] = {
- {STANDARD_UPSTREAM_FREQUENCY_RANGE, "Standard Upstream Frequency Range"},
- {EXTENDED_UPSTREAM_FREQUENCY_RANGE, "Extended Upstream Frequency Range"},
- {0, NULL}
+ {STANDARD_UPSTREAM_FREQUENCY_RANGE, "Standard Upstream Frequency Range"},
+ {EXTENDED_UPSTREAM_FREQUENCY_RANGE, "Extended Upstream Frequency Range"},
+ {0, NULL}
};
static const value_string symbol_clock_locking_indicator_vals[] = {
- {NOT_LOCKED_TO_MASTER_CLOCK, "Symbol Clock is not locked to Master Clock"},
- {LOCKED_TO_MASTER_CLOCK, "Symbol Clock is locked to Master Clock"},
- {0, NULL}
+ {NOT_LOCKED_TO_MASTER_CLOCK, "Symbol Clock is not locked to Master Clock"},
+ {LOCKED_TO_MASTER_CLOCK, "Symbol Clock is locked to Master Clock"},
+ {0, NULL}
};
static const value_string symbol_cm_status_event_vals[] = {
- {SECONDARY_CHANNEL_MDD_TIMEOUT, "Secondary Channel MDD timeout"},
- {QAM_FEC_LOCK_FAILURE, "Qam FEC Lock Failure"},
- {SEQUENCE_OUT_OF_RANGE, "Sequence out of Range"},
- {MDD_RECOVERY, "MDD Recovery"},
- {QAM_FEC_LOCK_RECOVERY, "Qam FEC Lock Recovery"},
- {T4_TIMEOUT, "T4 Timeout"},
- {T3_RETRIES_EXCEEDED, "T3 Retries Exceeded"},
- {SUCCESFUL_RANGING_AFTER_T3_RETRIES_EXCEEDED, "Successful ranging after T3 Retries Exceeded"},
- {CM_OPERATING_ON_BATTERY_BACKUP, "CM Operating on Battery Backup"},
- {CM_RETURNED_TO_AC_POWER, "CM Returned to AC Power"},
- {0, NULL}
+ {SECONDARY_CHANNEL_MDD_TIMEOUT, "Secondary Channel MDD timeout"},
+ {QAM_FEC_LOCK_FAILURE, "Qam FEC Lock Failure"},
+ {SEQUENCE_OUT_OF_RANGE, "Sequence out of Range"},
+ {MDD_RECOVERY, "MDD Recovery"},
+ {QAM_FEC_LOCK_RECOVERY, "Qam FEC Lock Recovery"},
+ {T4_TIMEOUT, "T4 Timeout"},
+ {T3_RETRIES_EXCEEDED, "T3 Retries Exceeded"},
+ {SUCCESFUL_RANGING_AFTER_T3_RETRIES_EXCEEDED, "Successful ranging after T3 Retries Exceeded"},
+ {CM_OPERATING_ON_BATTERY_BACKUP, "CM Operating on Battery Backup"},
+ {CM_RETURNED_TO_AC_POWER, "CM Returned to AC Power"},
+ {0, NULL}
};
static const value_string upstream_transmit_power_reporting_vals[] = {
- {CM_DOESNT_REPORT_TRANSMIT_POWER, "CM does not report transmit power in RNG-REQ, INIT-RNG-REQ, and B-INIT-RNG-REQ messages"},
- {CM_REPORTS_TRANSMIT_POWER, "CM reports transmit power in RNG-REQ, INIT-RNG-REQ, and B-INIT-RNG-REQ messages"},
- {0, NULL}
+ {CM_DOESNT_REPORT_TRANSMIT_POWER, "CM does not report transmit power in RNG-REQ, INIT-RNG-REQ, and B-INIT-RNG-REQ messages"},
+ {CM_REPORTS_TRANSMIT_POWER, "CM reports transmit power in RNG-REQ, INIT-RNG-REQ, and B-INIT-RNG-REQ messages"},
+ {0, NULL}
};
/* Windows does not allow data copy between dlls */
@@ -295,475 +293,469 @@ static int hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_cm_r
static int hf_docsis_mdd_extended_upstream_transmit_power_support = -1;
-
/* Initialize the subtree pointers */
static gint ett_docsis_mdd = -1;
static gint ett_tlv = -1;
static gint ett_sub_tlv = -1;
+/* Dissection */
static void
dissect_mdd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
- proto_item *it;
- proto_tree *mdd_tree;
-
- int pos;
- int subpos = 0;
- gint len;
- guint8 type, length;
- guint8 subtype, sublength;
- int i;
-
- proto_tree *tlv_tree;
-
- proto_tree *tlv_sub_tree;
- proto_item *text_item;
-
-
- len = tvb_reported_length_remaining (tvb, 0);
-
- col_set_str(pinfo->cinfo, COL_INFO, "MDD Message:");
-
- if (tree)
- {
- it = proto_tree_add_protocol_format (tree, proto_docsis_mdd, tvb, 0, -1,"MDD Message");
- mdd_tree = proto_item_add_subtree (it, ett_docsis_mdd);
-
- proto_tree_add_item (mdd_tree, hf_docsis_mdd_ccc, tvb, 0, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (mdd_tree, hf_docsis_mdd_number_of_fragments, tvb, 1, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (mdd_tree, hf_docsis_mdd_fragment_sequence_number, tvb, 2, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (mdd_tree, hf_docsis_mdd_current_channel_dcid, tvb, 3, 1, ENC_BIG_ENDIAN);
-
- /*TLVs...*/
- pos = 4;
- while (pos < len)
- {
- type = tvb_get_guint8 (tvb, pos);
- length = tvb_get_guint8 (tvb, pos + 1);
- tlv_tree = proto_tree_add_subtree(mdd_tree, tvb, pos, length + 2, ett_tlv, NULL, val_to_str(type, mdd_tlv_vals, "Unknown TLV (%u)"));
-
- switch(type) {
-
- case DOWNSTREAM_ACTIVE_CHANNEL_LIST:
- subpos = pos + 2;
- while (subpos < pos + length + 2) {
- subtype = tvb_get_guint8 (tvb, subpos);
- sublength = tvb_get_guint8 (tvb, subpos + 1);
- switch(subtype) {
- case DOWNSTREAM_ACTIVE_CHANNEL_LIST_CHANNEL_ID:
- proto_tree_add_item (tlv_tree, hf_docsis_mdd_downstream_active_channel_list_channel_id, tvb, subpos + 2 , 1, ENC_BIG_ENDIAN);
- break;
- case DOWNSTREAM_ACTIVE_CHANNEL_LIST_FREQUENCY:
- proto_tree_add_item (tlv_tree, hf_docsis_mdd_downstream_active_channel_list_frequency, tvb, subpos + 2 , 4, ENC_BIG_ENDIAN);
- break;
- case DOWNSTREAM_ACTIVE_CHANNEL_LIST_MODULATION_ORDER_ANNEX:
- tlv_sub_tree = proto_tree_add_subtree(tlv_tree, tvb, subpos + 2, 1, ett_sub_tlv, NULL, "Modulation Order/Annex");
- proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_downstream_active_channel_list_modulation_order, tvb, subpos + 2 , 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_downstream_active_channel_list_annex, tvb, subpos + 2 , 1, ENC_BIG_ENDIAN);
- break;
- case DOWNSTREAM_ACTIVE_CHANNEL_LIST_PRIMARY_CAPABLE:
- proto_tree_add_item (tlv_tree, hf_docsis_mdd_downstream_active_channel_list_primary_capable, tvb, subpos + 2 , 1, ENC_BIG_ENDIAN);
- break;
- case DOWNSTREAM_ACTIVE_CHANNEL_LIST_CM_STATUS_EVENT_ENABLE_BITMASK:
- tlv_sub_tree = proto_tree_add_subtree(tlv_tree, tvb, subpos + 2, 2, ett_sub_tlv, NULL, "CM-STATUS Event Enable Bitmask");
- proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_cm_status_event_enable_bitmask_mdd_timeout, tvb, subpos + 2 , 2,ENC_BIG_ENDIAN);
- proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_cm_status_event_enable_bitmask_qam_fec_lock_failure, tvb, subpos + 2 , 2, ENC_BIG_ENDIAN);
- proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_cm_status_event_enable_bitmask_mdd_recovery, tvb, subpos + 2 , 2,ENC_BIG_ENDIAN);
- proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_cm_status_event_enable_bitmask_qam_fec_lock_recovery, tvb, subpos + 2 , 2, ENC_BIG_ENDIAN);
- break;
- }
- subpos += sublength + 2;
- }
- break;
- case MAC_DOMAIN_DOWNSTREAM_SERVICE_GROUP:
- subpos = pos + 2;
- while (subpos < pos + length + 2) {
- subtype = tvb_get_guint8 (tvb, subpos);
- sublength = tvb_get_guint8 (tvb, subpos + 1);
- switch(subtype) {
- case MAC_DOMAIN_DOWNSTREAM_SERVICE_GROUP_MD_DS_SG_IDENTIFIER:
- proto_tree_add_item (tlv_tree, hf_docsis_mdd_mac_domain_downstream_service_group_md_ds_sg_identifier, tvb, subpos + 2 , 1, ENC_BIG_ENDIAN);
- break;
- case MAC_DOMAIN_DOWNSTREAM_SERVICE_GROUP_CHANNEL_IDS:
- for (i = 0; i < sublength; i++) {
- proto_tree_add_item (tlv_tree, hf_docsis_mdd_mac_domain_downstream_service_group_channel_id, tvb, subpos + 2 + i , 1, ENC_BIG_ENDIAN);
- }
- break;
- }
- subpos += sublength + 2;
- }
- break;
- case DOWNSTREAM_AMBIGUITY_RESOLUTION_FREQUENCY_LIST:
- subpos = pos + 2;
- for (i = 0; i < length; i+=4) {
- proto_tree_add_item (tlv_tree, hf_docsis_mdd_downstream_ambiguity_resolution_frequency, tvb, subpos + i , 4, ENC_BIG_ENDIAN);
- }
- break;
- case RECEIVE_CHANNEL_PROFILE_REPORTING_CONTROL:
- subpos = pos + 2;
- while (subpos < pos + length + 2) {
- subtype = tvb_get_guint8 (tvb, subpos);
- sublength = tvb_get_guint8 (tvb, subpos + 1);
- switch(subtype) {
- case RCP_CENTER_FREQUENCY_SPACING:
- proto_tree_add_item (tlv_tree, hf_docsis_mdd_rpc_center_frequency_spacing, tvb, subpos + 2 , 1, ENC_BIG_ENDIAN);
- break;
- case VERBOSE_RCP_REPORTING:
- proto_tree_add_item (tlv_tree, hf_docsis_mdd_verbose_rcp_reporting, tvb, subpos + 2 , 1, ENC_BIG_ENDIAN);
- break;
- }
- subpos += sublength + 2;
- }
- break;
- case IP_INITIALIZATION_PARAMETERS:
- subpos = pos + 2;
- while (subpos < pos + length + 2) {
- subtype = tvb_get_guint8 (tvb, subpos);
- sublength = tvb_get_guint8 (tvb, subpos + 1);
- switch(subtype) {
- case IP_PROVISIONING_MODE:
- proto_tree_add_item (tlv_tree, hf_docsis_mdd_ip_provisioning_mode, tvb, subpos + 2 , 1, ENC_BIG_ENDIAN);
- break;
- case PRE_REGISTRATION_DSID:
- proto_tree_add_item (tlv_tree, hf_docsis_mdd_pre_registration_dsid, tvb, subpos + 2 , 3, ENC_BIG_ENDIAN);
- break;
- }
- subpos += sublength + 2;
- }
- break;
- case EARLY_AUTHENTICATION_AND_ENCRYPTION:
- subpos = pos + 2;
- proto_tree_add_item (tlv_tree, hf_docsis_mdd_early_authentication_and_encryption, tvb, subpos, 1, ENC_BIG_ENDIAN);
- break;
- case UPSTREAM_ACTIVE_CHANNEL_LIST:
- subpos = pos + 2;
- while (subpos < pos + length + 2) {
- subtype = tvb_get_guint8 (tvb, subpos);
- sublength = tvb_get_guint8 (tvb, subpos + 1);
- switch(subtype) {
- case UPSTREAM_ACTIVE_CHANNEL_LIST_UPSTREAM_CHANNEL_ID:
- proto_tree_add_item (tlv_tree, hf_docsis_mdd_upstream_active_channel_list_upstream_channel_id, tvb, subpos + 2 , 1, ENC_BIG_ENDIAN);
- break;
- case UPSTREAM_ACTIVE_CHANNEL_LIST_CM_STATUS_EVENT_ENABLE_BITMASK:
- tlv_sub_tree = proto_tree_add_subtree(tlv_tree, tvb, subpos + 2, 2, ett_sub_tlv, NULL, "CM-STATUS Event Enable Bitmask");
- proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_cm_status_event_enable_bitmask_t4_timeout, tvb, subpos + 2 , 2, ENC_BIG_ENDIAN);
- proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_cm_status_event_enable_bitmask_t3_retries_exceeded, tvb, subpos + 2 , 2, ENC_BIG_ENDIAN);
- proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_cm_status_event_enable_bitmask_successful_ranging_after_t3_retries_exceeded, tvb, subpos + 2 , 2, ENC_BIG_ENDIAN);
- break;
- }
- subpos += sublength + 2;
- }
- break;
- case UPSTREAM_AMBIGUITY_RESOLUTION_CHANNEL_LIST:
- sublength = tvb_get_guint8 (tvb, subpos + 1);
- for (i = 0; i < sublength; i++) {
- proto_tree_add_item (tlv_tree, hf_docsis_mdd_upstream_ambiguity_resolution_channel_list_channel_id, tvb, pos + 2 + i , 1, ENC_BIG_ENDIAN);
- }
- break;
- case UPSTREAM_FREQUENCY_RANGE:
- subpos = pos + 2;
- proto_tree_add_item (tlv_tree, hf_docsis_mdd_upstream_frequency_range, tvb, subpos, 1, ENC_BIG_ENDIAN);
- break;
- case SYMBOL_CLOCK_LOCKING_INDICATOR:
- subpos = pos + 2;
- proto_tree_add_item (tlv_tree, hf_docsis_mdd_symbol_clock_locking_indicator, tvb, subpos, 1, ENC_BIG_ENDIAN);
- break;
- case CM_STATUS_EVENT_CONTROL:
- subpos = pos + 2;
- while (subpos < pos + length + 2) {
- subtype = tvb_get_guint8 (tvb, subpos);
- sublength = tvb_get_guint8 (tvb, subpos + 1);
- switch(subtype) {
- case EVENT_TYPE_CODE:
- proto_tree_add_item (tlv_tree, hf_docsis_mdd_event_type, tvb, subpos+2, 1, ENC_BIG_ENDIAN);
- break;
- case MAXIMUM_EVENT_HOLDOFF_TIMER:
- text_item = proto_tree_add_item (tlv_tree, hf_docsis_mdd_maximum_event_holdoff_timer, tvb, subpos, 2, ENC_BIG_ENDIAN);
- proto_item_append_text(text_item, " (%d ms)", (256*tvb_get_guint8 (tvb, subpos) + tvb_get_guint8 (tvb, subpos + 1)) * 20);
- break;
- case MAXIMUM_NUMBER_OF_REPORTS_PER_EVENT:
- text_item = proto_tree_add_item (tlv_tree, hf_docsis_mdd_maximum_number_of_reports_per_event, tvb, subpos, 1, ENC_BIG_ENDIAN);
- if ( tvb_get_guint8 (tvb, subpos) == 0) {
- proto_item_append_text(text_item, " (Unlimited)");
- }
- break;
- }
- subpos += sublength + 2;
- }
- break;
- case UPSTREAM_TRANSMIT_POWER_REPORTING:
- subpos = pos + 2;
- proto_tree_add_item (tlv_tree, hf_docsis_mdd_upstream_transmit_power_reporting, tvb, subpos, 1, ENC_BIG_ENDIAN);
- break;
- case DSG_DA_TO_DSID_ASSOCIATION_ENTRY:
- subpos = pos + 2;
- while (subpos < pos + length + 2) {
- subtype = tvb_get_guint8 (tvb, subpos);
- sublength = tvb_get_guint8 (tvb, subpos + 1);
- switch(subtype) {
- case DSG_DA_TO_DSID_ASSOCIATION_DA:
- proto_tree_add_item (tlv_tree, hf_docsis_mdd_dsg_da_to_dsid_association_da, tvb, subpos + 2, 6, ENC_NA);
- break;
- case DSG_DA_TO_DSID_ASSOCIATION_DSID:
- proto_tree_add_item (tlv_tree, hf_docsis_mdd_dsg_da_to_dsid_association_dsid, tvb, subpos + 2, 3, ENC_BIG_ENDIAN);
- break;
- }
- subpos += sublength + 2;
- }
- break;
- case CM_STATUS_EVENT_ENABLE_NON_CHANNEL_SPECIFIC_EVENTS:
- subpos = pos + 2;
- tlv_sub_tree = proto_tree_add_subtree(tlv_tree, tvb, subpos, 2, ett_sub_tlv, NULL, "CM-STATUS Event Enable Bitmask for Non-Channel-Specific Events");
- proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_sequence_out_of_range, tvb, subpos, 2,ENC_BIG_ENDIAN);
- proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_cm_operating_on_battery_backup, tvb, subpos , 2,ENC_BIG_ENDIAN);
- proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_cm_returned_to_ac_power, tvb, subpos , 2,ENC_BIG_ENDIAN);
- break;
- case EXTENDED_UPSTREAM_TRANSMIT_POWER_SUPPORT:
- subpos = pos + 2;
- proto_tree_add_item (tlv_tree, hf_docsis_mdd_extended_upstream_transmit_power_support, tvb, subpos, 1, ENC_BIG_ENDIAN);
- break;
- }
- pos += length + 2;
- }
- } /* if(tree) */
+ proto_item *it;
+ proto_tree *mdd_tree;
+
+ int pos;
+ int subpos = 0;
+ gint len;
+ guint8 type, length;
+ guint8 subtype, sublength;
+ int i;
+
+ proto_tree *tlv_tree;
+
+ proto_tree *tlv_sub_tree;
+ proto_item *text_item;
+
+ len = tvb_reported_length_remaining (tvb, 0);
+
+ col_set_str(pinfo->cinfo, COL_INFO, "MDD Message:");
+
+ if (tree)
+ {
+ it = proto_tree_add_protocol_format (tree, proto_docsis_mdd, tvb, 0, -1,"MDD Message");
+ mdd_tree = proto_item_add_subtree (it, ett_docsis_mdd);
+
+ proto_tree_add_item (mdd_tree, hf_docsis_mdd_ccc, tvb, 0, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item (mdd_tree, hf_docsis_mdd_number_of_fragments, tvb, 1, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item (mdd_tree, hf_docsis_mdd_fragment_sequence_number, tvb, 2, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item (mdd_tree, hf_docsis_mdd_current_channel_dcid, tvb, 3, 1, ENC_BIG_ENDIAN);
+
+ /*TLVs...*/
+ pos = 4;
+ while (pos < len)
+ {
+ type = tvb_get_guint8 (tvb, pos);
+ length = tvb_get_guint8 (tvb, pos + 1);
+ tlv_tree = proto_tree_add_subtree(mdd_tree, tvb, pos, length + 2, ett_tlv, NULL, val_to_str(type, mdd_tlv_vals, "Unknown TLV (%u)"));
+
+ switch(type) {
+
+ case DOWNSTREAM_ACTIVE_CHANNEL_LIST:
+ subpos = pos + 2;
+ while (subpos < pos + length + 2) {
+ subtype = tvb_get_guint8 (tvb, subpos);
+ sublength = tvb_get_guint8 (tvb, subpos + 1);
+ switch(subtype) {
+ case DOWNSTREAM_ACTIVE_CHANNEL_LIST_CHANNEL_ID:
+ proto_tree_add_item (tlv_tree, hf_docsis_mdd_downstream_active_channel_list_channel_id, tvb, subpos + 2 , 1, ENC_BIG_ENDIAN);
+ break;
+ case DOWNSTREAM_ACTIVE_CHANNEL_LIST_FREQUENCY:
+ proto_tree_add_item (tlv_tree, hf_docsis_mdd_downstream_active_channel_list_frequency, tvb, subpos + 2 , 4, ENC_BIG_ENDIAN);
+ break;
+ case DOWNSTREAM_ACTIVE_CHANNEL_LIST_MODULATION_ORDER_ANNEX:
+ tlv_sub_tree = proto_tree_add_subtree(tlv_tree, tvb, subpos + 2, 1, ett_sub_tlv, NULL, "Modulation Order/Annex");
+ proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_downstream_active_channel_list_modulation_order, tvb, subpos + 2 , 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_downstream_active_channel_list_annex, tvb, subpos + 2 , 1, ENC_BIG_ENDIAN);
+ break;
+ case DOWNSTREAM_ACTIVE_CHANNEL_LIST_PRIMARY_CAPABLE:
+ proto_tree_add_item (tlv_tree, hf_docsis_mdd_downstream_active_channel_list_primary_capable, tvb, subpos + 2 , 1, ENC_BIG_ENDIAN);
+ break;
+ case DOWNSTREAM_ACTIVE_CHANNEL_LIST_CM_STATUS_EVENT_ENABLE_BITMASK:
+ tlv_sub_tree = proto_tree_add_subtree(tlv_tree, tvb, subpos + 2, 2, ett_sub_tlv, NULL, "CM-STATUS Event Enable Bitmask");
+ proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_cm_status_event_enable_bitmask_mdd_timeout, tvb, subpos + 2 , 2,ENC_BIG_ENDIAN);
+ proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_cm_status_event_enable_bitmask_qam_fec_lock_failure, tvb, subpos + 2 , 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_cm_status_event_enable_bitmask_mdd_recovery, tvb, subpos + 2 , 2,ENC_BIG_ENDIAN);
+ proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_cm_status_event_enable_bitmask_qam_fec_lock_recovery, tvb, subpos + 2 , 2, ENC_BIG_ENDIAN);
+ break;
+ }
+ subpos += sublength + 2;
+ }
+ break;
+ case MAC_DOMAIN_DOWNSTREAM_SERVICE_GROUP:
+ subpos = pos + 2;
+ while (subpos < pos + length + 2) {
+ subtype = tvb_get_guint8 (tvb, subpos);
+ sublength = tvb_get_guint8 (tvb, subpos + 1);
+ switch(subtype) {
+ case MAC_DOMAIN_DOWNSTREAM_SERVICE_GROUP_MD_DS_SG_IDENTIFIER:
+ proto_tree_add_item (tlv_tree, hf_docsis_mdd_mac_domain_downstream_service_group_md_ds_sg_identifier, tvb, subpos + 2 , 1, ENC_BIG_ENDIAN);
+ break;
+ case MAC_DOMAIN_DOWNSTREAM_SERVICE_GROUP_CHANNEL_IDS:
+ for (i = 0; i < sublength; i++) {
+ proto_tree_add_item (tlv_tree, hf_docsis_mdd_mac_domain_downstream_service_group_channel_id, tvb, subpos + 2 + i , 1, ENC_BIG_ENDIAN);
+ }
+ break;
+ }
+ subpos += sublength + 2;
+ }
+ break;
+ case DOWNSTREAM_AMBIGUITY_RESOLUTION_FREQUENCY_LIST:
+ subpos = pos + 2;
+ for (i = 0; i < length; i+=4) {
+ proto_tree_add_item (tlv_tree, hf_docsis_mdd_downstream_ambiguity_resolution_frequency, tvb, subpos + i , 4, ENC_BIG_ENDIAN);
+ }
+ break;
+ case RECEIVE_CHANNEL_PROFILE_REPORTING_CONTROL:
+ subpos = pos + 2;
+ while (subpos < pos + length + 2) {
+ subtype = tvb_get_guint8 (tvb, subpos);
+ sublength = tvb_get_guint8 (tvb, subpos + 1);
+ switch(subtype) {
+ case RCP_CENTER_FREQUENCY_SPACING:
+ proto_tree_add_item (tlv_tree, hf_docsis_mdd_rpc_center_frequency_spacing, tvb, subpos + 2 , 1, ENC_BIG_ENDIAN);
+ break;
+ case VERBOSE_RCP_REPORTING:
+ proto_tree_add_item (tlv_tree, hf_docsis_mdd_verbose_rcp_reporting, tvb, subpos + 2 , 1, ENC_BIG_ENDIAN);
+ break;
+ }
+ subpos += sublength + 2;
+ }
+ break;
+ case IP_INITIALIZATION_PARAMETERS:
+ subpos = pos + 2;
+ while (subpos < pos + length + 2) {
+ subtype = tvb_get_guint8 (tvb, subpos);
+ sublength = tvb_get_guint8 (tvb, subpos + 1);
+ switch(subtype) {
+ case IP_PROVISIONING_MODE:
+ proto_tree_add_item (tlv_tree, hf_docsis_mdd_ip_provisioning_mode, tvb, subpos + 2 , 1, ENC_BIG_ENDIAN);
+ break;
+ case PRE_REGISTRATION_DSID:
+ proto_tree_add_item (tlv_tree, hf_docsis_mdd_pre_registration_dsid, tvb, subpos + 2 , 3, ENC_BIG_ENDIAN);
+ break;
+ }
+ subpos += sublength + 2;
+ }
+ break;
+ case EARLY_AUTHENTICATION_AND_ENCRYPTION:
+ subpos = pos + 2;
+ proto_tree_add_item (tlv_tree, hf_docsis_mdd_early_authentication_and_encryption, tvb, subpos, 1, ENC_BIG_ENDIAN);
+ break;
+ case UPSTREAM_ACTIVE_CHANNEL_LIST:
+ subpos = pos + 2;
+ while (subpos < pos + length + 2) {
+ subtype = tvb_get_guint8 (tvb, subpos);
+ sublength = tvb_get_guint8 (tvb, subpos + 1);
+ switch(subtype) {
+ case UPSTREAM_ACTIVE_CHANNEL_LIST_UPSTREAM_CHANNEL_ID:
+ proto_tree_add_item (tlv_tree, hf_docsis_mdd_upstream_active_channel_list_upstream_channel_id, tvb, subpos + 2 , 1, ENC_BIG_ENDIAN);
+ break;
+ case UPSTREAM_ACTIVE_CHANNEL_LIST_CM_STATUS_EVENT_ENABLE_BITMASK:
+ tlv_sub_tree = proto_tree_add_subtree(tlv_tree, tvb, subpos + 2, 2, ett_sub_tlv, NULL, "CM-STATUS Event Enable Bitmask");
+ proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_cm_status_event_enable_bitmask_t4_timeout, tvb, subpos + 2 , 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_cm_status_event_enable_bitmask_t3_retries_exceeded, tvb, subpos + 2 , 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_cm_status_event_enable_bitmask_successful_ranging_after_t3_retries_exceeded, tvb, subpos + 2 , 2, ENC_BIG_ENDIAN);
+ break;
+ }
+ subpos += sublength + 2;
+ }
+ break;
+ case UPSTREAM_AMBIGUITY_RESOLUTION_CHANNEL_LIST:
+ sublength = tvb_get_guint8 (tvb, subpos + 1);
+ for (i = 0; i < sublength; i++) {
+ proto_tree_add_item (tlv_tree, hf_docsis_mdd_upstream_ambiguity_resolution_channel_list_channel_id, tvb, pos + 2 + i , 1, ENC_BIG_ENDIAN);
+ }
+ break;
+ case UPSTREAM_FREQUENCY_RANGE:
+ subpos = pos + 2;
+ proto_tree_add_item (tlv_tree, hf_docsis_mdd_upstream_frequency_range, tvb, subpos, 1, ENC_BIG_ENDIAN);
+ break;
+ case SYMBOL_CLOCK_LOCKING_INDICATOR:
+ subpos = pos + 2;
+ proto_tree_add_item (tlv_tree, hf_docsis_mdd_symbol_clock_locking_indicator, tvb, subpos, 1, ENC_BIG_ENDIAN);
+ break;
+ case CM_STATUS_EVENT_CONTROL:
+ subpos = pos + 2;
+ while (subpos < pos + length + 2) {
+ subtype = tvb_get_guint8 (tvb, subpos);
+ sublength = tvb_get_guint8 (tvb, subpos + 1);
+ switch(subtype) {
+ case EVENT_TYPE_CODE:
+ proto_tree_add_item (tlv_tree, hf_docsis_mdd_event_type, tvb, subpos+2, 1, ENC_BIG_ENDIAN);
+ break;
+ case MAXIMUM_EVENT_HOLDOFF_TIMER:
+ text_item = proto_tree_add_item (tlv_tree, hf_docsis_mdd_maximum_event_holdoff_timer, tvb, subpos, 2, ENC_BIG_ENDIAN);
+ proto_item_append_text(text_item, " (%d ms)", (256*tvb_get_guint8 (tvb, subpos) + tvb_get_guint8 (tvb, subpos + 1)) * 20);
+ break;
+ case MAXIMUM_NUMBER_OF_REPORTS_PER_EVENT:
+ text_item = proto_tree_add_item (tlv_tree, hf_docsis_mdd_maximum_number_of_reports_per_event, tvb, subpos, 1, ENC_BIG_ENDIAN);
+ if ( tvb_get_guint8 (tvb, subpos) == 0) {
+ proto_item_append_text(text_item, " (Unlimited)");
+ }
+ break;
+ }
+ subpos += sublength + 2;
+ }
+ break;
+ case UPSTREAM_TRANSMIT_POWER_REPORTING:
+ subpos = pos + 2;
+ proto_tree_add_item (tlv_tree, hf_docsis_mdd_upstream_transmit_power_reporting, tvb, subpos, 1, ENC_BIG_ENDIAN);
+ break;
+ case DSG_DA_TO_DSID_ASSOCIATION_ENTRY:
+ subpos = pos + 2;
+ while (subpos < pos + length + 2) {
+ subtype = tvb_get_guint8 (tvb, subpos);
+ sublength = tvb_get_guint8 (tvb, subpos + 1);
+ switch(subtype) {
+ case DSG_DA_TO_DSID_ASSOCIATION_DA:
+ proto_tree_add_item (tlv_tree, hf_docsis_mdd_dsg_da_to_dsid_association_da, tvb, subpos + 2, 6, ENC_NA);
+ break;
+ case DSG_DA_TO_DSID_ASSOCIATION_DSID:
+ proto_tree_add_item (tlv_tree, hf_docsis_mdd_dsg_da_to_dsid_association_dsid, tvb, subpos + 2, 3, ENC_BIG_ENDIAN);
+ break;
+ }
+ subpos += sublength + 2;
+ }
+ break;
+ case CM_STATUS_EVENT_ENABLE_NON_CHANNEL_SPECIFIC_EVENTS:
+ subpos = pos + 2;
+ tlv_sub_tree = proto_tree_add_subtree(tlv_tree, tvb, subpos, 2, ett_sub_tlv, NULL, "CM-STATUS Event Enable Bitmask for Non-Channel-Specific Events");
+ proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_sequence_out_of_range, tvb, subpos, 2,ENC_BIG_ENDIAN);
+ proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_cm_operating_on_battery_backup, tvb, subpos , 2,ENC_BIG_ENDIAN);
+ proto_tree_add_item (tlv_sub_tree, hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_cm_returned_to_ac_power, tvb, subpos , 2,ENC_BIG_ENDIAN);
+ break;
+ case EXTENDED_UPSTREAM_TRANSMIT_POWER_SUPPORT:
+ subpos = pos + 2;
+ proto_tree_add_item (tlv_tree, hf_docsis_mdd_extended_upstream_transmit_power_support, tvb, subpos, 1, ENC_BIG_ENDIAN);
+ break;
+ }
+ pos += length + 2;
+ }
+ } /* if(tree) */
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void proto_register_docsis_mdd (void)
{
- /* Setup list of header fields See Section 1.6.1 for details*/
- static hf_register_info hf[] = {
- {&hf_docsis_mdd_ccc,
- {"Configuration Change Count", "docsis_mdd.ccc",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Mdd Configuration Change Count", HFILL}
- },
- {&hf_docsis_mdd_number_of_fragments,
- {"Number of Fragments", "docsis_mdd.number_of_fragments",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Mdd Number of Fragments", HFILL}
- },
- {&hf_docsis_mdd_fragment_sequence_number,
- {"Fragment Sequence Number", "docsis_mdd.fragment_sequence_number",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Mdd Fragment Sequence Number", HFILL}
- },
- {&hf_docsis_mdd_current_channel_dcid,
- {"Current Channel DCID", "docsis_mdd.current_channel_dcid",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Mdd Current Channel DCID", HFILL}
- },
- {&hf_docsis_mdd_downstream_active_channel_list_channel_id,
- {"Channel ID", "docsis_mdd.downstream_active_channel_list_channel_id",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Mdd Downstream Active Channel List Channel ID", HFILL}
- },
- {&hf_docsis_mdd_downstream_active_channel_list_frequency,
- {"Frequency", "docsis_mdd.downstream_active_channel_list_frequency",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- "Mdd Downstream Active Channel List Frequency", HFILL}
- },
- {&hf_docsis_mdd_downstream_active_channel_list_annex,
- {"Annex", "docsis_mdd.downstream_active_channel_list_annex",
- FT_UINT8, BASE_DEC, VALS(J83_annex_vals), 0xF0,
- "Mdd Downstream Active Channel List Annex", HFILL}
- },
- {&hf_docsis_mdd_downstream_active_channel_list_modulation_order,
- {"Modulation Order", "docsis_mdd.downstream_active_channel_list_modulation_order",
- FT_UINT8, BASE_DEC, VALS(modulation_order_vals), 0x0F,
- "Mdd Downstream Active Channel List Modulation Order", HFILL}
- },
- {&hf_docsis_mdd_downstream_active_channel_list_primary_capable,
- {"Primary Capable", "docsis_mdd.downstream_active_channel_list_primary_capable",
- FT_UINT8, BASE_DEC, VALS(primary_capable_vals), 0x0,
- "Mdd Downstream Active Channel List Primary Capable", HFILL}
- },
- {&hf_docsis_mdd_cm_status_event_enable_bitmask_mdd_timeout,
- {"MDD Timeout", "docsis_mdd.downstream_active_channel_list_mdd_timeout",
- FT_UINT16, BASE_DEC, NULL, 0x0002,
- "Mdd Downstream Active Channel List MDD Timeout", HFILL}
- },
- {&hf_docsis_mdd_cm_status_event_enable_bitmask_qam_fec_lock_failure,
- {"QAM/FEC Lock Failure", "docsis_mdd.cm_status_event_enable_bitmask_qam_fec_lock_failure",
- FT_UINT16, BASE_DEC, NULL, 0x0004,
- "Mdd Downstream Active Channel List QAM/FEC Lock Failure", HFILL}
- },
- {&hf_docsis_mdd_cm_status_event_enable_bitmask_mdd_recovery,
- {"MDD Recovery", "docsis_mdd.cm_status_event_enable_bitmask_mdd_recovery",
- FT_UINT16, BASE_DEC, NULL, 0x0010,
- "CM-STATUS event MDD Recovery", HFILL}
- },
- {&hf_docsis_mdd_cm_status_event_enable_bitmask_qam_fec_lock_recovery,
- {"QAM/FEC Lock Recovery", "docsis_mdd.cm_status_event_enable_bitmask_qam_fec_lock_recovery",
- FT_UINT16, BASE_DEC, NULL, 0x0020,
- "CM-STATUS event QAM/FEC Lock Recovery", HFILL}
- },
- {&hf_docsis_mdd_cm_status_event_enable_bitmask_t4_timeout,
- {"T4 timeout", "docsis_mdd.cm_status_event_enable_bitmask_t4_timeout",
- FT_UINT16, BASE_DEC, NULL, 0x0040,
- "CM-STATUS event T4 timeout", HFILL}
- },
- {&hf_docsis_mdd_cm_status_event_enable_bitmask_t3_retries_exceeded,
- {"T3 Retries Exceeded", "docsis_mdd.cm_status_event_enable_bitmask_t3_retries_exceeded",
- FT_UINT16, BASE_DEC, NULL, 0x0080,
- "CM-STATUS event T3 Retries Exceeded", HFILL}
- },
- {&hf_docsis_mdd_cm_status_event_enable_bitmask_successful_ranging_after_t3_retries_exceeded,
- {"Successful Ranging after T3 Retries Exceeded", "docsis_mdd.cm_status_event_enable_bitmask_successful_ranging_after_t3_retries_exceeded",
- FT_UINT16, BASE_DEC, NULL, 0x0100,
- "CM-STATUS event Successful Ranging after T3 Retries Exceeded", HFILL}
- },
- {&hf_docsis_mdd_mac_domain_downstream_service_group_channel_id,
- {"Channel Id", "docsis_mdd.mac_domain_downstream_service_group_channel_id",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Mdd Mac Domain Downstream Service Group Channel Id", HFILL}
- },
- {&hf_docsis_mdd_mac_domain_downstream_service_group_md_ds_sg_identifier,
- {"MD-DS-SG Identifier", "docsis_mdd.mac_domain_downstream_service_group_md_ds_sg_identifier",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Mdd Mac Domain Downstream Service Group MD-DS-SG Identifier", HFILL}
- },
- {&hf_docsis_mdd_downstream_ambiguity_resolution_frequency,
- {"Frequency", "docsis_mdd.downstream_ambiguity_resolution_frequency",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- "Mdd Downstream Ambiguity Resolution frequency", HFILL}
- },
- {&hf_docsis_mdd_rpc_center_frequency_spacing,
- {"RPC Center Frequency Spacing", "docsis_mdd.rpc_center_frequency_spacing",
- FT_UINT8, BASE_DEC, VALS(rpc_center_frequency_spacing_vals), 0x0,
- "Mdd RPC Center Frequency Spacing", HFILL}
- },
- {&hf_docsis_mdd_verbose_rcp_reporting,
- {"Verbose RCP reporting", "docsis_mdd.verbose_rpc_reporting",
- FT_UINT8, BASE_DEC, VALS(verbose_rpc_reporting_vals), 0x0,
- "Mdd Verbose RPC Reporting", HFILL}
- },
- {&hf_docsis_mdd_ip_provisioning_mode,
- {"IP Provisioning Mode", "docsis_mdd.ip_provisioning_mode",
- FT_UINT8, BASE_DEC, VALS(ip_provisioning_mode_vals), 0x0,
- "Mdd IP Provisioning Mode", HFILL}
- },
- {&hf_docsis_mdd_pre_registration_dsid,
- {"Pre-registration DSID", "docsis_mdd.pre_registration_dsid",
- FT_UINT24, BASE_DEC, NULL, 0x0FFFFF,
- "Mdd Pre-registration DSID", HFILL}
- },
- {&hf_docsis_mdd_early_authentication_and_encryption,
- {"Early Authentication and Encryption", "docsis_mdd.early_authentication_and_encryption",
- FT_UINT8, BASE_DEC, VALS(eae_vals), 0x0,
- "Mdd Early Authentication and Encryption", HFILL}
- },
- {&hf_docsis_mdd_upstream_active_channel_list_upstream_channel_id,
- {"Upstream Channel Id", "docsis_mdd.upstream_active_channel_list_upstream_channel_id",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Mdd Upstream Active Channel List Upstream Channel Id", HFILL}
- },
- {&hf_docsis_mdd_upstream_ambiguity_resolution_channel_list_channel_id,
- {"Channel Id", "docsis_mdd.upstream_ambiguity_resolution_channel_list_channel_id",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Mdd Mac Domain Upstream Ambiguity Resolution Channel List Channel Id", HFILL}
- },
- {&hf_docsis_mdd_upstream_frequency_range,
- {"Upstream Frequency Range", "docsis_mdd.upstream_frequency_range",
- FT_UINT8, BASE_DEC, VALS(upstream_frequency_range_vals), 0x0,
- "Mdd Upstream Frequency Range", HFILL}
- },
- {&hf_docsis_mdd_symbol_clock_locking_indicator,
- {"Symbol Clock Locking Indicator", "docsis_mdd.symbol_clock_locking_indicator",
- FT_UINT8, BASE_DEC, VALS(symbol_clock_locking_indicator_vals), 0x0,
- "Mdd Symbol Clock Locking Indicator", HFILL}
- },
- {&hf_docsis_mdd_event_type,
- {"Event Type", "docsis_mdd.event_type",
- FT_UINT8, BASE_DEC, VALS(symbol_cm_status_event_vals), 0x0,
- "Mdd CM-STATUS Event Type", HFILL}
- },
- {&hf_docsis_mdd_maximum_event_holdoff_timer,
- {"Maximum Event Holdoff Timer (units of 20 ms)", "docsis_mdd.maximum_event_holdoff_timer",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- "Mdd Maximum Event Holdoff Timer", HFILL}
- },
- {&hf_docsis_mdd_maximum_number_of_reports_per_event,
- {"Maximum Number of Reports per Event", "docsis_mdd.maximum_number_of_reports_per_event",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Mdd Maximum Number of Reports per Event", HFILL}
- },
- {&hf_docsis_mdd_upstream_transmit_power_reporting,
- {"Upstream Transmit Power Reporting", "docsis_mdd.upstream_transmit_power_reporting",
- FT_UINT8, BASE_DEC, VALS(upstream_transmit_power_reporting_vals), 0x0,
- "Mdd Upstream Transmit Power Reporting", HFILL}
- },
- {&hf_docsis_mdd_dsg_da_to_dsid_association_da,
- {"Destination Address", "docsis_mdd.dsg_da_to_dsid_association_da",
- FT_ETHER, BASE_NONE, NULL, 0x0,
- "Mdd DSG DA to DSID association Destination Address", HFILL}
- },
- {&hf_docsis_mdd_dsg_da_to_dsid_association_dsid,
- {"DSID", "docsis_mdd.dsg_da_to_dsid_association_dsid",
- FT_UINT24, BASE_DEC, NULL, 0x0FFFFF,
- "Mdd Mdd DSG DA to DSID association DSID", HFILL}
- },
- {&hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_sequence_out_of_range,
- {"Sequence out of range", "docsis_mdd.cm_status_event_enable_non_channel_specific_events_sequence_out_of_range",
- FT_UINT16, BASE_DEC, NULL, 0x0008,
- "CM-STATUS event non-channel-event Sequence out of range", HFILL}
- },
- {&hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_cm_operating_on_battery_backup,
- {"CM operating on battery backup", "docsis_mdd.cm_status_event_enable_non_channel_specific_events_cm_operating_on_battery_backup",
- FT_UINT16, BASE_DEC, NULL, 0x0200,
- "CM-STATUS event non-channel-event Cm operating on battery backup", HFILL}
- },
- {&hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_cm_returned_to_ac_power,
- {"Returned to AC power", "docsis_mdd.cm_status_event_enable_non_channel_specific_events_cm_returned_to_ac_power",
- FT_UINT16, BASE_DEC, NULL, 0x0400,
- "CM-STATUS event non-channel-event Cm returned to AC power", HFILL}
- },
- {&hf_docsis_mdd_extended_upstream_transmit_power_support,
- { "Extended Upstream Transmit Power Support", "docsis_mdd.extended_upstream_transmit_power_support",
- FT_BOOLEAN, BASE_NONE, TFS(&mdd_tfs_on_off), 0x0,
- "Mdd Extended Upstream Transmit Power Support", HFILL}
- },
-
- };
-
- /* Setup protocol subtree array */
- static gint *ett[] = {
- &ett_docsis_mdd,
- &ett_tlv,
- &ett_sub_tlv
- };
-
- /* Register the protocol name and description */
- proto_docsis_mdd =
- proto_register_protocol ("DOCSIS Mac Domain Description",
- "DOCSIS Mdd", "docsis_mdd");
-
- /* Required function calls to register the header fields and subtrees used */
- proto_register_field_array (proto_docsis_mdd, hf, array_length (hf));
- proto_register_subtree_array (ett, array_length (ett));
-
- register_dissector ("docsis_mdd", dissect_mdd, proto_docsis_mdd);
+ /* Setup list of header fields See Section 1.6.1 for details*/
+ static hf_register_info hf[] = {
+ {&hf_docsis_mdd_ccc,
+ {"Configuration Change Count", "docsis_mdd.ccc",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Mdd Configuration Change Count", HFILL}
+ },
+ {&hf_docsis_mdd_number_of_fragments,
+ {"Number of Fragments", "docsis_mdd.number_of_fragments",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Mdd Number of Fragments", HFILL}
+ },
+ {&hf_docsis_mdd_fragment_sequence_number,
+ {"Fragment Sequence Number", "docsis_mdd.fragment_sequence_number",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Mdd Fragment Sequence Number", HFILL}
+ },
+ {&hf_docsis_mdd_current_channel_dcid,
+ {"Current Channel DCID", "docsis_mdd.current_channel_dcid",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Mdd Current Channel DCID", HFILL}
+ },
+ {&hf_docsis_mdd_downstream_active_channel_list_channel_id,
+ {"Channel ID", "docsis_mdd.downstream_active_channel_list_channel_id",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Mdd Downstream Active Channel List Channel ID", HFILL}
+ },
+ {&hf_docsis_mdd_downstream_active_channel_list_frequency,
+ {"Frequency", "docsis_mdd.downstream_active_channel_list_frequency",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Mdd Downstream Active Channel List Frequency", HFILL}
+ },
+ {&hf_docsis_mdd_downstream_active_channel_list_annex,
+ {"Annex", "docsis_mdd.downstream_active_channel_list_annex",
+ FT_UINT8, BASE_DEC, VALS(J83_annex_vals), 0xF0,
+ "Mdd Downstream Active Channel List Annex", HFILL}
+ },
+ {&hf_docsis_mdd_downstream_active_channel_list_modulation_order,
+ {"Modulation Order", "docsis_mdd.downstream_active_channel_list_modulation_order",
+ FT_UINT8, BASE_DEC, VALS(modulation_order_vals), 0x0F,
+ "Mdd Downstream Active Channel List Modulation Order", HFILL}
+ },
+ {&hf_docsis_mdd_downstream_active_channel_list_primary_capable,
+ {"Primary Capable", "docsis_mdd.downstream_active_channel_list_primary_capable",
+ FT_UINT8, BASE_DEC, VALS(primary_capable_vals), 0x0,
+ "Mdd Downstream Active Channel List Primary Capable", HFILL}
+ },
+ {&hf_docsis_mdd_cm_status_event_enable_bitmask_mdd_timeout,
+ {"MDD Timeout", "docsis_mdd.downstream_active_channel_list_mdd_timeout",
+ FT_UINT16, BASE_DEC, NULL, 0x0002,
+ "Mdd Downstream Active Channel List MDD Timeout", HFILL}
+ },
+ {&hf_docsis_mdd_cm_status_event_enable_bitmask_qam_fec_lock_failure,
+ {"QAM/FEC Lock Failure", "docsis_mdd.cm_status_event_enable_bitmask_qam_fec_lock_failure",
+ FT_UINT16, BASE_DEC, NULL, 0x0004,
+ "Mdd Downstream Active Channel List QAM/FEC Lock Failure", HFILL}
+ },
+ {&hf_docsis_mdd_cm_status_event_enable_bitmask_mdd_recovery,
+ {"MDD Recovery", "docsis_mdd.cm_status_event_enable_bitmask_mdd_recovery",
+ FT_UINT16, BASE_DEC, NULL, 0x0010,
+ "CM-STATUS event MDD Recovery", HFILL}
+ },
+ {&hf_docsis_mdd_cm_status_event_enable_bitmask_qam_fec_lock_recovery,
+ {"QAM/FEC Lock Recovery", "docsis_mdd.cm_status_event_enable_bitmask_qam_fec_lock_recovery",
+ FT_UINT16, BASE_DEC, NULL, 0x0020,
+ "CM-STATUS event QAM/FEC Lock Recovery", HFILL}
+ },
+ {&hf_docsis_mdd_cm_status_event_enable_bitmask_t4_timeout,
+ {"T4 timeout", "docsis_mdd.cm_status_event_enable_bitmask_t4_timeout",
+ FT_UINT16, BASE_DEC, NULL, 0x0040,
+ "CM-STATUS event T4 timeout", HFILL}
+ },
+ {&hf_docsis_mdd_cm_status_event_enable_bitmask_t3_retries_exceeded,
+ {"T3 Retries Exceeded", "docsis_mdd.cm_status_event_enable_bitmask_t3_retries_exceeded",
+ FT_UINT16, BASE_DEC, NULL, 0x0080,
+ "CM-STATUS event T3 Retries Exceeded", HFILL}
+ },
+ {&hf_docsis_mdd_cm_status_event_enable_bitmask_successful_ranging_after_t3_retries_exceeded,
+ {"Successful Ranging after T3 Retries Exceeded", "docsis_mdd.cm_status_event_enable_bitmask_successful_ranging_after_t3_retries_exceeded",
+ FT_UINT16, BASE_DEC, NULL, 0x0100,
+ "CM-STATUS event Successful Ranging after T3 Retries Exceeded", HFILL}
+ },
+ {&hf_docsis_mdd_mac_domain_downstream_service_group_channel_id,
+ {"Channel Id", "docsis_mdd.mac_domain_downstream_service_group_channel_id",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Mdd Mac Domain Downstream Service Group Channel Id", HFILL}
+ },
+ {&hf_docsis_mdd_mac_domain_downstream_service_group_md_ds_sg_identifier,
+ {"MD-DS-SG Identifier", "docsis_mdd.mac_domain_downstream_service_group_md_ds_sg_identifier",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Mdd Mac Domain Downstream Service Group MD-DS-SG Identifier", HFILL}
+ },
+ {&hf_docsis_mdd_downstream_ambiguity_resolution_frequency,
+ {"Frequency", "docsis_mdd.downstream_ambiguity_resolution_frequency",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Mdd Downstream Ambiguity Resolution frequency", HFILL}
+ },
+ {&hf_docsis_mdd_rpc_center_frequency_spacing,
+ {"RPC Center Frequency Spacing", "docsis_mdd.rpc_center_frequency_spacing",
+ FT_UINT8, BASE_DEC, VALS(rpc_center_frequency_spacing_vals), 0x0,
+ "Mdd RPC Center Frequency Spacing", HFILL}
+ },
+ {&hf_docsis_mdd_verbose_rcp_reporting,
+ {"Verbose RCP reporting", "docsis_mdd.verbose_rpc_reporting",
+ FT_UINT8, BASE_DEC, VALS(verbose_rpc_reporting_vals), 0x0,
+ "Mdd Verbose RPC Reporting", HFILL}
+ },
+ {&hf_docsis_mdd_ip_provisioning_mode,
+ {"IP Provisioning Mode", "docsis_mdd.ip_provisioning_mode",
+ FT_UINT8, BASE_DEC, VALS(ip_provisioning_mode_vals), 0x0,
+ "Mdd IP Provisioning Mode", HFILL}
+ },
+ {&hf_docsis_mdd_pre_registration_dsid,
+ {"Pre-registration DSID", "docsis_mdd.pre_registration_dsid",
+ FT_UINT24, BASE_DEC, NULL, 0x0FFFFF,
+ "Mdd Pre-registration DSID", HFILL}
+ },
+ {&hf_docsis_mdd_early_authentication_and_encryption,
+ {"Early Authentication and Encryption", "docsis_mdd.early_authentication_and_encryption",
+ FT_UINT8, BASE_DEC, VALS(eae_vals), 0x0,
+ "Mdd Early Authentication and Encryption", HFILL}
+ },
+ {&hf_docsis_mdd_upstream_active_channel_list_upstream_channel_id,
+ {"Upstream Channel Id", "docsis_mdd.upstream_active_channel_list_upstream_channel_id",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Mdd Upstream Active Channel List Upstream Channel Id", HFILL}
+ },
+ {&hf_docsis_mdd_upstream_ambiguity_resolution_channel_list_channel_id,
+ {"Channel Id", "docsis_mdd.upstream_ambiguity_resolution_channel_list_channel_id",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Mdd Mac Domain Upstream Ambiguity Resolution Channel List Channel Id", HFILL}
+ },
+ {&hf_docsis_mdd_upstream_frequency_range,
+ {"Upstream Frequency Range", "docsis_mdd.upstream_frequency_range",
+ FT_UINT8, BASE_DEC, VALS(upstream_frequency_range_vals), 0x0,
+ "Mdd Upstream Frequency Range", HFILL}
+ },
+ {&hf_docsis_mdd_symbol_clock_locking_indicator,
+ {"Symbol Clock Locking Indicator", "docsis_mdd.symbol_clock_locking_indicator",
+ FT_UINT8, BASE_DEC, VALS(symbol_clock_locking_indicator_vals), 0x0,
+ "Mdd Symbol Clock Locking Indicator", HFILL}
+ },
+ {&hf_docsis_mdd_event_type,
+ {"Event Type", "docsis_mdd.event_type",
+ FT_UINT8, BASE_DEC, VALS(symbol_cm_status_event_vals), 0x0,
+ "Mdd CM-STATUS Event Type", HFILL}
+ },
+ {&hf_docsis_mdd_maximum_event_holdoff_timer,
+ {"Maximum Event Holdoff Timer (units of 20 ms)", "docsis_mdd.maximum_event_holdoff_timer",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "Mdd Maximum Event Holdoff Timer", HFILL}
+ },
+ {&hf_docsis_mdd_maximum_number_of_reports_per_event,
+ {"Maximum Number of Reports per Event", "docsis_mdd.maximum_number_of_reports_per_event",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Mdd Maximum Number of Reports per Event", HFILL}
+ },
+ {&hf_docsis_mdd_upstream_transmit_power_reporting,
+ {"Upstream Transmit Power Reporting", "docsis_mdd.upstream_transmit_power_reporting",
+ FT_UINT8, BASE_DEC, VALS(upstream_transmit_power_reporting_vals), 0x0,
+ "Mdd Upstream Transmit Power Reporting", HFILL}
+ },
+ {&hf_docsis_mdd_dsg_da_to_dsid_association_da,
+ {"Destination Address", "docsis_mdd.dsg_da_to_dsid_association_da",
+ FT_ETHER, BASE_NONE, NULL, 0x0,
+ "Mdd DSG DA to DSID association Destination Address", HFILL}
+ },
+ {&hf_docsis_mdd_dsg_da_to_dsid_association_dsid,
+ {"DSID", "docsis_mdd.dsg_da_to_dsid_association_dsid",
+ FT_UINT24, BASE_DEC, NULL, 0x0FFFFF,
+ "Mdd Mdd DSG DA to DSID association DSID", HFILL}
+ },
+ {&hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_sequence_out_of_range,
+ {"Sequence out of range", "docsis_mdd.cm_status_event_enable_non_channel_specific_events_sequence_out_of_range",
+ FT_UINT16, BASE_DEC, NULL, 0x0008,
+ "CM-STATUS event non-channel-event Sequence out of range", HFILL}
+ },
+ {&hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_cm_operating_on_battery_backup,
+ {"CM operating on battery backup", "docsis_mdd.cm_status_event_enable_non_channel_specific_events_cm_operating_on_battery_backup",
+ FT_UINT16, BASE_DEC, NULL, 0x0200,
+ "CM-STATUS event non-channel-event Cm operating on battery backup", HFILL}
+ },
+ {&hf_docsis_mdd_cm_status_event_enable_non_channel_specific_events_cm_returned_to_ac_power,
+ {"Returned to AC power", "docsis_mdd.cm_status_event_enable_non_channel_specific_events_cm_returned_to_ac_power",
+ FT_UINT16, BASE_DEC, NULL, 0x0400,
+ "CM-STATUS event non-channel-event Cm returned to AC power", HFILL}
+ },
+ {&hf_docsis_mdd_extended_upstream_transmit_power_support,
+ { "Extended Upstream Transmit Power Support", "docsis_mdd.extended_upstream_transmit_power_support",
+ FT_BOOLEAN, BASE_NONE, TFS(&mdd_tfs_on_off), 0x0,
+ "Mdd Extended Upstream Transmit Power Support", HFILL}
+ },
+ };
+
+ static gint *ett[] = {
+ &ett_docsis_mdd,
+ &ett_tlv,
+ &ett_sub_tlv
+ };
+
+ proto_docsis_mdd =
+ proto_register_protocol ("DOCSIS Mac Domain Description",
+ "DOCSIS Mdd", "docsis_mdd");
+
+ proto_register_field_array (proto_docsis_mdd, hf, array_length (hf));
+ proto_register_subtree_array (ett, array_length (ett));
+
+ register_dissector ("docsis_mdd", dissect_mdd, proto_docsis_mdd);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_mdd (void)
{
- dissector_handle_t docsis_mdd_handle;
+ dissector_handle_t docsis_mdd_handle;
- docsis_mdd_handle = find_dissector ("docsis_mdd");
- dissector_add_uint ("docsis_mgmt", 33, docsis_mdd_handle);
+ docsis_mdd_handle = find_dissector ("docsis_mdd");
+ dissector_add_uint ("docsis_mgmt", 33, docsis_mdd_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-regack.c b/plugins/docsis/packet-regack.c
index 30094bba82..c3aa0a733b 100644
--- a/plugins/docsis/packet-regack.c
+++ b/plugins/docsis/packet-regack.c
@@ -40,11 +40,10 @@ extern value_string docsis_conf_code[];
/* Initialize the subtree pointers */
static gint ett_docsis_regack = -1;
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_regack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
-
proto_item *it;
proto_tree *regack_tree = NULL;
guint16 sid;
@@ -55,76 +54,56 @@ dissect_regack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
response = tvb_get_guint8 (tvb, 2);
col_add_fstr (pinfo->cinfo, COL_INFO,
- "Registration Acknowledge SID = %u (%s)", sid,
- val_to_str (response, docsis_conf_code, "%d"));
+ "Registration Acknowledge SID = %u (%s)", sid,
+ val_to_str (response, docsis_conf_code, "%d"));
if (tree)
{
it =
- proto_tree_add_protocol_format (tree, proto_docsis_regack, tvb, 0, -1,
- "Registration Acknowledge");
+ proto_tree_add_protocol_format (tree, proto_docsis_regack, tvb, 0, -1,
+ "Registration Acknowledge");
regack_tree = proto_item_add_subtree (it, ett_docsis_regack);
proto_tree_add_item (regack_tree, hf_docsis_regack_sid, tvb, 0, 2,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (regack_tree, hf_docsis_regack_response, tvb, 2, 1,
- ENC_BIG_ENDIAN);
-
+ ENC_BIG_ENDIAN);
}
- /* Call Dissector for Appendix C TLV's */
- next_tvb = tvb_new_subset_remaining (tvb, 3);
- call_dissector (docsis_tlv_handle, next_tvb, pinfo, regack_tree);
+ /* Call Dissector for Appendix C TLV's */
+ next_tvb = tvb_new_subset_remaining (tvb, 3);
+ call_dissector (docsis_tlv_handle, next_tvb, pinfo, regack_tree);
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_regack (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_regack_sid,
{"Service Identifier", "docsis_regack.sid",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_regack_response,
{"Response Code", "docsis_regack.respnse",
FT_UINT8, BASE_DEC, VALS (docsis_conf_code), 0x0,
NULL, HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_regack,
};
-/* Register the protocol name and description */
proto_docsis_regack =
proto_register_protocol ("DOCSIS Registration Acknowledge",
- "DOCSIS REG-ACK", "docsis_regack");
+ "DOCSIS REG-ACK", "docsis_regack");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_regack, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_regack", dissect_regack, proto_docsis_regack);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_regack (void)
{
@@ -133,5 +112,17 @@ proto_reg_handoff_docsis_regack (void)
docsis_regack_handle = find_dissector ("docsis_regack");
docsis_tlv_handle = find_dissector ("docsis_tlv");
dissector_add_uint ("docsis_mgmt", 0x0e, docsis_regack_handle);
-
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-regreq.c b/plugins/docsis/packet-regreq.c
index 1a342c5254..93008a3c8e 100644
--- a/plugins/docsis/packet-regreq.c
+++ b/plugins/docsis/packet-regreq.c
@@ -42,7 +42,6 @@ static dissector_handle_t docsis_tlv_handle;
static void
dissect_regreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
-
proto_item *it;
proto_tree *regreq_tree = NULL;
guint16 sid;
@@ -51,70 +50,48 @@ dissect_regreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
sid = tvb_get_ntohs (tvb, 0);
col_add_fstr (pinfo->cinfo, COL_INFO, "Registration Request SID = %u",
- sid);
+ sid);
if (tree)
{
it =
- proto_tree_add_protocol_format (tree, proto_docsis_regreq, tvb, 0, -1,
- "Registration Request");
+ proto_tree_add_protocol_format (tree, proto_docsis_regreq, tvb, 0, -1,
+ "Registration Request");
regreq_tree = proto_item_add_subtree (it, ett_docsis_regreq);
proto_tree_add_item (regreq_tree, hf_docsis_regreq_sid, tvb, 0, 2,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
}
/* Call Dissector for Appendix C TlV's */
next_tvb = tvb_new_subset_remaining (tvb, 2);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, regreq_tree);
-
-
-
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_regreq (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_regreq_sid,
{"Service Identifier", "docsis_regreq.sid",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_regreq,
};
-/* Register the protocol name and description */
proto_docsis_regreq =
proto_register_protocol ("DOCSIS Registration Requests", "DOCSIS REG-REQ",
- "docsis_regreq");
+ "docsis_regreq");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_regreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_regreq", dissect_regreq, proto_docsis_regreq);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_regreq (void)
{
@@ -124,5 +101,17 @@ proto_reg_handoff_docsis_regreq (void)
docsis_tlv_handle = find_dissector ("docsis_tlv");
dissector_add_uint ("docsis_mgmt", 0x06, docsis_regreq_handle);
-
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-regreqmp.c b/plugins/docsis/packet-regreqmp.c
index da6df60328..849f8302ae 100644
--- a/plugins/docsis/packet-regreqmp.c
+++ b/plugins/docsis/packet-regreqmp.c
@@ -40,96 +40,89 @@ static int hf_docsis_regreqmp_fragment_sequence_number = -1;
static dissector_handle_t docsis_tlv_handle;
-
-
/* Initialize the subtree pointers */
static gint ett_docsis_regreqmp = -1;
+/* Dissection */
static void
dissect_regreqmp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
+ proto_item *it;
+ proto_tree *regreqmp_tree = NULL;
+ tvbuff_t *next_tvb;
- proto_item *it;
- proto_tree *regreqmp_tree = NULL;
- tvbuff_t *next_tvb;
-
- col_set_str(pinfo->cinfo, COL_INFO, "REG-REQ-MP Message:");
-
- if (tree)
- {
- it = proto_tree_add_protocol_format (tree, proto_docsis_regreqmp, tvb, 0, -1,"REG-REQ-MP Message");
- regreqmp_tree = proto_item_add_subtree (it, ett_docsis_regreqmp);
-
- proto_tree_add_item (regreqmp_tree, hf_docsis_regreqmp_sid, tvb, 0, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item (regreqmp_tree, hf_docsis_regreqmp_number_of_fragments, tvb, 2, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (regreqmp_tree, hf_docsis_regreqmp_fragment_sequence_number, tvb, 3, 1, ENC_BIG_ENDIAN);
-
- }
- /* Call Dissector for Appendix C TLV's */
- next_tvb = tvb_new_subset_remaining (tvb, 4);
- call_dissector (docsis_tlv_handle, next_tvb, pinfo, regreqmp_tree);
- }
+ col_set_str(pinfo->cinfo, COL_INFO, "REG-REQ-MP Message:");
+ if (tree)
+ {
+ it = proto_tree_add_protocol_format (tree, proto_docsis_regreqmp, tvb, 0, -1,"REG-REQ-MP Message");
+ regreqmp_tree = proto_item_add_subtree (it, ett_docsis_regreqmp);
+ proto_tree_add_item (regreqmp_tree, hf_docsis_regreqmp_sid, tvb, 0, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item (regreqmp_tree, hf_docsis_regreqmp_number_of_fragments, tvb, 2, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item (regreqmp_tree, hf_docsis_regreqmp_fragment_sequence_number, tvb, 3, 1, ENC_BIG_ENDIAN);
+ }
+ /* Call Dissector for Appendix C TLV's */
+ next_tvb = tvb_new_subset_remaining (tvb, 4);
+ call_dissector (docsis_tlv_handle, next_tvb, pinfo, regreqmp_tree);
+}
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_regreqmp (void)
{
- /* Setup list of header fields See Section 1.6.1 for details*/
- static hf_register_info hf[] = {
- {&hf_docsis_regreqmp_sid,
- {"Sid", "docsis_regreqmp.sid",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- "Reg-Req-Mp Sid", HFILL}
- },
- {&hf_docsis_regreqmp_number_of_fragments,
- {"Number of Fragments", "docsis_regreqmp.number_of_fragments",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Reg-Req-Mp Number of Fragments", HFILL}
- },
- {&hf_docsis_regreqmp_fragment_sequence_number,
- {"Fragment Sequence Number", "docsis_regreqmp.fragment_sequence_number",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Reg-Req-Mp Fragment Sequence Number", HFILL}
- },
- };
-
- /* Setup protocol subtree array */
- static gint *ett[] = {
- &ett_docsis_regreqmp,
- };
-
- /* Register the protocol name and description */
- proto_docsis_regreqmp =
- proto_register_protocol ("DOCSIS Registration Request Multipart",
- "DOCSIS Reg-Req-Mp", "docsis_regreqmp");
-
- /* Required function calls to register the header fields and subtrees used */
- proto_register_field_array (proto_docsis_regreqmp, hf, array_length (hf));
- proto_register_subtree_array (ett, array_length (ett));
-
- register_dissector ("docsis_regreqmp", dissect_regreqmp, proto_docsis_regreqmp);
+ static hf_register_info hf[] = {
+ {&hf_docsis_regreqmp_sid,
+ {"Sid", "docsis_regreqmp.sid",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "Reg-Req-Mp Sid", HFILL}
+ },
+ {&hf_docsis_regreqmp_number_of_fragments,
+ {"Number of Fragments", "docsis_regreqmp.number_of_fragments",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Reg-Req-Mp Number of Fragments", HFILL}
+ },
+ {&hf_docsis_regreqmp_fragment_sequence_number,
+ {"Fragment Sequence Number", "docsis_regreqmp.fragment_sequence_number",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Reg-Req-Mp Fragment Sequence Number", HFILL}
+ },
+ };
+
+ static gint *ett[] = {
+ &ett_docsis_regreqmp,
+ };
+
+ proto_docsis_regreqmp =
+ proto_register_protocol ("DOCSIS Registration Request Multipart",
+ "DOCSIS Reg-Req-Mp", "docsis_regreqmp");
+
+ proto_register_field_array (proto_docsis_regreqmp, hf, array_length (hf));
+ proto_register_subtree_array (ett, array_length (ett));
+
+ register_dissector ("docsis_regreqmp", dissect_regreqmp, proto_docsis_regreqmp);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_regreqmp (void)
{
- dissector_handle_t docsis_regreqmp_handle;
+ dissector_handle_t docsis_regreqmp_handle;
- docsis_tlv_handle = find_dissector ("docsis_tlv");
- docsis_regreqmp_handle = find_dissector ("docsis_regreqmp");
- dissector_add_uint ("docsis_mgmt", 44, docsis_regreqmp_handle);
+ docsis_tlv_handle = find_dissector ("docsis_tlv");
+ docsis_regreqmp_handle = find_dissector ("docsis_regreqmp");
+ dissector_add_uint ("docsis_mgmt", 44, docsis_regreqmp_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-regrsp.c b/plugins/docsis/packet-regrsp.c
index df4911eb40..fa86f98955 100644
--- a/plugins/docsis/packet-regrsp.c
+++ b/plugins/docsis/packet-regrsp.c
@@ -37,15 +37,13 @@ static dissector_handle_t docsis_tlv_handle;
/* Defined in packet-tlv.c */
extern value_string docsis_conf_code[];
-
/* Initialize the subtree pointers */
static gint ett_docsis_regrsp = -1;
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_regrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
-
proto_item *it;
proto_tree *regrsp_tree = NULL;
guint16 sid;
@@ -56,73 +54,56 @@ dissect_regrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
response = tvb_get_guint8 (tvb, 2);
col_add_fstr (pinfo->cinfo, COL_INFO,
- "Registration Response SID = %u (%s)", sid,
- val_to_str (response, docsis_conf_code, "%d"));
+ "Registration Response SID = %u (%s)", sid,
+ val_to_str (response, docsis_conf_code, "%d"));
if (tree)
{
it =
- proto_tree_add_protocol_format (tree, proto_docsis_regrsp, tvb, 0, -1,
- "Registration Response");
+ proto_tree_add_protocol_format (tree, proto_docsis_regrsp, tvb, 0, -1,
+ "Registration Response");
regrsp_tree = proto_item_add_subtree (it, ett_docsis_regrsp);
proto_tree_add_item (regrsp_tree, hf_docsis_regrsp_sid, tvb, 0, 2,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (regrsp_tree, hf_docsis_regrsp_response, tvb, 2, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
}
/* Call Dissector for Appendix C TLV's */
next_tvb = tvb_new_subset_remaining (tvb, 3);
call_dissector (docsis_tlv_handle, next_tvb, pinfo, regrsp_tree);
-
}
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_regrsp (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_regrsp_sid,
{"Service Identifier", "docsis_regrsp.sid",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_regrsp_response,
{"Response Code", "docsis_regrsp.respnse",
FT_UINT8, BASE_DEC, VALS (docsis_conf_code), 0x0,
NULL, HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_regrsp,
};
-/* Register the protocol name and description */
proto_docsis_regrsp =
proto_register_protocol ("DOCSIS Registration Responses", "DOCSIS REG-RSP",
- "docsis_regrsp");
+ "docsis_regrsp");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_regrsp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_regrsp", dissect_regrsp, proto_docsis_regrsp);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_regrsp (void)
{
@@ -131,5 +112,17 @@ proto_reg_handoff_docsis_regrsp (void)
docsis_regrsp_handle = find_dissector ("docsis_regrsp");
docsis_tlv_handle = find_dissector ("docsis_tlv");
dissector_add_uint ("docsis_mgmt", 0x07, docsis_regrsp_handle);
-
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-regrspmp.c b/plugins/docsis/packet-regrspmp.c
index e9933ef1ec..c304ccac5a 100644
--- a/plugins/docsis/packet-regrspmp.c
+++ b/plugins/docsis/packet-regrspmp.c
@@ -42,105 +42,95 @@ static int hf_docsis_regrspmp_fragment_sequence_number = -1;
static dissector_handle_t docsis_tlv_handle;
-
-
/* Initialize the subtree pointers */
static gint ett_docsis_regrspmp = -1;
+/* Dissection */
static void
dissect_regrspmp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
- proto_item *it;
- proto_tree *regrspmp_tree = NULL;
- tvbuff_t *next_tvb;
-
-
-
-
- col_set_str(pinfo->cinfo, COL_INFO, "REG-RSP-MP Message:");
-
- if (tree)
- {
- it = proto_tree_add_protocol_format (tree, proto_docsis_regrspmp, tvb, 0, -1,"REG-RSP-MP Message");
- regrspmp_tree = proto_item_add_subtree (it, ett_docsis_regrspmp);
-
- proto_tree_add_item (regrspmp_tree, hf_docsis_regrspmp_sid, tvb, 0, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item (regrspmp_tree, hf_docsis_regrspmp_response, tvb, 2, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (regrspmp_tree, hf_docsis_regrspmp_number_of_fragments, tvb, 3, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (regrspmp_tree, hf_docsis_regrspmp_fragment_sequence_number, tvb, 4, 1, ENC_BIG_ENDIAN);
-
- }
- /* Call Dissector for Appendix C TLV's */
- next_tvb = tvb_new_subset_remaining (tvb, 5);
- call_dissector (docsis_tlv_handle, next_tvb, pinfo, regrspmp_tree);
+ proto_item *it;
+ proto_tree *regrspmp_tree = NULL;
+ tvbuff_t *next_tvb;
+
+ col_set_str(pinfo->cinfo, COL_INFO, "REG-RSP-MP Message:");
+
+ if (tree)
+ {
+ it = proto_tree_add_protocol_format (tree, proto_docsis_regrspmp, tvb, 0, -1,"REG-RSP-MP Message");
+ regrspmp_tree = proto_item_add_subtree (it, ett_docsis_regrspmp);
+
+ proto_tree_add_item (regrspmp_tree, hf_docsis_regrspmp_sid, tvb, 0, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item (regrspmp_tree, hf_docsis_regrspmp_response, tvb, 2, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item (regrspmp_tree, hf_docsis_regrspmp_number_of_fragments, tvb, 3, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item (regrspmp_tree, hf_docsis_regrspmp_fragment_sequence_number, tvb, 4, 1, ENC_BIG_ENDIAN);
+
+ }
+ /* Call Dissector for Appendix C TLV's */
+ next_tvb = tvb_new_subset_remaining (tvb, 5);
+ call_dissector (docsis_tlv_handle, next_tvb, pinfo, regrspmp_tree);
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_regrspmp (void)
{
-
- /* Setup list of header fields See Section 1.6.1 for details*/
- static hf_register_info hf[] = {
- {&hf_docsis_regrspmp_sid,
- {"Sid", "docsis_regrspmp.sid",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- "Reg-Rsp-Mp Sid", HFILL}
- },
- {&hf_docsis_regrspmp_response,
- {"Response", "docsis_regrspmp.response",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Reg-Rsp-Mp Response", HFILL}
- },
- {&hf_docsis_regrspmp_number_of_fragments,
- {"Number of Fragments", "docsis_regrspmp.number_of_fragments",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Reg-Rsp-Mp Number of Fragments", HFILL}
- },
- {&hf_docsis_regrspmp_fragment_sequence_number,
- {"Fragment Sequence Number", "docsis_regrspmp.fragment_sequence_number",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Reg-Rsp-Mp Fragment Sequence Number", HFILL}
- },
- };
-
- /* Setup protocol subtree array */
- static gint *ett[] = {
- &ett_docsis_regrspmp,
- };
-
- /* Register the protocol name and description */
- proto_docsis_regrspmp =
- proto_register_protocol ("DOCSIS Registration Response Multipart",
- "DOCSIS Reg-Rsp-Mp", "docsis_regrspmp");
-
- /* Required function calls to register the header fields and subtrees used */
- proto_register_field_array (proto_docsis_regrspmp, hf, array_length (hf));
- proto_register_subtree_array (ett, array_length (ett));
-
- register_dissector ("docsis_regrspmp", dissect_regrspmp, proto_docsis_regrspmp);
+ static hf_register_info hf[] = {
+ {&hf_docsis_regrspmp_sid,
+ {"Sid", "docsis_regrspmp.sid",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "Reg-Rsp-Mp Sid", HFILL}
+ },
+ {&hf_docsis_regrspmp_response,
+ {"Response", "docsis_regrspmp.response",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Reg-Rsp-Mp Response", HFILL}
+ },
+ {&hf_docsis_regrspmp_number_of_fragments,
+ {"Number of Fragments", "docsis_regrspmp.number_of_fragments",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Reg-Rsp-Mp Number of Fragments", HFILL}
+ },
+ {&hf_docsis_regrspmp_fragment_sequence_number,
+ {"Fragment Sequence Number", "docsis_regrspmp.fragment_sequence_number",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Reg-Rsp-Mp Fragment Sequence Number", HFILL}
+ },
+ };
+
+ static gint *ett[] = {
+ &ett_docsis_regrspmp,
+ };
+
+ proto_docsis_regrspmp =
+ proto_register_protocol ("DOCSIS Registration Response Multipart",
+ "DOCSIS Reg-Rsp-Mp", "docsis_regrspmp");
+
+ proto_register_field_array (proto_docsis_regrspmp, hf, array_length (hf));
+ proto_register_subtree_array (ett, array_length (ett));
+
+ register_dissector ("docsis_regrspmp", dissect_regrspmp, proto_docsis_regrspmp);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
-This format is required because a script is used to find these routines and
-create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_regrspmp (void)
{
- dissector_handle_t docsis_regrspmp_handle;
+ dissector_handle_t docsis_regrspmp_handle;
- docsis_tlv_handle = find_dissector ("docsis_tlv");
- docsis_regrspmp_handle = find_dissector ("docsis_regrspmp");
- dissector_add_uint ("docsis_mgmt", 45, docsis_regrspmp_handle);
+ docsis_tlv_handle = find_dissector ("docsis_tlv");
+ docsis_regrspmp_handle = find_dissector ("docsis_regrspmp");
+ dissector_add_uint ("docsis_mgmt", 45, docsis_regrspmp_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-rngreq.c b/plugins/docsis/packet-rngreq.c
index 7c0467f6ef..feddd72492 100644
--- a/plugins/docsis/packet-rngreq.c
+++ b/plugins/docsis/packet-rngreq.c
@@ -34,11 +34,10 @@ static int hf_docsis_rngreq_down_chid = -1;
static int hf_docsis_rngreq_sid = -1;
static int hf_docsis_rngreq_pend_compl = -1;
-
/* Initialize the subtree pointers */
static gint ett_docsis_rngreq = -1;
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_rngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
@@ -49,84 +48,63 @@ dissect_rngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
sid = tvb_get_ntohs (tvb, 0);
if (sid > 0)
- col_add_fstr (pinfo->cinfo, COL_INFO, "Ranging Request: SID = %u",
- sid);
+ col_add_fstr (pinfo->cinfo, COL_INFO, "Ranging Request: SID = %u",
+ sid);
else
- col_set_str(pinfo->cinfo, COL_INFO, "Initial Ranging Request SID = 0");
+ col_set_str(pinfo->cinfo, COL_INFO, "Initial Ranging Request SID = 0");
if (tree)
{
it =
- proto_tree_add_protocol_format (tree, proto_docsis_rngreq, tvb, 0, -1,
- "Ranging Request");
+ proto_tree_add_protocol_format (tree, proto_docsis_rngreq, tvb, 0, -1,
+ "Ranging Request");
rngreq_tree = proto_item_add_subtree (it, ett_docsis_rngreq);
proto_tree_add_item (rngreq_tree, hf_docsis_rngreq_sid, tvb, 0, 2,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (rngreq_tree, hf_docsis_rngreq_down_chid, tvb, 2, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (rngreq_tree, hf_docsis_rngreq_pend_compl, tvb, 3,
- 1, ENC_BIG_ENDIAN);
+ 1, ENC_BIG_ENDIAN);
}
-
-
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_rngreq (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_rngreq_sid,
{"Service Identifier", "docsis_rngreq.sid",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_rngreq_down_chid,
{"Downstream Channel ID", "docsis_rngreq.downchid",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_rngreq_pend_compl,
{"Pending Till Complete", "docsis_rngreq.pendcomp",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Upstream Channel ID", HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_rngreq,
};
-/* Register the protocol name and description */
proto_docsis_rngreq = proto_register_protocol ("DOCSIS Range Request Message",
- "DOCSIS RNG-REQ",
- "docsis_rngreq");
+ "DOCSIS RNG-REQ",
+ "docsis_rngreq");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_rngreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_rngreq", dissect_rngreq, proto_docsis_rngreq);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_rngreq (void)
{
@@ -136,3 +114,16 @@ proto_reg_handoff_docsis_rngreq (void)
dissector_add_uint ("docsis_mgmt", 0x04, docsis_rngreq_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-rngrsp.c b/plugins/docsis/packet-rngrsp.c
index 5c78c8a56e..13dfb8291f 100644
--- a/plugins/docsis/packet-rngrsp.c
+++ b/plugins/docsis/packet-rngrsp.c
@@ -77,108 +77,108 @@ dissect_rngrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
upchid = tvb_get_guint8 (tvb, 2);
if (upchid > 0)
- col_add_fstr (pinfo->cinfo, COL_INFO,
- "Ranging Response: SID = %u, Upstream Channel = %u (U%u)",
- sid, upchid, upchid - 1);
+ col_add_fstr (pinfo->cinfo, COL_INFO,
+ "Ranging Response: SID = %u, Upstream Channel = %u (U%u)",
+ sid, upchid, upchid - 1);
else
- col_add_fstr (pinfo->cinfo, COL_INFO,
- "Ranging Response: SID = %u, Telephony Return", sid);
+ col_add_fstr (pinfo->cinfo, COL_INFO,
+ "Ranging Response: SID = %u, Telephony Return", sid);
if (tree)
{
it =
- proto_tree_add_protocol_format (tree, proto_docsis_rngrsp, tvb, 0, -1,
- "Ranging Response");
+ proto_tree_add_protocol_format (tree, proto_docsis_rngrsp, tvb, 0, -1,
+ "Ranging Response");
rngrsp_tree = proto_item_add_subtree (it, ett_docsis_rngrsp);
proto_tree_add_item (rngrsp_tree, hf_docsis_rngrsp_sid, tvb, 0, 2,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (rngrsp_tree, hf_docsis_rngrsp_upstream_chid, tvb,
- 2, 1, ENC_BIG_ENDIAN);
+ 2, 1, ENC_BIG_ENDIAN);
length = tvb_reported_length_remaining (tvb, 0);
pos = 3;
while (pos < length)
- {
- tlvtype = tvb_get_guint8 (tvb, pos++);
- tlvlen = tvb_get_guint8 (tvb, pos++);
- switch (tlvtype)
- {
- case RNGRSP_TIMING:
- if (tlvlen == 4)
- {
- tim = tvb_get_ntohl (tvb, pos);
- proto_tree_add_int (rngrsp_tree,
- hf_docsis_rngrsp_timing_adj, tvb, pos,
- tlvlen, tim);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case RNGRSP_PWR_LEVEL_ADJ:
- if (tlvlen == 1)
- {
- pwr = tvb_get_guint8 (tvb, pos);
- proto_tree_add_int (rngrsp_tree, hf_docsis_rngrsp_power_adj,
- tvb, pos, tlvlen, pwr);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case RNGRSP_OFFSET_FREQ_ADJ:
- if (tlvlen == 2)
- {
- proto_tree_add_item (rngrsp_tree, hf_docsis_rngrsp_freq_adj,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case RNGRSP_TRANSMIT_EQ_ADJ:
- proto_tree_add_item (rngrsp_tree, hf_docsis_rngrsp_xmit_eq_adj,
- tvb, pos, tlvlen, ENC_NA);
- break;
- case RNGRSP_RANGING_STATUS:
- if (tlvlen == 1)
- proto_tree_add_item (rngrsp_tree,
- hf_docsis_rngrsp_ranging_status, tvb,
- pos, tlvlen, ENC_BIG_ENDIAN);
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case RNGRSP_DOWN_FREQ_OVER:
- if (tlvlen == 4)
- proto_tree_add_item (rngrsp_tree,
- hf_docsis_rngrsp_down_freq_over, tvb,
- pos, tlvlen, ENC_BIG_ENDIAN);
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case RNGRSP_UP_CHID_OVER:
- if (tlvlen == 1)
- proto_tree_add_item (rngrsp_tree,
- hf_docsis_rngrsp_upstream_ch_over, tvb,
- pos, tlvlen, ENC_BIG_ENDIAN);
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
-
- } /* switch(tlvtype) */
- pos = pos + tlvlen;
- } /* while (pos < length) */
- } /* if (tree) */
+ {
+ tlvtype = tvb_get_guint8 (tvb, pos++);
+ tlvlen = tvb_get_guint8 (tvb, pos++);
+ switch (tlvtype)
+ {
+ case RNGRSP_TIMING:
+ if (tlvlen == 4)
+ {
+ tim = tvb_get_ntohl (tvb, pos);
+ proto_tree_add_int (rngrsp_tree,
+ hf_docsis_rngrsp_timing_adj, tvb, pos,
+ tlvlen, tim);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case RNGRSP_PWR_LEVEL_ADJ:
+ if (tlvlen == 1)
+ {
+ pwr = tvb_get_guint8 (tvb, pos);
+ proto_tree_add_int (rngrsp_tree, hf_docsis_rngrsp_power_adj,
+ tvb, pos, tlvlen, pwr);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case RNGRSP_OFFSET_FREQ_ADJ:
+ if (tlvlen == 2)
+ {
+ proto_tree_add_item (rngrsp_tree, hf_docsis_rngrsp_freq_adj,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case RNGRSP_TRANSMIT_EQ_ADJ:
+ proto_tree_add_item (rngrsp_tree, hf_docsis_rngrsp_xmit_eq_adj,
+ tvb, pos, tlvlen, ENC_NA);
+ break;
+ case RNGRSP_RANGING_STATUS:
+ if (tlvlen == 1)
+ proto_tree_add_item (rngrsp_tree,
+ hf_docsis_rngrsp_ranging_status, tvb,
+ pos, tlvlen, ENC_BIG_ENDIAN);
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case RNGRSP_DOWN_FREQ_OVER:
+ if (tlvlen == 4)
+ proto_tree_add_item (rngrsp_tree,
+ hf_docsis_rngrsp_down_freq_over, tvb,
+ pos, tlvlen, ENC_BIG_ENDIAN);
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case RNGRSP_UP_CHID_OVER:
+ if (tlvlen == 1)
+ proto_tree_add_item (rngrsp_tree,
+ hf_docsis_rngrsp_upstream_ch_over, tvb,
+ pos, tlvlen, ENC_BIG_ENDIAN);
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+
+ } /* switch(tlvtype) */
+ pos = pos + tlvlen;
+ } /* while (pos < length) */
+ } /* if (tree) */
}
@@ -252,8 +252,8 @@ proto_register_docsis_rngrsp (void)
/* Register the protocol name and description */
proto_docsis_rngrsp = proto_register_protocol ("DOCSIS Ranging Response",
- "DOCSIS RNG-RSP",
- "docsis_rngrsp");
+ "DOCSIS RNG-RSP",
+ "docsis_rngrsp");
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_rngrsp, hf, array_length (hf));
@@ -276,3 +276,16 @@ proto_reg_handoff_docsis_rngrsp (void)
dissector_add_uint ("docsis_mgmt", 0x05, docsis_rngrsp_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-sync.c b/plugins/docsis/packet-sync.c
index 347c0b583a..f1c2e6058d 100644
--- a/plugins/docsis/packet-sync.c
+++ b/plugins/docsis/packet-sync.c
@@ -33,77 +33,73 @@ void proto_reg_handoff_docsis_sync(void);
static int proto_docsis_sync = -1;
static int hf_docsis_sync_cmts_timestamp = -1;
-
/* Initialize the subtree pointers */
static gint ett_docsis_sync = -1;
+/* Dissection */
static void
dissect_sync (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
- proto_item *it;
- proto_tree *sync_tree;
+ proto_item *it;
+ proto_tree *sync_tree;
- col_set_str(pinfo->cinfo, COL_INFO, "Sync Message:");
+ col_set_str(pinfo->cinfo, COL_INFO, "Sync Message:");
- if (tree)
- {
- it = proto_tree_add_protocol_format (tree, proto_docsis_sync, tvb, 0, -1,"SYNC Message");
- sync_tree = proto_item_add_subtree (it, ett_docsis_sync);
+ if (tree)
+ {
+ it = proto_tree_add_protocol_format (tree, proto_docsis_sync, tvb, 0, -1,"SYNC Message");
+ sync_tree = proto_item_add_subtree (it, ett_docsis_sync);
- proto_tree_add_item (sync_tree, hf_docsis_sync_cmts_timestamp, tvb, 0, 4,
- ENC_BIG_ENDIAN);
- } /* if(tree) */
+ proto_tree_add_item (sync_tree, hf_docsis_sync_cmts_timestamp, tvb, 0, 4,
+ ENC_BIG_ENDIAN);
+ } /* if(tree) */
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_sync (void)
{
- /* Setup list of header fields See Section 1.6.1 for details*/
- static hf_register_info hf[] = {
- {&hf_docsis_sync_cmts_timestamp,
- {"CMTS Timestamp", "docsis_sync.cmts_timestamp",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- "Sync CMTS Timestamp", HFILL}
- },
- };
-
- /* Setup protocol subtree array */
- static gint *ett[] = {
- &ett_docsis_sync,
- };
-
- /* Register the protocol name and description */
- proto_docsis_sync =
- proto_register_protocol ("DOCSIS Synchronisation Message",
- "DOCSIS Sync", "docsis_sync");
-
- /* Required function calls to register the header fields and subtrees used */
- proto_register_field_array (proto_docsis_sync, hf, array_length (hf));
- proto_register_subtree_array (ett, array_length (ett));
-
- register_dissector ("docsis_sync", dissect_sync, proto_docsis_sync);
+ /* Setup list of header fields See Section 1.6.1 for details*/
+ static hf_register_info hf[] = {
+ {&hf_docsis_sync_cmts_timestamp,
+ {"CMTS Timestamp", "docsis_sync.cmts_timestamp",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Sync CMTS Timestamp", HFILL}
+ },
+ };
+
+ static gint *ett[] = {
+ &ett_docsis_sync,
+ };
+
+ proto_docsis_sync =
+ proto_register_protocol ("DOCSIS Synchronisation Message",
+ "DOCSIS Sync", "docsis_sync");
+
+ proto_register_field_array (proto_docsis_sync, hf, array_length (hf));
+ proto_register_subtree_array (ett, array_length (ett));
+
+ register_dissector ("docsis_sync", dissect_sync, proto_docsis_sync);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_sync (void)
{
- dissector_handle_t docsis_sync_handle;
+ dissector_handle_t docsis_sync_handle;
- docsis_sync_handle = find_dissector ("docsis_sync");
- dissector_add_uint ("docsis_mgmt", 1, docsis_sync_handle);
+ docsis_sync_handle = find_dissector ("docsis_sync");
+ dissector_add_uint ("docsis_mgmt", 1, docsis_sync_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-tlv-cmctrl.c b/plugins/docsis/packet-tlv-cmctrl.c
index 1bba35c317..86a01948a0 100644
--- a/plugins/docsis/packet-tlv-cmctrl.c
+++ b/plugins/docsis/packet-tlv-cmctrl.c
@@ -43,6 +43,7 @@
void proto_register_cmctrl_tlv(void);
void proto_reg_handoff_cmctrl_tlv(void);
+/* Initialize the protocol and registered fields */
static int proto_cmctrl_tlv = -1;
static int hf_cmctrl_tlv_mute = -1;
static int hf_cmctrl_tlv_mute_timeout = -1;
@@ -58,17 +59,19 @@ static int hf_ds_event_mask = -1;
static int hf_us_event_ch_id = -1;
static int hf_us_event_mask = -1;
+/* Initialize the subtree pointers */
static gint ett_cmctrl_tlv = -1;
static gint ett_cmctrl_tlv_ds_event = -1;
static gint ett_cmctrl_tlv_us_event = -1;
-
+/* Dissection */
static void
dissect_ds_event(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
{
guint8 type, length;
proto_tree *event_tree;
int pos = start;
+
event_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_cmctrl_tlv_ds_event, NULL,
"Override Downstream Status Event Event Mask (Length = %u)", len);
@@ -112,6 +115,7 @@ dissect_us_event(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
guint8 type, length;
proto_tree *event_tree;
int pos = start;
+
event_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_cmctrl_tlv_us_event, NULL,
"Override Upstream Status Enable Event Mask (Length = %u)", len);
@@ -152,7 +156,6 @@ dissect_us_event(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
static void
dissect_cmctrl_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
{
-
proto_item *it;
proto_tree *tlv_tree;
int pos = 0;
@@ -248,99 +251,84 @@ dissect_cmctrl_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
}
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_cmctrl_tlv (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_cmctrl_tlv_mute,
{"1 Upstream Channel RF Mute", "cmctrl_tlv.mute",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Upstream Channel RF Mute", HFILL}
- },
+ },
{&hf_cmctrl_tlv_mute_timeout,
{"2 RF Mute Timeout Interval", "cmctrl_tlv.mute_timeout",
FT_UINT32, BASE_DEC, NULL, 0x0,
"RF Mute Timeout Interval", HFILL}
- },
+ },
{&hf_cmctrl_tlv_reinit,
{"3 CM Reinitialize", "cmctrl_tlv.reinit",
FT_UINT8, BASE_DEC, NULL, 0x0,
"CM Reinitialize", HFILL}
- },
+ },
{&hf_cmctrl_tlv_disable_fwd,
{"4 Disable Forwarding", "cmctrl_tlv.disable_fwd",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Disable Forwarding", HFILL}
- },
+ },
{&hf_cmctrl_tlv_ds_event,
{"5 Override Downstream Events", "cmctrl_tlv.ds_event",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Override Downstream Events", HFILL}
- },
+ },
{&hf_ds_event_ch_id,
{".1 Downstream Channel ID", "cmctrl_tlv.ds_event.chid",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Downstream Channel ID", HFILL}
- },
+ },
{&hf_ds_event_mask,
{".2 Downstream Status Event Enable Bitmask", "cmctrl_tlv.ds_event.mask",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Downstream Status Event Enable Bitmask", HFILL}
- },
+ },
#if 0
{&hf_cmctrl_tlv_us_event,
{"6 Override Upstream Events", "cmctrl_tlv.us_event",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Override Downstream Events", HFILL}
- },
+ },
#endif
{&hf_us_event_ch_id,
{".1 Upstream Channel ID", "cmctrl_tlv.us_event.chid",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Upstream Channel ID", HFILL}
- },
+ },
{&hf_us_event_mask,
{".2 Upstream Status Event Enable Bitmask", "cmctrl_tlv.us_event.mask",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Upstream Status Event Enable Bitmask", HFILL}
- },
+ },
{&hf_cmctrl_tlv_event,
{"7 Override Non-Channel-Specific Events", "cmctrl_tlv.event",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Override Non-Channel-Specific Events", HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_cmctrl_tlv,
&ett_cmctrl_tlv_ds_event,
&ett_cmctrl_tlv_us_event,
};
-/* Register the protocol name and description */
proto_cmctrl_tlv = proto_register_protocol ("DOCSIS CM-CTRL TLV's",
"DOCSIS CM-CTRL TLVs", "cmctrl_tlv");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_cmctrl_tlv, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("cmctrl_tlv", dissect_cmctrl_tlv, proto_cmctrl_tlv);
}
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_cmctrl_tlv (void)
{
@@ -352,3 +340,16 @@ proto_reg_handoff_cmctrl_tlv (void)
dissector_add_uint ("docsis", 0xFE, cmctrl_tlv_handle);
#endif
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-tlv.c b/plugins/docsis/packet-tlv.c
index 8d586c4e06..82660e7b21 100644
--- a/plugins/docsis/packet-tlv.c
+++ b/plugins/docsis/packet-tlv.c
@@ -42,7 +42,6 @@ void proto_reg_handoff_docsis_tlv(void);
static dissector_handle_t docsis_vsif_handle;
static dissector_handle_t docsis_ucd_handle;
-
static int proto_docsis_tlv = -1;
static int hf_docsis_tlv_down_freq = -1;
static int hf_docsis_tlv_upstream_chid = -1;
@@ -508,32 +507,32 @@ static const value_string rng_tech_vals[] = {
const value_string docsis_conf_code[] = {
- {0, "okay/success"},
- {1, "Reject: Other/Auth failure (1.0)"},
- {2, "Reject: Unrecognized configuration setting/COS failure (1.0)"},
- {3, "Reject: Temporary/Reject resource"},
- {4, "Reject: Permanent/Reject admin"},
- {5, "Reject: Not owner"},
- {6, "Reject: Service flow not found"},
- {7, "Reject: Service flow exists"},
- {8, "Reject: Required parameter not present"},
- {9, "Reject: Header suppression"},
- {10, "Reject: Unknown transaction id"},
- {11, "Reject: Authentication failure"},
- {12, "Reject: Add aborted"},
- {13, "Reject: Multiple errors"},
- {14, "Reject: Classifier not found"},
- {15, "Reject: Classifier exists"},
- {16, "Reject: PHS rule not found"},
- {17, "Reject: PHS rule exists"},
- {18, "Reject: Duplicate reference ID or index in message"},
- {19, "Reject: Multiple upstream service flows"},
- {20, "Reject: Multiple downstream service flows"},
- {21, "Reject: Classifier for another service flow "},
- {22, "Reject: PHS for another service flow "},
- {23, "Reject: Parameter invalid for context"},
- {24, "Reject: Authorization failure"},
- {25, "Reject: Temporary DCC"},
+ { 0, "okay/success"},
+ { 1, "Reject: Other/Auth failure (1.0)"},
+ { 2, "Reject: Unrecognized configuration setting/COS failure (1.0)"},
+ { 3, "Reject: Temporary/Reject resource"},
+ { 4, "Reject: Permanent/Reject admin"},
+ { 5, "Reject: Not owner"},
+ { 6, "Reject: Service flow not found"},
+ { 7, "Reject: Service flow exists"},
+ { 8, "Reject: Required parameter not present"},
+ { 9, "Reject: Header suppression"},
+ { 10, "Reject: Unknown transaction id"},
+ { 11, "Reject: Authentication failure"},
+ { 12, "Reject: Add aborted"},
+ { 13, "Reject: Multiple errors"},
+ { 14, "Reject: Classifier not found"},
+ { 15, "Reject: Classifier exists"},
+ { 16, "Reject: PHS rule not found"},
+ { 17, "Reject: PHS rule exists"},
+ { 18, "Reject: Duplicate reference ID or index in message"},
+ { 19, "Reject: Multiple upstream service flows"},
+ { 20, "Reject: Multiple downstream service flows"},
+ { 21, "Reject: Classifier for another service flow "},
+ { 22, "Reject: PHS for another service flow "},
+ { 23, "Reject: Parameter invalid for context"},
+ { 24, "Reject: Authorization failure"},
+ { 25, "Reject: Temporary DCC"},
{180, "Depart"},
{181, "Arrive"},
{182, "Reject: Already There"},
@@ -598,16 +597,16 @@ static const value_string add_del_vals[] = {
};
static const value_string init_reason_vals[] = {
- {0, "reserved"},
- {1, "Power On"},
- {2, "T17 Lost Sync"},
- {3, "All Upstream Failed"},
- {4, "Bad DHCP Ack"},
- {5, "Link Local Address in use"},
- {6, "T6 Expired"},
- {7, "REG-RSP not ok"},
- {8, "BAD RCC/TCC"},
- {9, "Failed Primary Downstream"},
+ { 0, "reserved"},
+ { 1, "Power On"},
+ { 2, "T17 Lost Sync"},
+ { 3, "All Upstream Failed"},
+ { 4, "Bad DHCP Ack"},
+ { 5, "Link Local Address in use"},
+ { 6, "T6 Expired"},
+ { 7, "REG-RSP not ok"},
+ { 8, "BAD RCC/TCC"},
+ { 9, "Failed Primary Downstream"},
{10, "TCS failed on all upstreams"},
{11, "reserved"},
{12, "reserved"},
@@ -639,7 +638,7 @@ static const value_string fctype_fwd_vals[] = {
{0, NULL},
};
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_phs_err (tvbuff_t * tvb, proto_tree * tree, int start,
guint16 len)
@@ -647,9 +646,10 @@ dissect_phs_err (tvbuff_t * tvb, proto_tree * tree, int start,
guint8 type, length;
proto_tree *err_tree;
int pos = start;
+
err_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_sflow_err, NULL,
- "5 Service Flow Error Encodings (Length = %u)", len);
+ "5 Service Flow Error Encodings (Length = %u)", len);
while (pos < (start + len))
{
@@ -657,32 +657,32 @@ dissect_phs_err (tvbuff_t * tvb, proto_tree * tree, int start,
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case PHS_ERR_PARAM:
- if (length == 1)
- {
- proto_tree_add_item (err_tree, hf_docsis_tlv_phs_err_param, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case PHS_ERR_CODE:
- if (length == 1)
- {
- proto_tree_add_item (err_tree, hf_docsis_tlv_phs_err_code, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case PHS_ERR_MSG:
- proto_tree_add_item (err_tree, hf_docsis_tlv_phs_err_msg, tvb, pos,
- length, ENC_ASCII|ENC_NA);
- break;
+ case PHS_ERR_PARAM:
+ if (length == 1)
+ {
+ proto_tree_add_item (err_tree, hf_docsis_tlv_phs_err_param, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case PHS_ERR_CODE:
+ if (length == 1)
+ {
+ proto_tree_add_item (err_tree, hf_docsis_tlv_phs_err_code, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case PHS_ERR_MSG:
+ proto_tree_add_item (err_tree, hf_docsis_tlv_phs_err_msg, tvb, pos,
+ length, ENC_ASCII|ENC_NA);
+ break;
} /* switch */
pos = pos + length;
@@ -695,9 +695,10 @@ dissect_phs (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
guint8 type, length;
proto_tree *phs_tree;
int pos = start;
+
phs_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_phs, NULL,
- "26 PHS Encodings (Length = %u)", len);
+ "26 PHS Encodings (Length = %u)", len);
while (pos < (start + len))
{
@@ -705,108 +706,108 @@ dissect_phs (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case PHS_CLSFR_REF:
- if (length == 1)
- {
- proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_class_ref, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case PHS_CLSFR_ID:
- if (length == 2)
- {
- proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_class_id, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case PHS_SFLOW_REF:
- if (length == 2)
- {
- proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_sflow_ref, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case PHS_SFLOW_ID:
- if (length == 4)
- {
- proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_sflow_id, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case PHS_DSC_ACTION:
- if (length == 1)
- {
- proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_dsc_action,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case PHS_ERRORS:
- dissect_phs_err (tvb, phs_tree, pos, length);
- case PHS_FIELD:
- proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_phsf, tvb, pos,
- length, ENC_NA);
- break;
- case PHS_INDEX:
- if (length == 1)
- {
- proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_phsi, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case PHS_MASK:
- proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_phsm, tvb, pos,
- length, ENC_NA);
- break;
- case PHS_SUP_SIZE:
- if (length == 1)
- {
- proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_phss, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case PHS_VERIFICATION:
- if (length == 1)
- {
- proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_phsf, tvb, pos,
- length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case PHS_VENDOR_SPEC:
- proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_vendorspec, tvb,
- pos, length, ENC_NA);
- break;
+ case PHS_CLSFR_REF:
+ if (length == 1)
+ {
+ proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_class_ref, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case PHS_CLSFR_ID:
+ if (length == 2)
+ {
+ proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_class_id, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case PHS_SFLOW_REF:
+ if (length == 2)
+ {
+ proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_sflow_ref, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case PHS_SFLOW_ID:
+ if (length == 4)
+ {
+ proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_sflow_id, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case PHS_DSC_ACTION:
+ if (length == 1)
+ {
+ proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_dsc_action,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case PHS_ERRORS:
+ dissect_phs_err (tvb, phs_tree, pos, length);
+ case PHS_FIELD:
+ proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_phsf, tvb, pos,
+ length, ENC_NA);
+ break;
+ case PHS_INDEX:
+ if (length == 1)
+ {
+ proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_phsi, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case PHS_MASK:
+ proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_phsm, tvb, pos,
+ length, ENC_NA);
+ break;
+ case PHS_SUP_SIZE:
+ if (length == 1)
+ {
+ proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_phss, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case PHS_VERIFICATION:
+ if (length == 1)
+ {
+ proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_phsf, tvb, pos,
+ length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case PHS_VENDOR_SPEC:
+ proto_tree_add_item (phs_tree, hf_docsis_tlv_phs_vendorspec, tvb,
+ pos, length, ENC_NA);
+ break;
} /* switch */
pos = pos + length;
@@ -863,9 +864,10 @@ dissect_sflow_err (tvbuff_t * tvb, proto_tree * tree, int start,
guint8 type, length;
proto_tree *err_tree;
int pos = start;
+
err_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_sflow_err, NULL,
- "5 Service Flow Error Encodings (Length = %u)", len);
+ "5 Service Flow Error Encodings (Length = %u)", len);
while (pos < (start + len))
{
@@ -873,32 +875,32 @@ dissect_sflow_err (tvbuff_t * tvb, proto_tree * tree, int start,
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case SFW_ERR_PARAM:
- if (length == 1)
- {
- proto_tree_add_item (err_tree, hf_docsis_tlv_sflow_err_param,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SFW_ERR_CODE:
- if (length == 1)
- {
- proto_tree_add_item (err_tree, hf_docsis_tlv_sflow_err_code,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SFW_ERR_MSG:
- proto_tree_add_item (err_tree, hf_docsis_tlv_sflow_err_msg, tvb,
- pos, length, ENC_ASCII|ENC_NA);
- break;
+ case SFW_ERR_PARAM:
+ if (length == 1)
+ {
+ proto_tree_add_item (err_tree, hf_docsis_tlv_sflow_err_param,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SFW_ERR_CODE:
+ if (length == 1)
+ {
+ proto_tree_add_item (err_tree, hf_docsis_tlv_sflow_err_code,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SFW_ERR_MSG:
+ proto_tree_add_item (err_tree, hf_docsis_tlv_sflow_err_msg, tvb,
+ pos, length, ENC_ASCII|ENC_NA);
+ break;
} /* switch */
pos = pos + length;
@@ -911,6 +913,7 @@ dissect_downstream_sflow (tvbuff_t * tvb, proto_tree * sflow_tree,
{
guint8 type, length;
int pos = start;
+
while (pos < (start + len))
{
type = tvb_get_guint8 (tvb, pos++);
@@ -942,134 +945,135 @@ dissect_upstream_sflow (tvbuff_t * tvb, proto_tree * sflow_tree,
{
guint8 type, length;
int pos = start;
+
while (pos < (start + len))
{
type = tvb_get_guint8 (tvb, pos++);
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case SFW_MAX_CONCAT_BURST:
- if (length == 2)
- {
- proto_tree_add_item (sflow_tree,
- hf_docsis_tlv_sflow_max_concat_burst, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
+ case SFW_MAX_CONCAT_BURST:
+ if (length == 2)
+ {
+ proto_tree_add_item (sflow_tree,
+ hf_docsis_tlv_sflow_max_concat_burst, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
- }
- break;
- case SFW_SCHEDULING_TYPE:
- if (length == 1)
- {
- proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_sched_type,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SFW_REQ_XMIT_POL:
- dissect_reqxmit_policy (tvb, sflow_tree, pos);
- break;
- case SFW_NOM_POLL_INT:
- if (length == 4)
- {
- proto_tree_add_item (sflow_tree,
- hf_docsis_tlv_sflow_nominal_polling, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SFW_POLL_JTTR_TOL:
- if (length == 4)
- {
- proto_tree_add_item (sflow_tree,
- hf_docsis_tlv_sflow_tolerated_jitter, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SFW_UG_SIZE:
- if (length == 2)
- {
- proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_ugs_size,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SFW_NOM_GRNT_INTV:
- if (length == 4)
- {
- proto_tree_add_item (sflow_tree,
- hf_docsis_tlv_sflow_nom_grant_intvl, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SFW_GRNT_JTTR_TOL:
- if (length == 4)
- {
- proto_tree_add_item (sflow_tree,
- hf_docsis_tlv_sflow_tol_grant_jitter, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SFW_GRNTS_PER_INTV:
- if (length == 1)
- {
- proto_tree_add_item (sflow_tree,
- hf_docsis_tlv_sflow_grants_per_intvl, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SFW_IP_TOS_OVERWRITE:
- if (length == 2)
- {
- proto_tree_add_item (sflow_tree,
- hf_docsis_tlv_sflow_ip_tos_overwrite, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SFW_UG_TIME_REF:
- if (length == 4)
- {
- proto_tree_add_item (sflow_tree,
- hf_docsis_tlv_sflow_ugs_timeref, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
+ }
+ break;
+ case SFW_SCHEDULING_TYPE:
+ if (length == 1)
+ {
+ proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_sched_type,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SFW_REQ_XMIT_POL:
+ dissect_reqxmit_policy (tvb, sflow_tree, pos);
+ break;
+ case SFW_NOM_POLL_INT:
+ if (length == 4)
+ {
+ proto_tree_add_item (sflow_tree,
+ hf_docsis_tlv_sflow_nominal_polling, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SFW_POLL_JTTR_TOL:
+ if (length == 4)
+ {
+ proto_tree_add_item (sflow_tree,
+ hf_docsis_tlv_sflow_tolerated_jitter, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SFW_UG_SIZE:
+ if (length == 2)
+ {
+ proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_ugs_size,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SFW_NOM_GRNT_INTV:
+ if (length == 4)
+ {
+ proto_tree_add_item (sflow_tree,
+ hf_docsis_tlv_sflow_nom_grant_intvl, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SFW_GRNT_JTTR_TOL:
+ if (length == 4)
+ {
+ proto_tree_add_item (sflow_tree,
+ hf_docsis_tlv_sflow_tol_grant_jitter, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SFW_GRNTS_PER_INTV:
+ if (length == 1)
+ {
+ proto_tree_add_item (sflow_tree,
+ hf_docsis_tlv_sflow_grants_per_intvl, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SFW_IP_TOS_OVERWRITE:
+ if (length == 2)
+ {
+ proto_tree_add_item (sflow_tree,
+ hf_docsis_tlv_sflow_ip_tos_overwrite, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SFW_UG_TIME_REF:
+ if (length == 4)
+ {
+ proto_tree_add_item (sflow_tree,
+ hf_docsis_tlv_sflow_ugs_timeref, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
} /* switch */
pos = pos + length;
@@ -1084,14 +1088,15 @@ dissect_sflow (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len,
guint8 type, length;
proto_tree *sflow_tree;
int pos = start;
+
if (direction == 24)
sflow_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_clsfr, NULL,
- "24 Upstream Service Flow (Length = %u)", len);
+ "24 Upstream Service Flow (Length = %u)", len);
else if (direction == 25)
sflow_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_clsfr, NULL,
- "25 Downstream Service Flow (Length = %u)", len);
+ "25 Downstream Service Flow (Length = %u)", len);
else
return;
@@ -1101,147 +1106,147 @@ dissect_sflow (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len,
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case SFW_REF:
- if (length == 2)
- {
- proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_ref, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SFW_ID:
- if (length == 4)
- {
- proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_id, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SFW_SID:
- if (length == 2)
- {
- proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_sid, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SFW_SERVICE_CLASS_NAME:
- proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_classname, tvb,
- pos, length, ENC_ASCII|ENC_NA);
- break;
- case SFW_ERRORS:
- dissect_sflow_err (tvb, sflow_tree, pos, length);
- break;
- case SFW_QOS_SET_TYPE:
- if (length == 1)
- {
- proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_qos_param,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SFW_TRAF_PRI:
- if (length == 1)
- {
- proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_traf_pri,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SFW_MAX_SUSTAINED:
- if (length == 4)
- {
- proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_max_sus,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SFW_MAX_BURST:
- if (length == 4)
- {
- proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_max_burst,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SFW_MIN_RSVD_TRAF:
- if (length == 4)
- {
- proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_min_traf,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SFW_MIN_RSVD_PACKETSIZE:
- if (length == 2)
- {
- proto_tree_add_item (sflow_tree,
- hf_docsis_tlv_sflow_ass_min_pkt_size, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SFW_ACTIVE_QOS_TIMEOUT:
- if (length == 2)
- {
- proto_tree_add_item (sflow_tree,
- hf_docsis_tlv_sflow_timeout_active, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SFW_ADMITT_QOS_TIMEOUT:
- if (length == 2)
- {
- proto_tree_add_item (sflow_tree,
- hf_docsis_tlv_sflow_timeout_admitted, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SFW_VENDOR_SPEC:
- proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_vendor_spec,
- tvb, pos, length, ENC_NA);
- break;
- default:
- if (direction == 24)
- dissect_upstream_sflow (tvb, sflow_tree, pos - 2, length);
- else
- dissect_downstream_sflow (tvb, sflow_tree, pos - 2, length);
- break;
+ case SFW_REF:
+ if (length == 2)
+ {
+ proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_ref, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SFW_ID:
+ if (length == 4)
+ {
+ proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_id, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SFW_SID:
+ if (length == 2)
+ {
+ proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_sid, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SFW_SERVICE_CLASS_NAME:
+ proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_classname, tvb,
+ pos, length, ENC_ASCII|ENC_NA);
+ break;
+ case SFW_ERRORS:
+ dissect_sflow_err (tvb, sflow_tree, pos, length);
+ break;
+ case SFW_QOS_SET_TYPE:
+ if (length == 1)
+ {
+ proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_qos_param,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SFW_TRAF_PRI:
+ if (length == 1)
+ {
+ proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_traf_pri,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SFW_MAX_SUSTAINED:
+ if (length == 4)
+ {
+ proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_max_sus,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SFW_MAX_BURST:
+ if (length == 4)
+ {
+ proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_max_burst,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SFW_MIN_RSVD_TRAF:
+ if (length == 4)
+ {
+ proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_min_traf,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SFW_MIN_RSVD_PACKETSIZE:
+ if (length == 2)
+ {
+ proto_tree_add_item (sflow_tree,
+ hf_docsis_tlv_sflow_ass_min_pkt_size, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SFW_ACTIVE_QOS_TIMEOUT:
+ if (length == 2)
+ {
+ proto_tree_add_item (sflow_tree,
+ hf_docsis_tlv_sflow_timeout_active, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SFW_ADMITT_QOS_TIMEOUT:
+ if (length == 2)
+ {
+ proto_tree_add_item (sflow_tree,
+ hf_docsis_tlv_sflow_timeout_admitted, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SFW_VENDOR_SPEC:
+ proto_tree_add_item (sflow_tree, hf_docsis_tlv_sflow_vendor_spec,
+ tvb, pos, length, ENC_NA);
+ break;
+ default:
+ if (direction == 24)
+ dissect_upstream_sflow (tvb, sflow_tree, pos - 2, length);
+ else
+ dissect_downstream_sflow (tvb, sflow_tree, pos - 2, length);
+ break;
} /* switch (type) */
pos = pos + length;
@@ -1256,9 +1261,10 @@ dissect_dot1q_clsfr (tvbuff_t * tvb, proto_tree * tree, int start,
guint8 type, length;
proto_tree *dot1qclsfr_tree;
int pos = start;
+
dot1qclsfr_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_cos, NULL,
- "11 801.1P/Q Classifiers (Length = %u)", len);
+ "11 801.1P/Q Classifiers (Length = %u)", len);
while (pos < (start + len))
{
@@ -1266,35 +1272,35 @@ dissect_dot1q_clsfr (tvbuff_t * tvb, proto_tree * tree, int start,
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case CFR_D1Q_USER_PRI:
- if (length == 2)
- {
- proto_tree_add_item (dot1qclsfr_tree,
- hf_docsis_tlv_dot1qclsfr_user_pri, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CFR_D1Q_VLAN_ID:
- if (length == 2)
- {
- proto_tree_add_item (dot1qclsfr_tree,
- hf_docsis_tlv_dot1qclsfr_vlanid, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CFR_D1Q_VENDOR_SPEC:
- proto_tree_add_item (dot1qclsfr_tree,
- hf_docsis_tlv_dot1qclsfr_vendorspec, tvb, pos,
- length, ENC_NA);
- break;
+ case CFR_D1Q_USER_PRI:
+ if (length == 2)
+ {
+ proto_tree_add_item (dot1qclsfr_tree,
+ hf_docsis_tlv_dot1qclsfr_user_pri, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CFR_D1Q_VLAN_ID:
+ if (length == 2)
+ {
+ proto_tree_add_item (dot1qclsfr_tree,
+ hf_docsis_tlv_dot1qclsfr_vlanid, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CFR_D1Q_VENDOR_SPEC:
+ proto_tree_add_item (dot1qclsfr_tree,
+ hf_docsis_tlv_dot1qclsfr_vendorspec, tvb, pos,
+ length, ENC_NA);
+ break;
} /* switch */
pos = pos + length;
@@ -1308,9 +1314,10 @@ dissect_eth_clsfr (tvbuff_t * tvb, proto_tree * tree, int start,
guint8 type, length;
proto_tree *ethclsfr_tree;
int pos = start;
+
ethclsfr_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_clsfr_eth, NULL,
- "10 Ethernet Classifiers (Length = %u)", len);
+ "10 Ethernet Classifiers (Length = %u)", len);
while (pos < (start + len))
{
@@ -1318,47 +1325,44 @@ dissect_eth_clsfr (tvbuff_t * tvb, proto_tree * tree, int start,
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case CFR_ETH_DST_MAC:
- if (length == 6)
- {
- proto_tree_add_item (ethclsfr_tree, hf_docsis_tlv_ethclsfr_dmac,
- tvb, pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CFR_ETH_SRC_MAC:
- if (length == 6)
- {
- proto_tree_add_item (ethclsfr_tree, hf_docsis_tlv_ethclsfr_smac,
- tvb, pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CFR_ETH_DSAP:
- if (length == 3)
- {
- proto_tree_add_item (ethclsfr_tree,
- hf_docsis_tlv_ethclsfr_ethertype, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
+ case CFR_ETH_DST_MAC:
+ if (length == 6)
+ {
+ proto_tree_add_item (ethclsfr_tree, hf_docsis_tlv_ethclsfr_dmac,
+ tvb, pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CFR_ETH_SRC_MAC:
+ if (length == 6)
+ {
+ proto_tree_add_item (ethclsfr_tree, hf_docsis_tlv_ethclsfr_smac,
+ tvb, pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CFR_ETH_DSAP:
+ if (length == 3)
+ {
+ proto_tree_add_item (ethclsfr_tree,
+ hf_docsis_tlv_ethclsfr_ethertype, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
} /* switch */
pos = pos + length;
} /* while */
-
-
-
}
static void
@@ -1368,9 +1372,10 @@ dissect_clsfr_err (tvbuff_t * tvb, proto_tree * tree, int start,
guint8 type, length;
proto_tree *err_tree;
int pos = start;
+
err_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_clsfr_err, NULL,
- "8 Classifier Error Encodings (Length = %u)", len);
+ "8 Classifier Error Encodings (Length = %u)", len);
while (pos < (start + len))
{
@@ -1378,44 +1383,41 @@ dissect_clsfr_err (tvbuff_t * tvb, proto_tree * tree, int start,
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case CFR_ERR_PARAM:
- if (length == 1)
- proto_tree_add_item (err_tree, hf_docsis_tlv_clsfr_err_param, tvb,
- pos, length, ENC_BIG_ENDIAN);
- else if (length == 2)
- {
- proto_tree_add_item (err_tree, hf_docsis_tlv_clsfr_err_param,
- tvb, pos, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item (err_tree, hf_docsis_tlv_clsfr_err_param,
- tvb, pos + 1, 1, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CFR_ERR_CODE:
- if (length == 1)
- {
- proto_tree_add_item (err_tree, hf_docsis_tlv_clsfr_err_code,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CFR_ERR_MSG:
- proto_tree_add_item (err_tree, hf_docsis_tlv_clsfr_err_msg, tvb,
- pos, length, ENC_ASCII|ENC_NA);
- break;
+ case CFR_ERR_PARAM:
+ if (length == 1)
+ proto_tree_add_item (err_tree, hf_docsis_tlv_clsfr_err_param, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ else if (length == 2)
+ {
+ proto_tree_add_item (err_tree, hf_docsis_tlv_clsfr_err_param,
+ tvb, pos, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item (err_tree, hf_docsis_tlv_clsfr_err_param,
+ tvb, pos + 1, 1, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CFR_ERR_CODE:
+ if (length == 1)
+ {
+ proto_tree_add_item (err_tree, hf_docsis_tlv_clsfr_err_code,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CFR_ERR_MSG:
+ proto_tree_add_item (err_tree, hf_docsis_tlv_clsfr_err_msg, tvb,
+ pos, length, ENC_ASCII|ENC_NA);
+ break;
} /* switch */
pos = pos + length;
} /* while */
-
-
-
}
static void
@@ -1425,9 +1427,10 @@ dissect_ip_classifier (tvbuff_t * tvb, proto_tree * tree, int start,
guint8 type, length;
proto_tree *ipclsfr_tree;
int pos = start;
+
ipclsfr_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_clsfr_ip, NULL,
- "9 IP Classifier (Length = %u)", len);
+ "9 IP Classifier (Length = %u)", len);
while (pos < (start + len))
{
@@ -1435,130 +1438,130 @@ dissect_ip_classifier (tvbuff_t * tvb, proto_tree * tree, int start,
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case CFR_IP_TOS_RANGE_MASK:
- if (length == 3)
- {
- proto_tree_add_item (ipclsfr_tree,
- hf_docsis_tlv_ipclsfr_tosmask, tvb, pos,
- length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CFR_IP_PROTO:
- if (length == 2)
- {
- proto_tree_add_item (ipclsfr_tree,
- hf_docsis_tlv_ipclsfr_ipproto, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CFR_IP_SOURCE_ADDR:
- if (length == 4)
- {
- proto_tree_add_item (ipclsfr_tree, hf_docsis_tlv_ipclsfr_src,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CFR_IP_SOURCE_MASK:
- if (length == 4)
- {
- proto_tree_add_item (ipclsfr_tree,
- hf_docsis_tlv_ipclsfr_srcmask, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CFR_IP_DEST_ADDR:
- if (length == 4)
- {
- proto_tree_add_item (ipclsfr_tree, hf_docsis_tlv_ipclsfr_dst,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CFR_IP_DEST_MASK:
- if (length == 4)
- {
- proto_tree_add_item (ipclsfr_tree,
- hf_docsis_tlv_ipclsfr_dstmask, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CFR_IP_SRCPORT_START:
- if (length == 2)
- {
- proto_tree_add_item (ipclsfr_tree,
- hf_docsis_tlv_ipclsfr_sport_start, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CFR_IP_SRCPORT_END:
- if (length == 2)
- {
- proto_tree_add_item (ipclsfr_tree,
- hf_docsis_tlv_ipclsfr_sport_end, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CFR_IP_DSTPORT_START:
- if (length == 2)
- {
- proto_tree_add_item (ipclsfr_tree,
- hf_docsis_tlv_ipclsfr_dport_start, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CFR_IP_DSTPORT_END:
- if (length == 2)
- {
- proto_tree_add_item (ipclsfr_tree,
- hf_docsis_tlv_ipclsfr_dport_end, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
+ case CFR_IP_TOS_RANGE_MASK:
+ if (length == 3)
+ {
+ proto_tree_add_item (ipclsfr_tree,
+ hf_docsis_tlv_ipclsfr_tosmask, tvb, pos,
+ length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CFR_IP_PROTO:
+ if (length == 2)
+ {
+ proto_tree_add_item (ipclsfr_tree,
+ hf_docsis_tlv_ipclsfr_ipproto, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CFR_IP_SOURCE_ADDR:
+ if (length == 4)
+ {
+ proto_tree_add_item (ipclsfr_tree, hf_docsis_tlv_ipclsfr_src,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CFR_IP_SOURCE_MASK:
+ if (length == 4)
+ {
+ proto_tree_add_item (ipclsfr_tree,
+ hf_docsis_tlv_ipclsfr_srcmask, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CFR_IP_DEST_ADDR:
+ if (length == 4)
+ {
+ proto_tree_add_item (ipclsfr_tree, hf_docsis_tlv_ipclsfr_dst,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CFR_IP_DEST_MASK:
+ if (length == 4)
+ {
+ proto_tree_add_item (ipclsfr_tree,
+ hf_docsis_tlv_ipclsfr_dstmask, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CFR_IP_SRCPORT_START:
+ if (length == 2)
+ {
+ proto_tree_add_item (ipclsfr_tree,
+ hf_docsis_tlv_ipclsfr_sport_start, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CFR_IP_SRCPORT_END:
+ if (length == 2)
+ {
+ proto_tree_add_item (ipclsfr_tree,
+ hf_docsis_tlv_ipclsfr_sport_end, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CFR_IP_DSTPORT_START:
+ if (length == 2)
+ {
+ proto_tree_add_item (ipclsfr_tree,
+ hf_docsis_tlv_ipclsfr_dport_start, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CFR_IP_DSTPORT_END:
+ if (length == 2)
+ {
+ proto_tree_add_item (ipclsfr_tree,
+ hf_docsis_tlv_ipclsfr_dport_end, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
} /* switch */
pos = pos + length;
} /* while */
-
}
+
static void
dissect_classifiers (tvbuff_t * tvb, proto_tree * tree, int start,
guint16 len, guint8 direction)
@@ -1566,16 +1569,17 @@ dissect_classifiers (tvbuff_t * tvb, proto_tree * tree, int start,
guint8 type, length;
proto_tree *clsfr_tree;
int pos = start;
+
if (direction == 22)
clsfr_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_clsfr, NULL,
- "22 Upstream Packet Classifier (Length = %u)",
- len);
+ "22 Upstream Packet Classifier (Length = %u)",
+ len);
else if (direction == 23)
clsfr_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_clsfr, NULL,
- "23 Downstream Packet Classifier (Length = %u)",
- len);
+ "23 Downstream Packet Classifier (Length = %u)",
+ len);
else
return;
@@ -1585,106 +1589,103 @@ dissect_classifiers (tvbuff_t * tvb, proto_tree * tree, int start,
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case CFR_REF:
- if (length == 1)
- {
- proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_ref, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CFR_ID:
- if (length == 2)
- {
- proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_id, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CFR_SFLOW_REF:
- if (length == 2)
- {
- proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_sflow_ref,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CFR_SFLOW_ID:
- if (length == 4)
- {
- proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_sflow_id,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CFR_RULE_PRI:
- if (length == 1)
- {
- proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_rule_pri,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CFR_ACT_STATE:
- if (length == 1)
- {
- proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_act_state,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CFR_DSA_ACTION:
- if (length == 1)
- {
- proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_dsc_act,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CFR_ERROR:
- dissect_clsfr_err (tvb, clsfr_tree, pos, length);
- break;
- case CFR_IP_CLASSIFIER:
- dissect_ip_classifier (tvb, clsfr_tree, pos, length);
- break;
- case CFR_ETH_CLASSIFIER:
- dissect_eth_clsfr (tvb, clsfr_tree, pos, length);
- break;
- case CFR_8021Q_CLASSIFIER:
- dissect_dot1q_clsfr (tvb, clsfr_tree, pos, length);
- break;
- case CFR_VENDOR_SPEC:
- proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_vendor_spc,
- tvb, pos, length, ENC_NA);
- break;
+ case CFR_REF:
+ if (length == 1)
+ {
+ proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_ref, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CFR_ID:
+ if (length == 2)
+ {
+ proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_id, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CFR_SFLOW_REF:
+ if (length == 2)
+ {
+ proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_sflow_ref,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CFR_SFLOW_ID:
+ if (length == 4)
+ {
+ proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_sflow_id,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CFR_RULE_PRI:
+ if (length == 1)
+ {
+ proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_rule_pri,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CFR_ACT_STATE:
+ if (length == 1)
+ {
+ proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_act_state,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CFR_DSA_ACTION:
+ if (length == 1)
+ {
+ proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_dsc_act,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CFR_ERROR:
+ dissect_clsfr_err (tvb, clsfr_tree, pos, length);
+ break;
+ case CFR_IP_CLASSIFIER:
+ dissect_ip_classifier (tvb, clsfr_tree, pos, length);
+ break;
+ case CFR_ETH_CLASSIFIER:
+ dissect_eth_clsfr (tvb, clsfr_tree, pos, length);
+ break;
+ case CFR_8021Q_CLASSIFIER:
+ dissect_dot1q_clsfr (tvb, clsfr_tree, pos, length);
+ break;
+ case CFR_VENDOR_SPEC:
+ proto_tree_add_item (clsfr_tree, hf_docsis_tlv_clsfr_vendor_spc,
+ tvb, pos, length, ENC_NA);
+ break;
} /* switch */
pos = pos + length;
} /* while */
-
-
-
}
static void
@@ -1694,9 +1695,10 @@ dissect_doc10cos (tvbuff_t * tvb, proto_tree * tree, int start,
guint8 type, length;
proto_tree *doc10cos_tree;
int pos = start;
+
doc10cos_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_cos, NULL,
- "1 Docsis 1.0 Class of Service (Length = %u)", len);
+ "1 Docsis 1.0 Class of Service (Length = %u)", len);
while (pos < (start + len))
{
@@ -1704,28 +1706,28 @@ dissect_doc10cos (tvbuff_t * tvb, proto_tree * tree, int start,
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case 1:
- if (length == 1)
- {
- proto_tree_add_item (doc10cos_tree, hf_docsis_tlv_cos_id, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case 2:
- if (length == 2)
- {
- proto_tree_add_item (doc10cos_tree, hf_docsis_tlv_cos_sid, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
+ case 1:
+ if (length == 1)
+ {
+ proto_tree_add_item (doc10cos_tree, hf_docsis_tlv_cos_id, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case 2:
+ if (length == 2)
+ {
+ proto_tree_add_item (doc10cos_tree, hf_docsis_tlv_cos_sid, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
} /* switch */
pos = pos + length;
@@ -1742,7 +1744,7 @@ dissect_modemcap (tvbuff_t * tvb, proto_tree * tree, int start,
mcap_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_mcap, NULL,
- "5 Modem Capabilities Type (Length = %u)", len);
+ "5 Modem Capabilities Type (Length = %u)", len);
while (pos < (start + len))
{
@@ -1750,450 +1752,449 @@ dissect_modemcap (tvbuff_t * tvb, proto_tree * tree, int start,
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case CAP_CONCAT:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_concat, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_DOCSIS_VER:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_docs_ver,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_FRAG:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_frag, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_PHS:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_phs, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_IGMP:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_igmp, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_PRIVACY:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_privacy, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_DOWN_SAID:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_down_said,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_UP_SID:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_up_sid, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_OPT_FILT:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_8021P_filter,
- tvb, pos, length, ENC_BIG_ENDIAN);
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_8021Q_filter,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_XMIT_EQPERSYM:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree,
- hf_docsis_tlv_mcap_xmit_eq_taps_per_sym,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_NUM_XMIT_EQ_TAPS:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_xmit_eq_taps,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_DCC:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_dcc, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_IP_FILTERS:
- if (length == 2)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_ip_filters, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_LLC_FILTERS:
- if (length == 2)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_llc_filters, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_EXP_UNICAST_SID:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_exp_unicast_sid, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_RNG_HOFF:
- if (length == 4)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_rnghoff_cm, tvb,
- pos, length, ENC_BIG_ENDIAN);
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_rnghoff_erouter, tvb,
- pos, length, ENC_BIG_ENDIAN);
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_rnghoff_emta, tvb,
- pos, length, ENC_BIG_ENDIAN);
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_rnghoff_estb, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_L2VPN:
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_l2vpn, tvb,
- pos, length, ENC_NA);
- break;
- case CAP_L2VPN_ESAFE:
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_l2vpn_esafe, tvb,
- pos, length, ENC_NA);
- break;
- case CAP_DUT_FILTERING:
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_dut_filtering, tvb,
- pos, length, ENC_NA);
- break;
- case CAP_US_FREQ_RNG:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_us_freq_range, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_US_SRATE:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_us_srate_160, tvb,
- pos, length, ENC_BIG_ENDIAN);
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_us_srate_320, tvb,
- pos, length, ENC_BIG_ENDIAN);
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_us_srate_640, tvb,
- pos, length, ENC_BIG_ENDIAN);
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_us_srate_1280, tvb,
- pos, length, ENC_BIG_ENDIAN);
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_us_srate_2560, tvb,
- pos, length, ENC_BIG_ENDIAN);
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_us_srate_5120, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_SAC:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_sac, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_CODE_HOP_M2:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_code_hop_mode2, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_MTC:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_mtc, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_512_MSPS_UTC:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_512_msps_utc, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_256_MSPS_UTC:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_256_msps_utc, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_TOTAL_SID_CLUST:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_total_sid_cluster, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_SID_PER_SF:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_sid_per_sf, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_MRC:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_mrc, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_TOTAL_DSID:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_total_dsid, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_RESEQ_DSID:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_reseq_dsid, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_MC_DSID:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_mc_dsid, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_MC_DSID_FWD:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_mc_dsid_fwd, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_FCTYPE_FWD:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_fctype_fwd, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_DPV:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_dpv_path, tvb,
- pos, length, ENC_BIG_ENDIAN);
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_dpv_packet, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_UGS:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_ugs, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_MAP_UCD:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_map_ucd, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_UDC:
- if (length == 2)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_udc, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_IPV6:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_ipv6, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CAP_EXT_US_TRNS_PWR:
- if (length == 1)
- {
- proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_ext_us_trans_power, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
+ case CAP_CONCAT:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_concat, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_DOCSIS_VER:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_docs_ver,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_FRAG:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_frag, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_PHS:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_phs, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_IGMP:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_igmp, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_PRIVACY:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_privacy, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_DOWN_SAID:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_down_said,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_UP_SID:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_up_sid, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_OPT_FILT:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_8021P_filter,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_8021Q_filter,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_XMIT_EQPERSYM:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree,
+ hf_docsis_tlv_mcap_xmit_eq_taps_per_sym,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_NUM_XMIT_EQ_TAPS:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_xmit_eq_taps,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_DCC:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_dcc, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_IP_FILTERS:
+ if (length == 2)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_ip_filters, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_LLC_FILTERS:
+ if (length == 2)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_llc_filters, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_EXP_UNICAST_SID:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_exp_unicast_sid, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_RNG_HOFF:
+ if (length == 4)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_rnghoff_cm, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_rnghoff_erouter, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_rnghoff_emta, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_rnghoff_estb, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_L2VPN:
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_l2vpn, tvb,
+ pos, length, ENC_NA);
+ break;
+ case CAP_L2VPN_ESAFE:
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_l2vpn_esafe, tvb,
+ pos, length, ENC_NA);
+ break;
+ case CAP_DUT_FILTERING:
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_dut_filtering, tvb,
+ pos, length, ENC_NA);
+ break;
+ case CAP_US_FREQ_RNG:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_us_freq_range, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_US_SRATE:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_us_srate_160, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_us_srate_320, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_us_srate_640, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_us_srate_1280, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_us_srate_2560, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_us_srate_5120, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_SAC:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_sac, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_CODE_HOP_M2:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_code_hop_mode2, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_MTC:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_mtc, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_512_MSPS_UTC:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_512_msps_utc, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_256_MSPS_UTC:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_256_msps_utc, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_TOTAL_SID_CLUST:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_total_sid_cluster, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_SID_PER_SF:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_sid_per_sf, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_MRC:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_mrc, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_TOTAL_DSID:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_total_dsid, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_RESEQ_DSID:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_reseq_dsid, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_MC_DSID:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_mc_dsid, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_MC_DSID_FWD:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_mc_dsid_fwd, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_FCTYPE_FWD:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_fctype_fwd, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_DPV:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_dpv_path, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_dpv_packet, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_UGS:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_ugs, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_MAP_UCD:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_map_ucd, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_UDC:
+ if (length == 2)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_udc, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_IPV6:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_ipv6, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CAP_EXT_US_TRNS_PWR:
+ if (length == 1)
+ {
+ proto_tree_add_item (mcap_tree, hf_docsis_tlv_mcap_ext_us_trans_power, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
} /* switch (type) */
pos = pos + length;
} /* while (pos < pos+len) */
-
}
static void
@@ -2205,7 +2206,7 @@ dissect_cos (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
cos_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_cos, NULL,
- "4 Class of Service Type (Length = %u)", len);
+ "4 Class of Service Type (Length = %u)", len);
while (pos < (start + len))
{
@@ -2213,88 +2214,87 @@ dissect_cos (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case COS_CLASSID:
- if (length == 1)
- {
- proto_tree_add_item (cos_tree, hf_docsis_tlv_cos_id, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case COS_MAX_DOWN:
- if (length == 4)
- {
- proto_tree_add_item (cos_tree, hf_docsis_tlv_cos_max_down, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case COS_MAX_UP:
- if (length == 4)
- {
- proto_tree_add_item (cos_tree, hf_docsis_tlv_cos_max_up, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case COS_UP_CH_PRIO:
- if (length == 1)
- {
- proto_tree_add_item (cos_tree, hf_docsis_tlv_cos_up_chnl_pri,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case COS_MIN_UP_RATE:
- if (length == 4)
- {
- proto_tree_add_item (cos_tree, hf_docsis_tlv_cos_min_grntd_up,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case COS_MAX_UP_BURST:
- if (length == 2)
- {
- proto_tree_add_item (cos_tree, hf_docsis_tlv_cos_max_up_burst,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case COS_BP_ENABLE:
- if (length == 1)
- {
- proto_tree_add_item (cos_tree, hf_docsis_tlv_cos_privacy_enable,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
+ case COS_CLASSID:
+ if (length == 1)
+ {
+ proto_tree_add_item (cos_tree, hf_docsis_tlv_cos_id, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case COS_MAX_DOWN:
+ if (length == 4)
+ {
+ proto_tree_add_item (cos_tree, hf_docsis_tlv_cos_max_down, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case COS_MAX_UP:
+ if (length == 4)
+ {
+ proto_tree_add_item (cos_tree, hf_docsis_tlv_cos_max_up, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case COS_UP_CH_PRIO:
+ if (length == 1)
+ {
+ proto_tree_add_item (cos_tree, hf_docsis_tlv_cos_up_chnl_pri,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case COS_MIN_UP_RATE:
+ if (length == 4)
+ {
+ proto_tree_add_item (cos_tree, hf_docsis_tlv_cos_min_grntd_up,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case COS_MAX_UP_BURST:
+ if (length == 2)
+ {
+ proto_tree_add_item (cos_tree, hf_docsis_tlv_cos_max_up_burst,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case COS_BP_ENABLE:
+ if (length == 1)
+ {
+ proto_tree_add_item (cos_tree, hf_docsis_tlv_cos_privacy_enable,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
- }
- break;
+ }
+ break;
} /* switch (type) */
pos = pos + length;
} /* while (pos < pos+len) */
-
}
static void
@@ -2336,16 +2336,16 @@ dissect_snmpv3_kickstart(tvbuff_t * tvb, proto_tree *tree, int start, guint16 le
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case SNMPV3_SEC_NAME:
- proto_tree_add_item (snmpv3_tree,
- hf_docsis_tlv_snmpv3_kick_name, tvb,
- pos, length, ENC_ASCII|ENC_NA);
- break;
- case SNMPV3_MGR_PUB_NUM:
- proto_tree_add_item (snmpv3_tree,
- hf_docsis_tlv_snmpv3_kick_publicnum, tvb,
- pos, length, ENC_NA);
- break;
+ case SNMPV3_SEC_NAME:
+ proto_tree_add_item (snmpv3_tree,
+ hf_docsis_tlv_snmpv3_kick_name, tvb,
+ pos, length, ENC_ASCII|ENC_NA);
+ break;
+ case SNMPV3_MGR_PUB_NUM:
+ proto_tree_add_item (snmpv3_tree,
+ hf_docsis_tlv_snmpv3_kick_publicnum, tvb,
+ pos, length, ENC_NA);
+ break;
} /* switch */
pos += length;
} /* while */
@@ -2358,9 +2358,10 @@ dissect_ds_ch_list_single (tvbuff_t * tvb, proto_tree * tree,
guint8 type, length;
proto_tree *single_tree;
int pos = start;
+
single_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_ds_ch_list_single, NULL,
- "1 Single Downstream Channel (Length = %u)", len);
+ "1 Single Downstream Channel (Length = %u)", len);
while (pos < (start + len))
{
@@ -2368,28 +2369,28 @@ dissect_ds_ch_list_single (tvbuff_t * tvb, proto_tree * tree,
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case SINGLE_CH_TIMEOUT:
- if (length == 2)
- {
- proto_tree_add_item (single_tree, hf_docsis_tlv_single_ch_timeout, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SINGLE_CH_FREQ:
- if (length == 4)
- {
- proto_tree_add_item (single_tree, hf_docsis_tlv_single_ch_freq, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
+ case SINGLE_CH_TIMEOUT:
+ if (length == 2)
+ {
+ proto_tree_add_item (single_tree, hf_docsis_tlv_single_ch_timeout, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SINGLE_CH_FREQ:
+ if (length == 4)
+ {
+ proto_tree_add_item (single_tree, hf_docsis_tlv_single_ch_freq, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -2402,9 +2403,10 @@ dissect_ds_ch_list_range (tvbuff_t * tvb, proto_tree * tree,
guint8 type, length;
proto_tree *range_tree;
int pos = start;
+
range_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_ds_ch_list_range, NULL,
- "2 Downstream Frequency Range (Length = %u)", len);
+ "2 Downstream Frequency Range (Length = %u)", len);
while (pos < (start + len))
{
@@ -2412,50 +2414,50 @@ dissect_ds_ch_list_range (tvbuff_t * tvb, proto_tree * tree,
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case FREQ_RNG_TIMEOUT:
- if (length == 2)
- {
- proto_tree_add_item (range_tree, hf_docsis_tlv_freq_rng_timeout, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case FREQ_RNG_START:
- if (length == 4)
- {
- proto_tree_add_item (range_tree, hf_docsis_tlv_freq_rng_start, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case FREQ_RNG_END:
- if (length == 4)
- {
- proto_tree_add_item (range_tree, hf_docsis_tlv_freq_rng_end, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case FREQ_RNG_STEP:
- if (length == 4)
- {
- proto_tree_add_item (range_tree, hf_docsis_tlv_freq_rng_step, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
+ case FREQ_RNG_TIMEOUT:
+ if (length == 2)
+ {
+ proto_tree_add_item (range_tree, hf_docsis_tlv_freq_rng_timeout, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case FREQ_RNG_START:
+ if (length == 4)
+ {
+ proto_tree_add_item (range_tree, hf_docsis_tlv_freq_rng_start, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case FREQ_RNG_END:
+ if (length == 4)
+ {
+ proto_tree_add_item (range_tree, hf_docsis_tlv_freq_rng_end, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case FREQ_RNG_STEP:
+ if (length == 4)
+ {
+ proto_tree_add_item (range_tree, hf_docsis_tlv_freq_rng_step, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -2468,9 +2470,10 @@ dissect_dut_filter (tvbuff_t * tvb, proto_tree * tree,
guint8 type, length;
proto_tree *dut_tree;
int pos = start;
+
dut_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_dut_filter, NULL,
- "Downstream Unencrypted Traffic (Length = %u)", len);
+ "Downstream Unencrypted Traffic (Length = %u)", len);
while (pos < (start + len))
{
@@ -2478,21 +2481,21 @@ dissect_dut_filter (tvbuff_t * tvb, proto_tree * tree,
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case DUT_CONTROL:
- if (length == 1)
- {
- proto_tree_add_item (dut_tree, hf_docsis_tlv_dut_filter_control, tvb,
- pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DUT_CMIM:
- proto_tree_add_item (dut_tree, hf_docsis_tlv_dut_filter_cmim, tvb,
- pos, length, ENC_NA);
- break;
+ case DUT_CONTROL:
+ if (length == 1)
+ {
+ proto_tree_add_item (dut_tree, hf_docsis_tlv_dut_filter_control, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DUT_CMIM:
+ proto_tree_add_item (dut_tree, hf_docsis_tlv_dut_filter_cmim, tvb,
+ pos, length, ENC_NA);
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -2504,9 +2507,10 @@ dissect_ds_ch_list(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
guint8 type, length;
proto_tree *dschlst_tree;
int pos = start;
+
dschlst_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_ds_ch_list, NULL,
- "41 Downstream Channel List (Length = %u)", len);
+ "41 Downstream Channel List (Length = %u)", len);
while (pos < (start + len))
{
@@ -2514,24 +2518,24 @@ dissect_ds_ch_list(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case DS_CH_LIST_SINGLE:
- dissect_ds_ch_list_single(tvb, dschlst_tree, pos, length);
- break;
- case DS_CH_LIST_RANGE:
- dissect_ds_ch_list_range(tvb, dschlst_tree, pos, length);
- break;
- case DS_CH_LIST_DEFAULT_TIMEOUT:
- if (length == 2)
- {
- proto_tree_add_item (dschlst_tree,
- hf_docsis_tlv_ds_ch_list_default_timeout, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
+ case DS_CH_LIST_SINGLE:
+ dissect_ds_ch_list_single(tvb, dschlst_tree, pos, length);
+ break;
+ case DS_CH_LIST_RANGE:
+ dissect_ds_ch_list_range(tvb, dschlst_tree, pos, length);
+ break;
+ case DS_CH_LIST_DEFAULT_TIMEOUT:
+ if (length == 2)
+ {
+ proto_tree_add_item (dschlst_tree,
+ hf_docsis_tlv_ds_ch_list_default_timeout, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -2543,9 +2547,10 @@ dissect_tcc_err(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
guint8 type, length;
proto_tree *tccerr_tree;
int pos = start;
+
tccerr_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_tcc_err, NULL,
- "TCC Error Encodings (Length = %u)", len);
+ "TCC Error Encodings (Length = %u)", len);
while (pos < (start + len))
{
@@ -2553,28 +2558,28 @@ dissect_tcc_err(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case TCC_ERR_SUBTYPE:
- proto_tree_add_item (tccerr_tree,
- hf_docsis_tcc_err_subtype, tvb,
- pos, length, ENC_NA);
- break;
- case TCC_ERR_CODE:
- if (length == 1)
- {
- proto_tree_add_item (tccerr_tree,
- hf_docsis_tcc_err_code, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TCC_ERR_MSG:
- proto_tree_add_item (tccerr_tree,
- hf_docsis_tcc_err_msg, tvb,
- pos, length, ENC_ASCII|ENC_NA);
- break;
+ case TCC_ERR_SUBTYPE:
+ proto_tree_add_item (tccerr_tree,
+ hf_docsis_tcc_err_subtype, tvb,
+ pos, length, ENC_NA);
+ break;
+ case TCC_ERR_CODE:
+ if (length == 1)
+ {
+ proto_tree_add_item (tccerr_tree,
+ hf_docsis_tcc_err_code, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TCC_ERR_MSG:
+ proto_tree_add_item (tccerr_tree,
+ hf_docsis_tcc_err_msg, tvb,
+ pos, length, ENC_ASCII|ENC_NA);
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -2586,9 +2591,10 @@ dissect_tcc_rng_parms(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
guint8 type, length;
proto_tree *rngparm_tree;
int pos = start;
+
rngparm_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_tcc_rng_parms, NULL,
- "Ranging Parameters (Length = %u)", len);
+ "Ranging Parameters (Length = %u)", len);
while (pos < (start + len))
{
@@ -2596,66 +2602,66 @@ dissect_tcc_rng_parms(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case RNG_PARMS_US_CH_ID:
- if (length == 1)
- {
- proto_tree_add_item (rngparm_tree,
- hf_docsis_rng_parms_us_ch_id, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case RNG_PARMS_TIME_OFF_INT:
- if (length == 4)
- {
- proto_tree_add_item (rngparm_tree,
- hf_docsis_rng_parms_time_off_int, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case RNG_PARMS_TIME_OFF_FRAC:
- if (length == 1)
- {
- proto_tree_add_item (rngparm_tree,
- hf_docsis_rng_parms_time_off_frac, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case RNG_PARMS_POWER_OFF:
- if (length == 1)
- {
- proto_tree_add_item (rngparm_tree,
- hf_docsis_rng_parms_power_off, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case RNG_PARMS_FREQ_OFF:
- if (length == 1)
- {
- proto_tree_add_item (rngparm_tree,
- hf_docsis_rng_parms_freq_off, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
+ case RNG_PARMS_US_CH_ID:
+ if (length == 1)
+ {
+ proto_tree_add_item (rngparm_tree,
+ hf_docsis_rng_parms_us_ch_id, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case RNG_PARMS_TIME_OFF_INT:
+ if (length == 4)
+ {
+ proto_tree_add_item (rngparm_tree,
+ hf_docsis_rng_parms_time_off_int, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case RNG_PARMS_TIME_OFF_FRAC:
+ if (length == 1)
+ {
+ proto_tree_add_item (rngparm_tree,
+ hf_docsis_rng_parms_time_off_frac, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case RNG_PARMS_POWER_OFF:
+ if (length == 1)
+ {
+ proto_tree_add_item (rngparm_tree,
+ hf_docsis_rng_parms_power_off, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case RNG_PARMS_FREQ_OFF:
+ if (length == 1)
+ {
+ proto_tree_add_item (rngparm_tree,
+ hf_docsis_rng_parms_freq_off, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -2667,9 +2673,10 @@ dissect_sid_cl_so_crit(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
guint8 type, length;
proto_tree *crit_tree;
int pos = start;
+
crit_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_sid_cl_so, NULL,
- "SID Cluster Switchover Criteria (Length = %u)", len);
+ "SID Cluster Switchover Criteria (Length = %u)", len);
while (pos < (start + len))
{
@@ -2677,54 +2684,54 @@ dissect_sid_cl_so_crit(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case SID_CL_SO_MAX_REQ:
- if (length == 1)
- {
- proto_tree_add_item (crit_tree,
- hf_docsis_sid_cl_so_max_req, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SID_CL_SO_MAX_OUT_BYTES:
- if (length == 4)
- {
- proto_tree_add_item (crit_tree,
- hf_docsis_sid_cl_so_max_out_bytes, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SID_CL_SO_MAX_REQ_BYTES:
- if (length == 4)
- {
- proto_tree_add_item (crit_tree,
- hf_docsis_sid_cl_so_max_req_bytes, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SID_CL_SO_MAX_TIME:
- if (length == 2)
- {
- proto_tree_add_item (crit_tree,
- hf_docsis_sid_cl_so_max_time, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
+ case SID_CL_SO_MAX_REQ:
+ if (length == 1)
+ {
+ proto_tree_add_item (crit_tree,
+ hf_docsis_sid_cl_so_max_req, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SID_CL_SO_MAX_OUT_BYTES:
+ if (length == 4)
+ {
+ proto_tree_add_item (crit_tree,
+ hf_docsis_sid_cl_so_max_out_bytes, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SID_CL_SO_MAX_REQ_BYTES:
+ if (length == 4)
+ {
+ proto_tree_add_item (crit_tree,
+ hf_docsis_sid_cl_so_max_req_bytes, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SID_CL_SO_MAX_TIME:
+ if (length == 2)
+ {
+ proto_tree_add_item (crit_tree,
+ hf_docsis_sid_cl_so_max_time, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -2736,9 +2743,10 @@ dissect_sid_cl_enc_map(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
guint8 type, length;
proto_tree *map_tree;
int pos = start;
+
map_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_sid_cl_enc_map, NULL,
- "SID-to-Channel Mapping (Length = %u)", len);
+ "SID-to-Channel Mapping (Length = %u)", len);
while (pos < (start + len))
{
@@ -2746,42 +2754,42 @@ dissect_sid_cl_enc_map(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case SID_CL_MAP_US_CH_ID:
- if (length == 1)
- {
- proto_tree_add_item (map_tree,
- hf_docsis_sid_cl_map_us_ch_id, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SID_CL_MAP_SID:
- if (length == 2)
- {
- proto_tree_add_item (map_tree,
- hf_docsis_sid_cl_map_sid, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SID_CL_MAP_ACTION:
- if (length == 1)
- {
- proto_tree_add_item (map_tree,
- hf_docsis_sid_cl_map_action, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
+ case SID_CL_MAP_US_CH_ID:
+ if (length == 1)
+ {
+ proto_tree_add_item (map_tree,
+ hf_docsis_sid_cl_map_us_ch_id, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SID_CL_MAP_SID:
+ if (length == 2)
+ {
+ proto_tree_add_item (map_tree,
+ hf_docsis_sid_cl_map_sid, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SID_CL_MAP_ACTION:
+ if (length == 1)
+ {
+ proto_tree_add_item (map_tree,
+ hf_docsis_sid_cl_map_action, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -2793,9 +2801,10 @@ dissect_sid_cl_enc(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
guint8 type, length;
proto_tree *enc_tree;
int pos = start;
+
enc_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_sid_cl_enc, NULL,
- "SID Cluster Encoding (Length = %u)", len);
+ "SID Cluster Encoding (Length = %u)", len);
while (pos < (start + len))
{
@@ -2803,24 +2812,24 @@ dissect_sid_cl_enc(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case SID_CL_ENC_ID:
- if (length == 1)
- {
- proto_tree_add_item (enc_tree,
- hf_docsis_sid_cl_enc_id, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SID_CL_ENC_MAP:
- if (length == 10)
- dissect_sid_cl_enc_map(tvb, enc_tree, pos, length);
- else
+ case SID_CL_ENC_ID:
+ if (length == 1)
+ {
+ proto_tree_add_item (enc_tree,
+ hf_docsis_sid_cl_enc_id, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SID_CL_ENC_MAP:
+ if (length == 10)
+ dissect_sid_cl_enc_map(tvb, enc_tree, pos, length);
+ else
THROW (ReportedBoundsError);
- break;
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -2832,9 +2841,10 @@ dissect_sid_cl(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
guint8 type, length;
proto_tree *sid_tree;
int pos = start;
+
sid_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_sid_cl, NULL,
- "47 Service Flow SID Cluster Assignments (Length = %u)", len);
+ "47 Service Flow SID Cluster Assignments (Length = %u)", len);
while (pos < (start + len))
{
@@ -2842,24 +2852,24 @@ dissect_sid_cl(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case SID_CL_SF_ID:
- if (length == 4)
- {
- proto_tree_add_item (sid_tree,
- hf_docsis_sid_cl_sf_id, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case SID_CL_ENC:
- dissect_sid_cl_enc(tvb, sid_tree, pos, length);
- break;
- case SID_CL_SO_CRIT:
- dissect_sid_cl_so_crit(tvb, sid_tree, pos, length);
- break;
+ case SID_CL_SF_ID:
+ if (length == 4)
+ {
+ proto_tree_add_item (sid_tree,
+ hf_docsis_sid_cl_sf_id, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case SID_CL_ENC:
+ dissect_sid_cl_enc(tvb, sid_tree, pos, length);
+ break;
+ case SID_CL_SO_CRIT:
+ dissect_sid_cl_so_crit(tvb, sid_tree, pos, length);
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -2876,7 +2886,7 @@ dissect_tcc(tvbuff_t * tvb, packet_info * pinfo _U_,
tcc_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_tcc, NULL,
- "46 Transmit Channel Configuration (Length = %u)", len);
+ "46 Transmit Channel Configuration (Length = %u)", len);
while (pos < (start + len))
{
@@ -2884,100 +2894,100 @@ dissect_tcc(tvbuff_t * tvb, packet_info * pinfo _U_,
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case TLV_TCC_REFID:
- if (length == 1)
- {
- proto_tree_add_item (tcc_tree,
- hf_docsis_tlv_tcc_refid, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_TCC_US_CH_ACTION:
- if (length == 1)
- {
- proto_tree_add_item (tcc_tree,
- hf_docsis_tlv_tcc_us_ch_action, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_TCC_US_CH_ID:
- if (length == 1)
- {
- proto_tree_add_item (tcc_tree,
- hf_docsis_tlv_tcc_us_ch_id, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_TCC_NEW_US_CH_ID:
- if (length == 1)
- {
- proto_tree_add_item (tcc_tree,
- hf_docsis_tlv_tcc_new_us_ch_id, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_TCC_UCD:
- ucd_tvb = tvb_new_subset_length (tvb, pos, length);
- call_dissector (docsis_ucd_handle, ucd_tvb, pinfo, tcc_tree);
- break;
- case TLV_TCC_RNG_SID:
- if (length == 2)
- {
- proto_tree_add_item (tcc_tree,
- hf_docsis_tlv_tcc_rng_sid, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_TCC_INIT_TECH:
- if (length == 1)
- {
- proto_tree_add_item (tcc_tree,
- hf_docsis_tlv_tcc_init_tech, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_TCC_RNG_PARMS:
- dissect_tcc_rng_parms(tvb, tcc_tree, pos, length);
- break;
- case TLV_TCC_DYN_RNG_WIN:
- if (length == 1)
- {
- proto_tree_add_item (tcc_tree,
- hf_docsis_tlv_tcc_dyn_rng_win, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_TCC_ERR:
- dissect_tcc_err(tvb, tcc_tree, pos, length);
- break;
+ case TLV_TCC_REFID:
+ if (length == 1)
+ {
+ proto_tree_add_item (tcc_tree,
+ hf_docsis_tlv_tcc_refid, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_TCC_US_CH_ACTION:
+ if (length == 1)
+ {
+ proto_tree_add_item (tcc_tree,
+ hf_docsis_tlv_tcc_us_ch_action, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_TCC_US_CH_ID:
+ if (length == 1)
+ {
+ proto_tree_add_item (tcc_tree,
+ hf_docsis_tlv_tcc_us_ch_id, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_TCC_NEW_US_CH_ID:
+ if (length == 1)
+ {
+ proto_tree_add_item (tcc_tree,
+ hf_docsis_tlv_tcc_new_us_ch_id, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_TCC_UCD:
+ ucd_tvb = tvb_new_subset_length (tvb, pos, length);
+ call_dissector (docsis_ucd_handle, ucd_tvb, pinfo, tcc_tree);
+ break;
+ case TLV_TCC_RNG_SID:
+ if (length == 2)
+ {
+ proto_tree_add_item (tcc_tree,
+ hf_docsis_tlv_tcc_rng_sid, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_TCC_INIT_TECH:
+ if (length == 1)
+ {
+ proto_tree_add_item (tcc_tree,
+ hf_docsis_tlv_tcc_init_tech, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_TCC_RNG_PARMS:
+ dissect_tcc_rng_parms(tvb, tcc_tree, pos, length);
+ break;
+ case TLV_TCC_DYN_RNG_WIN:
+ if (length == 1)
+ {
+ proto_tree_add_item (tcc_tree,
+ hf_docsis_tlv_tcc_dyn_rng_win, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_TCC_ERR:
+ dissect_tcc_err(tvb, tcc_tree, pos, length);
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -2989,9 +2999,10 @@ dissect_ch_bl_rng(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
guint8 type, length;
proto_tree *chblrng_tree;
int pos = start;
+
chblrng_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_rcp_ch_bl_rng, NULL,
- "Receive Module Channel Block Range (Length = %u)", len);
+ "Receive Module Channel Block Range (Length = %u)", len);
while (pos < (start + len))
{
@@ -2999,30 +3010,30 @@ dissect_ch_bl_rng(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case CH_BL_RNG_MIN_CTR_FREQ:
- if (length == 4)
- {
- proto_tree_add_item (chblrng_tree,
- hf_docsis_ch_bl_rng_min_ctr_freq, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CH_BL_RNG_MAX_CTR_FREQ:
- if (length == 4)
- {
- proto_tree_add_item (chblrng_tree,
- hf_docsis_ch_bl_rng_max_ctr_freq, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
+ case CH_BL_RNG_MIN_CTR_FREQ:
+ if (length == 4)
+ {
+ proto_tree_add_item (chblrng_tree,
+ hf_docsis_ch_bl_rng_min_ctr_freq, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CH_BL_RNG_MAX_CTR_FREQ:
+ if (length == 4)
+ {
+ proto_tree_add_item (chblrng_tree,
+ hf_docsis_ch_bl_rng_max_ctr_freq, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -3034,9 +3045,10 @@ dissect_rcp_rcv_mod(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
guint8 type, length;
proto_tree *rcvmod_tree;
int pos = start;
+
rcvmod_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_rcp_rcv_mod_enc, NULL,
- "Receive Module Capability (Length = %u)", len);
+ "Receive Module Capability (Length = %u)", len);
while (pos < (start + len))
{
@@ -3044,48 +3056,48 @@ dissect_rcp_rcv_mod(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case RCV_MOD_ENC_IDX:
- if (length == 1)
- {
- proto_tree_add_item (rcvmod_tree,
- hf_docsis_rcv_mod_enc_idx, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case RCV_MOD_ENC_CH_BL_RNG:
- dissect_ch_bl_rng(tvb, rcvmod_tree, pos, length);
- break;
- case RCV_MOD_ENC_CTR_FREQ_ASGN:
- if (length == 4)
- {
- proto_tree_add_item (rcvmod_tree,
- hf_docsis_rcv_mod_enc_ctr_freq_asgn, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case RCV_MOD_ENC_RSQ_CH_SUBS_CAP:
- proto_tree_add_item (rcvmod_tree,
- hf_docsis_rcv_mod_enc_rsq_ch_subs_cap, tvb, pos,
- length, ENC_NA);
- break;
- case RCV_MOD_ENC_CONN:
- proto_tree_add_item (rcvmod_tree,
- hf_docsis_rcv_mod_enc_conn, tvb, pos,
- length, ENC_NA);
- break;
- case RCV_MOD_ENC_PHY_LAYR_PARMS:
- proto_tree_add_item (rcvmod_tree,
- hf_docsis_rcv_mod_enc_phy_layr_parms, tvb, pos,
- length, ENC_NA);
- break;
+ case RCV_MOD_ENC_IDX:
+ if (length == 1)
+ {
+ proto_tree_add_item (rcvmod_tree,
+ hf_docsis_rcv_mod_enc_idx, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case RCV_MOD_ENC_CH_BL_RNG:
+ dissect_ch_bl_rng(tvb, rcvmod_tree, pos, length);
+ break;
+ case RCV_MOD_ENC_CTR_FREQ_ASGN:
+ if (length == 4)
+ {
+ proto_tree_add_item (rcvmod_tree,
+ hf_docsis_rcv_mod_enc_ctr_freq_asgn, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case RCV_MOD_ENC_RSQ_CH_SUBS_CAP:
+ proto_tree_add_item (rcvmod_tree,
+ hf_docsis_rcv_mod_enc_rsq_ch_subs_cap, tvb, pos,
+ length, ENC_NA);
+ break;
+ case RCV_MOD_ENC_CONN:
+ proto_tree_add_item (rcvmod_tree,
+ hf_docsis_rcv_mod_enc_conn, tvb, pos,
+ length, ENC_NA);
+ break;
+ case RCV_MOD_ENC_PHY_LAYR_PARMS:
+ proto_tree_add_item (rcvmod_tree,
+ hf_docsis_rcv_mod_enc_phy_layr_parms, tvb, pos,
+ length, ENC_NA);
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -3097,9 +3109,10 @@ dissect_rcp_rcv_ch(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
guint8 type, length;
proto_tree *rcvch_tree;
int pos = start;
+
rcvch_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_rcp_rcv_ch, NULL,
- "Receive Channels (Length = %u)", len);
+ "Receive Channels (Length = %u)", len);
while (pos < (start + len))
{
@@ -3107,47 +3120,47 @@ dissect_rcp_rcv_ch(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case RCV_CH_IDX:
- if (length == 1)
- {
- proto_tree_add_item (rcvch_tree,
- hf_docsis_rcv_ch_idx, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case RCV_CH_CONN:
- proto_tree_add_item (rcvch_tree,
- hf_docsis_rcv_ch_conn, tvb, pos,
- length, ENC_NA);
- break;
- case RCV_CH_CONN_OFF:
- if (length == 1)
- {
- proto_tree_add_item (rcvch_tree,
- hf_docsis_rcv_ch_conn_off, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case RCV_CH_PRIM_DS_CH_IND:
- if (length == 1)
- {
- proto_tree_add_item (rcvch_tree,
- hf_docsis_rcv_ch_prim_ds_ch_ind, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
+ case RCV_CH_IDX:
+ if (length == 1)
+ {
+ proto_tree_add_item (rcvch_tree,
+ hf_docsis_rcv_ch_idx, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case RCV_CH_CONN:
+ proto_tree_add_item (rcvch_tree,
+ hf_docsis_rcv_ch_conn, tvb, pos,
+ length, ENC_NA);
+ break;
+ case RCV_CH_CONN_OFF:
+ if (length == 1)
+ {
+ proto_tree_add_item (rcvch_tree,
+ hf_docsis_rcv_ch_conn_off, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case RCV_CH_PRIM_DS_CH_IND:
+ if (length == 1)
+ {
+ proto_tree_add_item (rcvch_tree,
+ hf_docsis_rcv_ch_prim_ds_ch_ind, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -3165,7 +3178,7 @@ dissect_rcp(tvbuff_t * tvb, packet_info * pinfo _U_,
rcp_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_rcp, NULL,
- "48 Receive Channel Profile (Length = %u)", len);
+ "48 Receive Channel Profile (Length = %u)", len);
while (pos < (start + len))
{
@@ -3173,52 +3186,52 @@ dissect_rcp(tvbuff_t * tvb, packet_info * pinfo _U_,
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case TLV_RCP_ID:
- if (length == 5)
- {
- proto_tree_add_item (rcp_tree,
- hf_docsis_tlv_rcp_id, tvb, pos,
- length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_RCP_NAME:
- if (length <= 15)
- {
- proto_tree_add_item (rcp_tree,
- hf_docsis_tlv_rcp_name, tvb, pos,
- length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_RCP_FREQ_SPC:
- if (length == 1)
- {
- proto_tree_add_item (rcp_tree,
- hf_docsis_tlv_rcp_freq_spc, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_RCP_RCV_MOD_ENC:
- dissect_rcp_rcv_mod(tvb, rcp_tree, pos, length);
- break;
- case TLV_RCP_RCV_CH:
- dissect_rcp_rcv_ch(tvb, rcp_tree, pos, length);
- break;
- case TLV_RCP_VEN_SPEC:
- vsif_tvb = tvb_new_subset_length (tvb, pos, length);
- call_dissector (docsis_vsif_handle, vsif_tvb, pinfo, rcp_tree);
- break;
+ case TLV_RCP_ID:
+ if (length == 5)
+ {
+ proto_tree_add_item (rcp_tree,
+ hf_docsis_tlv_rcp_id, tvb, pos,
+ length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_RCP_NAME:
+ if (length <= 15)
+ {
+ proto_tree_add_item (rcp_tree,
+ hf_docsis_tlv_rcp_name, tvb, pos,
+ length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_RCP_FREQ_SPC:
+ if (length == 1)
+ {
+ proto_tree_add_item (rcp_tree,
+ hf_docsis_tlv_rcp_freq_spc, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_RCP_RCV_MOD_ENC:
+ dissect_rcp_rcv_mod(tvb, rcp_tree, pos, length);
+ break;
+ case TLV_RCP_RCV_CH:
+ dissect_rcp_rcv_ch(tvb, rcp_tree, pos, length);
+ break;
+ case TLV_RCP_VEN_SPEC:
+ vsif_tvb = tvb_new_subset_length (tvb, pos, length);
+ call_dissector (docsis_vsif_handle, vsif_tvb, pinfo, rcp_tree);
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -3230,9 +3243,10 @@ dissect_rcc_rcv_mod(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
guint8 type, length;
proto_tree *rcvmod_tree;
int pos = start;
+
rcvmod_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_rcc_rcv_mod_enc, NULL,
- "Receive Module Assignment (Length = %u)", len);
+ "Receive Module Assignment (Length = %u)", len);
while (pos < (start + len))
{
@@ -3240,35 +3254,35 @@ dissect_rcc_rcv_mod(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case RCV_MOD_ENC_IDX:
- if (length == 1)
- {
- proto_tree_add_item (rcvmod_tree,
- hf_docsis_rcc_rcv_mod_enc_idx, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case RCV_MOD_ENC_CTR_FREQ_ASGN:
- if (length == 4)
- {
- proto_tree_add_item (rcvmod_tree,
- hf_docsis_rcc_rcv_mod_enc_ctr_freq_asgn, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case RCV_MOD_ENC_CONN:
- proto_tree_add_item (rcvmod_tree,
- hf_docsis_rcc_rcv_mod_enc_conn, tvb, pos,
- length, ENC_NA);
- break;
+ case RCV_MOD_ENC_IDX:
+ if (length == 1)
+ {
+ proto_tree_add_item (rcvmod_tree,
+ hf_docsis_rcc_rcv_mod_enc_idx, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case RCV_MOD_ENC_CTR_FREQ_ASGN:
+ if (length == 4)
+ {
+ proto_tree_add_item (rcvmod_tree,
+ hf_docsis_rcc_rcv_mod_enc_ctr_freq_asgn, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case RCV_MOD_ENC_CONN:
+ proto_tree_add_item (rcvmod_tree,
+ hf_docsis_rcc_rcv_mod_enc_conn, tvb, pos,
+ length, ENC_NA);
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -3280,9 +3294,10 @@ dissect_rcc_rcv_ch(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
guint8 type, length;
proto_tree *rcvch_tree;
int pos = start;
+
rcvch_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_rcc_rcv_ch, NULL,
- "Receive Channels (Length = %u)", len);
+ "Receive Channels (Length = %u)", len);
while (pos < (start + len))
{
@@ -3290,47 +3305,47 @@ dissect_rcc_rcv_ch(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case RCV_CH_IDX:
- if (length == 1)
- {
- proto_tree_add_item (rcvch_tree,
- hf_docsis_rcc_rcv_ch_idx, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case RCV_CH_CONN:
- proto_tree_add_item (rcvch_tree,
- hf_docsis_rcc_rcv_ch_conn, tvb, pos,
- length, ENC_NA);
- break;
- case RCV_CH_CTR_FREQ_ASGN:
- if (length == 4)
- {
- proto_tree_add_item (rcvch_tree,
- hf_docsis_rcc_rcv_ch_ctr_freq_asgn, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case RCV_CH_PRIM_DS_CH_IND:
- if (length == 1)
- {
- proto_tree_add_item (rcvch_tree,
- hf_docsis_rcc_rcv_ch_prim_ds_ch_ind, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
+ case RCV_CH_IDX:
+ if (length == 1)
+ {
+ proto_tree_add_item (rcvch_tree,
+ hf_docsis_rcc_rcv_ch_idx, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case RCV_CH_CONN:
+ proto_tree_add_item (rcvch_tree,
+ hf_docsis_rcc_rcv_ch_conn, tvb, pos,
+ length, ENC_NA);
+ break;
+ case RCV_CH_CTR_FREQ_ASGN:
+ if (length == 4)
+ {
+ proto_tree_add_item (rcvch_tree,
+ hf_docsis_rcc_rcv_ch_ctr_freq_asgn, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case RCV_CH_PRIM_DS_CH_IND:
+ if (length == 1)
+ {
+ proto_tree_add_item (rcvch_tree,
+ hf_docsis_rcc_rcv_ch_prim_ds_ch_ind, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -3342,9 +3357,10 @@ dissect_rcc_err(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
guint8 type, length;
proto_tree *err_tree;
int pos = start;
+
err_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_rcc_rcv_ch, NULL,
- "RCC Error Encodings (Length = %u)", len);
+ "RCC Error Encodings (Length = %u)", len);
while (pos < (start + len))
{
@@ -3352,59 +3368,59 @@ dissect_rcc_err(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case RCC_ERR_MOD_OR_CH:
- if (length == 1)
- {
- proto_tree_add_item (err_tree,
- hf_docsis_tlv_rcc_err_mod_or_ch, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case RCC_ERR_IDX:
- if (length == 1)
- {
- proto_tree_add_item (err_tree,
- hf_docsis_tlv_rcc_err_idx, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case RCC_ERR_PARAM:
- if (length == 1)
- {
- proto_tree_add_item (err_tree,
- hf_docsis_tlv_rcc_err_param, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case RCC_ERR_CODE:
- if (length == 1)
- {
- proto_tree_add_item (err_tree,
- hf_docsis_tlv_rcc_err_code, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case RCC_ERR_MSG:
- proto_tree_add_item (err_tree,
- hf_docsis_tlv_rcc_err_msg, tvb, pos,
- length, ENC_NA);
- break;
+ case RCC_ERR_MOD_OR_CH:
+ if (length == 1)
+ {
+ proto_tree_add_item (err_tree,
+ hf_docsis_tlv_rcc_err_mod_or_ch, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case RCC_ERR_IDX:
+ if (length == 1)
+ {
+ proto_tree_add_item (err_tree,
+ hf_docsis_tlv_rcc_err_idx, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case RCC_ERR_PARAM:
+ if (length == 1)
+ {
+ proto_tree_add_item (err_tree,
+ hf_docsis_tlv_rcc_err_param, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case RCC_ERR_CODE:
+ if (length == 1)
+ {
+ proto_tree_add_item (err_tree,
+ hf_docsis_tlv_rcc_err_code, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case RCC_ERR_MSG:
+ proto_tree_add_item (err_tree,
+ hf_docsis_tlv_rcc_err_msg, tvb, pos,
+ length, ENC_NA);
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -3421,7 +3437,7 @@ dissect_rcc(tvbuff_t * tvb, packet_info * pinfo _U_,
rcc_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_rcc, NULL,
- "49 Receive Channel Configuration (Length = %u)", len);
+ "49 Receive Channel Configuration (Length = %u)", len);
while (pos < (start + len))
{
@@ -3429,31 +3445,31 @@ dissect_rcc(tvbuff_t * tvb, packet_info * pinfo _U_,
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case TLV_RCP_ID:
- if (length == 5)
- {
- proto_tree_add_item (rcc_tree,
- hf_docsis_tlv_rcc_id, tvb, pos,
- length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_RCP_RCV_MOD_ENC:
- dissect_rcc_rcv_mod(tvb, rcc_tree, pos, length);
- break;
- case TLV_RCP_RCV_CH:
- dissect_rcc_rcv_ch(tvb, rcc_tree, pos, length);
- break;
- case TLV_RCP_VEN_SPEC:
- vsif_tvb = tvb_new_subset_length (tvb, pos, length);
- call_dissector (docsis_vsif_handle, vsif_tvb, pinfo, rcc_tree);
- break;
- case TLV_RCC_ERR:
- dissect_rcc_err(tvb, rcc_tree, pos, length);
- break;
+ case TLV_RCP_ID:
+ if (length == 5)
+ {
+ proto_tree_add_item (rcc_tree,
+ hf_docsis_tlv_rcc_id, tvb, pos,
+ length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_RCP_RCV_MOD_ENC:
+ dissect_rcc_rcv_mod(tvb, rcc_tree, pos, length);
+ break;
+ case TLV_RCP_RCV_CH:
+ dissect_rcc_rcv_ch(tvb, rcc_tree, pos, length);
+ break;
+ case TLV_RCP_VEN_SPEC:
+ vsif_tvb = tvb_new_subset_length (tvb, pos, length);
+ call_dissector (docsis_vsif_handle, vsif_tvb, pinfo, rcc_tree);
+ break;
+ case TLV_RCC_ERR:
+ dissect_rcc_err(tvb, rcc_tree, pos, length);
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -3465,9 +3481,10 @@ dissect_dsid_ds_reseq(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
guint8 type, length;
proto_tree *dsid_tree;
int pos = start;
+
dsid_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_dsid_ds_reseq, NULL,
- "Resequencing DSID (Length = %u)", len);
+ "Resequencing DSID (Length = %u)", len);
while (pos < (start + len))
{
@@ -3475,59 +3492,59 @@ dissect_dsid_ds_reseq(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case DS_RESEQ_DSID:
- if (length == 1)
- {
- proto_tree_add_item (dsid_tree,
- hf_docsis_ds_reseq_dsid, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DS_RESEQ_CH_LST:
- proto_tree_add_item (dsid_tree,
- hf_docsis_ds_reseq_ch_lst, tvb, pos,
- length, ENC_NA);
- break;
- case DS_RESEQ_WAIT_TIME:
- if (length == 1)
- {
- proto_tree_add_item (dsid_tree,
- hf_docsis_ds_reseq_wait_time, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DS_RESEQ_WARN_THRESH:
- if (length == 1)
- {
- proto_tree_add_item (dsid_tree,
- hf_docsis_ds_reseq_warn_thresh, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case DS_RESEQ_HO_TIMER:
- if (length == 2)
- {
- proto_tree_add_item (dsid_tree,
- hf_docsis_ds_reseq_ho_timer, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
+ case DS_RESEQ_DSID:
+ if (length == 1)
+ {
+ proto_tree_add_item (dsid_tree,
+ hf_docsis_ds_reseq_dsid, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DS_RESEQ_CH_LST:
+ proto_tree_add_item (dsid_tree,
+ hf_docsis_ds_reseq_ch_lst, tvb, pos,
+ length, ENC_NA);
+ break;
+ case DS_RESEQ_WAIT_TIME:
+ if (length == 1)
+ {
+ proto_tree_add_item (dsid_tree,
+ hf_docsis_ds_reseq_wait_time, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DS_RESEQ_WARN_THRESH:
+ if (length == 1)
+ {
+ proto_tree_add_item (dsid_tree,
+ hf_docsis_ds_reseq_warn_thresh, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case DS_RESEQ_HO_TIMER:
+ if (length == 2)
+ {
+ proto_tree_add_item (dsid_tree,
+ hf_docsis_ds_reseq_ho_timer, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -3539,9 +3556,10 @@ dissect_dsid_mc_addr(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
guint8 type, length;
proto_tree *dsid_tree;
int pos = start;
+
dsid_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_dsid_mc_addr, NULL,
- "Client MAC Address Encodings (Length = %u)", len);
+ "Client MAC Address Encodings (Length = %u)", len);
while (pos < (start + len))
{
@@ -3549,30 +3567,30 @@ dissect_dsid_mc_addr(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case MC_ADDR_ACTION:
- if (length == 1)
- {
- proto_tree_add_item (dsid_tree,
- hf_docsis_mc_addr_action, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case MC_ADDR_ADDR:
- if (length == 6)
- {
- proto_tree_add_item (dsid_tree,
- hf_docsis_mc_addr_addr, tvb, pos,
- length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
+ case MC_ADDR_ACTION:
+ if (length == 1)
+ {
+ proto_tree_add_item (dsid_tree,
+ hf_docsis_mc_addr_action, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case MC_ADDR_ADDR:
+ if (length == 6)
+ {
+ proto_tree_add_item (dsid_tree,
+ hf_docsis_mc_addr_addr, tvb, pos,
+ length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -3584,9 +3602,10 @@ dissect_dsid_mc(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
guint8 type, length;
proto_tree *dsid_tree;
int pos = start;
+
dsid_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_dsid_mc, NULL,
- "Multicast Encodings (Length = %u)", len);
+ "Multicast Encodings (Length = %u)", len);
while (pos < (start + len))
{
@@ -3594,22 +3613,22 @@ dissect_dsid_mc(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case TLV_DSID_MC_ADDR:
- dissect_dsid_mc_addr(tvb, dsid_tree, pos, length);
- break;
- case TLV_DSID_MC_CMIM:
- proto_tree_add_item (dsid_tree,
- hf_docsis_tlv_dsid_mc_cmim, tvb, pos,
- length, ENC_NA);
- break;
- case TLV_DSID_MC_GROUP:
- proto_tree_add_item (dsid_tree,
- hf_docsis_tlv_dsid_mc_group, tvb, pos,
- length, ENC_NA);
- break;
- case TLV_DSID_MC_PHS:
- dissect_phs(tvb, dsid_tree, pos, length);
- break;
+ case TLV_DSID_MC_ADDR:
+ dissect_dsid_mc_addr(tvb, dsid_tree, pos, length);
+ break;
+ case TLV_DSID_MC_CMIM:
+ proto_tree_add_item (dsid_tree,
+ hf_docsis_tlv_dsid_mc_cmim, tvb, pos,
+ length, ENC_NA);
+ break;
+ case TLV_DSID_MC_GROUP:
+ proto_tree_add_item (dsid_tree,
+ hf_docsis_tlv_dsid_mc_group, tvb, pos,
+ length, ENC_NA);
+ break;
+ case TLV_DSID_MC_PHS:
+ dissect_phs(tvb, dsid_tree, pos, length);
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -3621,9 +3640,10 @@ dissect_dsid(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
guint8 type, length;
proto_tree *dsid_tree;
int pos = start;
+
dsid_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_dsid, NULL,
- "50 DSID Encodings (Length = %u)", len);
+ "50 DSID Encodings (Length = %u)", len);
while (pos < (start + len))
{
@@ -3631,36 +3651,36 @@ dissect_dsid(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case TLV_DSID_ID:
- if (length == 3)
- {
- proto_tree_add_item (dsid_tree,
- hf_docsis_tlv_dsid_id, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_DSID_ACTION:
- if (length == 1)
- {
- proto_tree_add_item (dsid_tree,
- hf_docsis_tlv_dsid_action, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_DSID_DS_RESEQ:
- dissect_dsid_ds_reseq(tvb, dsid_tree, pos, length);
- break;
- case TLV_DSID_MC:
- dissect_dsid_mc(tvb, dsid_tree, pos, length);
- break;
+ case TLV_DSID_ID:
+ if (length == 3)
+ {
+ proto_tree_add_item (dsid_tree,
+ hf_docsis_tlv_dsid_id, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_DSID_ACTION:
+ if (length == 1)
+ {
+ proto_tree_add_item (dsid_tree,
+ hf_docsis_tlv_dsid_action, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_DSID_DS_RESEQ:
+ dissect_dsid_ds_reseq(tvb, dsid_tree, pos, length);
+ break;
+ case TLV_DSID_MC:
+ dissect_dsid_mc(tvb, dsid_tree, pos, length);
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -3672,9 +3692,10 @@ dissect_sec_assoc(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
guint8 type, length;
proto_tree *sec_tree;
int pos = start;
+
sec_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_dsid, NULL,
- "51 Security Association Encodings (Length = %u)", len);
+ "51 Security Association Encodings (Length = %u)", len);
while (pos < (start + len))
{
@@ -3682,30 +3703,30 @@ dissect_sec_assoc(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case TLV_SEC_ASSOC_ACTION:
- if (length == 1)
- {
- proto_tree_add_item (sec_tree,
- hf_docsis_tlv_sec_assoc_action, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_SEC_ASSOC_DESC:
- if (length == 14)
- {
- proto_tree_add_item (sec_tree,
- hf_docsis_tlv_sec_assoc_desc, tvb, pos,
- length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
+ case TLV_SEC_ASSOC_ACTION:
+ if (length == 1)
+ {
+ proto_tree_add_item (sec_tree,
+ hf_docsis_tlv_sec_assoc_action, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_SEC_ASSOC_DESC:
+ if (length == 14)
+ {
+ proto_tree_add_item (sec_tree,
+ hf_docsis_tlv_sec_assoc_desc, tvb, pos,
+ length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -3717,9 +3738,10 @@ dissect_ch_asgn(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
guint8 type, length;
proto_tree *asgn_tree;
int pos = start;
+
asgn_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_tlv_ch_asgn, NULL,
- "56 Channel Assignment Configuration Settings (Length = %u)", len);
+ "56 Channel Assignment Configuration Settings (Length = %u)", len);
while (pos < (start + len))
{
@@ -3727,30 +3749,30 @@ dissect_ch_asgn(tvbuff_t * tvb, proto_tree *tree, int start, guint16 len)
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case TLV_CH_ASGN_US_CH_ID:
- if (length == 1)
- {
- proto_tree_add_item (asgn_tree,
- hf_docsis_ch_asgn_us_ch_id, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_CH_ASGN_RX_FREQ:
- if (length == 4)
- {
- proto_tree_add_item (asgn_tree,
- hf_docsis_ch_asgn_rx_freq, tvb, pos,
- length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
+ case TLV_CH_ASGN_US_CH_ID:
+ if (length == 1)
+ {
+ proto_tree_add_item (asgn_tree,
+ hf_docsis_ch_asgn_us_ch_id, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_CH_ASGN_RX_FREQ:
+ if (length == 4)
+ {
+ proto_tree_add_item (asgn_tree,
+ hf_docsis_ch_asgn_rx_freq, tvb, pos,
+ length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -3762,9 +3784,10 @@ dissect_cmts_mc_sess_enc(tvbuff_t * tvb, proto_tree *tree, int start, guint16 le
guint8 type, length;
proto_tree *mc_tree;
int pos = start;
+
mc_tree =
proto_tree_add_subtree_format(tree, tvb, start, len, ett_docsis_cmts_mc_sess_enc, NULL,
- "64 CMTS Static Multicast Session Encoding (Length = %u)", len);
+ "64 CMTS Static Multicast Session Encoding (Length = %u)", len);
while (pos < (start + len))
{
@@ -3772,30 +3795,30 @@ dissect_cmts_mc_sess_enc(tvbuff_t * tvb, proto_tree *tree, int start, guint16 le
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case CMTS_MC_SESS_ENC_GRP:
- if (length == 4 || length == 16)
- {
- proto_tree_add_item (mc_tree,
- hf_docsis_cmts_mc_sess_enc_grp, tvb, pos,
- length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case CMTS_MC_SESS_ENC_SRC:
- if (length == 4 || length == 16)
- {
- proto_tree_add_item (mc_tree,
- hf_docsis_cmts_mc_sess_enc_src, tvb, pos,
- length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
+ case CMTS_MC_SESS_ENC_GRP:
+ if (length == 4 || length == 16)
+ {
+ proto_tree_add_item (mc_tree,
+ hf_docsis_cmts_mc_sess_enc_grp, tvb, pos,
+ length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case CMTS_MC_SESS_ENC_SRC:
+ if (length == 4 || length == 16)
+ {
+ proto_tree_add_item (mc_tree,
+ hf_docsis_cmts_mc_sess_enc_src, tvb, pos,
+ length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
} /* switch */
pos = pos + length;
} /* while */
@@ -3827,415 +3850,415 @@ dissect_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case TLV_DOWN_FREQ:
- /* This is ugly. There are multiple type 1 TLV's that may appear
- * in the TLV data, the problem is that they are dependent on
- * message type. */
- if (length == 4)
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_down_freq, tvb,
- pos, length, ENC_BIG_ENDIAN);
- else if (length == 1)
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_rng_tech, tvb,
- pos, length, ENC_BIG_ENDIAN);
- else
- dissect_doc10cos (tvb, tlv_tree, pos, length);
- break;
- case TLV_CHNL_ID:
- if (length == 1)
- {
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_upstream_chid,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_NET_ACCESS:
- if (length == 1)
- {
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_net_access,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_COS:
- dissect_cos (tvb, tlv_tree, pos, length);
- break;
- case TLV_MODEM_CAP:
- dissect_modemcap (tvb, tlv_tree, pos, length);
- break;
- case TLV_CM_MIC:
- if (length == 16)
- {
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_cm_mic, tvb,
- pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_CMTS_MIC:
- if (length == 16)
- {
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_cmts_mic, tvb,
- pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_VENDOR_ID:
- if (length == 3)
- {
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_vendor_id, tvb,
- pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_SW_UPG_FILE:
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_sw_file, tvb, pos,
- length, ENC_ASCII|ENC_NA);
- break;
- case TLV_SNMP_WRITE_CTRL:
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_snmp_access, tvb,
- pos, length, ENC_NA);
- break;
- case TLV_SNMP_OBJECT:
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_snmp_obj, tvb,
- pos, length, ENC_NA);
- break;
- case TLV_MODEM_IP:
- if (length == 4)
- {
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_modem_addr,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_SVC_UNAVAIL:
- if (length == 3)
- {
- dissect_svc_unavail(tvb, tlv_tree, pos, length);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_ETHERNET_MAC:
- if (length == 6)
- {
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_cpe_ethernet,
- tvb, pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_TEL_SETTINGS:
- break;
- case TLV_BPI_CONFIG:
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_bpi, tvb,
- pos, length, ENC_NA);
- break;
- case TLV_MAX_CPES:
- if (length == 1)
- {
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_max_cpe, tvb,
+ case TLV_DOWN_FREQ:
+ /* This is ugly. There are multiple type 1 TLV's that may appear
+ * in the TLV data, the problem is that they are dependent on
+ * message type. */
+ if (length == 4)
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_down_freq, tvb,
pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_TFTP_TIME:
- if (length == 4)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_tlv_tftp_server_timestamp,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_TFTP_MODEM_ADDRESS:
- if (length == 4)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_tlv_tftp_prov_modem_address,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_SW_UPG_SRVR:
- if (length == 4)
- {
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_sw_upg_srvr,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_UPSTREAM_CLASSIFIER:
- case TLV_DOWN_CLASSIFIER:
- dissect_classifiers (tvb, tlv_tree, pos, length, type);
- break;
- case TLV_UPSTREAM_SERVICE_FLOW:
- case TLV_DOWN_SERVICE_FLOW:
- dissect_sflow (tvb, tlv_tree, pos, length, type);
- break;
- case TLV_PHS:
- dissect_phs (tvb, tlv_tree, pos, length);
- break;
- case TLV_HMAC_DIGEST:
- if (length == 20)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_tlv_hmac_digest, tvb,
- pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_MAX_CLASSIFIERS:
- if (length == 2)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_tlv_max_classifiers, tvb,
+ else if (length == 1)
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_rng_tech, tvb,
pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_PRIVACY_ENABLE:
- if (length == 1)
- {
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_privacy_enable,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_AUTH_BLOCK:
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_auth_block,
- tvb, pos, length, ENC_NA);
- break;
- case TLV_KEY_SEQ_NUM:
- if (length == 1)
- {
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_key_seq_num, tvb,
- pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_MFGR_CVC:
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_mfgr_cvc,
- tvb, pos, length, ENC_NA);
- break;
- case TLV_COSIGN_CVC:
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_cosign_cvc,
- tvb, pos, length, ENC_NA);
- break;
- case TLV_SNMPV3_KICKSTART:
- dissect_snmpv3_kickstart(tvb, tlv_tree, pos, length);
- break;
- case TLV_SUBS_MGMT_CTRL:
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_subs_mgmt_ctrl,
- tvb, pos, length, ENC_NA);
- break;
- case TLV_SUBS_MGMT_CPE:
- if ((length % 4) == 0)
- {
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_subs_mgmt_ip_table,
- tvb, pos, length, ENC_NA);
- for (x = 0; x < length; x+=4)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_tlv_subs_mgmt_ip_entry,
- tvb, pos + x, 4, ENC_BIG_ENDIAN);
- }
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_SUBS_MGMT_FLTR:
- proto_tree_add_item (tlv_tree,
- hf_docsis_tlv_subs_mgmt_filter_grps,
- tvb, pos, length, ENC_NA);
- break;
- case TLV_SNMPV3_NTFY_RCVR:
- proto_tree_add_item(tlv_tree,
- hf_docsis_tlv_snmpv3_ntfy_rcvr,
- tvb, pos, length, ENC_NA);
- break;
- case TLV_ENABLE_20_MODE:
- if (length == 1)
- {
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_enable_20_mode,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_ENABLE_TEST_MODES:
- if (length == 1)
- {
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_enable_test_modes,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_DS_CH_LIST:
- dissect_ds_ch_list(tvb, tlv_tree, pos, length);
- break;
- case TLV_MC_MAC_ADDRESS:
- if (length == 6)
- {
- proto_tree_add_item(tlv_tree, hf_docsis_tlv_mc_mac_address,
- tvb, pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_VENDOR_SPEC:
- vsif_tvb = tvb_new_subset_length (tvb, pos, length);
- call_dissector (docsis_vsif_handle, vsif_tvb, pinfo, tlv_tree);
- break;
- case TLV_DUT_FILTER:
- dissect_dut_filter(tvb, tlv_tree, pos, length);
- break;
- case TLV_TCC:
- dissect_tcc(tvb, pinfo, tlv_tree, pos, length);
- break;
- case TLV_SID_CL:
- dissect_sid_cl(tvb, tlv_tree, pos, length);
- break;
- case TLV_RCP:
- dissect_rcp(tvb, pinfo, tlv_tree, pos, length);
- break;
- case TLV_RCC:
- dissect_rcc(tvb, pinfo, tlv_tree, pos, length);
- break;
- case TLV_DSID:
- dissect_dsid(tvb, tlv_tree, pos, length);
- break;
- case TLV_SEC_ASSOC:
- dissect_sec_assoc(tvb, tlv_tree, pos, length);
- break;
- case TLV_INIT_CH_TIMEOUT:
- if (length == 2)
- {
- proto_tree_add_item(tlv_tree, hf_docsis_tlv_init_ch_timeout,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_CH_ASGN:
- dissect_ch_asgn(tvb, tlv_tree, pos, length);
- break;
- case TLV_CM_INIT_REASON:
- if (length == 1)
- {
- proto_tree_add_item(tlv_tree, hf_docsis_tlv_cm_init_reason,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_SW_UPG_SRVR_IPV6:
- if (length == 16)
- {
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_sw_upg_srvr_ipv6,
- tvb, pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_TFTP_PROV_CM_IPV6_ADDR:
- if (length == 16)
- {
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_tftp_prov_cm_ipv6_addr,
- tvb, pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_US_DROP_CLFY:
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_us_drop_clfy,
- tvb, pos, length, ENC_NA);
- break;
- case TLV_SUBS_MGMT_IPV6_LST:
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_subs_mgmt_ipv6_lst,
- tvb, pos, length, ENC_NA);
- break;
- case TLV_US_DROP_CLFY_GROUP_ID:
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_us_drop_clfy_group_id,
- tvb, pos, length, ENC_NA);
- break;
- case TLV_SUBS_MGMT_CTRL_MAX_CPE_IPV6:
- if (length == 2)
- {
- proto_tree_add_item (tlv_tree, hf_docsis_tlv_subs_mgmt_ctrl_max_cpe_ipv6,
- tvb, pos, length, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case TLV_CMTS_MC_SESS_ENC:
- dissect_cmts_mc_sess_enc(tvb, tlv_tree, pos, length);
- break;
- case TLV_END:
- break;
+ else
+ dissect_doc10cos (tvb, tlv_tree, pos, length);
+ break;
+ case TLV_CHNL_ID:
+ if (length == 1)
+ {
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_upstream_chid,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_NET_ACCESS:
+ if (length == 1)
+ {
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_net_access,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_COS:
+ dissect_cos (tvb, tlv_tree, pos, length);
+ break;
+ case TLV_MODEM_CAP:
+ dissect_modemcap (tvb, tlv_tree, pos, length);
+ break;
+ case TLV_CM_MIC:
+ if (length == 16)
+ {
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_cm_mic, tvb,
+ pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_CMTS_MIC:
+ if (length == 16)
+ {
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_cmts_mic, tvb,
+ pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_VENDOR_ID:
+ if (length == 3)
+ {
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_vendor_id, tvb,
+ pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_SW_UPG_FILE:
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_sw_file, tvb, pos,
+ length, ENC_ASCII|ENC_NA);
+ break;
+ case TLV_SNMP_WRITE_CTRL:
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_snmp_access, tvb,
+ pos, length, ENC_NA);
+ break;
+ case TLV_SNMP_OBJECT:
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_snmp_obj, tvb,
+ pos, length, ENC_NA);
+ break;
+ case TLV_MODEM_IP:
+ if (length == 4)
+ {
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_modem_addr,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_SVC_UNAVAIL:
+ if (length == 3)
+ {
+ dissect_svc_unavail(tvb, tlv_tree, pos, length);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_ETHERNET_MAC:
+ if (length == 6)
+ {
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_cpe_ethernet,
+ tvb, pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_TEL_SETTINGS:
+ break;
+ case TLV_BPI_CONFIG:
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_bpi, tvb,
+ pos, length, ENC_NA);
+ break;
+ case TLV_MAX_CPES:
+ if (length == 1)
+ {
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_max_cpe, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_TFTP_TIME:
+ if (length == 4)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_tlv_tftp_server_timestamp,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_TFTP_MODEM_ADDRESS:
+ if (length == 4)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_tlv_tftp_prov_modem_address,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_SW_UPG_SRVR:
+ if (length == 4)
+ {
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_sw_upg_srvr,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_UPSTREAM_CLASSIFIER:
+ case TLV_DOWN_CLASSIFIER:
+ dissect_classifiers (tvb, tlv_tree, pos, length, type);
+ break;
+ case TLV_UPSTREAM_SERVICE_FLOW:
+ case TLV_DOWN_SERVICE_FLOW:
+ dissect_sflow (tvb, tlv_tree, pos, length, type);
+ break;
+ case TLV_PHS:
+ dissect_phs (tvb, tlv_tree, pos, length);
+ break;
+ case TLV_HMAC_DIGEST:
+ if (length == 20)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_tlv_hmac_digest, tvb,
+ pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_MAX_CLASSIFIERS:
+ if (length == 2)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_tlv_max_classifiers, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_PRIVACY_ENABLE:
+ if (length == 1)
+ {
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_privacy_enable,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_AUTH_BLOCK:
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_auth_block,
+ tvb, pos, length, ENC_NA);
+ break;
+ case TLV_KEY_SEQ_NUM:
+ if (length == 1)
+ {
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_key_seq_num, tvb,
+ pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_MFGR_CVC:
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_mfgr_cvc,
+ tvb, pos, length, ENC_NA);
+ break;
+ case TLV_COSIGN_CVC:
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_cosign_cvc,
+ tvb, pos, length, ENC_NA);
+ break;
+ case TLV_SNMPV3_KICKSTART:
+ dissect_snmpv3_kickstart(tvb, tlv_tree, pos, length);
+ break;
+ case TLV_SUBS_MGMT_CTRL:
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_subs_mgmt_ctrl,
+ tvb, pos, length, ENC_NA);
+ break;
+ case TLV_SUBS_MGMT_CPE:
+ if ((length % 4) == 0)
+ {
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_subs_mgmt_ip_table,
+ tvb, pos, length, ENC_NA);
+ for (x = 0; x < length; x+=4)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_tlv_subs_mgmt_ip_entry,
+ tvb, pos + x, 4, ENC_BIG_ENDIAN);
+ }
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_SUBS_MGMT_FLTR:
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_tlv_subs_mgmt_filter_grps,
+ tvb, pos, length, ENC_NA);
+ break;
+ case TLV_SNMPV3_NTFY_RCVR:
+ proto_tree_add_item(tlv_tree,
+ hf_docsis_tlv_snmpv3_ntfy_rcvr,
+ tvb, pos, length, ENC_NA);
+ break;
+ case TLV_ENABLE_20_MODE:
+ if (length == 1)
+ {
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_enable_20_mode,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_ENABLE_TEST_MODES:
+ if (length == 1)
+ {
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_enable_test_modes,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_DS_CH_LIST:
+ dissect_ds_ch_list(tvb, tlv_tree, pos, length);
+ break;
+ case TLV_MC_MAC_ADDRESS:
+ if (length == 6)
+ {
+ proto_tree_add_item(tlv_tree, hf_docsis_tlv_mc_mac_address,
+ tvb, pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_VENDOR_SPEC:
+ vsif_tvb = tvb_new_subset_length (tvb, pos, length);
+ call_dissector (docsis_vsif_handle, vsif_tvb, pinfo, tlv_tree);
+ break;
+ case TLV_DUT_FILTER:
+ dissect_dut_filter(tvb, tlv_tree, pos, length);
+ break;
+ case TLV_TCC:
+ dissect_tcc(tvb, pinfo, tlv_tree, pos, length);
+ break;
+ case TLV_SID_CL:
+ dissect_sid_cl(tvb, tlv_tree, pos, length);
+ break;
+ case TLV_RCP:
+ dissect_rcp(tvb, pinfo, tlv_tree, pos, length);
+ break;
+ case TLV_RCC:
+ dissect_rcc(tvb, pinfo, tlv_tree, pos, length);
+ break;
+ case TLV_DSID:
+ dissect_dsid(tvb, tlv_tree, pos, length);
+ break;
+ case TLV_SEC_ASSOC:
+ dissect_sec_assoc(tvb, tlv_tree, pos, length);
+ break;
+ case TLV_INIT_CH_TIMEOUT:
+ if (length == 2)
+ {
+ proto_tree_add_item(tlv_tree, hf_docsis_tlv_init_ch_timeout,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_CH_ASGN:
+ dissect_ch_asgn(tvb, tlv_tree, pos, length);
+ break;
+ case TLV_CM_INIT_REASON:
+ if (length == 1)
+ {
+ proto_tree_add_item(tlv_tree, hf_docsis_tlv_cm_init_reason,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_SW_UPG_SRVR_IPV6:
+ if (length == 16)
+ {
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_sw_upg_srvr_ipv6,
+ tvb, pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_TFTP_PROV_CM_IPV6_ADDR:
+ if (length == 16)
+ {
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_tftp_prov_cm_ipv6_addr,
+ tvb, pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_US_DROP_CLFY:
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_us_drop_clfy,
+ tvb, pos, length, ENC_NA);
+ break;
+ case TLV_SUBS_MGMT_IPV6_LST:
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_subs_mgmt_ipv6_lst,
+ tvb, pos, length, ENC_NA);
+ break;
+ case TLV_US_DROP_CLFY_GROUP_ID:
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_us_drop_clfy_group_id,
+ tvb, pos, length, ENC_NA);
+ break;
+ case TLV_SUBS_MGMT_CTRL_MAX_CPE_IPV6:
+ if (length == 2)
+ {
+ proto_tree_add_item (tlv_tree, hf_docsis_tlv_subs_mgmt_ctrl_max_cpe_ipv6,
+ tvb, pos, length, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case TLV_CMTS_MC_SESS_ENC:
+ dissect_cmts_mc_sess_enc(tvb, tlv_tree, pos, length);
+ break;
+ case TLV_END:
+ break;
} /* switch(type) */
pos = pos + length;
@@ -4244,1605 +4267,1593 @@ dissect_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_tlv (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_tlv_down_freq,
{"1 Downstream Frequency", "docsis_tlv.downfreq",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Downstream Frequency", HFILL}
- },
+ },
{&hf_docsis_tlv_upstream_chid,
{"2 Upstream Channel ID", "docsis_tlv.upchid",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Service Identifier", HFILL}
- },
+ },
{&hf_docsis_tlv_net_access,
{"3 Network Access", "docsis_tlv.netaccess",
FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
"Network Access TLV", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_cos,
{"4 COS Encodings", "docsis_tlv.cos",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL}
- },
+ },
#endif
{&hf_docsis_tlv_cos_id,
{".1 Class ID", "docsis_tlv.cos.id",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Class ID", HFILL}
- },
+ },
{&hf_docsis_tlv_cos_sid,
{".2 Service ID", "docsis_tlv.cos.sid",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Service ID", HFILL}
- },
+ },
{&hf_docsis_tlv_cos_max_down,
{".2 Max Downstream Rate (bps)", "docsis_tlv.cos.maxdown",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Max Downstream Rate", HFILL}
- },
+ },
{&hf_docsis_tlv_cos_max_up,
{".3 Max Upstream Rate (bps)", "docsis_tlv.cos.maxup",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Max Upstream Rate", HFILL}
- },
+ },
{&hf_docsis_tlv_cos_up_chnl_pri,
{".4 Upstream Channel Priority", "docsis_tlv.cos.upchnlpri",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Upstream Channel Priority", HFILL}
- },
+ },
{&hf_docsis_tlv_cos_min_grntd_up,
{".5 Guaranteed Upstream Rate", "docsis_tlv.cos.mingrntdup",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Guaranteed Minimum Upstream Data Rate", HFILL}
- },
+ },
{&hf_docsis_tlv_cos_max_up_burst,
{".6 Maximum Upstream Burst", "docsis_tlv.cos.maxupburst",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Maximum Upstream Burst", HFILL}
- },
+ },
{&hf_docsis_tlv_cos_privacy_enable,
{".7 COS Privacy Enable", "docsis_tlv.cos.privacy_enable",
FT_BOOLEAN, BASE_NONE, TFS (&ena_dis_tfs), 0x0,
"Class of Service Privacy Enable", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_mcap,
{"5 Modem Capabilities", "docsis_tlv.mcap",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Modem Capabilities", HFILL}
- },
+ },
#endif
{&hf_docsis_tlv_mcap_concat,
{".1 Concatenation Support", "docsis_tlv.mcap.concat",
FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
"Concatenation Support", HFILL}
- },
+ },
{&hf_docsis_tlv_mcap_docs_ver,
{".2 Docsis Version", "docsis_tlv.map.docsver",
FT_UINT8, BASE_DEC, VALS (docs_ver_vals), 0x0,
"DOCSIS Version", HFILL}
- },
+ },
{&hf_docsis_tlv_mcap_frag,
{".3 Fragmentation Support", "docsis_tlv.mcap.frag",
FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
"Fragmentation Support", HFILL}
- },
+ },
{&hf_docsis_tlv_mcap_phs,
{".4 PHS Support", "docsis_tlv.mcap.phs",
FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
"PHS Support", HFILL}
- },
+ },
{&hf_docsis_tlv_mcap_igmp,
{".5 IGMP Support", "docsis_tlv.mcap.igmp",
FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
"IGMP Support", HFILL}
- },
+ },
{&hf_docsis_tlv_mcap_privacy,
{".6 Privacy Support", "docsis_tlv.mcap.privacy",
FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
"Privacy Support", HFILL}
- },
+ },
{&hf_docsis_tlv_mcap_down_said,
{".7 # Downstream SAIDs Supported", "docsis_tlv.mcap.downsaid",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Downstream Said Support", HFILL}
- },
+ },
{&hf_docsis_tlv_mcap_up_sid,
{".8 # Upstream SAIDs Supported", "docsis_tlv.mcap.upsid",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Upstream SID Support", HFILL}
- },
+ },
{&hf_docsis_tlv_mcap_8021P_filter,
{".9 802.1P Filtering Support", "docsis_tlv.mcap.dot1pfiltering",
FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x80,
"802.1P Filtering Support", HFILL}
- },
+ },
{&hf_docsis_tlv_mcap_8021Q_filter,
{".9 802.1Q Filtering Support", "docsis_tlv.mcap.dot1qfilt",
FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x40,
"802.1Q Filtering Support", HFILL}
- },
+ },
{&hf_docsis_tlv_mcap_xmit_eq_taps_per_sym,
{".10 Xmit Equalizer Taps/Sym", "docsis_tlv.mcap.tapspersym",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Transmit Equalizer Taps per Symbol", HFILL}
- },
+ },
{&hf_docsis_tlv_mcap_xmit_eq_taps,
{".11 # Xmit Equalizer Taps", "docsis_tlv.mcap.numtaps",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Number of Transmit Equalizer Taps", HFILL}
- },
+ },
{&hf_docsis_tlv_mcap_dcc,
{".12 DCC Support", "docsis_tlv.mcap.dcc",
FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
"DCC Support", HFILL}
- },
+ },
{&hf_docsis_tlv_mcap_ip_filters,
{".13 IP Filters Support","docsis_tlv.mcap.ipfilters",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- "IP Filters Support", HFILL}
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "IP Filters Support", HFILL}
},
{&hf_docsis_tlv_mcap_llc_filters,
{".14 LLC Filters Support","docsis_tlv.mcap.llcfilters",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- "LLC Filters Support", HFILL}
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "LLC Filters Support", HFILL}
},
{&hf_docsis_tlv_mcap_exp_unicast_sid,
{".15 Expanded Unicast SID Space","docsis_tlv.mcap.exucsid",
- FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
- "Expanded Unicast SID Space", HFILL}
+ FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
+ "Expanded Unicast SID Space", HFILL}
},
{&hf_docsis_tlv_mcap_rnghoff_cm,
{".16 Ranging Hold-Off (CM)","docsis_tlv.mcap.rnghoffcm",
- FT_UINT32, BASE_DEC, VALS (on_off_vals), 0x1,
- "Ranging Hold-Off (CM)", HFILL}
+ FT_UINT32, BASE_DEC, VALS (on_off_vals), 0x1,
+ "Ranging Hold-Off (CM)", HFILL}
},
{&hf_docsis_tlv_mcap_rnghoff_erouter,
{".16 Ranging Hold-Off (ePS or eRouter)",
"docsis_tlv.mcap.rnghofferouter",
- FT_UINT32, BASE_DEC, VALS (on_off_vals), 0x2,
- "Ranging Hold-Off (ePS or eRouter)", HFILL}
+ FT_UINT32, BASE_DEC, VALS (on_off_vals), 0x2,
+ "Ranging Hold-Off (ePS or eRouter)", HFILL}
},
{&hf_docsis_tlv_mcap_rnghoff_emta,
{".16 Ranging Hold-Off (eMTA or EDVA)",
"docsis_tlv.mcap.rnghoffemta",
- FT_UINT32, BASE_DEC, VALS (on_off_vals), 0x4,
- "Ranging Hold-Off (eMTA or EDVA)", HFILL}
+ FT_UINT32, BASE_DEC, VALS (on_off_vals), 0x4,
+ "Ranging Hold-Off (eMTA or EDVA)", HFILL}
},
{&hf_docsis_tlv_mcap_rnghoff_estb,
{".16 Ranging Hold-Off (DSG/eSTB)",
"docsis_tlv.mcap.rnghoffestb",
- FT_UINT32, BASE_DEC, VALS (on_off_vals), 0x8,
- "Ranging Hold-Off (DSG/eSTB)", HFILL}
+ FT_UINT32, BASE_DEC, VALS (on_off_vals), 0x8,
+ "Ranging Hold-Off (DSG/eSTB)", HFILL}
},
{&hf_docsis_tlv_mcap_l2vpn,
{".17 L2VPN Capability","docsis_tlv.mcap.l2vpn",
- FT_BYTES, BASE_NONE, NULL, 0x0,
- "L2VPN Capability", HFILL}
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ "L2VPN Capability", HFILL}
},
{&hf_docsis_tlv_mcap_l2vpn_esafe,
{".18 L2VPN eSAFE Host Capability","docsis_tlv.mcap.l2vpnesafe",
- FT_BYTES, BASE_NONE, NULL, 0x0,
- "L2VPN eSAFE Host Capability", HFILL}
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ "L2VPN eSAFE Host Capability", HFILL}
},
{&hf_docsis_tlv_mcap_dut_filtering,
{".19 Downstream Unencrypted Traffic (DUT) Filtering",
- "docsis_tlv.mcap.dut",
- FT_BYTES, BASE_NONE, NULL, 0x0,
- "Downstream Unencrypted Traffic (DUT) Filtering", HFILL}
+ "docsis_tlv.mcap.dut",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ "Downstream Unencrypted Traffic (DUT) Filtering", HFILL}
},
{&hf_docsis_tlv_mcap_us_freq_range,
{".20 Upstream Frequency Range Support",
- "docsis_tlv.mcap.usfreqrng",
- FT_UINT8, BASE_DEC, VALS (docsis_freq_rng_vals), 0x0,
- "Upstream Frequency Range Support", HFILL}
+ "docsis_tlv.mcap.usfreqrng",
+ FT_UINT8, BASE_DEC, VALS (docsis_freq_rng_vals), 0x0,
+ "Upstream Frequency Range Support", HFILL}
},
{&hf_docsis_tlv_mcap_us_srate_160,
{".21 Upstream Symbol Rate 160ksps supported",
- "docsis_tlv.mcap.srate160",
- FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x1,
- "Upstream Symbol Rate 160ksps supported", HFILL}
+ "docsis_tlv.mcap.srate160",
+ FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x1,
+ "Upstream Symbol Rate 160ksps supported", HFILL}
},
{&hf_docsis_tlv_mcap_us_srate_320,
{".21 Upstream Symbol Rate 320ksps supported",
- "docsis_tlv.mcap.srate320",
- FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x2,
- "Upstream Symbol Rate 320ksps supported", HFILL}
+ "docsis_tlv.mcap.srate320",
+ FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x2,
+ "Upstream Symbol Rate 320ksps supported", HFILL}
},
{&hf_docsis_tlv_mcap_us_srate_640,
{".21 Upstream Symbol Rate 640ksps supported",
- "docsis_tlv.mcap.srate640",
- FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x4,
- "Upstream Symbol Rate 640ksps supported", HFILL}
+ "docsis_tlv.mcap.srate640",
+ FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x4,
+ "Upstream Symbol Rate 640ksps supported", HFILL}
},
{&hf_docsis_tlv_mcap_us_srate_1280,
{".21 Upstream Symbol Rate 1280ksps supported",
- "docsis_tlv.mcap.srate1280",
- FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x8,
- "Upstream Symbol Rate 1280ksps supported", HFILL}
+ "docsis_tlv.mcap.srate1280",
+ FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x8,
+ "Upstream Symbol Rate 1280ksps supported", HFILL}
},
{&hf_docsis_tlv_mcap_us_srate_2560,
{".21 Upstream Symbol Rate 2560ksps supported",
- "docsis_tlv.mcap.srate2560",
- FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x10,
- "Upstream Symbol Rate 2560ksps supported", HFILL}
+ "docsis_tlv.mcap.srate2560",
+ FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x10,
+ "Upstream Symbol Rate 2560ksps supported", HFILL}
},
{&hf_docsis_tlv_mcap_us_srate_5120,
{".21 Upstream Symbol Rate 5120ksps supported",
- "docsis_tlv.mcap.srate5120",
- FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x20,
- "Upstream Symbol Rate 5120ksps supported", HFILL}
+ "docsis_tlv.mcap.srate5120",
+ FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x20,
+ "Upstream Symbol Rate 5120ksps supported", HFILL}
},
{&hf_docsis_tlv_mcap_sac,
{".22 Selectable Active Code Mode 2 Support","docsis_tlv.mcap.sac",
- FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
- "Selectable Active Code Mode 2 Support", HFILL}
+ FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
+ "Selectable Active Code Mode 2 Support", HFILL}
},
{&hf_docsis_tlv_mcap_code_hop_mode2,
{".23 Code Hopping Mode 2 Support","docsis_tlv.mcap.codehopm2",
- FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
- "Code Hopping Mode 2 Support", HFILL}
+ FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
+ "Code Hopping Mode 2 Support", HFILL}
},
{&hf_docsis_tlv_mcap_mtc,
{".24 Multiple Transmit Channel Support","docsis_tlv.mcap.mtc",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Multiple Transmit Channel Support", HFILL}
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Multiple Transmit Channel Support", HFILL}
},
{&hf_docsis_tlv_mcap_512_msps_utc,
{".25 5.12 Msps Upstream Transmit Channel Support",
- "docsis_tlv.mcap.512mspsutc",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "5.12 Msps Upstream Transmit Channel Support", HFILL}
+ "docsis_tlv.mcap.512mspsutc",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "5.12 Msps Upstream Transmit Channel Support", HFILL}
},
{&hf_docsis_tlv_mcap_256_msps_utc,
{".26 2.56 Msps Upstream Transmit Channel Support",
- "docsis_tlv.mcap.256mspsutc",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "2.56 Msps Upstream Transmit Channel Support", HFILL}
+ "docsis_tlv.mcap.256mspsutc",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "2.56 Msps Upstream Transmit Channel Support", HFILL}
},
{&hf_docsis_tlv_mcap_total_sid_cluster,
{".27 Total SID Cluster Support","docsis_tlv.mcap.totalsidcl",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Total SID Cluster Support", HFILL}
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Total SID Cluster Support", HFILL}
},
{&hf_docsis_tlv_mcap_sid_per_sf,
{".28 SID Clusters per Service Flow Support",
- "docsis_tlv.mcap.sidpersf",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "SID Clusters per Service Flow Support", HFILL}
+ "docsis_tlv.mcap.sidpersf",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "SID Clusters per Service Flow Support", HFILL}
},
{&hf_docsis_tlv_mcap_mrc,
{".29 Multiple Receive Channel Support","docsis_tlv.mcap.mrc",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Multiple Receive Channel Support", HFILL}
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Multiple Receive Channel Support", HFILL}
},
{&hf_docsis_tlv_mcap_total_dsid,
{".30 Total Downstream Service ID (DSID) Support",
- "docsis_tlv.mcap.totaldsid",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Total Downstream Service ID (DSID) Support", HFILL}
+ "docsis_tlv.mcap.totaldsid",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Total Downstream Service ID (DSID) Support", HFILL}
},
{&hf_docsis_tlv_mcap_reseq_dsid,
{".31 Resequencing Downstream Service ID (DSID) Support",
- "docsis_tlv.mcap.reseqdsid",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Resequencing Downstream Service ID (DSID) Support", HFILL}
+ "docsis_tlv.mcap.reseqdsid",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Resequencing Downstream Service ID (DSID) Support", HFILL}
},
{&hf_docsis_tlv_mcap_mc_dsid,
{".32 Multicast Downstream Service ID (DSID) Support",
- "docsis_tlv.mcap.mcdsid",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Multicast Downstream Service ID (DSID) Support", HFILL}
+ "docsis_tlv.mcap.mcdsid",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Multicast Downstream Service ID (DSID) Support", HFILL}
},
{&hf_docsis_tlv_mcap_mc_dsid_fwd,
{".33 Mulitcast DSID Forwarding","docsis_tlv.mcap.mcdsidfwd",
- FT_UINT8, BASE_DEC, VALS (mc_dsid_fwd_vals), 0x0,
- "Mulitcast DSID Forwarding", HFILL}
+ FT_UINT8, BASE_DEC, VALS (mc_dsid_fwd_vals), 0x0,
+ "Mulitcast DSID Forwarding", HFILL}
},
{&hf_docsis_tlv_mcap_fctype_fwd,
{".34 Frame Control Type Forwarding Capability",
- "docsis_tlv.mcap.fctypefwd",
- FT_UINT8, BASE_DEC, VALS (fctype_fwd_vals), 0x0,
- "Frame Control Type Forwarding Capability", HFILL}
+ "docsis_tlv.mcap.fctypefwd",
+ FT_UINT8, BASE_DEC, VALS (fctype_fwd_vals), 0x0,
+ "Frame Control Type Forwarding Capability", HFILL}
},
{&hf_docsis_tlv_mcap_dpv_path,
{".35 DPV Capability (per Path)","docsis_tlv.mcap.dpvpath",
- FT_UINT8, BASE_DEC, NULL, 0x1,
- "DPV Capability (per Path)", HFILL}
+ FT_UINT8, BASE_DEC, NULL, 0x1,
+ "DPV Capability (per Path)", HFILL}
},
{&hf_docsis_tlv_mcap_dpv_packet,
{".35 DPV Capability (per Packet)","docsis_tlv.mcap.dpvpacket",
- FT_UINT8, BASE_DEC, NULL, 0x2,
- "DPV Capability (per Packet)", HFILL}
+ FT_UINT8, BASE_DEC, NULL, 0x2,
+ "DPV Capability (per Packet)", HFILL}
},
{&hf_docsis_tlv_mcap_ugs,
{".36 Unsolicited Grant Service Support","docsis_tlv.mcap.ugs",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Unsolicited Grant Service Support", HFILL}
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Unsolicited Grant Service Support", HFILL}
},
{&hf_docsis_tlv_mcap_map_ucd,
{".37 MAP and UCD Receipt Support","docsis_tlv.mcap.mapucd",
- FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
- "MAP and UCD Receipt Support", HFILL}
+ FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
+ "MAP and UCD Receipt Support", HFILL}
},
{&hf_docsis_tlv_mcap_udc,
{".38 Upstream Drop Classifier Support","docsis_tlv.mcap.udc",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- "Upstream Drop Classifier Support", HFILL}
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "Upstream Drop Classifier Support", HFILL}
},
{&hf_docsis_tlv_mcap_ipv6,
{".39 IPv6 Support","docsis_tlv.mcap.ipv6",
- FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
- "IPv6 Support", HFILL}
+ FT_BOOLEAN, BASE_NONE, TFS (&on_off_tfs), 0x0,
+ "IPv6 Support", HFILL}
},
{&hf_docsis_tlv_mcap_ext_us_trans_power,
{".40 Extended Upstream Transmit Power Capability",
- "docsis_tlv.mcap.extustrpwr",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Extended Upstream Transmit Power Capability", HFILL}
+ "docsis_tlv.mcap.extustrpwr",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Extended Upstream Transmit Power Capability", HFILL}
},
{&hf_docsis_tlv_cm_mic,
{"6 CM MIC", "docsis_tlv.cmmic",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Cable Modem Message Integrity Check", HFILL}
- },
+ },
{&hf_docsis_tlv_cmts_mic,
{"7 CMTS MIC", "docsis_tlv.cmtsmic",
FT_BYTES, BASE_NONE, NULL, 0x0,
"CMTS Message Integrity Check", HFILL}
- },
+ },
{&hf_docsis_tlv_vendor_id,
{"8 Vendor ID", "docsis_tlv.vendorid",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Vendor Identifier", HFILL}
- },
+ },
{&hf_docsis_tlv_sw_file,
{"9 Software Upgrade File", "docsis_tlv.sw_upg_file",
FT_STRINGZ, BASE_NONE, NULL, 0x0,
"Software Upgrade File", HFILL}
- },
+ },
{&hf_docsis_tlv_snmp_access,
{"10 SNMP Write Access", "docsis_tlv.snmp_access",
FT_BYTES, BASE_NONE, NULL, 0x0,
"SNMP Write Access", HFILL}
- },
+ },
{&hf_docsis_tlv_snmp_obj,
{"11 SNMP Object", "docsis_tlv.snmp_obj",
FT_BYTES, BASE_NONE, NULL, 0x0,
"SNMP Object", HFILL}
- },
+ },
{&hf_docsis_tlv_modem_addr,
{"12 Modem IP Address", "docsis_tlv.modemaddr",
FT_IPv4, BASE_NONE, NULL, 0x0,
"Modem IP Address", HFILL}
- },
+ },
{&hf_docsis_tlv_svc_unavail,
{"13 Service Not Available Response", "docsis_tlv.svcunavail",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Service Not Available Response", HFILL}
- },
+ },
{&hf_docsis_tlv_svc_unavail_classid,
{"Service Not Available: (Class ID)", "docsis_tlv.svcunavail.classid",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Service Not Available (Class ID)", HFILL}
- },
+ },
{&hf_docsis_tlv_svc_unavail_type,
{"Service Not Available (Type)", "docsis_tlv.svcunavail.type",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_tlv_svc_unavail_code,
{"Service Not Available (Code)", "docsis_tlv.svcunavail.code",
FT_UINT8, BASE_DEC, VALS(docsis_conf_code), 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_tlv_cpe_ethernet,
{"14 CPE Ethernet Addr", "docsis_tlv.cpe_ether",
FT_ETHER, BASE_NONE, NULL, 0x0,
"CPE Ethernet Addr", HFILL}
- },
+ },
{&hf_docsis_tlv_bpi,
{"17 Baseline Privacy Encoding", "docsis_tlv.bpi",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Baseline Privacy Encoding", HFILL}
- },
+ },
{&hf_docsis_tlv_max_cpe,
{"18 Max # of CPE's", "docsis_tlv.maxcpe",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Max Number of CPE's", HFILL}
- },
+ },
{&hf_docsis_tlv_tftp_server_timestamp,
{"19 TFTP Server Timestamp", "docsis_tlv.tftp_time",
FT_UINT32, BASE_DEC, NULL, 0x0,
"TFTP Server TimeStamp", HFILL}
- },
+ },
{&hf_docsis_tlv_tftp_prov_modem_address,
{"20 TFTP Server Provisioned Modem Addr", "docsis_tlv.tftpmodemaddr",
FT_IPv4, BASE_NONE, NULL, 0x0,
"TFTP Server Provisioned Modem Addr", HFILL}
- },
+ },
{&hf_docsis_tlv_sw_upg_srvr,
{"21 Software Upgrade Server", "docsis_tlv.sw_upg_srvr",
FT_IPv4, BASE_NONE, NULL, 0x0,
"Software Upgrade Server", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_upclsfr,
{"22 Upstream Classifier", "docsis_tlv.upclsfr",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_tlv_downclsfr,
{"23 Downstream Classifier", "docsis_tlv.downclsfr",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL}
- },
+ },
#endif
{&hf_docsis_tlv_clsfr_ref,
{".1 Classifier Ref", "docsis_tlv.clsfr.ref",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Classifier Reference", HFILL}
- },
+ },
{&hf_docsis_tlv_clsfr_id,
{".2 Classifier ID", "docsis_tlv.clsfr.id",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Classifier ID", HFILL}
- },
+ },
{&hf_docsis_tlv_clsfr_sflow_ref,
{".3 Service Flow Ref", "docsis_tlv.clsfr.sflowref",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Service Flow Reference", HFILL}
- },
+ },
{&hf_docsis_tlv_clsfr_sflow_id,
{".4 Service Flow ID", "docsis_tlv.clsfr.sflowid",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Service Flow ID", HFILL}
- },
+ },
{&hf_docsis_tlv_clsfr_rule_pri,
{".5 Rule Priority", "docsis_tlv.clsfr.rulepri",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Rule Priority", HFILL}
- },
+ },
{&hf_docsis_tlv_clsfr_act_state,
{".6 Activation State", "docsis_tlv.clsfr.actstate",
FT_BOOLEAN, BASE_NONE, TFS (&activation_tfs), 0x0,
"Classifier Activation State", HFILL}
- },
+ },
{&hf_docsis_tlv_clsfr_dsc_act,
{".7 DSC Action", "docsis_tlv.clsfr.dscact",
FT_UINT8, BASE_DEC, VALS (dsc_act_vals), 0x0,
"Dynamic Service Change Action", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_clsfr_err,
{".8 Error Encodings", "docsis_tlv.clsfr.err",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Error Encodings", HFILL}
- },
+ },
#endif
{&hf_docsis_tlv_clsfr_err_param,
{"..1 Param Subtype", "docsis_tlv.clsfr.err.param",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Parameter Subtype", HFILL}
- },
+ },
{&hf_docsis_tlv_clsfr_err_code,
{"..2 Error Code", "docsis_tlv.clsfr.err.code",
FT_UINT8, BASE_DEC, VALS(docsis_conf_code), 0x0,
"TCP/UDP Destination Port End", HFILL}
- },
+ },
{&hf_docsis_tlv_clsfr_err_msg,
{"..3 Error Message", "docsis_tlv.clsfr.err.msg",
FT_STRINGZ, BASE_NONE, NULL, 0x0,
"Error Message", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_ipclsfr,
{".9 IP Classifier Encodings", "docsis_tlv.clsfr.ip",
FT_BYTES, BASE_NONE, NULL, 0x0,
"IP Classifier Encodings", HFILL}
- },
+ },
#endif
{&hf_docsis_tlv_ipclsfr_tosmask,
{"..1 Type Of Service Mask", "docsis_tlv.clsfr.ip.tosmask",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Type Of Service Mask", HFILL}
- },
+ },
{&hf_docsis_tlv_ipclsfr_ipproto,
{"..2 IP Protocol", "docsis_tlv.clsfr.ip.ipproto",
FT_UINT16, BASE_DEC, NULL, 0x0,
"IP Protocol", HFILL}
- },
+ },
{&hf_docsis_tlv_ipclsfr_src,
{"..3 Source Address", "docsis_tlv.clsfr.ip.src",
FT_IPv4, BASE_NONE, NULL, 0x0,
"Source Address", HFILL}
- },
+ },
{&hf_docsis_tlv_ipclsfr_dst,
{"..4 Destination Address", "docsis_tlv.clsfr.ip.dst",
FT_IPv4, BASE_NONE, NULL, 0x0,
"Destination Address", HFILL}
- },
+ },
{&hf_docsis_tlv_ipclsfr_srcmask,
{"..5 Source Mask", "docsis_tlv.clsfr.ip.smask",
FT_IPv4, BASE_NONE, NULL, 0x0,
"Source Mask", HFILL}
- },
+ },
{&hf_docsis_tlv_ipclsfr_dstmask,
{"..6 Destination Mask", "docsis_tlv.clsfr.ip.dmask",
FT_IPv4, BASE_NONE, NULL, 0x0,
"Destination Mask", HFILL}
- },
+ },
{&hf_docsis_tlv_ipclsfr_sport_start,
{"..7 Source Port Start", "docsis_tlv.clsfr.ip.sportstart",
FT_UINT16, BASE_DEC, NULL, 0x0,
"TCP/UDP Source Port Start", HFILL}
- },
+ },
{&hf_docsis_tlv_ipclsfr_sport_end,
{"..8 Source Port End", "docsis_tlv.clsfr.ip.sportend",
FT_UINT16, BASE_DEC, NULL, 0x0,
"TCP/UDP Source Port End", HFILL}
- },
+ },
{&hf_docsis_tlv_ipclsfr_dport_start,
{"..9 Dest Port Start", "docsis_tlv.clsfr.ip.dportstart",
FT_UINT16, BASE_DEC, NULL, 0x0,
"TCP/UDP Destination Port Start", HFILL}
- },
+ },
{&hf_docsis_tlv_ipclsfr_dport_end,
{"..10 Dest Port End", "docsis_tlv.clsfr.ip.dportend",
FT_UINT16, BASE_DEC, NULL, 0x0,
"TCP/UDP Destination Port End", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_ethclsfr,
{".10 Ethernet Classifier Encodings", "docsis_tlv.clsfr.eth",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Ethernet Classifier Encodings", HFILL}
- },
+ },
#endif
{&hf_docsis_tlv_ethclsfr_dmac,
{"..1 Dest Mac Address", "docsis_tlv.clsfr.eth.dmac",
FT_ETHER, BASE_NONE, NULL, 0x0,
"Destination Mac Address", HFILL}
- },
+ },
{&hf_docsis_tlv_ethclsfr_smac,
{"..2 Source Mac Address", "docsis_tlv.clsfr.eth.smac",
FT_ETHER, BASE_NONE, NULL, 0x0,
"Source Mac Address", HFILL}
- },
+ },
{&hf_docsis_tlv_ethclsfr_ethertype,
{"..3 Ethertype", "docsis_tlv.clsfr.eth.ethertype",
FT_UINT24, BASE_HEX, NULL, 0x0,
"Ethertype", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_dot1qclsfr,
{".11 802.1Q Classifier Encodings", "docsis_tlv.clsfr.dot1q",
FT_BYTES, BASE_NONE, NULL, 0x0,
"802.1Q Classifier Encodings", HFILL}
- },
+ },
#endif
{&hf_docsis_tlv_dot1qclsfr_user_pri,
{"..1 User Priority", "docsis_tlv.clsfr.dot1q.userpri",
FT_UINT16, BASE_HEX, NULL, 0x0,
"User Priority", HFILL}
- },
+ },
{&hf_docsis_tlv_dot1qclsfr_vlanid,
{"..2 VLAN id", "docsis_tlv.clsfr.dot1q.ethertype",
FT_UINT16, BASE_DEC, NULL, 0x0,
"VLAN Id", HFILL}
- },
+ },
{&hf_docsis_tlv_dot1qclsfr_vendorspec,
{"..43 Vendor Specific Encodings", "docsis_tlv.clsfr.dot1q.vendorspec",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Vendor Specific Encodings", HFILL}
- },
+ },
{&hf_docsis_tlv_clsfr_vendor_spc,
{".43 Vendor Specific Encodings", "docsis_tlv.clsfr.vendor",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Vendor Specific Encodings", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_upsflow,
{"24 Upstream Service Flow", "docsis_tlv.upsflow",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_tlv_downsflow,
{"25 Downstream Service Flow", "docsis_tlv.downsflow",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL}
- },
+ },
#endif
{&hf_docsis_tlv_sflow_ref,
{".1 Service Flow Ref", "docsis_tlv.sflow.ref",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Service Flow Reference", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_id,
{".2 Service Flow Id", "docsis_tlv.sflow.id",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Service Flow Id", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_sid,
{".3 Service Identifier", "docsis_tlv.sflow.sid",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Service Identifier", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_classname,
{".4 Service Class Name", "docsis_tlv.sflow.cname",
FT_STRINGZ, BASE_NONE, NULL, 0x0,
"Service Class Name", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_sflow_err,
{".5 Error Encodings", "docsis_tlv.sflow.err",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Error Encodings", HFILL}
- },
+ },
#endif
{&hf_docsis_tlv_sflow_err_param,
{"..1 Param Subtype", "docsis_tlv.sflow.err.param",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Parameter Subtype", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_err_code,
{"..2 Error Code", "docsis_tlv.sflow.err.code",
FT_UINT8, BASE_DEC, VALS(docsis_conf_code), 0x0,
"Error Code", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_err_msg,
{"..3 Error Message", "docsis_tlv.sflow.err.msg",
FT_STRINGZ, BASE_NONE, NULL, 0x0,
"Error Message", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_qos_param,
{".6 QOS Parameter Set", "docsis_tlv.sflow.qos",
FT_UINT8, BASE_HEX, VALS (qos_param_vals), 0x0,
"QOS Parameter Set", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_traf_pri,
{".7 Traffic Priority", "docsis_tlv.sflow.trafpri",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Traffic Priority", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_max_sus,
{".8 Maximum Sustained Traffic Rate (bps)", "docsis_tlv.sflow.maxtrafrate",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Maximum Sustained Traffic Rate (bps)", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_max_burst,
{".9 Maximum Burst (bps)", "docsis_tlv.sflow.maxburst",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Maximum Burst (bps)", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_min_traf,
{".10 Minimum Traffic Rate (bps)", "docsis_tlv.sflow.mintrafrate",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Minimum Traffic Rate (bps)", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_ass_min_pkt_size,
{".11 Assumed Min Reserved Packet Size", "docsis_tlv.sflow.assumed_min_pkt_size",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Assumed Minimum Reserved Packet Size", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_timeout_active,
{".12 Timeout for Active Params (secs)", "docsis_tlv.sflow.act_timeout",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Timeout for Active Params (secs)", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_timeout_admitted,
{".13 Timeout for Admitted Params (secs)", "docsis_tlv.sflow.adm_timeout",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Timeout for Admitted Params (secs)", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_max_down_latency,
{".14 Maximum Downstream Latency (usec)", "docsis_tlv.sflow.max_down_lat",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Maximum Downstream Latency (usec)", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_max_concat_burst,
{".14 Max Concat Burst", "docsis_tlv.sflow.maxconcat",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Max Concatenated Burst", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_sched_type,
{".15 Scheduling Type", "docsis_tlv.sflow.schedtype",
FT_UINT32, BASE_HEX, VALS (sched_type_vals), 0x0,
"Scheduling Type", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_reqxmit_pol,
{".16 Request/Transmission Policy", "docsis_tlv.sflow.reqxmitpol",
FT_UINT32, BASE_HEX, NULL, 0x0,
"Request/Transmission Policy", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_nominal_polling,
{".17 Nominal Polling Interval(usec)", "docsis_tlv.sflow.nominal_polling",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Nominal Polling Interval(usec)", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_tolerated_jitter,
{".18 Tolerated Poll Jitter (usec)", "docsis_tlv.sflow.toler_jitter",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Tolerated Poll Jitter (usec)", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_ugs_size,
{".19 Unsolicited Grant Size (bytes)", "docsis_tlv.sflow.ugs_size",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Unsolicited Grant Size (bytes)", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_nom_grant_intvl,
{".20 Nominal Grant Interval (usec)", "docsis_tlv.sflow.nom_grant_intvl",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Nominal Grant Interval (usec)", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_tol_grant_jitter,
{".21 Tolerated Grant Jitter (usec)", "docsis_tlv.sflow.tol_grant_jitter",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Tolerated Grant Jitter (usec)", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_grants_per_intvl,
{".22 Grants Per Interval", "docsis_tlv.sflow.grnts_per_intvl",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Grants Per Interval", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_ip_tos_overwrite,
{".23 IP TOS Overwrite", "docsis_tlv.sflow.iptos_overwrite",
FT_UINT16, BASE_HEX, NULL, 0x0,
"IP TOS Overwrite", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_ugs_timeref,
{".24 UGS Time Reference", "docsis_tlv.sflow.ugs_timeref",
FT_UINT32, BASE_DEC, NULL, 0x0,
"UGS Time Reference", HFILL}
- },
+ },
{&hf_docsis_tlv_sflow_vendor_spec,
{".43 Vendor Specific Encodings", "docsis_tlv.sflow.vendorspec",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Vendor Specific Encodings", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_phs,
{"26 PHS Rules", "docsis_tlv.phs",
FT_BYTES, BASE_NONE, NULL, 0x0,
"PHS Rules", HFILL}
- },
+ },
#endif
{&hf_docsis_tlv_phs_class_ref,
{".1 Classifier Reference", "docsis_tlv.phs.classref",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Classifier Reference", HFILL}
- },
+ },
{&hf_docsis_tlv_phs_class_id,
{".2 Classifier Id", "docsis_tlv.phs.classid",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Classifier Id", HFILL}
- },
+ },
{&hf_docsis_tlv_phs_sflow_ref,
{".3 Service flow reference", "docsis_tlv.phs.sflowref",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Service Flow Reference", HFILL}
- },
+ },
{&hf_docsis_tlv_phs_sflow_id,
{".4 Service flow Id", "docsis_tlv.phs.sflowid",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Service Flow Id", HFILL}
- },
+ },
{&hf_docsis_tlv_phs_dsc_action,
{".5 DSC Action", "docsis_tlv.phs.dscaction",
FT_UINT8, BASE_DEC, VALS (action_vals), 0x0,
"Dynamic Service Change Action", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_phs_err,
{".6 Error Encodings", "docsis_tlv.phs.err",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Error Encodings", HFILL}
- },
+ },
#endif
{&hf_docsis_tlv_phs_err_param,
{"..1 Param Subtype", "docsis_tlv.phs.err.param",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Parameter Subtype", HFILL}
- },
+ },
{&hf_docsis_tlv_phs_err_code,
{"..2 Error Code", "docsis_tlv.phs.err.code",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Error Code", HFILL}
- },
+ },
{&hf_docsis_tlv_phs_err_msg,
{"..3 Error Message", "docsis_tlv.phs.err.msg",
FT_STRINGZ, BASE_NONE, NULL, 0x0,
"Error Message", HFILL}
- },
+ },
{&hf_docsis_tlv_phs_phsf,
{".7 PHS Field", "docsis_tlv.phs.phsf",
FT_BYTES, BASE_NONE, NULL, 0x0,
"PHS Field", HFILL}
- },
+ },
{&hf_docsis_tlv_phs_phsi,
{".8 PHS Index", "docsis_tlv.phs.phsi",
FT_UINT8, BASE_DEC, NULL, 0x0,
"PHS Index", HFILL}
- },
+ },
{&hf_docsis_tlv_phs_phsm,
{".9 PHS Mask", "docsis_tlv.phs.phsm",
FT_BYTES, BASE_NONE, NULL, 0x0,
"PHS Mask", HFILL}
- },
+ },
{&hf_docsis_tlv_phs_phss,
{".10 PHS Size", "docsis_tlv.phs.phss",
FT_UINT8, BASE_DEC, NULL, 0x0,
"PHS Size", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_phs_phsv,
{".11 PHS Verify", "docsis_tlv.phs.phsv",
FT_BOOLEAN, BASE_NONE, TFS (&verify_tfs), 0x0,
"PHS Verify", HFILL}
- },
+ },
#endif
{&hf_docsis_tlv_phs_vendorspec,
{".43 PHS Vendor Specific", "docsis_tlv.phs.vendorspec",
FT_BYTES, BASE_NONE, NULL, 0x0,
"PHS Vendor Specific", HFILL}
- },
+ },
{&hf_docsis_tlv_hmac_digest,
{"27 HMAC Digest", "docsis_tlv.hmac_digest",
FT_BYTES, BASE_NONE, NULL, 0x0,
"HMAC Digest", HFILL}
- },
+ },
{&hf_docsis_tlv_max_classifiers,
{"28 Max # of Classifiers", "docsis_tlv.maxclass",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Max # of Classifiers", HFILL}
- },
+ },
{&hf_docsis_tlv_privacy_enable,
{"29 Privacy Enable", "docsis_tlv.bpi_en",
FT_BOOLEAN, BASE_NONE, TFS (&ena_dis_tfs), 0x0,
"Privacy Enable", HFILL}
- },
+ },
{&hf_docsis_tlv_auth_block,
{"30 Auth Block", "docsis_tlv.auth_block",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Auth Block", HFILL}
- },
+ },
{&hf_docsis_tlv_key_seq_num,
{"31 Key Sequence Number", "docsis_tlv.key_seq",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Key Sequence Number", HFILL}
- },
+ },
{&hf_docsis_tlv_mfgr_cvc,
{"32 Manufacturer CVC", "docsis_tlv.mfgr_cvc",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Manufacturer CVC", HFILL}
- },
+ },
{&hf_docsis_tlv_cosign_cvc,
{"33 Co-Signer CVC", "docsis_tlv.cosign_cvc",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Co-Signer CVC", HFILL}
- },
+ },
{&hf_docsis_tlv_snmpv3_kick,
{"34 SNMPv3 Kickstart Value", "docsis_tlv.snmpv3",
FT_BYTES, BASE_NONE, NULL, 0x0,
"SNMPv3 Kickstart Value", HFILL}
- },
+ },
{&hf_docsis_tlv_snmpv3_kick_name,
{".1 SNMPv3 Kickstart Security Name", "docsis_tlv.snmpv3.secname",
FT_STRING, BASE_NONE, NULL, 0x0,
"SNMPv3 Kickstart Security Name", HFILL}
- },
+ },
{&hf_docsis_tlv_snmpv3_kick_publicnum,
{".2 SNMPv3 Kickstart Manager Public Number", "docsis_tlv.snmpv3.publicnum",
FT_BYTES, BASE_NONE, NULL, 0x0,
"SNMPv3 Kickstart Value Manager Public Number", HFILL}
- },
+ },
{&hf_docsis_tlv_subs_mgmt_ctrl,
{"35 Subscriber Management Control", "docsis_tlv.subsmgmtctrl",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Subscriber Management Control", HFILL}
- },
+ },
{&hf_docsis_tlv_subs_mgmt_ip_table,
{"36 Subscriber Management CPE IP Table", "docsis_tlv.subsiptable",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Subscriber Management CPE IP Table", HFILL}
- },
+ },
{&hf_docsis_tlv_subs_mgmt_ip_entry,
{"Subscriber Management CPE IP Entry", "docsis_tlv.subsipentry",
FT_IPv4, BASE_NONE, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_tlv_subs_mgmt_filter_grps,
{"37 Subscriber Management Filter Groups", "docsis_tlv.subsfltrgrps",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Subscriber Management Filter Groups", HFILL}
- },
+ },
{&hf_docsis_tlv_snmpv3_ntfy_rcvr,
{"38 SNMPv3 Notification Receiver", "docsis_tlv.snmpv3ntfy",
FT_BYTES, BASE_NONE, NULL, 0x0,
"SNMPv3 Notification Receiver", HFILL}
- },
+ },
{&hf_docsis_tlv_enable_20_mode,
{"39 Enable 2.0 Mode", "docsis_tlv.enable20mode",
FT_BOOLEAN, BASE_NONE, TFS (&ena_dis_tfs), 0x0,
"Enable 2.0 Mode", HFILL}
- },
+ },
{&hf_docsis_tlv_enable_test_modes,
{"40 Enable Test Modes", "docsis_tlv.enabletestmodes",
FT_BOOLEAN, BASE_NONE, TFS (&ena_dis_tfs), 0x0,
"Enable Test Modes", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_ds_ch_list,
{"41 Downstream Channel List", "docsis_tlv.dschlist",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_tlv_ds_ch_list_single,
{".1 Single Downstream Channel", "docsis_tlv.dschlist.single",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL}
- },
+ },
#endif
{&hf_docsis_tlv_single_ch_timeout,
{"..1 Timeout", "docsis_tlv.dschlist.single.timeout",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Timeout", HFILL}
- },
+ },
{&hf_docsis_tlv_single_ch_freq,
{"..2 Timeout", "docsis_tlv.dschlist.single.freq",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Timeout", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_ds_ch_list_range,
{".2 Downstream Frequency Range", "docsis_tlv.dschlist.range",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL}
- },
+ },
#endif
{&hf_docsis_tlv_freq_rng_timeout,
{"..1 Timeout", "docsis_tlv.dschlist.range.timeout",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Timeout", HFILL}
- },
+ },
{&hf_docsis_tlv_freq_rng_start,
{"..2 Frequency Start", "docsis_tlv.dschlist.range.start",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Frequency Start", HFILL}
- },
+ },
{&hf_docsis_tlv_freq_rng_end,
{"..3 Frequency Start", "docsis_tlv.dschlist.range.end",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Frequency End", HFILL}
- },
+ },
{&hf_docsis_tlv_freq_rng_step,
{"..4 Frequency Step Size", "docsis_tlv.dschlist.range.step",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Frequency Step Size", HFILL}
- },
+ },
{&hf_docsis_tlv_ds_ch_list_default_timeout,
{".3 Default Scanning Timeout", "docsis_tlv.dschlist.defaulttimeout",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Default Scanning Timeout", HFILL}
- },
+ },
{&hf_docsis_tlv_mc_mac_address,
{"42 Static Multicast MAC Address", "docsis_tlv.mcmac",
FT_ETHER, BASE_NONE, NULL, 0x0,
"Static Multicast MAC Address", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_vendor_spec,
{"43 Vendor Specific Encodings", "docsis_tlv.vendorspec",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Vendor Specific Encodings", HFILL}
- },
+ },
#endif
{&hf_docsis_tlv_rng_tech,
{"Ranging Technique", "docsis_tlv.rng_tech",
FT_UINT8, BASE_DEC, VALS (rng_tech_vals), 0x0,
NULL, HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_dut_filter,
{"45 Downstream Unencrypted Traffic Filtering Encoding", "docsis_tlv.dut",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Downstream Unencrypted Traffic Filtering Encoding", HFILL}
- },
+ },
#endif
{&hf_docsis_tlv_dut_filter_control,
{".1 DUT Control", "docsis_tlv.dut.control",
FT_BOOLEAN, BASE_NONE, TFS (&ena_dis_tfs), 0x0,
"DUT Control", HFILL}
- },
+ },
{&hf_docsis_tlv_dut_filter_cmim,
{".2 DUT CMIM", "docsis_tlv.dut.cmim",
FT_BYTES, BASE_NONE, NULL, 0x0,
"DUT CMIM", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_tcc,
{"46 Transmit Channel Configuration", "docsis_tlv.tcc",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Transmit Channel Configuration", HFILL}
- },
+ },
#endif
{&hf_docsis_tlv_tcc_refid,
{".1 TCC Reference ID", "docsis_tlv.tcc.refid",
FT_UINT8, BASE_DEC, NULL, 0x0,
"TCC Reference ID", HFILL}
- },
+ },
{&hf_docsis_tlv_tcc_us_ch_action,
{".2 Upstream Channel Action", "docsis_tlv.tcc.uschact",
FT_UINT8, BASE_DEC, VALS (us_ch_action_vals), 0x0,
"Upstream Channel Action", HFILL}
- },
+ },
{&hf_docsis_tlv_tcc_us_ch_id,
{".3 Upstream Channel ID", "docsis_tlv.tcc.uschid",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Upstream Channel ID", HFILL}
- },
+ },
{&hf_docsis_tlv_tcc_new_us_ch_id,
{".4 New Upstream Channel ID", "docsis_tlv.tcc.newuschid",
FT_UINT8, BASE_DEC, NULL, 0x0,
"New Upstream Channel ID", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_tcc_ucd,
{".5 Upstream Channel Decsriptor", "docsis_tlv.tcc.ucd",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Upstream Channel Descriptor", HFILL}
- },
+ },
#endif
{&hf_docsis_tlv_tcc_rng_sid,
{".6 Ranging SID", "docsis_tlv.tcc.rngsid",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Ranging SID", HFILL}
- },
+ },
{&hf_docsis_tlv_tcc_init_tech,
{".7 Initialization Technique", "docsis_tlv.tcc.inittech",
FT_UINT8, BASE_DEC, VALS (init_tech_vals), 0x0,
"Initialization Technique", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_tcc_rng_parms,
{".8 Ranging Parameters", "docsis_tlv.tcc.rngparms",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Ranging Parameters", HFILL}
- },
+ },
#endif
{&hf_docsis_rng_parms_us_ch_id,
{"..1 Ranging Reference Channel ID", "docsis_tlv.tcc.rngparms.uschid",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Upstream Channel ID", HFILL}
- },
+ },
{&hf_docsis_rng_parms_time_off_int,
{"..2 Timing Offset, Integer Part", "docsis_tlv.tcc.rngparms.timeoffint",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Timing Offset, Integer Part", HFILL}
- },
+ },
{&hf_docsis_rng_parms_time_off_frac,
{"..3 Timing Offset, Fractional Part", "docsis_tlv.tcc.rngparms.timeofffrac",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Timing Offset, Fractional Part", HFILL}
- },
+ },
{&hf_docsis_rng_parms_power_off,
{"..4 Power Offset", "docsis_tlv.tcc.rngparms.poweroff",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Power Offset", HFILL}
- },
+ },
{&hf_docsis_rng_parms_freq_off,
{"..5 Frequency Offset", "docsis_tlv.tcc.rngparms.freqoff",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Frequency Offset", HFILL}
- },
+ },
{&hf_docsis_tlv_tcc_dyn_rng_win,
{".9 Dynamic Range Window", "docsis_tlv.tcc.dynrngwin",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Dynamic Range Window", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_tcc_err,
{".10 TCC Error Encodings", "docsis_tlv.tcc.err",
FT_BYTES, BASE_NONE, NULL, 0x0,
"TCC Error Encodings", HFILL}
- },
+ },
#endif
{&hf_docsis_tcc_err_subtype,
{"..1 TCC Subtype", "docsis_tlv.tcc.err.subtype",
FT_BYTES, BASE_NONE, NULL, 0x0,
"TCC Subtype", HFILL}
- },
+ },
{&hf_docsis_tcc_err_code,
{"..2 Error Code", "docsis_tlv.tcc.err.code",
FT_UINT8, BASE_DEC, VALS(docsis_conf_code), 0x0,
"Error Code", HFILL}
- },
+ },
{&hf_docsis_tcc_err_msg,
{"..3 Error Message", "docsis_tlv.tcc.err.msg",
FT_STRINGZ, BASE_NONE, NULL, 0x0,
"Error Message", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_sid_cl,
{"47 Service Flow SID Cluster Assignments", "docsis_tlv.sid",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Service Flow SID Cluster Assignments", HFILL}
- },
+ },
#endif
{&hf_docsis_sid_cl_sf_id,
{".1 Service Flow ID", "docsis_tlv.sid.sfid",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Upstream Channel ID", HFILL}
- },
+ },
#if 0
{&hf_docsis_sid_cl_enc,
{".2 SID Cluster Encodings", "docsis_tlv.sid.enc",
FT_BYTES, BASE_NONE, NULL, 0x0,
"SID Cluster Encodings", HFILL}
- },
+ },
#endif
{&hf_docsis_sid_cl_enc_id,
{"..1 SID Cluster ID", "docsis_tlv.sid.enc.id",
FT_UINT8, BASE_DEC, NULL, 0x0,
"SID Cluster ID", HFILL}
- },
+ },
#if 0
{&hf_docsis_sid_cl_enc_map,
{"..2 SID-to-Channel Mapping", "docsis_tlv.sid.enc.map",
FT_BYTES, BASE_NONE, NULL, 0x0,
"SID Cluster ID", HFILL}
- },
+ },
#endif
{&hf_docsis_sid_cl_map_us_ch_id,
{"...1 Upstream Channel ID", "docsis_tlv.sid.enc.map.uschid",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Upstream Channel ID", HFILL}
- },
+ },
{&hf_docsis_sid_cl_map_sid,
{"...2 SID", "docsis_tlv.sid.enc.map.sid",
FT_UINT16, BASE_DEC, NULL, 0x0,
"SID", HFILL}
- },
+ },
{&hf_docsis_sid_cl_map_action,
{"...3 SID-to-Channel Mapping Action", "docsis_tlv.sid.enc.map.action",
FT_UINT8, BASE_DEC, VALS (sid_ch_map_vals), 0x0,
"SID-to-Channel Mapping Action", HFILL}
- },
+ },
#if 0
{&hf_docsis_sid_cl_so_crit,
{".3 SID Cluster Switchover Criteria", "docsis_tlv.sid.socrit",
FT_BYTES, BASE_NONE, NULL, 0x0,
"SID Cluster Switchover Criteria", HFILL}
- },
+ },
#endif
{&hf_docsis_sid_cl_so_max_req,
{"..1 Maximum Requests per SID Cluster", "docsis_tlv.sid.socrit.maxreq",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Maximum Requests per SID Cluster", HFILL}
- },
+ },
{&hf_docsis_sid_cl_so_max_out_bytes,
{"..2 Maximum Outstanding Bytes per SID Cluster", "docsis_tlv.sid.socrit.maxoutbytes",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Maximum Outstanding Bytes per SID Cluster", HFILL}
- },
+ },
{&hf_docsis_sid_cl_so_max_req_bytes,
{"..3 Maximum Total Bytes Requested per SID Cluster", "docsis_tlv.sid.socrit.maxreqbytes",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Maximum Total Bytes Requested per SID Cluster", HFILL}
- },
+ },
{&hf_docsis_sid_cl_so_max_time,
{"..4 Maximum Time in the SID Cluster", "docsis_tlv.sid.socrit.maxtime",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Maximum Time in the SID Cluster", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_rcp,
{"48 Receive Channel Profile", "docsis_tlv.rcp",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Receive Channel Profile", HFILL}
- },
+ },
#endif
{&hf_docsis_tlv_rcp_id,
{".1 RCP-ID", "docsis_tlv.rcp.id",
FT_BYTES, BASE_NONE, NULL, 0x0,
"RCP-ID", HFILL}
- },
+ },
{&hf_docsis_tlv_rcp_name,
{".2 RCP Name", "docsis_tlv.rcp.name",
FT_BYTES, BASE_NONE, NULL, 0x0,
"RCP Name", HFILL}
- },
+ },
{&hf_docsis_tlv_rcp_freq_spc,
{".3 RCP Center Frequency Spacing", "docsis_tlv.rcp.freq_spc",
FT_UINT8, BASE_DEC, NULL, 0x0,
"RCP Center Frequency Spacing", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_rcp_rcv_mod_enc,
{".4 Receive Module Capability", "docsis_tlv.rcp.rcv_mod_enc",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Receive Module Encoding", HFILL}
- },
+ },
#endif
{&hf_docsis_rcv_mod_enc_idx,
{"..1 Receive Module Index", "docsis_tlv.rcp.rcv_mod_enc.idx",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Receive Module Index", HFILL}
- },
+ },
#if 0
{&hf_docsis_rcv_mod_enc_adj_ch,
{"..2 Adjacent Channels", "docsis_tlv.rcp.rcv_mod_enc.adj_ch",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Adjacent Channels", HFILL}
- },
+ },
{&hf_docsis_rcv_mod_enc_ch_bl_rng,
{"..3 Channel Block Range", "docsis_tlv.rcp.rcv_mod_enc.ch_bl_rng",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Channel Block Range", HFILL}
- },
+ },
#endif
{&hf_docsis_rcv_mod_enc_ctr_freq_asgn,
{"..4 First Channel Center Frequency Assignment", "docsis_tlv.rcv_mod_enc.ctr_freq_asgn",
FT_UINT32, BASE_DEC, NULL, 0x0,
"First Channel Center Frequency Assignment", HFILL}
- },
+ },
{&hf_docsis_ch_bl_rng_min_ctr_freq,
{"...1 Minimum Center Frequency", "docsis_tlv.rcp.rcv_mod_enc.ch_bl_rng.min_ctr_freq",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Minimum Center Frequency", HFILL}
- },
+ },
{&hf_docsis_ch_bl_rng_max_ctr_freq,
{"...2 Maximum Center Frequency", "docsis_tlv.rcp.rcv_mod_enc.ch_bl_rng.max_ctr_freq",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Maximum Center Frequency", HFILL}
- },
+ },
{&hf_docsis_rcv_mod_enc_rsq_ch_subs_cap ,
{"..5 Resequencing Channel Subset Capability", "docsis_tlv.rcp.rcv_mod_enc.rsq_ch_subs_cap",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Resequencing Channel Subset Capability", HFILL}
- },
+ },
{&hf_docsis_rcv_mod_enc_conn ,
{"..6 Receive Module Connectivity", "docsis_tlv.rcp.rcv_mod_enc.conn",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Receive Module Connectivity", HFILL}
- },
+ },
{&hf_docsis_rcv_mod_enc_phy_layr_parms,
{"..7 Physical Layer Parameter", "docsis_tlv.rcp.rcv_mod_enc.phy_layr_parms",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Physical Layer Parameter", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_rcp_rcv_ch,
{".5 Receive Channel", "docsis_tlv.rcp.rcv_ch",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Receive Channel", HFILL}
- },
+ },
#endif
{&hf_docsis_rcv_ch_idx,
{"..1 Receive Channel Index", "docsis_tlv.rcp.rcv_ch.idx",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Receive Channel Index", HFILL}
- },
+ },
{&hf_docsis_rcv_ch_conn,
{"..2 Receive Channel Connectivity", "docsis_tlv.rcp.rcv_ch.conn",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Receive Channel Connectivity", HFILL}
- },
+ },
{&hf_docsis_rcv_ch_conn_off,
{"..3 Receive Channel Connected Offset", "docsis_tlv.rcp.rcv_ch.conn_off",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Receive Channel Connected Offset", HFILL}
- },
+ },
{&hf_docsis_rcv_ch_prim_ds_ch_ind,
{"..5 Primary Downstream Channel Indicator", "docsis_tlv.rcp.rcv_ch.prim_ds_ch_ind",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Primary Downstream Channel Indicator", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_rcp_ven_spec,
{".43 Vendor Specific Encodings", "docsis_tlv.rcp.vendorspec",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Vendor Specific Encodings", HFILL}
- },
+ },
{&hf_docsis_tlv_rcc,
{"49 Receive Channel Configuration", "docsis_tlv.rcc",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Receive Channel Configuration", HFILL}
- },
+ },
#endif
{&hf_docsis_tlv_rcc_id,
{".1 Assigned RCP-ID", "docsis_tlv.rcc.id",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Assigned RCP-ID", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_rcc_rcv_mod_enc,
{".4 Receive Module Assignment", "docsis_tlv.rcc.rcv_mod_enc",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Receive Module Assignment", HFILL}
- },
+ },
#endif
{&hf_docsis_rcc_rcv_mod_enc_idx,
{"..1 Receive Module Index", "docsis_tlv.rcc.rcc_rcv_mod_enc.idx",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Receive Module Index", HFILL}
- },
+ },
{&hf_docsis_rcc_rcv_mod_enc_ctr_freq_asgn,
{"..4 First Channel Center Frequency Assignment", "docsis_tlv.rcc.rcv_mod_enc.ctr_freq_asgn",
FT_UINT32, BASE_DEC, NULL, 0x0,
"First Channel Center Frequency Assignment", HFILL}
- },
+ },
{&hf_docsis_rcc_rcv_mod_enc_conn ,
{"..6 Receive Module Connectivity", "docsis_tlv.rcc.rcv_mod_enc.conn",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Receive Module Connectivity", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_rcc_rcv_ch,
{".5 Receive Channel", "docsis_tlv.rcc.rcv_ch",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Receive Channel", HFILL}
- },
+ },
#endif
{&hf_docsis_rcc_rcv_ch_idx,
{"..1 Receive Channel Index", "docsis_tlv.rcc.rcv_ch.idx",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Receive Channel Index", HFILL}
- },
+ },
{&hf_docsis_rcc_rcv_ch_conn,
{"..2 Receive Channel Connectivity", "docsis_tlv.rcc.rcv_ch.conn",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Receive Channel Connectivity", HFILL}
- },
+ },
{&hf_docsis_rcc_rcv_ch_ctr_freq_asgn,
{"..4 Receive Channel Center Frequency Assignment", "docsis_tlv.rcc.rcv_ch.ctr_freq_asgn",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Receive Channel Center Frequency Assignment", HFILL}
- },
+ },
{&hf_docsis_rcc_rcv_ch_prim_ds_ch_ind,
{"..5 Primary Downstream Channel Indicator", "docsis_tlv.rcc.rcv_ch.prim_ds_ch_ind",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Primary Downstream Channel Indicator", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_rcc_part_serv_ds_ch,
{".6 Partial Service Downstream Channels", "docsis_tlv.rcc.part_serv_ds_ch",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Partial Service Downstream Channels", HFILL}
- },
+ },
{&hf_docsis_tlv_rcc_ven_spec,
{".43 Vendor Specific Encodings", "docsis_tlv.rcc.vendorspec",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Vendor Specific Encodings", HFILL}
- },
+ },
{&hf_docsis_tlv_rcc_err,
{".254 RCC Error Encodings", "docsis_tlv.rcc.err",
FT_BYTES, BASE_NONE, NULL, 0x0,
"RCC Error Encodings", HFILL}
- },
+ },
#endif
{&hf_docsis_tlv_rcc_err_mod_or_ch,
{".1 Receive Modul or Receive Channel", "docsis_tlv.rcc.err.mod_or_ch",
FT_UINT8, BASE_DEC, VALS (mod_or_ch_vals), 0x0,
"Receive Modul or Receive Channel", HFILL}
- },
+ },
{&hf_docsis_tlv_rcc_err_idx,
{".2 Receive Modul/Channel Index", "docsis_tlv.rcc.err.idx",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Receive Modul/Channel Index", HFILL}
- },
+ },
{&hf_docsis_tlv_rcc_err_param,
{".3 Reported Parameter", "docsis_tlv.rcc.err.param",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Reported Parameter", HFILL}
- },
+ },
{&hf_docsis_tlv_rcc_err_code,
{".4 Error Code", "docsis_tlv.rcc.err.code",
FT_UINT8, BASE_DEC, VALS (docsis_conf_code), 0x0,
"Error Code", HFILL}
- },
+ },
{&hf_docsis_tlv_rcc_err_msg,
{".5 Error Message", "docsis_tlv.rcc.err.msg",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Error Message", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_dsid,
{"50 DSID Encodings", "docsis_tlv.dsid",
FT_BYTES, BASE_NONE, NULL, 0x0,
"DSID Encodings", HFILL}
- },
+ },
#endif
{&hf_docsis_tlv_dsid_id,
{".1 Downstream Service Identifier (DSID)", "docsis_tlv.dsid.id",
FT_UINT24, BASE_DEC, NULL, 0x0,
"Downstream Service Identifier (DSID)", HFILL}
- },
+ },
{&hf_docsis_tlv_dsid_action,
{".2 DSID Action", "docsis_tlv.dsid.action",
FT_UINT8, BASE_DEC, VALS (dsid_action_vals), 0x0,
"DSID Action", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_dsid_ds_reseq,
{".3 Downstream Resequencing Encodings", "docsis_tlv.dsid.ds_reseq",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Downstream Resequencing Encodings", HFILL}
- },
+ },
#endif
{&hf_docsis_ds_reseq_dsid,
{"..1 Resequencing DSID", "docsis_tlv.dsid.ds_reseq.dsid",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Resequencing DSID", HFILL}
- },
+ },
{&hf_docsis_ds_reseq_ch_lst,
{"..2 Downstream Resequencing Channel List", "docsis_tlv.dsid.ds_reseq.ch_lst",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Downstream Resequencing Channel List", HFILL}
- },
+ },
{&hf_docsis_ds_reseq_wait_time,
{"..3 Downstream Resequencing Wait Time", "docsis_tlv.dsid.ds_reseq.wait_time",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Downstream Resequencing Wait Time", HFILL}
- },
+ },
{&hf_docsis_ds_reseq_warn_thresh,
{"..4 Resequencing Warn Threshold", "docsis_tlv.dsid.ds_reseq.warn_thresh",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Resequencing Warn Threshold", HFILL}
- },
+ },
{&hf_docsis_ds_reseq_ho_timer,
{"..5 CM-Status max. Event Hold-Off Timer (Out-of-Range Events)", "docsis_tlv.dsid.ds_reseq.ho_timer",
FT_UINT16, BASE_DEC, NULL, 0x0,
"CM-Status max. Event Hold-Off Timer (Out-of-Range Events)", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_dsid_mc,
{".4 Multicast Encodings", "docsis_tlv.dsid.mc",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Multicast Encodings", HFILL}
- },
+ },
{&hf_docsis_tlv_dsid_mc_addr,
{"..1 Client MAC Address Encodings", "docsis_tlv.dsid.mc.addr",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Client MAC Address Encodings", HFILL}
- },
+ },
#endif
{&hf_docsis_mc_addr_action,
{"...1 Client MAC Address Action", "docsis_tlv.dsid.mc.addr.action",
FT_UINT8, BASE_DEC, VALS (add_del_vals), 0x0,
"Client MAC Address Action", HFILL}
- },
+ },
{&hf_docsis_mc_addr_addr,
{"...2 Client MAC Address", "docsis_tlv.dsid.mc.addr.addr",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Client MAC Address", HFILL}
- },
+ },
{&hf_docsis_tlv_dsid_mc_cmim,
{"..2 Multicast CM Interface Mask", "docsis_tlv.dsid.mc.cmim",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Multicast CM Interface Mask", HFILL}
- },
+ },
{&hf_docsis_tlv_dsid_mc_group,
{"..3 Multicast Group MAC Addresses", "docsis_tlv.dsid.mc.group",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Multicast Group MAC Addresses", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_dsid_mc_phs,
{"..26 Payload Header Suppression Encodings", "docsis_tlv.dsid.mc.phs",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Payload Header Suppression Encodings", HFILL}
- },
+ },
{&hf_docsis_tlv_sec_assoc,
{"51 Security Association Encodings", "docsis_tlv.sec_assoc",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Security Association Encodings", HFILL}
- },
+ },
#endif
{&hf_docsis_tlv_sec_assoc_action,
{".1 SA Action", "docsis_tlv.sec_assoc.action",
FT_UINT8, BASE_DEC, VALS (add_del_vals), 0x0,
"SA Action", HFILL}
- },
+ },
{&hf_docsis_tlv_sec_assoc_desc,
{".23 SA Descriptor", "docsis_tlv.sec_assoc.desc",
FT_BYTES, BASE_NONE, NULL, 0x0,
"SA Descriptor", HFILL}
- },
+ },
{&hf_docsis_tlv_init_ch_timeout,
{"52 Intializing Channel Timeout", "docsis_tlv.init_ch_timeout",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Intializing Channel Timeout", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_ch_asgn,
{"56 Channel Assignment Configuration Settings", "docsis_tlv.ch_asgn",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Channel Assignment Configuration Settings", HFILL}
- },
+ },
#endif
{&hf_docsis_ch_asgn_us_ch_id,
{".1 Upstream Channel ID", "docsis_tlv.ch_asgn.us_ch_id",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Upstream Channel ID", HFILL}
- },
+ },
{&hf_docsis_ch_asgn_rx_freq,
{".2 Rx Frequency", "docsis_tlv.ch_asgn.rx_freq",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Rx Frequency", HFILL}
- },
+ },
{&hf_docsis_tlv_cm_init_reason,
{"57 CM Initialization Reason", "docsis_tlv.cm_init_reason",
FT_UINT16, BASE_DEC, VALS (init_reason_vals), 0x0,
"CM Initialization Reason", HFILL}
- },
+ },
{&hf_docsis_tlv_sw_upg_srvr_ipv6,
{"58 Software Upgrade Server IPv6", "docsis_tlv.sw_upg_srvr_ipv6",
FT_IPv6, BASE_NONE, NULL, 0x0,
"Software Upgrade Server IPv6", HFILL}
- },
+ },
{&hf_docsis_tlv_tftp_prov_cm_ipv6_addr,
{"59 TFTP Server Provisioned Modem IPv6 Address", "docsis_tlv.tftp_prov_cm_ipv6_addr",
FT_IPv6, BASE_NONE, NULL, 0x0,
"TFTP Server Provisioned Modem IPv6 Address", HFILL}
- },
+ },
{&hf_docsis_tlv_us_drop_clfy,
{"60 Upstream Drop Packet Classification Encoding", "docsis_tlv.us_drop_clfy",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Upstream Drop Packet Classification Encoding", HFILL}
- },
+ },
{&hf_docsis_tlv_subs_mgmt_ipv6_lst,
{"61 Subscriber Management CPE IPv6 Prefix List", "docsis_tlv.subs_mgmt_ipv6_lst",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Subscriber Management CPE IPv6 Prefix List", HFILL}
- },
+ },
{&hf_docsis_tlv_us_drop_clfy_group_id,
{"62 Upstream Drop Classifier Group ID", "docsis_tlv.us_drop_clfy_group_id",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Upstream Drop Classifier Group ID", HFILL}
- },
+ },
{&hf_docsis_tlv_subs_mgmt_ctrl_max_cpe_ipv6,
{"63 Subscriber Management Control Max CPE IPv6 Prefix", "docsis_tlv.subs_mgmt_ctrl_max_cpe_ipv6",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Subscriber Management Control Max CPE IPv6 Prefix", HFILL}
- },
+ },
#if 0
{&hf_docsis_tlv_cmts_mc_sess_enc,
{"64 CMTS Static Multicast Session Encoding", "docsis_tlv.cmts_mc_sess_enc",
FT_BYTES, BASE_NONE, NULL, 0x0,
"CMTS Static Multicast Session Encoding", HFILL}
- },
+ },
#endif
{&hf_docsis_cmts_mc_sess_enc_grp,
{".1 Multicast Group Address", "docsis_tlv.cmts_mc_sess_enc.grp",
FT_IPXNET, BASE_NONE, NULL, 0x0,
"Multicast Group Address", HFILL}
- },
+ },
{&hf_docsis_cmts_mc_sess_enc_src,
{".2 Source IP Address", "docsis_tlv.cmts_mc_sess_enc.src",
FT_IPXNET, BASE_NONE, NULL, 0x0,
"Source IP Address", HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_tlv,
&ett_docsis_tlv_cos,
@@ -5886,22 +5897,15 @@ proto_register_docsis_tlv (void)
&ett_docsis_cmts_mc_sess_enc,
};
-/* Register the protocol name and description */
proto_docsis_tlv = proto_register_protocol ("DOCSIS Appendix C TLV's",
"DOCSIS TLVs", "docsis_tlv");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_tlv, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_tlv", dissect_tlv, proto_docsis_tlv);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_tlv (void)
{
@@ -5914,5 +5918,17 @@ proto_reg_handoff_docsis_tlv (void)
docsis_vsif_handle = find_dissector("docsis_vsif");
docsis_ucd_handle = find_dissector("docsis_ucd");
-
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-type29ucd.c b/plugins/docsis/packet-type29ucd.c
index 922af953b5..ed7bcdf2df 100644
--- a/plugins/docsis/packet-type29ucd.c
+++ b/plugins/docsis/packet-type29ucd.c
@@ -129,23 +129,23 @@ static gint ett_docsis_type29ucd = -1;
static gint ett_burst_descr = -1;
static const value_string channel_tlv_vals[] _U_ = {
- {type29ucd_SYMBOL_RATE, "Symbol Rate"},
- {type29ucd_FREQUENCY, "Frequency"},
- {type29ucd_PREAMBLE, "Preamble Pattern"},
- {type29ucd_BURST_DESCR, "Burst Descriptor"},
- {type29ucd_BURST_DESCR5, "Burst Descriptor DOCSIS 2.0"},
- {type29ucd_EXT_PREAMBLE, "Extended Preamble Pattern"},
- {type29ucd_SCDMA_MODE_ENABLE, "SCDMA Mode Enabled"},
- {type29ucd_SCDMA_SPREADING_INTERVAL, "SCDMA Spreading Intervals per Frame"},
- {type29ucd_SCDMA_CODES_PER_MINI_SLOT, "SCDMA Codes per Mini-slot"},
- {type29ucd_SCDMA_ACTIVE_CODES, "SCDMA Number of Active Codes"},
- {type29ucd_SCDMA_CODE_HOPPING_SEED, "SCDMA Code Hopping Seed"},
- {type29ucd_SCDMA_US_RATIO_NUM, "SCDMA US ratio numerator M"},
- {type29ucd_SCDMA_US_RATIO_DENOM, "SCDMA US ratio denominator N"},
- {type29ucd_SCDMA_TIMESTAMP_SNAPSHOT, "SCDMA Timestamp Snapshot"},
- {type29ucd_MAINTAIN_POWER_SPECTRAL_DENSITY, "Maintain Power Spectral Density"},
- {type29ucd_RANGING_REQUIRED, "Ranging Required"},
- {0, NULL}
+ {type29ucd_SYMBOL_RATE, "Symbol Rate"},
+ {type29ucd_FREQUENCY, "Frequency"},
+ {type29ucd_PREAMBLE, "Preamble Pattern"},
+ {type29ucd_BURST_DESCR, "Burst Descriptor"},
+ {type29ucd_BURST_DESCR5, "Burst Descriptor DOCSIS 2.0"},
+ {type29ucd_EXT_PREAMBLE, "Extended Preamble Pattern"},
+ {type29ucd_SCDMA_MODE_ENABLE, "SCDMA Mode Enabled"},
+ {type29ucd_SCDMA_SPREADING_INTERVAL, "SCDMA Spreading Intervals per Frame"},
+ {type29ucd_SCDMA_CODES_PER_MINI_SLOT, "SCDMA Codes per Mini-slot"},
+ {type29ucd_SCDMA_ACTIVE_CODES, "SCDMA Number of Active Codes"},
+ {type29ucd_SCDMA_CODE_HOPPING_SEED, "SCDMA Code Hopping Seed"},
+ {type29ucd_SCDMA_US_RATIO_NUM, "SCDMA US ratio numerator M"},
+ {type29ucd_SCDMA_US_RATIO_DENOM, "SCDMA US ratio denominator N"},
+ {type29ucd_SCDMA_TIMESTAMP_SNAPSHOT, "SCDMA Timestamp Snapshot"},
+ {type29ucd_MAINTAIN_POWER_SPECTRAL_DENSITY, "Maintain Power Spectral Density"},
+ {type29ucd_RANGING_REQUIRED, "Ranging Required"},
+ {0, NULL}
};
static const value_string on_off_vals[] = {
@@ -155,32 +155,32 @@ static const value_string on_off_vals[] = {
};
static const value_string mod_vals2[] = {
- {1, "QPSK"},
- {2, "QAM16"},
- {3, "QAM8"},
- {4, "QAM32"},
- {5, "QAM64"},
- {6, "QAM128 (S-CDMA)"},
- {0, NULL}
+ {1, "QPSK"},
+ {2, "QAM16"},
+ {3, "QAM8"},
+ {4, "QAM32"},
+ {5, "QAM64"},
+ {6, "QAM128 (S-CDMA)"},
+ {0, NULL}
};
value_string iuc_vals2[] = {
- {IUC_REQUEST, "Request"},
- {IUC_REQ_DATA, "REQ/Data"},
- {IUC_INIT_MAINT, "Initial Maintenance"},
- {IUC_STATION_MAINT, "Station Maintenance"},
- {IUC_SHORT_DATA_GRANT, "Short Data Grant"},
- {IUC_LONG_DATA_GRANT, "Long Data Grant"},
- {IUC_NULL_IE, "NULL IE"},
- {IUC_DATA_ACK, "Data Ack"},
- {IUC_ADV_PHY_SHORT_DATA_GRANT, "Advanced Phy Short Data Grant"},
- {IUC_ADV_PHY_LONG_DATA_GRANT, "Advanced Phy Long Data Grant"},
- {IUC_ADV_PHY_UGS, "Advanced Phy UGS"},
- {IUC_RESERVED12, "Reserved 12"},
- {IUC_RESERVED13, "Reserved 13"},
- {IUC_RESERVED14, "Reserved 14"},
- {IUC_EXPANSION, "IUC Expansion"},
- {0, NULL}
+ {IUC_REQUEST, "Request"},
+ {IUC_REQ_DATA, "REQ/Data"},
+ {IUC_INIT_MAINT, "Initial Maintenance"},
+ {IUC_STATION_MAINT, "Station Maintenance"},
+ {IUC_SHORT_DATA_GRANT, "Short Data Grant"},
+ {IUC_LONG_DATA_GRANT, "Long Data Grant"},
+ {IUC_NULL_IE, "NULL IE"},
+ {IUC_DATA_ACK, "Data Ack"},
+ {IUC_ADV_PHY_SHORT_DATA_GRANT, "Advanced Phy Short Data Grant"},
+ {IUC_ADV_PHY_LONG_DATA_GRANT, "Advanced Phy Long Data Grant"},
+ {IUC_ADV_PHY_UGS, "Advanced Phy UGS"},
+ {IUC_RESERVED12, "Reserved 12"},
+ {IUC_RESERVED13, "Reserved 13"},
+ {IUC_RESERVED14, "Reserved 14"},
+ {IUC_EXPANSION, "IUC Expansion"},
+ {0, NULL}
};
static const value_string last_cw_len_vals[] = {
@@ -188,7 +188,8 @@ static const value_string last_cw_len_vals[] = {
{2, "Shortened"},
{0, NULL}
};
-/* Code to actually dissect the packets */
+
+/* Dissection */
static void
dissect_type29ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
@@ -206,851 +207,834 @@ dissect_type29ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
/* if the upstream Channel ID is 0 then this is for Telephony Return) */
if (upchid > 0)
- col_add_fstr (pinfo->cinfo, COL_INFO,
- "type29ucd Message: Channel ID = %u (U%u)", upchid,
- upchid - 1);
+ col_add_fstr (pinfo->cinfo, COL_INFO,
+ "type29ucd Message: Channel ID = %u (U%u)", upchid,
+ upchid - 1);
else
- col_add_fstr (pinfo->cinfo, COL_INFO,
- "type29ucd Message: Channel ID = %u (Telephony Return)",
- upchid);
+ col_add_fstr (pinfo->cinfo, COL_INFO,
+ "type29ucd Message: Channel ID = %u (Telephony Return)",
+ upchid);
if (tree)
{
type29ucd_item =
- proto_tree_add_protocol_format (tree, proto_docsis_type29ucd, tvb, 0,
- tvb_length_remaining (tvb, 0),
- "type29ucd Message");
+ proto_tree_add_protocol_format (tree, proto_docsis_type29ucd, tvb, 0,
+ tvb_length_remaining (tvb, 0),
+ "type29ucd Message");
type29ucd_tree = proto_item_add_subtree (type29ucd_item, ett_docsis_type29ucd);
proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_upstream_chid, tvb, 0, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_config_ch_cnt, tvb, 1, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_mini_slot_size, tvb, 2, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_down_chid, tvb, 3, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
pos = 4;
while (pos < len)
- {
- type = tvb_get_guint8 (tvb, pos++);
- length = tvb_get_guint8 (tvb, pos++);
- switch (type)
- {
- case type29ucd_SYMBOL_RATE:
- if (length == 1)
- {
- symrate = tvb_get_guint8 (tvb, pos);
- proto_tree_add_uint (type29ucd_tree, hf_docsis_type29ucd_symbol_rate,
- tvb, pos, length, symrate * 160);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- pos = pos + length;
- break;
- case type29ucd_FREQUENCY:
- if (length == 4)
- {
- proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_frequency, tvb,
- pos, length, ENC_BIG_ENDIAN);
- pos = pos + length;
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_PREAMBLE:
- proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_preamble_pat, tvb,
- pos, length, ENC_NA);
- pos = pos + length;
- break;
-/* DOCSIS 2.0 UCD TLV definitions
- * #define type29ucd_EXT_PREAMBLE 6
- * #define type29ucd_SCDMA_MODE_ENABLE 7
- * #define type29ucd_SCDMA_SPREADING_INTERVAL 8
- * #define type29ucd_SCDMA_CODES_PER_MINI_SLOT 9
- * #define type29ucd_SCDMA_ACTIVE_CODES 10
- * #define type29ucd_SCDMA_CODE_HOPPING_SEED 11
- * #define type29ucd_SCDMA_US_RATIO_NUM 12
- * #define type29ucd_SCDMA_US_RATIO_DENOM 13
- * #define type29ucd_SCDMA_TIMESTAMP_SNAPSHOT 14
- * #define type29ucd_MAINTAIN_POWER_SPECTRAL_DENSITY 15
- * #define type29ucd_RANGING_REQUIRED 16
- */
- case type29ucd_EXT_PREAMBLE:
- proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_ext_preamble, tvb,
- pos, length, ENC_NA);
- pos = pos + length;
- break;
- case type29ucd_SCDMA_MODE_ENABLE:
- if (length == 1)
- {
- proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_scdma_mode_enable,
- tvb, pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- pos = pos + length;
- break;
- case type29ucd_SCDMA_SPREADING_INTERVAL:
- if (length == 1)
- {
- proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_scdma_spreading_interval,
- tvb, pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- pos = pos + length;
- break;
- case type29ucd_SCDMA_CODES_PER_MINI_SLOT:
- if (length == 1)
- {
- proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_scdma_codes_per_mini_slot,
- tvb, pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- pos = pos + length;
- break;
- case type29ucd_SCDMA_ACTIVE_CODES:
- if (length == 1)
- {
- proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_scdma_active_codes,
- tvb, pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- pos = pos + length;
- break;
- case type29ucd_SCDMA_CODE_HOPPING_SEED:
- if (length == 2)
- {
- proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_scdma_code_hopping_seed,
- tvb, pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- pos = pos + length;
- break;
- case type29ucd_SCDMA_US_RATIO_NUM:
- if (length == 2)
- {
- proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_scdma_us_ratio_num,
- tvb, pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- pos = pos + length;
- break;
- case type29ucd_SCDMA_US_RATIO_DENOM:
- if (length == 2)
- {
- proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_scdma_us_ratio_denom,
- tvb, pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- pos = pos + length;
- break;
- case type29ucd_SCDMA_TIMESTAMP_SNAPSHOT:
- if (length == 9)
- {
- proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_scdma_timestamp_snapshot,
- tvb, pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- pos = pos + length;
- break;
- case type29ucd_MAINTAIN_POWER_SPECTRAL_DENSITY:
- if (length == 1)
- {
- proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_maintain_power_spectral_density,
- tvb, pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- pos = pos + length;
- break;
- case type29ucd_RANGING_REQUIRED:
- if (length == 1)
- {
- proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_ranging_required,
- tvb, pos, length, ENC_NA);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- pos = pos + length;
- break;
-/* DOCSIS 1.1 BURST DESCRIPTOR */
- case type29ucd_BURST_DESCR:
- burst_descr_tree =
- proto_tree_add_subtree_format(type29ucd_tree, tvb, pos, length,
- ett_burst_descr, NULL, "4 Burst Descriptor (Length = %u)",
- length);
- proto_tree_add_item (burst_descr_tree, hf_docsis_type29ucd_iuc, tvb,
- pos++, 1, ENC_BIG_ENDIAN);
- endtlvpos = pos + length - 1;
- while (pos < endtlvpos)
- {
- tlvtype = tvb_get_guint8 (tvb, pos++);
- tlvlen = tvb_get_guint8 (tvb, pos++);
- switch (tlvtype)
- {
- case type29ucd_MODULATION:
- if (tlvlen == 1)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_burst_mod_type, tvb,
- pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_DIFF_ENCODING:
- if (tlvlen == 1)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_burst_diff_encoding,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_PREAMBLE_LEN:
- if (tlvlen == 2)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_burst_preamble_len,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_PREAMBLE_VAL_OFF:
- if (tlvlen == 2)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_burst_preamble_val_off,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_FEC:
- if (tlvlen == 1)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_burst_fec, tvb, pos,
- tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_FEC_CODEWORD:
- if (tlvlen == 1)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_burst_fec_codeword,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_SCRAMBLER_SEED:
- if (tlvlen == 2)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_burst_scrambler_seed,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_MAX_BURST:
- if (tlvlen == 1)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_burst_max_burst, tvb,
- pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_GUARD_TIME:
- if (tlvlen == 1)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_burst_guard_time,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_LAST_CW_LEN:
- if (tlvlen == 1)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_burst_last_cw_len,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_SCRAMBLER_ONOFF:
- if (tlvlen == 1)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_burst_scrambler_onoff,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- } /* switch(tlvtype) */
- pos = pos + tlvlen;
- } /* while (pos < endtlvpos) */
- break;
-/* DOCSIS 2.0 Upstream Channel Descriptor */
- case type29ucd_BURST_DESCR5:
- burst_descr_tree =
- proto_tree_add_subtree_format(type29ucd_tree, tvb, pos, length,
- ett_burst_descr, NULL, "5 Burst Descriptor (Length = %u)",
- length);
- proto_tree_add_item (burst_descr_tree, hf_docsis_type29ucd_iuc, tvb,
- pos++, 1, ENC_BIG_ENDIAN);
- endtlvpos = pos + length - 1;
- while (pos < endtlvpos)
- {
- tlvtype = tvb_get_guint8 (tvb, pos++);
- tlvlen = tvb_get_guint8 (tvb, pos++);
- switch (tlvtype)
- {
- case type29ucd_MODULATION:
- if (tlvlen == 1)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_burst_mod_type, tvb,
- pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_DIFF_ENCODING:
- if (tlvlen == 1)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_burst_diff_encoding,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_PREAMBLE_LEN:
- if (tlvlen == 2)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_burst_preamble_len,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_PREAMBLE_VAL_OFF:
- if (tlvlen == 2)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_burst_preamble_val_off,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_FEC:
- if (tlvlen == 1)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_burst_fec, tvb, pos,
- tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_FEC_CODEWORD:
- if (tlvlen == 1)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_burst_fec_codeword,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_SCRAMBLER_SEED:
- if (tlvlen == 2)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_burst_scrambler_seed,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_MAX_BURST:
- if (tlvlen == 1)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_burst_max_burst, tvb,
- pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_GUARD_TIME:
- if (tlvlen == 1)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_burst_guard_time,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_LAST_CW_LEN:
- if (tlvlen == 1)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_burst_last_cw_len,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_SCRAMBLER_ONOFF:
- if (tlvlen == 1)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_burst_scrambler_onoff,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
-/* New cases added for DOCSIS 2.0 US Physical Burst Descriptor TLV */
-/* #define type29ucd_RS_INT_DEPTH 12
- * #define type29ucd_RS_INT_BLOCK 13
- * #define type29ucd_PREAMBLE_TYPE 14
- * #define type29ucd_SCMDA_SCRAMBLER_ONOFF 15
- * #define type29ucd_SCDMA_CODES_PER_SUBFRAME 16
- * #define type29ucd_SCDMA_FRAMER_INT_STEP_SIZE 17
- * #define type29ucd_TCM_ENABLED 18
- */
- case type29ucd_RS_INT_DEPTH:
- if (tlvlen == 1)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_rs_int_depth,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_RS_INT_BLOCK:
- if (tlvlen == 2)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_rs_int_block,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_PREAMBLE_TYPE:
- if (tlvlen == 1)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_preamble_type,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_SCMDA_SCRAMBLER_ONOFF:
- if (tlvlen == 1)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_scdma_scrambler_onoff,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_SCDMA_CODES_PER_SUBFRAME:
- if (tlvlen == 1)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_scdma_codes_per_subframe,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_SCDMA_FRAMER_INT_STEP_SIZE:
- if (tlvlen == 1)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_scdma_framer_int_step_size,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case type29ucd_TCM_ENABLED:
- if (tlvlen == 1)
- {
- proto_tree_add_item (burst_descr_tree,
- hf_docsis_tcm_enabled,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
-/* End of DOCSIS 2.0 US burst Descriptor Changes */
- } /* switch(tlvtype) */
- pos = pos + tlvlen;
- } /* while (pos < endtlvpos) */
- break;
- } /* switch(type) */
- } /* while (pos < len) */
- } /* if (tree) */
-
+ {
+ type = tvb_get_guint8 (tvb, pos++);
+ length = tvb_get_guint8 (tvb, pos++);
+ switch (type)
+ {
+ case type29ucd_SYMBOL_RATE:
+ if (length == 1)
+ {
+ symrate = tvb_get_guint8 (tvb, pos);
+ proto_tree_add_uint (type29ucd_tree, hf_docsis_type29ucd_symbol_rate,
+ tvb, pos, length, symrate * 160);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ pos = pos + length;
+ break;
+ case type29ucd_FREQUENCY:
+ if (length == 4)
+ {
+ proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_frequency, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ pos = pos + length;
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_PREAMBLE:
+ proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_preamble_pat, tvb,
+ pos, length, ENC_NA);
+ pos = pos + length;
+ break;
+ /* DOCSIS 2.0 UCD TLV definitions
+ * #define type29ucd_EXT_PREAMBLE 6
+ * #define type29ucd_SCDMA_MODE_ENABLE 7
+ * #define type29ucd_SCDMA_SPREADING_INTERVAL 8
+ * #define type29ucd_SCDMA_CODES_PER_MINI_SLOT 9
+ * #define type29ucd_SCDMA_ACTIVE_CODES 10
+ * #define type29ucd_SCDMA_CODE_HOPPING_SEED 11
+ * #define type29ucd_SCDMA_US_RATIO_NUM 12
+ * #define type29ucd_SCDMA_US_RATIO_DENOM 13
+ * #define type29ucd_SCDMA_TIMESTAMP_SNAPSHOT 14
+ * #define type29ucd_MAINTAIN_POWER_SPECTRAL_DENSITY 15
+ * #define type29ucd_RANGING_REQUIRED 16
+ */
+ case type29ucd_EXT_PREAMBLE:
+ proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_ext_preamble, tvb,
+ pos, length, ENC_NA);
+ pos = pos + length;
+ break;
+ case type29ucd_SCDMA_MODE_ENABLE:
+ if (length == 1)
+ {
+ proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_scdma_mode_enable,
+ tvb, pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ pos = pos + length;
+ break;
+ case type29ucd_SCDMA_SPREADING_INTERVAL:
+ if (length == 1)
+ {
+ proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_scdma_spreading_interval,
+ tvb, pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ pos = pos + length;
+ break;
+ case type29ucd_SCDMA_CODES_PER_MINI_SLOT:
+ if (length == 1)
+ {
+ proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_scdma_codes_per_mini_slot,
+ tvb, pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ pos = pos + length;
+ break;
+ case type29ucd_SCDMA_ACTIVE_CODES:
+ if (length == 1)
+ {
+ proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_scdma_active_codes,
+ tvb, pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ pos = pos + length;
+ break;
+ case type29ucd_SCDMA_CODE_HOPPING_SEED:
+ if (length == 2)
+ {
+ proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_scdma_code_hopping_seed,
+ tvb, pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ pos = pos + length;
+ break;
+ case type29ucd_SCDMA_US_RATIO_NUM:
+ if (length == 2)
+ {
+ proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_scdma_us_ratio_num,
+ tvb, pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ pos = pos + length;
+ break;
+ case type29ucd_SCDMA_US_RATIO_DENOM:
+ if (length == 2)
+ {
+ proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_scdma_us_ratio_denom,
+ tvb, pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ pos = pos + length;
+ break;
+ case type29ucd_SCDMA_TIMESTAMP_SNAPSHOT:
+ if (length == 9)
+ {
+ proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_scdma_timestamp_snapshot,
+ tvb, pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ pos = pos + length;
+ break;
+ case type29ucd_MAINTAIN_POWER_SPECTRAL_DENSITY:
+ if (length == 1)
+ {
+ proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_maintain_power_spectral_density,
+ tvb, pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ pos = pos + length;
+ break;
+ case type29ucd_RANGING_REQUIRED:
+ if (length == 1)
+ {
+ proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_ranging_required,
+ tvb, pos, length, ENC_NA);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ pos = pos + length;
+ break;
+ /* DOCSIS 1.1 BURST DESCRIPTOR */
+ case type29ucd_BURST_DESCR:
+ burst_descr_tree =
+ proto_tree_add_subtree_format(type29ucd_tree, tvb, pos, length,
+ ett_burst_descr, NULL, "4 Burst Descriptor (Length = %u)",
+ length);
+ proto_tree_add_item (burst_descr_tree, hf_docsis_type29ucd_iuc, tvb,
+ pos++, 1, ENC_BIG_ENDIAN);
+ endtlvpos = pos + length - 1;
+ while (pos < endtlvpos)
+ {
+ tlvtype = tvb_get_guint8 (tvb, pos++);
+ tlvlen = tvb_get_guint8 (tvb, pos++);
+ switch (tlvtype)
+ {
+ case type29ucd_MODULATION:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_burst_mod_type, tvb,
+ pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_DIFF_ENCODING:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_burst_diff_encoding,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_PREAMBLE_LEN:
+ if (tlvlen == 2)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_burst_preamble_len,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_PREAMBLE_VAL_OFF:
+ if (tlvlen == 2)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_burst_preamble_val_off,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_FEC:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_burst_fec, tvb, pos,
+ tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_FEC_CODEWORD:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_burst_fec_codeword,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_SCRAMBLER_SEED:
+ if (tlvlen == 2)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_burst_scrambler_seed,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_MAX_BURST:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_burst_max_burst, tvb,
+ pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_GUARD_TIME:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_burst_guard_time,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_LAST_CW_LEN:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_burst_last_cw_len,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_SCRAMBLER_ONOFF:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_burst_scrambler_onoff,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ } /* switch(tlvtype) */
+ pos = pos + tlvlen;
+ } /* while (pos < endtlvpos) */
+ break;
+ /* DOCSIS 2.0 Upstream Channel Descriptor */
+ case type29ucd_BURST_DESCR5:
+ burst_descr_tree =
+ proto_tree_add_subtree_format(type29ucd_tree, tvb, pos, length,
+ ett_burst_descr, NULL, "5 Burst Descriptor (Length = %u)",
+ length);
+ proto_tree_add_item (burst_descr_tree, hf_docsis_type29ucd_iuc, tvb,
+ pos++, 1, ENC_BIG_ENDIAN);
+ endtlvpos = pos + length - 1;
+ while (pos < endtlvpos)
+ {
+ tlvtype = tvb_get_guint8 (tvb, pos++);
+ tlvlen = tvb_get_guint8 (tvb, pos++);
+ switch (tlvtype)
+ {
+ case type29ucd_MODULATION:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_burst_mod_type, tvb,
+ pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_DIFF_ENCODING:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_burst_diff_encoding,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_PREAMBLE_LEN:
+ if (tlvlen == 2)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_burst_preamble_len,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_PREAMBLE_VAL_OFF:
+ if (tlvlen == 2)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_burst_preamble_val_off,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_FEC:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_burst_fec, tvb, pos,
+ tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_FEC_CODEWORD:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_burst_fec_codeword,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_SCRAMBLER_SEED:
+ if (tlvlen == 2)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_burst_scrambler_seed,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_MAX_BURST:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_burst_max_burst, tvb,
+ pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_GUARD_TIME:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_burst_guard_time,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_LAST_CW_LEN:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_burst_last_cw_len,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_SCRAMBLER_ONOFF:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_burst_scrambler_onoff,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ /* New cases added for DOCSIS 2.0 US Physical Burst Descriptor TLV */
+ /* #define type29ucd_RS_INT_DEPTH 12
+ * #define type29ucd_RS_INT_BLOCK 13
+ * #define type29ucd_PREAMBLE_TYPE 14
+ * #define type29ucd_SCMDA_SCRAMBLER_ONOFF 15
+ * #define type29ucd_SCDMA_CODES_PER_SUBFRAME 16
+ * #define type29ucd_SCDMA_FRAMER_INT_STEP_SIZE 17
+ * #define type29ucd_TCM_ENABLED 18
+ */
+ case type29ucd_RS_INT_DEPTH:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_rs_int_depth,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_RS_INT_BLOCK:
+ if (tlvlen == 2)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_rs_int_block,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_PREAMBLE_TYPE:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_preamble_type,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_SCMDA_SCRAMBLER_ONOFF:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_scdma_scrambler_onoff,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_SCDMA_CODES_PER_SUBFRAME:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_scdma_codes_per_subframe,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_SCDMA_FRAMER_INT_STEP_SIZE:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_scdma_framer_int_step_size,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case type29ucd_TCM_ENABLED:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (burst_descr_tree,
+ hf_docsis_tcm_enabled,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ /* End of DOCSIS 2.0 US burst Descriptor Changes */
+ } /* switch(tlvtype) */
+ pos = pos + tlvlen;
+ } /* while (pos < endtlvpos) */
+ break;
+ } /* switch(type) */
+ } /* while (pos < len) */
+ } /* if (tree) */
}
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_type29ucd (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_type29ucd_upstream_chid,
{"Upstream Channel ID", "docsis_type29ucd.upchid",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_type29ucd_config_ch_cnt,
{"Config Change Count", "docsis_type29ucd.confcngcnt",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Configuration Change Count", HFILL}
- },
+ },
{&hf_docsis_type29ucd_mini_slot_size,
{"Mini Slot Size (6.25us TimeTicks)", "docsis_type29ucd.mslotsize",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_type29ucd_down_chid,
{"Downstream Channel ID", "docsis_type29ucd.downchid",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Management Message", HFILL}
- },
+ },
{&hf_docsis_type29ucd_symbol_rate,
{"1 Symbol Rate (ksym/sec)", "docsis_type29ucd.symrate",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Symbol Rate", HFILL}
- },
+ },
{&hf_docsis_type29ucd_frequency,
{"2 Frequency (Hz)", "docsis_type29ucd.freq",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Upstream Center Frequency", HFILL}
- },
+ },
{&hf_docsis_type29ucd_preamble_pat,
{"3 Preamble Pattern", "docsis_type29ucd.preamble",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Preamble Superstring", HFILL}
- },
+ },
{&hf_docsis_type29ucd_iuc,
{"Interval Usage Code", "docsis_type29ucd.iuc",
FT_UINT8, BASE_DEC, VALS (iuc_vals2), 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_burst_mod_type,
{"1 Modulation Type", "docsis_type29ucd.burst.modtype",
FT_UINT8, BASE_DEC, VALS (mod_vals2), 0x0,
"Modulation Type", HFILL}
- },
+ },
{&hf_docsis_burst_diff_encoding,
{"2 Differential Encoding", "docsis_type29ucd.burst.diffenc",
FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x0,
"Differential Encoding", HFILL}
- },
+ },
{&hf_docsis_burst_preamble_len,
{"3 Preamble Length (Bits)", "docsis_type29ucd.burst.preamble_len",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Preamble Length (Bits)", HFILL}
- },
+ },
{&hf_docsis_burst_preamble_val_off,
{"4 Preamble Offset (Bits)", "docsis_type29ucd.burst.preamble_off",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Preamble Offset (Bits)", HFILL}
- },
+ },
{&hf_docsis_burst_fec,
{"5 FEC (T)", "docsis_type29ucd.burst.fec",
FT_UINT8, BASE_DEC, NULL, 0x0,
"FEC (T) Codeword Parity Bits = 2^T", HFILL}
- },
+ },
{&hf_docsis_burst_fec_codeword,
{"6 FEC Codeword Info bytes (k)", "docsis_type29ucd.burst.fec_codeword",
FT_UINT8, BASE_DEC, NULL, 0x0,
"FEC Codeword Info Bytes (k)", HFILL}
- },
+ },
{&hf_docsis_burst_scrambler_seed,
{"7 Scrambler Seed", "docsis_type29ucd.burst.scrambler_seed",
FT_UINT16, BASE_HEX, NULL, 0x0,
"Burst Descriptor", HFILL}
- },
+ },
{&hf_docsis_burst_max_burst,
{"8 Max Burst Size (Minislots)", "docsis_type29ucd.burst.maxburst",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Max Burst Size (Minislots)", HFILL}
- },
+ },
{&hf_docsis_burst_guard_time,
{"9 Guard Time Size (Symbol Times)", "docsis_type29ucd.burst.guardtime",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Guard Time Size", HFILL}
- },
+ },
{&hf_docsis_burst_last_cw_len,
{"10 Last Codeword Length", "docsis_type29ucd.burst.last_cw_len",
FT_UINT8, BASE_DEC, VALS (last_cw_len_vals), 0x0,
"Last Codeword Length", HFILL}
- },
+ },
{&hf_docsis_burst_scrambler_onoff,
{"11 Scrambler On/Off", "docsis_type29ucd.burst.scrambleronoff",
FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x0,
"Scrambler On/Off", HFILL}
- },
-/* DOCSIS 2.0 UCD TLV definitions
- * * #define type29ucd_EXT_PREAMBLE 6
- * * #define type29ucd_SCDMA_MODE_ENABLE 7
- * * #define type29ucd_SCDMA_SPREADING_INTERVAL 8
- * * #define type29ucd_SCDMA_CODES_PER_MINI_SLOT 9
- * * #define type29ucd_SCDMA_ACTIVE_CODES 10
- * * #define type29ucd_SCDMA_CODE_HOPPING_SEED 11
- * * #define type29ucd_SCDMA_US_RATIO_NUM 12
- * * #define type29ucd_SCDMA_US_RATIO_DENOM 13
- * * #define type29ucd_SCDMA_TIMESTAMP_SNAPSHOT 14
- * * #define type29ucd_MAINTAIN_POWER_SPECTRAL_DENSITY 15
- * * #define type29ucd_RANGING_REQUIRED 16
- * */
+ },
+ /* DOCSIS 2.0 UCD TLV definitions
+ * * #define type29ucd_EXT_PREAMBLE 6
+ * * #define type29ucd_SCDMA_MODE_ENABLE 7
+ * * #define type29ucd_SCDMA_SPREADING_INTERVAL 8
+ * * #define type29ucd_SCDMA_CODES_PER_MINI_SLOT 9
+ * * #define type29ucd_SCDMA_ACTIVE_CODES 10
+ * * #define type29ucd_SCDMA_CODE_HOPPING_SEED 11
+ * * #define type29ucd_SCDMA_US_RATIO_NUM 12
+ * * #define type29ucd_SCDMA_US_RATIO_DENOM 13
+ * * #define type29ucd_SCDMA_TIMESTAMP_SNAPSHOT 14
+ * * #define type29ucd_MAINTAIN_POWER_SPECTRAL_DENSITY 15
+ * * #define type29ucd_RANGING_REQUIRED 16
+ * */
{&hf_docsis_type29ucd_ext_preamble,
{"6 Extended Preamble Pattern", "docsis_type29ucd.extpreamble",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Extended Preamble Pattern", HFILL}
- },
+ },
{&hf_docsis_type29ucd_scdma_mode_enable,
{"7 SCDMA Mode Enable", "docsis_type29ucd.scdmaenable",
FT_BYTES, BASE_NONE, NULL, 0x0,
"SCDMA Mode Enable", HFILL}
- },
+ },
{&hf_docsis_type29ucd_scdma_spreading_interval,
{"8 SCDMA Spreading Interval", "docsis_type29ucd.scdmaspreadinginterval",
FT_BYTES, BASE_NONE, NULL, 0x0,
"SCDMA Spreading Interval", HFILL}
- },
+ },
{&hf_docsis_type29ucd_scdma_codes_per_mini_slot,
{"9 SCDMA Codes per mini slot", "docsis_type29ucd.scdmacodesperminislot",
FT_BYTES, BASE_NONE, NULL, 0x0,
"SCDMA Codes per mini slot", HFILL}
- },
+ },
{&hf_docsis_type29ucd_scdma_active_codes,
{"10 SCDMA Active Codes", "docsis_type29ucd.scdmaactivecodes",
FT_BYTES, BASE_NONE, NULL, 0x0,
"SCDMA Active Codes", HFILL}
- },
+ },
{&hf_docsis_type29ucd_scdma_code_hopping_seed,
{"11 SCDMA Code Hopping Seed", "docsis_type29ucd.scdmacodehoppingseed",
FT_BYTES, BASE_NONE, NULL, 0x0,
"SCDMA Code Hopping Seed", HFILL}
- },
+ },
{&hf_docsis_type29ucd_scdma_us_ratio_num,
{"12 SCDMA US Ratio Numerator", "docsis_type29ucd.scdmausrationum",
FT_BYTES, BASE_NONE, NULL, 0x0,
"SCDMA US Ratio Numerator", HFILL}
- },
+ },
{&hf_docsis_type29ucd_scdma_us_ratio_denom,
{"13 SCDMA US Ratio Denominator", "docsis_type29ucd.scdmausratiodenom",
FT_BYTES, BASE_NONE, NULL, 0x0,
"SCDMA US Ratio Denominator", HFILL}
- },
+ },
{&hf_docsis_type29ucd_scdma_timestamp_snapshot,
{"14 SCDMA Timestamp Snapshot", "docsis_type29ucd.scdmatimestamp",
FT_BYTES, BASE_NONE, NULL, 0x0,
"SCDMA Timestamp Snapshot", HFILL}
- },
+ },
{&hf_docsis_type29ucd_maintain_power_spectral_density,
{"15 Maintain power spectral density", "docsis_type29ucd.maintainpowerspectraldensity",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Maintain power spectral density", HFILL}
- },
+ },
{&hf_docsis_type29ucd_ranging_required,
{"16 Ranging Required", "docsis_type29ucd.rangingrequired",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Ranging Required", HFILL}
- },
-/* #define type29ucd_RS_INT_DEPTH 12
- * #define type29ucd_RS_INT_BLOCK 13
- * #define type29ucd_PREAMBLE_TYPE 14
- * #define type29ucd_SCMDA_SCRAMBLER_ONOFF 15
- * #define type29ucd_SCDMA_CODES_PER_SUBFRAME 16
- * #define type29ucd_SCDMA_FRAMER_INT_STEP_SIZE 17
- * #define type29ucd_TCM_ENABLED 18
- */
+ },
+ /* #define type29ucd_RS_INT_DEPTH 12
+ * #define type29ucd_RS_INT_BLOCK 13
+ * #define type29ucd_PREAMBLE_TYPE 14
+ * #define type29ucd_SCMDA_SCRAMBLER_ONOFF 15
+ * #define type29ucd_SCDMA_CODES_PER_SUBFRAME 16
+ * #define type29ucd_SCDMA_FRAMER_INT_STEP_SIZE 17
+ * #define type29ucd_TCM_ENABLED 18
+ */
{&hf_docsis_rs_int_depth,
{"12 Scrambler On/Off", "docsis_type29ucd.burst.rsintdepth",
FT_UINT8, BASE_DEC, NULL, 0x0,
"R-S Interleaver Depth", HFILL}
- },
+ },
{&hf_docsis_rs_int_block,
{"13 Scrambler On/Off", "docsis_type29ucd.burst.rsintblock",
FT_UINT8, BASE_DEC, NULL, 0x0,
"R-S Interleaver Block", HFILL}
- },
+ },
{&hf_docsis_preamble_type,
{"14 Scrambler On/Off", "docsis_type29ucd.burst.preambletype",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Preamble Type", HFILL}
- },
+ },
{&hf_docsis_scdma_scrambler_onoff,
{"15 Scrambler On/Off", "docsis_type29ucd.burst.scdmascrambleronoff",
FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x0,
"SCDMA Scrambler On/Off", HFILL}
- },
+ },
{&hf_docsis_scdma_codes_per_subframe,
{"16 Scrambler On/Off", "docsis_type29ucd.burst.scdmacodespersubframe",
FT_UINT8, BASE_DEC, NULL, 0x0,
"SCDMA Codes per Subframe", HFILL}
- },
+ },
{&hf_docsis_scdma_framer_int_step_size,
{"17 Scrambler On/Off", "docsis_type29ucd.burst.scdmaframerintstepsize",
FT_UINT8, BASE_DEC, NULL, 0x0,
"SCDMA Framer Interleaving Step Size", HFILL}
- },
+ },
{&hf_docsis_tcm_enabled,
{"18 Scrambler On/Off", "docsis_type29ucd.burst.tcmenabled",
FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x0,
"TCM Enabled", HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_type29ucd,
&ett_burst_descr,
};
-/* Register the protocol name and description */
proto_docsis_type29ucd =
proto_register_protocol ("DOCSIS Upstream Channel Descriptor Type 29",
- "DOCSIS type29ucd", "docsis_type29ucd");
+ "DOCSIS type29ucd", "docsis_type29ucd");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_type29ucd, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_type29ucd", dissect_type29ucd, proto_docsis_type29ucd);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_type29ucd (void)
{
@@ -1058,5 +1042,17 @@ proto_reg_handoff_docsis_type29ucd (void)
docsis_type29ucd_handle = find_dissector ("docsis_type29ucd");
dissector_add_uint ("docsis_mgmt", 0x1D, docsis_type29ucd_handle);
-
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-uccreq.c b/plugins/docsis/packet-uccreq.c
index 8632483442..68ffe997a9 100644
--- a/plugins/docsis/packet-uccreq.c
+++ b/plugins/docsis/packet-uccreq.c
@@ -33,15 +33,13 @@ static int proto_docsis_uccreq = -1;
static int hf_docsis_uccreq_upchid = -1;
static dissector_handle_t docsis_tlv_handle;
-
/* Initialize the subtree pointers */
static gint ett_docsis_uccreq = -1;
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_uccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
-
proto_item *it;
proto_tree *uccreq_tree = NULL;
guint8 chid;
@@ -50,71 +48,50 @@ dissect_uccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
chid = tvb_get_guint8 (tvb, 0);
col_add_fstr (pinfo->cinfo, COL_INFO,
- "Upstream Channel Change request Channel ID = %u (U%u)",
- chid, (chid > 0 ? chid - 1 : chid));
+ "Upstream Channel Change request Channel ID = %u (U%u)",
+ chid, (chid > 0 ? chid - 1 : chid));
if (tree)
{
it =
- proto_tree_add_protocol_format (tree, proto_docsis_uccreq, tvb, 0, -1,
- "UCC Request");
+ proto_tree_add_protocol_format (tree, proto_docsis_uccreq, tvb, 0, -1,
+ "UCC Request");
uccreq_tree = proto_item_add_subtree (it, ett_docsis_uccreq);
proto_tree_add_item (uccreq_tree, hf_docsis_uccreq_upchid, tvb, 0, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
}
- /* call dissector for Appendix C TLV's */
- next_tvb = tvb_new_subset_remaining (tvb, 1);
- call_dissector (docsis_tlv_handle, next_tvb, pinfo, uccreq_tree);
-
-
+ /* call dissector for Appendix C TLV's */
+ next_tvb = tvb_new_subset_remaining (tvb, 1);
+ call_dissector (docsis_tlv_handle, next_tvb, pinfo, uccreq_tree);
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_uccreq (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_uccreq_upchid,
{"Upstream Channel Id", "docsis_uccreq.upchid",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_uccreq,
};
-/* Register the protocol name and description */
proto_docsis_uccreq =
proto_register_protocol ("DOCSIS Upstream Channel Change Request",
- "DOCSIS UCC-REQ", "docsis_uccreq");
+ "DOCSIS UCC-REQ", "docsis_uccreq");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_uccreq, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_uccreq", dissect_uccreq, proto_docsis_uccreq);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_uccreq (void)
{
@@ -123,5 +100,17 @@ proto_reg_handoff_docsis_uccreq (void)
docsis_uccreq_handle = find_dissector ("docsis_uccreq");
docsis_tlv_handle = find_dissector ("docsis_tlv");
dissector_add_uint ("docsis_mgmt", 0x08, docsis_uccreq_handle);
-
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-uccrsp.c b/plugins/docsis/packet-uccrsp.c
index 4a2dfe508f..835b0c36d3 100644
--- a/plugins/docsis/packet-uccrsp.c
+++ b/plugins/docsis/packet-uccrsp.c
@@ -32,15 +32,13 @@ void proto_reg_handoff_docsis_uccrsp(void);
static int proto_docsis_uccrsp = -1;
static int hf_docsis_uccrsp_upchid = -1;
-
/* Initialize the subtree pointers */
static gint ett_docsis_uccrsp = -1;
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_uccrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
-
proto_item *it;
proto_tree *uccrsp_tree;
guint8 chid;
@@ -48,66 +46,46 @@ dissect_uccrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
chid = tvb_get_guint8 (tvb, 0);
col_add_fstr (pinfo->cinfo, COL_INFO,
- "Upstream Channel Change response Channel ID = %u (U%u)",
- chid, (chid > 0 ? chid - 1 : chid));
+ "Upstream Channel Change response Channel ID = %u (U%u)",
+ chid, (chid > 0 ? chid - 1 : chid));
if (tree)
{
it =
- proto_tree_add_protocol_format (tree, proto_docsis_uccrsp, tvb, 0, -1,
- "UCC Response");
+ proto_tree_add_protocol_format (tree, proto_docsis_uccrsp, tvb, 0, -1,
+ "UCC Response");
uccrsp_tree = proto_item_add_subtree (it, ett_docsis_uccrsp);
proto_tree_add_item (uccrsp_tree, hf_docsis_uccrsp_upchid, tvb, 0, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
}
-
}
-
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_uccrsp (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_uccrsp_upchid,
{"Upstream Channel Id", "docsis_uccrsp.upchid",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_uccrsp,
};
-/* Register the protocol name and description */
proto_docsis_uccrsp =
proto_register_protocol ("DOCSIS Upstream Channel Change Response",
- "DOCSIS UCC-RSP", "docsis_uccrsp");
+ "DOCSIS UCC-RSP", "docsis_uccrsp");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_uccrsp, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_uccrsp", dissect_uccrsp, proto_docsis_uccrsp);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_uccrsp (void)
{
@@ -115,5 +93,17 @@ proto_reg_handoff_docsis_uccrsp (void)
docsis_uccrsp_handle = find_dissector ("docsis_uccrsp");
dissector_add_uint ("docsis_mgmt", 0x09, docsis_uccrsp_handle);
-
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-ucd.c b/plugins/docsis/packet-ucd.c
index a70d103a6a..8944c67935 100644
--- a/plugins/docsis/packet-ucd.c
+++ b/plugins/docsis/packet-ucd.c
@@ -108,54 +108,55 @@ static gint ett_docsis_ucd = -1;
static gint ett_tlv = -1;
static const value_string channel_tlv_vals[] = {
- {UCD_SYMBOL_RATE, "Symbol Rate"},
- {UCD_FREQUENCY, "Frequency"},
- {UCD_PREAMBLE, "Preamble Pattern"},
- {UCD_BURST_DESCR, "Burst Descriptor"},
- {UCD_BURST_DESCR5, "Burst Descriptor DOCSIS 2.0"},
- {0, NULL}
+ {UCD_SYMBOL_RATE, "Symbol Rate"},
+ {UCD_FREQUENCY, "Frequency"},
+ {UCD_PREAMBLE, "Preamble Pattern"},
+ {UCD_BURST_DESCR, "Burst Descriptor"},
+ {UCD_BURST_DESCR5, "Burst Descriptor DOCSIS 2.0"},
+ {0, NULL}
};
static const value_string on_off_vals[] = {
- {1, "On"},
- {2, "Off"},
- {0, NULL}
+ {1, "On"},
+ {2, "Off"},
+ {0, NULL}
};
static const value_string mod_vals[] = {
- {1, "QPSK"},
- {2, "QAM16"},
- {0, NULL}
+ {1, "QPSK"},
+ {2, "QAM16"},
+ {0, NULL}
};
value_string iuc_vals[] = {
- {IUC_REQUEST, "Request"},
- {IUC_REQ_DATA, "REQ/Data"},
- {IUC_INIT_MAINT, "Initial Maintenance"},
- {IUC_STATION_MAINT, "Station Maintenance"},
- {IUC_SHORT_DATA_GRANT, "Short Data Grant"},
- {IUC_LONG_DATA_GRANT, "Long Data Grant"},
- {IUC_NULL_IE, "NULL IE"},
- {IUC_DATA_ACK, "Data Ack"},
- {IUC_ADV_PHY_SHORT_DATA_GRANT, "Advanced Phy Short Data Grant"},
- {IUC_ADV_PHY_LONG_DATA_GRANT, "Advanced Phy Long Data Grant"},
- {IUC_ADV_PHY_UGS, "Advanced Phy UGS"},
- {IUC_RESERVED12, "Reserved"},
- {IUC_RESERVED13, "Reserved"},
- {IUC_RESERVED14, "Reserved"},
- {IUC_EXPANSION, "Expanded IUC"},
- {0, NULL}
+ {IUC_REQUEST, "Request"},
+ {IUC_REQ_DATA, "REQ/Data"},
+ {IUC_INIT_MAINT, "Initial Maintenance"},
+ {IUC_STATION_MAINT, "Station Maintenance"},
+ {IUC_SHORT_DATA_GRANT, "Short Data Grant"},
+ {IUC_LONG_DATA_GRANT, "Long Data Grant"},
+ {IUC_NULL_IE, "NULL IE"},
+ {IUC_DATA_ACK, "Data Ack"},
+ {IUC_ADV_PHY_SHORT_DATA_GRANT, "Advanced Phy Short Data Grant"},
+ {IUC_ADV_PHY_LONG_DATA_GRANT, "Advanced Phy Long Data Grant"},
+ {IUC_ADV_PHY_UGS, "Advanced Phy UGS"},
+ {IUC_RESERVED12, "Reserved"},
+ {IUC_RESERVED13, "Reserved"},
+ {IUC_RESERVED14, "Reserved"},
+ {IUC_EXPANSION, "Expanded IUC"},
+ {0, NULL}
};
static const value_string last_cw_len_vals[] = {
- {1, "Fixed"},
- {2, "Shortened"},
- {0, NULL}
+ {1, "Fixed"},
+ {2, "Shortened"},
+ {0, NULL}
};
-/* Code to actually dissect the packets */
+
+/* Dissection */
static void
- dissect_ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
+dissect_ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
int pos, endtlvpos;
guint8 type, length;
@@ -168,591 +169,582 @@ static void
guint8 upchid, symrate;
len = tvb_reported_length_remaining (tvb, 0);
- upchid = tvb_get_guint8 (tvb, 0);
-
- /* if the upstream Channel ID is 0 then this is for Telephony Return) */
- if (upchid > 0)
- col_add_fstr (pinfo->cinfo, COL_INFO,
- "UCD Message: Channel ID = %u (U%u)", upchid,
- upchid - 1);
- else
- col_add_fstr (pinfo->cinfo, COL_INFO,
- "UCD Message: Channel ID = %u (Telephony Return)",
- upchid);
-
- if (tree)
- {
- ucd_item =
- proto_tree_add_protocol_format (tree, proto_docsis_ucd, tvb, 0, -1,
- "UCD Message");
- ucd_tree = proto_item_add_subtree (ucd_item, ett_docsis_ucd);
- proto_tree_add_item (ucd_tree, hf_docsis_ucd_upstream_chid, tvb, 0, 1,
- ENC_BIG_ENDIAN);
- proto_tree_add_item (ucd_tree, hf_docsis_ucd_config_ch_cnt, tvb, 1, 1,
- ENC_BIG_ENDIAN);
- proto_tree_add_item (ucd_tree, hf_docsis_ucd_mini_slot_size, tvb, 2, 1,
- ENC_BIG_ENDIAN);
- proto_tree_add_item (ucd_tree, hf_docsis_ucd_down_chid, tvb, 3, 1,
- ENC_BIG_ENDIAN);
-
- pos = 4;
- while (pos < len)
- {
- type = tvb_get_guint8 (tvb, pos);
- tlv_tree = proto_tree_add_subtree(ucd_tree, tvb, pos, -1,
- ett_tlv, &tlv_item,
- val_to_str(type, channel_tlv_vals,
- "Unknown TLV (%u)"));
- proto_tree_add_uint (tlv_tree, hf_docsis_ucd_type,
- tvb, pos, 1, type);
- pos++;
- length = tvb_get_guint8 (tvb, pos);
- proto_tree_add_uint (tlv_tree, hf_docsis_ucd_length,
- tvb, pos, 1, length);
- pos++;
- proto_item_set_len(tlv_item, length + 2);
- switch (type)
- {
- case UCD_SYMBOL_RATE:
- if (length == 1)
- {
- symrate = tvb_get_guint8 (tvb, pos);
- proto_tree_add_uint (tlv_tree, hf_docsis_ucd_symbol_rate,
- tvb, pos, length, symrate * 160);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- pos = pos + length;
- break;
- case UCD_FREQUENCY:
- if (length == 4)
- {
- proto_tree_add_item (tlv_tree, hf_docsis_ucd_frequency, tvb,
- pos, length, ENC_BIG_ENDIAN);
- pos = pos + length;
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_PREAMBLE:
- proto_tree_add_item (tlv_tree, hf_docsis_ucd_preamble_pat, tvb,
- pos, length, ENC_NA);
- pos = pos + length;
- break;
- case UCD_BURST_DESCR:
- proto_tree_add_item (tlv_tree, hf_docsis_ucd_iuc, tvb,
- pos++, 1, ENC_BIG_ENDIAN);
- endtlvpos = pos + length - 1;
- while (pos < endtlvpos)
- {
- tlvtype = tvb_get_guint8 (tvb, pos++);
- tlvlen = tvb_get_guint8 (tvb, pos++);
- switch (tlvtype)
- {
- case UCD_MODULATION:
- if (tlvlen == 1)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_burst_mod_type, tvb,
- pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_DIFF_ENCODING:
- if (tlvlen == 1)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_burst_diff_encoding,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_PREAMBLE_LEN:
- if (tlvlen == 2)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_burst_preamble_len,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_PREAMBLE_VAL_OFF:
- if (tlvlen == 2)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_burst_preamble_val_off,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_FEC:
- if (tlvlen == 1)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_burst_fec, tvb, pos,
- tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_FEC_CODEWORD:
- if (tlvlen == 1)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_burst_fec_codeword,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_SCRAMBLER_SEED:
- if (tlvlen == 2)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_burst_scrambler_seed,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_MAX_BURST:
- if (tlvlen == 1)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_burst_max_burst, tvb,
- pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_GUARD_TIME:
- if (tlvlen == 1)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_burst_guard_time,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_LAST_CW_LEN:
- if (tlvlen == 1)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_burst_last_cw_len,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_SCRAMBLER_ONOFF:
- if (tlvlen == 1)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_burst_scrambler_onoff,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- } /* switch(tlvtype) */
- pos = pos + tlvlen;
- } /* while (pos < endtlvpos) */
- break;
- case UCD_BURST_DESCR5:
- /* DOCSIS 2.0 Upstream Channel Descriptor */
- proto_tree_add_item (tlv_tree, hf_docsis_ucd_iuc, tvb,
- pos++, 1, ENC_BIG_ENDIAN);
- endtlvpos = pos + length - 1;
- while (pos < endtlvpos)
- {
- tlvtype = tvb_get_guint8 (tvb, pos++);
- tlvlen = tvb_get_guint8 (tvb, pos++);
- switch (tlvtype)
- {
- case UCD_MODULATION:
- if (tlvlen == 1)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_burst_mod_type, tvb,
- pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_DIFF_ENCODING:
- if (tlvlen == 1)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_burst_diff_encoding,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_PREAMBLE_LEN:
- if (tlvlen == 2)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_burst_preamble_len,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_PREAMBLE_VAL_OFF:
- if (tlvlen == 2)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_burst_preamble_val_off,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_FEC:
- if (tlvlen == 1)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_burst_fec, tvb, pos,
- tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_FEC_CODEWORD:
- if (tlvlen == 1)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_burst_fec_codeword,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_SCRAMBLER_SEED:
- if (tlvlen == 2)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_burst_scrambler_seed,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_MAX_BURST:
- if (tlvlen == 1)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_burst_max_burst, tvb,
- pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_GUARD_TIME:
- if (tlvlen == 1)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_burst_guard_time,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_LAST_CW_LEN:
- if (tlvlen == 1)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_burst_last_cw_len,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_SCRAMBLER_ONOFF:
- if (tlvlen == 1)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_burst_scrambler_onoff,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- /* New cases added for DOCSIS 2.0 US Physical Burst Descriptor TLV */
- /* #define UCD_RS_INT_DEPTH 12
- * * #define UCD_RS_INT_BLOCK 13
- * * #define UCD_PREAMBLE_TYPE 14
- * * #define UCD_SCMDA_SCRAMBLER_ONOFF 15
- * * #define UCD_SCDMA_CODES_PER_SUBFRAME 16
- * * #define UCD_SCDMA_FRAMER_INT_STEP_SIZE 17
- * * #define UCD_TCM_ENABLED 18
- * */
- case UCD_RS_INT_DEPTH:
- if (tlvlen == 1)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_rs_int_depth,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_RS_INT_BLOCK:
- if (tlvlen == 2)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_rs_int_block,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_PREAMBLE_TYPE:
- if (tlvlen == 1)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_preamble_type,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_SCMDA_SCRAMBLER_ONOFF:
- if (tlvlen == 1)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_scdma_scrambler_onoff,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_SCDMA_CODES_PER_SUBFRAME:
- if (tlvlen == 1)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_scdma_codes_per_subframe,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_SCDMA_FRAMER_INT_STEP_SIZE:
- if (tlvlen == 1)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_scdma_framer_int_step_size,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- case UCD_TCM_ENABLED:
- if (tlvlen == 1)
- {
- proto_tree_add_item (tlv_tree,
- hf_docsis_tcm_enabled,
- tvb, pos, tlvlen, ENC_BIG_ENDIAN);
- }
- else
- {
- THROW (ReportedBoundsError);
- }
- break;
- } /* switch(tlvtype) */
- pos = pos + tlvlen;
- } /* while (pos < endtlvpos) */
- break;
- } /* switch(type) */
- } /* while (pos < len) */
- } /* if (tree) */
-
+ upchid = tvb_get_guint8 (tvb, 0);
+
+ /* if the upstream Channel ID is 0 then this is for Telephony Return) */
+ if (upchid > 0)
+ col_add_fstr (pinfo->cinfo, COL_INFO,
+ "UCD Message: Channel ID = %u (U%u)", upchid,
+ upchid - 1);
+ else
+ col_add_fstr (pinfo->cinfo, COL_INFO,
+ "UCD Message: Channel ID = %u (Telephony Return)",
+ upchid);
+
+ if (tree)
+ {
+ ucd_item =
+ proto_tree_add_protocol_format (tree, proto_docsis_ucd, tvb, 0, -1,
+ "UCD Message");
+ ucd_tree = proto_item_add_subtree (ucd_item, ett_docsis_ucd);
+ proto_tree_add_item (ucd_tree, hf_docsis_ucd_upstream_chid, tvb, 0, 1,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item (ucd_tree, hf_docsis_ucd_config_ch_cnt, tvb, 1, 1,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item (ucd_tree, hf_docsis_ucd_mini_slot_size, tvb, 2, 1,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item (ucd_tree, hf_docsis_ucd_down_chid, tvb, 3, 1,
+ ENC_BIG_ENDIAN);
+
+ pos = 4;
+ while (pos < len)
+ {
+ type = tvb_get_guint8 (tvb, pos);
+ tlv_tree = proto_tree_add_subtree(ucd_tree, tvb, pos, -1,
+ ett_tlv, &tlv_item,
+ val_to_str(type, channel_tlv_vals,
+ "Unknown TLV (%u)"));
+ proto_tree_add_uint (tlv_tree, hf_docsis_ucd_type,
+ tvb, pos, 1, type);
+ pos++;
+ length = tvb_get_guint8 (tvb, pos);
+ proto_tree_add_uint (tlv_tree, hf_docsis_ucd_length,
+ tvb, pos, 1, length);
+ pos++;
+ proto_item_set_len(tlv_item, length + 2);
+ switch (type)
+ {
+ case UCD_SYMBOL_RATE:
+ if (length == 1)
+ {
+ symrate = tvb_get_guint8 (tvb, pos);
+ proto_tree_add_uint (tlv_tree, hf_docsis_ucd_symbol_rate,
+ tvb, pos, length, symrate * 160);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ pos = pos + length;
+ break;
+ case UCD_FREQUENCY:
+ if (length == 4)
+ {
+ proto_tree_add_item (tlv_tree, hf_docsis_ucd_frequency, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ pos = pos + length;
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_PREAMBLE:
+ proto_tree_add_item (tlv_tree, hf_docsis_ucd_preamble_pat, tvb,
+ pos, length, ENC_NA);
+ pos = pos + length;
+ break;
+ case UCD_BURST_DESCR:
+ proto_tree_add_item (tlv_tree, hf_docsis_ucd_iuc, tvb,
+ pos++, 1, ENC_BIG_ENDIAN);
+ endtlvpos = pos + length - 1;
+ while (pos < endtlvpos)
+ {
+ tlvtype = tvb_get_guint8 (tvb, pos++);
+ tlvlen = tvb_get_guint8 (tvb, pos++);
+ switch (tlvtype)
+ {
+ case UCD_MODULATION:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_burst_mod_type, tvb,
+ pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_DIFF_ENCODING:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_burst_diff_encoding,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_PREAMBLE_LEN:
+ if (tlvlen == 2)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_burst_preamble_len,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_PREAMBLE_VAL_OFF:
+ if (tlvlen == 2)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_burst_preamble_val_off,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_FEC:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_burst_fec, tvb, pos,
+ tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_FEC_CODEWORD:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_burst_fec_codeword,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_SCRAMBLER_SEED:
+ if (tlvlen == 2)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_burst_scrambler_seed,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_MAX_BURST:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_burst_max_burst, tvb,
+ pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_GUARD_TIME:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_burst_guard_time,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_LAST_CW_LEN:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_burst_last_cw_len,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_SCRAMBLER_ONOFF:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_burst_scrambler_onoff,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ } /* switch(tlvtype) */
+ pos = pos + tlvlen;
+ } /* while (pos < endtlvpos) */
+ break;
+ case UCD_BURST_DESCR5:
+ /* DOCSIS 2.0 Upstream Channel Descriptor */
+ proto_tree_add_item (tlv_tree, hf_docsis_ucd_iuc, tvb,
+ pos++, 1, ENC_BIG_ENDIAN);
+ endtlvpos = pos + length - 1;
+ while (pos < endtlvpos)
+ {
+ tlvtype = tvb_get_guint8 (tvb, pos++);
+ tlvlen = tvb_get_guint8 (tvb, pos++);
+ switch (tlvtype)
+ {
+ case UCD_MODULATION:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_burst_mod_type, tvb,
+ pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_DIFF_ENCODING:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_burst_diff_encoding,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_PREAMBLE_LEN:
+ if (tlvlen == 2)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_burst_preamble_len,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_PREAMBLE_VAL_OFF:
+ if (tlvlen == 2)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_burst_preamble_val_off,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_FEC:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_burst_fec, tvb, pos,
+ tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_FEC_CODEWORD:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_burst_fec_codeword,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_SCRAMBLER_SEED:
+ if (tlvlen == 2)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_burst_scrambler_seed,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_MAX_BURST:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_burst_max_burst, tvb,
+ pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_GUARD_TIME:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_burst_guard_time,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_LAST_CW_LEN:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_burst_last_cw_len,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_SCRAMBLER_ONOFF:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_burst_scrambler_onoff,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ /* New cases added for DOCSIS 2.0 US Physical Burst Descriptor TLV */
+ /* #define UCD_RS_INT_DEPTH 12
+ * * #define UCD_RS_INT_BLOCK 13
+ * * #define UCD_PREAMBLE_TYPE 14
+ * * #define UCD_SCMDA_SCRAMBLER_ONOFF 15
+ * * #define UCD_SCDMA_CODES_PER_SUBFRAME 16
+ * * #define UCD_SCDMA_FRAMER_INT_STEP_SIZE 17
+ * * #define UCD_TCM_ENABLED 18
+ * */
+ case UCD_RS_INT_DEPTH:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_rs_int_depth,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_RS_INT_BLOCK:
+ if (tlvlen == 2)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_rs_int_block,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_PREAMBLE_TYPE:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_preamble_type,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_SCMDA_SCRAMBLER_ONOFF:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_scdma_scrambler_onoff,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_SCDMA_CODES_PER_SUBFRAME:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_scdma_codes_per_subframe,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_SCDMA_FRAMER_INT_STEP_SIZE:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_scdma_framer_int_step_size,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ case UCD_TCM_ENABLED:
+ if (tlvlen == 1)
+ {
+ proto_tree_add_item (tlv_tree,
+ hf_docsis_tcm_enabled,
+ tvb, pos, tlvlen, ENC_BIG_ENDIAN);
+ }
+ else
+ {
+ THROW (ReportedBoundsError);
+ }
+ break;
+ } /* switch(tlvtype) */
+ pos = pos + tlvlen;
+ } /* while (pos < endtlvpos) */
+ break;
+ } /* switch(type) */
+ } /* while (pos < len) */
+ } /* if (tree) */
}
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
- */
-
-
void
proto_register_docsis_ucd (void)
{
-
- /* Setup list of header fields See Section 1.6.1 for details*/
- static hf_register_info hf[] = {
+ static hf_register_info hf[] = {
{&hf_docsis_ucd_upstream_chid,
{"Upstream Channel ID", "docsis_ucd.upchid",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_ucd_config_ch_cnt,
{"Config Change Count", "docsis_ucd.confcngcnt",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Configuration Change Count", HFILL}
- },
+ },
{&hf_docsis_ucd_mini_slot_size,
{"Mini Slot Size (6.25us TimeTicks)", "docsis_ucd.mslotsize",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_ucd_down_chid,
{"Downstream Channel ID", "docsis_ucd.downchid",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Management Message", HFILL}
- },
+ },
{&hf_docsis_ucd_type,
{"TLV Type", "docsis_ucd.type",
FT_UINT8, BASE_DEC, VALS(channel_tlv_vals), 0x0,
"Channel TLV type", HFILL}
- },
+ },
{&hf_docsis_ucd_length,
{"TLV Length", "docsis_ucd.length",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Channel TLV length", HFILL}
- },
+ },
{&hf_docsis_ucd_symbol_rate,
{"Symbol Rate (ksym/sec)", "docsis_ucd.symrate",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Symbol Rate", HFILL}
- },
+ },
{&hf_docsis_ucd_frequency,
{"Frequency (Hz)", "docsis_ucd.freq",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Upstream Center Frequency", HFILL}
- },
+ },
{&hf_docsis_ucd_preamble_pat,
{"Preamble Pattern", "docsis_ucd.preamble",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Preamble Superstring", HFILL}
- },
+ },
{&hf_docsis_ucd_iuc,
{"Interval Usage Code", "docsis_ucd.iuc",
FT_UINT8, BASE_DEC, VALS (iuc_vals), 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_burst_mod_type,
{"1 Modulation Type", "docsis_ucd.burst.modtype",
FT_UINT8, BASE_DEC, VALS (mod_vals), 0x0,
"Modulation Type", HFILL}
- },
+ },
{&hf_docsis_burst_diff_encoding,
{"2 Differential Encoding", "docsis_ucd.burst.diffenc",
FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x0,
"Differential Encoding", HFILL}
- },
+ },
{&hf_docsis_burst_preamble_len,
{"3 Preamble Length (Bits)", "docsis_ucd.burst.preamble_len",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Preamble Length (Bits)", HFILL}
- },
+ },
{&hf_docsis_burst_preamble_val_off,
{"4 Preamble Offset (Bits)", "docsis_ucd.burst.preamble_off",
FT_UINT16, BASE_DEC, NULL, 0x0,
"Preamble Offset (Bits)", HFILL}
- },
+ },
{&hf_docsis_burst_fec,
{"5 FEC (T)", "docsis_ucd.burst.fec",
FT_UINT8, BASE_DEC, NULL, 0x0,
"FEC (T) Codeword Parity Bits = 2^T", HFILL}
- },
+ },
{&hf_docsis_burst_fec_codeword,
{"6 FEC Codeword Info bytes (k)", "docsis_ucd.burst.fec_codeword",
FT_UINT8, BASE_DEC, NULL, 0x0,
"FEC Codeword Info Bytes (k)", HFILL}
- },
+ },
{&hf_docsis_burst_scrambler_seed,
{"7 Scrambler Seed", "docsis_ucd.burst.scrambler_seed",
FT_UINT16, BASE_HEX, NULL, 0x0,
"Burst Descriptor", HFILL}
- },
+ },
{&hf_docsis_burst_max_burst,
{"8 Max Burst Size (Minislots)", "docsis_ucd.burst.maxburst",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Max Burst Size (Minislots)", HFILL}
- },
+ },
{&hf_docsis_burst_guard_time,
{"9 Guard Time Size (Symbol Times)", "docsis_ucd.burst.guardtime",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Guard Time Size", HFILL}
- },
+ },
{&hf_docsis_burst_last_cw_len,
{"10 Last Codeword Length", "docsis_ucd.burst.last_cw_len",
FT_UINT8, BASE_DEC, VALS (last_cw_len_vals), 0x0,
"Last Codeword Length", HFILL}
- },
+ },
{&hf_docsis_burst_scrambler_onoff,
{"11 Scrambler On/Off", "docsis_ucd.burst.scrambleronoff",
FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x0,
"Scrambler On/Off", HFILL}
- },
+ },
{&hf_docsis_rs_int_depth,
{"12 RS Interleaver Depth", "docsis_ucd.burst.rsintdepth",
FT_UINT8, BASE_DEC, NULL, 0x0,
@@ -788,31 +780,23 @@ proto_register_docsis_ucd (void)
FT_UINT8, BASE_DEC, VALS (on_off_vals), 0x0,
"TCM Enabled", HFILL}
},
- };
+ };
- /* Setup protocol subtree array */
- static gint *ett[] = {
- &ett_docsis_ucd,
- &ett_tlv,
- };
+ static gint *ett[] = {
+ &ett_docsis_ucd,
+ &ett_tlv,
+ };
- /* Register the protocol name and description */
- proto_docsis_ucd =
- proto_register_protocol ("DOCSIS Upstream Channel Descriptor",
- "DOCSIS UCD", "docsis_ucd");
+ proto_docsis_ucd =
+ proto_register_protocol ("DOCSIS Upstream Channel Descriptor",
+ "DOCSIS UCD", "docsis_ucd");
- /* Required function calls to register the header fields and subtrees used */
- proto_register_field_array (proto_docsis_ucd, hf, array_length (hf));
- proto_register_subtree_array (ett, array_length (ett));
+ proto_register_field_array (proto_docsis_ucd, hf, array_length (hf));
+ proto_register_subtree_array (ett, array_length (ett));
- register_dissector ("docsis_ucd", dissect_ucd, proto_docsis_ucd);
+ register_dissector ("docsis_ucd", dissect_ucd, proto_docsis_ucd);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
- */
void
proto_reg_handoff_docsis_ucd (void)
{
@@ -820,5 +804,17 @@ proto_reg_handoff_docsis_ucd (void)
docsis_ucd_handle = find_dissector ("docsis_ucd");
dissector_add_uint ("docsis_mgmt", 0x02, docsis_ucd_handle);
-
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */
diff --git a/plugins/docsis/packet-vendor.c b/plugins/docsis/packet-vendor.c
index 6794e4207e..815fc98ae5 100644
--- a/plugins/docsis/packet-vendor.c
+++ b/plugins/docsis/packet-vendor.c
@@ -69,13 +69,11 @@ static const value_string vendorid_vals[] = {
{0, NULL},
};
-
-
/* Forward Declarations for vendor specific dissectors */
static void dissect_cisco (tvbuff_t * tvb, proto_tree * tree,
gint vsif_len);
-/* Code to actually dissect the packets */
+/* Dissection */
static void
dissect_vsif (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
{
@@ -86,12 +84,12 @@ dissect_vsif (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
guint32 value;
gint vsif_len;
-/* get the reported length of the VSIF TLV */
+ /* get the reported length of the VSIF TLV */
vsif_len = tvb_reported_length_remaining (tvb, 0);
-/* The first TLV in the VSIF encodings must be type 0x08 (Vendor ID) and
- * length 3.
- */
+ /* The first TLV in the VSIF encodings must be type 0x08 (Vendor ID) and
+ * length 3.
+ */
type = tvb_get_guint8 (tvb, 0);
if (type != 0x08)
{
@@ -117,15 +115,15 @@ dissect_vsif (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
/* switch on the Vendor ID */
switch (value)
{
- case VENDOR_CISCO:
- proto_item_append_text (it, " (Cisco)");
- dissect_cisco (tvb, vsif_tree, vsif_len);
- break;
- default:
- proto_item_append_text (it, " (Unknown)");
- proto_tree_add_item (vsif_tree, hf_docsis_vsif_vendor_unknown, tvb,
- 0, -1, ENC_NA);
- break;
+ case VENDOR_CISCO:
+ proto_item_append_text (it, " (Cisco)");
+ dissect_cisco (tvb, vsif_tree, vsif_len);
+ break;
+ default:
+ proto_item_append_text (it, " (Unknown)");
+ proto_tree_add_item (vsif_tree, hf_docsis_vsif_vendor_unknown, tvb,
+ 0, -1, ENC_NA);
+ break;
}
} /* if(tree) */
@@ -133,14 +131,13 @@ dissect_vsif (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
}
-
/* Dissector for Cisco Vendor Specific TLV's */
-#define NUM_PHONES 0x0a
+#define NUM_PHONES 0x0a
#define IOS_CONFIG_FILE 0x80
-#define IP_PREC 0x0b
-#define IP_PREC_VAL 0x01
-#define IP_PREC_BW 0x02
+#define IP_PREC 0x0b
+#define IP_PREC_VAL 0x01
+#define IP_PREC_BW 0x02
static void
dissect_cisco (tvbuff_t * tvb, proto_tree * tree, gint vsif_len)
@@ -158,127 +155,108 @@ dissect_cisco (tvbuff_t * tvb, proto_tree * tree, gint vsif_len)
length = tvb_get_guint8 (tvb, pos++);
switch (type)
{
- case NUM_PHONES:
- proto_tree_add_item (tree, hf_docsis_vsif_cisco_numphones, tvb,
- pos, length, ENC_BIG_ENDIAN);
- break;
- case IP_PREC:
- ipprec_tree =
- proto_tree_add_subtree(tree, tvb, pos, length, ett_docsis_vsif_ipprec, NULL, "IP Precedence");
- /* Handle Sub-TLVs in IP Precedence */
- templen = pos + length;
- while (pos < templen)
- {
- type = tvb_get_guint8 (tvb, pos++);
- length = tvb_get_guint8 (tvb, pos++);
- switch (type)
- {
- case IP_PREC_VAL:
- if (length != 1)
- THROW (ReportedBoundsError);
- proto_tree_add_item (ipprec_tree,
- hf_docsis_vsif_cisco_ipprec_val, tvb,
- pos, length, ENC_BIG_ENDIAN);
- break;
- case IP_PREC_BW:
- if (length != 4)
- THROW (ReportedBoundsError);
- proto_tree_add_item (ipprec_tree,
- hf_docsis_vsif_cisco_ipprec_bw, tvb,
- pos, length, ENC_BIG_ENDIAN);
- break;
- default:
- THROW (ReportedBoundsError);
- }
- pos += length;
- }
- break;
- case IOS_CONFIG_FILE:
- proto_tree_add_item (tree, hf_docsis_vsif_cisco_config_file, tvb,
- pos, length, ENC_ASCII|ENC_NA);
+ case NUM_PHONES:
+ proto_tree_add_item (tree, hf_docsis_vsif_cisco_numphones, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ break;
+ case IP_PREC:
+ ipprec_tree =
+ proto_tree_add_subtree(tree, tvb, pos, length, ett_docsis_vsif_ipprec, NULL, "IP Precedence");
+ /* Handle Sub-TLVs in IP Precedence */
+ templen = pos + length;
+ while (pos < templen)
+ {
+ type = tvb_get_guint8 (tvb, pos++);
+ length = tvb_get_guint8 (tvb, pos++);
+ switch (type)
+ {
+ case IP_PREC_VAL:
+ if (length != 1)
+ THROW (ReportedBoundsError);
+ proto_tree_add_item (ipprec_tree,
+ hf_docsis_vsif_cisco_ipprec_val, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ break;
+ case IP_PREC_BW:
+ if (length != 4)
+ THROW (ReportedBoundsError);
+ proto_tree_add_item (ipprec_tree,
+ hf_docsis_vsif_cisco_ipprec_bw, tvb,
+ pos, length, ENC_BIG_ENDIAN);
+ break;
+ default:
+ THROW (ReportedBoundsError);
+ }
+ pos += length;
+ }
+ break;
+ case IOS_CONFIG_FILE:
+ proto_tree_add_item (tree, hf_docsis_vsif_cisco_config_file, tvb,
+ pos, length, ENC_ASCII|ENC_NA);
}
pos += length;
}
-
}
-
-
/* Register the protocol with Wireshark */
-
-/* this format is require because a script is used to build the C function
- that calls all the protocol registration.
-*/
-
-
void
proto_register_docsis_vsif (void)
{
-
-/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{&hf_docsis_vsif_vendorid,
{"Vendor Id", "docsis_vsif.vendorid",
FT_UINT24, BASE_HEX, VALS(vendorid_vals), 0x0,
"Vendor Identifier", HFILL}
- },
+ },
{&hf_docsis_vsif_vendor_unknown,
{"VSIF Encodings", "docsis_vsif.unknown",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Unknown Vendor", HFILL}
- },
+ },
{&hf_docsis_vsif_cisco_numphones,
{"Number of phone lines", "docsis_vsif.cisco.numphones",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
#if 0
{&hf_docsis_vsif_cisco_ipprec,
{"IP Precedence Encodings", "docsis_vsif.cisco.ipprec",
FT_BYTES, BASE_NONE, NULL, 0x0,
NULL, HFILL}
- },
+ },
#endif
{&hf_docsis_vsif_cisco_ipprec_val,
{"IP Precedence Value", "docsis_vsif.cisco.ipprec.value",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_vsif_cisco_ipprec_bw,
{"IP Precedence Bandwidth", "docsis_vsif.cisco.ipprec.bw",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL}
- },
+ },
{&hf_docsis_vsif_cisco_config_file,
{"IOS Config File", "docsis_vsif.cisco.iosfile",
FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL}
- },
+ },
};
-/* Setup protocol subtree array */
static gint *ett[] = {
&ett_docsis_vsif,
&ett_docsis_vsif_ipprec,
};
-/* Register the protocol name and description */
proto_docsis_vsif =
proto_register_protocol ("DOCSIS Vendor Specific Encodings",
"DOCSIS VSIF", "docsis_vsif");
-/* Required function calls to register the header fields and subtrees used */
proto_register_field_array (proto_docsis_vsif, hf, array_length (hf));
proto_register_subtree_array (ett, array_length (ett));
register_dissector ("docsis_vsif", dissect_vsif, proto_docsis_vsif);
}
-
-/* If this dissector uses sub-dissector registration add a registration routine.
- This format is required because a script is used to find these routines and
- create the code that calls these routines.
-*/
void
proto_reg_handoff_docsis_vsif (void)
{
@@ -289,3 +267,16 @@ proto_reg_handoff_docsis_vsif (void)
dissector_add_uint ("docsis", 0xFD, docsis_vsif_handle);
#endif
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local Variables:
+ * c-basic-offset: 2
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=2 tabstop=8 expandtab:
+ * :indentSize=2:tabSize=8:noTabs=true:
+ */