aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2012-03-06 16:58:09 +0000
committerBill Meier <wmeier@newsguy.com>2012-03-06 16:58:09 +0000
commit87cf82e0561555493917eb8d5acb593ad73214d9 (patch)
tree8200697d203e7a7537f7aa02fd6a22c2b35f53ea /epan
parent9cfb5a1ea8dd75c0b1af2bbe0ecf91081ccd8af7 (diff)
Use tvb_new_subset_remaining() rather than tvb_new_subset();
#include <styring.h> not req'd (in a few cases); Minor reformating & whitespace cleanup. svn path=/trunk/; revision=41374
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-atmtcp.c12
-rw-r--r--epan/dissectors/packet-bmc.c47
-rw-r--r--epan/dissectors/packet-dvbci.c1410
-rw-r--r--epan/dissectors/packet-eigrp.c3274
-rw-r--r--epan/dissectors/packet-etherip.c22
-rw-r--r--epan/dissectors/packet-gmrp.c531
-rw-r--r--epan/dissectors/packet-icmpv6.c62
-rw-r--r--epan/dissectors/packet-ieee802154.c114
-rw-r--r--epan/dissectors/packet-ipsec-udp.c20
-rw-r--r--epan/dissectors/packet-knet.c10
-rw-r--r--epan/dissectors/packet-lisp-data.c10
-rw-r--r--epan/dissectors/packet-lisp.c109
-rw-r--r--epan/dissectors/packet-mactelnet.c14
-rw-r--r--epan/dissectors/packet-mp2t.c60
-rw-r--r--epan/dissectors/packet-mux27010.c12
-rw-r--r--epan/dissectors/packet-netmon-802_11.c67
-rw-r--r--epan/dissectors/packet-ppp.c167
-rw-r--r--epan/dissectors/packet-scop.c12
-rw-r--r--epan/dissectors/packet-tdmoe.c2
-rw-r--r--epan/dissectors/packet-tr.c12
-rw-r--r--epan/dissectors/packet-trill.c22
21 files changed, 3099 insertions, 2890 deletions
diff --git a/epan/dissectors/packet-atmtcp.c b/epan/dissectors/packet-atmtcp.c
index 5f8d7ecbac..f3bf0b2639 100644
--- a/epan/dissectors/packet-atmtcp.c
+++ b/epan/dissectors/packet-atmtcp.c
@@ -60,9 +60,9 @@ dissect_atmtcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *ti;
proto_tree *atmtcp_tree;
- guint offset=0;
- gint32 length;
- tvbuff_t *next_tvb;
+ guint offset = 0;
+ gint32 length;
+ tvbuff_t *next_tvb;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATMTCP");
@@ -77,7 +77,7 @@ dissect_atmtcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(atmtcp_tree, hf_atmtcp_vpi, tvb, offset, 2, ENC_NA);
}
offset += 2;
-
+
if (tree) {
/* VCI */
@@ -102,7 +102,7 @@ dissect_atmtcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 4;
/* Data (for the moment...) */
- next_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(data_handle, next_tvb, pinfo, tree);
return tvb_length(tvb);
}
@@ -143,7 +143,7 @@ proto_register_atmtcp(void)
atmtcp_module = prefs_register_protocol(proto_atmtcp, proto_reg_handoff_atmtcp);
- prefs_register_uint_preference(atmtcp_module, "tcp.port", "ATMTCP TCP Port",
+ prefs_register_uint_preference(atmtcp_module, "tcp.port", "ATMTCP TCP Port",
"ATMTCP TCP port if other than the default",
10, &global_atmtcp_tcp_port);
}
diff --git a/epan/dissectors/packet-bmc.c b/epan/dissectors/packet-bmc.c
index af18efb19c..0527a907cc 100644
--- a/epan/dissectors/packet-bmc.c
+++ b/epan/dissectors/packet-bmc.c
@@ -28,18 +28,17 @@
#endif
#include <glib.h>
-#include <string.h>
-#include <epan/bitswap.h>
#include <epan/packet.h>
+#include <epan/bitswap.h>
#include <epan/asn1.h> /* needed for packet-gsm_map.h */
#include "packet-cell_broadcast.h"
#include "packet-gsm_map.h"
-static int dissect_bmc_cbs_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+static int dissect_bmc_cbs_message (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
static int dissect_bmc_schedule_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
-static int dissect_bmc_cbs41_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
+static int dissect_bmc_cbs41_message (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
static int proto_bmc = -1;
static int hf_bmc_message_type = -1;
@@ -88,13 +87,13 @@ static gint ett_bmc_message_description = -1;
static int
dissect_bmc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint8 message_type;
- guint8 *p_rev, *reversing_buffer;
- gint offset = 0;
- gint i, len;
+ guint8 message_type;
+ guint8 *p_rev, *reversing_buffer;
+ gint offset = 0;
+ gint i, len;
proto_item *ti;
proto_tree *bmc_tree;
- tvbuff_t *bit_reversed_tvb;
+ tvbuff_t *bit_reversed_tvb;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "BMC");
col_clear(pinfo->cinfo, COL_INFO);
@@ -143,7 +142,7 @@ static int
dissect_bmc_cbs_message(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
tvbuff_t *cell_broadcast_tvb;
- gint offset=1;
+ gint offset = 1;
dissect_cbs_message_identifier(tvb, tree, offset);
offset += 2;
@@ -154,7 +153,7 @@ dissect_bmc_cbs_message(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
dissect_cbs_data_coding_scheme(tvb, pinfo, tree, offset);
offset += 1;
- cell_broadcast_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ cell_broadcast_tvb = tvb_new_subset_remaining(tvb, offset);
dissect_umts_cell_broadcast_message(cell_broadcast_tvb, pinfo, tree);
offset = tvb_length(cell_broadcast_tvb);
@@ -164,14 +163,14 @@ dissect_bmc_cbs_message(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
static int
dissect_bmc_schedule_message(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
- gint offset=1, i, saved_offset;
- guint8 new_message_bitmap_len;
- guint8 length_of_cbs_schedule_period;
- guint8 message_description_type;
- guint8 future_extension_bitmap;
- guint8 length_of_serial_number_list;
- guint8 entry;
- guint8 mask, bit;
+ gint offset = 1, i, saved_offset;
+ guint8 new_message_bitmap_len;
+ guint8 length_of_cbs_schedule_period;
+ guint8 message_description_type;
+ guint8 future_extension_bitmap;
+ guint8 length_of_serial_number_list;
+ guint8 entry;
+ guint8 mask, bit;
proto_tree *message_description_tree;
proto_item *ti;
@@ -197,7 +196,12 @@ dissect_bmc_schedule_message(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
for (i=0; i<new_message_bitmap_len; i++) {
for(mask=1; bit<=length_of_cbs_schedule_period; mask<<=1, bit++) {
message_description_type = tvb_get_guint8(tvb,offset);
- proto_tree_add_uint_format(message_description_tree, hf_bmc_message_description_type, tvb, offset, 1, message_description_type, "Message %d Message Description Type: %s (%d)", bit, val_to_str(message_description_type, message_description_type_vals,"Unknown"), message_description_type);
+ proto_tree_add_uint_format(message_description_tree, hf_bmc_message_description_type,
+ tvb, offset, 1, message_description_type,
+ "Message %d Message Description Type: %s (%d)",
+ bit,
+ val_to_str(message_description_type, message_description_type_vals,"Unknown"),
+ message_description_type);
offset += 1;
if ((message_description_type==1) || (message_description_type==5)) {
@@ -205,7 +209,8 @@ dissect_bmc_schedule_message(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
offset += 2;
}
else if ((message_description_type==0) || (message_description_type==4)) {
- proto_tree_add_item(message_description_tree, hf_bmc_offset_to_ctch_bs_index_of_first_transmission, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(message_description_tree, hf_bmc_offset_to_ctch_bs_index_of_first_transmission,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
}
}
diff --git a/epan/dissectors/packet-dvbci.c b/epan/dissectors/packet-dvbci.c
index 220c09239e..18a324dfd5 100644
--- a/epan/dissectors/packet-dvbci.c
+++ b/epan/dissectors/packet-dvbci.c
@@ -1511,9 +1511,9 @@ dissect_opp_cap_loop(guint8 cap_loop_len, const gchar *title,
tvbuff_t *tvb, gint offset,
packet_info *pinfo _U_, proto_tree *tree)
{
- proto_item *ti = NULL;
+ proto_item *ti = NULL;
proto_tree *loop_tree = NULL;
- guint i;
+ guint i;
if (!title)
return -1;
@@ -1539,7 +1539,7 @@ dissect_opp_cap_loop(guint8 cap_loop_len, const gchar *title,
static gint
read_utc_time(tvbuff_t *tvb, gint offset, nstime_t *utc_time)
{
- gint bcd_time_offset; /* start offset of the bcd time in the tvbuff */
+ gint bcd_time_offset; /* start offset of the bcd time in the tvbuff */
guint8 hour, min, sec;
if (!utc_time)
@@ -1589,16 +1589,16 @@ static gint
dissect_conn_desc(tvbuff_t *tvb, gint offset,
packet_info *pinfo, proto_tree *tree)
{
- proto_item *ti = NULL;
+ proto_item *ti = NULL;
proto_tree *conn_desc_tree = NULL;
- guint32 tag;
- gint offset_start, offset_body;
- gint len_field;
- guint8 conn_desc_type;
- guint8 ip_ver, ip_proto;
- guint16 port;
- proto_item *port_item = NULL;
- gint hostname_len;
+ guint32 tag;
+ gint offset_start, offset_body;
+ gint len_field;
+ guint8 conn_desc_type;
+ guint8 ip_ver, ip_proto;
+ guint16 port;
+ proto_item *port_item = NULL;
+ gint hostname_len;
offset_start = offset;
@@ -1718,15 +1718,15 @@ static gint
dissect_cc_item(tvbuff_t *tvb, gint offset,
packet_info *pinfo, proto_tree *tree)
{
- proto_item *ti = NULL;
+ proto_item *ti = NULL;
proto_tree *cc_item_tree = NULL;
- gint offset_start;
- guint16 dat_len;
- guint8 dat_id;
- asn1_ctx_t asn1_ctx;
- int hf_cert_index;
- guint8 emi;
- guint16 prog_num;
+ gint offset_start;
+ guint16 dat_len;
+ guint8 dat_id;
+ asn1_ctx_t asn1_ctx;
+ int hf_cert_index;
+ guint8 emi;
+ guint16 prog_num;
offset_start = offset;
@@ -1808,9 +1808,9 @@ static gint
dissect_cc_data_payload(guint32 tag, tvbuff_t *tvb, gint offset,
packet_info *pinfo, proto_tree *tree)
{
- gint offset_start;
+ gint offset_start;
guint8 i, snd_dat_nbr, req_dat_nbr;
- gint item_len;
+ gint item_len;
offset_start = offset;
@@ -1853,8 +1853,8 @@ dissect_cc_data_payload(guint32 tag, tvbuff_t *tvb, gint offset,
static gint
pref_key_string_to_bin(const gchar *key_string, unsigned char **key_bin)
{
- int key_string_len;
- int i, j;
+ int key_string_len;
+ int i, j;
char input[2];
if (!key_string || !key_bin)
@@ -1954,8 +1954,8 @@ dissect_si_string(tvbuff_t *tvb, gint offset, gint str_len,
packet_info *pinfo, proto_tree *tree, const gchar *title,
gboolean show_col_info)
{
- guint8 byte0;
- guint8 *si_str = NULL;
+ guint8 byte0;
+ guint8 *si_str = NULL;
proto_item *pi;
if (!title) /* we always have a title for our strings */
@@ -2004,7 +2004,7 @@ dissect_ca_enable(tvbuff_t *tvb, gint offset, packet_info *pinfo _U_,
proto_tree *tree)
{
gboolean desc_ok = FALSE;
- guint8 byte, ca_enab;
+ guint8 byte, ca_enab;
byte = tvb_get_guint8(tvb,offset);
proto_tree_add_item(tree, hf_dvbci_ca_enable_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -2027,10 +2027,10 @@ static gint
dissect_ca_desc(tvbuff_t *tvb, gint offset, packet_info *pinfo,
proto_tree *tree)
{
- gint offset_start;
+ gint offset_start;
proto_item *pi;
- guint8 tag, len_byte;
- proto_item *ti = NULL;
+ guint8 tag, len_byte;
+ proto_item *ti = NULL;
proto_tree *ca_desc_tree = NULL;
offset_start = offset;
@@ -2079,10 +2079,10 @@ dissect_ca_desc(tvbuff_t *tvb, gint offset, packet_info *pinfo,
static gint
dissect_es(tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree)
{
- proto_item *ti = NULL;
+ proto_item *ti = NULL;
proto_tree *es_tree = NULL;
- gint offset_start, ca_desc_len;
- gint es_info_len, all_len;
+ gint offset_start, ca_desc_len;
+ gint es_info_len, all_len;
offset_start = offset;
@@ -2134,9 +2134,9 @@ dissect_dvbci_text(const gchar *title, tvbuff_t *tvb, gint offset,
{
proto_item *ti = NULL;
proto_tree *text_tree;
- guint32 tag;
- gint offset_start;
- gint len_field;
+ guint32 tag;
+ gint offset_start;
+ gint len_field;
offset_start = offset;
@@ -2168,9 +2168,9 @@ static proto_item *
dissect_res_id(tvbuff_t *tvb, gint offset, packet_info *pinfo,
proto_tree *tree, guint32 res_id, gboolean show_col_info)
{
- proto_item *ti = NULL;
+ proto_item *ti = NULL;
proto_tree *res_tree = NULL;
- gint tvb_data_len;
+ gint tvb_data_len;
/* there's two possible inputs for this function
the resource id is either in a tvbuff_t (tvb!=NULL, res_id==0)
@@ -2237,7 +2237,7 @@ dissect_dvbci_payload_rm(guint32 tag, gint len_field,
proto_tree *tree)
{
const gchar *tag_str;
- proto_item *pi;
+ proto_item *pi;
if (tag==T_PROFILE) {
if (len_field % RES_ID_LEN) {
@@ -2262,9 +2262,9 @@ dissect_dvbci_payload_ap(guint32 tag, gint len_field _U_,
tvbuff_t *tvb, gint offset, packet_info *pinfo,
proto_tree *tree)
{
- guint8 menu_str_len;
+ guint8 menu_str_len;
guint8 *menu_string;
- guint8 data_rate;
+ guint8 data_rate;
if (tag==T_APP_INFO) {
proto_tree_add_item(tree, hf_dvbci_app_type, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -2304,14 +2304,14 @@ dissect_dvbci_payload_ca(guint32 tag, gint len_field,
proto_tree *tree)
{
const gchar *tag_str;
- proto_item *pi;
- guint16 prog_num;
- guint8 byte;
- guint prog_info_len;
- gint es_info_len, all_len;
- gint ca_desc_len;
- proto_tree *es_tree = NULL;
- gboolean desc_ok = FALSE;
+ proto_item *pi;
+ guint16 prog_num;
+ guint8 byte;
+ guint prog_info_len;
+ gint es_info_len, all_len;
+ gint ca_desc_len;
+ proto_tree *es_tree = NULL;
+ gboolean desc_ok = FALSE;
if (tag==T_CA_INFO) {
@@ -2441,12 +2441,12 @@ dissect_dvbci_payload_hc(guint32 tag, gint len_field _U_,
proto_tree *tree)
{
proto_item *pi;
- guint16 nid, onid, tsid, svcid;
- guint8 ref;
- guint16 old_pid, new_pid;
- gboolean pmt_flag;
- gint desc_loop_len;
- guint8 status;
+ guint16 nid, onid, tsid, svcid;
+ guint8 ref;
+ guint16 old_pid, new_pid;
+ gboolean pmt_flag;
+ gint desc_loop_len;
+ guint8 status;
switch (tag) {
@@ -2533,12 +2533,12 @@ dissect_dvbci_payload_dt(guint32 tag, gint len_field,
tvbuff_t *tvb, gint offset, packet_info *pinfo,
proto_tree *tree)
{
- nstime_t resp_intv;
- proto_item *pi = NULL;
+ nstime_t resp_intv;
+ proto_item *pi = NULL;
const gchar *tag_str;
- gint time_field_len;
- nstime_t utc_time;
- gint16 local_offset; /* field in the apdu */
+ gint time_field_len;
+ nstime_t utc_time;
+ gint16 local_offset; /* field in the apdu */
if (tag==T_DATE_TIME_ENQ) {
@@ -2602,16 +2602,16 @@ dissect_dvbci_payload_mmi(guint32 tag, gint len_field,
tvbuff_t *tvb, gint offset, packet_info *pinfo,
proto_tree *tree)
{
- gint offset_start;
- proto_item *pi;
- guint8 close_mmi_cmd_id;
- guint8 disp_ctl_cmd, disp_rep_id;
+ gint offset_start;
+ proto_item *pi;
+ guint8 close_mmi_cmd_id;
+ guint8 disp_ctl_cmd, disp_rep_id;
const gchar *disp_ctl_cmd_str = NULL, *disp_rep_id_str = NULL;
- guint8 ans_txt_len;
- guint8 ans_id;
- guint8 choice_or_item_nb;
- gint text_len;
- guint8 choice_ref;
+ guint8 ans_txt_len;
+ guint8 ans_id;
+ guint8 choice_or_item_nb;
+ gint text_len;
+ guint8 choice_ref;
offset_start = offset;
@@ -2799,9 +2799,9 @@ dissect_dvbci_payload_cup(guint32 tag, gint len_field _U_,
tvbuff_t *tvb, gint offset, packet_info *pinfo,
proto_tree *tree)
{
- guint8 upgrade_type;
- guint16 download_time;
- guint8 answer, progress;
+ guint8 upgrade_type;
+ guint16 download_time;
+ guint8 answer, progress;
proto_item *pi;
switch(tag) {
@@ -2859,17 +2859,17 @@ dissect_dvbci_payload_cc(guint32 tag, gint len_field _U_,
tvbuff_t *tvb, gint offset, packet_info *pinfo,
proto_tree *tree)
{
- guint8 status;
- guint32 msg_ctr;
- guint8 enc_flag, enc_cip;
- proto_item *pi = NULL, *ti;
- guint16 sac_payload_len; /* payload data and padding */
- gint sac_payload_data_len = 0; /* just payload data */
- tvbuff_t *clear_sac_body_tvb;
- proto_tree *sac_tree = NULL;
- nstime_t utc_time;
- guint8 pin_stat;
- guint8 evt_cent;
+ guint8 status;
+ guint32 msg_ctr;
+ guint8 enc_flag, enc_cip;
+ proto_item *pi = NULL, *ti;
+ guint16 sac_payload_len; /* payload data and padding */
+ gint sac_payload_data_len = 0; /* just payload data */
+ tvbuff_t *clear_sac_body_tvb;
+ proto_tree *sac_tree = NULL;
+ nstime_t utc_time;
+ guint8 pin_stat;
+ guint8 evt_cent;
switch(tag) {
case T_CC_OPEN_CNF:
@@ -3064,16 +3064,16 @@ static void
dissect_dvbci_payload_ami(guint32 tag, gint len_field _U_,
tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree)
{
- guint8 app_dom_id_len, init_obj_len;
- guint8 *app_dom_id;
- guint8 ack_code;
- gboolean req_ok=FALSE, file_ok;
- guint8 req_type;
- guint8 *req_str;
- guint8 file_name_len;
- guint8 *file_name_str;
- guint32 file_data_len;
- proto_item *ti = NULL;
+ guint8 app_dom_id_len, init_obj_len;
+ guint8 *app_dom_id;
+ guint8 ack_code;
+ gboolean req_ok = FALSE, file_ok;
+ guint8 req_type;
+ guint8 *req_str;
+ guint8 file_name_len;
+ guint8 *file_name_str;
+ guint32 file_data_len;
+ proto_item *ti = NULL;
proto_tree *req_tree = NULL;
switch(tag) {
@@ -3219,11 +3219,11 @@ static void
dissect_dvbci_payload_lsc(guint32 tag, gint len_field,
tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree)
{
- gint offset_start;
- guint8 id, timeout, ret_val, phase_id;
- gint conn_desc_len, param_len;
- guint16 buf_size;
- proto_item *pi = NULL;
+ gint offset_start;
+ guint8 id, timeout, ret_val, phase_id;
+ gint conn_desc_len, param_len;
+ guint16 buf_size;
+ proto_item *pi = NULL;
const gchar *ret_val_str = NULL;
@@ -3364,11 +3364,11 @@ static void
dissect_dvbci_payload_opp(guint32 tag, gint len_field _U_,
tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree)
{
- guint16 nit_loop_len;
- guint8 cap_loop_len;
- gboolean info_valid;
- guint8 char_tbl;
- guint8 sig_strength, sig_qual;
+ guint16 nit_loop_len;
+ guint8 cap_loop_len;
+ gboolean info_valid;
+ guint8 char_tbl;
+ guint8 sig_strength, sig_qual;
proto_item *pi;
switch(tag) {
@@ -3512,8 +3512,8 @@ dissect_dvbci_payload_sas(guint32 tag, gint len_field _U_,
tvbuff_t *tvb, gint offset, packet_info *pinfo, proto_tree *tree)
{
guint64 app_id;
- guint8 sas_status;
- guint8 msg_nb;
+ guint8 sas_status;
+ guint8 msg_nb;
guint16 msg_len;
switch(tag) {
@@ -3558,12 +3558,12 @@ static void
dissect_dvbci_apdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
guint8 direction)
{
- proto_item *ti;
- proto_tree *app_tree = NULL;
- guint32 apdu_len, tag, len_field;
+ proto_item *ti;
+ proto_tree *app_tree = NULL;
+ guint32 apdu_len, tag, len_field;
const gchar *tag_str;
- gint offset;
- proto_item *pi;
+ gint offset;
+ proto_item *pi;
apdu_info_t *ai;
@@ -3653,22 +3653,22 @@ static void
dissect_dvbci_spdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
guint8 direction)
{
- guint32 spdu_len;
- proto_item *ti = NULL;
- proto_tree *sess_tree = NULL;
- guint8 tag;
- const gchar *tag_str;
- circuit_t *circuit = NULL;
- proto_item *pi;
- gint offset;
- guint32 len_field;
+ guint32 spdu_len;
+ proto_item *ti = NULL;
+ proto_tree *sess_tree = NULL;
+ guint8 tag;
+ const gchar *tag_str;
+ circuit_t *circuit = NULL;
+ proto_item *pi;
+ gint offset;
+ guint32 len_field;
const spdu_info_t *si;
- proto_item *res_id_it = NULL;
- guint32 res_id;
- guint16 ssnb = 0; /* session numbers start with 1, 0 is invalid */
- guint8 sess_stat;
- tvbuff_t *payload_tvb = NULL;
- gint payload_len;
+ proto_item *res_id_it = NULL;
+ guint32 res_id;
+ guint16 ssnb = 0; /* session numbers start with 1, 0 is invalid */
+ guint8 sess_stat;
+ tvbuff_t *payload_tvb = NULL;
+ gint payload_len;
spdu_len = tvb_reported_length(tvb);
@@ -3815,12 +3815,12 @@ dissect_dvbci_tpdu_status(tvbuff_t *tvb, gint offset,
packet_info *pinfo, proto_tree *tree,
guint8 lpdu_tcid, guint8 r_tpdu_tag)
{
- gint offset_new, len_start_offset;
- guint8 tag;
- guint32 len_field;
- guint8 t_c_id, sb_value;
+ gint offset_new, len_start_offset;
+ guint8 tag;
+ guint32 len_field;
+ guint8 t_c_id, sb_value;
const gchar *sb_str;
- proto_item *pi;
+ proto_item *pi;
offset_new = offset;
@@ -3894,12 +3894,12 @@ dissect_dvbci_tpdu_hdr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
guint8 direction, guint8 lpdu_tcid, guint32 tpdu_len,
guint8 *hdr_tag, guint32 *body_len)
{
- guint8 c_tpdu_tag, r_tpdu_tag, *tag=NULL;
+ guint8 c_tpdu_tag, r_tpdu_tag, *tag = NULL;
const gchar *c_tpdu_str, *r_tpdu_str;
- proto_item *pi;
- gint offset;
- guint32 len_field;
- guint8 t_c_id;
+ proto_item *pi;
+ gint offset;
+ guint32 len_field;
+ guint8 t_c_id;
if (direction==DATA_HOST_TO_CAM) {
c_tpdu_tag = tvb_get_guint8(tvb, 0);
@@ -3989,14 +3989,14 @@ static void
dissect_dvbci_tpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
guint8 direction, guint8 lpdu_tcid)
{
- guint32 tpdu_len, body_len;
- proto_item *ti = NULL;
- proto_tree *trans_tree = NULL;
- gint offset, status_len;
- guint8 hdr_tag = NO_TAG;
- tvbuff_t *body_tvb, *payload_tvb = NULL;
- proto_item *pi;
- fragment_data *frag_msg = NULL;
+ guint32 tpdu_len, body_len;
+ proto_item *ti = NULL;
+ proto_tree *trans_tree = NULL;
+ gint offset, status_len;
+ guint8 hdr_tag = NO_TAG;
+ tvbuff_t *body_tvb, *payload_tvb = NULL;
+ proto_item *pi;
+ fragment_data *frag_msg = NULL;
tpdu_len = tvb_reported_length(tvb);
@@ -4068,13 +4068,13 @@ static void
dissect_dvbci_lpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
guint8 direction)
{
- proto_item *ti;
- proto_tree *link_tree = NULL;
- guint32 payload_len;
- guint8 tcid, more_last;
- proto_item *pi;
- tvbuff_t *payload_tvb = NULL;
- fragment_data *frag_msg = NULL;
+ proto_item *ti;
+ proto_tree *link_tree = NULL;
+ guint32 payload_len;
+ guint8 tcid, more_last;
+ proto_item *pi;
+ tvbuff_t *payload_tvb = NULL;
+ fragment_data *frag_msg = NULL;
payload_len = tvb_reported_length(tvb);
@@ -4124,7 +4124,7 @@ dissect_dvbci_lpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
pinfo->fragmented = TRUE;
col_append_fstr(pinfo->cinfo, COL_INFO, " (Message fragment)");
} else
- payload_tvb = tvb_new_subset(tvb, 2, -1, -1);
+ payload_tvb = tvb_new_subset_remaining(tvb, 2);
}
if (payload_tvb)
dissect_dvbci_tpdu(payload_tvb, pinfo, tree, direction, tcid);
@@ -4135,7 +4135,7 @@ static void
dissect_dvbci_buf_neg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
guint8 direction)
{
- guint16 buf_size;
+ guint16 buf_size;
proto_item *pi;
buf_size = tvb_get_ntohs(tvb, 0);
@@ -4181,11 +4181,11 @@ static void
dissect_dvbci_cis(tvbuff_t *tvb, gint offset,
packet_info *pinfo _U_, proto_tree *tree)
{
- gint offset_start;
+ gint offset_start;
proto_tree *cis_tree = NULL, *tpl_tree = NULL;
- proto_item *ti_main = NULL, *ti_tpl;
- gint tpl_len; /* entire tuple length, including tag and len field */
- guint8 tpl_code, len_field;
+ proto_item *ti_main = NULL, *ti_tpl;
+ gint tpl_len; /* entire tuple length, including tag and len field */
+ guint8 tpl_code, len_field;
offset_start = offset;
@@ -4230,17 +4230,17 @@ dissect_dvbci_cis(tvbuff_t *tvb, gint offset,
static int
dissect_dvbci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- gint packet_len, offset = 0, offset_ver, offset_evt, offset_len_field;
- guint8 version, event;
+ gint packet_len, offset = 0, offset_ver, offset_evt, offset_len_field;
+ guint8 version, event;
const gchar *event_str;
- guint16 len_field;
- proto_item *ti, *ti_hdr;
- proto_tree *dvbci_tree = NULL, *hdr_tree = NULL;
- tvbuff_t *payload_tvb;
- guint16 cor_addr;
- guint8 cor_value;
- proto_item *pi;
- guint8 hw_event;
+ guint16 len_field;
+ proto_item *ti, *ti_hdr;
+ proto_tree *dvbci_tree = NULL, *hdr_tree = NULL;
+ tvbuff_t *payload_tvb;
+ guint16 cor_addr;
+ guint8 cor_value;
+ proto_item *pi;
+ guint8 hw_event;
if (tvb_length(tvb) < 4)
return 0;
@@ -4288,7 +4288,7 @@ dissect_dvbci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
SET_ADDRESS(&pinfo->dst, AT_STRINGZ, (int)strlen(ADDR_HOST)+1, ADDR_HOST);
}
- payload_tvb = tvb_new_subset( tvb, offset, -1, -1);
+ payload_tvb = tvb_new_subset_remaining( tvb, offset);
if (len_field == 2) {
dissect_dvbci_buf_neg(payload_tvb, pinfo, dvbci_tree, event);
}
@@ -4341,7 +4341,7 @@ dissect_dvbci(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
void
proto_register_dvbci(void)
{
- guint i;
+ guint i;
module_t *dvbci_module;
static gint *ett[] = {
@@ -4370,639 +4370,839 @@ proto_register_dvbci(void)
static hf_register_info hf[] = {
{ &hf_dvbci_event,
- { "Event", "dvb-ci.event", FT_UINT8, BASE_HEX,
- VALS(dvbci_event), 0, NULL, HFILL } },
+ { "Event", "dvb-ci.event",
+ FT_UINT8, BASE_HEX, VALS(dvbci_event), 0, NULL, HFILL }
+ },
{ &hf_dvbci_hw_event,
- { "Hardware event", "dvb-ci.hw_event", FT_UINT8, BASE_HEX,
- VALS(dvbci_hw_event), 0, NULL, HFILL } },
+ { "Hardware event", "dvb-ci.hw_event",
+ FT_UINT8, BASE_HEX, VALS(dvbci_hw_event), 0, NULL, HFILL }
+ },
{ &hf_dvbci_cistpl_code,
- { "CIS tuple code", "dvb-ci.cistpl_code", FT_UINT8, BASE_HEX,
- VALS(dvbci_cistpl_code), 0, NULL, HFILL } },
+ { "CIS tuple code", "dvb-ci.cistpl_code",
+ FT_UINT8, BASE_HEX, VALS(dvbci_cistpl_code), 0, NULL, HFILL }
+ },
{ &hf_dvbci_buf_size,
- { "Buffer Size", "dvb-ci.buf_size", FT_UINT16, BASE_HEX,
- NULL, 0, NULL, HFILL } },
+ { "Buffer Size", "dvb-ci.buf_size",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_tcid,
- { "Transport Connection ID", "dvb-ci.tcid", FT_UINT8, BASE_HEX,
- NULL, 0, NULL, HFILL } },
+ { "Transport Connection ID", "dvb-ci.tcid",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_ml,
- { "More/Last indicator", "dvb-ci.more_last", FT_UINT8, BASE_HEX,
- VALS(dvbci_ml), 0, NULL, HFILL } },
+ { "More/Last indicator", "dvb-ci.more_last",
+ FT_UINT8, BASE_HEX, VALS(dvbci_ml), 0, NULL, HFILL }
+ },
/* on the link layer, tpdus are reassembled */
- {&hf_dvbci_l_frags,
- {"Tpdu fragments", "dvb-ci.tpdu_fragments",
- FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL } },
- {&hf_dvbci_l_frag,
- {"Tpdu fragment", "dvb-ci.tpdu_fragment",
- FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL } },
- {&hf_dvbci_l_frag_overlap,
- {"Tpdu fragment overlap", "dvb-ci.tpdu_fragment.overlap",
- FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL } },
- {&hf_dvbci_l_frag_overlap_conflicts,
- {"Tpdu fragment overlapping with conflicting data",
- "dvb-ci.tpdu_fragment.overlap.conflicts",
- FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL } },
- {&hf_dvbci_l_frag_multiple_tails,
- {"Tpdu has multiple tail fragments",
- "dvb-ci.tpdu_fragment.multiple_tails",
- FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL } },
- {&hf_dvbci_l_frag_too_long_frag,
- {"Tpdu fragment too long", "dvb-ci.tpdu_fragment.too_long_fragment",
- FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL } },
- {&hf_dvbci_l_frag_err,
- {"Tpdu defragmentation error", "dvb-ci.tpdu_fragment.error",
- FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL } },
- {&hf_dvbci_l_frag_cnt,
- {"Tpdu fragment count", "dvb-ci.tpdu_fragment.count",
- FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL } },
- {&hf_dvbci_l_reass_in,
- {"Tpdu reassembled in", "dvb-ci.tpdu_reassembled.in",
- FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL } },
- {&hf_dvbci_l_reass_len,
- {"Reassembled tpdu length", "dvb-ci.tpdu_reassembled.length",
- FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL } },
+ { &hf_dvbci_l_frags,
+ { "Tpdu fragments", "dvb-ci.tpdu_fragments",
+ FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
+ },
+ { &hf_dvbci_l_frag,
+ { "Tpdu fragment", "dvb-ci.tpdu_fragment",
+ FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL }
+ },
+ { &hf_dvbci_l_frag_overlap,
+ { "Tpdu fragment overlap", "dvb-ci.tpdu_fragment.overlap",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL }
+ },
+ { &hf_dvbci_l_frag_overlap_conflicts,
+ { "Tpdu fragment overlapping with conflicting data",
+ "dvb-ci.tpdu_fragment.overlap.conflicts",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL }
+ },
+ { &hf_dvbci_l_frag_multiple_tails,
+ { "Tpdu has multiple tail fragments",
+ "dvb-ci.tpdu_fragment.multiple_tails",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL }
+ },
+ { &hf_dvbci_l_frag_too_long_frag,
+ { "Tpdu fragment too long", "dvb-ci.tpdu_fragment.too_long_fragment",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL }
+ },
+ { &hf_dvbci_l_frag_err,
+ { "Tpdu defragmentation error", "dvb-ci.tpdu_fragment.error",
+ FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL }
+ },
+ { &hf_dvbci_l_frag_cnt,
+ { "Tpdu fragment count", "dvb-ci.tpdu_fragment.count",
+ FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }
+ },
+ { &hf_dvbci_l_reass_in,
+ { "Tpdu reassembled in", "dvb-ci.tpdu_reassembled.in",
+ FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL }
+ },
+ { &hf_dvbci_l_reass_len,
+ { "Reassembled tpdu length", "dvb-ci.tpdu_reassembled.length",
+ FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }
+ },
{ &hf_dvbci_c_tpdu_tag,
- { "Command TPDU Tag", "dvb-ci.c_tpdu_tag", FT_UINT8, BASE_HEX,
- VALS(dvbci_c_tpdu), 0, NULL, HFILL } },
+ { "Command TPDU Tag", "dvb-ci.c_tpdu_tag",
+ FT_UINT8, BASE_HEX, VALS(dvbci_c_tpdu), 0, NULL, HFILL }
+ },
{ &hf_dvbci_r_tpdu_tag,
- { "Response TPDU Tag", "dvb-ci.r_tpdu_tag", FT_UINT8, BASE_HEX,
- VALS(dvbci_r_tpdu), 0, NULL, HFILL } },
+ { "Response TPDU Tag", "dvb-ci.r_tpdu_tag",
+ FT_UINT8, BASE_HEX, VALS(dvbci_r_tpdu), 0, NULL, HFILL }
+ },
{ &hf_dvbci_t_c_id,
- { "Transport Connection ID", "dvb-ci.t_c_id", FT_UINT8, BASE_HEX,
- NULL, 0, NULL, HFILL } },
+ { "Transport Connection ID", "dvb-ci.t_c_id",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_sb_value,
- { "SB Value", "dvb-ci.sb_value", FT_UINT8, BASE_HEX,
- VALS(dvbci_sb_value), 0, NULL, HFILL } },
+ { "SB Value", "dvb-ci.sb_value", FT_UINT8, BASE_HEX,
+ VALS(dvbci_sb_value), 0, NULL, HFILL } },
+
/* on the transport layer, spdus are reassembled */
- {&hf_dvbci_t_frags,
- {"Spdu fragments", "dvb-ci.spdu_fragments",
- FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL } },
- {&hf_dvbci_t_frag,
- {"Spdu fragment", "dvb-ci.spdu_fragment",
- FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL } },
- {&hf_dvbci_t_frag_overlap,
- {"Spdu fragment overlap", "dvb-ci.spdu_fragment.overlap",
- FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL } },
- {&hf_dvbci_t_frag_overlap_conflicts,
- {"Spdu fragment overlapping with conflicting data",
- "dvb-ci.tpdu_fragment.overlap.conflicts",
- FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL } },
- {&hf_dvbci_t_frag_multiple_tails,
- {"Spdu has multiple tail fragments",
- "dvb-ci.spdu_fragment.multiple_tails",
- FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL } },
- {&hf_dvbci_t_frag_too_long_frag,
- {"Spdu fragment too long", "dvb-ci.spdu_fragment.too_long_fragment",
- FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL } },
- {&hf_dvbci_t_frag_err,
- {"Spdu defragmentation error", "dvb-ci.spdu_fragment.error",
- FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL } },
- {&hf_dvbci_t_frag_cnt,
- {"Spdu fragment count", "dvb-ci.spdu_fragment.count",
- FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL } },
- {&hf_dvbci_t_reass_in,
- {"Spdu reassembled in", "dvb-ci.spdu_reassembled.in",
- FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL } },
- {&hf_dvbci_t_reass_len,
- {"Reassembled spdu length", "dvb-ci.spdu_reassembled.length",
- FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL } },
+ { &hf_dvbci_t_frags,
+ { "Spdu fragments", "dvb-ci.spdu_fragments",
+ FT_NONE, BASE_NONE, NULL, 0x00, NULL, HFILL }
+ },
+ { &hf_dvbci_t_frag,
+ { "Spdu fragment", "dvb-ci.spdu_fragment",
+ FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL }
+ },
+ { &hf_dvbci_t_frag_overlap,
+ { "Spdu fragment overlap", "dvb-ci.spdu_fragment.overlap",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL }
+ },
+ { &hf_dvbci_t_frag_overlap_conflicts,
+ { "Spdu fragment overlapping with conflicting data",
+ "dvb-ci.tpdu_fragment.overlap.conflicts",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL }
+ },
+ { &hf_dvbci_t_frag_multiple_tails,
+ { "Spdu has multiple tail fragments",
+ "dvb-ci.spdu_fragment.multiple_tails",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL }
+ },
+ { &hf_dvbci_t_frag_too_long_frag,
+ { "Spdu fragment too long", "dvb-ci.spdu_fragment.too_long_fragment",
+ FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL }
+ },
+ { &hf_dvbci_t_frag_err,
+ { "Spdu defragmentation error", "dvb-ci.spdu_fragment.error",
+ FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL }
+ },
+ { &hf_dvbci_t_frag_cnt,
+ { "Spdu fragment count", "dvb-ci.spdu_fragment.count",
+ FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }
+ },
+ { &hf_dvbci_t_reass_in,
+ { "Spdu reassembled in", "dvb-ci.spdu_reassembled.in",
+ FT_FRAMENUM, BASE_NONE, NULL, 0x00, NULL, HFILL }
+ },
+ { &hf_dvbci_t_reass_len,
+ { "Reassembled spdu length", "dvb-ci.spdu_reassembled.length",
+ FT_UINT32, BASE_DEC, NULL, 0x00, NULL, HFILL }
+ },
{ &hf_dvbci_spdu_tag,
- { "SPDU Tag", "dvb-ci.spdu_tag", FT_UINT8, BASE_HEX,
- VALS(dvbci_spdu_tag), 0, NULL, HFILL } },
+ { "SPDU Tag", "dvb-ci.spdu_tag",
+ FT_UINT8, BASE_HEX, VALS(dvbci_spdu_tag), 0, NULL, HFILL }
+ },
{ &hf_dvbci_sess_status,
- { "Session Status", "dvb-ci.session_status", FT_UINT8, BASE_HEX,
- VALS(dvbci_sess_status), 0, NULL, HFILL } },
+ { "Session Status", "dvb-ci.session_status",
+ FT_UINT8, BASE_HEX, VALS(dvbci_sess_status), 0, NULL, HFILL }
+ },
{ &hf_dvbci_sess_nb,
- { "Session Number", "dvb-ci.session_nb", FT_UINT16, BASE_DEC,
- NULL , 0, NULL, HFILL } },
+ { "Session Number", "dvb-ci.session_nb",
+ FT_UINT16, BASE_DEC, NULL , 0, NULL, HFILL }
+ },
{ &hf_dvbci_close_sess_status,
- { "Session Status", "dvb-ci.close_session_status", FT_UINT8,
- BASE_HEX, VALS(dvbci_close_sess_status), 0, NULL, HFILL } },
+ { "Session Status", "dvb-ci.close_session_status",
+ FT_UINT8, BASE_HEX, VALS(dvbci_close_sess_status), 0, NULL, HFILL }
+ },
{ &hf_dvbci_res_id_type,
- { "Resource ID Type", "dvb-ci.res.id_type", FT_UINT32,
- BASE_HEX, NULL, RES_ID_TYPE_MASK, NULL, HFILL } },
+ { "Resource ID Type", "dvb-ci.res.id_type",
+ FT_UINT32, BASE_HEX, NULL, RES_ID_TYPE_MASK, NULL, HFILL }
+ },
{ &hf_dvbci_res_class,
- { "Resource Class", "dvb-ci.res.class", FT_UINT32,
- BASE_HEX, NULL, RES_CLASS_MASK, NULL, HFILL } },
+ { "Resource Class", "dvb-ci.res.class",
+ FT_UINT32, BASE_HEX, NULL, RES_CLASS_MASK, NULL, HFILL }
+ },
{ &hf_dvbci_res_type,
- { "Resource Type", "dvb-ci.res.type", FT_UINT32,
- BASE_HEX, NULL, RES_TYPE_MASK, NULL, HFILL } },
+ { "Resource Type", "dvb-ci.res.type",
+ FT_UINT32, BASE_HEX, NULL, RES_TYPE_MASK, NULL, HFILL }
+ },
{ &hf_dvbci_res_ver,
- { "Resource Version", "dvb-ci.res.version", FT_UINT32,
- BASE_HEX, NULL, RES_VER_MASK, NULL, HFILL } },
+ { "Resource Version", "dvb-ci.res.version",
+ FT_UINT32, BASE_HEX, NULL, RES_VER_MASK, NULL, HFILL }
+ },
{ &hf_dvbci_apdu_tag,
- { "APDU Tag", "dvb-ci.apdu_tag", FT_UINT24, BASE_HEX,
- VALS(dvbci_apdu_tag), 0, NULL, HFILL } },
+ { "APDU Tag", "dvb-ci.apdu_tag",
+ FT_UINT24, BASE_HEX, VALS(dvbci_apdu_tag), 0, NULL, HFILL }
+ },
{ &hf_dvbci_app_type,
- { "Application type", "dvb-ci.ap.type", FT_UINT8,
- BASE_HEX, VALS(dvbci_app_type), 0, NULL, HFILL } },
+ { "Application type", "dvb-ci.ap.type",
+ FT_UINT8, BASE_HEX, VALS(dvbci_app_type), 0, NULL, HFILL }
+ },
{ &hf_dvbci_app_manf,
- { "Application manufacturer", "dvb-ci.ap.manufacturer",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL } },
+ { "Application manufacturer", "dvb-ci.ap.manufacturer",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_manf_code,
- { "Manufacturer code", "dvb-ci.ap.manufacturer_code", FT_UINT16,
- BASE_HEX, NULL, 0, NULL, HFILL } },
+ { "Manufacturer code", "dvb-ci.ap.manufacturer_code",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_menu_str_len,
- { "Menu string length", "dvb-ci.ap.menu_string_length",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } },
+ { "Menu string length", "dvb-ci.ap.menu_string_length",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_data_rate,
- { "Transport stream data rate supported by the host",
- "dvb-ci.ap.data_rate", FT_UINT8, BASE_HEX,
- VALS(dvbci_data_rate), 0, NULL, HFILL } },
+ { "Transport stream data rate supported by the host",
+ "dvb-ci.ap.data_rate",
+ FT_UINT8, BASE_HEX, VALS(dvbci_data_rate), 0, NULL, HFILL }
+ },
{ &hf_dvbci_ca_sys_id,
- { "CA system ID", "dvb-ci.ca.ca_system_id", FT_UINT16, BASE_HEX,
- NULL, 0, NULL, HFILL } },
+ { "CA system ID", "dvb-ci.ca.ca_system_id",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_ca_pmt_list_mgmt,
- { "CA PMT list management", "dvb-ci.ca.ca_pmt_list_management",
- FT_UINT8, BASE_HEX, VALS(dvbci_ca_pmt_list_mgmt), 0, NULL,
- HFILL } },
+ { "CA PMT list management", "dvb-ci.ca.ca_pmt_list_management",
+ FT_UINT8, BASE_HEX, VALS(dvbci_ca_pmt_list_mgmt), 0, NULL,
+ HFILL }
+ },
{ &hf_dvbci_prog_num,
- { "Program number", "dvb-ci.ca.program_number", FT_UINT16,
- BASE_HEX, NULL, 0, NULL, HFILL } },
+ { "Program number", "dvb-ci.ca.program_number",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_prog_info_len,
- { "Program info length", "dvb-ci.ca.program_info_length",
- FT_UINT16, BASE_HEX, NULL, 0x0FFF, NULL, HFILL } },
+ { "Program info length", "dvb-ci.ca.program_info_length",
+ FT_UINT16, BASE_HEX, NULL, 0x0FFF, NULL, HFILL }
+ },
{ &hf_dvbci_stream_type,
- { "Stream type", "dvb-ci.ca.stream_type", FT_UINT8, BASE_HEX,
- NULL, 0, NULL, HFILL } },
+ { "Stream type", "dvb-ci.ca.stream_type",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_es_pid,
- { "Elementary stream PID", "dvb-ci.ca.elementary_pid", FT_UINT16,
- BASE_HEX, NULL, 0x1FFF, NULL, HFILL } },
+ { "Elementary stream PID", "dvb-ci.ca.elementary_pid",
+ FT_UINT16, BASE_HEX, NULL, 0x1FFF, NULL, HFILL }
+ },
{ &hf_dvbci_es_info_len,
- { "Elementary stream info length", "dvb-ci.ca.es_info_length",
- FT_UINT16, BASE_HEX, NULL, 0x0FFF, NULL, HFILL } },
+ { "Elementary stream info length", "dvb-ci.ca.es_info_length",
+ FT_UINT16, BASE_HEX, NULL, 0x0FFF, NULL, HFILL }
+ },
{ &hf_dvbci_ca_pmt_cmd_id,
- { "CA PMT command ID", "dvb-ci.ca.ca_pmt_cmd_id", FT_UINT8,
- BASE_HEX, VALS(dvbci_ca_pmt_cmd_id), 0, NULL, HFILL } },
+ { "CA PMT command ID", "dvb-ci.ca.ca_pmt_cmd_id",
+ FT_UINT8, BASE_HEX, VALS(dvbci_ca_pmt_cmd_id), 0, NULL, HFILL }
+ },
{ &hf_dvbci_descr_len,
- { "CA descriptor length", "dvb-ci.ca.ca_desc_len", FT_UINT8,
- BASE_DEC, NULL, 0, NULL, HFILL } },
+ { "CA descriptor length", "dvb-ci.ca.ca_desc_len",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_ca_pid,
- { "CA PID", "dvb-ci.ca.ca_pid", FT_UINT16, BASE_HEX,
- NULL, 0x1FFF, NULL, HFILL } },
+ { "CA PID", "dvb-ci.ca.ca_pid",
+ FT_UINT16, BASE_HEX, NULL, 0x1FFF, NULL, HFILL }
+ },
{ &hf_dvbci_ca_enable_flag,
- { "CA enable flag", "dvb-ci.ca.ca_enable_flag", FT_UINT8,
- BASE_HEX, NULL, 0x80, NULL, HFILL } },
+ { "CA enable flag", "dvb-ci.ca.ca_enable_flag",
+ FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL }
+ },
{ &hf_dvbci_ca_enable,
- { "CA enable", "dvb-ci.ca.ca_enable", FT_UINT8, BASE_HEX,
- VALS(dvbci_ca_enable), 0x7F, NULL, HFILL } },
- { &hf_dvbci_auth_proto_id,
- { "Authentication protocol ID", "dvb-ci.aut.proto_id", FT_UINT16,
- BASE_HEX, NULL, 0, NULL, HFILL } },
- { &hf_dvbci_auth_req_bytes,
- { "Authentication request data", "dvb-ci.aut.req", FT_BYTES,
- BASE_NONE, NULL, 0, NULL, HFILL } },
- { &hf_dvbci_auth_resp_bytes,
- { "Authentication response data", "dvb-ci.aut.resp", FT_BYTES,
- BASE_NONE, NULL, 0, NULL, HFILL } },
- { &hf_dvbci_network_id,
- { "Network ID", "dvb-ci.hc.nid", FT_UINT16, BASE_HEX,
- NULL, 0, NULL, HFILL } },
+ { "CA enable", "dvb-ci.ca.ca_enable",
+ FT_UINT8, BASE_HEX, VALS(dvbci_ca_enable), 0x7F, NULL, HFILL }
+ },
+ { &hf_dvbci_auth_proto_id,
+ { "Authentication protocol ID", "dvb-ci.aut.proto_id",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
+ { &hf_dvbci_auth_req_bytes,
+ { "Authentication request data", "dvb-ci.aut.req",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
+ { &hf_dvbci_auth_resp_bytes,
+ { "Authentication response data", "dvb-ci.aut.resp",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
+ { &hf_dvbci_network_id,
+ { "Network ID", "dvb-ci.hc.nid",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_original_network_id,
- { "Original network ID", "dvb-ci.hc.onid", FT_UINT16, BASE_HEX,
- NULL, 0, NULL, HFILL } },
+ { "Original network ID", "dvb-ci.hc.onid",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_transport_stream_id,
- { "Transport stream ID", "dvb-ci.hc.tsid", FT_UINT16, BASE_HEX,
- NULL, 0, NULL, HFILL } },
+ { "Transport stream ID", "dvb-ci.hc.tsid",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_service_id,
- { "Service ID", "dvb-ci.hc.svcid", FT_UINT16, BASE_HEX,
- NULL, 0, NULL, HFILL } },
+ { "Service ID", "dvb-ci.hc.svcid",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_replacement_ref,
- { "Replacement reference", "dvb-ci.hc.replacement_ref",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } },
+ { "Replacement reference", "dvb-ci.hc.replacement_ref",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_replaced_pid,
- { "Replaced PID", "dvb-ci.hc.replaced_pid", FT_UINT16,
- BASE_HEX, NULL, 0x1FFF, NULL, HFILL } },
+ { "Replaced PID", "dvb-ci.hc.replaced_pid",
+ FT_UINT16, BASE_HEX, NULL, 0x1FFF, NULL, HFILL }
+ },
{ &hf_dvbci_replacement_pid,
- { "Replacement PID", "dvb-ci.hc.replacement_pid", FT_UINT16,
- BASE_HEX, NULL, 0x1FFF, NULL, HFILL } },
+ { "Replacement PID", "dvb-ci.hc.replacement_pid",
+ FT_UINT16, BASE_HEX, NULL, 0x1FFF, NULL, HFILL }
+ },
{ &hf_dvbci_pmt_flag,
- { "PMT flag", "dvb-ci.hc.pmt_flag", FT_UINT8, BASE_HEX,
- NULL, 0x01, NULL, HFILL } },
+ { "PMT flag", "dvb-ci.hc.pmt_flag",
+ FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL }
+ },
{ &hf_dvbci_hc_desc_loop_len,
- { "Descriptor loop length", "dvb-ci.hc.desc_loop_len", FT_UINT16,
- BASE_DEC, NULL, 0x0FFF, NULL, HFILL } },
+ { "Descriptor loop length", "dvb-ci.hc.desc_loop_len",
+ FT_UINT16, BASE_DEC, NULL, 0x0FFF, NULL, HFILL }
+ },
{ &hf_dvbci_hc_desc_loop,
- { "Descriptor loop", "dvb-ci.hc.desc_loop", FT_BYTES, BASE_NONE,
- NULL, 0, NULL, HFILL } },
+ { "Descriptor loop", "dvb-ci.hc.desc_loop",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_hc_pmt,
- { "Program map section", "dvb-ci.hc.pmt", FT_BYTES, BASE_NONE,
- NULL, 0, NULL, HFILL } },
+ { "Program map section", "dvb-ci.hc.pmt",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_hc_status,
- { "Status field", "dvb-ci.hc.status_field", FT_UINT8, BASE_HEX,
- VALS(dvbci_hc_status), 0, NULL, HFILL } },
- { &hf_dvbci_resp_intv,
- { "Response interval", "dvb-ci.dt.resp_interval",
- FT_RELATIVE_TIME, BASE_NONE, NULL, 0, NULL, HFILL } },
+ { "Status field", "dvb-ci.hc.status_field",
+ FT_UINT8, BASE_HEX, VALS(dvbci_hc_status), 0, NULL, HFILL }
+ },
+ { &hf_dvbci_resp_intv,
+ { "Response interval", "dvb-ci.dt.resp_interval",
+ FT_RELATIVE_TIME, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_utc_time,
- { "UTC time", "dvb-ci.dt.utc_time",
- FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, NULL, HFILL } },
+ { "UTC time", "dvb-ci.dt.utc_time",
+ FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, NULL, HFILL }
+ },
+
/* we have to use FT_INT16 instead of FT_RELATIVE_TIME,
local offset can be negative */
{ &hf_dvbci_local_offset,
- { "Local time offset", "dvb-ci.dt.local_offset", FT_INT16, BASE_DEC,
- NULL, 0, NULL, HFILL } },
+ { "Local time offset", "dvb-ci.dt.local_offset",
+ FT_INT16, BASE_DEC, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_close_mmi_cmd_id,
- { "Command ID", "dvb-ci.mmi.close_mmi_cmd_id", FT_UINT8, BASE_HEX,
- VALS(dvbci_close_mmi_cmd_id), 0, NULL, HFILL } },
+ { "Command ID", "dvb-ci.mmi.close_mmi_cmd_id",
+ FT_UINT8, BASE_HEX, VALS(dvbci_close_mmi_cmd_id), 0, NULL, HFILL }
+ },
{ &hf_dvbci_close_mmi_delay,
- { "Delay (in sec)", "dvb-ci.mmi.delay", FT_UINT8, BASE_DEC,
- NULL, 0, NULL, HFILL } },
+ { "Delay (in sec)", "dvb-ci.mmi.delay",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_disp_ctl_cmd,
- { "Command", "dvb-ci.mmi.disp_ctl_cmd", FT_UINT8, BASE_HEX,
- VALS(dvbci_disp_ctl_cmd), 0, NULL, HFILL } },
+ { "Command", "dvb-ci.mmi.disp_ctl_cmd",
+ FT_UINT8, BASE_HEX, VALS(dvbci_disp_ctl_cmd), 0, NULL, HFILL }
+ },
{ &hf_dvbci_mmi_mode,
- { "MMI mode", "dvb-ci.mmi.mode", FT_UINT8, BASE_HEX,
- VALS(dvbci_mmi_mode), 0, NULL, HFILL } },
+ { "MMI mode", "dvb-ci.mmi.mode",
+ FT_UINT8, BASE_HEX, VALS(dvbci_mmi_mode), 0, NULL, HFILL }
+ },
{ &hf_dvbci_disp_rep_id,
- { "Reply ID", "dvb-ci.mmi.disp_rep_id", FT_UINT8, BASE_HEX,
- VALS(dvbci_disp_rep_id), 0, NULL, HFILL } },
+ { "Reply ID", "dvb-ci.mmi.disp_rep_id",
+ FT_UINT8, BASE_HEX, VALS(dvbci_disp_rep_id), 0, NULL, HFILL }
+ },
{ &hf_dvbci_char_tbl,
- { "Character table", "dvb-ci.mmi.char_tbl", FT_UINT8, BASE_HEX,
- VALS(dvbci_char_tbl), 0, NULL, HFILL } },
+ { "Character table", "dvb-ci.mmi.char_tbl",
+ FT_UINT8, BASE_HEX, VALS(dvbci_char_tbl), 0, NULL, HFILL }
+ },
{ &hf_dvbci_blind_ans,
- { "Blind answer flag", "dvb-ci.mmi.blind_ans", FT_UINT8, BASE_HEX,
- VALS(dvbci_blind_ans), 0x01, NULL, HFILL } },
+ { "Blind answer flag", "dvb-ci.mmi.blind_ans",
+ FT_UINT8, BASE_HEX, VALS(dvbci_blind_ans), 0x01, NULL, HFILL }
+ },
{ &hf_dvbci_ans_txt_len,
- { "Answer text length", "dvb-ci.mmi.ans_txt_len",
- FT_UINT8, BASE_DEC, NULL , 0, NULL, HFILL } },
+ { "Answer text length", "dvb-ci.mmi.ans_txt_len",
+ FT_UINT8, BASE_DEC, NULL , 0, NULL, HFILL }
+ },
{ &hf_dvbci_text_ctrl,
- { "Text control code", "dvb-ci.mmi.text_ctrl", FT_UINT8, BASE_HEX,
- VALS(dvbci_text_ctrl), 0, NULL, HFILL } },
+ { "Text control code", "dvb-ci.mmi.text_ctrl",
+ FT_UINT8, BASE_HEX, VALS(dvbci_text_ctrl), 0, NULL, HFILL }
+ },
{ &hf_dvbci_ans_id,
- { "Answer ID", "dvb-ci.mmi.ans_id", FT_UINT8, BASE_HEX,
- VALS(dvbci_ans_id) , 0, NULL, HFILL } },
+ { "Answer ID", "dvb-ci.mmi.ans_id",
+ FT_UINT8, BASE_HEX, VALS(dvbci_ans_id) , 0, NULL, HFILL }
+ },
{ &hf_dvbci_choice_nb,
- { "Number of menu items", "dvb-ci.mmi.choice_nb", FT_UINT8, BASE_DEC,
- NULL, 0, NULL, HFILL } },
+ { "Number of menu items", "dvb-ci.mmi.choice_nb",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_choice_ref,
- { "Selected item", "dvb-ci.mmi.choice_ref", FT_UINT8, BASE_DEC,
- NULL, 0, NULL, HFILL } },
+ { "Selected item", "dvb-ci.mmi.choice_ref",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_item_nb,
- { "Number of list items", "dvb-ci.mmi.item_nb", FT_UINT8, BASE_DEC,
- NULL, 0, NULL, HFILL } },
+ { "Number of list items", "dvb-ci.mmi.item_nb",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_host_country,
- { "Host country", "dvb-ci.hlc.country", FT_STRING, BASE_NONE,
- NULL, 0, NULL, HFILL } },
+ { "Host country", "dvb-ci.hlc.country",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_host_language,
- { "Host language", "dvb-ci.hlc.language", FT_STRING, BASE_NONE,
- NULL, 0, NULL, HFILL } },
+ { "Host language", "dvb-ci.hlc.language",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_cup_type,
- { "CAM upgrade type", "dvb-ci.cup.type", FT_UINT8, BASE_HEX,
- VALS(dvbci_cup_type), 0, NULL, HFILL } },
+ { "CAM upgrade type", "dvb-ci.cup.type",
+ FT_UINT8, BASE_HEX, VALS(dvbci_cup_type), 0, NULL, HFILL }
+ },
{ &hf_dvbci_cup_download_time,
- { "Download time", "dvb-ci.cup.download_time", FT_UINT16, BASE_HEX,
- NULL, 0, NULL, HFILL } },
+ { "Download time", "dvb-ci.cup.download_time",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_cup_answer,
- { "CAM upgrade answer", "dvb-ci.cup.answer", FT_UINT8, BASE_HEX,
- VALS(dvbci_cup_answer), 0, NULL, HFILL } },
+ { "CAM upgrade answer", "dvb-ci.cup.answer",
+ FT_UINT8, BASE_HEX, VALS(dvbci_cup_answer), 0, NULL, HFILL }
+ },
{ &hf_dvbci_cup_progress,
- { "CAM upgrade progress", "dvb-ci.cup.progress", FT_UINT8, BASE_HEX,
- NULL, 0, NULL, HFILL } },
+ { "CAM upgrade progress", "dvb-ci.cup.progress",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_cup_reset,
- { "requested CAM reset", "dvb-ci.cup.reset", FT_UINT8, BASE_HEX,
- VALS(dvbci_cup_reset), 0, NULL, HFILL } },
+ { "requested CAM reset", "dvb-ci.cup.reset",
+ FT_UINT8, BASE_HEX, VALS(dvbci_cup_reset), 0, NULL, HFILL }
+ },
{ &hf_dvbci_cc_sys_id_bitmask,
- { "CC system id bitmask", "dvb-ci.cc.sys_id_bitmask", FT_UINT8,
- BASE_HEX, NULL, 0, NULL, HFILL } },
+ { "CC system id bitmask", "dvb-ci.cc.sys_id_bitmask",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_cc_dat_id,
- { "CC datatype id", "dvb-ci.cc.datatype_id", FT_UINT8, BASE_HEX,
- VALS(dvbci_cc_dat_id), 0, NULL, HFILL } },
+ { "CC datatype id", "dvb-ci.cc.datatype_id",
+ FT_UINT8, BASE_HEX, VALS(dvbci_cc_dat_id), 0, NULL, HFILL }
+ },
{ &hf_dvbci_brand_cert,
- { "Brand certificate", "dvb-ci.cc.brand_cert", FT_NONE, BASE_NONE,
- NULL, 0x0, NULL, HFILL } },
+ { "Brand certificate", "dvb-ci.cc.brand_cert",
+ FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ },
{ &hf_dvbci_dev_cert,
- { "Device certificate", "dvb-ci.cc.dev_cert", FT_NONE, BASE_NONE,
- NULL, 0x0, NULL, HFILL } },
+ { "Device certificate", "dvb-ci.cc.dev_cert",
+ FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ },
{ &hf_dvbci_uri_ver,
- { "URI version", "dvb-ci.cc.uri.version", FT_UINT8, BASE_HEX,
- NULL, 0, NULL, HFILL } },
+ { "URI version", "dvb-ci.cc.uri.version",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_uri_aps,
- { "APS", "dvb-ci.cc.uri.aps", FT_UINT8,
- BASE_HEX, NULL, 0xC0, NULL, HFILL } },
+ { "APS", "dvb-ci.cc.uri.aps",
+ FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL }
+ },
{ &hf_dvbci_uri_emi,
- { "EMI", "dvb-ci.cc.uri.emi", FT_UINT8,
- BASE_HEX, NULL, 0x30, NULL, HFILL } },
+ { "EMI", "dvb-ci.cc.uri.emi",
+ FT_UINT8, BASE_HEX, NULL, 0x30, NULL, HFILL }
+ },
{ &hf_dvbci_uri_ict,
- { "Image constraint token", "dvb-ci.cc.uri.ict", FT_UINT8,
- BASE_HEX, NULL, 0x08, NULL, HFILL } },
+ { "Image constraint token", "dvb-ci.cc.uri.ict",
+ FT_UINT8, BASE_HEX, NULL, 0x08, NULL, HFILL }
+ },
{ &hf_dvbci_uri_rct,
- { "Redistribution control trigger (RCT)", "dvb-ci.cc.uri.ict",
- FT_UINT8, BASE_HEX, NULL, 0x04, NULL, HFILL } },
+ { "Redistribution control trigger (RCT)", "dvb-ci.cc.uri.ict",
+ FT_UINT8, BASE_HEX, NULL, 0x04, NULL, HFILL }
+ },
{ &hf_dvbci_cc_key_register,
- { "Key register", "dvb-ci.cc.key_register", FT_UINT8, BASE_HEX,
- VALS(dvbci_cc_key_register), 0, NULL, HFILL } },
+ { "Key register", "dvb-ci.cc.key_register",
+ FT_UINT8, BASE_HEX, VALS(dvbci_cc_key_register), 0, NULL, HFILL }
+ },
{ &hf_dvbci_cc_status_field,
- { "Status field", "dvb-ci.cc.status_field", FT_UINT8, BASE_HEX,
- VALS(dvbci_cc_status), 0, NULL, HFILL } },
+ { "Status field", "dvb-ci.cc.status_field",
+ FT_UINT8, BASE_HEX, VALS(dvbci_cc_status), 0, NULL, HFILL }
+ },
{ &hf_dvbci_cc_op_mode,
- { "Operating mode", "dvb-ci.cc.op_mode", FT_UINT8, BASE_HEX,
- VALS(dvbci_cc_op_mode), 0, NULL, HFILL } },
+ { "Operating mode", "dvb-ci.cc.op_mode",
+ FT_UINT8, BASE_HEX, VALS(dvbci_cc_op_mode), 0, NULL, HFILL }
+ },
{ &hf_dvbci_cc_data,
- { "Data", "dvb-ci.cc.data", FT_BYTES, BASE_NONE,
- NULL, 0, NULL, HFILL } },
+ { "Data", "dvb-ci.cc.data",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_sac_msg_ctr,
- { "Message counter", "dvb-ci.cc.sac.msg_ctr", FT_UINT32, BASE_HEX,
- NULL, 0, NULL, HFILL } },
+ { "Message counter", "dvb-ci.cc.sac.msg_ctr",
+ FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_sac_proto_ver,
- { "Protocol version", "dvb-ci.cc.sac.proto_ver", FT_UINT8, BASE_HEX,
- NULL, 0xF0, NULL, HFILL } },
+ { "Protocol version", "dvb-ci.cc.sac.proto_ver",
+ FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL }
+ },
{ &hf_dvbci_sac_auth_cip,
- { "Authentication cipher", "dvb-ci.cc.sac.auth_cip", FT_UINT8,
- BASE_HEX, VALS(dvbci_cc_sac_auth), 0x0E, NULL, HFILL } },
+ { "Authentication cipher", "dvb-ci.cc.sac.auth_cip",
+ FT_UINT8, BASE_HEX, VALS(dvbci_cc_sac_auth), 0x0E, NULL, HFILL }
+ },
{ &hf_dvbci_sac_payload_enc,
- { "Payload encryption flag", "dvb-ci.cc.sac.payload_enc", FT_UINT8,
- BASE_HEX, NULL, 0x01, NULL, HFILL } },
+ { "Payload encryption flag", "dvb-ci.cc.sac.payload_enc",
+ FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL }
+ },
{ &hf_dvbci_sac_enc_cip,
- { "Encryption cipher", "dvb-ci.cc.sac.enc_cip", FT_UINT8, BASE_HEX,
- VALS(dvbci_cc_sac_enc), 0xE0, NULL, HFILL } },
+ { "Encryption cipher", "dvb-ci.cc.sac.enc_cip",
+ FT_UINT8, BASE_HEX, VALS(dvbci_cc_sac_enc), 0xE0, NULL, HFILL }
+ },
{ &hf_dvbci_sac_payload_len,
- { "Payload length", "dvb-ci.cc.sac.payload_len", FT_UINT16,
- BASE_DEC, NULL, 0, NULL, HFILL } },
+ { "Payload length", "dvb-ci.cc.sac.payload_len",
+ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_sac_enc_body,
- { "Encrypted SAC body", "dvb-ci.cc.sac.enc_body", FT_BYTES,
- BASE_NONE, NULL, 0, NULL, HFILL } },
+ { "Encrypted SAC body", "dvb-ci.cc.sac.enc_body",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_sac_signature,
- { "Signature", "dvb-ci.cc.sac.signature", FT_BYTES,
- BASE_NONE, NULL, 0, NULL, HFILL } },
+ { "Signature", "dvb-ci.cc.sac.signature",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_rating,
- { "Rating", "dvb-ci.cc.rating", FT_UINT8, BASE_DEC,
- NULL, 0, NULL, HFILL } },
+ { "Rating", "dvb-ci.cc.rating",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_capability_field,
- { "Capability field", "dvb-ci.cc.capability_field", FT_UINT8,
- BASE_HEX, VALS(dvbci_cc_cap), 0, NULL, HFILL } },
+ { "Capability field", "dvb-ci.cc.capability_field",
+ FT_UINT8, BASE_HEX, VALS(dvbci_cc_cap), 0, NULL, HFILL }
+ },
{ &hf_dvbci_pin_chg_time,
- { "PIN change time (UTC)", "dvb-ci.cc.pin_change_time",
- FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, NULL, HFILL } },
+ { "PIN change time (UTC)", "dvb-ci.cc.pin_change_time",
+ FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_pincode_status,
- { "Pincode status field", "dvb-ci.cc.pincode_status_field", FT_UINT8,
- BASE_HEX, VALS(dvbci_pincode_status), 0, NULL, HFILL } },
+ { "Pincode status field", "dvb-ci.cc.pincode_status_field",
+ FT_UINT8, BASE_HEX, VALS(dvbci_pincode_status), 0, NULL, HFILL }
+ },
{ &hf_dvbci_cc_prog_num,
- { "Program number", "dvb-ci.cc.program_number", FT_UINT16,
- BASE_HEX, NULL, 0, NULL, HFILL } },
+ { "Program number", "dvb-ci.cc.program_number",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_pin_evt_time,
- { "PIN event time (UTC)", "dvb-ci.cc.pin_event_time",
- FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, NULL, HFILL } },
+ { "PIN event time (UTC)", "dvb-ci.cc.pin_event_time",
+ FT_ABSOLUTE_TIME, ABSOLUTE_TIME_UTC, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_pin_evt_cent,
- { "PIN event time centiseconds", "dvb-ci.cc.pin_event_time_centi",
- FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } },
+ { "PIN event time centiseconds", "dvb-ci.cc.pin_event_time_centi",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_cc_priv_data,
- { "Private data", "dvb-ci.cc.private_data", FT_BYTES,
- BASE_NONE, NULL, 0, NULL, HFILL } },
+ { "Private data", "dvb-ci.cc.private_data",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_pincode,
- { "PIN code", "dvb-ci.cc.pincode", FT_STRING,
- BASE_NONE, NULL, 0, NULL, HFILL } },
+ { "PIN code", "dvb-ci.cc.pincode",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_app_dom_id,
- { "Application Domain Identifier", "dvb-ci.ami.app_dom_id",
- FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL } },
+ { "Application Domain Identifier", "dvb-ci.ami.app_dom_id",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_init_obj,
- { "Initial Object", "dvb-ci.ami.init_obj", FT_STRING,
- BASE_NONE, NULL, 0, NULL, HFILL } },
+ { "Initial Object", "dvb-ci.ami.init_obj",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_ack_code,
- { "Acknowledgement", "dvb-ci.ami.ack_code", FT_UINT8, BASE_HEX,
- VALS(dvbci_ack_code), 0, NULL, HFILL } },
+ { "Acknowledgement", "dvb-ci.ami.ack_code",
+ FT_UINT8, BASE_HEX, VALS(dvbci_ack_code), 0, NULL, HFILL }
+ },
{ &hf_dvbci_req_type,
- { "Request type", "dvb-ci.ami.req_type", FT_UINT8, BASE_HEX,
- VALS(dvbci_req_type), 0, NULL, HFILL } },
+ { "Request type", "dvb-ci.ami.req_type",
+ FT_UINT8, BASE_HEX, VALS(dvbci_req_type), 0, NULL, HFILL }
+ },
{ &hf_dvbci_file_hash,
- { "File hash", "dvb-ci.ami.file_hash", FT_BYTES,
- BASE_NONE, NULL, 0, NULL, HFILL } },
- { &hf_dvbci_file_name,
- { "File name", "dvb-ci.ami.file_name", FT_STRING,
- BASE_NONE, NULL, 0, NULL, HFILL } },
+ { "File hash", "dvb-ci.ami.file_hash",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
+ { &hf_dvbci_file_name,
+ { "File name", "dvb-ci.ami.file_name",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_ami_priv_data,
- { "Private data", "dvb-ci.ami.private_data", FT_BYTES,
- BASE_NONE, NULL, 0, NULL, HFILL } },
+ { "Private data", "dvb-ci.ami.private_data",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_req_ok,
- { "RequestOK", "dvb-ci.ami.request_ok", FT_UINT8, BASE_HEX,
- NULL, 0x02, NULL, HFILL } },
+ { "RequestOK", "dvb-ci.ami.request_ok",
+ FT_UINT8, BASE_HEX, NULL, 0x02, NULL, HFILL }
+ },
{ &hf_dvbci_file_ok,
- { "FileOK", "dvb-ci.ami.file_ok", FT_UINT8, BASE_HEX,
- NULL, 0x01, NULL, HFILL } },
+ { "FileOK", "dvb-ci.ami.file_ok",
+ FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL }
+ },
{ &hf_dvbci_file_data,
- { "File data", "dvb-ci.ami.file_data", FT_BYTES,
- BASE_NONE, NULL, 0, NULL, HFILL } },
+ { "File data", "dvb-ci.ami.file_data",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_abort_req_code,
- { "Abort request code", "dvb-ci.ami.abort_req_code", FT_BYTES,
- BASE_NONE, NULL, 0, NULL, HFILL } },
+ { "Abort request code", "dvb-ci.ami.abort_req_code",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_abort_ack_code,
- { "Abort acknowledgement code", "dvb-ci.ami.abort_ack_code",
- FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } },
+ { "Abort acknowledgement code", "dvb-ci.ami.abort_ack_code",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_phase_id,
- { "Phase ID", "dvb-ci.lsc.comms_phase_id", FT_UINT8, BASE_HEX,
- NULL, 0, NULL, HFILL } },
+ { "Phase ID", "dvb-ci.lsc.comms_phase_id",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_comms_rep_id,
- { "Comms reply ID", "dvb-ci.lsc.comms_reply_id", FT_UINT8, BASE_HEX,
- VALS(dvbci_comms_rep_id), 0, NULL, HFILL } },
+ { "Comms reply ID", "dvb-ci.lsc.comms_reply_id",
+ FT_UINT8, BASE_HEX, VALS(dvbci_comms_rep_id), 0, NULL, HFILL }
+ },
{ &hf_dvbci_lsc_buf_size,
- { "Buffer size", "dvb-ci.lsc.buf_size", FT_UINT16, BASE_DEC,
- NULL, 0, NULL, HFILL } },
+ { "Buffer size", "dvb-ci.lsc.buf_size",
+ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_lsc_ret_val,
- { "Return value", "dvb-ci.lsc.return_value", FT_UINT8, BASE_HEX,
- NULL, 0, NULL, HFILL } },
+ { "Return value", "dvb-ci.lsc.return_value",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_comms_cmd_id,
- { "Comms command ID", "dvb-ci.lsc.comms_cmd_id", FT_UINT8, BASE_HEX,
- VALS(dvbci_comms_cmd_id), 0, NULL, HFILL } },
+ { "Comms command ID", "dvb-ci.lsc.comms_cmd_id",
+ FT_UINT8, BASE_HEX, VALS(dvbci_comms_cmd_id), 0, NULL, HFILL }
+ },
{ &hf_dvbci_conn_desc_type,
- { "Type", "dvb-ci.lsc.conn_desc_type", FT_UINT8,
- BASE_HEX, VALS(dvbci_conn_desc_type), 0, NULL, HFILL } },
+ { "Type", "dvb-ci.lsc.conn_desc_type",
+ FT_UINT8, BASE_HEX, VALS(dvbci_conn_desc_type), 0, NULL, HFILL }
+ },
{ &hf_dvbci_lsc_media_tag,
- { "Tag", "dvb-ci.lsc.media_tag", FT_UINT8, BASE_HEX,
- VALS(dvbci_lsc_desc_tag), 0, NULL, HFILL } },
+ { "Tag", "dvb-ci.lsc.media_tag",
+ FT_UINT8, BASE_HEX, VALS(dvbci_lsc_desc_tag), 0, NULL, HFILL }
+ },
{ &hf_dvbci_lsc_media_len,
- { "Length", "dvb-ci.lsc.media_len", FT_UINT8, BASE_DEC,
- NULL, 0, NULL, HFILL } },
+ { "Length", "dvb-ci.lsc.media_len",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_lsc_ip_ver,
- { "IP version", "dvb-ci.lsc.ip_version", FT_UINT8, BASE_DEC,
- VALS(dvbci_lsc_ip_ver), 0, NULL, HFILL } },
+ { "IP version", "dvb-ci.lsc.ip_version",
+ FT_UINT8, BASE_DEC, VALS(dvbci_lsc_ip_ver), 0, NULL, HFILL }
+ },
{ &hf_dvbci_lsc_ipv4_addr,
- { "IP address", "dvb-ci.lsc.ipv4_addr", FT_IPv4, BASE_NONE,
- NULL, 0, NULL, HFILL } },
+ { "IP address", "dvb-ci.lsc.ipv4_addr",
+ FT_IPv4, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_lsc_ipv6_addr,
- { "IPv6 address", "dvb-ci.lsc.ipv6_addr", FT_IPv6, BASE_NONE,
- NULL, 0, NULL, HFILL } },
+ { "IPv6 address", "dvb-ci.lsc.ipv6_addr",
+ FT_IPv6, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_lsc_dst_port,
- { "Destination port", "dvb-ci.lsc.dst_port", FT_UINT8, BASE_DEC,
- NULL, 0, NULL, HFILL } },
+ { "Destination port", "dvb-ci.lsc.dst_port",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_lsc_proto,
- { "Protocol", "dvb-ci.lsc.protocol", FT_UINT8, BASE_HEX,
- VALS(dvbci_lsc_proto), 0, NULL, HFILL } },
+ { "Protocol", "dvb-ci.lsc.protocol",
+ FT_UINT8, BASE_HEX, VALS(dvbci_lsc_proto), 0, NULL, HFILL }
+ },
{ &hf_dvbci_lsc_hostname,
- { "Hostname", "dvb-ci.lsc.hostname", FT_STRING, BASE_NONE,
- NULL, 0, NULL, HFILL } },
+ { "Hostname", "dvb-ci.lsc.hostname",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_lsc_retry_count,
- { "Retry count", "dvb-ci.lsc.retry_count", FT_UINT8, BASE_DEC,
- NULL, 0, NULL, HFILL } },
+ { "Retry count", "dvb-ci.lsc.retry_count",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_lsc_timeout,
- { "Timeout", "dvb-ci.lsc.timeout", FT_UINT8, BASE_DEC,
- NULL, 0, NULL, HFILL } },
+ { "Timeout", "dvb-ci.lsc.timeout",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_lsc_msg,
- { "Message", "dvb-ci.lsc.message", FT_BYTES, BASE_NONE,
- NULL, 0, NULL, HFILL } },
+ { "Message", "dvb-ci.lsc.message",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
+
/* filter string for hf_dvbci_info_ver_op_status and
* hf_dvbci_info_ver_op_info below is the same, it seems this is ok */
{ &hf_dvbci_info_ver_op_status,
- { "Info version", "dvb-ci.opp.info_ver", FT_UINT8, BASE_HEX,
- NULL, 0xE0, NULL, HFILL } },
+ { "Info version", "dvb-ci.opp.info_ver",
+ FT_UINT8, BASE_HEX, NULL, 0xE0, NULL, HFILL }
+ },
{ &hf_dvbci_nit_ver,
- { "NIT version", "dvb-ci.opp.nit_ver", FT_UINT8, BASE_HEX,
- NULL, 0x1F, NULL, HFILL } },
+ { "NIT version", "dvb-ci.opp.nit_ver",
+ FT_UINT8, BASE_HEX, NULL, 0x1F, NULL, HFILL }
+ },
{ &hf_dvbci_pro_typ,
- { "Profile type", "dvb-ci.opp.profile_type", FT_UINT8, BASE_HEX,
- NULL, 0xC0, NULL, HFILL } },
+ { "Profile type", "dvb-ci.opp.profile_type",
+ FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL }
+ },
{ &hf_dvbci_init_flag,
- { "Initialized flag", "dvb-ci.opp.init_flag", FT_UINT8, BASE_HEX,
- NULL, 0x20, NULL, HFILL } },
+ { "Initialized flag", "dvb-ci.opp.init_flag",
+ FT_UINT8, BASE_HEX, NULL, 0x20, NULL, HFILL }
+ },
{ &hf_dvbci_ent_chg_flag,
- { "Entitlement change flag", "dvb-ci.opp.ent_chg_flag", FT_UINT8,
- BASE_HEX, NULL, 0x10, NULL, HFILL } },
+ { "Entitlement change flag", "dvb-ci.opp.ent_chg_flag",
+ FT_UINT8, BASE_HEX, NULL, 0x10, NULL, HFILL }
+ },
{ &hf_dvbci_ent_val_flag,
- { "Entitlement valid flag", "dvb-ci.opp.ent_val_flag", FT_UINT8,
- BASE_HEX, NULL, 0x08, NULL, HFILL } },
+ { "Entitlement valid flag", "dvb-ci.opp.ent_val_flag",
+ FT_UINT8, BASE_HEX, NULL, 0x08, NULL, HFILL }
+ },
{ &hf_dvbci_ref_req_flag,
- { "Refresh request flag", "dvb-ci.opp.refresh_req_flag", FT_UINT8,
- BASE_HEX, NULL, 0x03, NULL, HFILL } },
+ { "Refresh request flag", "dvb-ci.opp.refresh_req_flag",
+ FT_UINT8, BASE_HEX, NULL, 0x03, NULL, HFILL }
+ },
{ &hf_dvbci_err_flag,
- { "Error flag", "dvb-ci.opp.err_flag", FT_UINT8, BASE_HEX,
- NULL, 0xF0, NULL, HFILL } },
+ { "Error flag", "dvb-ci.opp.err_flag",
+ FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL }
+ },
{ &hf_dvbci_dlv_sys_hint,
- { "Delivery system hint", "dvb-ci.opp.dlv_sys_hint", FT_UINT8,
- BASE_HEX, NULL, 0x0F, NULL, HFILL } },
+ { "Delivery system hint", "dvb-ci.opp.dlv_sys_hint",
+ FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL }
+ },
{ &hf_dvbci_refr_req_date,
- { "Refresh request date", "dvb-ci.opp.refresh_req_date", FT_UINT16,
- BASE_HEX, NULL, 0, NULL, HFILL } },
+ { "Refresh request date", "dvb-ci.opp.refresh_req_date",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_refr_req_time,
- { "Refresh request time", "dvb-ci.opp.refresh_req_time", FT_UINT8,
- BASE_HEX, NULL, 0, NULL, HFILL } },
+ { "Refresh request time", "dvb-ci.opp.refresh_req_time",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_nit_loop_len,
- { "NIT loop length", "dvb-ci.opp.nit_loop_len", FT_UINT16,
- BASE_DEC, NULL, 0, NULL, HFILL } },
+ { "NIT loop length", "dvb-ci.opp.nit_loop_len",
+ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_nit,
- { "NIT", "dvb-ci.opp.nit", FT_BYTES, BASE_NONE,
- NULL, 0, NULL, HFILL } },
+ { "NIT", "dvb-ci.opp.nit",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_info_valid,
- { "Info valid", "dvb-ci.opp.info_valid", FT_UINT8,
- BASE_HEX, NULL, 0x08, NULL, HFILL } },
+ { "Info valid", "dvb-ci.opp.info_valid",
+ FT_UINT8, BASE_HEX, NULL, 0x08, NULL, HFILL }
+ },
{ &hf_dvbci_info_ver_op_info,
- { "Info version", "dvb-ci.opp.info_ver", FT_UINT8, BASE_HEX,
- NULL, 0x07, NULL, HFILL } },
+ { "Info version", "dvb-ci.opp.info_ver",
+ FT_UINT8, BASE_HEX, NULL, 0x07, NULL, HFILL }
+ },
{ &hf_dvbci_cicam_onid,
- { "CICAM original network id", "dvb-ci.opp.cicam_onid", FT_UINT16,
- BASE_HEX, NULL, 0, NULL, HFILL } },
+ { "CICAM original network id", "dvb-ci.opp.cicam_onid",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_cicam_id,
- { "CICAM ID", "dvb-ci.opp.cicam_id", FT_UINT32,
- BASE_HEX, NULL, 0, NULL, HFILL } },
+ { "CICAM ID", "dvb-ci.opp.cicam_id",
+ FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_opp_char_tbl_multi,
- { "Multi-byte character table", "dvb-ci.opp.char_tbl_multi",
- FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL } },
+ { "Multi-byte character table", "dvb-ci.opp.char_tbl_multi",
+ FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_opp_char_tbl,
- { "Character code table", "dvb-ci.opp.char_tbl", FT_UINT8,
- BASE_HEX, VALS(dvbci_char_tbl), 0, NULL, HFILL } },
+ { "Character code table", "dvb-ci.opp.char_tbl",
+ FT_UINT8, BASE_HEX, VALS(dvbci_char_tbl), 0, NULL, HFILL }
+ },
{ &hf_dvbci_enc_type_id,
- { "Encoding type ID", "dvb-ci.opp.enc_type_id", FT_UINT8,
- BASE_HEX, NULL, 0, NULL, HFILL } },
+ { "Encoding type ID", "dvb-ci.opp.enc_type_id",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_sdt_rst_trusted,
- { "SDT running status trusted", "dvb-ci.opp.sdt_rst_trusted",
- FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL } },
+ { "SDT running status trusted", "dvb-ci.opp.sdt_rst_trusted",
+ FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL }
+ },
{ &hf_dvbci_eit_rst_trusted,
- { "EIT running status trusted", "dvb-ci.opp.eit_rst_trusted",
- FT_UINT8, BASE_HEX, NULL, 0x40, NULL, HFILL } },
+ { "EIT running status trusted", "dvb-ci.opp.eit_rst_trusted",
+ FT_UINT8, BASE_HEX, NULL, 0x40, NULL, HFILL }
+ },
{ &hf_dvbci_eit_pf_usage,
- { "EIT present/following usage", "dvb-ci.opp.eit_pf_usage",
- FT_UINT8, BASE_HEX, NULL, 0x30, NULL, HFILL } },
+ { "EIT present/following usage", "dvb-ci.opp.eit_pf_usage",
+ FT_UINT8, BASE_HEX, NULL, 0x30, NULL, HFILL }
+ },
{ &hf_dvbci_eit_sch_usage,
- { "EIT schedule usage", "dvb-ci.opp.eit_sch_usage",
- FT_UINT8, BASE_HEX, NULL, 0x0E, NULL, HFILL } },
+ { "EIT schedule usage", "dvb-ci.opp.eit_sch_usage",
+ FT_UINT8, BASE_HEX, NULL, 0x0E, NULL, HFILL }
+ },
{ &hf_dvbci_ext_evt_usage,
- { "Extended event usage", "dvb-ci.opp.ext_evt_usage",
- FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL } },
+ { "Extended event usage", "dvb-ci.opp.ext_evt_usage",
+ FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL }
+ },
{ &hf_dvbci_sdt_oth_trusted,
- { "SDT_other trusted", "dvb-ci.opp.sdt_oth_trusted",
- FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL } },
+ { "SDT_other trusted", "dvb-ci.opp.sdt_oth_trusted",
+ FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL }
+ },
{ &hf_dvbci_eit_evt_trigger,
- { "EIT event trigger", "dvb-ci.opp.eit_evt_trigger",
- FT_UINT8, BASE_HEX, NULL, 0x40, NULL, HFILL } },
+ { "EIT event trigger", "dvb-ci.opp.eit_evt_trigger",
+ FT_UINT8, BASE_HEX, NULL, 0x40, NULL, HFILL }
+ },
{ &hf_dvbci_opp_lang_code,
- { "Language code", "dvb-ci.opp.lang_code", FT_STRING, BASE_NONE,
- NULL, 0, NULL, HFILL } },
+ { "Language code", "dvb-ci.opp.lang_code",
+ FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_prof_name,
- { "Profile name", "dvb-ci.opp.profile_name", FT_UINT_STRING,
- BASE_NONE, NULL, 0, NULL, HFILL } },
+ { "Profile name", "dvb-ci.opp.profile_name",
+ FT_UINT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_unattended,
- { "Unattended flag", "dvb-ci.opp.unattended_flag", FT_UINT8,
- BASE_HEX, NULL, 0x80, NULL, HFILL } },
+ { "Unattended flag", "dvb-ci.opp.unattended_flag",
+ FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL }
+ },
{ &hf_dvbci_opp_srv_type,
- { "Service type", "dvb-ci.opp.service_type",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } },
+ { "Service type", "dvb-ci.opp.service_type",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_dlv_cap_byte,
- { "Delivery capability byte", "dvb-ci.opp.dlv_cap_byte",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } },
+ { "Delivery capability byte", "dvb-ci.opp.dlv_cap_byte",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
+
/* the CI+ spec is not particularly clear about this but an
* application id in the capability loop must always be 2 bytes */
{ &hf_dvbci_app_cap_bytes,
- { "Application capability bytes", "dvb-ci.opp.app_cap_bytes",
- FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL } },
+ { "Application capability bytes", "dvb-ci.opp.app_cap_bytes",
+ FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_desc_num,
- { "Next unprocessed descriptor number", "dvb-ci.opp.desc_num",
- FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } },
+ { "Next unprocessed descriptor number", "dvb-ci.opp.desc_num",
+ FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_sig_strength,
- { "Signal strength", "dvb-ci.opp.sig_strength", FT_UINT8,
- BASE_DEC, NULL, 0, NULL, HFILL } },
+ { "Signal strength", "dvb-ci.opp.sig_strength",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_sig_qual,
- { "Signal quality", "dvb-ci.opp.sig_qual", FT_UINT8,
- BASE_DEC, NULL, 0, NULL, HFILL } },
+ { "Signal quality", "dvb-ci.opp.sig_qual",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_opp_tune_status,
- { "Tuning status", "dvb-ci.opp.tune_status", FT_UINT8,
- BASE_HEX, NULL, 0xF0, NULL, HFILL } },
+ { "Tuning status", "dvb-ci.opp.tune_status",
+ FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL }
+ },
{ &hf_dvbci_opp_desc_loop_len,
- { "Descriptor loop length", "dvb-ci.opp.desc_loop_len", FT_UINT16,
- BASE_DEC, NULL, 0x0FFF, NULL, HFILL } },
+ { "Descriptor loop length", "dvb-ci.opp.desc_loop_len",
+ FT_UINT16, BASE_DEC, NULL, 0x0FFF, NULL, HFILL }
+ },
{ &hf_dvbci_opp_desc_loop,
- { "Descriptor loop", "dvb-ci.opp.desc_loop", FT_BYTES, BASE_NONE,
- NULL, 0, NULL, HFILL } },
- { &hf_dvbci_sas_app_id,
- { "Application ID", "dvb-ci.sas.app_id", FT_UINT64, BASE_HEX,
- NULL, 0, NULL, HFILL } },
+ { "Descriptor loop", "dvb-ci.opp.desc_loop",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }
+ },
+ { &hf_dvbci_sas_app_id,
+ { "Application ID", "dvb-ci.sas.app_id",
+ FT_UINT64, BASE_HEX, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_sas_sess_state,
- { "Connection state", "dvb-ci.sas.sess_state", FT_UINT8, BASE_DEC,
- VALS(dvbci_sas_sess_state), 0, NULL, HFILL } },
+ { "Connection state", "dvb-ci.sas.sess_state",
+ FT_UINT8, BASE_DEC, VALS(dvbci_sas_sess_state), 0, NULL, HFILL }
+ },
{ &hf_dvbci_sas_msg_nb,
- { "Message number", "dvb-ci.sas.msg_nb", FT_UINT8, BASE_DEC,
- NULL, 0, NULL, HFILL } },
+ { "Message number", "dvb-ci.sas.msg_nb",
+ FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_sas_msg_len,
- { "Message length", "dvb-ci.sas.msg_len", FT_UINT16, BASE_DEC,
- NULL, 0, NULL, HFILL } },
+ { "Message length", "dvb-ci.sas.msg_len",
+ FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }
+ },
{ &hf_dvbci_sas_msg,
- { "Message", "dvb-ci.sas.message", FT_BYTES, BASE_NONE,
- NULL, 0, NULL, HFILL } }
+ { "Message", "dvb-ci.sas.message",
+ FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }
+ }
};
spdu_table = g_hash_table_new(g_direct_hash, g_direct_equal);
for(i=0; i<array_length(spdu_info); i++) {
g_hash_table_insert(spdu_table,
- GUINT_TO_POINTER((guint)spdu_info[i].tag),
- (gpointer)(&spdu_info[i]));
+ GUINT_TO_POINTER((guint)spdu_info[i].tag),
+ (gpointer)(&spdu_info[i]));
}
apdu_table = g_hash_table_new(g_direct_hash, g_direct_equal);
for(i=0; i<array_length(apdu_info); i++) {
g_hash_table_insert(apdu_table,
- GUINT_TO_POINTER((guint)apdu_info[i].tag),
- (gpointer)(&apdu_info[i]));
+ GUINT_TO_POINTER((guint)apdu_info[i].tag),
+ (gpointer)(&apdu_info[i]));
}
proto_dvbci = proto_register_protocol(
- "DVB Common Interface", "DVB-CI", "dvb-ci");
+ "DVB Common Interface", "DVB-CI", "dvb-ci");
proto_register_field_array(proto_dvbci, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
dvbci_module = prefs_register_protocol(
- proto_dvbci, proto_reg_handoff_dvbci);
+ proto_dvbci, proto_reg_handoff_dvbci);
prefs_register_string_preference(dvbci_module,
- "sek", "SAC Encryption Key", "SAC Encryption Key (16 hex bytes)",
- (const gchar **)&dvbci_sek);
+ "sek", "SAC Encryption Key", "SAC Encryption Key (16 hex bytes)",
+ (const gchar **)&dvbci_sek);
prefs_register_string_preference(dvbci_module,
- "siv", "SAC Init Vector", "SAC Init Vector (16 hex bytes)",
- (const gchar **)&dvbci_siv);
+ "siv", "SAC Init Vector", "SAC Init Vector (16 hex bytes)",
+ (const gchar **)&dvbci_siv);
register_init_routine(dvbci_init);
}
diff --git a/epan/dissectors/packet-eigrp.c b/epan/dissectors/packet-eigrp.c
index f910a97a14..b051c6331b 100644
--- a/epan/dissectors/packet-eigrp.c
+++ b/epan/dissectors/packet-eigrp.c
@@ -47,123 +47,123 @@
/**
* EIGRP Header size in bytes
*/
-#define EIGRP_HEADER_LENGTH 20
+#define EIGRP_HEADER_LENGTH 20
/**
* EIGRP Packet Opcodes
*/
-#define EIGRP_OPC_UPDATE 1 /*!< packet containing routing information */
-#define EIGRP_OPC_REQUEST 2 /*!< sent to request one or more routes */
-#define EIGRP_OPC_QUERY 3 /*!< sent when a routing is in active start */
-#define EIGRP_OPC_REPLY 4 /*!< sent in response to a query */
-#define EIGRP_OPC_HELLO 5 /*!< sent to maintain a peering session */
-#define EIGRP_OPC_IPXSAP 6 /*!< IPX SAP information */
-#define EIGRP_OPC_PROBE 7 /*!< for test purposes */
-#define EIGRP_OPC_ACK 8 /*!< acknowledge */
-#define EIGRP_OPC_STUB 9 /*!< peering operating in restricted mode */
-#define EIGRP_OPC_SIAQUERY 10 /*!< QUERY - with relaxed restrictions */
-#define EIGRP_OPC_SIAREPLY 11 /*!< REPLY - may contain old routing information */
+#define EIGRP_OPC_UPDATE 1 /*!< packet containing routing information */
+#define EIGRP_OPC_REQUEST 2 /*!< sent to request one or more routes */
+#define EIGRP_OPC_QUERY 3 /*!< sent when a routing is in active start */
+#define EIGRP_OPC_REPLY 4 /*!< sent in response to a query */
+#define EIGRP_OPC_HELLO 5 /*!< sent to maintain a peering session */
+#define EIGRP_OPC_IPXSAP 6 /*!< IPX SAP information */
+#define EIGRP_OPC_PROBE 7 /*!< for test purposes */
+#define EIGRP_OPC_ACK 8 /*!< acknowledge */
+#define EIGRP_OPC_STUB 9 /*!< peering operating in restricted mode */
+#define EIGRP_OPC_SIAQUERY 10 /*!< QUERY - with relaxed restrictions */
+#define EIGRP_OPC_SIAREPLY 11 /*!< REPLY - may contain old routing information */
/**
* EIGRP TLV Range definitions
- * PDM TLV Range
- * General 0x0000
- * IPv4 0x0100 ** TLVs for one and all
- * ATALK 0x0200 ** legacy
- * IPX 0x0300 ** discontinued
- * IPv6 0x0400 ** legacy
- * Multiprotocol 0x0600 ** wide metrics
- * MultiTopology 0x00f0 ** deprecated
- */
-#define EIGRP_TLV_RANGEMASK 0xfff0 /*!< should be 0xff00 - opps */
-#define EIGRP_TLV_GENERAL 0x0000
+ * PDM TLV Range
+ * General 0x0000
+ * IPv4 0x0100 ** TLVs for one and all
+ * ATALK 0x0200 ** legacy
+ * IPX 0x0300 ** discontinued
+ * IPv6 0x0400 ** legacy
+ * Multiprotocol 0x0600 ** wide metrics
+ * MultiTopology 0x00f0 ** deprecated
+ */
+#define EIGRP_TLV_RANGEMASK 0xfff0 /*!< should be 0xff00 - opps */
+#define EIGRP_TLV_GENERAL 0x0000
/**
- * 1.2 TLV Definitions ** legacy
+ * 1.2 TLV Definitions ** legacy
* These have been deprecated and should not be used for future packets
*/
-#define EIGRP_TLV_IPv4 0x0100 /*!< Classic IPv4 TLV encoding */
-#define EIGRP_TLV_ATALK 0x0200 /*!< Classic Appletalk TLV encoding*/
-#define EIGRP_TLV_IPX 0x0300 /*!< Classic IPX TLV encoding */
-#define EIGRP_TLV_IPv6 0x0400 /*!< Classic IPv6 TLV encoding */
+#define EIGRP_TLV_IPv4 0x0100 /*!< Classic IPv4 TLV encoding */
+#define EIGRP_TLV_ATALK 0x0200 /*!< Classic Appletalk TLV encoding*/
+#define EIGRP_TLV_IPX 0x0300 /*!< Classic IPX TLV encoding */
+#define EIGRP_TLV_IPv6 0x0400 /*!< Classic IPv6 TLV encoding */
/**
* 2.0 Multi-Protocol TLV Definitions
* These have been deprecated and should not be used for future packets
*/
-#define EIGRP_TLV_MP 0x0600 /*!< Non-PDM specific encoding */
+#define EIGRP_TLV_MP 0x0600 /*!< Non-PDM specific encoding */
/**
- * 3.0 TLV Definitions ** deprecated
+ * 3.0 TLV Definitions ** deprecated
* These have been deprecated and should not be used for future packets
*/
-#define EIGRP_TLV_MTR 0x00f0 /*!< MTR TLV encoding */
+#define EIGRP_TLV_MTR 0x00f0 /*!< MTR TLV encoding */
/**
* TLV type definitions. Generic (protocol-independent) TLV types are
* defined here. Protocol-specific ones are defined elsewhere.
*/
-#define EIGRP_TLV_PARAMETER (EIGRP_TLV_GENERAL | 0x0001) /*!< eigrp parameters */
-#define EIGRP_TLV_AUTH (EIGRP_TLV_GENERAL | 0x0002) /*!< authentication */
-#define EIGRP_TLV_SEQ (EIGRP_TLV_GENERAL | 0x0003) /*!< sequenced packet */
-#define EIGRP_TLV_SW_VERSION (EIGRP_TLV_GENERAL | 0x0004) /*!< software version */
-#define EIGRP_TLV_NEXT_MCAST_SEQ (EIGRP_TLV_GENERAL | 0x0005) /*!< */
-#define EIGRP_TLV_PEER_STUBINFO (EIGRP_TLV_GENERAL | 0x0006) /*!< stub information */
-#define EIGRP_TLV_PEER_TERMINATION (EIGRP_TLV_GENERAL | 0x0007) /*!< peer termination */
-#define EIGRP_TLV_PEER_TIDLIST (EIGRP_TLV_GENERAL | 0x0008) /*!< peer sub-topology list */
+#define EIGRP_TLV_PARAMETER (EIGRP_TLV_GENERAL | 0x0001) /*!< eigrp parameters */
+#define EIGRP_TLV_AUTH (EIGRP_TLV_GENERAL | 0x0002) /*!< authentication */
+#define EIGRP_TLV_SEQ (EIGRP_TLV_GENERAL | 0x0003) /*!< sequenced packet */
+#define EIGRP_TLV_SW_VERSION (EIGRP_TLV_GENERAL | 0x0004) /*!< software version */
+#define EIGRP_TLV_NEXT_MCAST_SEQ (EIGRP_TLV_GENERAL | 0x0005) /*!< */
+#define EIGRP_TLV_PEER_STUBINFO (EIGRP_TLV_GENERAL | 0x0006) /*!< stub information */
+#define EIGRP_TLV_PEER_TERMINATION (EIGRP_TLV_GENERAL | 0x0007) /*!< peer termination */
+#define EIGRP_TLV_PEER_TIDLIST (EIGRP_TLV_GENERAL | 0x0008) /*!< peer sub-topology list */
/**
* Route Based TLVs
*/
-#define EIGRP_TLV_TYPEMASK 0x000f
-#define EIGRP_TLV_REQUEST 0x0001
-#define EIGRP_TLV_INTERNAL 0x0002
-#define EIGRP_TLV_EXTERNAL 0x0003
-#define EIGRP_TLV_COMMUNITY 0x0004
+#define EIGRP_TLV_TYPEMASK 0x000f
+#define EIGRP_TLV_REQUEST 0x0001
+#define EIGRP_TLV_INTERNAL 0x0002
+#define EIGRP_TLV_EXTERNAL 0x0003
+#define EIGRP_TLV_COMMUNITY 0x0004
/* Legacy TLV formats */
-#define EIGRP_TLV_IPv4_REQ (EIGRP_TLV_IPv4 | EIGRP_TLV_REQUEST)
-#define EIGRP_TLV_IPv4_INT (EIGRP_TLV_IPv4 | EIGRP_TLV_INTERNAL)
-#define EIGRP_TLV_IPv4_EXT (EIGRP_TLV_IPv4 | EIGRP_TLV_EXTERNAL)
-#define EIGRP_TLV_IPv4_COM (EIGRP_TLV_IPv4 | EIGRP_TLV_COMMUNITY)
-#define EIGRP_TLV_IPX_INT (EIGRP_TLV_IPX | EIGRP_TLV_INTERNAL)
-#define EIGRP_TLV_IPX_EXT (EIGRP_TLV_IPX | EIGRP_TLV_EXTERNAL)
-#define EIGRP_TLV_IPX_COM (EIGRP_TLV_IPX | EIGRP_TLV_COMMUNITY)
-#define EIGRP_TLV_IPv6_INT (EIGRP_TLV_IPv6 | EIGRP_TLV_INTERNAL)
-#define EIGRP_TLV_IPv6_EXT (EIGRP_TLV_IPv6 | EIGRP_TLV_EXTERNAL)
-#define EIGRP_TLV_IPv6_COM (EIGRP_TLV_IPv6 | EIGRP_TLV_COMMUNITY)
+#define EIGRP_TLV_IPv4_REQ (EIGRP_TLV_IPv4 | EIGRP_TLV_REQUEST)
+#define EIGRP_TLV_IPv4_INT (EIGRP_TLV_IPv4 | EIGRP_TLV_INTERNAL)
+#define EIGRP_TLV_IPv4_EXT (EIGRP_TLV_IPv4 | EIGRP_TLV_EXTERNAL)
+#define EIGRP_TLV_IPv4_COM (EIGRP_TLV_IPv4 | EIGRP_TLV_COMMUNITY)
+#define EIGRP_TLV_IPX_INT (EIGRP_TLV_IPX | EIGRP_TLV_INTERNAL)
+#define EIGRP_TLV_IPX_EXT (EIGRP_TLV_IPX | EIGRP_TLV_EXTERNAL)
+#define EIGRP_TLV_IPX_COM (EIGRP_TLV_IPX | EIGRP_TLV_COMMUNITY)
+#define EIGRP_TLV_IPv6_INT (EIGRP_TLV_IPv6 | EIGRP_TLV_INTERNAL)
+#define EIGRP_TLV_IPv6_EXT (EIGRP_TLV_IPv6 | EIGRP_TLV_EXTERNAL)
+#define EIGRP_TLV_IPv6_COM (EIGRP_TLV_IPv6 | EIGRP_TLV_COMMUNITY)
/* Deprecated TLV formats */
-#define EIGRP_TLV_AT_INT (EIGRP_TLV_ATALK | EIGRP_TLV_INTERNAL)
-#define EIGRP_TLV_AT_EXT (EIGRP_TLV_ATALK | EIGRP_TLV_EXTERNAL)
-#define EIGRP_TLV_AT_CBL (EIGRP_TLV_ATALK | 0x04)
-#define EIGRP_TLV_MTR_REQ (EIGRP_TLV_MTR | EIGRP_TLV_REQUEST)
-#define EIGRP_TLV_MTR_INT (EIGRP_TLV_MTR | EIGRP_TLV_INTERNAL)
-#define EIGRP_TLV_MTR_EXT (EIGRP_TLV_MTR | EIGRP_TLV_EXTERNAL)
-#define EIGRP_TLV_MTR_COM (EIGRP_TLV_MTR | EIGRP_TLV_COMMUNITY)
-#define EIGRP_TLV_MTR_TIDLIST (EIGRP_TLV_MTR | 0x0005)
+#define EIGRP_TLV_AT_INT (EIGRP_TLV_ATALK | EIGRP_TLV_INTERNAL)
+#define EIGRP_TLV_AT_EXT (EIGRP_TLV_ATALK | EIGRP_TLV_EXTERNAL)
+#define EIGRP_TLV_AT_CBL (EIGRP_TLV_ATALK | 0x04)
+#define EIGRP_TLV_MTR_REQ (EIGRP_TLV_MTR | EIGRP_TLV_REQUEST)
+#define EIGRP_TLV_MTR_INT (EIGRP_TLV_MTR | EIGRP_TLV_INTERNAL)
+#define EIGRP_TLV_MTR_EXT (EIGRP_TLV_MTR | EIGRP_TLV_EXTERNAL)
+#define EIGRP_TLV_MTR_COM (EIGRP_TLV_MTR | EIGRP_TLV_COMMUNITY)
+#define EIGRP_TLV_MTR_TIDLIST (EIGRP_TLV_MTR | 0x0005)
/* Current "Wide Metric" TLV formats */
-#define EIGRP_TLV_MP_REQ (EIGRP_TLV_MP | EIGRP_TLV_REQUEST)
-#define EIGRP_TLV_MP_INT (EIGRP_TLV_MP | EIGRP_TLV_INTERNAL)
-#define EIGRP_TLV_MP_EXT (EIGRP_TLV_MP | EIGRP_TLV_EXTERNAL)
-#define EIGRP_TLV_MP_COM (EIGRP_TLV_MP | EIGRP_TLV_COMMUNITY)
+#define EIGRP_TLV_MP_REQ (EIGRP_TLV_MP | EIGRP_TLV_REQUEST)
+#define EIGRP_TLV_MP_INT (EIGRP_TLV_MP | EIGRP_TLV_INTERNAL)
+#define EIGRP_TLV_MP_EXT (EIGRP_TLV_MP | EIGRP_TLV_EXTERNAL)
+#define EIGRP_TLV_MP_COM (EIGRP_TLV_MP | EIGRP_TLV_COMMUNITY)
/**
* External routes originate from some other protocol - these are them
*/
-#define NULL_PROTID 0 /*!< unknown protocol */
-#define IGRP1_PROTID 1 /*!< IGRP.. whos your daddy! */
-#define IGRP2_PROTID 2 /*!< EIGRP - Just flat out the best */
-#define STATIC_PROTID 3 /*!< Staticly configured source */
-#define RIP_PROTID 4 /*!< Routing Information Protocol */
-#define HELLO_PROTID 5 /*!< Hello? RFC-891 you there? */
-#define OSPF_PROTID 6 /*!< OSPF - Open Shortest Path First */
-#define ISIS_PROTID 7 /*!< Intermediate System To Intermediate System */
-#define EGP_PROTID 8 /*!< Exterior Gateway Protocol */
-#define BGP_PROTID 9 /*!< Border Gateway Protocol */
-#define IDRP_PROTID 10 /*!< InterDomain Routing Protocol */
-#define CONN_PROTID 11 /*!< Connected source */
+#define NULL_PROTID 0 /*!< unknown protocol */
+#define IGRP1_PROTID 1 /*!< IGRP.. whos your daddy! */
+#define IGRP2_PROTID 2 /*!< EIGRP - Just flat out the best */
+#define STATIC_PROTID 3 /*!< Staticly configured source */
+#define RIP_PROTID 4 /*!< Routing Information Protocol */
+#define HELLO_PROTID 5 /*!< Hello? RFC-891 you there? */
+#define OSPF_PROTID 6 /*!< OSPF - Open Shortest Path First */
+#define ISIS_PROTID 7 /*!< Intermediate System To Intermediate System */
+#define EGP_PROTID 8 /*!< Exterior Gateway Protocol */
+#define BGP_PROTID 9 /*!< Border Gateway Protocol */
+#define IDRP_PROTID 10 /*!< InterDomain Routing Protocol */
+#define CONN_PROTID 11 /*!< Connected source */
/**
*
@@ -178,23 +178,23 @@
* to provide a standards based exchange of AFI information between
* EIGRP routers.
*/
-#define EIGRP_AF_IPv4 1 /*!< IPv4 (IP version 4) */
-#define EIGRP_AF_IPv6 2 /*!< IPv6 (IP version 6) */
-#define EIGRP_AF_IPX 11 /*!< IPX */
-#define EIGRP_AF_ATALK 12 /*!< Appletalk */
-#define EIGRP_SF_COMMON 16384 /*!< Cisco Service Family */
-#define EIGRP_SF_IPv4 16385 /*!< Cisco IPv4 Service Family */
-#define EIGRP_SF_IPv6 16386 /*!< Cisco IPv6 Service Family */
+#define EIGRP_AF_IPv4 1 /*!< IPv4 (IP version 4) */
+#define EIGRP_AF_IPv6 2 /*!< IPv6 (IP version 6) */
+#define EIGRP_AF_IPX 11 /*!< IPX */
+#define EIGRP_AF_ATALK 12 /*!< Appletalk */
+#define EIGRP_SF_COMMON 16384 /*!< Cisco Service Family */
+#define EIGRP_SF_IPv4 16385 /*!< Cisco IPv4 Service Family */
+#define EIGRP_SF_IPv6 16386 /*!< Cisco IPv6 Service Family */
/**
* Authentication types supported by EIGRP
*/
-#define EIGRP_AUTH_TYPE_NONE 0
-#define EIGRP_AUTH_TYPE_TEXT 1
-#define EIGRP_AUTH_TYPE_MD5 2
-#define EIGRP_AUTH_TYPE_MD5_LEN 16
-#define EIGRP_AUTH_TYPE_SHA256 3
-#define EIGRP_AUTH_TYPE_SHA256_LEN 32
+#define EIGRP_AUTH_TYPE_NONE 0
+#define EIGRP_AUTH_TYPE_TEXT 1
+#define EIGRP_AUTH_TYPE_MD5 2
+#define EIGRP_AUTH_TYPE_MD5_LEN 16
+#define EIGRP_AUTH_TYPE_SHA256 3
+#define EIGRP_AUTH_TYPE_SHA256_LEN 32
/**
* opaque flag field definitions
@@ -206,20 +206,20 @@
/**
* pak flag bit field definitions - 0 (none)-7 source priority
*/
-#define EIGRP_PRIV_DEFAULT 0x00 /* 0 (none)-7 source priority */
-#define EIGRP_PRIV_LOW 0x01
-#define EIGRP_PRIV_MEDIUM 0x04
-#define EIGRP_PRIV_HIGH 0x07
+#define EIGRP_PRIV_DEFAULT 0x00 /* 0 (none)-7 source priority */
+#define EIGRP_PRIV_LOW 0x01
+#define EIGRP_PRIV_MEDIUM 0x04
+#define EIGRP_PRIV_HIGH 0x07
/**
* stub bit definitions
*/
-#define EIGRP_PEER_ALLOWS_CONNECTED 0x0001
-#define EIGRP_PEER_ALLOWS_STATIC 0x0002
-#define EIGRP_PEER_ALLOWS_SUMMARY 0x0004
-#define EIGRP_PEER_ALLOWS_REDIST 0x0008
-#define EIGRP_PEER_ALLOWS_LEAKING 0x0010
-#define EIGRP_PEER_ALLOWS_RCVONLY 0x0020
+#define EIGRP_PEER_ALLOWS_CONNECTED 0x0001
+#define EIGRP_PEER_ALLOWS_STATIC 0x0002
+#define EIGRP_PEER_ALLOWS_SUMMARY 0x0004
+#define EIGRP_PEER_ALLOWS_REDIST 0x0008
+#define EIGRP_PEER_ALLOWS_LEAKING 0x0010
+#define EIGRP_PEER_ALLOWS_RCVONLY 0x0020
/*
* Init bit definition. First unicast transmitted Update has this
@@ -280,48 +280,48 @@
* segments 0x0000-0x7fff is for EIGRP and vNets, 0x8000-0xffff is
* for saf and it's associated vNets.
*/
-#define EIGRP_VRID_MASK 0x8001
-#define EIGRP_VRID_AF_BASE 0x0000
-#define EIGRP_VRID_MCAST_BASE 0x0001
-#define EIGRP_VRID_SF_BASE 0x8000
+#define EIGRP_VRID_MASK 0x8001
+#define EIGRP_VRID_AF_BASE 0x0000
+#define EIGRP_VRID_MCAST_BASE 0x0001
+#define EIGRP_VRID_SF_BASE 0x8000
/* Extended Attributes for a destination */
#define EIGRP_ATTR_HDRLEN (2)
#define EIGRP_ATTR_MAXDATA (512)
-#define EIGRP_ATTR_NOOP 0 /*!< No-Op used as offset padding */
-#define EIGRP_ATTR_SCALED 1 /*!< Scaled metric values */
-#define EIGRP_ATTR_TAG 2 /*!< Tag assigned by Admin for dest */
-#define EIGRP_ATTR_COMM 3 /*!< Community attribute for dest */
-#define EIGRP_ATTR_JITTER 4 /*!< Variation in path delay */
-#define EIGRP_ATTR_QENERGY 5 /*!< Non-Active energy usage along path */
-#define EIGRP_ATTR_ENERGY 6 /*!< Active energy usage along path */
+#define EIGRP_ATTR_NOOP 0 /*!< No-Op used as offset padding */
+#define EIGRP_ATTR_SCALED 1 /*!< Scaled metric values */
+#define EIGRP_ATTR_TAG 2 /*!< Tag assigned by Admin for dest */
+#define EIGRP_ATTR_COMM 3 /*!< Community attribute for dest */
+#define EIGRP_ATTR_JITTER 4 /*!< Variation in path delay */
+#define EIGRP_ATTR_QENERGY 5 /*!< Non-Active energy usage along path */
+#define EIGRP_ATTR_ENERGY 6 /*!< Active energy usage along path */
/*
* Begin EIGRP-BGP interoperability communities
*/
-#define EIGRP_EXTCOMM_SOO_ASFMT 0x0003 /* Site-of-Origin, BGP AS format */
-#define EIGRP_EXTCOMM_SOO_ADRFMT 0x0103 /* Site-of-Origin, BGP/EIGRP addr format */
+#define EIGRP_EXTCOMM_SOO_ASFMT 0x0003 /* Site-of-Origin, BGP AS format */
+#define EIGRP_EXTCOMM_SOO_ADRFMT 0x0103 /* Site-of-Origin, BGP/EIGRP addr format */
/*
* EIGRP Specific communities
*/
-#define EIGRP_EXTCOMM_EIGRP 0x8800 /* EIGRP route information appended*/
-#define EIGRP_EXTCOMM_DAD 0x8801 /* EIGRP AS + Delay */
-#define EIGRP_EXTCOMM_VRHB 0x8802 /* EIGRP Vector: Reliability + Hop + BW */
-#define EIGRP_EXTCOMM_SRLM 0x8803 /* EIGRP System: Reserve +Load + MTU */
-#define EIGRP_EXTCOMM_SAR 0x8804 /* EIGRP System: Remote AS + Remote ID */
-#define EIGRP_EXTCOMM_RPM 0x8805 /* EIGRP Remote: Protocol + Metric */
-#define EIGRP_EXTCOMM_VRR 0x8806 /* EIGRP Vecmet: Rsvd + (internal) Routerid */
+#define EIGRP_EXTCOMM_EIGRP 0x8800 /* EIGRP route information appended*/
+#define EIGRP_EXTCOMM_DAD 0x8801 /* EIGRP AS + Delay */
+#define EIGRP_EXTCOMM_VRHB 0x8802 /* EIGRP Vector: Reliability + Hop + BW */
+#define EIGRP_EXTCOMM_SRLM 0x8803 /* EIGRP System: Reserve +Load + MTU */
+#define EIGRP_EXTCOMM_SAR 0x8804 /* EIGRP System: Remote AS + Remote ID */
+#define EIGRP_EXTCOMM_RPM 0x8805 /* EIGRP Remote: Protocol + Metric */
+#define EIGRP_EXTCOMM_VRR 0x8806 /* EIGRP Vecmet: Rsvd + (internal) Routerid */
/* SAF types */
-#define EIGRP_SVCDATA_COMPLETE 0x01 /*!< Data is attached */
-#define EIGRP_SVCDATA_TRIMMED 0x02 /*!< Data was trimmed from service */
+#define EIGRP_SVCDATA_COMPLETE 0x01 /*!< Data is attached */
+#define EIGRP_SVCDATA_TRIMMED 0x02 /*!< Data was trimmed from service */
/* SAF Defined Numbers */
-#define SAF_SERVICE_ID_CAPMAN 100 /*!< Capabilities Manager */
-#define SAF_SERVICE_ID_UC 101 /*!< Unified Communications */
-#define SAF_SERVICE_ID_PFR 102 /*!< Performance Routing */
+#define SAF_SERVICE_ID_CAPMAN 100 /*!< Capabilities Manager */
+#define SAF_SERVICE_ID_UC 101 /*!< Unified Communications */
+#define SAF_SERVICE_ID_PFR 102 /*!< Performance Routing */
/* Forward declaration we need below (if using proto_reg_handoff...
as a prefs callback) */
@@ -509,121 +509,121 @@ static dissector_handle_t ipxsap_handle = NULL;
static dissector_table_t media_type_table = NULL;
static const value_string eigrp_opcode2string[] = {
- { EIGRP_OPC_UPDATE, "Update" },
- { EIGRP_OPC_REQUEST, "Request" },
- { EIGRP_OPC_QUERY, "Query" },
- { EIGRP_OPC_REPLY, "Reply" },
- { EIGRP_OPC_HELLO, "Hello" },
- { EIGRP_OPC_IPXSAP, "IPX/SAP Update" },
- { EIGRP_OPC_PROBE, "Route Probe" },
- { EIGRP_OPC_ACK, "Hello (Ack)" },
- { EIGRP_OPC_STUB, "Stub-Info" },
- { EIGRP_OPC_SIAQUERY, "SIA-Query" },
- { EIGRP_OPC_SIAREPLY, "SIA-Reply" },
+ { EIGRP_OPC_UPDATE, "Update" },
+ { EIGRP_OPC_REQUEST, "Request" },
+ { EIGRP_OPC_QUERY, "Query" },
+ { EIGRP_OPC_REPLY, "Reply" },
+ { EIGRP_OPC_HELLO, "Hello" },
+ { EIGRP_OPC_IPXSAP, "IPX/SAP Update" },
+ { EIGRP_OPC_PROBE, "Route Probe" },
+ { EIGRP_OPC_ACK, "Hello (Ack)" },
+ { EIGRP_OPC_STUB, "Stub-Info" },
+ { EIGRP_OPC_SIAQUERY, "SIA-Query" },
+ { EIGRP_OPC_SIAREPLY, "SIA-Reply" },
{ 0, NULL }
};
static const value_string eigrp_tlv2string[] = {
/* General TLV formats */
- { EIGRP_TLV_PARAMETER, "Parameters"},
- { EIGRP_TLV_AUTH, "Authentication"},
- { EIGRP_TLV_SEQ, "Sequence"},
- { EIGRP_TLV_SW_VERSION, "Software Version"},
- { EIGRP_TLV_NEXT_MCAST_SEQ, "Next multicast sequence"},
- { EIGRP_TLV_PEER_STUBINFO, "Peer Stub Information"},
- { EIGRP_TLV_PEER_TERMINATION, "Peer Termination"},
- { EIGRP_TLV_PEER_TIDLIST, "Peer Topology ID List"},
+ { EIGRP_TLV_PARAMETER, "Parameters"},
+ { EIGRP_TLV_AUTH, "Authentication"},
+ { EIGRP_TLV_SEQ, "Sequence"},
+ { EIGRP_TLV_SW_VERSION, "Software Version"},
+ { EIGRP_TLV_NEXT_MCAST_SEQ, "Next multicast sequence"},
+ { EIGRP_TLV_PEER_STUBINFO, "Peer Stub Information"},
+ { EIGRP_TLV_PEER_TERMINATION, "Peer Termination"},
+ { EIGRP_TLV_PEER_TIDLIST, "Peer Topology ID List"},
/* Legacy TLV formats */
- { EIGRP_TLV_IPv4_INT, "Internal Route(IPv4)"},
- { EIGRP_TLV_IPv4_EXT, "External Route(IPv4)"},
- { EIGRP_TLV_IPv4_COM, "Ext-Community(IPv4)"},
- { EIGRP_TLV_IPv6_INT, "Internal Route(IPv6)"},
- { EIGRP_TLV_IPv6_EXT, "External Route(IPv6)"},
- { EIGRP_TLV_IPv6_COM, "Ext-Community(IPv6)"},
- { EIGRP_TLV_IPX_INT, "IPX Internal Route(IPX)"},
- { EIGRP_TLV_IPX_EXT, "IPX External Route(IPX)"},
+ { EIGRP_TLV_IPv4_INT, "Internal Route(IPv4)"},
+ { EIGRP_TLV_IPv4_EXT, "External Route(IPv4)"},
+ { EIGRP_TLV_IPv4_COM, "Ext-Community(IPv4)"},
+ { EIGRP_TLV_IPv6_INT, "Internal Route(IPv6)"},
+ { EIGRP_TLV_IPv6_EXT, "External Route(IPv6)"},
+ { EIGRP_TLV_IPv6_COM, "Ext-Community(IPv6)"},
+ { EIGRP_TLV_IPX_INT, "IPX Internal Route(IPX)"},
+ { EIGRP_TLV_IPX_EXT, "IPX External Route(IPX)"},
/* Deprecated TLV formats */
- { EIGRP_TLV_AT_INT, "Internal Route(ATALK)"},
- { EIGRP_TLV_AT_EXT, "External Route(ATALK)"},
- { EIGRP_TLV_AT_CBL, "Cable Configuration(ATALK)"},
- { EIGRP_TLV_MTR_REQ, "Request(MTR)"},
- { EIGRP_TLV_MTR_INT, "Internal Route(MTR)"},
- { EIGRP_TLV_MTR_EXT, "External Route(MTR)"},
- { EIGRP_TLV_MTR_COM, "Ext-Community(MTR)"},
- { EIGRP_TLV_MTR_TIDLIST, "TopologyID List"},
+ { EIGRP_TLV_AT_INT, "Internal Route(ATALK)"},
+ { EIGRP_TLV_AT_EXT, "External Route(ATALK)"},
+ { EIGRP_TLV_AT_CBL, "Cable Configuration(ATALK)"},
+ { EIGRP_TLV_MTR_REQ, "Request(MTR)"},
+ { EIGRP_TLV_MTR_INT, "Internal Route(MTR)"},
+ { EIGRP_TLV_MTR_EXT, "External Route(MTR)"},
+ { EIGRP_TLV_MTR_COM, "Ext-Community(MTR)"},
+ { EIGRP_TLV_MTR_TIDLIST, "TopologyID List"},
/* Current "Wide Metric" TLV formats */
- { EIGRP_TLV_MP_REQ, "Request"},
- { EIGRP_TLV_MP_INT, "Internal Route"},
- { EIGRP_TLV_MP_EXT, "External Route"},
- { EIGRP_TLV_MP_COM, "Ext-Community"},
+ { EIGRP_TLV_MP_REQ, "Request"},
+ { EIGRP_TLV_MP_INT, "Internal Route"},
+ { EIGRP_TLV_MP_EXT, "External Route"},
+ { EIGRP_TLV_MP_COM, "Ext-Community"},
{ 0, NULL}
};
static const value_string eigrp_proto2string[] = {
- { IGRP1_PROTID, "IGRP"},
- { IGRP2_PROTID, "EIGRP"},
- { STATIC_PROTID, "Static Route"},
- { RIP_PROTID, "RIP"},
- { HELLO_PROTID, "Hello"},
- { OSPF_PROTID, "OSPF"},
- { ISIS_PROTID, "IS-IS"},
- { EGP_PROTID, "EGP"},
- { BGP_PROTID, "BGP"},
- { IDRP_PROTID, "IDRP"},
- { CONN_PROTID, "Connected Route"},
+ { IGRP1_PROTID, "IGRP"},
+ { IGRP2_PROTID, "EIGRP"},
+ { STATIC_PROTID, "Static Route"},
+ { RIP_PROTID, "RIP"},
+ { HELLO_PROTID, "Hello"},
+ { OSPF_PROTID, "OSPF"},
+ { ISIS_PROTID, "IS-IS"},
+ { EGP_PROTID, "EGP"},
+ { BGP_PROTID, "BGP"},
+ { IDRP_PROTID, "IDRP"},
+ { CONN_PROTID, "Connected Route"},
{ 0, NULL}
};
static const value_string eigrp_auth2string[] = {
- { EIGRP_AUTH_TYPE_TEXT, "TEXT"},
- { EIGRP_AUTH_TYPE_MD5, "MD5"},
- { EIGRP_AUTH_TYPE_SHA256, "SHA256"},
+ { EIGRP_AUTH_TYPE_TEXT, "TEXT"},
+ { EIGRP_AUTH_TYPE_MD5, "MD5"},
+ { EIGRP_AUTH_TYPE_SHA256, "SHA256"},
{ 0, NULL},
};
static const value_string eigrp_vrid2string[] = {
- { EIGRP_VRID_AF_BASE, "(Address-Family)"},
- { EIGRP_VRID_SF_BASE, "(Service-Family)"},
- { EIGRP_VRID_MCAST_BASE, "(Multi-Cast)"},
+ { EIGRP_VRID_AF_BASE, "(Address-Family)"},
+ { EIGRP_VRID_SF_BASE, "(Service-Family)"},
+ { EIGRP_VRID_MCAST_BASE, "(Multi-Cast)"},
{ -1, NULL}
};
static const value_string eigrp_afi2string[] = {
- { EIGRP_AF_IPv4, "IPv4"},
- { EIGRP_AF_IPv6, "IPv6"},
- { EIGRP_AF_IPX, "IPX"},
- { EIGRP_AF_ATALK, "Appletalk"},
- { EIGRP_SF_COMMON, "Service Family"},
- { EIGRP_SF_IPv4, "IPv4 Service Family"},
- { EIGRP_SF_IPv6, "IPv6 Service Family"},
+ { EIGRP_AF_IPv4, "IPv4"},
+ { EIGRP_AF_IPv6, "IPv6"},
+ { EIGRP_AF_IPX, "IPX"},
+ { EIGRP_AF_ATALK, "Appletalk"},
+ { EIGRP_SF_COMMON, "Service Family"},
+ { EIGRP_SF_IPv4, "IPv4 Service Family"},
+ { EIGRP_SF_IPv6, "IPv6 Service Family"},
{ -1, NULL}
};
static const value_string eigrp_attr_opcode2string[] = {
- { EIGRP_ATTR_NOOP, "NO-OP for padding"},
- { EIGRP_ATTR_SCALED, "Scaled Metric"},
- { EIGRP_ATTR_TAG, "Admin Tag"},
- { EIGRP_ATTR_COMM, "Community"},
- { EIGRP_ATTR_JITTER, "Jitter"},
- { EIGRP_ATTR_QENERGY, "Non-Active energy"},
- { EIGRP_ATTR_ENERGY, "Active energy"},
+ { EIGRP_ATTR_NOOP, "NO-OP for padding"},
+ { EIGRP_ATTR_SCALED, "Scaled Metric"},
+ { EIGRP_ATTR_TAG, "Admin Tag"},
+ { EIGRP_ATTR_COMM, "Community"},
+ { EIGRP_ATTR_JITTER, "Jitter"},
+ { EIGRP_ATTR_QENERGY, "Non-Active energy"},
+ { EIGRP_ATTR_ENERGY, "Active energy"},
{ 0, NULL}
};
static const value_string eigrp_saf_type2string[] = {
- { EIGRP_SVCDATA_COMPLETE, "Attached Service Data"},
- { EIGRP_SVCDATA_TRIMMED, "Trimmed Service Data"},
+ { EIGRP_SVCDATA_COMPLETE, "Attached Service Data"},
+ { EIGRP_SVCDATA_TRIMMED, "Trimmed Service Data"},
{ 0, NULL}
};
static const value_string eigrp_saf_srv2string[] = {
- { SAF_SERVICE_ID_CAPMAN, "Capabilities Manager"},
- { SAF_SERVICE_ID_UC, "Unified Communications"},
- { SAF_SERVICE_ID_PFR, "Performance Routing"},
+ { SAF_SERVICE_ID_CAPMAN, "Capabilities Manager"},
+ { SAF_SERVICE_ID_UC, "Unified Communications"},
+ { SAF_SERVICE_ID_PFR, "Performance Routing"},
{ 0, NULL}
};
@@ -631,10 +631,10 @@ static const value_string eigrp_saf_srv2string[] = {
*@fn void dissect_eigrp_parameter (proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
*
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] pinfo general data about the protocol
- * @param[in] ti protocol item
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] pinfo general data about the protocol
+ * @param[in] ti protocol item
*
* @return void
*
@@ -648,9 +648,9 @@ static const value_string eigrp_saf_srv2string[] = {
*/
static void
dissect_eigrp_parameter (proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
- proto_item *ti)
+ proto_item *ti)
{
- int offset = 0;
+ int offset = 0;
guint8 k1, k2, k3, k4, k5;
k1 = tvb_get_guint8(tvb, offset);
@@ -679,20 +679,20 @@ dissect_eigrp_parameter (proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
proto_tree_add_item(tree, hf_eigrp_par_holdtime, tvb, offset, 2, ENC_BIG_ENDIAN);
if (k1 == 255 && k2 == 255 && k3 == 255 && k4 == 255 && k5 == 255) {
- proto_item_append_text(ti, ": Peer Termination");
- expert_add_info_format(pinfo, ti, PI_RESPONSE_CODE, PI_NOTE,
- "Peer Termination");
+ proto_item_append_text(ti, ": Peer Termination");
+ expert_add_info_format(pinfo, ti, PI_RESPONSE_CODE, PI_NOTE,
+ "Peer Termination");
}
}
/**
*@fn void dissect_eigrp_auth_tlv (proto_tree *tree, tvbuff_t *tvb,
- * packet_info *pinfo, proto_item *ti)
+ * packet_info *pinfo, proto_item *ti)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] pinfo general data about the protocol
- * @param[in] ti protocol item
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] pinfo general data about the protocol
+ * @param[in] ti protocol item
*
* @return void
*
@@ -704,11 +704,11 @@ dissect_eigrp_parameter (proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
*/
static void
dissect_eigrp_auth_tlv (proto_tree *tree, tvbuff_t *tvb,
- packet_info *pinfo, proto_item *ti)
+ packet_info *pinfo, proto_item *ti)
{
proto_item *ti_auth_type, *ti_auth_len;
- int offset = 0;
- guint16 auth_type, auth_len;
+ int offset = 0;
+ guint16 auth_type, auth_len;
/* print out what family we dealing with... */
@@ -730,42 +730,42 @@ dissect_eigrp_auth_tlv (proto_tree *tree, tvbuff_t *tvb,
switch (auth_type) {
case EIGRP_AUTH_TYPE_MD5:
- if (EIGRP_AUTH_TYPE_MD5_LEN != auth_len) {
- expert_add_info_format(pinfo, ti_auth_len, PI_UNDECODED, PI_WARN,
- "Invalid auth len %u:", auth_len);
- } else {
- proto_tree_add_item(tree, hf_eigrp_auth_digest, tvb, offset,
- EIGRP_AUTH_TYPE_MD5_LEN, ENC_NA);
- }
- break;
+ if (EIGRP_AUTH_TYPE_MD5_LEN != auth_len) {
+ expert_add_info_format(pinfo, ti_auth_len, PI_UNDECODED, PI_WARN,
+ "Invalid auth len %u:", auth_len);
+ } else {
+ proto_tree_add_item(tree, hf_eigrp_auth_digest, tvb, offset,
+ EIGRP_AUTH_TYPE_MD5_LEN, ENC_NA);
+ }
+ break;
case EIGRP_AUTH_TYPE_SHA256:
- if (EIGRP_AUTH_TYPE_SHA256_LEN != auth_len) {
- expert_add_info_format(pinfo, ti_auth_len, PI_UNDECODED, PI_WARN,
- "Invalid auth len %u:", auth_len);
+ if (EIGRP_AUTH_TYPE_SHA256_LEN != auth_len) {
+ expert_add_info_format(pinfo, ti_auth_len, PI_UNDECODED, PI_WARN,
+ "Invalid auth len %u:", auth_len);
- } else {
- proto_tree_add_item(tree, hf_eigrp_auth_digest, tvb, offset,
- EIGRP_AUTH_TYPE_SHA256_LEN, ENC_NA);
- }
- break;
+ } else {
+ proto_tree_add_item(tree, hf_eigrp_auth_digest, tvb, offset,
+ EIGRP_AUTH_TYPE_SHA256_LEN, ENC_NA);
+ }
+ break;
case EIGRP_AUTH_TYPE_NONE:
case EIGRP_AUTH_TYPE_TEXT:
default:
- expert_add_info_format(pinfo, ti_auth_type, PI_UNDECODED, PI_WARN,
- "Invalid auth type %u:", auth_type);
- break;
+ expert_add_info_format(pinfo, ti_auth_type, PI_UNDECODED, PI_WARN,
+ "Invalid auth type %u:", auth_type);
+ break;
}
}
/**
*@fn void dissect_eigrp_seq_tlv (proto_tree *tree, tvbuff_t *tvb,
- * packet_info *pinfo)
+ * packet_info *pinfo)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] pinfo general data about the protocol
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] pinfo general data about the protocol
*
* @return void
*
@@ -775,11 +775,11 @@ dissect_eigrp_auth_tlv (proto_tree *tree, tvbuff_t *tvb,
*/
static void
dissect_eigrp_seq_tlv (proto_tree *tree, tvbuff_t *tvb,
- packet_info *pinfo)
+ packet_info *pinfo)
{
proto_item *ti_addrlen;
- int offset = 0;
- guint8 addr_len;
+ int offset = 0;
+ guint8 addr_len;
addr_len = tvb_get_guint8(tvb, 0);
ti_addrlen = proto_tree_add_item(tree, hf_eigrp_seq_addrlen, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -787,34 +787,34 @@ dissect_eigrp_seq_tlv (proto_tree *tree, tvbuff_t *tvb,
switch (addr_len) {
case 4:
- /* IPv4 */
- proto_tree_add_item(tree, hf_eigrp_seq_ipv4addr, tvb, offset, addr_len, ENC_BIG_ENDIAN);
- break;
+ /* IPv4 */
+ proto_tree_add_item(tree, hf_eigrp_seq_ipv4addr, tvb, offset, addr_len, ENC_BIG_ENDIAN);
+ break;
case 10:
- /* IPX */
- proto_tree_add_text(tree, tvb, offset, addr_len,
- "IPX Address = %08x.%04x.%04x.%04x",
- tvb_get_ntohl(tvb, 1), tvb_get_ntohs(tvb, 5),
- tvb_get_ntohs(tvb, 7), tvb_get_ntohs(tvb, 9));
- break;
+ /* IPX */
+ proto_tree_add_text(tree, tvb, offset, addr_len,
+ "IPX Address = %08x.%04x.%04x.%04x",
+ tvb_get_ntohl(tvb, 1), tvb_get_ntohs(tvb, 5),
+ tvb_get_ntohs(tvb, 7), tvb_get_ntohs(tvb, 9));
+ break;
case 16:
- /* IPv6 */
- proto_tree_add_item(tree, hf_eigrp_seq_ipv6addr, tvb, offset, addr_len,
- ENC_NA);
- break;
+ /* IPv6 */
+ proto_tree_add_item(tree, hf_eigrp_seq_ipv6addr, tvb, offset, addr_len,
+ ENC_NA);
+ break;
default:
- expert_add_info_format(pinfo, ti_addrlen, PI_MALFORMED, PI_ERROR,
- "Invalid address length");
+ expert_add_info_format(pinfo, ti_addrlen, PI_MALFORMED, PI_ERROR,
+ "Invalid address length");
}
}
/**
*@fn void dissect_eigrp_sw_version (tvbuff_t *tvb, proto_tree *tree,
- * proto_item *ti)
+ * proto_item *ti)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] ti protocol item
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] ti protocol item
*
* @return void
*
@@ -826,34 +826,34 @@ dissect_eigrp_seq_tlv (proto_tree *tree, tvbuff_t *tvb,
*/
static void
dissect_eigrp_sw_version (tvbuff_t *tvb, proto_tree *tree,
- proto_item *ti)
+ proto_item *ti)
{
- int offset = 0;
+ int offset = 0;
guint8 ios_rel_major, ios_rel_minor;
guint8 eigrp_rel_major, eigrp_rel_minor;
ios_rel_major = tvb_get_guint8(tvb, 0);
ios_rel_minor = tvb_get_guint8(tvb, 1);
proto_tree_add_text(tree, tvb, offset, 2, "EIGRP Release: %u.%u",
- ios_rel_major, ios_rel_minor);
+ ios_rel_major, ios_rel_minor);
offset += 2;
proto_item_append_text(ti, ": EIGRP=%u.%u", ios_rel_major, ios_rel_minor);
eigrp_rel_major = tvb_get_guint8(tvb, 2);
eigrp_rel_minor = tvb_get_guint8(tvb, 3);
proto_tree_add_text(tree,tvb,offset, 2, "EIGRP TLV version: %u.%u",
- eigrp_rel_major, eigrp_rel_minor);
+ eigrp_rel_major, eigrp_rel_minor);
proto_item_append_text(ti, ", TLV=%u.%u",
- eigrp_rel_major, eigrp_rel_minor);
+ eigrp_rel_major, eigrp_rel_minor);
}
/**
*@fn void dissect_eigrp_next_mcast_seq (tvbuff_t *tvb, proto_tree *tree,
- * proto_item *ti)
+ * proto_item *ti)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] ti protocol item
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] ti protocol item
*
* @return void
*
@@ -865,10 +865,10 @@ dissect_eigrp_sw_version (tvbuff_t *tvb, proto_tree *tree,
*/
static void
dissect_eigrp_next_mcast_seq (tvbuff_t *tvb, proto_tree *tree,
- proto_item *ti)
+ proto_item *ti)
{
proto_tree_add_item(tree, hf_eigrp_next_mcast_seq, tvb, 0, 4,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_item_append_text(ti, ": %u", tvb_get_ntohl(tvb, 0));
}
@@ -876,10 +876,10 @@ dissect_eigrp_next_mcast_seq (tvbuff_t *tvb, proto_tree *tree,
*@fn void dissect_eigrp_peer_stubinfo (tvbuff_t *tvb, proto_tree *tree)
*
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] pinfo general data about the protocol
- * @param[in] ti protocol item
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] pinfo general data about the protocol
+ * @param[in] ti protocol item
* @param[out] None
*
* @return void
@@ -892,14 +892,14 @@ static void
dissect_eigrp_peer_stubinfo (tvbuff_t *tvb, proto_tree *tree)
{
proto_tree_add_bitmask(tree, tvb, 0, hf_eigrp_stub_flags, ett_eigrp_stub_flags,
- eigrp_stub_flag_fields, ENC_BIG_ENDIAN);
+ eigrp_stub_flag_fields, ENC_BIG_ENDIAN);
}
/**
*@fn void dissect_eigrp_peer_termination (packet_info *pinfo, proto_item *ti)
*
- * @param[in] pinfo general data about the protocol
- * @param[in] ti protocol item
+ * @param[in] pinfo general data about the protocol
+ * @param[in] ti protocol item
* @param[out] None
*
* @return void
@@ -917,8 +917,8 @@ dissect_eigrp_peer_termination (packet_info *pinfo, proto_item *ti)
/**
*@fn void dissect_eigrp_peer_tidlist (proto_tree *tree, tvbuff_t *tvb)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
*
* @return void
*
@@ -940,35 +940,35 @@ static void
dissect_eigrp_peer_tidlist (proto_tree *tree, tvbuff_t *tvb)
{
proto_item *sub_ti;
- int offset = 0;
- guint16 size, tid ;
+ int offset = 0;
+ guint16 size, tid ;
proto_tree_add_item(tree, hf_eigrp_tidlist_flags, tvb, offset, 2,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
offset += 2;
size = tvb_get_ntohs(tvb, offset) / 2;
proto_tree_add_item(tree, hf_eigrp_tidlist_len, tvb, offset, 2,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
offset += 2;
sub_ti = proto_tree_add_item(tree, hf_eigrp_tidlist, tvb, offset,
- (size * 2), ENC_BIG_ENDIAN);
+ (size * 2), ENC_BIG_ENDIAN);
for (; size ; size--) {
- tid = tvb_get_ntohs(tvb, offset);
- proto_item_append_text(sub_ti, " %u", tid);
- offset += 2;
+ tid = tvb_get_ntohs(tvb, offset);
+ proto_item_append_text(sub_ti, " %u", tid);
+ offset += 2;
}
}
/**
*@fn int dissect_eigrp_extdata_flags (proto_tree *tree, tvbuff_t *tvb, int offset)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] offset current byte offset in packet being processed
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] offset current byte offset in packet being processed
*
- * @return int number of bytes process
+ * @return int number of bytes process
*
* @par
* Dissect the Flags field in the external data section of an external
@@ -987,17 +987,17 @@ dissect_eigrp_extdata_flags (proto_tree *tree, tvbuff_t *tvb, int offset)
{
proto_item *sub_ti;
proto_tree *sub_tree;
- tvbuff_t *sub_tvb;
+ tvbuff_t *sub_tvb;
/* Decode the route flags field */
sub_ti = proto_tree_add_text(tree, tvb, offset, 1, "External Flags");
sub_tree = proto_item_add_subtree(sub_ti, ett_eigrp_extdata_flags);
- sub_tvb = tvb_new_subset(tvb, offset, 1, -1);
+ sub_tvb = tvb_new_subset_remaining(tvb, offset);
proto_tree_add_item(sub_tree, hf_eigrp_extdata_flag_ext, sub_tvb, 0, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item(sub_tree, hf_eigrp_extdata_flag_cd, sub_tvb, 0, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
offset += 1;
return(offset);
@@ -1006,12 +1006,12 @@ dissect_eigrp_extdata_flags (proto_tree *tree, tvbuff_t *tvb, int offset)
/**
*@fn int dissect_eigrp_metric_flags (proto_tree *tree, tvbuff_t *tvb, int offset, int limit)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] offset current byte offset in packet being processed
- * @param[in] limit maximum number of bytes which can be process
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] offset current byte offset in packet being processed
+ * @param[in] limit maximum number of bytes which can be process
*
- * @return int number of bytes process
+ * @return int number of bytes process
*
* @par
* Dissect Protocol Dependent Module (PDM) Flags field in the route metric
@@ -1033,7 +1033,7 @@ dissect_eigrp_metric_flags (proto_tree *tree, tvbuff_t *tvb, int offset, int lim
{
proto_item *sub_ti;
proto_tree *sub_tree;
- tvbuff_t *sub_tvb;
+ tvbuff_t *sub_tvb;
/* Decode the route flags field */
sub_ti = proto_tree_add_text(tree, tvb, offset, limit, "Flags");
@@ -1042,11 +1042,11 @@ dissect_eigrp_metric_flags (proto_tree *tree, tvbuff_t *tvb, int offset, int lim
/* just care about 'flags' byte, there are no MP flags for now */
proto_tree_add_item(sub_tree, hf_eigrp_metric_flags_srcwd, sub_tvb, 0, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item(sub_tree, hf_eigrp_metric_flags_active, sub_tvb, 0, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
proto_tree_add_item(sub_tree, hf_eigrp_metric_flags_repl, sub_tvb, 0, 1,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
offset += limit;
return(offset);
@@ -1054,149 +1054,149 @@ dissect_eigrp_metric_flags (proto_tree *tree, tvbuff_t *tvb, int offset, int lim
/**
*@fn int dissect_eigrp_ipv4_addr (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
- * packet_info *pinfo, int offset, int unreachable)
+ * packet_info *pinfo, int offset, int unreachable)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] pinfo general data about the protocol
- * @param[in] offset current byte offset in packet being processed
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] pinfo general data about the protocol
+ * @param[in] offset current byte offset in packet being processed
*
- * @return int number of bytes process
+ * @return int number of bytes process
*
* @par
* Dissect all IPv4 address from offset though the end of the packet
*/
static int
dissect_eigrp_ipv4_addr (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
- packet_info *pinfo, int offset, int unreachable)
+ packet_info *pinfo, int offset, int unreachable)
{
- guint8 ip_addr[4], length;
- int addr_len;
+ guint8 ip_addr[4], length;
+ int addr_len;
proto_item *ti_prefixlen, *ti_dst;
- int first = TRUE;
+ int first = TRUE;
for (; tvb_length_remaining(tvb, offset) > 0; offset += (1 + addr_len)) {
- length = tvb_get_guint8(tvb, offset);
- addr_len = ipv4_addr_and_mask(tvb, offset + 1, ip_addr, length);
-
- if (addr_len < 0) {
- ti_prefixlen = proto_tree_add_item(tree, hf_eigrp_ipv4_prefixlen,
- tvb, offset, 1, ENC_BIG_ENDIAN);
- expert_add_info_format(pinfo, ti_prefixlen, PI_UNDECODED, PI_WARN,
- "Invalid prefix length %u, must be <= 32",
- length);
- addr_len = 4; /* assure we can exit the loop */
-
- } else {
- proto_tree_add_item(tree, hf_eigrp_ipv4_prefixlen, tvb, offset, 1,
- ENC_BIG_ENDIAN);
- offset += 1;
- ti_dst = proto_tree_add_text(tree, tvb, offset, addr_len,
- "Destination: %s", ip_to_str(ip_addr));
-
- /* add it to the top level line */
- proto_item_append_text(ti," %c %s/%u", first ? '=':',',
- ip_to_str(ip_addr), length);
-
- if (unreachable) {
- expert_add_info_format(pinfo, ti_dst, PI_RESPONSE_CODE, PI_NOTE, "Unreachable");
- }
- }
- first = FALSE;
+ length = tvb_get_guint8(tvb, offset);
+ addr_len = ipv4_addr_and_mask(tvb, offset + 1, ip_addr, length);
+
+ if (addr_len < 0) {
+ ti_prefixlen = proto_tree_add_item(tree, hf_eigrp_ipv4_prefixlen,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ expert_add_info_format(pinfo, ti_prefixlen, PI_UNDECODED, PI_WARN,
+ "Invalid prefix length %u, must be <= 32",
+ length);
+ addr_len = 4; /* assure we can exit the loop */
+
+ } else {
+ proto_tree_add_item(tree, hf_eigrp_ipv4_prefixlen, tvb, offset, 1,
+ ENC_BIG_ENDIAN);
+ offset += 1;
+ ti_dst = proto_tree_add_text(tree, tvb, offset, addr_len,
+ "Destination: %s", ip_to_str(ip_addr));
+
+ /* add it to the top level line */
+ proto_item_append_text(ti," %c %s/%u", first ? '=':',',
+ ip_to_str(ip_addr), length);
+
+ if (unreachable) {
+ expert_add_info_format(pinfo, ti_dst, PI_RESPONSE_CODE, PI_NOTE, "Unreachable");
+ }
+ }
+ first = FALSE;
}
return (offset);
}
/**
*@fn int dissect_eigrp_ipv6_addr (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
- * packet_info *pinfo, int offset, int unreachable)
+ * packet_info *pinfo, int offset, int unreachable)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] pinfo general data about the protocol
- * @param[in] offset current byte offset in packet being processed
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] pinfo general data about the protocol
+ * @param[in] offset current byte offset in packet being processed
*
- * @return int number of bytes process
+ * @return int number of bytes process
*
* @par
* Dissect all IPv6 address from offset though the end of the packet
*/
static int
dissect_eigrp_ipv6_addr (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
- packet_info *pinfo, int offset, int unreachable)
+ packet_info *pinfo, int offset, int unreachable)
{
- guint8 length;
- int addr_len;
- struct e_in6_addr addr;
- proto_item *ti_prefixlen, *ti_dst;
- int first = TRUE;
+ guint8 length;
+ int addr_len;
+ struct e_in6_addr addr;
+ proto_item *ti_prefixlen, *ti_dst;
+ int first = TRUE;
for (; tvb_length_remaining(tvb, offset) > 0; offset += (1 + addr_len)) {
- length = tvb_get_guint8(tvb, offset);
- addr_len = ipv6_addr_and_mask(tvb, offset + 1, &addr, length);
-
- if (addr_len < 0) {
- ti_prefixlen = proto_tree_add_item(tree, hf_eigrp_ipv6_prefixlen,
- tvb, offset, 1, ENC_BIG_ENDIAN);
- expert_add_info_format(pinfo, ti_prefixlen, PI_UNDECODED, PI_WARN,
- "Invalid prefix length %u, must be <= 128",
- length);
- addr_len = 16; /* assure we can exit the loop */
- } else {
- proto_tree_add_item(tree, hf_eigrp_ipv6_prefixlen, tvb, offset, 1,
- ENC_BIG_ENDIAN);
- offset += 1;
-
- if ((length < 128) && (length % 8 == 0)) {
- addr_len++;
- }
-
- ti_dst = proto_tree_add_text(tree, tvb, offset, addr_len,
- "Destination: %s", ip6_to_str(&addr));
-
- /* add it to the top level line */
- proto_item_append_text(ti," %c %s/%u", first ? '=':',',
- ip6_to_str(&addr), length);
-
- if (unreachable) {
- expert_add_info_format(pinfo, ti_dst, PI_RESPONSE_CODE, PI_NOTE, "Unreachable");
- }
- }
- first = FALSE;
+ length = tvb_get_guint8(tvb, offset);
+ addr_len = ipv6_addr_and_mask(tvb, offset + 1, &addr, length);
+
+ if (addr_len < 0) {
+ ti_prefixlen = proto_tree_add_item(tree, hf_eigrp_ipv6_prefixlen,
+ tvb, offset, 1, ENC_BIG_ENDIAN);
+ expert_add_info_format(pinfo, ti_prefixlen, PI_UNDECODED, PI_WARN,
+ "Invalid prefix length %u, must be <= 128",
+ length);
+ addr_len = 16; /* assure we can exit the loop */
+ } else {
+ proto_tree_add_item(tree, hf_eigrp_ipv6_prefixlen, tvb, offset, 1,
+ ENC_BIG_ENDIAN);
+ offset += 1;
+
+ if ((length < 128) && (length % 8 == 0)) {
+ addr_len++;
+ }
+
+ ti_dst = proto_tree_add_text(tree, tvb, offset, addr_len,
+ "Destination: %s", ip6_to_str(&addr));
+
+ /* add it to the top level line */
+ proto_item_append_text(ti," %c %s/%u", first ? '=':',',
+ ip6_to_str(&addr), length);
+
+ if (unreachable) {
+ expert_add_info_format(pinfo, ti_dst, PI_RESPONSE_CODE, PI_NOTE, "Unreachable");
+ }
+ }
+ first = FALSE;
}
return(offset);
}
/**
*@fn int dissect_eigrp_ipx_addr (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
- * packet_info *pinfo, int offset, int unreachable)
+ * packet_info *pinfo, int offset, int unreachable)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] pinfo general data about the protocol
- * @param[in] offset current byte offset in packet being processed
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] pinfo general data about the protocol
+ * @param[in] offset current byte offset in packet being processed
*
- * @return int number of bytes process
+ * @return int number of bytes process
*
* @par
* Dissect all IPX address from offset though the end of the packet
*/
static int
dissect_eigrp_ipx_addr (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
- packet_info *pinfo, int offset, int unreachable)
+ packet_info *pinfo, int offset, int unreachable)
{
proto_item *ti_dst;
ti_dst = proto_tree_add_item(tree, hf_eigrp_ipx_dest, tvb, offset, 4,
- ENC_NA);
+ ENC_NA);
/* add it to the top level line */
proto_item_append_text(ti," = %s",
- ipxnet_to_string(tvb_get_ptr(tvb, offset, 4)));
+ ipxnet_to_string(tvb_get_ptr(tvb, offset, 4)));
if (unreachable) {
- expert_add_info_format(pinfo, ti_dst, PI_RESPONSE_CODE, PI_NOTE,
- "Unreachable");
+ expert_add_info_format(pinfo, ti_dst, PI_RESPONSE_CODE, PI_NOTE,
+ "Unreachable");
}
offset +=4;
@@ -1205,15 +1205,15 @@ dissect_eigrp_ipx_addr (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
/**
*@fn int dissect_eigrp_service (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
- * packet_info *pinfo, int offset)
+ * packet_info *pinfo, int offset)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] pinfo general data about the protocol
- * @param[in] ti protocol item
- * @param[in] offset current byte offset in packet being processed
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] pinfo general data about the protocol
+ * @param[in] ti protocol item
+ * @param[in] offset current byte offset in packet being processed
*
- * @return int number of bytes process
+ * @return int number of bytes process
*
* @par
* Dissect all SAF Services from offset though the end of the packet. The
@@ -1252,14 +1252,14 @@ dissect_eigrp_ipx_addr (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
*/
static int
dissect_eigrp_service (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
- packet_info *pinfo, int offset)
+ packet_info *pinfo, int offset)
{
- int afi, length, remaining;
- int sub_offset;
+ int afi, length, remaining;
+ int sub_offset;
proto_item *sub_ti, *reach_ti;
proto_tree *sub_tree, *reach_tree;
- tvbuff_t *sub_tvb, *reach_tvb;
- guint16 service, sub_service;
+ tvbuff_t *sub_tvb, *reach_tvb;
+ guint16 service, sub_service;
remaining = tvb_length_remaining(tvb, offset);
sub_ti = proto_tree_add_text(tree, tvb, offset, remaining, "SAF Service ");
@@ -1268,97 +1268,97 @@ dissect_eigrp_service (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
sub_offset = 0;
for (; tvb_length_remaining(sub_tvb, sub_offset) > 0; ) {
- service = tvb_get_ntohs(sub_tvb, sub_offset);
- proto_item_append_text(sub_ti, "%c %s", (sub_offset == 0 ? '=':','),
- val_to_str(service, eigrp_saf_srv2string, ""));
-
- sub_service = tvb_get_ntohs(sub_tvb, sub_offset+2);
- proto_item_append_text(ti, "%c %u:%u", (sub_offset == 0 ? '=':','),
- service, sub_service);
-
- proto_tree_add_item(sub_tree, hf_eigrp_saf_service, sub_tvb,
- sub_offset, 2, ENC_BIG_ENDIAN);
- sub_offset += 2;
- proto_tree_add_item(sub_tree, hf_eigrp_saf_subservice, sub_tvb,
- sub_offset, 2, ENC_BIG_ENDIAN);
- sub_offset += 2;
- proto_tree_add_item(sub_tree, hf_eigrp_saf_guid, sub_tvb,
- sub_offset, GUID_LEN, ENC_BIG_ENDIAN);
- sub_offset += GUID_LEN;
-
- proto_tree_add_item(sub_tree, hf_eigrp_saf_data_type, sub_tvb,
- sub_offset, 2, ENC_BIG_ENDIAN);
- sub_offset += 2;
- length = tvb_get_ntohs(sub_tvb, sub_offset);
- proto_tree_add_item(sub_tree, hf_eigrp_saf_data_length, sub_tvb,
- sub_offset, 2, ENC_BIG_ENDIAN);
- sub_offset += 2;
-
- /*
- * Reachability information
- */
- reach_ti = proto_tree_add_text(sub_tree, sub_tvb, sub_offset, 22,
- "Reachability");
- reach_tree = proto_item_add_subtree(reach_ti, ett_eigrp_saf_reachability);
- reach_tvb = tvb_new_subset(sub_tvb, sub_offset, 22, -1);
-
- afi = tvb_get_ntohs(reach_tvb, 0);
- proto_tree_add_item(reach_tree, hf_eigrp_saf_reachability_afi,
- reach_tvb, 0, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(reach_tree, hf_eigrp_saf_reachability_port,
- reach_tvb, 2, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(reach_tree, hf_eigrp_saf_reachability_protocol,
- reach_tvb, 4, 2, ENC_BIG_ENDIAN);
-
- switch (afi) {
- case EIGRP_AF_IPv4:
- proto_tree_add_item(reach_tree, hf_eigrp_saf_reachability_addr_ipv4,
- reach_tvb, 6, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(reach_tree, hf_eigrp_nullpad, reach_tvb, 10, 12,
- ENC_NA);
- break;
-
- case EIGRP_AF_IPv6:
- proto_tree_add_item(reach_tree, hf_eigrp_saf_reachability_addr_ipv6,
- reach_tvb, 6, 16, ENC_NA);
- break;
- default:
- /* just print zeros... */
- proto_tree_add_item(reach_tree, hf_eigrp_saf_reachability_addr_hex,
- reach_tvb, 6, 16, ENC_NA);
- break;
- }
- sub_offset += 22;
-
- proto_tree_add_item(sub_tree, hf_eigrp_saf_data_sequence, sub_tvb,
- sub_offset, 4, ENC_BIG_ENDIAN);
- sub_offset += 4;
-
- if (length > 0) {
- tvbuff_t *xml_tvb;
- guint8 *test_string, *tok;
-
- /*
- * Service-Data is usually (but not always) plain text, specifically
- * XML. If it "looks like" XML (begins with optional white-space
- * followed by a '<'), try XML. Otherwise, try plain-text.
- */
- xml_tvb = tvb_new_subset(sub_tvb, sub_offset, length, length);
- test_string = tvb_get_ephemeral_string(xml_tvb, 0, (length < 32 ?
- length : 32));
- tok = strtok(test_string, " \t\r\n");
-
- if (tok && tok[0] == '<') {
- /* Looks like XML */
- dissector_try_string(media_type_table, "application/xml",
- xml_tvb, pinfo, sub_tree);
- } else {
- /* Try plain text */
- dissector_try_string(media_type_table, "text/plain",
- xml_tvb, pinfo, sub_tree);
- }
- }
- sub_offset += length;
+ service = tvb_get_ntohs(sub_tvb, sub_offset);
+ proto_item_append_text(sub_ti, "%c %s", (sub_offset == 0 ? '=':','),
+ val_to_str(service, eigrp_saf_srv2string, ""));
+
+ sub_service = tvb_get_ntohs(sub_tvb, sub_offset+2);
+ proto_item_append_text(ti, "%c %u:%u", (sub_offset == 0 ? '=':','),
+ service, sub_service);
+
+ proto_tree_add_item(sub_tree, hf_eigrp_saf_service, sub_tvb,
+ sub_offset, 2, ENC_BIG_ENDIAN);
+ sub_offset += 2;
+ proto_tree_add_item(sub_tree, hf_eigrp_saf_subservice, sub_tvb,
+ sub_offset, 2, ENC_BIG_ENDIAN);
+ sub_offset += 2;
+ proto_tree_add_item(sub_tree, hf_eigrp_saf_guid, sub_tvb,
+ sub_offset, GUID_LEN, ENC_BIG_ENDIAN);
+ sub_offset += GUID_LEN;
+
+ proto_tree_add_item(sub_tree, hf_eigrp_saf_data_type, sub_tvb,
+ sub_offset, 2, ENC_BIG_ENDIAN);
+ sub_offset += 2;
+ length = tvb_get_ntohs(sub_tvb, sub_offset);
+ proto_tree_add_item(sub_tree, hf_eigrp_saf_data_length, sub_tvb,
+ sub_offset, 2, ENC_BIG_ENDIAN);
+ sub_offset += 2;
+
+ /*
+ * Reachability information
+ */
+ reach_ti = proto_tree_add_text(sub_tree, sub_tvb, sub_offset, 22,
+ "Reachability");
+ reach_tree = proto_item_add_subtree(reach_ti, ett_eigrp_saf_reachability);
+ reach_tvb = tvb_new_subset(sub_tvb, sub_offset, 22, -1);
+
+ afi = tvb_get_ntohs(reach_tvb, 0);
+ proto_tree_add_item(reach_tree, hf_eigrp_saf_reachability_afi,
+ reach_tvb, 0, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(reach_tree, hf_eigrp_saf_reachability_port,
+ reach_tvb, 2, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(reach_tree, hf_eigrp_saf_reachability_protocol,
+ reach_tvb, 4, 2, ENC_BIG_ENDIAN);
+
+ switch (afi) {
+ case EIGRP_AF_IPv4:
+ proto_tree_add_item(reach_tree, hf_eigrp_saf_reachability_addr_ipv4,
+ reach_tvb, 6, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(reach_tree, hf_eigrp_nullpad, reach_tvb, 10, 12,
+ ENC_NA);
+ break;
+
+ case EIGRP_AF_IPv6:
+ proto_tree_add_item(reach_tree, hf_eigrp_saf_reachability_addr_ipv6,
+ reach_tvb, 6, 16, ENC_NA);
+ break;
+ default:
+ /* just print zeros... */
+ proto_tree_add_item(reach_tree, hf_eigrp_saf_reachability_addr_hex,
+ reach_tvb, 6, 16, ENC_NA);
+ break;
+ }
+ sub_offset += 22;
+
+ proto_tree_add_item(sub_tree, hf_eigrp_saf_data_sequence, sub_tvb,
+ sub_offset, 4, ENC_BIG_ENDIAN);
+ sub_offset += 4;
+
+ if (length > 0) {
+ tvbuff_t *xml_tvb;
+ guint8 *test_string, *tok;
+
+ /*
+ * Service-Data is usually (but not always) plain text, specifically
+ * XML. If it "looks like" XML (begins with optional white-space
+ * followed by a '<'), try XML. Otherwise, try plain-text.
+ */
+ xml_tvb = tvb_new_subset(sub_tvb, sub_offset, length, length);
+ test_string = tvb_get_ephemeral_string(xml_tvb, 0, (length < 32 ?
+ length : 32));
+ tok = strtok(test_string, " \t\r\n");
+
+ if (tok && tok[0] == '<') {
+ /* Looks like XML */
+ dissector_try_string(media_type_table, "application/xml",
+ xml_tvb, pinfo, sub_tree);
+ } else {
+ /* Try plain text */
+ dissector_try_string(media_type_table, "text/plain",
+ xml_tvb, pinfo, sub_tree);
+ }
+ }
+ sub_offset += length;
}
offset += sub_offset;
@@ -1368,11 +1368,11 @@ dissect_eigrp_service (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
/**
*@fn int dissect_eigrp_legacy_metric (proto_tree *tree, tvbuff_t *tvb, int offset)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] offset current byte offset in packet being processed
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] offset current byte offset in packet being processed
*
- * @return int number of bytes process
+ * @return int number of bytes process
*
* @par
* Dissect the TLV Versions 1.2 (legacy) and 3.0 (deprecated) metric
@@ -1396,26 +1396,26 @@ dissect_eigrp_legacy_metric (proto_tree *tree, tvbuff_t *tvb, int offset)
{
proto_item *sub_ti;
proto_tree *sub_tree;
- tvbuff_t *sub_tvb;
+ tvbuff_t *sub_tvb;
sub_ti = proto_tree_add_text(tree, tvb, offset, 16, "Legacy Metric");
sub_tree = proto_item_add_subtree(sub_ti, ett_eigrp_tlv_metric);
sub_tvb = tvb_new_subset(tvb, offset, 16, -1);
proto_tree_add_item(sub_tree, hf_eigrp_legacy_metric_delay, sub_tvb,
- 0, 4, ENC_BIG_ENDIAN);
+ 0, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(sub_tree, hf_eigrp_legacy_metric_bw, sub_tvb,
- 4, 4, ENC_BIG_ENDIAN);
+ 4, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(sub_tree, hf_eigrp_legacy_metric_mtu, sub_tvb,
- 8, 3, ENC_BIG_ENDIAN);
+ 8, 3, ENC_BIG_ENDIAN);
proto_tree_add_item(sub_tree, hf_eigrp_legacy_metric_hopcount, sub_tvb,
- 11, 1, ENC_BIG_ENDIAN);
+ 11, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(sub_tree, hf_eigrp_legacy_metric_rel, sub_tvb,
- 12, 1, ENC_BIG_ENDIAN);
+ 12, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(sub_tree, hf_eigrp_legacy_metric_load, sub_tvb,
- 13, 1, ENC_BIG_ENDIAN);
+ 13, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(sub_tree, hf_eigrp_legacy_metric_intag, sub_tvb,
- 14, 1, ENC_BIG_ENDIAN);
+ 14, 1, ENC_BIG_ENDIAN);
/* Decode the route flags field */
dissect_eigrp_metric_flags(sub_tree, sub_tvb, 15, 1);
@@ -1427,11 +1427,11 @@ dissect_eigrp_legacy_metric (proto_tree *tree, tvbuff_t *tvb, int offset)
/**
*@fn int dissect_eigrp_ipx_extdata (proto_tree *tree, tvbuff_t *tvb, int offset)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] offset current byte offset in packet being processed
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] offset current byte offset in packet being processed
*
- * @return int number of bytes process
+ * @return int number of bytes process
*
* @par
* Dissect the IPX External data for the TLV versions 1.2 and 3.0.
@@ -1458,8 +1458,8 @@ dissect_eigrp_ipx_extdata (proto_tree *tree, tvbuff_t *tvb, int offset)
{
proto_item *sub_ti;
proto_tree *sub_tree;
- tvbuff_t *sub_tvb;
- int sub_offset = 0;
+ tvbuff_t *sub_tvb;
+ int sub_offset = 0;
sub_ti = proto_tree_add_text(tree, tvb, offset, 20, "External Data");
sub_tree = proto_item_add_subtree(sub_ti, ett_eigrp_tlv_extdata);
@@ -1467,16 +1467,16 @@ dissect_eigrp_ipx_extdata (proto_tree *tree, tvbuff_t *tvb, int offset)
/* Decode the external route source info */
proto_tree_add_item(sub_tree, hf_eigrp_ipx_extdata_routerid, sub_tvb,
- sub_offset, 6, ENC_NA);
+ sub_offset, 6, ENC_NA);
sub_offset += 6;
proto_tree_add_item(sub_tree, hf_eigrp_extdata_as, sub_tvb,
- sub_offset, 4, ENC_BIG_ENDIAN);
+ sub_offset, 4, ENC_BIG_ENDIAN);
sub_offset += 4;
proto_tree_add_item(sub_tree, hf_eigrp_extdata_tag, sub_tvb,
- sub_offset, 4, ENC_BIG_ENDIAN);
+ sub_offset, 4, ENC_BIG_ENDIAN);
sub_offset += 4;
proto_tree_add_item(sub_tree, hf_eigrp_extdata_proto, sub_tvb,
- sub_offset, 1, ENC_BIG_ENDIAN);
+ sub_offset, 1, ENC_BIG_ENDIAN);
sub_offset += 1;
/* Decode the external route flags */
@@ -1485,10 +1485,10 @@ dissect_eigrp_ipx_extdata (proto_tree *tree, tvbuff_t *tvb, int offset)
/* and the rest of it... */
proto_tree_add_item(sub_tree, hf_eigrp_ipx_extdata_metric,
- sub_tvb, sub_offset, 2, ENC_BIG_ENDIAN);
+ sub_tvb, sub_offset, 2, ENC_BIG_ENDIAN);
sub_offset += 2;
proto_tree_add_item(sub_tree, hf_eigrp_ipx_extdata_delay,
- sub_tvb, sub_offset, 2, ENC_BIG_ENDIAN);
+ sub_tvb, sub_offset, 2, ENC_BIG_ENDIAN);
sub_offset += 2;
offset += sub_offset;
@@ -1498,11 +1498,11 @@ dissect_eigrp_ipx_extdata (proto_tree *tree, tvbuff_t *tvb, int offset)
/**
*@fn int dissect_eigrp_extdata (proto_tree *tree, tvbuff_t *tvb, int offset)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] offset current byte offset in packet being processed
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] offset current byte offset in packet being processed
*
- * @return int number of bytes process
+ * @return int number of bytes process
*
* @par
* Dissect the external route data for TLV versions 1.2 and 3.0 for all
@@ -1527,8 +1527,8 @@ dissect_eigrp_extdata (proto_tree *tree, tvbuff_t *tvb, int offset)
{
proto_item *sub_ti;
proto_tree *sub_tree;
- tvbuff_t *sub_tvb;
- int sub_offset = 0;
+ tvbuff_t *sub_tvb;
+ int sub_offset = 0;
sub_ti = proto_tree_add_text(tree, tvb, offset, 20, "External Data");
sub_tree = proto_item_add_subtree(sub_ti, ett_eigrp_tlv_extdata);
@@ -1536,22 +1536,22 @@ dissect_eigrp_extdata (proto_tree *tree, tvbuff_t *tvb, int offset)
/* Decode the external route source info */
proto_tree_add_item(sub_tree, hf_eigrp_extdata_origrid, sub_tvb,
- sub_offset, 4, ENC_BIG_ENDIAN);
+ sub_offset, 4, ENC_BIG_ENDIAN);
sub_offset += 4;
proto_tree_add_item(sub_tree, hf_eigrp_extdata_as, sub_tvb,
- sub_offset, 4, ENC_BIG_ENDIAN);
+ sub_offset, 4, ENC_BIG_ENDIAN);
sub_offset += 4;
proto_tree_add_item(sub_tree, hf_eigrp_extdata_tag, sub_tvb,
- sub_offset, 4, ENC_BIG_ENDIAN);
+ sub_offset, 4, ENC_BIG_ENDIAN);
sub_offset += 4;
proto_tree_add_item(sub_tree, hf_eigrp_extdata_metric, sub_tvb,
- sub_offset, 4, ENC_BIG_ENDIAN);
+ sub_offset, 4, ENC_BIG_ENDIAN);
sub_offset += 4;
proto_tree_add_item(sub_tree, hf_eigrp_extdata_reserved, sub_tvb,
- sub_offset, 2, ENC_BIG_ENDIAN);
+ sub_offset, 2, ENC_BIG_ENDIAN);
sub_offset += 2;
proto_tree_add_item(sub_tree, hf_eigrp_extdata_proto, sub_tvb,
- sub_offset, 1, ENC_BIG_ENDIAN);
+ sub_offset, 1, ENC_BIG_ENDIAN);
sub_offset += 1;
/* Decode the external route flags */
@@ -1565,12 +1565,12 @@ dissect_eigrp_extdata (proto_tree *tree, tvbuff_t *tvb, int offset)
/**
*@fn int dissect_eigrp_nexthop (proto_tree *tree, tvbuff_t *tvb, guint16 afi, int offset)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] afi IANA address family indicator
- * @param[in] offset current byte offset in packet being processed
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] afi IANA address family indicator
+ * @param[in] offset current byte offset in packet being processed
*
- * @return int number of bytes process
+ * @return int number of bytes process
*
* @par
* Dissect the next hop field which is in the "route TLVs". This function will
@@ -1584,32 +1584,32 @@ dissect_eigrp_nexthop (proto_tree *tree, tvbuff_t *tvb, guint16 afi, int offset)
switch (afi) {
case EIGRP_SF_IPv4:
case EIGRP_AF_IPv4:
- proto_tree_add_item(tree, hf_eigrp_ipv4_nexthop, tvb, offset, 4,
- ENC_BIG_ENDIAN);
- offset += 4;
- break;
+ proto_tree_add_item(tree, hf_eigrp_ipv4_nexthop, tvb, offset, 4,
+ ENC_BIG_ENDIAN);
+ offset += 4;
+ break;
case EIGRP_SF_IPv6:
case EIGRP_AF_IPv6:
- proto_tree_add_item(tree, hf_eigrp_ipv6_nexthop, tvb, offset, 16,
- ENC_NA);
- offset += 16;
- break;
+ proto_tree_add_item(tree, hf_eigrp_ipv6_nexthop, tvb, offset, 16,
+ ENC_NA);
+ offset += 16;
+ break;
case EIGRP_AF_IPX:
- proto_tree_add_item(tree, hf_eigrp_ipx_nexthop_net, tvb, offset, 4,
- ENC_NA);
- offset += 4;
- proto_tree_add_item(tree, hf_eigrp_ipx_nexthop_host, tvb, offset, 6,
- ENC_NA);
- offset += 6;
- break;
+ proto_tree_add_item(tree, hf_eigrp_ipx_nexthop_net, tvb, offset, 4,
+ ENC_NA);
+ offset += 4;
+ proto_tree_add_item(tree, hf_eigrp_ipx_nexthop_host, tvb, offset, 6,
+ ENC_NA);
+ offset += 6;
+ break;
case EIGRP_SF_COMMON:
- break;
+ break;
default:
- break;
+ break;
}
return(offset);
@@ -1617,13 +1617,13 @@ dissect_eigrp_nexthop (proto_tree *tree, tvbuff_t *tvb, guint16 afi, int offset)
/**
*@fn void dissect_eigrp_general_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
- * packet_info *pinfo, guint16 tlv)
+ * packet_info *pinfo, guint16 tlv)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] pinfo general data about the protocol
- * @param[in] ti protocol item
- * @param[in] tlv Specific TLV in to be dissected
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] pinfo general data about the protocol
+ * @param[in] ti protocol item
+ * @param[in] tlv Specific TLV in to be dissected
* @param[out] None
*
* @return void
@@ -1635,50 +1635,50 @@ dissect_eigrp_nexthop (proto_tree *tree, tvbuff_t *tvb, guint16 afi, int offset)
*/
static void
dissect_eigrp_general_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
- packet_info *pinfo, guint16 tlv)
+ packet_info *pinfo, guint16 tlv)
{
switch (tlv) {
case EIGRP_TLV_PARAMETER:
- dissect_eigrp_parameter(tree, tvb, pinfo, ti);
- break;
+ dissect_eigrp_parameter(tree, tvb, pinfo, ti);
+ break;
case EIGRP_TLV_AUTH:
- dissect_eigrp_auth_tlv(tree, tvb, pinfo, ti);
- break;
+ dissect_eigrp_auth_tlv(tree, tvb, pinfo, ti);
+ break;
case EIGRP_TLV_SEQ:
- dissect_eigrp_seq_tlv(tree, tvb, pinfo);
- break;
+ dissect_eigrp_seq_tlv(tree, tvb, pinfo);
+ break;
case EIGRP_TLV_SW_VERSION:
- dissect_eigrp_sw_version(tvb, tree, ti);
- break;
+ dissect_eigrp_sw_version(tvb, tree, ti);
+ break;
case EIGRP_TLV_NEXT_MCAST_SEQ:
- dissect_eigrp_next_mcast_seq(tvb, tree, ti);
- break;
+ dissect_eigrp_next_mcast_seq(tvb, tree, ti);
+ break;
case EIGRP_TLV_PEER_STUBINFO:
- dissect_eigrp_peer_stubinfo(tvb, tree);
- break;
+ dissect_eigrp_peer_stubinfo(tvb, tree);
+ break;
case EIGRP_TLV_PEER_TERMINATION:
- dissect_eigrp_peer_termination(pinfo, ti);
- break;
+ dissect_eigrp_peer_termination(pinfo, ti);
+ break;
case EIGRP_TLV_PEER_TIDLIST:
- dissect_eigrp_peer_tidlist(tree, tvb);
- break;
+ dissect_eigrp_peer_tidlist(tree, tvb);
+ break;
default:
- expert_add_info_format(pinfo, ti, PI_UNDECODED, PI_WARN,
- "Unknown Generic TLV (0x%04x)", tlv);
- break;
+ expert_add_info_format(pinfo, ti, PI_UNDECODED, PI_WARN,
+ "Unknown Generic TLV (0x%04x)", tlv);
+ break;
}
}
/**
*@fn int dissect_eigrp_ipv4_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
- * packet_info *pinfo, guint16 tlv)
+ * packet_info *pinfo, guint16 tlv)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] pinfo general data about the protocol
- * @param[in] tlv Specific TLV in to be dissected
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] pinfo general data about the protocol
+ * @param[in] tlv Specific TLV in to be dissected
*
- * @return int number of bytes process
+ * @return int number of bytes process
*
* @par
* Dissect the Legacy IPv4 route TLV; handles both the internal and external
@@ -1703,18 +1703,18 @@ dissect_eigrp_general_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
*/
static int
dissect_eigrp_ipv4_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
- packet_info *pinfo, guint16 tlv)
+ packet_info *pinfo, guint16 tlv)
{
- int offset = 0;
+ int offset = 0;
int unreachable = FALSE;
proto_tree_add_item(tree, hf_eigrp_ipv4_nexthop, tvb, offset, 4,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
offset += 4;
/* dissect external data if needed */
if ((tlv & EIGRP_TLV_TYPEMASK) == EIGRP_TLV_EXTERNAL) {
- offset = dissect_eigrp_extdata(tree, tvb, offset);
+ offset = dissect_eigrp_extdata(tree, tvb, offset);
}
/* dissect the metric */
@@ -1728,12 +1728,12 @@ dissect_eigrp_ipv4_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
/**
*@fn void dissect_eigrp_atalk_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
- * proto_item *ti, guint16 tlv)
+ * proto_item *ti, guint16 tlv)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] pinfo general data about the protocol
- * @param[in] tlv Specific TLV in to be dissected
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] pinfo general data about the protocol
+ * @param[in] tlv Specific TLV in to be dissected
*
* @return void
*
@@ -1743,50 +1743,50 @@ dissect_eigrp_ipv4_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
*/
static void
dissect_eigrp_atalk_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
- guint16 tlv)
+ guint16 tlv)
{
int offset = 0;
/* cable tlv? */
if (EIGRP_TLV_AT_CBL == tlv) {
- proto_tree_add_text(tree, tvb, 0, 4, "AppleTalk Cable Range = %u-%u",
- tvb_get_ntohs(tvb, 0), tvb_get_ntohs(tvb, 2));
- proto_tree_add_item(tree, hf_eigrp_atalk_routerid, tvb, 4, 4,
- ENC_BIG_ENDIAN);
- proto_item_append_text(ti, ": Cable range= %u-%u, Router ID= %u",
- tvb_get_ntohs(tvb, 0), tvb_get_ntohs(tvb, 2),
- tvb_get_ntohl(tvb, 4));
+ proto_tree_add_text(tree, tvb, 0, 4, "AppleTalk Cable Range = %u-%u",
+ tvb_get_ntohs(tvb, 0), tvb_get_ntohs(tvb, 2));
+ proto_tree_add_item(tree, hf_eigrp_atalk_routerid, tvb, 4, 4,
+ ENC_BIG_ENDIAN);
+ proto_item_append_text(ti, ": Cable range= %u-%u, Router ID= %u",
+ tvb_get_ntohs(tvb, 0), tvb_get_ntohs(tvb, 2),
+ tvb_get_ntohl(tvb, 4));
} else {
- proto_tree_add_text(tree, tvb, offset, 4, "NextHop Address = %u.%u",
- tvb_get_ntohs(tvb, 0), tvb_get_ntohs(tvb, 2));
- offset += 4;
-
- /* dissect external data if needed */
- if ((tlv & EIGRP_TLV_TYPEMASK) == EIGRP_TLV_EXTERNAL) {
- offset = dissect_eigrp_extdata(tree, tvb,offset);
- }
-
- /* dissect the metric */
- offset = dissect_eigrp_legacy_metric(tree, tvb, offset);
-
- /* dissect cable range */
- proto_tree_add_text(tree, tvb, offset, 4, "Cable range = %u-%u",
- tvb_get_ntohs(tvb, 36), tvb_get_ntohs(tvb, 38));
- proto_item_append_text(ti, ": %u-%u",
- tvb_get_ntohs(tvb, 36), tvb_get_ntohs(tvb, 38));
+ proto_tree_add_text(tree, tvb, offset, 4, "NextHop Address = %u.%u",
+ tvb_get_ntohs(tvb, 0), tvb_get_ntohs(tvb, 2));
+ offset += 4;
+
+ /* dissect external data if needed */
+ if ((tlv & EIGRP_TLV_TYPEMASK) == EIGRP_TLV_EXTERNAL) {
+ offset = dissect_eigrp_extdata(tree, tvb,offset);
+ }
+
+ /* dissect the metric */
+ offset = dissect_eigrp_legacy_metric(tree, tvb, offset);
+
+ /* dissect cable range */
+ proto_tree_add_text(tree, tvb, offset, 4, "Cable range = %u-%u",
+ tvb_get_ntohs(tvb, 36), tvb_get_ntohs(tvb, 38));
+ proto_item_append_text(ti, ": %u-%u",
+ tvb_get_ntohs(tvb, 36), tvb_get_ntohs(tvb, 38));
}
return;
}
/**
*@fn void dissect_eigrp_ipv6_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
- * packet_info *pinfo, guint16 tlv)
+ * packet_info *pinfo, guint16 tlv)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] pinfo general data about the protocol
- * @param[in] tlv Specific TLV in to be dissected
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] pinfo general data about the protocol
+ * @param[in] tlv Specific TLV in to be dissected
*
* @return void
*
@@ -1799,18 +1799,18 @@ dissect_eigrp_atalk_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
*/
static void
dissect_eigrp_ipv6_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
- packet_info *pinfo, guint16 tlv)
+ packet_info *pinfo, guint16 tlv)
{
- int offset = 0;
+ int offset = 0;
int unreachable = FALSE;
proto_tree_add_item(tree, hf_eigrp_ipv6_nexthop, tvb, offset, 16,
- ENC_NA);
+ ENC_NA);
offset += 16;
/* dissect external data if needed */
if ((tlv & EIGRP_TLV_TYPEMASK) == EIGRP_TLV_EXTERNAL) {
- offset = dissect_eigrp_extdata(tree, tvb, offset);
+ offset = dissect_eigrp_extdata(tree, tvb, offset);
}
/* dissect the metric */
@@ -1823,14 +1823,14 @@ dissect_eigrp_ipv6_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
/**
*@fn int dissect_eigrp_ipx_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
- * packet_info *pinfo, guint16 tlv)
+ * packet_info *pinfo, guint16 tlv)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] pinfo general data about the protocol
- * @param[in] tlv Specific TLV in to be dissected
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] pinfo general data about the protocol
+ * @param[in] tlv Specific TLV in to be dissected
*
- * @return int number of bytes process
+ * @return int number of bytes process
*
* @par
* Dissect the legacy IPX route TLV; handles both the internal and external
@@ -1877,9 +1877,9 @@ dissect_eigrp_ipv6_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
*/
static int
dissect_eigrp_ipx_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
- packet_info *pinfo, guint16 tlv)
+ packet_info *pinfo, guint16 tlv)
{
- int offset = 0;
+ int offset = 0;
int unreachable = FALSE;
/* nexthop for route... */
@@ -1887,7 +1887,7 @@ dissect_eigrp_ipx_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
/* dissect external data if needed */
if ((tlv & EIGRP_TLV_TYPEMASK) == EIGRP_TLV_EXTERNAL) {
- offset = dissect_eigrp_ipx_extdata(tree, tvb, offset);
+ offset = dissect_eigrp_ipx_extdata(tree, tvb, offset);
}
/* dissect the metric */
@@ -1901,15 +1901,15 @@ dissect_eigrp_ipx_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
/**
*@fn void dissect_eigrp_ipv4_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
- * packet_info *pinfo, proto_item *ti, guint16 tlv)
+ * packet_info *pinfo, proto_item *ti, guint16 tlv)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] pinfo general data about the protocol
- * @param[in] ti protocol item
- * @param[in] tlv Specific TLV in to be dissected
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] pinfo general data about the protocol
+ * @param[in] ti protocol item
+ * @param[in] tlv Specific TLV in to be dissected
*
- * @return int number of bytes process
+ * @return int number of bytes process
*
* @par
* Dissect the Multi-Topology route TLV; This packet format has been deprecated
@@ -1946,12 +1946,12 @@ dissect_eigrp_ipx_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
*/
static int
dissect_eigrp_multi_topology_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
- packet_info *pinfo, guint16 tlv)
+ packet_info *pinfo, guint16 tlv)
{
proto_item *sub_ti;
- guint16 afi;
- int offset = 2;
- int unreachable = FALSE;
+ guint16 afi;
+ int offset = 2;
+ int unreachable = FALSE;
/* tid for you */
proto_tree_add_item(tree, hf_eigrp_tid, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -1978,34 +1978,34 @@ dissect_eigrp_multi_topology_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tv
/* dissect external data if needed */
if ((tlv & EIGRP_TLV_TYPEMASK) == EIGRP_TLV_EXTERNAL) {
- if (afi == EIGRP_AF_IPX) {
- offset = dissect_eigrp_ipx_extdata(tree, tvb, offset);
- } else {
- offset = dissect_eigrp_extdata(tree, tvb, offset);
- }
+ if (afi == EIGRP_AF_IPX) {
+ offset = dissect_eigrp_ipx_extdata(tree, tvb, offset);
+ } else {
+ offset = dissect_eigrp_extdata(tree, tvb, offset);
+ }
}
/* dissect dest information */
switch (afi) {
case EIGRP_AF_IPv4:
- offset = dissect_eigrp_ipv4_addr(ti, tree, tvb, pinfo, offset, unreachable);
- break;
+ offset = dissect_eigrp_ipv4_addr(ti, tree, tvb, pinfo, offset, unreachable);
+ break;
case EIGRP_AF_IPv6:
- offset = dissect_eigrp_ipv6_addr(ti, tree, tvb, pinfo, offset, unreachable);
- break;
+ offset = dissect_eigrp_ipv6_addr(ti, tree, tvb, pinfo, offset, unreachable);
+ break;
case EIGRP_AF_IPX:
- offset = dissect_eigrp_ipx_addr(ti, tree, tvb, pinfo, offset, unreachable);
- break;
+ offset = dissect_eigrp_ipx_addr(ti, tree, tvb, pinfo, offset, unreachable);
+ break;
case EIGRP_SF_COMMON:
case EIGRP_SF_IPv4:
case EIGRP_SF_IPv6:
- offset = dissect_eigrp_service(ti, tree, tvb, pinfo, offset);
- break;
+ offset = dissect_eigrp_service(ti, tree, tvb, pinfo, offset);
+ break;
default:
- sub_ti = proto_tree_add_text(tree, tvb, offset, -1, "Unknown AFI");
- expert_add_info_format(pinfo, sub_ti, PI_MALFORMED, PI_ERROR, "Unknown AFI");
+ sub_ti = proto_tree_add_text(tree, tvb, offset, -1, "Unknown AFI");
+ expert_add_info_format(pinfo, sub_ti, PI_MALFORMED, PI_ERROR, "Unknown AFI");
}
return offset;
@@ -2014,12 +2014,12 @@ dissect_eigrp_multi_topology_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tv
/**
*@fn int dissect_eigrp_metric_comm (proto_tree *tree, tvbuff_t *tvb, int offset, int limit)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] offset current byte offset in packet being processed
- * @param[in] limit maximum number of bytes which can be process
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] offset current byte offset in packet being processed
+ * @param[in] limit maximum number of bytes which can be process
*
- * @return int number of bytes process
+ * @return int number of bytes process
*
* @par
* Dissect extended community attached to metric TLVs to support VPNv4
@@ -2039,85 +2039,85 @@ dissect_eigrp_metric_comm (proto_tree *tree, tvbuff_t *tvb, int offset, int limi
int comm_type;
while (limit > 0) {
- comm_type = tvb_get_ntohs(tvb, offset);
- offset++;
-
- switch (comm_type) {
- /*
- * Tag for this route. It is present for all EIGRP VPNv4
- * routes, internal and external
- */
- case EIGRP_EXTCOMM_EIGRP:
- proto_tree_add_text(tree, tvb, offset, 8,
- "Type(EIGRP_EXTCOMM_EIGRP): Flag(0x%02x) Tag(%u)",
- tvb_get_ntohs(tvb, 0),
- tvb_get_ntohl(tvb, 2));
- break;
- case EIGRP_EXTCOMM_VRR:
- proto_tree_add_text(tree, tvb, offset, 8,
- "Type(EIGRP_EXTCOMM_VRR)): RES(0x%02x) RID(0x%04x)",
- tvb_get_ntohs(tvb, 0),
- tvb_get_ntohl(tvb, 2));
- break;
-
- /*
- * Vecmetric information for given EIGRP VPNv4 route,
- * applies to both internal and external
- */
- case EIGRP_EXTCOMM_DAD:
- proto_tree_add_text(tree, tvb, offset, 8,
- "Type(EIGRP_EXTCOMM_DAD): AS(%u):SDLY(%u)",
- tvb_get_ntohs(tvb, 0),
- tvb_get_ntohl(tvb, 2));
- break;
- case EIGRP_EXTCOMM_VRHB:
- proto_tree_add_text(tree, tvb, offset, 8,
- "Type(EIGRP_EXTCOMM_VRHB): REL(%u) HOP(%u) SBW(%u)",
- tvb_get_guint8(tvb, 0),
- tvb_get_guint8(tvb, 1),
- tvb_get_ntohl(tvb, 2));
- break;
- case EIGRP_EXTCOMM_SRLM:
- proto_tree_add_text(tree, tvb, offset, 8,
- "Type(EIGRP_EXTCOMM_SRLM): RES(%u) LOAD(%u) MTU(%u)",
- tvb_get_guint8(tvb, 0),
- tvb_get_guint8(tvb, 1),
- tvb_get_ntohl(tvb, 2));
- break;
-
- /*
- * External information for given EIGRP VPNv4 route,
- * applies to only to external routes
- */
- case EIGRP_EXTCOMM_SAR:
- proto_tree_add_text(tree, tvb, offset, 8,
- "Type(EIGRP_EXTCOMM_SAR): xAS(%u) xRID(%u)",
- tvb_get_ntohs(tvb, 0),
- tvb_get_ntohl(tvb, 2));
- break;
- case EIGRP_EXTCOMM_RPM:
- proto_tree_add_text(tree, tvb, offset, 8,
- "Type(EIGRP_EXTCOMM_RPM): xProto(%u) xMETRIC(%u)",
- tvb_get_ntohs(tvb, 0),
- tvb_get_ntohl(tvb, 2));
- break;
-
- case EIGRP_EXTCOMM_SOO_ASFMT:
- case EIGRP_EXTCOMM_SOO_ADRFMT:
- proto_tree_add_text(tree, tvb, offset, 8,
- "Type(EIGRP_EXTCOMM_SOO): AS(%u) TAG(%u)",
- tvb_get_ntohs(tvb, 0),
- tvb_get_ntohl(tvb, 2));
- break;
- }
-
- /*on to the next */
- offset += 8;
- limit -= 8;
-
- if (0 != limit%8) {
- break;
- }
+ comm_type = tvb_get_ntohs(tvb, offset);
+ offset++;
+
+ switch (comm_type) {
+ /*
+ * Tag for this route. It is present for all EIGRP VPNv4
+ * routes, internal and external
+ */
+ case EIGRP_EXTCOMM_EIGRP:
+ proto_tree_add_text(tree, tvb, offset, 8,
+ "Type(EIGRP_EXTCOMM_EIGRP): Flag(0x%02x) Tag(%u)",
+ tvb_get_ntohs(tvb, 0),
+ tvb_get_ntohl(tvb, 2));
+ break;
+ case EIGRP_EXTCOMM_VRR:
+ proto_tree_add_text(tree, tvb, offset, 8,
+ "Type(EIGRP_EXTCOMM_VRR)): RES(0x%02x) RID(0x%04x)",
+ tvb_get_ntohs(tvb, 0),
+ tvb_get_ntohl(tvb, 2));
+ break;
+
+ /*
+ * Vecmetric information for given EIGRP VPNv4 route,
+ * applies to both internal and external
+ */
+ case EIGRP_EXTCOMM_DAD:
+ proto_tree_add_text(tree, tvb, offset, 8,
+ "Type(EIGRP_EXTCOMM_DAD): AS(%u):SDLY(%u)",
+ tvb_get_ntohs(tvb, 0),
+ tvb_get_ntohl(tvb, 2));
+ break;
+ case EIGRP_EXTCOMM_VRHB:
+ proto_tree_add_text(tree, tvb, offset, 8,
+ "Type(EIGRP_EXTCOMM_VRHB): REL(%u) HOP(%u) SBW(%u)",
+ tvb_get_guint8(tvb, 0),
+ tvb_get_guint8(tvb, 1),
+ tvb_get_ntohl(tvb, 2));
+ break;
+ case EIGRP_EXTCOMM_SRLM:
+ proto_tree_add_text(tree, tvb, offset, 8,
+ "Type(EIGRP_EXTCOMM_SRLM): RES(%u) LOAD(%u) MTU(%u)",
+ tvb_get_guint8(tvb, 0),
+ tvb_get_guint8(tvb, 1),
+ tvb_get_ntohl(tvb, 2));
+ break;
+
+ /*
+ * External information for given EIGRP VPNv4 route,
+ * applies to only to external routes
+ */
+ case EIGRP_EXTCOMM_SAR:
+ proto_tree_add_text(tree, tvb, offset, 8,
+ "Type(EIGRP_EXTCOMM_SAR): xAS(%u) xRID(%u)",
+ tvb_get_ntohs(tvb, 0),
+ tvb_get_ntohl(tvb, 2));
+ break;
+ case EIGRP_EXTCOMM_RPM:
+ proto_tree_add_text(tree, tvb, offset, 8,
+ "Type(EIGRP_EXTCOMM_RPM): xProto(%u) xMETRIC(%u)",
+ tvb_get_ntohs(tvb, 0),
+ tvb_get_ntohl(tvb, 2));
+ break;
+
+ case EIGRP_EXTCOMM_SOO_ASFMT:
+ case EIGRP_EXTCOMM_SOO_ADRFMT:
+ proto_tree_add_text(tree, tvb, offset, 8,
+ "Type(EIGRP_EXTCOMM_SOO): AS(%u) TAG(%u)",
+ tvb_get_ntohs(tvb, 0),
+ tvb_get_ntohl(tvb, 2));
+ break;
+ }
+
+ /*on to the next */
+ offset += 8;
+ limit -= 8;
+
+ if (0 != limit%8) {
+ break;
+ }
}
@@ -2126,14 +2126,14 @@ dissect_eigrp_metric_comm (proto_tree *tree, tvbuff_t *tvb, int offset, int limi
/**
*@fn int dissect_eigrp_wide_metric_attr (proto_tree *tree, tvbuff_t *tvb,
- * int offset, int limit)
+ * int offset, int limit)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] offset current byte offset in packet being processed
- * @param[in] limit maximum number of words which should be process
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] offset current byte offset in packet being processed
+ * @param[in] limit maximum number of words which should be process
*
- * @return int number of bytes process
+ * @return int number of bytes process
*
* @par
* Dissect the Metric Attributes which (optionally) are part of the wide-metric
@@ -2143,74 +2143,74 @@ dissect_eigrp_metric_comm (proto_tree *tree, tvbuff_t *tvb, int offset, int limi
*/
static int
dissect_eigrp_wide_metric_attr (proto_tree *tree, tvbuff_t *tvb,
- int offset, int limit)
+ int offset, int limit)
{
proto_item *sub_ti;
proto_tree *sub_tree;
- tvbuff_t *sub_tvb;
- int sub_offset;
+ tvbuff_t *sub_tvb;
+ int sub_offset;
gint8 attr_offset = 0;
gint8 attr_opcode = 0;
limit *= 2; /* words to bytes */
- sub_ti = proto_tree_add_text(tree, tvb, offset, limit, "Attributes");
- sub_tree = proto_item_add_subtree(sub_ti, ett_eigrp_tlv_attr);
- sub_tvb = tvb_new_subset(tvb, offset, limit, -1);
+ sub_ti = proto_tree_add_text(tree, tvb, offset, limit, "Attributes");
+ sub_tree = proto_item_add_subtree(sub_ti, ett_eigrp_tlv_attr);
+ sub_tvb = tvb_new_subset(tvb, offset, limit, -1);
sub_offset = 0;
while (limit > 0) {
- attr_opcode = tvb_get_guint8(sub_tvb, sub_offset);
- proto_tree_add_item(sub_tree, hf_eigrp_attr_opcode, sub_tvb,
- sub_offset, 1, ENC_BIG_ENDIAN);
- sub_offset += 1;
-
- attr_offset = tvb_get_guint8(sub_tvb, sub_offset) * 2;
- proto_tree_add_item(sub_tree, hf_eigrp_attr_offset, sub_tvb,
- sub_offset, 1, ENC_BIG_ENDIAN);
- sub_offset += 1;
-
- switch (attr_opcode) {
- case EIGRP_ATTR_NOOP:
- break;
-
- case EIGRP_ATTR_SCALED:
- proto_tree_add_item(sub_tree, hf_eigrp_attr_scaled, sub_tvb,
- sub_offset, 4, ENC_BIG_ENDIAN);
- break;
-
- case EIGRP_ATTR_TAG:
- proto_tree_add_item(sub_tree, hf_eigrp_attr_tag, sub_tvb,
- sub_offset, 4, ENC_BIG_ENDIAN);
- break;
-
- case EIGRP_ATTR_COMM:
- dissect_eigrp_metric_comm(sub_tree,
- tvb_new_subset(sub_tvb, sub_offset, 8, -1),
- sub_offset, limit);
- break;
-
- case EIGRP_ATTR_JITTER:
- proto_tree_add_item(sub_tree, hf_eigrp_attr_jitter, sub_tvb,
- sub_offset, 4, ENC_BIG_ENDIAN);
- break;
-
- case EIGRP_ATTR_QENERGY:
- proto_tree_add_item(sub_tree, hf_eigrp_attr_qenergy, sub_tvb,
- sub_offset, 4, ENC_BIG_ENDIAN);
- break;
-
- case EIGRP_ATTR_ENERGY:
- proto_tree_add_item(sub_tree, hf_eigrp_attr_energy, sub_tvb,
- sub_offset, 4, ENC_BIG_ENDIAN);
- break;
-
- default:
- break;
- }
- sub_offset += attr_offset;
- limit -= (EIGRP_ATTR_HDRLEN + attr_offset);
+ attr_opcode = tvb_get_guint8(sub_tvb, sub_offset);
+ proto_tree_add_item(sub_tree, hf_eigrp_attr_opcode, sub_tvb,
+ sub_offset, 1, ENC_BIG_ENDIAN);
+ sub_offset += 1;
+
+ attr_offset = tvb_get_guint8(sub_tvb, sub_offset) * 2;
+ proto_tree_add_item(sub_tree, hf_eigrp_attr_offset, sub_tvb,
+ sub_offset, 1, ENC_BIG_ENDIAN);
+ sub_offset += 1;
+
+ switch (attr_opcode) {
+ case EIGRP_ATTR_NOOP:
+ break;
+
+ case EIGRP_ATTR_SCALED:
+ proto_tree_add_item(sub_tree, hf_eigrp_attr_scaled, sub_tvb,
+ sub_offset, 4, ENC_BIG_ENDIAN);
+ break;
+
+ case EIGRP_ATTR_TAG:
+ proto_tree_add_item(sub_tree, hf_eigrp_attr_tag, sub_tvb,
+ sub_offset, 4, ENC_BIG_ENDIAN);
+ break;
+
+ case EIGRP_ATTR_COMM:
+ dissect_eigrp_metric_comm(sub_tree,
+ tvb_new_subset(sub_tvb, sub_offset, 8, -1),
+ sub_offset, limit);
+ break;
+
+ case EIGRP_ATTR_JITTER:
+ proto_tree_add_item(sub_tree, hf_eigrp_attr_jitter, sub_tvb,
+ sub_offset, 4, ENC_BIG_ENDIAN);
+ break;
+
+ case EIGRP_ATTR_QENERGY:
+ proto_tree_add_item(sub_tree, hf_eigrp_attr_qenergy, sub_tvb,
+ sub_offset, 4, ENC_BIG_ENDIAN);
+ break;
+
+ case EIGRP_ATTR_ENERGY:
+ proto_tree_add_item(sub_tree, hf_eigrp_attr_energy, sub_tvb,
+ sub_offset, 4, ENC_BIG_ENDIAN);
+ break;
+
+ default:
+ break;
+ }
+ sub_offset += attr_offset;
+ limit -= (EIGRP_ATTR_HDRLEN + attr_offset);
}
offset += sub_offset;
@@ -2220,11 +2220,11 @@ dissect_eigrp_wide_metric_attr (proto_tree *tree, tvbuff_t *tvb,
/**
*@fn int dissect_eigrp_wide_metric (proto_tree *tree, tvbuff_t *tvb, int offset)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] offset current byte offset in packet being processed
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] offset current byte offset in packet being processed
*
- * @return int number of bytes process
+ * @return int number of bytes process
*
* @par
* Dissect the latest-n-greatest "Wide"Metric" definition for EIGRP. This
@@ -2255,9 +2255,9 @@ dissect_eigrp_wide_metric (proto_tree *tree, tvbuff_t *tvb, int offset)
{
proto_item *sub_ti;
proto_tree *sub_tree;
- tvbuff_t *sub_tvb;
- gint8 attr_size = 0;
- guint64 big_num;
+ tvbuff_t *sub_tvb;
+ gint8 attr_size = 0;
+ guint64 big_num;
sub_ti = proto_tree_add_text(tree, tvb, offset, 24, "Wide Metric");
sub_tree = proto_item_add_subtree(sub_ti, ett_eigrp_tlv_metric);
@@ -2266,17 +2266,17 @@ dissect_eigrp_wide_metric (proto_tree *tree, tvbuff_t *tvb, int offset)
attr_size = tvb_get_guint8(sub_tvb, 0);
proto_tree_add_item(sub_tree, hf_eigrp_metric_offset,
- sub_tvb, 0, 1, ENC_BIG_ENDIAN);
+ sub_tvb, 0, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(sub_tree, hf_eigrp_metric_priority,
- sub_tvb, 1, 1, ENC_BIG_ENDIAN);
+ sub_tvb, 1, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(sub_tree, hf_eigrp_metric_rel,
- sub_tvb, 2, 1, ENC_BIG_ENDIAN);
+ sub_tvb, 2, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(sub_tree, hf_eigrp_metric_load,
- sub_tvb, 3, 1, ENC_BIG_ENDIAN);
+ sub_tvb, 3, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(sub_tree, hf_eigrp_metric_mtu,
- sub_tvb, 4, 3, ENC_BIG_ENDIAN);
+ sub_tvb, 4, 3, ENC_BIG_ENDIAN);
proto_tree_add_item(sub_tree, hf_eigrp_metric_hopcount,
- sub_tvb, 7, 1, ENC_BIG_ENDIAN);
+ sub_tvb, 7, 1, ENC_BIG_ENDIAN);
/* The one-way latency along an unloaded path to the destination
* expressed in units of nanoseconds per kilobyte. This number is not
@@ -2298,12 +2298,12 @@ dissect_eigrp_wide_metric (proto_tree *tree, tvbuff_t *tvb, int offset)
big_num = tvb_get_ntoh64(sub_tvb, 14);
big_num >>= 16;
if (big_num == G_GINT64_CONSTANT(0x0000ffffffffffffU)) {
- proto_tree_add_text(sub_tree, sub_tvb, 14, 6, "Bandwidth: Infinity");
+ proto_tree_add_text(sub_tree, sub_tvb, 14, 6, "Bandwidth: Infinity");
} else {
- proto_tree_add_text(sub_tree, sub_tvb, 14, 6, "Bandwidth: %" G_GINT64_MODIFIER "u", big_num);
+ proto_tree_add_text(sub_tree, sub_tvb, 14, 6, "Bandwidth: %" G_GINT64_MODIFIER "u", big_num);
}
proto_tree_add_item(sub_tree, hf_eigrp_metric_reserved, sub_tvb, 20, 2,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
/* Decode the route flags field */
dissect_eigrp_metric_flags(sub_tree, sub_tvb, 22, 2);
@@ -2311,7 +2311,7 @@ dissect_eigrp_wide_metric (proto_tree *tree, tvbuff_t *tvb, int offset)
/* any extended metric attributes? */
if (attr_size > 0) {
- offset = dissect_eigrp_wide_metric_attr(tree, tvb, offset, attr_size);
+ offset = dissect_eigrp_wide_metric_attr(tree, tvb, offset, attr_size);
}
return(offset);
@@ -2319,15 +2319,15 @@ dissect_eigrp_wide_metric (proto_tree *tree, tvbuff_t *tvb, int offset)
/**
*@fn int dissect_eigrp_multi_protocol_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
- * packet_info *pinfo, guint16 tlv)
+ * packet_info *pinfo, guint16 tlv)
*
- * @param[in|out] tree detail dissection result
- * @param[in] tvb packet data
- * @param[in] ti protocol item
- * @param[in] pinfo general data about the protocol
+ * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] ti protocol item
+ * @param[in] pinfo general data about the protocol
*
- * @return int number of bytes process
+ * @return int number of bytes process
*
* @par
* Dissect the Multi-Protocol (TLV Version 2.0) TLV format definition. The following
@@ -2353,12 +2353,12 @@ dissect_eigrp_wide_metric (proto_tree *tree, tvbuff_t *tvb, int offset)
*/
static int
dissect_eigrp_multi_protocol_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tvb,
- packet_info *pinfo, guint16 tlv)
+ packet_info *pinfo, guint16 tlv)
{
proto_item *sub_ti;
- int offset = 0;
- guint16 afi;
- int unreachable = FALSE;
+ int offset = 0;
+ guint16 afi;
+ int unreachable = FALSE;
/* tid for you */
proto_tree_add_item(tree, hf_eigrp_tid, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -2381,36 +2381,36 @@ dissect_eigrp_multi_protocol_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tv
/* dissect external data if needed */
if ((tlv & EIGRP_TLV_TYPEMASK) == EIGRP_TLV_EXTERNAL) {
- if (afi == EIGRP_AF_IPX) {
- offset = dissect_eigrp_ipx_extdata(tree, tvb, offset);
- } else {
- offset = dissect_eigrp_extdata(tree, tvb, offset);
- }
+ if (afi == EIGRP_AF_IPX) {
+ offset = dissect_eigrp_ipx_extdata(tree, tvb, offset);
+ } else {
+ offset = dissect_eigrp_extdata(tree, tvb, offset);
+ }
}
/* dissect dest information */
switch (afi) {
case EIGRP_AF_IPv4:
- offset = dissect_eigrp_ipv4_addr(ti, tree, tvb, pinfo, offset, unreachable);
- break;
+ offset = dissect_eigrp_ipv4_addr(ti, tree, tvb, pinfo, offset, unreachable);
+ break;
case EIGRP_AF_IPv6:
- offset = dissect_eigrp_ipv6_addr(ti, tree, tvb, pinfo, offset, unreachable);
- break;
+ offset = dissect_eigrp_ipv6_addr(ti, tree, tvb, pinfo, offset, unreachable);
+ break;
case EIGRP_AF_IPX:
- offset = dissect_eigrp_ipx_addr(ti, tree, tvb, pinfo, offset, unreachable);
- break;
+ offset = dissect_eigrp_ipx_addr(ti, tree, tvb, pinfo, offset, unreachable);
+ break;
case EIGRP_SF_COMMON:
case EIGRP_SF_IPv4:
case EIGRP_SF_IPv6:
- offset = dissect_eigrp_service(ti, tree, tvb, pinfo, offset);
- break;
+ offset = dissect_eigrp_service(ti, tree, tvb, pinfo, offset);
+ break;
default:
- sub_ti = proto_tree_add_text(tree, tvb, offset, -1, "Unknown AFI");
- expert_add_info_format(pinfo, sub_ti, PI_MALFORMED, PI_ERROR, "Unknown AFI");
+ sub_ti = proto_tree_add_text(tree, tvb, offset, -1, "Unknown AFI");
+ expert_add_info_format(pinfo, sub_ti, PI_MALFORMED, PI_ERROR, "Unknown AFI");
}
return offset;
@@ -2419,12 +2419,12 @@ dissect_eigrp_multi_protocol_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tv
/**
*@fn int dissect_eigrp (proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo)
*
- * @param[in] tvb packet data
- * @param[in] pinfo general data about the protocol
- * @param[in|out] tree detail dissection result
+ * @param[in] tvb packet data
+ * @param[in] pinfo general data about the protocol
+ * @param[in|out] tree detail dissection result
* @param[out] None
*
- * @return int 0 if packet is not for this decoder
+ * @return int 0 if packet is not for this decoder
*
* @par
* This function is called to dissect the packets presented to it. The packet
@@ -2437,20 +2437,20 @@ dissect_eigrp_multi_protocol_tlv (proto_item *ti, proto_tree *tree, tvbuff_t *tv
static guint16 ip_checksum(const guint8 *ptr, int len)
{
- vec_t cksum_vec[1];
+ vec_t cksum_vec[1];
- cksum_vec[0].ptr = ptr;
- cksum_vec[0].len = len;
- return in_cksum(&cksum_vec[0], 1);
+ cksum_vec[0].ptr = ptr;
+ cksum_vec[0].len = len;
+ return in_cksum(&cksum_vec[0], 1);
}
static int
dissect_eigrp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_item *ti;
- proto_tree *eigrp_tree = NULL, *tlv_tree;
- guint opcode, vrid;
- guint16 tlv, checksum, cacl_checksum;
- guint32 ack, size, offset = EIGRP_HEADER_LENGTH;
+ proto_tree *eigrp_tree = NULL, *tlv_tree;
+ guint opcode, vrid;
+ guint16 tlv, checksum, cacl_checksum;
+ guint32 ack, size, offset = EIGRP_HEADER_LENGTH;
/* Make entries in Protocol column and Info column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "EIGRP");
@@ -2463,13 +2463,13 @@ dissect_eigrp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_clear(pinfo->cinfo, COL_INFO);
opcode = tvb_get_guint8(tvb, 1);
- ack = tvb_get_ntohl(tvb, 12);
+ ack = tvb_get_ntohl(tvb, 12);
if ((opcode == EIGRP_OPC_HELLO) && (0 != ack)) {
- opcode = EIGRP_OPC_ACK;
+ opcode = EIGRP_OPC_ACK;
}
col_add_str(pinfo->cinfo, COL_INFO,
- val_to_str(opcode, eigrp_opcode2string, "Unknown OpCode (0x%04x)"));
+ val_to_str(opcode, eigrp_opcode2string, "Unknown OpCode (0x%04x)"));
/* A protocol dissector may be called in 2 different ways - with, or
* without a non-null "tree" argument.
@@ -2479,131 +2479,131 @@ dissect_eigrp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* in either case.
*/
if (tree) {
- /* NOTE: The offset and length values in the call to
- * "proto_tree_add_item()" define what data bytes to highlight in the
- * hex display window when the line in the protocol tree display
- * corresponding to that item is selected.
- */
-
- /* create display subtree for the protocol */
- ti = proto_tree_add_protocol_format(tree, proto_eigrp, tvb, 0, -1,
- "Cisco EIGRP");
- eigrp_tree = proto_item_add_subtree(ti, ett_eigrp);
- proto_tree_add_item(eigrp_tree, hf_eigrp_version, tvb, 0, 1,
- ENC_BIG_ENDIAN);
- proto_tree_add_item(eigrp_tree, hf_eigrp_opcode, tvb, 1, 1,
- ENC_BIG_ENDIAN);
-
- size = tvb_length(tvb);
- checksum = tvb_get_ntohs(tvb, 2);
- cacl_checksum = ip_checksum(tvb_get_ptr(tvb, 0, size), size);
-
- if (cacl_checksum == checksum) {
- proto_tree_add_text(eigrp_tree, tvb, 2, 2,
- "Checksum: 0x%02x [incorrect]",
- checksum);
- expert_add_info_format(pinfo, ti, PI_RESPONSE_CODE, PI_NOTE,
- "Checksum: 0x%02x [incorrect, should be 0x%02x]",
- checksum, cacl_checksum);
- } else {
- proto_tree_add_text(eigrp_tree, tvb, 2, 2,
- "Checksum: 0x%02x [correct]", checksum);
- }
-
- /* Decode the EIGRP Flags Field */
- proto_tree_add_bitmask(eigrp_tree, tvb, 4, hf_eigrp_flags, ett_eigrp_flags,
- eigrp_flag_fields, ENC_BIG_ENDIAN);
-
- proto_tree_add_item(eigrp_tree, hf_eigrp_sequence, tvb, 8, 4,
- ENC_BIG_ENDIAN);
- proto_tree_add_item(eigrp_tree, hf_eigrp_acknowledge, tvb, 12, 4,
- ENC_BIG_ENDIAN);
-
- /* print out what family we dealing with... */
- ti = proto_tree_add_item(eigrp_tree, hf_eigrp_vrid, tvb, 16, 2,
- ENC_BIG_ENDIAN);
- vrid = (tvb_get_ntohs(tvb, 16) & EIGRP_VRID_MASK);
- proto_item_append_text(ti, " %s", val_to_str(vrid, eigrp_vrid2string,
- ""));
-
- /* print autonomous-system */
- proto_tree_add_item(eigrp_tree, hf_eigrp_as, tvb, 18, 2,
- ENC_BIG_ENDIAN);
-
- switch (opcode) {
- case EIGRP_OPC_IPXSAP:
- call_dissector(ipxsap_handle,
- tvb_new_subset(tvb, EIGRP_HEADER_LENGTH, -1, -1), pinfo,
- eigrp_tree);
- break;
-
- default:
- while (tvb_reported_length_remaining(tvb, offset) > 0) {
- tlv = tvb_get_ntohs(tvb, offset);
-
- /* its a rose by the wrong name... */
- if (tlv == EIGRP_TLV_MTR_TIDLIST) {
- tlv = EIGRP_TLV_PEER_TIDLIST;
- }
-
- size = tvb_get_ntohs(tvb, offset + 2);
- if (size == 0) {
- ti = proto_tree_add_text(eigrp_tree, tvb, offset, -1,
- "Corrupt TLV (Zero Size)");
- expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
- "Corrupt TLV (Zero Size)");
- return(tvb_length(tvb));
- }
-
- ti = proto_tree_add_text(eigrp_tree, tvb, offset, size, "%s",
- val_to_str(tlv, eigrp_tlv2string, "Unknown TLV (0x%04x)"));
-
- tlv_tree = proto_item_add_subtree(ti, ett_eigrp_tlv);
- proto_tree_add_item(tlv_tree, hf_eigrp_tlv_type, tvb,
- offset, 2, ENC_BIG_ENDIAN);
- proto_tree_add_item(tlv_tree, hf_eigrp_tlv_len, tvb,
- (offset + 2), 2, ENC_BIG_ENDIAN);
-
- switch (tlv & EIGRP_TLV_RANGEMASK) {
- case EIGRP_TLV_GENERAL:
- dissect_eigrp_general_tlv(ti, tlv_tree, tvb_new_subset(tvb, (offset + 4), (size - 4), -1), pinfo, tlv);
- break;
-
- case EIGRP_TLV_IPv4:
- dissect_eigrp_ipv4_tlv(ti, tlv_tree, tvb_new_subset(tvb, (offset + 4), (size - 4), -1), pinfo, tlv);
- break;
-
- case EIGRP_TLV_ATALK:
- dissect_eigrp_atalk_tlv(ti, tlv_tree, tvb_new_subset(tvb, (offset + 4), (size - 4), -1), tlv);
- break;
-
- case EIGRP_TLV_IPX:
- dissect_eigrp_ipx_tlv(ti, tlv_tree, tvb_new_subset(tvb, (offset + 4), (size - 4), -1), pinfo, tlv);
- break;
-
- case EIGRP_TLV_IPv6:
- dissect_eigrp_ipv6_tlv(ti, tlv_tree, tvb_new_subset(tvb, (offset + 4), (size - 4), -1), pinfo, tlv);
- break;
-
- case EIGRP_TLV_MP:
- dissect_eigrp_multi_protocol_tlv(ti, tlv_tree, tvb_new_subset(tvb, (offset + 4), (size - 4), -1),
- pinfo, tlv);
- break;
-
- case EIGRP_TLV_MTR:
- dissect_eigrp_multi_topology_tlv(ti, tlv_tree, tvb_new_subset(tvb, (offset + 4), (size - 4), -1),
- pinfo, tlv);
- break;
-
- default:
- expert_add_info_format(pinfo, ti, PI_UNDECODED, PI_WARN,
- "Unknown TLV Group (0x%04x)", tlv);
- }
-
- offset += size;
- }
- break;
- }
+ /* NOTE: The offset and length values in the call to
+ * "proto_tree_add_item()" define what data bytes to highlight in the
+ * hex display window when the line in the protocol tree display
+ * corresponding to that item is selected.
+ */
+
+ /* create display subtree for the protocol */
+ ti = proto_tree_add_protocol_format(tree, proto_eigrp, tvb, 0, -1,
+ "Cisco EIGRP");
+ eigrp_tree = proto_item_add_subtree(ti, ett_eigrp);
+ proto_tree_add_item(eigrp_tree, hf_eigrp_version, tvb, 0, 1,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(eigrp_tree, hf_eigrp_opcode, tvb, 1, 1,
+ ENC_BIG_ENDIAN);
+
+ size = tvb_length(tvb);
+ checksum = tvb_get_ntohs(tvb, 2);
+ cacl_checksum = ip_checksum(tvb_get_ptr(tvb, 0, size), size);
+
+ if (cacl_checksum == checksum) {
+ proto_tree_add_text(eigrp_tree, tvb, 2, 2,
+ "Checksum: 0x%02x [incorrect]",
+ checksum);
+ expert_add_info_format(pinfo, ti, PI_RESPONSE_CODE, PI_NOTE,
+ "Checksum: 0x%02x [incorrect, should be 0x%02x]",
+ checksum, cacl_checksum);
+ } else {
+ proto_tree_add_text(eigrp_tree, tvb, 2, 2,
+ "Checksum: 0x%02x [correct]", checksum);
+ }
+
+ /* Decode the EIGRP Flags Field */
+ proto_tree_add_bitmask(eigrp_tree, tvb, 4, hf_eigrp_flags, ett_eigrp_flags,
+ eigrp_flag_fields, ENC_BIG_ENDIAN);
+
+ proto_tree_add_item(eigrp_tree, hf_eigrp_sequence, tvb, 8, 4,
+ ENC_BIG_ENDIAN);
+ proto_tree_add_item(eigrp_tree, hf_eigrp_acknowledge, tvb, 12, 4,
+ ENC_BIG_ENDIAN);
+
+ /* print out what family we dealing with... */
+ ti = proto_tree_add_item(eigrp_tree, hf_eigrp_vrid, tvb, 16, 2,
+ ENC_BIG_ENDIAN);
+ vrid = (tvb_get_ntohs(tvb, 16) & EIGRP_VRID_MASK);
+ proto_item_append_text(ti, " %s", val_to_str(vrid, eigrp_vrid2string,
+ ""));
+
+ /* print autonomous-system */
+ proto_tree_add_item(eigrp_tree, hf_eigrp_as, tvb, 18, 2,
+ ENC_BIG_ENDIAN);
+
+ switch (opcode) {
+ case EIGRP_OPC_IPXSAP:
+ call_dissector(ipxsap_handle,
+ tvb_new_subset(tvb, EIGRP_HEADER_LENGTH, -1, -1), pinfo,
+ eigrp_tree);
+ break;
+
+ default:
+ while (tvb_reported_length_remaining(tvb, offset) > 0) {
+ tlv = tvb_get_ntohs(tvb, offset);
+
+ /* its a rose by the wrong name... */
+ if (tlv == EIGRP_TLV_MTR_TIDLIST) {
+ tlv = EIGRP_TLV_PEER_TIDLIST;
+ }
+
+ size = tvb_get_ntohs(tvb, offset + 2);
+ if (size == 0) {
+ ti = proto_tree_add_text(eigrp_tree, tvb, offset, -1,
+ "Corrupt TLV (Zero Size)");
+ expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
+ "Corrupt TLV (Zero Size)");
+ return(tvb_length(tvb));
+ }
+
+ ti = proto_tree_add_text(eigrp_tree, tvb, offset, size, "%s",
+ val_to_str(tlv, eigrp_tlv2string, "Unknown TLV (0x%04x)"));
+
+ tlv_tree = proto_item_add_subtree(ti, ett_eigrp_tlv);
+ proto_tree_add_item(tlv_tree, hf_eigrp_tlv_type, tvb,
+ offset, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tlv_tree, hf_eigrp_tlv_len, tvb,
+ (offset + 2), 2, ENC_BIG_ENDIAN);
+
+ switch (tlv & EIGRP_TLV_RANGEMASK) {
+ case EIGRP_TLV_GENERAL:
+ dissect_eigrp_general_tlv(ti, tlv_tree, tvb_new_subset(tvb, (offset + 4), (size - 4), -1), pinfo, tlv);
+ break;
+
+ case EIGRP_TLV_IPv4:
+ dissect_eigrp_ipv4_tlv(ti, tlv_tree, tvb_new_subset(tvb, (offset + 4), (size - 4), -1), pinfo, tlv);
+ break;
+
+ case EIGRP_TLV_ATALK:
+ dissect_eigrp_atalk_tlv(ti, tlv_tree, tvb_new_subset(tvb, (offset + 4), (size - 4), -1), tlv);
+ break;
+
+ case EIGRP_TLV_IPX:
+ dissect_eigrp_ipx_tlv(ti, tlv_tree, tvb_new_subset(tvb, (offset + 4), (size - 4), -1), pinfo, tlv);
+ break;
+
+ case EIGRP_TLV_IPv6:
+ dissect_eigrp_ipv6_tlv(ti, tlv_tree, tvb_new_subset(tvb, (offset + 4), (size - 4), -1), pinfo, tlv);
+ break;
+
+ case EIGRP_TLV_MP:
+ dissect_eigrp_multi_protocol_tlv(ti, tlv_tree, tvb_new_subset(tvb, (offset + 4), (size - 4), -1),
+ pinfo, tlv);
+ break;
+
+ case EIGRP_TLV_MTR:
+ dissect_eigrp_multi_topology_tlv(ti, tlv_tree, tvb_new_subset(tvb, (offset + 4), (size - 4), -1),
+ pinfo, tlv);
+ break;
+
+ default:
+ expert_add_info_format(pinfo, ti, PI_UNDECODED, PI_WARN,
+ "Unknown TLV Group (0x%04x)", tlv);
+ }
+
+ offset += size;
+ }
+ break;
+ }
}
/* Return the amount of data this dissector was able to dissect */
@@ -2619,14 +2619,14 @@ dissect_eigrp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* @return void
*
* @usage
- * you can not have the function name inside a comment or else Wireshark
- * will fail with "duplicate protocol" error. Dont you hate it when tools
- * try to be to smart :(
+ * you can not have the function name inside a comment or else Wireshark
+ * will fail with "duplicate protocol" error. Dont you hate it when tools
+ * try to be to smart :(
*
* @par
- * 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
+ * this format is require because a script is used to build the C function
+ * that calls all the protocol registration.
*/
void
proto_register_eigrp(void)
@@ -2634,718 +2634,718 @@ proto_register_eigrp(void)
/* Setup list of header fields See Section 1.6.1 for details
*/
static hf_register_info hf[] = {
- /*
- *
- * EIGRP Packet Header definitions
- *
- * 0 1 2 3
- * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * |Ver | Opcode | Checksum |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | Flags |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | Sequence number |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | Acknowledgement number |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * | Virtual Router ID | Autonomous system number |
- * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- */
- { &hf_eigrp_version,
- { "Version", "eigrp.version",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Version - Version of EIGRP packet format", HFILL }
- },
- { &hf_eigrp_opcode,
- { "Opcode", "eigrp.opcode",
- FT_UINT8, BASE_DEC, VALS(eigrp_opcode2string), 0x0,
- "Opcode - Operation code indicating the message type", HFILL }
- },
- { &hf_eigrp_flags,
- { "Flags", "eigrp.flags",
- FT_UINT32, BASE_HEX, NULL, 0x0,
- "Flag - Initialization bit and is used in establishing "
- "a new neighbor relationship", HFILL }
- },
- { &hf_eigrp_sequence,
- { "Sequence", "eigrp.seq",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- "Sequence number -- used to send messages reliably", HFILL }
- },
- { &hf_eigrp_acknowledge,
- { "Acknowledge", "eigrp.ack",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- "Acknowledge number -- used to send messages reliably", HFILL }
- },
- { &hf_eigrp_vrid,
- { "Virtual Router ID", "eigrp.vrid",
- FT_UINT16, BASE_DEC, NULL, 0,
- "Virtual Router ID - For each Virtual Router, there is a separate topology "
- "table and routing/service table; even for matching AS. "
- "This field allows the gateway to select which set router to use.", HFILL }
- },
- { &hf_eigrp_as,
- { "Autonomous System", "eigrp.as",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- "Autonomous system number - Each AS has a separate topology table "
- "which for a give routing/service table. A gateway can participate "
- "in more than one AS. This field allows the gateway to"
- "select which set of topology tables to use.", HFILL }
- },
-
- /*
- * Define eigrp_flags bits here
- *
- * Init bit definition. First unicast transmitted Update has this
- * bit set in the flags field of the fixed header. It tells the neighbor
- * to send its full topology table.
- */
- { &hf_eigrp_flags_init,
- { "Init", "eigrp.flags.init",
- FT_BOOLEAN, 32, TFS(&tfs_set_notset), EIGRP_INIT_FLAG,
- "Init - tells the neighbor to send its full topology table", HFILL }
- },
-
- /*
- * Conditionally Received - Any packet with the CR-bit set can
- * be accepted by an EIGRP speaker if and only if a previous Hello was
- * received with the SEQUENCE_TYPE TLV present.
- * This allows multicasts to be transmitted in order and reliably at the
- * same time as unicasts are transmitted.
- */
- { &hf_eigrp_flags_condrecv,
- { "Conditional Receive", "eigrp.flags.condrecv",
- FT_BOOLEAN, 32, TFS(&tfs_set_notset), EIGRP_CR_FLAG,
- "Conditionally Received the next packet if address was in listed "
- "in the previous HELLO", HFILL }
- },
-
- /*
- * Restart flag is set in the hello and the init update
- * packets during the nsf signaling period. A nsf-aware
- * router looks at the RS flag to detect if a peer is restarting
- * and maintain the adjacency. A restarting router looks at
- * this flag to determine if the peer is helping out with the restart.
- */
- { &hf_eigrp_flags_restart,
- { "Restart", "eigrp.flags.restart",
- FT_BOOLEAN, 32, TFS(&tfs_set_notset), EIGRP_RS_FLAG,
- "Restart flag - Set in the HELLO and the initial "
- "UPDATE packets during the nsf signaling period.", HFILL },
- },
-
- /*
- * EOT bit. The End-of-Table flag marks the end of the start-up updates
- * sent to a new peer. A nsf restarting router looks at this flag to
- * determine if it has finished receiving the start-up updates from all
- * peers. A nsf-aware router waits for this flag before cleaning up
- * the stale routes from the restarting peer.
- */
- { &hf_eigrp_flags_eot,
- { "End Of Table", "eigrp.flags.eot",
- FT_BOOLEAN, 32, TFS(&tfs_set_notset), EIGRP_EOT_FLAG,
- "End-of-Table - Marks the end of the start-up UPDATES indicating the "
- "complete topology database has been sent to a new peer", HFILL }
- },
-
- /**
- * TLV type definitions. Generic (protocol-independent) TLV types are
- * defined here. Protocol-specific ones are defined later
- *
- * +-----+------------------+
- * | | | |
- * | Type| Len | Vector |
- * | | | |
- * +-----+------------------+
- *
- * TLV type definitions. Generic (protocol-independent) TLV types are
- * defined here. Protocol-specific ones are defined elsewhere.
- *
- * EIGRP_PARAMETER 0x0001 parameter
- * EIGRP_AUTH 0x0002 authentication
- * EIGRP_SEQUENCE 0x0003 sequenced packet
- * EIGRP_SW_VERSION 0x0004 software version
- * EIGRP_NEXT_MCAST_SEQ 0x0005 multicast sequence
- * EIGRP_PEER_STUBINFO 0x0006 stub information
- * EIGRP_PEER_TERMINATION 0x0007 peer termination
- */
- { &hf_eigrp_tlv_type,
- { "Type", "eigrp.tlv_type",
- FT_UINT16, BASE_HEX, VALS(eigrp_tlv2string), 0x0,
- "TLV Type", HFILL }
- },
- { &hf_eigrp_tlv_len,
- { "Length", "eigrp.tlv.len",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- "TLV Length", HFILL }
- },
+ /*
+ *
+ * EIGRP Packet Header definitions
+ *
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * |Ver | Opcode | Checksum |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Flags |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Sequence number |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Acknowledgement number |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Virtual Router ID | Autonomous system number |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+ { &hf_eigrp_version,
+ { "Version", "eigrp.version",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Version - Version of EIGRP packet format", HFILL }
+ },
+ { &hf_eigrp_opcode,
+ { "Opcode", "eigrp.opcode",
+ FT_UINT8, BASE_DEC, VALS(eigrp_opcode2string), 0x0,
+ "Opcode - Operation code indicating the message type", HFILL }
+ },
+ { &hf_eigrp_flags,
+ { "Flags", "eigrp.flags",
+ FT_UINT32, BASE_HEX, NULL, 0x0,
+ "Flag - Initialization bit and is used in establishing "
+ "a new neighbor relationship", HFILL }
+ },
+ { &hf_eigrp_sequence,
+ { "Sequence", "eigrp.seq",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Sequence number -- used to send messages reliably", HFILL }
+ },
+ { &hf_eigrp_acknowledge,
+ { "Acknowledge", "eigrp.ack",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Acknowledge number -- used to send messages reliably", HFILL }
+ },
+ { &hf_eigrp_vrid,
+ { "Virtual Router ID", "eigrp.vrid",
+ FT_UINT16, BASE_DEC, NULL, 0,
+ "Virtual Router ID - For each Virtual Router, there is a separate topology "
+ "table and routing/service table; even for matching AS. "
+ "This field allows the gateway to select which set router to use.", HFILL }
+ },
+ { &hf_eigrp_as,
+ { "Autonomous System", "eigrp.as",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "Autonomous system number - Each AS has a separate topology table "
+ "which for a give routing/service table. A gateway can participate "
+ "in more than one AS. This field allows the gateway to"
+ "select which set of topology tables to use.", HFILL }
+ },
+
+ /*
+ * Define eigrp_flags bits here
+ *
+ * Init bit definition. First unicast transmitted Update has this
+ * bit set in the flags field of the fixed header. It tells the neighbor
+ * to send its full topology table.
+ */
+ { &hf_eigrp_flags_init,
+ { "Init", "eigrp.flags.init",
+ FT_BOOLEAN, 32, TFS(&tfs_set_notset), EIGRP_INIT_FLAG,
+ "Init - tells the neighbor to send its full topology table", HFILL }
+ },
+
+ /*
+ * Conditionally Received - Any packet with the CR-bit set can
+ * be accepted by an EIGRP speaker if and only if a previous Hello was
+ * received with the SEQUENCE_TYPE TLV present.
+ * This allows multicasts to be transmitted in order and reliably at the
+ * same time as unicasts are transmitted.
+ */
+ { &hf_eigrp_flags_condrecv,
+ { "Conditional Receive", "eigrp.flags.condrecv",
+ FT_BOOLEAN, 32, TFS(&tfs_set_notset), EIGRP_CR_FLAG,
+ "Conditionally Received the next packet if address was in listed "
+ "in the previous HELLO", HFILL }
+ },
+
+ /*
+ * Restart flag is set in the hello and the init update
+ * packets during the nsf signaling period. A nsf-aware
+ * router looks at the RS flag to detect if a peer is restarting
+ * and maintain the adjacency. A restarting router looks at
+ * this flag to determine if the peer is helping out with the restart.
+ */
+ { &hf_eigrp_flags_restart,
+ { "Restart", "eigrp.flags.restart",
+ FT_BOOLEAN, 32, TFS(&tfs_set_notset), EIGRP_RS_FLAG,
+ "Restart flag - Set in the HELLO and the initial "
+ "UPDATE packets during the nsf signaling period.", HFILL },
+ },
+
+ /*
+ * EOT bit. The End-of-Table flag marks the end of the start-up updates
+ * sent to a new peer. A nsf restarting router looks at this flag to
+ * determine if it has finished receiving the start-up updates from all
+ * peers. A nsf-aware router waits for this flag before cleaning up
+ * the stale routes from the restarting peer.
+ */
+ { &hf_eigrp_flags_eot,
+ { "End Of Table", "eigrp.flags.eot",
+ FT_BOOLEAN, 32, TFS(&tfs_set_notset), EIGRP_EOT_FLAG,
+ "End-of-Table - Marks the end of the start-up UPDATES indicating the "
+ "complete topology database has been sent to a new peer", HFILL }
+ },
+
+ /**
+ * TLV type definitions. Generic (protocol-independent) TLV types are
+ * defined here. Protocol-specific ones are defined later
+ *
+ * +-----+------------------+
+ * | | | |
+ * | Type| Len | Vector |
+ * | | | |
+ * +-----+------------------+
+ *
+ * TLV type definitions. Generic (protocol-independent) TLV types are
+ * defined here. Protocol-specific ones are defined elsewhere.
+ *
+ * EIGRP_PARAMETER 0x0001 parameter
+ * EIGRP_AUTH 0x0002 authentication
+ * EIGRP_SEQUENCE 0x0003 sequenced packet
+ * EIGRP_SW_VERSION 0x0004 software version
+ * EIGRP_NEXT_MCAST_SEQ 0x0005 multicast sequence
+ * EIGRP_PEER_STUBINFO 0x0006 stub information
+ * EIGRP_PEER_TERMINATION 0x0007 peer termination
+ */
+ { &hf_eigrp_tlv_type,
+ { "Type", "eigrp.tlv_type",
+ FT_UINT16, BASE_HEX, VALS(eigrp_tlv2string), 0x0,
+ "TLV Type", HFILL }
+ },
+ { &hf_eigrp_tlv_len,
+ { "Length", "eigrp.tlv.len",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "TLV Length", HFILL }
+ },
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Parameters TLV
*/
- { &hf_eigrp_par_k1, { "K1", "eigrp.par.k1", FT_UINT8, BASE_DEC, NULL, 0x0,
- "Bandwidth/Throughput Coefficient", HFILL }},
- { &hf_eigrp_par_k2, { "K2", "eigrp.par.k2", FT_UINT8, BASE_DEC, NULL, 0x0,
- "Load Coefficient", HFILL }},
- { &hf_eigrp_par_k3, { "K3", "eigrp.par.k3", FT_UINT8, BASE_DEC, NULL, 0x0,
- "Delay/Latency Coefficient", HFILL }},
- { &hf_eigrp_par_k4, { "K4", "eigrp.par.k4", FT_UINT8, BASE_DEC, NULL, 0x0,
- "Reliability Coefficient", HFILL }},
- { &hf_eigrp_par_k5, { "K5", "eigrp.par.k5", FT_UINT8, BASE_DEC, NULL, 0x0,
- "Reliability Coefficient", HFILL }},
- { &hf_eigrp_par_k6, { "K6", "eigrp.par.k6", FT_UINT8, BASE_DEC, NULL, 0x0,
- "Extended Metric Coefficient", HFILL }},
- { &hf_eigrp_par_holdtime,
- { "Hold Time", "eigrp.par.holdtime", FT_UINT16, BASE_DEC, NULL, 0x0,
- "How long to ignore lost HELLO's", HFILL }
- },
+ { &hf_eigrp_par_k1, { "K1", "eigrp.par.k1", FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Bandwidth/Throughput Coefficient", HFILL }},
+ { &hf_eigrp_par_k2, { "K2", "eigrp.par.k2", FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Load Coefficient", HFILL }},
+ { &hf_eigrp_par_k3, { "K3", "eigrp.par.k3", FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Delay/Latency Coefficient", HFILL }},
+ { &hf_eigrp_par_k4, { "K4", "eigrp.par.k4", FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Reliability Coefficient", HFILL }},
+ { &hf_eigrp_par_k5, { "K5", "eigrp.par.k5", FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Reliability Coefficient", HFILL }},
+ { &hf_eigrp_par_k6, { "K6", "eigrp.par.k6", FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Extended Metric Coefficient", HFILL }},
+ { &hf_eigrp_par_holdtime,
+ { "Hold Time", "eigrp.par.holdtime", FT_UINT16, BASE_DEC, NULL, 0x0,
+ "How long to ignore lost HELLO's", HFILL }
+ },
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Authentication TLV
*/
- { &hf_eigrp_auth_type,
- { "Type", "eigrp.auth.type",
- FT_UINT16, BASE_DEC, VALS(eigrp_auth2string), 0x0,
- NULL, HFILL }
- },
- { &hf_eigrp_auth_len,
- { "Length", "eigrp.auth.length",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_eigrp_auth_keyid,
- { "Key ID", "eigrp.auth.keyid",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_eigrp_auth_keyseq,
- { "Key Sequence", "eigrp.auth.keyseq",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_eigrp_auth_digest,
- { "Digest", "eigrp.auth.digest",
- FT_BYTES, BASE_NONE, NULL, 0x0,
- NULL, HFILL }
- },
+ { &hf_eigrp_auth_type,
+ { "Type", "eigrp.auth.type",
+ FT_UINT16, BASE_DEC, VALS(eigrp_auth2string), 0x0,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_auth_len,
+ { "Length", "eigrp.auth.length",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_auth_keyid,
+ { "Key ID", "eigrp.auth.keyid",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_auth_keyseq,
+ { "Key Sequence", "eigrp.auth.keyseq",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_auth_digest,
+ { "Digest", "eigrp.auth.digest",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Sequence TLV
*/
- { &hf_eigrp_seq_addrlen,
- { "Address length", "eigrp.seq.addrlen",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_eigrp_seq_ipv4addr,
- { "IP Address", "eigrp.seq.ipv4addr",
- FT_IPv4, BASE_NONE, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_eigrp_seq_ipv6addr,
- { "IPv6 Address", "eigrp.seq.ipv6addr",
- FT_IPv6, BASE_NONE, NULL, 0x0,
- NULL, HFILL }
- },
+ { &hf_eigrp_seq_addrlen,
+ { "Address length", "eigrp.seq.addrlen",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_seq_ipv4addr,
+ { "IP Address", "eigrp.seq.ipv4addr",
+ FT_IPv4, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_seq_ipv6addr,
+ { "IPv6 Address", "eigrp.seq.ipv6addr",
+ FT_IPv6, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Next Multicast Sequence
*/
- /*
- * This was added to the hello containing the sequence TLV so that the
- * hello packet could be more tightly bound to the multicast packet bearing
- * the CR bit that follows it. The sequence number of the impending multicast
- * is carried herein.
- */
- { &hf_eigrp_next_mcast_seq,
- { "Multicast Sequence", "eigrp.next_mcast_seq",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- NULL, HFILL }
- },
+ /*
+ * This was added to the hello containing the sequence TLV so that the
+ * hello packet could be more tightly bound to the multicast packet bearing
+ * the CR bit that follows it. The sequence number of the impending multicast
+ * is carried herein.
+ */
+ { &hf_eigrp_next_mcast_seq,
+ { "Multicast Sequence", "eigrp.next_mcast_seq",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Peer Stub Information TLV
*/
- { &hf_eigrp_stub_flags,
- { "Stub Options", "eigrp.stub_options",
- FT_UINT16, BASE_HEX, NULL, 0x0,
- NULL, HFILL }
- },
-
- /*
- * Define eigrp_stub_flags bits here
- */
- { &hf_eigrp_stub_flags_connected,
- { "Connected", "eigrp.stub_options.connected",
- FT_BOOLEAN, 16, TFS(&tfs_set_notset), EIGRP_PEER_ALLOWS_CONNECTED,
- NULL, HFILL }
- },
- { &hf_eigrp_stub_flags_static,
- { "Static", "eigrp.stub_options.static",
- FT_BOOLEAN, 16, TFS(&tfs_set_notset), EIGRP_PEER_ALLOWS_STATIC,
- NULL, HFILL }
- },
- { &hf_eigrp_stub_flags_summary,
- { "Summary", "eigrp.stub_options.summary",
- FT_BOOLEAN, 16, TFS(&tfs_set_notset), EIGRP_PEER_ALLOWS_SUMMARY,
- NULL, HFILL }
- },
- { &hf_eigrp_stub_flags_redist,
- { "Redistributed", "eigrp.stub_options.redist",
- FT_BOOLEAN, 16, TFS(&tfs_set_notset), EIGRP_PEER_ALLOWS_REDIST,
- NULL, HFILL }
- },
- { &hf_eigrp_stub_flags_leakmap,
- { "Leak-Map", "eigrp.stub_options.leakmap",
- FT_BOOLEAN, 16, TFS(&tfs_set_notset), EIGRP_PEER_ALLOWS_LEAKING,
- NULL, HFILL }
- },
- { &hf_eigrp_stub_flags_recvonly,
- { "Receive-Only", "eigrp.stub_options.recvonly",
- FT_BOOLEAN, 16, TFS(&tfs_set_notset), EIGRP_PEER_ALLOWS_RCVONLY,
- NULL, HFILL }
- },
+ { &hf_eigrp_stub_flags,
+ { "Stub Options", "eigrp.stub_options",
+ FT_UINT16, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+
+ /*
+ * Define eigrp_stub_flags bits here
+ */
+ { &hf_eigrp_stub_flags_connected,
+ { "Connected", "eigrp.stub_options.connected",
+ FT_BOOLEAN, 16, TFS(&tfs_set_notset), EIGRP_PEER_ALLOWS_CONNECTED,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_stub_flags_static,
+ { "Static", "eigrp.stub_options.static",
+ FT_BOOLEAN, 16, TFS(&tfs_set_notset), EIGRP_PEER_ALLOWS_STATIC,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_stub_flags_summary,
+ { "Summary", "eigrp.stub_options.summary",
+ FT_BOOLEAN, 16, TFS(&tfs_set_notset), EIGRP_PEER_ALLOWS_SUMMARY,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_stub_flags_redist,
+ { "Redistributed", "eigrp.stub_options.redist",
+ FT_BOOLEAN, 16, TFS(&tfs_set_notset), EIGRP_PEER_ALLOWS_REDIST,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_stub_flags_leakmap,
+ { "Leak-Map", "eigrp.stub_options.leakmap",
+ FT_BOOLEAN, 16, TFS(&tfs_set_notset), EIGRP_PEER_ALLOWS_LEAKING,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_stub_flags_recvonly,
+ { "Receive-Only", "eigrp.stub_options.recvonly",
+ FT_BOOLEAN, 16, TFS(&tfs_set_notset), EIGRP_PEER_ALLOWS_RCVONLY,
+ NULL, HFILL }
+ },
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Peer Termination TLV
*/
- /* Place holder - this TLV has no options */
+ /* Place holder - this TLV has no options */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* EIGRP 3.0 Vector Header (deprecated)
*/
- /*
- * common header for all version 3 tlvs
- */
- { &hf_eigrp_tid,
- { "Topology", "eigrp.tid",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_eigrp_afi,
- { "AFI", "eigrp.afi",
- FT_UINT16, BASE_DEC, VALS(eigrp_afi2string), 0x0,
- NULL, HFILL }
- },
+ /*
+ * common header for all version 3 tlvs
+ */
+ { &hf_eigrp_tid,
+ { "Topology", "eigrp.tid",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_afi,
+ { "AFI", "eigrp.afi",
+ FT_UINT16, BASE_DEC, VALS(eigrp_afi2string), 0x0,
+ NULL, HFILL }
+ },
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* EIGRP TLV 1.2 (legacy) and TLV 3.0 Metric (deprecated) definition
*/
- { &hf_eigrp_legacy_metric_delay,
- { "Scaled Delay", "eigrp.old_metric.delay",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- "delay, in 39.1 nanosec interments", HFILL }
- },
- { &hf_eigrp_legacy_metric_bw,
- { "Scaled BW", "eigrp.old_metric.bw",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- "bandwidth, in units of 1 Kbit/sec", HFILL }
- },
- { &hf_eigrp_legacy_metric_mtu,
- { "MTU", "eigrp.old_metric.mtu",
- FT_UINT24, BASE_DEC, NULL, 0x0,
- "MTU, in octets", HFILL }
- },
- { &hf_eigrp_legacy_metric_hopcount,
- { "Hop Count", "eigrp.old_metric.hopcount",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Number of hops to destination", HFILL }
- },
- { &hf_eigrp_legacy_metric_rel,
- { "Reliability", "eigrp.old_metric.rel",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "percent packets successfully tx/rx", HFILL }
- },
- { &hf_eigrp_legacy_metric_load,
- { "Load", "eigrp.old_metric.load",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "percent of channel occupied", HFILL }
- },
- { &hf_eigrp_legacy_metric_intag,
- { "Route Tag", "eigrp.old_metric.intag",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Internal Route Tag", HFILL }
- },
+ { &hf_eigrp_legacy_metric_delay,
+ { "Scaled Delay", "eigrp.old_metric.delay",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "delay, in 39.1 nanosec interments", HFILL }
+ },
+ { &hf_eigrp_legacy_metric_bw,
+ { "Scaled BW", "eigrp.old_metric.bw",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "bandwidth, in units of 1 Kbit/sec", HFILL }
+ },
+ { &hf_eigrp_legacy_metric_mtu,
+ { "MTU", "eigrp.old_metric.mtu",
+ FT_UINT24, BASE_DEC, NULL, 0x0,
+ "MTU, in octets", HFILL }
+ },
+ { &hf_eigrp_legacy_metric_hopcount,
+ { "Hop Count", "eigrp.old_metric.hopcount",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Number of hops to destination", HFILL }
+ },
+ { &hf_eigrp_legacy_metric_rel,
+ { "Reliability", "eigrp.old_metric.rel",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "percent packets successfully tx/rx", HFILL }
+ },
+ { &hf_eigrp_legacy_metric_load,
+ { "Load", "eigrp.old_metric.load",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "percent of channel occupied", HFILL }
+ },
+ { &hf_eigrp_legacy_metric_intag,
+ { "Route Tag", "eigrp.old_metric.intag",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Internal Route Tag", HFILL }
+ },
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* EIGRP 3.0 TIDLIST TLV (only survivor in MTR)
*/
- { &hf_eigrp_tidlist,
- { "TID List", "eigrp.tidlist",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_eigrp_tidlist_flags,
- { "TID List Flags", "eigrp.tidlist.flags",
- FT_UINT16, BASE_HEX, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_eigrp_tidlist_len,
- { "TID List Size", "eigrp.tidlist.len",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_eigrp_routerid,
- { "RouterID", "eigrp.routerid",
- FT_IPv4, BASE_NONE, NULL, 0x0,
- "Router ID of injecting router", HFILL }
- },
- { &hf_eigrp_legacy_metric_tag,
- { "Tag", "eigrp.old_metric.tag",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- "route tag", HFILL }
- },
+ { &hf_eigrp_tidlist,
+ { "TID List", "eigrp.tidlist",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_tidlist_flags,
+ { "TID List Flags", "eigrp.tidlist.flags",
+ FT_UINT16, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_tidlist_len,
+ { "TID List Size", "eigrp.tidlist.len",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_routerid,
+ { "RouterID", "eigrp.routerid",
+ FT_IPv4, BASE_NONE, NULL, 0x0,
+ "Router ID of injecting router", HFILL }
+ },
+ { &hf_eigrp_legacy_metric_tag,
+ { "Tag", "eigrp.old_metric.tag",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "route tag", HFILL }
+ },
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* PDM opaque flag field definitions
*/
- { &hf_eigrp_metric_flags_srcwd,
- { "Source Withdraw", "eigrp.metric.flags.srcwd",
- FT_BOOLEAN, 8, TFS(&tfs_true_false), EIGRP_OPAQUE_SRCWD,
- "Route Source Withdraw", HFILL }
- },
- { &hf_eigrp_metric_flags_active,
- { "Route is Active", "eigrp.metric.flags.active",
- FT_BOOLEAN, 8, TFS(&tfs_true_false), EIGRP_OPAQUE_ACTIVE,
- "Route is currently in active state", HFILL }
- },
- { &hf_eigrp_metric_flags_repl,
- { "Route is Replicated", "eigrp.metric.flags.repl",
- FT_BOOLEAN, 8, TFS(&tfs_true_false), EIGRP_OPAQUE_REPL,
- "Route is replicated from different tableid", HFILL }
- },
+ { &hf_eigrp_metric_flags_srcwd,
+ { "Source Withdraw", "eigrp.metric.flags.srcwd",
+ FT_BOOLEAN, 8, TFS(&tfs_true_false), EIGRP_OPAQUE_SRCWD,
+ "Route Source Withdraw", HFILL }
+ },
+ { &hf_eigrp_metric_flags_active,
+ { "Route is Active", "eigrp.metric.flags.active",
+ FT_BOOLEAN, 8, TFS(&tfs_true_false), EIGRP_OPAQUE_ACTIVE,
+ "Route is currently in active state", HFILL }
+ },
+ { &hf_eigrp_metric_flags_repl,
+ { "Route is Replicated", "eigrp.metric.flags.repl",
+ FT_BOOLEAN, 8, TFS(&tfs_true_false), EIGRP_OPAQUE_REPL,
+ "Route is replicated from different tableid", HFILL }
+ },
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* EIGRP TLV 1.2/3.0 ExtData Definitions
*/
- { &hf_eigrp_extdata_origrid,
- { "Originating RouterID", "eigrp.extdata.origrid",
- FT_IPv4, BASE_NONE, NULL, 0x0,
- "Router ID of redistributing router", HFILL }
- },
-
- { &hf_eigrp_extdata_as,
- { "Originating A.S.", "eigrp.extdata.as",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- "Autonomous System of redistributing protocol", HFILL }
- },
-
- { &hf_eigrp_extdata_tag,
- { "Administrative Tag", "eigrp.extdata.tag",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- "Administrative Route Tag", HFILL }
- },
- { &hf_eigrp_extdata_metric,
- { "External Metric", "eigrp.extdata.metric",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- "Metric reported by redistributing protocol", HFILL }
- },
- { &hf_eigrp_extdata_reserved,
- { "Reserved", "eigrp.extdata.reserved",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }
- },
-
- /* IPX ExtData Definitions */
- { &hf_eigrp_ipx_extdata_delay,
- { "External Delay", "eigrp.extdata.ipx_delay",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- "Delay reported by redistributing protocol", HFILL }
- },
- { &hf_eigrp_ipx_extdata_metric,
- { "External Metric", "eigrp.extdata.ipx_metric",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- "Delay reported by redistributing protocol", HFILL }
- },
-
- { &hf_eigrp_extdata_proto,
- { "External Protocol ID", "eigrp.extdata.proto",
- FT_UINT8, BASE_DEC, VALS(eigrp_proto2string), 0x0,
- NULL, HFILL }
- },
-
- { &hf_eigrp_extdata_flag_ext,
- { "Route is External", "eigrp.opaque.flag.ext",
- FT_BOOLEAN, 8, TFS(&tfs_true_false), EIGRP_OPAQUE_EXT,
- "External route", HFILL }
- },
- { &hf_eigrp_extdata_flag_cd,
- { "Route is Candidate Default", "eigrp.opaque.flag.cd",
- FT_BOOLEAN, 8, TFS(&tfs_true_false), EIGRP_OPAQUE_CD,
- "Candidate-Default route", HFILL }
- },
+ { &hf_eigrp_extdata_origrid,
+ { "Originating RouterID", "eigrp.extdata.origrid",
+ FT_IPv4, BASE_NONE, NULL, 0x0,
+ "Router ID of redistributing router", HFILL }
+ },
+
+ { &hf_eigrp_extdata_as,
+ { "Originating A.S.", "eigrp.extdata.as",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Autonomous System of redistributing protocol", HFILL }
+ },
+
+ { &hf_eigrp_extdata_tag,
+ { "Administrative Tag", "eigrp.extdata.tag",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Administrative Route Tag", HFILL }
+ },
+ { &hf_eigrp_extdata_metric,
+ { "External Metric", "eigrp.extdata.metric",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Metric reported by redistributing protocol", HFILL }
+ },
+ { &hf_eigrp_extdata_reserved,
+ { "Reserved", "eigrp.extdata.reserved",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+
+ /* IPX ExtData Definitions */
+ { &hf_eigrp_ipx_extdata_delay,
+ { "External Delay", "eigrp.extdata.ipx_delay",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "Delay reported by redistributing protocol", HFILL }
+ },
+ { &hf_eigrp_ipx_extdata_metric,
+ { "External Metric", "eigrp.extdata.ipx_metric",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "Delay reported by redistributing protocol", HFILL }
+ },
+
+ { &hf_eigrp_extdata_proto,
+ { "External Protocol ID", "eigrp.extdata.proto",
+ FT_UINT8, BASE_DEC, VALS(eigrp_proto2string), 0x0,
+ NULL, HFILL }
+ },
+
+ { &hf_eigrp_extdata_flag_ext,
+ { "Route is External", "eigrp.opaque.flag.ext",
+ FT_BOOLEAN, 8, TFS(&tfs_true_false), EIGRP_OPAQUE_EXT,
+ "External route", HFILL }
+ },
+ { &hf_eigrp_extdata_flag_cd,
+ { "Route is Candidate Default", "eigrp.opaque.flag.cd",
+ FT_BOOLEAN, 8, TFS(&tfs_true_false), EIGRP_OPAQUE_CD,
+ "Candidate-Default route", HFILL }
+ },
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* EIGRP TLV 2.0 "Wide" Metric format definition
*/
- /* Number of 16bit words in the metric section, used to determine the
- * start of the destination/attribute information.
- */
- { &hf_eigrp_metric_offset,
- { "Offset", "eigrp.metric.offset",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Number of 16bit words to reach the start of the"
- "destination/attribute information", HFILL }
- },
-
- /* Priority of the prefix when transmitting a group of destination
- * addresses to neighboring routers. A priority of zero indicates no
- * priority is set.
- */
- { &hf_eigrp_metric_priority,
- { "Priority", "eigrp.metric.priority",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Priority of the prefix for ordering transmission", HFILL }
- },
-
- /** The current error rate for the path. Measured as an error
- * percentage. A value of 255 indicates 100% reliability
- */
- { &hf_eigrp_metric_rel,
- { "Reliability", "eigrp.metric.reliability",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "percent packets successfully tx/rx", HFILL }
- },
-
- /** The load utilization of the path to the destination. Measured as a
- * percentage of load. A value of 255 indicates 100% load.
- */
- { &hf_eigrp_metric_load,
- { "Load", "eigrp.metric.load",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "percent of channel occupied", HFILL }
- },
-
- /** The minimum maximum transmission unit size for the path to the
- * destination. Not used in metric calculation, but available to
- * underlying protocols
- */
- { &hf_eigrp_metric_mtu,
- { "MTU", "eigrp.metric.mtu",
- FT_UINT24, BASE_DEC, NULL, 0x0,
- "MTU, in octets", HFILL }
- },
-
- /** number of router traversals to the destination */
- { &hf_eigrp_metric_hopcount,
- { "Hop Count", "eigrp.metric.hopcount",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Number of hops to destination", HFILL }
- },
-
- /* Reserved - Transmitted as 0x0000 */
- { &hf_eigrp_metric_reserved,
- { "Reserved", "eigrp.metric.reserved",
- FT_UINT16, BASE_HEX, NULL, 0x0,
- NULL, HFILL }
- },
+ /* Number of 16bit words in the metric section, used to determine the
+ * start of the destination/attribute information.
+ */
+ { &hf_eigrp_metric_offset,
+ { "Offset", "eigrp.metric.offset",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Number of 16bit words to reach the start of the"
+ "destination/attribute information", HFILL }
+ },
+
+ /* Priority of the prefix when transmitting a group of destination
+ * addresses to neighboring routers. A priority of zero indicates no
+ * priority is set.
+ */
+ { &hf_eigrp_metric_priority,
+ { "Priority", "eigrp.metric.priority",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Priority of the prefix for ordering transmission", HFILL }
+ },
+
+ /** The current error rate for the path. Measured as an error
+ * percentage. A value of 255 indicates 100% reliability
+ */
+ { &hf_eigrp_metric_rel,
+ { "Reliability", "eigrp.metric.reliability",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "percent packets successfully tx/rx", HFILL }
+ },
+
+ /** The load utilization of the path to the destination. Measured as a
+ * percentage of load. A value of 255 indicates 100% load.
+ */
+ { &hf_eigrp_metric_load,
+ { "Load", "eigrp.metric.load",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "percent of channel occupied", HFILL }
+ },
+
+ /** The minimum maximum transmission unit size for the path to the
+ * destination. Not used in metric calculation, but available to
+ * underlying protocols
+ */
+ { &hf_eigrp_metric_mtu,
+ { "MTU", "eigrp.metric.mtu",
+ FT_UINT24, BASE_DEC, NULL, 0x0,
+ "MTU, in octets", HFILL }
+ },
+
+ /** number of router traversals to the destination */
+ { &hf_eigrp_metric_hopcount,
+ { "Hop Count", "eigrp.metric.hopcount",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Number of hops to destination", HFILL }
+ },
+
+ /* Reserved - Transmitted as 0x0000 */
+ { &hf_eigrp_metric_reserved,
+ { "Reserved", "eigrp.metric.reserved",
+ FT_UINT16, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }
+ },
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* EIGRP TLV 2.0 Extended Metric Attributes
*/
- { &hf_eigrp_attr_opcode,
- { "Opcode", "eigrp.attr.opcode",
- FT_UINT8, BASE_DEC, VALS(eigrp_attr_opcode2string), 0x0,
- "Opcode - Operation code indicating the attribute type", HFILL }
- },
- { &hf_eigrp_attr_offset,
- { "Offset", "eigrp.attr.offset",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- "Number of 2 byte words of data", HFILL }
- },
- { &hf_eigrp_attr_scaled,
- { "Legacy Metric", "eigrp.attr.scaled",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- "Metric calculated from legacy TLVs", HFILL }
- },
- { &hf_eigrp_attr_tag,
- { "Tag", "eigrp.attr.tag",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- "Tag assigned by admin for dest", HFILL }
- },
- { &hf_eigrp_attr_jitter,
- { "Jitter", "eigrp.attr.jitter",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- "Variation in path delay", HFILL }
- },
- { &hf_eigrp_attr_qenergy,
- { "Q-Energy", "eigrp.attr.qenergy",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- "Non-Active energy usage along path", HFILL }
- },
- { &hf_eigrp_attr_energy,
- { "Energy", "eigrp.attr.energy",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- "Active energy usage along path", HFILL }
- },
+ { &hf_eigrp_attr_opcode,
+ { "Opcode", "eigrp.attr.opcode",
+ FT_UINT8, BASE_DEC, VALS(eigrp_attr_opcode2string), 0x0,
+ "Opcode - Operation code indicating the attribute type", HFILL }
+ },
+ { &hf_eigrp_attr_offset,
+ { "Offset", "eigrp.attr.offset",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Number of 2 byte words of data", HFILL }
+ },
+ { &hf_eigrp_attr_scaled,
+ { "Legacy Metric", "eigrp.attr.scaled",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "Metric calculated from legacy TLVs", HFILL }
+ },
+ { &hf_eigrp_attr_tag,
+ { "Tag", "eigrp.attr.tag",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "Tag assigned by admin for dest", HFILL }
+ },
+ { &hf_eigrp_attr_jitter,
+ { "Jitter", "eigrp.attr.jitter",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "Variation in path delay", HFILL }
+ },
+ { &hf_eigrp_attr_qenergy,
+ { "Q-Energy", "eigrp.attr.qenergy",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "Non-Active energy usage along path", HFILL }
+ },
+ { &hf_eigrp_attr_energy,
+ { "Energy", "eigrp.attr.energy",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ "Active energy usage along path", HFILL }
+ },
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IPv4 specific address definitions
*/
- { &hf_eigrp_ipv4_nexthop,
- { "NextHop", "eigrp.ipv4.nexthop",
- FT_IPv4, BASE_NONE, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_eigrp_ipv4_prefixlen,
- { "Prefix Length", "eigrp.ipv4.prefixlen",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL, HFILL }
- },
+ { &hf_eigrp_ipv4_nexthop,
+ { "NextHop", "eigrp.ipv4.nexthop",
+ FT_IPv4, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_ipv4_prefixlen,
+ { "Prefix Length", "eigrp.ipv4.prefixlen",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IPv6 specific address definitions
*/
- { &hf_eigrp_ipv6_nexthop,
- { "NextHop", "eigrp.ipv6.nexthop",
- FT_IPv6, BASE_NONE, NULL, 0x0,
- NULL, HFILL }
- },
+ { &hf_eigrp_ipv6_nexthop,
+ { "NextHop", "eigrp.ipv6.nexthop",
+ FT_IPv6, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
- { &hf_eigrp_ipv6_prefixlen,
- { "Prefix Length", "eigrp.ipv6.prefixlen",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL, HFILL }
- },
+ { &hf_eigrp_ipv6_prefixlen,
+ { "Prefix Length", "eigrp.ipv6.prefixlen",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IPX specific address definitions
*/
- { &hf_eigrp_ipx_nexthop_net,
- { "NextHop Net", "eigrp.ipx.nexthop_net",
- FT_IPXNET, BASE_NONE, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_eigrp_ipx_nexthop_host,
- { "NextHop Host", "eigrp.ipx.nexthop_host",
- FT_ETHER, BASE_NONE, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_eigrp_ipx_extdata_routerid,
- { "External RouterID", "eigrp.ipx.routerid",
- FT_ETHER, BASE_NONE, NULL, 0x0,
- "Router ID of redistributing router", HFILL }
- },
- { &hf_eigrp_ipx_dest,
- { "Destination", "eigrp.ipx.dest",
- FT_IPXNET, BASE_NONE, NULL, 0x0,
- NULL, HFILL }
- },
+ { &hf_eigrp_ipx_nexthop_net,
+ { "NextHop Net", "eigrp.ipx.nexthop_net",
+ FT_IPXNET, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_ipx_nexthop_host,
+ { "NextHop Host", "eigrp.ipx.nexthop_host",
+ FT_ETHER, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_ipx_extdata_routerid,
+ { "External RouterID", "eigrp.ipx.routerid",
+ FT_ETHER, BASE_NONE, NULL, 0x0,
+ "Router ID of redistributing router", HFILL }
+ },
+ { &hf_eigrp_ipx_dest,
+ { "Destination", "eigrp.ipx.dest",
+ FT_IPXNET, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* AppleTalk specific address definitions
*/
- { &hf_eigrp_atalk_routerid,
- { "AppleTalk Router ID", "eigrp.atalk.routerid",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- NULL, HFILL }
- },
+ { &hf_eigrp_atalk_routerid,
+ { "AppleTalk Router ID", "eigrp.atalk.routerid",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Service Advertisement Framework definitions
*/
- { &hf_eigrp_saf_service,
- { "Service", "eigrp.saf.service",
- FT_UINT16, BASE_DEC, VALS(eigrp_saf_srv2string), 0x0,
- NULL, HFILL }
- },
- { &hf_eigrp_saf_subservice,
- { "Sub-Service", "eigrp.saf.subservice",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_eigrp_saf_guid,
- { "GUID", "eigrp.saf.guid",
- FT_GUID, BASE_NONE, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_eigrp_saf_data_type,
- { "Type", "eigrp.saf.data.type",
- FT_UINT16, BASE_HEX, VALS(eigrp_saf_type2string), 0x0,
- "SAF Message Data Type", HFILL }
- },
- { &hf_eigrp_saf_data_length,
- { "Length", "eigrp.saf.data.length",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_eigrp_saf_data_sequence,
- { "Sequence", "eigrp.saf.data.sequence",
- FT_UINT32, BASE_DEC, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_eigrp_saf_reachability_afi,
- { "AFI", "eigrp.saf.data.reachability.afi",
- FT_UINT16, BASE_DEC, VALS(eigrp_afi2string), 0x0,
- NULL, HFILL }
- },
- { &hf_eigrp_saf_reachability_port,
- { "Port", "eigrp.saf.data.reachability.port",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_eigrp_saf_reachability_protocol,
- { "Protocol", "eigrp.saf.data.reachability.protocol",
- FT_UINT16, BASE_DEC, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_eigrp_saf_reachability_addr_ipv4,
- { "IPv4 Addr", "eigrp.saf.data.reachability.addr_ipv4",
- FT_IPv4, BASE_NONE, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_eigrp_saf_reachability_addr_ipv6,
- { "IPv6 Addr", "eigrp.saf.data.reachability.addr_ipv6",
- FT_IPv6, BASE_NONE, NULL, 0x0,
- NULL, HFILL }
- },
- { &hf_eigrp_saf_reachability_addr_hex,
- { "Addr", "eigrp.saf.data.reachability.addr_hex",
- FT_BYTES, BASE_NONE, NULL, 0x0,
- NULL, HFILL }
- },
-
- /* misc field used in a couple places */
- { &hf_eigrp_nullpad,
- { "Nullpad", "eigrp.nullpad",
- FT_BYTES, BASE_NONE, NULL, 0x0,
- NULL, HFILL }
- },
+ { &hf_eigrp_saf_service,
+ { "Service", "eigrp.saf.service",
+ FT_UINT16, BASE_DEC, VALS(eigrp_saf_srv2string), 0x0,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_saf_subservice,
+ { "Sub-Service", "eigrp.saf.subservice",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_saf_guid,
+ { "GUID", "eigrp.saf.guid",
+ FT_GUID, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_saf_data_type,
+ { "Type", "eigrp.saf.data.type",
+ FT_UINT16, BASE_HEX, VALS(eigrp_saf_type2string), 0x0,
+ "SAF Message Data Type", HFILL }
+ },
+ { &hf_eigrp_saf_data_length,
+ { "Length", "eigrp.saf.data.length",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_saf_data_sequence,
+ { "Sequence", "eigrp.saf.data.sequence",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_saf_reachability_afi,
+ { "AFI", "eigrp.saf.data.reachability.afi",
+ FT_UINT16, BASE_DEC, VALS(eigrp_afi2string), 0x0,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_saf_reachability_port,
+ { "Port", "eigrp.saf.data.reachability.port",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_saf_reachability_protocol,
+ { "Protocol", "eigrp.saf.data.reachability.protocol",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_saf_reachability_addr_ipv4,
+ { "IPv4 Addr", "eigrp.saf.data.reachability.addr_ipv4",
+ FT_IPv4, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_saf_reachability_addr_ipv6,
+ { "IPv6 Addr", "eigrp.saf.data.reachability.addr_ipv6",
+ FT_IPv6, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_eigrp_saf_reachability_addr_hex,
+ { "Addr", "eigrp.saf.data.reachability.addr_hex",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
+
+ /* misc field used in a couple places */
+ { &hf_eigrp_nullpad,
+ { "Nullpad", "eigrp.nullpad",
+ FT_BYTES, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
};
/* Setup protocol subtree array */
static gint *ett[] = {
- /* header flag */
- &ett_eigrp,
- &ett_eigrp_flags,
-
- /* tlv specific */
- &ett_eigrp_tlv,
- &ett_eigrp_tlv_metric,
- &ett_eigrp_tlv_attr,
- &ett_eigrp_tlv_extdata,
-
- &ett_eigrp_tidlist_flags,
- &ett_eigrp_stub_flags,
- &ett_eigrp_saf_reachability,
-
- /* metric tlv specific */
- &ett_eigrp_metric_flags,
- &ett_eigrp_extdata_flags,
+ /* header flag */
+ &ett_eigrp,
+ &ett_eigrp_flags,
+
+ /* tlv specific */
+ &ett_eigrp_tlv,
+ &ett_eigrp_tlv_metric,
+ &ett_eigrp_tlv_attr,
+ &ett_eigrp_tlv_extdata,
+
+ &ett_eigrp_tidlist_flags,
+ &ett_eigrp_stub_flags,
+ &ett_eigrp_saf_reachability,
+
+ /* metric tlv specific */
+ &ett_eigrp_metric_flags,
+ &ett_eigrp_extdata_flags,
};
/* Register the protocol name and description */
proto_eigrp = proto_register_protocol(
- "Enhanced Interior Gateway Routing Protocol", /* name */
- "EIGRP", /* short name */
- "eigrp" /* abbrev */
- );
+ "Enhanced Interior Gateway Routing Protocol", /* name */
+ "EIGRP", /* short name */
+ "eigrp" /* abbrev */
+ );
/* Required function calls to register the header fields and subtrees used */
proto_register_field_array(proto_eigrp, hf, array_length(hf));
@@ -3377,14 +3377,14 @@ proto_register_eigrp(void)
void
proto_reg_handoff_eigrp(void)
{
- dissector_handle_t eigrp_handle;
+ dissector_handle_t eigrp_handle;
- ipxsap_handle = find_dissector("ipxsap");
- media_type_table = find_dissector_table("media_type");
+ ipxsap_handle = find_dissector("ipxsap");
+ media_type_table = find_dissector_table("media_type");
- eigrp_handle = new_create_dissector_handle(dissect_eigrp, proto_eigrp);
+ eigrp_handle = new_create_dissector_handle(dissect_eigrp, proto_eigrp);
- dissector_add_uint("ip.proto", IP_PROTO_EIGRP, eigrp_handle);
- dissector_add_uint("ddp.type", DDP_EIGRP, eigrp_handle);
- dissector_add_uint("ipx.socket", IPX_SOCKET_EIGRP, eigrp_handle);
+ dissector_add_uint("ip.proto", IP_PROTO_EIGRP, eigrp_handle);
+ dissector_add_uint("ddp.type", DDP_EIGRP, eigrp_handle);
+ dissector_add_uint("ipx.socket", IPX_SOCKET_EIGRP, eigrp_handle);
}
diff --git a/epan/dissectors/packet-etherip.c b/epan/dissectors/packet-etherip.c
index fcdea6a4b7..417f265313 100644
--- a/epan/dissectors/packet-etherip.c
+++ b/epan/dissectors/packet-etherip.c
@@ -39,20 +39,20 @@ static gint ett_etherip = -1;
static dissector_handle_t eth_withoutfcs_handle;
#ifndef offsetof
-#define offsetof(type, member) ((size_t)(&((type *)0)->member))
+#define offsetof(type, member) ((size_t)(&((type *)0)->member))
#endif
/*
* RFC 3378: EtherIP: Tunneling Ethernet Frames in IP Datagrams
*
- * Bits 0-3: Protocol version
- * Bits 4-15: Reserved for future use
+ * Bits 0-3: Protocol version
+ * Bits 4-15: Reserved for future use
*/
struct etheriphdr {
- guint8 ver; /* version/reserved */
- guint8 pad; /* required padding byte */
+ guint8 ver; /* version/reserved */
+ guint8 pad; /* required padding byte */
};
#define ETHERIP_VERS_MASK 0x0f
@@ -78,8 +78,8 @@ dissect_etherip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ti = proto_tree_add_protocol_format(tree, proto_etherip, tvb, 0,
sizeof(etheriph),
"EtherIP, Version %d",
- etheriph.ver
- );
+ etheriph.ver
+ );
etherip_tree = proto_item_add_subtree(ti, ett_etherip);
proto_tree_add_uint(etherip_tree, hf_etherip_ver, tvb,
@@ -88,7 +88,7 @@ dissect_etherip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
/* Set the tvbuff for the payload after the header */
- next_tvb = tvb_new_subset(tvb, sizeof(etheriph), -1, -1);
+ next_tvb = tvb_new_subset_remaining(tvb, sizeof(etheriph));
call_dissector(eth_withoutfcs_handle, next_tvb, pinfo, tree);
}
@@ -98,15 +98,15 @@ proto_register_etherip(void)
{
static hf_register_info hf_etherip[] = {
{ &hf_etherip_ver,
- { "Version", "etherip.ver", FT_UINT8, BASE_HEX, NULL, 0x0,
- NULL, HFILL }},
+ { "Version", "etherip.ver", FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }},
};
static gint *ett[] = {
&ett_etherip,
};
proto_etherip = proto_register_protocol("Ethernet over IP",
- "ETHERIP", "etherip");
+ "ETHERIP", "etherip");
proto_register_field_array(proto_etherip, hf_etherip, array_length(hf_etherip));
proto_register_subtree_array(ett, array_length(ett));
diff --git a/epan/dissectors/packet-gmrp.c b/epan/dissectors/packet-gmrp.c
index 906861f58c..b9bd860e28 100644
--- a/epan/dissectors/packet-gmrp.c
+++ b/epan/dissectors/packet-gmrp.c
@@ -56,24 +56,24 @@ static gint ett_gmrp_attribute = -1;*/
static dissector_handle_t data_handle;
/* Constant definitions */
-#define GARP_DEFAULT_PROTOCOL_ID 0x0001
-#define GARP_END_OF_MARK 0x00
+#define GARP_DEFAULT_PROTOCOL_ID 0x0001
+#define GARP_END_OF_MARK 0x00
-#define GMRP_ATTRIBUTE_TYPE_GROUP_MEMBERSHIP 0x01
-#define GMRP_ATTRIBUTE_TYPE_SERVICE_REQUIREMENT 0x02
+#define GMRP_ATTRIBUTE_TYPE_GROUP_MEMBERSHIP 0x01
+#define GMRP_ATTRIBUTE_TYPE_SERVICE_REQUIREMENT 0x02
-#define GMRP_SERVICE_REQUIREMENT_FORWARD_ALL 0x00
-#define GMRP_SERVICE_REQUIREMENT_FORWARD_ALL_UNREGISTERED 0x01
+#define GMRP_SERVICE_REQUIREMENT_FORWARD_ALL 0x00
+#define GMRP_SERVICE_REQUIREMENT_FORWARD_ALL_UNREGISTERED 0x01
static const value_string attribute_type_vals[] = {
- { GMRP_ATTRIBUTE_TYPE_GROUP_MEMBERSHIP ,"Group Membership" },
- { GMRP_ATTRIBUTE_TYPE_SERVICE_REQUIREMENT ,"Service Requirement" },
- { 0, NULL }
+ { GMRP_ATTRIBUTE_TYPE_GROUP_MEMBERSHIP ,"Group Membership" },
+ { GMRP_ATTRIBUTE_TYPE_SERVICE_REQUIREMENT ,"Service Requirement" },
+ { 0, NULL }
};
/* The length of GMRP LeaveAll attribute should be 2 octets (one for length
* and the other for event) */
-#define GMRP_LENGTH_LEAVEALL (sizeof(guint8)+sizeof(guint8))
+#define GMRP_LENGTH_LEAVEALL (sizeof(guint8)+sizeof(guint8))
/* The length of GMRP attribute other than LeaveAll should be:
*
@@ -82,28 +82,28 @@ static const value_string attribute_type_vals[] = {
* 3 bytes for Service Requirement (1 for length, 1 for event, 1 for attribute value)
*
*/
-#define GMRP_GROUP_MEMBERSHIP_NON_LEAVEALL (sizeof(guint8)+sizeof(guint8)+(6*sizeof(guint8)))
-#define GMRP_SERVICE_REQUIREMENT_NON_LEAVEALL (sizeof(guint8)+sizeof(guint8)+sizeof(guint8))
+#define GMRP_GROUP_MEMBERSHIP_NON_LEAVEALL (sizeof(guint8)+sizeof(guint8)+(6*sizeof(guint8)))
+#define GMRP_SERVICE_REQUIREMENT_NON_LEAVEALL (sizeof(guint8)+sizeof(guint8)+sizeof(guint8))
/* Packet offset definitions */
-#define GARP_PROTOCOL_ID 0
+#define GARP_PROTOCOL_ID 0
/* Event definitions */
-#define GMRP_EVENT_LEAVEALL 0
-#define GMRP_EVENT_JOINEMPTY 1
-#define GMRP_EVENT_JOININ 2
-#define GMRP_EVENT_LEAVEEMPTY 3
-#define GMRP_EVENT_LEAVEIN 4
-#define GMRP_EVENT_EMPTY 5
+#define GMRP_EVENT_LEAVEALL 0
+#define GMRP_EVENT_JOINEMPTY 1
+#define GMRP_EVENT_JOININ 2
+#define GMRP_EVENT_LEAVEEMPTY 3
+#define GMRP_EVENT_LEAVEIN 4
+#define GMRP_EVENT_EMPTY 5
static const value_string event_vals[] = {
- { GMRP_EVENT_LEAVEALL, "Leave All" },
- { GMRP_EVENT_JOINEMPTY, "Join Empty" },
- { GMRP_EVENT_JOININ, "Join In" },
- { GMRP_EVENT_LEAVEEMPTY, "Leave Empty" },
- { GMRP_EVENT_LEAVEIN, "Leave In" },
- { GMRP_EVENT_EMPTY, "Empty" },
- { 0, NULL }
+ { GMRP_EVENT_LEAVEALL, "Leave All" },
+ { GMRP_EVENT_JOINEMPTY, "Join Empty" },
+ { GMRP_EVENT_JOININ, "Join In" },
+ { GMRP_EVENT_LEAVEEMPTY, "Leave Empty" },
+ { GMRP_EVENT_LEAVEIN, "Leave In" },
+ { GMRP_EVENT_EMPTY, "Empty" },
+ { 0, NULL }
};
@@ -115,7 +115,7 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *gmrp_tree;
guint16 protocol_id;
guint8 octet;
- guint8 attribute_type;
+ guint8 attribute_type;
int msg_index, attr_index, offset = 0, length = tvb_reported_length(tvb);
col_set_str(pinfo->cinfo, COL_PROTOCOL, "GMRP");
@@ -124,212 +124,213 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (tree)
{
- ti = proto_tree_add_item(tree, proto_gmrp, tvb, 0, length, ENC_NA);
-
- gmrp_tree = proto_item_add_subtree(ti, ett_gmrp);
-
- /* Read in GARP protocol ID */
- protocol_id = tvb_get_ntohs(tvb, GARP_PROTOCOL_ID);
-
- proto_tree_add_uint_format(gmrp_tree, hf_gmrp_proto_id, tvb,
- GARP_PROTOCOL_ID, sizeof(guint16),
- protocol_id,
- "Protocol Identifier: 0x%04x (%s)",
- protocol_id,
- protocol_id == GARP_DEFAULT_PROTOCOL_ID ?
- "GARP Multicast Registration Protocol" :
- "Unknown Protocol");
-
- /* Currently only one protocol ID is supported */
- if (protocol_id != GARP_DEFAULT_PROTOCOL_ID)
- {
- proto_tree_add_text(gmrp_tree, tvb, GARP_PROTOCOL_ID, sizeof(guint16),
- " (Warning: this version of Wireshark only knows about protocol id = 1)");
- call_dissector(data_handle,
- tvb_new_subset(tvb, GARP_PROTOCOL_ID + sizeof(guint16), -1, -1),
- pinfo, tree);
- return;
- }
-
- offset += sizeof(guint16);
- length -= sizeof(guint16);
-
- msg_index = 0;
-
- /* Begin to parse GARP messages */
- while (length)
- {
- proto_item *msg_item;
- int msg_start = offset;
-
- /* Read in attribute type. */
- attribute_type = octet = tvb_get_guint8(tvb, offset);
-
- /* Check for end of mark */
- if (octet == GARP_END_OF_MARK)
- {
- /* End of GARP PDU */
- if (msg_index)
- {
- proto_tree_add_text(gmrp_tree, tvb, offset, sizeof(guint8),
- "End of pdu");
- break;
- }
- else
- {
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset),
- pinfo, tree);
- return;
- }
- }
-
- offset += sizeof(guint8);
- length -= sizeof(guint8);
-
- msg_item = proto_tree_add_text(gmrp_tree, tvb, msg_start, -1,
- "Message %d", msg_index + 1);
-
- proto_tree_add_uint(gmrp_tree, hf_gmrp_attribute_type, tvb,
- msg_start, sizeof(guint8), octet);
-
- /* GMRP supports Group Membership and Service Requirement as attribute types */
- if ( (octet != GMRP_ATTRIBUTE_TYPE_GROUP_MEMBERSHIP) && (octet != GMRP_ATTRIBUTE_TYPE_SERVICE_REQUIREMENT) )
- {
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset), pinfo,
- tree);
- return;
- }
-
- attr_index = 0;
-
- while (length)
- {
- int attr_start = offset;
- proto_item *attr_item;
-
- /* Read in attribute length. */
- octet = tvb_get_guint8(tvb, offset);
-
- /* Check for end of mark */
- if (octet == GARP_END_OF_MARK)
- {
- /* If at least one message has been already read,
- * check for another end of mark.
- */
- if (attr_index)
- {
- proto_tree_add_text(gmrp_tree, tvb, offset,
- sizeof(guint8), " End of mark");
-
- offset += sizeof(guint8);
- length -= sizeof(guint8);
-
- proto_item_set_len(msg_item, offset - msg_start);
- break;
- }
- else
- {
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset),
- pinfo, tree);
- return;
- }
- }
- else
- {
- guint8 event;
-
- offset += sizeof(guint8);
- length -= sizeof(guint8);
-
- attr_item = proto_tree_add_text(gmrp_tree, tvb,
- attr_start, -1, " Attribute %d", attr_index + 1);
-
- proto_tree_add_uint(gmrp_tree, hf_gmrp_attribute_length,
- tvb, attr_start, sizeof(guint8), octet);
-
- /* Read in attribute event */
- event = tvb_get_guint8(tvb, offset);
-
- proto_tree_add_uint(gmrp_tree, hf_gmrp_attribute_event,
- tvb, offset, sizeof(guint8), event);
-
- offset += sizeof(guint8);
- length -= sizeof(guint8);
-
- switch (event) {
-
- case GMRP_EVENT_LEAVEALL:
- if (octet != GMRP_LENGTH_LEAVEALL)
- {
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset),
- pinfo, tree);
- return;
- }
- break;
-
- case GMRP_EVENT_JOINEMPTY:
- case GMRP_EVENT_JOININ:
- case GMRP_EVENT_LEAVEEMPTY:
- case GMRP_EVENT_LEAVEIN:
- case GMRP_EVENT_EMPTY:
- if ( (octet != GMRP_GROUP_MEMBERSHIP_NON_LEAVEALL) && (octet != GMRP_SERVICE_REQUIREMENT_NON_LEAVEALL) )
- {
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset),
- pinfo, tree);
- return;
- }
-
- /* Show attribute value */
-
- if ( GMRP_ATTRIBUTE_TYPE_GROUP_MEMBERSHIP == attribute_type )
- {
- /* Group Membership */
- proto_tree_add_item(gmrp_tree, hf_gmrp_attribute_value_group_membership,
- tvb, offset, (6*sizeof(guint8)), ENC_NA);
-
- offset += 6*sizeof(guint8);
- length -= 6*sizeof(guint8);
- }
- else
- if ( GMRP_ATTRIBUTE_TYPE_SERVICE_REQUIREMENT == attribute_type )
- {
- /* Service Requirement */
- proto_tree_add_item(gmrp_tree, hf_gmrp_attribute_value_service_requirement,
- tvb, offset, sizeof(guint8), ENC_BIG_ENDIAN);
-
- offset += sizeof(guint8);
- length -= sizeof(guint8);
- }
- else
- {
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset),
- pinfo, tree);
- return;
- }
-
- break;
-
- default:
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset),
- pinfo, tree);
- return;
- }
- }
-
- proto_item_set_len(attr_item, offset - attr_start);
-
- attr_index++;
- }
-
- msg_index++;
- }
+ ti = proto_tree_add_item(tree, proto_gmrp, tvb, 0, -1, ENC_NA);
+
+ gmrp_tree = proto_item_add_subtree(ti, ett_gmrp);
+
+ /* Read in GARP protocol ID */
+ protocol_id = tvb_get_ntohs(tvb, GARP_PROTOCOL_ID);
+
+ proto_tree_add_uint_format(gmrp_tree, hf_gmrp_proto_id, tvb,
+ GARP_PROTOCOL_ID, sizeof(guint16),
+ protocol_id,
+ "Protocol Identifier: 0x%04x (%s)",
+ protocol_id,
+ protocol_id == GARP_DEFAULT_PROTOCOL_ID ?
+ "GARP Multicast Registration Protocol" :
+ "Unknown Protocol");
+
+ /* Currently only one protocol ID is supported */
+ if (protocol_id != GARP_DEFAULT_PROTOCOL_ID)
+ {
+ proto_tree_add_text(gmrp_tree, tvb, GARP_PROTOCOL_ID, sizeof(guint16),
+ " (Warning: this version of Wireshark only knows about protocol id = 1)");
+ call_dissector(data_handle,
+ tvb_new_subset_remaining(tvb, GARP_PROTOCOL_ID + sizeof(guint16)),
+ pinfo, tree);
+ return;
+ }
+
+ offset += sizeof(guint16);
+ length -= sizeof(guint16);
+
+ msg_index = 0;
+
+ /* Begin to parse GARP messages */
+ while (length)
+ {
+ proto_item *msg_item;
+ int msg_start = offset;
+
+ /* Read in attribute type. */
+ attribute_type = octet = tvb_get_guint8(tvb, offset);
+
+ /* Check for end of mark */
+ if (octet == GARP_END_OF_MARK)
+ {
+ /* End of GARP PDU */
+ if (msg_index)
+ {
+ proto_tree_add_text(gmrp_tree, tvb, offset, sizeof(guint8),
+ "End of pdu");
+ break;
+ }
+ else
+ {
+ call_dissector(data_handle,
+ tvb_new_subset_remaining(tvb, offset),
+ pinfo, tree);
+ return;
+ }
+ }
+
+ offset += sizeof(guint8);
+ length -= sizeof(guint8);
+
+ msg_item = proto_tree_add_text(gmrp_tree, tvb, msg_start, -1,
+ "Message %d", msg_index + 1);
+
+ proto_tree_add_uint(gmrp_tree, hf_gmrp_attribute_type, tvb,
+ msg_start, sizeof(guint8), octet);
+
+ /* GMRP supports Group Membership and Service Requirement as attribute types */
+ if ( (octet != GMRP_ATTRIBUTE_TYPE_GROUP_MEMBERSHIP) && (octet != GMRP_ATTRIBUTE_TYPE_SERVICE_REQUIREMENT) )
+ {
+ call_dissector(data_handle,
+ tvb_new_subset_remaining(tvb, offset), pinfo,
+ tree);
+ return;
+ }
+
+ attr_index = 0;
+
+ while (length)
+ {
+ int attr_start = offset;
+ proto_item *attr_item;
+
+ /* Read in attribute length. */
+ octet = tvb_get_guint8(tvb, offset);
+
+ /* Check for end of mark */
+ if (octet == GARP_END_OF_MARK)
+ {
+ /* If at least one message has been already read,
+ * check for another end of mark.
+ */
+ if (attr_index)
+ {
+ proto_tree_add_text(gmrp_tree, tvb, offset,
+ sizeof(guint8), " End of mark");
+
+ offset += sizeof(guint8);
+ length -= sizeof(guint8);
+
+ proto_item_set_len(msg_item, offset - msg_start);
+ break;
+ }
+ else
+ {
+ call_dissector(data_handle,
+ tvb_new_subset_remaining(tvb, offset),
+ pinfo, tree);
+ return;
+ }
+ }
+ else
+ {
+ guint8 event;
+
+ offset += sizeof(guint8);
+ length -= sizeof(guint8);
+
+ attr_item = proto_tree_add_text(gmrp_tree, tvb,
+ attr_start, -1, " Attribute %d", attr_index + 1);
+
+ proto_tree_add_uint(gmrp_tree, hf_gmrp_attribute_length,
+ tvb, attr_start, sizeof(guint8), octet);
+
+ /* Read in attribute event */
+ event = tvb_get_guint8(tvb, offset);
+
+ proto_tree_add_uint(gmrp_tree, hf_gmrp_attribute_event,
+ tvb, offset, sizeof(guint8), event);
+
+ offset += sizeof(guint8);
+ length -= sizeof(guint8);
+
+ switch (event) {
+
+ case GMRP_EVENT_LEAVEALL:
+ if (octet != GMRP_LENGTH_LEAVEALL)
+ {
+ call_dissector(data_handle,
+ tvb_new_subset_remaining(tvb, offset),
+ pinfo, tree);
+ return;
+ }
+ break;
+
+ case GMRP_EVENT_JOINEMPTY:
+ case GMRP_EVENT_JOININ:
+ case GMRP_EVENT_LEAVEEMPTY:
+ case GMRP_EVENT_LEAVEIN:
+ case GMRP_EVENT_EMPTY:
+ if ( (octet != GMRP_GROUP_MEMBERSHIP_NON_LEAVEALL) &&
+ (octet != GMRP_SERVICE_REQUIREMENT_NON_LEAVEALL) )
+ {
+ call_dissector(data_handle,
+ tvb_new_subset_remaining(tvb, offset),
+ pinfo, tree);
+ return;
+ }
+
+ /* Show attribute value */
+
+ if ( GMRP_ATTRIBUTE_TYPE_GROUP_MEMBERSHIP == attribute_type )
+ {
+ /* Group Membership */
+ proto_tree_add_item(gmrp_tree, hf_gmrp_attribute_value_group_membership,
+ tvb, offset, (6*sizeof(guint8)), ENC_NA);
+
+ offset += 6*sizeof(guint8);
+ length -= 6*sizeof(guint8);
+ }
+ else
+ if ( GMRP_ATTRIBUTE_TYPE_SERVICE_REQUIREMENT == attribute_type )
+ {
+ /* Service Requirement */
+ proto_tree_add_item(gmrp_tree, hf_gmrp_attribute_value_service_requirement,
+ tvb, offset, sizeof(guint8), ENC_BIG_ENDIAN);
+
+ offset += sizeof(guint8);
+ length -= sizeof(guint8);
+ }
+ else
+ {
+ call_dissector(data_handle,
+ tvb_new_subset_remaining(tvb, offset),
+ pinfo, tree);
+ return;
+ }
+
+ break;
+
+ default:
+ call_dissector(data_handle,
+ tvb_new_subset_remaining(tvb, offset),
+ pinfo, tree);
+ return;
+ }
+ }
+
+ proto_item_set_len(attr_item, offset - attr_start);
+
+ attr_index++;
+ }
+
+ msg_index++;
+ }
}
}
@@ -340,41 +341,41 @@ void
proto_register_gmrp(void)
{
static hf_register_info hf[] = {
- { &hf_gmrp_proto_id,
- { "Protocol ID", "gmrp.protocol_id",
- FT_UINT16, BASE_HEX, NULL, 0x0,
- NULL , HFILL }
- },
- { &hf_gmrp_attribute_type,
- { "Type", "gmrp.attribute_type",
- FT_UINT8, BASE_HEX, VALS(attribute_type_vals), 0x0,
- NULL , HFILL }
- },
- { &hf_gmrp_attribute_length,
- { "Length", "gmrp.attribute_length",
- FT_UINT8, BASE_DEC, NULL, 0x0,
- NULL , HFILL }
- },
- { &hf_gmrp_attribute_event,
- { "Event", "gmrp.attribute_event",
- FT_UINT8, BASE_DEC, VALS(event_vals), 0x0,
- NULL , HFILL }
- },
- { &hf_gmrp_attribute_value_group_membership,
- { "Value", "gmrp.attribute_value_group_membership",
- FT_ETHER, BASE_NONE, NULL, 0x0,
- NULL , HFILL }
- },
- { &hf_gmrp_attribute_value_service_requirement,
- { "Value", "gmrp.attribute_value_service_requirement",
- FT_UINT8, BASE_HEX, NULL, 0x0,
- NULL , HFILL }
- }
+ { &hf_gmrp_proto_id,
+ { "Protocol ID", "gmrp.protocol_id",
+ FT_UINT16, BASE_HEX, NULL, 0x0,
+ NULL , HFILL }
+ },
+ { &hf_gmrp_attribute_type,
+ { "Type", "gmrp.attribute_type",
+ FT_UINT8, BASE_HEX, VALS(attribute_type_vals), 0x0,
+ NULL , HFILL }
+ },
+ { &hf_gmrp_attribute_length,
+ { "Length", "gmrp.attribute_length",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL , HFILL }
+ },
+ { &hf_gmrp_attribute_event,
+ { "Event", "gmrp.attribute_event",
+ FT_UINT8, BASE_DEC, VALS(event_vals), 0x0,
+ NULL , HFILL }
+ },
+ { &hf_gmrp_attribute_value_group_membership,
+ { "Value", "gmrp.attribute_value_group_membership",
+ FT_ETHER, BASE_NONE, NULL, 0x0,
+ NULL , HFILL }
+ },
+ { &hf_gmrp_attribute_value_service_requirement,
+ { "Value", "gmrp.attribute_value_service_requirement",
+ FT_UINT8, BASE_HEX, NULL, 0x0,
+ NULL , HFILL }
+ }
};
static gint *ett[] = {
- &ett_gmrp
+ &ett_gmrp
};
/* Register the protocol name and description for GMRP */
@@ -391,5 +392,5 @@ proto_register_gmrp(void)
void
proto_reg_handoff_gmrp(void){
- data_handle = find_dissector("data");
+ data_handle = find_dissector("data");
}
diff --git a/epan/dissectors/packet-icmpv6.c b/epan/dissectors/packet-icmpv6.c
index d9ec6f8377..cd8b655a4f 100644
--- a/epan/dissectors/packet-icmpv6.c
+++ b/epan/dissectors/packet-icmpv6.c
@@ -1075,7 +1075,7 @@ static const value_string rpl_option_vals[] = {
static int
dissect_contained_icmpv6(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
- gboolean save_in_error_pkt;
+ gboolean save_in_error_pkt;
tvbuff_t *next_tvb;
/* Save the current value of the "we're inside an error packet"
@@ -1121,11 +1121,11 @@ static conversation_t *_find_or_create_conversation(packet_info *pinfo)
/* ======================================================================= */
static icmp_transaction_t *transaction_start(packet_info *pinfo, proto_tree *tree, guint32 *key)
{
- conversation_t *conversation;
+ conversation_t *conversation;
icmpv6_conv_info_t *icmpv6_info;
icmp_transaction_t *icmpv6_trans;
- emem_tree_key_t icmpv6_key[2];
- proto_item *it;
+ emem_tree_key_t icmpv6_key[2];
+ proto_item *it;
/* Handle the conversation tracking */
conversation = _find_or_create_conversation(pinfo);
@@ -1173,12 +1173,12 @@ static icmp_transaction_t *transaction_start(packet_info *pinfo, proto_tree *tre
/* ======================================================================= */
static icmp_transaction_t *transaction_end(packet_info *pinfo, proto_tree *tree, guint32 *key)
{
- conversation_t *conversation;
+ conversation_t *conversation;
icmpv6_conv_info_t *icmpv6_info;
icmp_transaction_t *icmpv6_trans;
- emem_tree_key_t icmpv6_key[2];
- proto_item *it;
- nstime_t ns;
+ emem_tree_key_t icmpv6_key[2];
+ proto_item *it;
+ nstime_t ns;
conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
pinfo->ptype, 0, 0, 0);
@@ -1230,9 +1230,9 @@ dissect_icmpv6_nd_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
{
proto_tree *icmp6opt_tree, *flag_tree;
proto_item *ti, *ti_opt, *ti_opt_len;
- guint8 opt_type;
- int opt_len;
- int opt_offset;
+ guint8 opt_type;
+ int opt_len;
+ int opt_offset;
while ((int)tvb_reported_length(tvb) > offset) {
/* there are more options */
@@ -2144,9 +2144,9 @@ dissect_icmpv6_rpl_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
{
proto_tree *icmp6opt_tree, *flag_tree;
proto_item *ti, *ti_opt, *ti_opt_len;
- guint8 opt_type;
- int opt_len;
- int opt_offset;
+ guint8 opt_type;
+ int opt_len;
+ int opt_offset;
while ((int)tvb_reported_length(tvb) > offset) {
/* there are more options */
@@ -2717,7 +2717,7 @@ dissect_nodeinfo(tvbuff_t *tvb, int ni_offset, packet_info *pinfo _U_, proto_tre
{
proto_tree *flag_tree;
proto_item *ti;
- guint16 qtype;
+ guint16 qtype;
/* Qtype */
proto_tree_add_item(tree, hf_icmpv6_ni_qtype, tvb, ni_offset, 2, ENC_BIG_ENDIAN);
@@ -2824,7 +2824,7 @@ static int
dissect_rrenum(tvbuff_t *tvb, int rr_offset, packet_info *pinfo _U_, proto_tree *tree, guint8 icmp6_type _U_, guint8 icmp6_code)
{
proto_tree *flag_tree, *mp_tree, *up_tree, *rm_tree;
- proto_item *ti, *ti_mp, *ti_up, *ti_rm;
+ proto_item *ti, *ti_mp, *ti_up, *ti_rm;
/* Sequence Number */
proto_tree_add_item(tree, hf_icmpv6_rr_sequencenumber, tvb, rr_offset, 4, ENC_BIG_ENDIAN);
@@ -3031,7 +3031,7 @@ dissect_mldrv2( tvbuff_t *tvb, guint32 offset, packet_info *pinfo _U_, proto_tre
{
proto_tree *mar_tree;
proto_item *ti_mar;
- int mldr_offset = offset;
+ int mldr_offset = offset;
/* Reserved */
proto_tree_add_item(tree, hf_icmpv6_reserved, tvb, mldr_offset, 2, ENC_NA );
@@ -3095,17 +3095,17 @@ dissect_mldrv2( tvbuff_t *tvb, guint32 offset, packet_info *pinfo _U_, proto_tre
static int
dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- proto_tree *icmp6_tree = NULL, *flag_tree = NULL;
- proto_item *ti = NULL, *hidden_item, *checksum_item = NULL, *code_item = NULL, *ti_flag = NULL;
- const char *code_name = NULL;
- guint length = 0, reported_length;
- vec_t cksum_vec[4];
- guint32 phdr[2];
- guint16 cksum, computed_cksum;
- int offset;
- tvbuff_t *next_tvb;
- guint8 icmp6_type, icmp6_code;
- icmp_transaction_t *trans = NULL;
+ proto_tree *icmp6_tree = NULL, *flag_tree = NULL;
+ proto_item *ti = NULL, *hidden_item, *checksum_item = NULL, *code_item = NULL, *ti_flag = NULL;
+ const char *code_name = NULL;
+ guint length = 0, reported_length;
+ vec_t cksum_vec[4];
+ guint32 phdr[2];
+ guint16 cksum, computed_cksum;
+ int offset;
+ tvbuff_t *next_tvb;
+ guint8 icmp6_type, icmp6_code;
+ icmp_transaction_t *trans = NULL;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICMPv6");
col_clear(pinfo->cinfo, COL_INFO);
@@ -3262,15 +3262,15 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
trans = transaction_end(pinfo, icmp6_tree, conv_key);
}
}
- next_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ next_tvb = tvb_new_subset_remaining(tvb, offset);
offset += call_dissector(data_handle, next_tvb, pinfo, icmp6_tree);
}
}
if (1) { /* There are expert infos buried in here so always execute */
/* decode... */
- /* FIXME: The following messages MUST have a TTL^WHop-Limit of 255:
- 133-137, 141-142, 148-149. Detect this and add expert items. */
+ /* FIXME: The following messages MUST have a TTL^WHop-Limit of 255:
+ 133-137, 141-142, 148-149. Detect this and add expert items. */
switch (icmp6_type) {
case ICMP6_DST_UNREACH: /* Destination Unreachable (1) */
case ICMP6_TIME_EXCEEDED: /* Time Exceeded (3) */
diff --git a/epan/dissectors/packet-ieee802154.c b/epan/dissectors/packet-ieee802154.c
index 9be87a63ba..5f80b87f3e 100644
--- a/epan/dissectors/packet-ieee802154.c
+++ b/epan/dissectors/packet-ieee802154.c
@@ -398,9 +398,9 @@ static gboolean ieee802154_extend_auth = TRUE;
static void
dissect_ieee802154_fcf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee802154_packet *packet, guint *offset)
{
- guint16 fcf;
- proto_tree *field_tree;
- proto_item *ti;
+ guint16 fcf;
+ proto_tree *field_tree;
+ proto_item *ti;
/* Get the FCF field. */
fcf = tvb_get_letohs(tvb, *offset);
@@ -458,13 +458,13 @@ dissect_ieee802154_fcf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee
static void
dissect_ieee802154_nonask_phy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- proto_tree *ieee802154_tree = NULL;
- proto_item *proto_root = NULL;
+ proto_tree *ieee802154_tree = NULL;
+ proto_item *proto_root = NULL;
- guint offset=0;
- guint32 preamble;
- guint8 sfd,phr;
- tvbuff_t* mac;
+ guint offset = 0;
+ guint32 preamble;
+ guint8 sfd,phr;
+ tvbuff_t* mac;
/* Create the protocol tree. */
if (tree) {
@@ -1279,8 +1279,8 @@ dissect_ieee802154_fcs:
static void
dissect_ieee802154_superframe(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint *offset)
{
- proto_tree *field_tree = NULL;
- proto_item *ti;
+ proto_tree *field_tree = NULL;
+ proto_item *ti;
guint16 superframe;
/* Parse the superframe spec. */
@@ -1320,9 +1320,9 @@ dissect_ieee802154_superframe(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
static void
dissect_ieee802154_gtsinfo(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint *offset)
{
- proto_tree *field_tree = NULL;
- proto_tree *subtree = NULL;
- proto_item *ti;
+ proto_tree *field_tree = NULL;
+ proto_tree *subtree = NULL;
+ proto_item *ti;
guint8 gts_spec;
guint8 gts_count;
@@ -1410,8 +1410,8 @@ dissect_ieee802154_gtsinfo(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
static void
dissect_ieee802154_pendaddr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint *offset)
{
- proto_tree *subtree = NULL;
- proto_item *ti;
+ proto_tree *subtree = NULL;
+ proto_item *ti;
guint8 pend_spec;
guint8 pend_num16;
guint8 pend_num64;
@@ -1457,9 +1457,9 @@ dissect_ieee802154_pendaddr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t
static void
dissect_ieee802154_assoc_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee802154_packet *packet)
{
- proto_tree *subtree = NULL;
- proto_item * ti;
- guint8 capability;
+ proto_tree *subtree = NULL;
+ proto_item * ti;
+ guint8 capability;
/* Create a subtree for this command frame. */
if (tree) {
@@ -1485,7 +1485,7 @@ dissect_ieee802154_assoc_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
/* Call the data dissector for any leftover bytes. */
if (tvb_length(tvb) > 1) {
- call_dissector(data_handle, tvb_new_subset(tvb, 1, -1, -1), pinfo, tree);
+ call_dissector(data_handle, tvb_new_subset_remaining(tvb, 1), pinfo, tree);
}
} /* dissect_ieee802154_assoc_req */
@@ -1507,11 +1507,11 @@ dissect_ieee802154_assoc_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
static void
dissect_ieee802154_assoc_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee802154_packet *packet)
{
- proto_tree *subtree = NULL;
- proto_item *ti;
- guint16 short_addr;
- guint8 status;
- guint offset = 0;
+ proto_tree *subtree = NULL;
+ proto_item *ti;
+ guint16 short_addr;
+ guint8 status;
+ guint offset = 0;
/* Create a subtree for this command frame. */
if (tree) {
@@ -1563,7 +1563,7 @@ dissect_ieee802154_assoc_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
/* Call the data dissector for any leftover bytes. */
if (tvb_length(tvb) > offset) {
- call_dissector(data_handle, tvb_new_subset(tvb, offset, -1, -1), pinfo, tree);
+ call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo, tree);
}
} /* dissect_ieee802154_assoc_rsp */
@@ -1584,9 +1584,9 @@ dissect_ieee802154_assoc_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
static void
dissect_ieee802154_disassoc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee802154_packet *packet)
{
- proto_tree *subtree = NULL;
- proto_item *ti;
- guint8 reason;
+ proto_tree *subtree = NULL;
+ proto_item *ti;
+ guint8 reason;
/* Create a subtree for this command frame. */
if (tree) {
@@ -1624,7 +1624,7 @@ dissect_ieee802154_disassoc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Call the data dissector for any leftover bytes. */
if (tvb_length(tvb) > 1) {
- call_dissector(data_handle, tvb_new_subset(tvb, 1, -1, -1), pinfo, tree);
+ call_dissector(data_handle, tvb_new_subset_remaining(tvb, 1), pinfo, tree);
}
} /* dissect_ieee802154_disassoc */
@@ -1646,13 +1646,13 @@ dissect_ieee802154_disassoc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
static void
dissect_ieee802154_realign(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee802154_packet *packet)
{
- proto_tree *subtree = NULL;
- proto_item *ti;
- guint16 pan_id;
- guint16 coord_addr;
- guint8 channel;
- guint16 short_addr;
- guint offset = 0;
+ proto_tree *subtree = NULL;
+ proto_item *ti;
+ guint16 pan_id;
+ guint16 coord_addr;
+ guint8 channel;
+ guint16 short_addr;
+ guint offset = 0;
/* Create a subtree for this command frame. */
if (tree) {
@@ -1707,7 +1707,7 @@ dissect_ieee802154_realign(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Call the data dissector for any leftover bytes. */
if (tvb_length(tvb) > offset) {
- call_dissector(data_handle, tvb_new_subset(tvb, offset, -1, -1), pinfo, tree);
+ call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo, tree);
}
} /* dissect_ieee802154_realign */
@@ -1733,12 +1733,12 @@ dissect_ieee802154_realign(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
static void
dissect_ieee802154_gtsreq(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee802154_packet *packet)
{
- proto_tree *subtree = NULL;
- proto_item *ti;
- guint8 characteristics;
- guint8 length;
- guint8 direction;
- guint8 type;
+ proto_tree *subtree = NULL;
+ proto_item *ti;
+ guint8 characteristics;
+ guint8 length;
+ guint8 direction;
+ guint8 type;
/* Create a subtree for this command frame. */
if (tree) {
@@ -1766,7 +1766,7 @@ dissect_ieee802154_gtsreq(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
/* Call the data dissector for any leftover bytes. */
if (tvb_length(tvb) > 1) {
- call_dissector(data_handle, tvb_new_subset(tvb, 1, -1, -1), pinfo, tree);
+ call_dissector(data_handle, tvb_new_subset_remaining(tvb, 1), pinfo, tree);
}
} /* dissect_ieee802154_gtsreq */
@@ -2093,9 +2093,9 @@ static gboolean
ccm_cbc_mac(const gchar *key _U_, const gchar *iv _U_, const gchar *a _U_, gint a_len _U_, const gchar *m _U_, gint m_len _U_, gchar *mic _U_)
{
#ifdef HAVE_LIBGCRYPT
- gcry_cipher_hd_t cipher_hd;
- guint i = 0;
- unsigned char block[16];
+ gcry_cipher_hd_t cipher_hd;
+ guint i = 0;
+ unsigned char block[16];
/* Open the cipher. */
if (gcry_cipher_open(&cipher_hd, GCRY_CIPHER_AES128, GCRY_CIPHER_MODE_CBC, GCRY_CIPHER_CBC_MAC)) return FALSE;
@@ -2234,9 +2234,9 @@ gboolean ieee802154_long_addr_equal(gconstpointer a, gconstpointer b)
ieee802154_map_rec *ieee802154_addr_update(ieee802154_map_tab_t *au_ieee802154_map,
guint16 short_addr, guint16 pan, guint64 long_addr, const char *proto, guint fnum)
{
- ieee802154_short_addr addr16;
- ieee802154_map_rec *p_map_rec;
- gpointer old_key;
+ ieee802154_short_addr addr16;
+ ieee802154_map_rec *p_map_rec;
+ gpointer old_key;
/* Look up short address hash */
addr16.pan = pan;
@@ -2301,8 +2301,8 @@ ieee802154_map_rec *ieee802154_addr_update(ieee802154_map_tab_t *au_ieee802154_m
*/
gboolean ieee802154_short_addr_invalidate(guint16 short_addr, guint16 pan, guint fnum)
{
- ieee802154_short_addr addr16;
- ieee802154_map_rec *map_rec;
+ ieee802154_short_addr addr16;
+ ieee802154_map_rec *map_rec;
addr16.pan = pan;
addr16.addr = short_addr;
@@ -2786,13 +2786,13 @@ void proto_register_ieee802154(void)
*/
void proto_reg_handoff_ieee802154(void)
{
- static gboolean prefs_initialized = FALSE;
+ static gboolean prefs_initialized = FALSE;
static dissector_handle_t ieee802154_handle;
static dissector_handle_t ieee802154_nonask_phy_handle;
static dissector_handle_t ieee802154_nofcs_handle;
- static unsigned int old_ieee802154_ethertype;
- GByteArray *bytes;
- gboolean res;
+ static unsigned int old_ieee802154_ethertype;
+ GByteArray *bytes;
+ gboolean res;
if (!prefs_initialized){
/* Get the dissector handles. */
diff --git a/epan/dissectors/packet-ipsec-udp.c b/epan/dissectors/packet-ipsec-udp.c
index 090b952acf..3047f59069 100644
--- a/epan/dissectors/packet-ipsec-udp.c
+++ b/epan/dissectors/packet-ipsec-udp.c
@@ -37,16 +37,16 @@ static dissector_handle_t esp_handle;
static dissector_handle_t isakmp_handle;
/*
- * UDP Encapsulation of IPsec Packets
+ * UDP Encapsulation of IPsec Packets
* draft-ietf-ipsec-udp-encaps-06.txt
*/
static void
dissect_udpencap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- tvbuff_t *next_tvb;
+ tvbuff_t *next_tvb;
proto_tree *udpencap_tree = NULL;
- proto_item *ti = NULL;
- guint32 spi;
+ proto_item *ti = NULL;
+ guint32 spi;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "UDPENCAP");
col_clear(pinfo->cinfo, COL_INFO);
@@ -67,16 +67,16 @@ dissect_udpencap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (spi == 0) {
col_set_str(pinfo->cinfo, COL_INFO, "ISAKMP");
if (tree) {
- proto_tree_add_text(udpencap_tree, tvb, 0, sizeof(spi),
- "Non-ESP Marker");
- proto_item_set_len(ti, sizeof(spi));
+ proto_tree_add_text(udpencap_tree, tvb, 0, sizeof(spi),
+ "Non-ESP Marker");
+ proto_item_set_len(ti, sizeof(spi));
}
- next_tvb = tvb_new_subset(tvb, sizeof(spi), -1, -1);
+ next_tvb = tvb_new_subset_remaining(tvb, sizeof(spi));
call_dissector(isakmp_handle, next_tvb, pinfo, tree);
} else {
col_set_str(pinfo->cinfo, COL_INFO, "ESP");
if (tree)
- proto_item_set_len(ti, 0);
+ proto_item_set_len(ti, 0);
call_dissector(esp_handle, tvb, pinfo, tree);
}
}
@@ -90,7 +90,7 @@ proto_register_udpencap(void)
};
proto_udpencap = proto_register_protocol(
- "UDP Encapsulation of IPsec Packets", "UDPENCAP", "udpencap");
+ "UDP Encapsulation of IPsec Packets", "UDPENCAP", "udpencap");
proto_register_subtree_array(ett, array_length(ett));
}
diff --git a/epan/dissectors/packet-knet.c b/epan/dissectors/packet-knet.c
index 84480898a3..fdadfdcb81 100644
--- a/epan/dissectors/packet-knet.c
+++ b/epan/dissectors/packet-knet.c
@@ -181,7 +181,7 @@ dissect_packetid(tvbuff_t *buffer, int offset, proto_tree *tree)
{
guint32 packetid;
- packetid = tvb_get_bits8(buffer, offset * 8 + 16, 8) << 14;
+ packetid = tvb_get_bits8(buffer, offset * 8 + 16, 8) << 14;
packetid += tvb_get_bits8(buffer, offset * 8 + 8, 8) << 6;
packetid += tvb_get_bits8(buffer, offset * 8, 8) & 63;
if(offset == 0 && tree != NULL)
@@ -537,8 +537,8 @@ dissect_knet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *message_ti;
proto_tree *message_tree;
- tvbuff_t *next_tvb;
- gboolean bytes_left;
+ tvbuff_t *next_tvb;
+ gboolean bytes_left;
int offset;
int length;
@@ -613,7 +613,7 @@ dissect_knet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if(tvb_get_bits8(tvb, 1, 1) == 1) /* If Reliable flag is 1 */
offset += dissect_reliable_message_index_base(tvb, 3, datagram_tree); /* Calculate RMIB */
- next_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ next_tvb = tvb_new_subset_remaining(tvb, offset);
while(bytes_left)
{
@@ -637,7 +637,7 @@ dissect_knet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += length; /* Move the offset the amount of the payload */
- next_tvb = tvb_new_subset(next_tvb, offset, -1, -1); /* Prepare the next tvb for the next message */
+ next_tvb = tvb_new_subset_remaining(next_tvb, offset); /* Prepare the next tvb for the next message */
}
else bytes_left = FALSE; /* We dont have any bytes left to process... Hopefully */
diff --git a/epan/dissectors/packet-lisp-data.c b/epan/dissectors/packet-lisp-data.c
index 959b6cc657..cb25b1825e 100644
--- a/epan/dissectors/packet-lisp-data.c
+++ b/epan/dissectors/packet-lisp-data.c
@@ -82,10 +82,10 @@ static dissector_handle_t data_handle;
static int
dissect_lisp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- gint offset = 0;
- guint8 flags;
- guint8 ip_ver;
- tvbuff_t *next_tvb;
+ gint offset = 0;
+ guint8 flags;
+ guint8 ip_ver;
+ tvbuff_t *next_tvb;
proto_item *ti;
proto_item *tif;
proto_tree *lisp_data_tree;
@@ -180,7 +180,7 @@ dissect_lisp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Check if there is stuff left in the buffer, and return if not */
/* Determine if encapsulated packet is IPv4 or IPv6, and call dissector */
- next_tvb = tvb_new_subset(tvb, LISP_DATA_HEADER_LEN, -1, -1);
+ next_tvb = tvb_new_subset_remaining(tvb, LISP_DATA_HEADER_LEN);
ip_ver = tvb_get_bits8(next_tvb, 0, 4);
switch (ip_ver) {
case 4:
diff --git a/epan/dissectors/packet-lisp.c b/epan/dissectors/packet-lisp.c
index 355a225f8f..47b6f0e52c 100644
--- a/epan/dissectors/packet-lisp.c
+++ b/epan/dissectors/packet-lisp.c
@@ -161,12 +161,12 @@ const value_string lisp_typevals[] = {
static int
dissect_lisp_locator(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_mapping_tree)
{
- gint offset = 0;
- guint8 prio, weight, m_prio, m_weight;
- guint16 flags, loc_afi;
- guint32 locator_v4;
- struct e_in6_addr locator_v6;
- tvbuff_t *next_tvb;
+ gint offset = 0;
+ guint8 prio, weight, m_prio, m_weight;
+ guint16 flags, loc_afi;
+ guint32 locator_v4;
+ struct e_in6_addr locator_v6;
+ tvbuff_t *next_tvb;
prio = tvb_get_guint8(tvb, offset); offset += 1;
weight = tvb_get_guint8(tvb, offset); offset += 1;
@@ -200,7 +200,7 @@ dissect_lisp_locator(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_mapping
break;
default:
proto_tree_add_text(lisp_mapping_tree, tvb, 0, 2, "Unexpected AFI, cannot decode");
- next_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(data_handle, next_tvb, pinfo, lisp_mapping_tree);
}
@@ -228,18 +228,19 @@ dissect_lisp_locator(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_mapping
static int
dissect_lisp_mapping(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree, guint8 rec_cnt)
{
- int i;
- gint offset = 0;
- gint mapver_offset = 0;
- guint32 ttl;
- guint8 loc_cnt;
- guint8 prefix_mask, flags, act;
- guint16 prefix_afi;
- guint32 prefix_v4;
- struct e_in6_addr prefix_v6;
- proto_item *tir;
- proto_tree *lisp_mapping_tree;
- tvbuff_t *next_tvb;
+ int i;
+ gint offset = 0;
+ gint mapver_offset = 0;
+ guint32 ttl;
+ guint8 loc_cnt;
+ guint8 prefix_mask, flags, act;
+ guint16 prefix_afi;
+ guint32 prefix_v4;
+ struct e_in6_addr prefix_v6;
+ proto_item *tir;
+ proto_tree *lisp_mapping_tree;
+ tvbuff_t *next_tvb;
+
const char *lisp_actions[] = {
"No-Action",
"Natively-Forward",
@@ -288,7 +289,7 @@ dissect_lisp_mapping(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree, g
break;
default:
proto_tree_add_text(lisp_tree, tvb, 0, 2, "Unexpected AFI, cannot decode");
- next_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
return offset;
}
@@ -306,7 +307,7 @@ dissect_lisp_mapping(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree, g
tvbuff_t *loc_tvb;
int len = 0;
- loc_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ loc_tvb = tvb_new_subset_remaining(tvb, offset);
len = dissect_lisp_locator(loc_tvb, pinfo, lisp_mapping_tree);
offset += len;
}
@@ -347,15 +348,15 @@ dissect_lisp_mapping(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree, g
static void
dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree)
{
- int i;
- gint offset = 0;
- gboolean mrep = FALSE;
- guint8 flags;
- guint8 itr_rec_cnt = 0;
- guint8 rec_cnt = 0;
- guint16 src_eid_afi;
- struct e_in6_addr e_in6_addr;
- tvbuff_t *next_tvb;
+ int i;
+ gint offset = 0;
+ gboolean mrep = FALSE;
+ guint8 flags;
+ guint8 itr_rec_cnt = 0;
+ guint8 rec_cnt = 0;
+ guint16 src_eid_afi;
+ struct e_in6_addr e_in6_addr;
+ tvbuff_t *next_tvb;
/* Flags (6 bits)*/
flags = tvb_get_guint8(tvb, offset);
@@ -408,7 +409,7 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre
default:
proto_tree_add_text(lisp_tree, tvb, offset, 0,
"Unexpected Source EID AFI, cannot decode");
- next_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
return;
}
@@ -447,7 +448,7 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre
default:
proto_tree_add_text(lisp_tree, tvb, offset, 2,
"Unexpected ITR-RLOC-AFI, cannot decode");
- next_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
return;
}
@@ -510,7 +511,7 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre
break;
default:
proto_tree_add_text(lisp_tree, tvb, offset, 2, "Unexpected AFI, cannot decode");
- next_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
return;
}
@@ -526,12 +527,12 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre
tim = proto_tree_add_text(lisp_tree, tvb, offset, -1, "Map-Reply record");
lisp_mr_tree = proto_item_add_subtree(tim, ett_lisp_mr);
- rep_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ rep_tvb = tvb_new_subset_remaining(tvb, offset);
len = dissect_lisp_mapping(rep_tvb, pinfo, lisp_mr_tree, 0);
offset += len;
}
- next_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
}
@@ -568,9 +569,9 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre
static void
dissect_lisp_map_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree)
{
- int i;
- gint offset = 0;
- guint8 rec_cnt = 0;
+ int i;
+ gint offset = 0;
+ guint8 rec_cnt = 0;
tvbuff_t *next_tvb;
/* Flags (2 bits) */
@@ -595,12 +596,12 @@ dissect_lisp_map_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree)
tvbuff_t *rec_tvb;
int len = 0;
- rec_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ rec_tvb = tvb_new_subset_remaining(tvb, offset);
len = dissect_lisp_mapping(rec_tvb, pinfo, lisp_tree, rec_cnt);
offset += len;
}
- next_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
}
@@ -641,11 +642,11 @@ dissect_lisp_map_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree)
static void
dissect_lisp_map_register(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree)
{
- int i;
- gint offset = 0;
- guint8 rec_cnt = 0;
+ int i;
+ gint offset = 0;
+ guint8 rec_cnt = 0;
tvbuff_t *next_tvb;
- guint16 authlen = 0;
+ guint16 authlen = 0;
/* Flags (1 bit) */
proto_tree_add_item(lisp_tree, hf_lisp_mreg_flags_pmr, tvb, offset, 3, ENC_BIG_ENDIAN);
@@ -684,12 +685,12 @@ dissect_lisp_map_register(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tr
tvbuff_t *rec_tvb;
int len = 0;
- rec_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ rec_tvb = tvb_new_subset_remaining(tvb, offset);
len = dissect_lisp_mapping(rec_tvb, pinfo, lisp_tree, rec_cnt);
offset += len;
}
- next_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
}
@@ -730,11 +731,11 @@ dissect_lisp_map_register(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tr
static void
dissect_lisp_map_notify(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree)
{
- int i;
- gint offset = 0;
- guint8 rec_cnt = 0;
+ int i;
+ gint offset = 0;
+ guint8 rec_cnt = 0;
tvbuff_t *next_tvb;
- guint16 authlen = 0;
+ guint16 authlen = 0;
/* Reserved bits (20 bits) */
proto_tree_add_item(lisp_tree, hf_lisp_mnot_res, tvb, offset, 3, ENC_BIG_ENDIAN);
@@ -767,12 +768,12 @@ dissect_lisp_map_notify(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree
tvbuff_t *rec_tvb;
int len = 0;
- rec_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ rec_tvb = tvb_new_subset_remaining(tvb, offset);
len = dissect_lisp_mapping(rec_tvb, pinfo, lisp_tree, rec_cnt);
offset += len;
}
- next_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
}
@@ -793,12 +794,12 @@ static void
dissect_lisp_ecm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree *lisp_tree)
{
tvbuff_t *next_tvb;
- guint8 ip_ver;
+ guint8 ip_ver;
proto_tree_add_item(lisp_tree, hf_lisp_ecm_res, tvb, 0, 4, ENC_BIG_ENDIAN);
/* Determine if encapsulated packet is IPv4 or IPv6, and call dissector */
- next_tvb = tvb_new_subset(tvb, LISP_ECM_HEADER_LEN, -1, -1);
+ next_tvb = tvb_new_subset_remaining(tvb, LISP_ECM_HEADER_LEN);
ip_ver = tvb_get_bits8(next_tvb, 0, 4);
switch (ip_ver) {
diff --git a/epan/dissectors/packet-mactelnet.c b/epan/dissectors/packet-mactelnet.c
index ebc6e94457..c048919a07 100644
--- a/epan/dissectors/packet-mactelnet.c
+++ b/epan/dissectors/packet-mactelnet.c
@@ -114,10 +114,10 @@ dissect_mactelnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *mactelnet_tree;
proto_item *mactelnet_control_item;
proto_tree *mactelnet_control_tree;
- int foundping = -1;
- int foundclient = -1;
- int foundserver = -1;
- guint16 type;
+ int foundping = -1;
+ int foundclient = -1;
+ int foundserver = -1;
+ guint16 type;
/* Check that there's enough data */
if (tvb_length(tvb) < 18)
@@ -216,7 +216,7 @@ dissect_mactelnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (type == 1) {
while(tvb_reported_length_remaining(tvb, offset) > 0) {
if (tvb_reported_length_remaining(tvb, offset) > 4 && tvb_get_ntohl(tvb, offset) == control_packet) {
- guint8 datatype;
+ guint8 datatype;
guint32 datalength;
/* Add subtree for control packet */
@@ -268,13 +268,13 @@ dissect_mactelnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += datalength;
} else {
/* Data packet, let wireshark handle it */
- tvbuff_t *next_client = tvb_new_subset(tvb, offset, -1, -1);
+ tvbuff_t *next_client = tvb_new_subset_remaining(tvb, offset);
return call_dissector(data_handle, next_client, pinfo, mactelnet_tree);
}
}
} else if (type == 4 || type == 5) {
/* Data packet, let wireshark handle it */
- tvbuff_t *next_client = tvb_new_subset(tvb, offset, -1, -1);
+ tvbuff_t *next_client = tvb_new_subset_remaining(tvb, offset);
return call_dissector(data_handle, next_client, pinfo, mactelnet_tree);
}
diff --git a/epan/dissectors/packet-mp2t.c b/epan/dissectors/packet-mp2t.c
index ce0942f914..347bbae35b 100644
--- a/epan/dissectors/packet-mp2t.c
+++ b/epan/dissectors/packet-mp2t.c
@@ -403,6 +403,7 @@ get_pid_analysis(guint32 pid, conversation_t *conv)
pid_analysis_data_t *pid_data = NULL;
mp2t_analysis_data_t *mp2t_data = NULL;
+
mp2t_data = get_mp2t_conversation_data(conv);
pid_data = se_tree_lookup32(mp2t_data->pid_table, pid);
@@ -458,10 +459,10 @@ mp2t_get_packet_length(tvbuff_t *tvb, guint offset, packet_info *pinfo,
guint32 frag_id, enum pid_payload_type pload_type)
{
- fragment_data *frag = NULL;
- tvbuff_t *len_tvb = NULL, *frag_tvb = NULL, *data_tvb = NULL;
- gint pkt_len = 0;
- guint remaining_len;
+ fragment_data *frag = NULL;
+ tvbuff_t *len_tvb = NULL, *frag_tvb = NULL, *data_tvb = NULL;
+ gint pkt_len = 0;
+ guint remaining_len;
remaining_len = tvb_length_remaining(tvb, offset);
@@ -487,7 +488,7 @@ mp2t_get_packet_length(tvbuff_t *tvb, guint offset, packet_info *pinfo,
len_tvb = tvb_new_composite();
tvb_composite_append(len_tvb, frag_tvb);
- data_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ data_tvb = tvb_new_subset_remaining(tvb, offset);
tvb_composite_append(len_tvb, data_tvb);
tvb_composite_finalize(len_tvb);
@@ -528,8 +529,8 @@ mp2t_fragment_handle(tvbuff_t *tvb, guint offset, packet_info *pinfo,
{
/* proto_item *ti; */
fragment_data *frag_msg = NULL;
- tvbuff_t *new_tvb = NULL;
- gboolean save_fragmented;
+ tvbuff_t *new_tvb = NULL;
+ gboolean save_fragmented;
save_fragmented = pinfo->fragmented;
pinfo->fragmented = TRUE;
@@ -581,17 +582,17 @@ mp2t_process_fragmented_payload(tvbuff_t *tvb, gint offset, guint remaining_len,
proto_tree *tree, proto_tree *header_tree, guint32 pusi_flag,
pid_analysis_data_t *pid_analysis)
{
- tvbuff_t *next_tvb;
- guint8 pointer = 0;
- proto_item *pi;
- guint stuff_len = 0;
- proto_item *si;
- proto_tree *stuff_tree;
- packed_analysis_data_t *pdata = NULL;
- subpacket_analysis_data_t *spdata = NULL;
- guint32 frag_cur_pos = 0, frag_tot_len = 0;
- gboolean fragmentation = FALSE;
- guint32 frag_id = 0;
+ tvbuff_t *next_tvb;
+ guint8 pointer = 0;
+ proto_item *pi;
+ guint stuff_len = 0;
+ proto_item *si;
+ proto_tree *stuff_tree;
+ packed_analysis_data_t *pdata = NULL;
+ subpacket_analysis_data_t *spdata = NULL;
+ guint32 frag_cur_pos = 0, frag_tot_len = 0;
+ gboolean fragmentation = FALSE;
+ guint32 frag_id = 0;
if (pusi_flag && pid_analysis->pload_type == pid_pload_unknown
&& remaining_len > 3) {
@@ -953,16 +954,17 @@ static void
dissect_tsp(tvbuff_t *tvb, volatile gint offset, packet_info *pinfo,
proto_tree *tree, conversation_t *conv)
{
- guint32 header;
- guint afc;
- gint start_offset = offset;
- volatile gint payload_len;
+ guint32 header;
+ guint afc;
+ gint start_offset = offset;
+ volatile gint payload_len;
pid_analysis_data_t *pid_analysis;
- guint32 skips;
- guint32 pid;
- guint32 cc;
- guint32 pusi_flag;
+ guint32 skips;
+ guint32 pid;
+ guint32 cc;
+ guint32 pusi_flag;
+
/* guint8 pointer; */
proto_item *ti = NULL;
@@ -1244,10 +1246,10 @@ dissect_tsp(tvbuff_t *tvb, volatile gint offset, packet_info *pinfo,
static void
dissect_mp2t( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
{
- guint offset = 0;
- conversation_t *conv;
- conv = find_or_create_conversation(pinfo);
+ guint offset = 0;
+ conversation_t *conv;
+ conv = find_or_create_conversation(pinfo);
for (; tvb_reported_length_remaining(tvb, offset) >= MP2T_PACKET_SIZE; offset += MP2T_PACKET_SIZE) {
diff --git a/epan/dissectors/packet-mux27010.c b/epan/dissectors/packet-mux27010.c
index e0ed0106f0..7f21e74da1 100644
--- a/epan/dissectors/packet-mux27010.c
+++ b/epan/dissectors/packet-mux27010.c
@@ -796,7 +796,7 @@ getControlChannelValues(tvbuff_t *tvb, proto_tree *field_tree_ctr){
/*Get values information field*/
static void
getFrameInformation(tvbuff_t *tvb, proto_tree *field_tree){
- char information_field_content[52];
+ char information_field_content[52];
char *information_field, *save_information_field_ptr;
/*Get the data from information field as string*/
@@ -843,8 +843,8 @@ getFrameInformation(tvbuff_t *tvb, proto_tree *field_tree){
static void
dissect_mux27010(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- proto_item *ti = NULL;
- proto_item *tf = NULL, *tf_extended_header, *tf_addr, *tf_ctr;
+ proto_item *ti = NULL;
+ proto_item *tf = NULL, *tf_extended_header, *tf_addr, *tf_ctr;
proto_tree *mux27010_tree = NULL;
proto_tree *field_tree, *field_tree_extended_header, *field_tree_addr, *field_tree_ctr;
@@ -1045,11 +1045,11 @@ dissect_mux27010(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
msg_flag = tvb_get_guint8(tvb, tmpOffset); tmpOffset += 1;
if (msg_end <= msg_start) {
- proto_item *pi;
+ proto_item *pi;
pi = proto_tree_add_text(field_tree, tvb, tmpOffset-3, 2,
"Message start and end are illogical, aborting dissection");
expert_add_info_format(pinfo, pi, PI_MALFORMED, PI_ERROR,
- "Message start and end are illogical");
+ "Message start and end are illogical");
continue;
}
@@ -1079,7 +1079,7 @@ dissect_mux27010(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
if (new_tvb) { /* take it all */
- next_tvb2 = tvb_new_subset(new_tvb, 1, -1, -1);
+ next_tvb2 = tvb_new_subset_remaining(new_tvb, 1);
call_dissector(ppp_handle, next_tvb2, pinfo, tree);
}
diff --git a/epan/dissectors/packet-netmon-802_11.c b/epan/dissectors/packet-netmon-802_11.c
index c3b06d9ff8..8296d144d6 100644
--- a/epan/dissectors/packet-netmon-802_11.c
+++ b/epan/dissectors/packet-netmon-802_11.c
@@ -1,6 +1,6 @@
/*
* packet-netmon-802_11.c
- * Decode packets with a Network Monitor 802.11 radio header
+ * Decode packets with a Network Monitor 802.11 radio header
*
* $Id$
*
@@ -28,26 +28,25 @@
#endif
#include <glib.h>
-#include <string.h>
#include <epan/packet.h>
/* protocol */
static int proto_netmon_802_11 = -1;
-#define MIN_HEADER_LEN 32
+#define MIN_HEADER_LEN 32
/* op_mode */
-#define OP_MODE_STA 0x00000001 /* station mode */
-#define OP_MODE_AP 0x00000002 /* AP mode */
-#define OP_MODE_STA_EXT 0x00000004 /* extensible station mode */
-#define OP_MODE_MON 0x80000000 /* monitor mode */
+#define OP_MODE_STA 0x00000001 /* station mode */
+#define OP_MODE_AP 0x00000002 /* AP mode */
+#define OP_MODE_STA_EXT 0x00000004 /* extensible station mode */
+#define OP_MODE_MON 0x80000000 /* monitor mode */
/* phy_type */
-#define PHY_TYPE_11A 4
-#define PHY_TYPE_11B 5
-#define PHY_TYPE_11G 6
-#define PHY_TYPE_11N 7
+#define PHY_TYPE_11A 4
+#define PHY_TYPE_11B 5
+#define PHY_TYPE_11G 6
+#define PHY_TYPE_11N 7
static int hf_netmon_802_11_version = -1;
static int hf_netmon_802_11_length = -1;
@@ -74,14 +73,14 @@ dissect_netmon_802_11(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *wlan_tree, *opmode_tree;
proto_item *ti;
- tvbuff_t *next_tvb;
- int offset;
- guint8 version;
- guint16 length;
- guint32 flags;
- guint32 channel;
- gint32 rssi;
- guint8 rate;
+ tvbuff_t *next_tvb;
+ int offset;
+ guint8 version;
+ guint16 length;
+ guint32 flags;
+ guint32 channel;
+ gint32 rssi;
+ guint8 rate;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "WLAN");
col_clear(pinfo->cinfo, COL_INFO);
@@ -169,7 +168,7 @@ skip:
offset = length;
/* dissect the 802.11 header next */
- next_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(ieee80211_handle, next_tvb, pinfo, tree);
return offset;
}
@@ -187,37 +186,37 @@ proto_register_netmon_802_11(void)
static hf_register_info hf[] = {
{ &hf_netmon_802_11_version, { "Header revision", "netmon_802_11.version", FT_UINT8,
- BASE_DEC, NULL, 0x0, NULL, HFILL } },
+ BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_netmon_802_11_length, { "Header length", "netmon_802_11.length", FT_UINT16,
- BASE_DEC, NULL, 0x0, NULL, HFILL } },
+ BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_netmon_802_11_op_mode, { "Operation mode", "netmon_802_11.op_mode", FT_UINT32,
- BASE_HEX, NULL, 0x0, NULL, HFILL } },
+ BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_netmon_802_11_op_mode_sta, { "Station mode", "netmon_802_11.op_mode.sta", FT_UINT32,
- BASE_HEX, NULL, OP_MODE_STA, NULL, HFILL } },
+ BASE_HEX, NULL, OP_MODE_STA, NULL, HFILL } },
{ &hf_netmon_802_11_op_mode_ap, { "AP mode", "netmon_802_11.op_mode.ap", FT_UINT32,
- BASE_HEX, NULL, OP_MODE_AP, NULL, HFILL } },
+ BASE_HEX, NULL, OP_MODE_AP, NULL, HFILL } },
{ &hf_netmon_802_11_op_mode_sta_ext, { "Extensible station mode", "netmon_802_11.op_mode.sta_ext", FT_UINT32,
- BASE_HEX, NULL, OP_MODE_STA_EXT, NULL, HFILL } },
+ BASE_HEX, NULL, OP_MODE_STA_EXT, NULL, HFILL } },
{ &hf_netmon_802_11_op_mode_mon, { "Monitor mode", "netmon_802_11.op_mode.on", FT_UINT32,
- BASE_HEX, NULL, OP_MODE_MON, NULL, HFILL } },
+ BASE_HEX, NULL, OP_MODE_MON, NULL, HFILL } },
{ &hf_netmon_802_11_flags, { "Flags", "netmon_802_11.flags", FT_UINT32,
- BASE_HEX, NULL, 0x0, NULL, HFILL } },
+ BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_netmon_802_11_phy_type, { "PHY type", "netmon_802_11.phy_type", FT_UINT32,
- BASE_DEC, VALS(phy_type), 0x0, NULL, HFILL } },
+ BASE_DEC, VALS(phy_type), 0x0, NULL, HFILL } },
{ &hf_netmon_802_11_channel, { "Channel", "netmon_802_11.channel", FT_UINT32,
- BASE_DEC, NULL, 0x0, NULL, HFILL } },
+ BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_netmon_802_11_frequency, { "Center frequency", "netmon_802_11.frequency", FT_UINT32,
- BASE_DEC, NULL, 0x0, NULL, HFILL } },
+ BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_netmon_802_11_rssi, { "RSSI", "netmon_802_11.rssi", FT_INT32,
- BASE_DEC, NULL, 0x0, NULL, HFILL } },
+ BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_netmon_802_11_datarate, { "Data rate", "netmon_802_11.datarate", FT_UINT32,
- BASE_DEC, NULL, 0x0, NULL, HFILL } },
+ BASE_DEC, NULL, 0x0, NULL, HFILL } },
/*
* XXX - is this host, or MAC, time stamp?
* It might be a FILETIME.
*/
{ &hf_netmon_802_11_timestamp, { "Timestamp", "netmon_802_11.timestamp", FT_UINT64,
- BASE_DEC, NULL, 0x0, NULL, HFILL } },
+ BASE_DEC, NULL, 0x0, NULL, HFILL } },
};
static gint *ett[] = {
&ett_netmon_802_11,
diff --git a/epan/dissectors/packet-ppp.c b/epan/dissectors/packet-ppp.c
index e89b02543b..49f35793ec 100644
--- a/epan/dissectors/packet-ppp.c
+++ b/epan/dissectors/packet-ppp.c
@@ -30,8 +30,8 @@
#endif
#include <glib.h>
-#include <epan/prefs.h>
#include <epan/packet.h>
+#include <epan/prefs.h>
#include <epan/emem.h>
#include "packet-ppp.h"
#include <epan/ppptypes.h>
@@ -1665,11 +1665,11 @@ fcs32(tvbuff_t * tvbuff)
tvbuff_t *
decode_fcs(tvbuff_t *tvb, proto_tree *fh_tree, int fcs_decode, int proto_offset)
{
- tvbuff_t *next_tvb;
- gint len, reported_len;
- int rx_fcs_offset;
- guint32 rx_fcs_exp;
- guint32 rx_fcs_got;
+ tvbuff_t *next_tvb;
+ gint len, reported_len;
+ int rx_fcs_offset;
+ guint32 rx_fcs_exp;
+ guint32 rx_fcs_got;
/*
* Remove the FCS, if any, from the packet data.
@@ -1837,16 +1837,17 @@ dissect_lcp_async_map_opt(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
guint length, packet_info *pinfo _U_,
proto_tree *tree)
{
- guint32 map;
+ guint32 map;
const char *mapstr;
+
static const char *ctrlchars[32] = {
"NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL",
"BS", "HT", "NL", "VT", "NP (FF)", "CR", "SO", "SI",
"DLE", "DC1 (XON)", "DC2", "DC3 (XOFF)", "DC4", "NAK", "SYN", "ETB",
"CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US"
};
- gint returned_length, str_index;
- int i;
+ gint returned_length, str_index;
+ int i;
/*
* XXX - walk through the map and show the characters to map?
@@ -1882,7 +1883,7 @@ dissect_lcp_protocol_opt(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
guint length, packet_info *pinfo _U_,
proto_tree *tree)
{
- guint16 protocol;
+ guint16 protocol;
proto_item *tf;
proto_tree *field_tree = NULL;
@@ -1906,8 +1907,8 @@ dissect_lcp_authprot_opt(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
guint length, packet_info *pinfo _U_,
proto_tree *tree)
{
- guint16 protocol;
- guint8 algorithm;
+ guint16 protocol;
+ guint8 algorithm;
proto_item *tf;
proto_tree *field_tree = NULL;
@@ -1952,7 +1953,7 @@ dissect_lcp_fcs_alternatives_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
{
proto_item *tf;
proto_tree *field_tree = NULL;
- guint8 alternatives;
+ guint8 alternatives;
alternatives = tvb_get_guint8(tvb, offset + 2);
tf = proto_tree_add_text(tree, tvb, offset, length, "%s: 0x%02x",
@@ -2019,7 +2020,7 @@ dissect_lcp_callback_opt(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
{
proto_item *tf;
proto_tree *field_tree = NULL;
- guint8 operation;
+ guint8 operation;
tf = proto_tree_add_text(tree, tvb, offset, length, "%s: %u byte%s",
optp->name, length, plurality(length, "", "s"));
@@ -2070,7 +2071,7 @@ dissect_lcp_multilink_ep_disc_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
{
proto_item *tf;
proto_tree *field_tree = NULL;
- guint8 ep_disc_class;
+ guint8 ep_disc_class;
tf = proto_tree_add_text(tree, tvb, offset, length, "%s: %u byte%s",
optp->name, length, plurality(length, "", "s"));
@@ -2183,7 +2184,7 @@ dissect_lcp_internationalization_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
{
proto_item *tf;
proto_tree *field_tree = NULL;
- guint32 charset;
+ guint32 charset;
tf = proto_tree_add_text(tree, tvb, offset, length, "%s: %u byte%s",
optp->name, length, plurality(length, "", "s"));
@@ -2240,8 +2241,8 @@ dissect_ipcp_compress_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
int offset, guint length, packet_info *pinfo _U_,
proto_tree *tree)
{
- guint8 ub;
- guint16 us;
+ guint8 ub;
+ guint16 us;
proto_item *tf;
proto_tree *field_tree = NULL;
@@ -2368,7 +2369,7 @@ dissect_ipcp_iphc_disableprot_opt(const ip_tcp_opt *optp,
{
proto_item *tf;
proto_tree *field_tree;
- guint8 param;
+ guint8 param;
tf = proto_tree_add_text(tree, tvb, offset, length, "%s", optp->name);
field_tree = proto_item_add_subtree(tf, *optp->subtree_index);
@@ -2388,7 +2389,7 @@ dissect_osicp_align_npdu_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
{
proto_item *tf;
proto_tree *field_tree;
- guint8 alignment;
+ guint8 alignment;
tf = proto_tree_add_text(tree, tvb, offset, length, "%s", optp->name);
field_tree = proto_item_add_subtree(tf, *optp->subtree_index);
@@ -2416,7 +2417,7 @@ dissect_ccp_stac_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
{
proto_item *tf;
proto_tree *field_tree;
- guint8 check_mode;
+ guint8 check_mode;
if (length == 6) {
proto_tree_add_text(tree, tvb, offset, length,
@@ -2444,7 +2445,7 @@ dissect_ccp_mppc_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
{
proto_item *tf;
proto_tree *flags_tree;
- guint32 supported_bits;
+ guint32 supported_bits;
supported_bits = tvb_get_ntohl(tvb, offset + 2);
tf = proto_tree_add_text(tree, tvb, offset, length,
@@ -2495,8 +2496,8 @@ dissect_ccp_lzsdcp_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
{
proto_item *tf;
proto_tree *field_tree;
- guint8 check_mode;
- guint8 process_mode;
+ guint8 check_mode;
+ guint8 process_mode;
tf = proto_tree_add_text(tree, tvb, offset, length, "%s", optp->name);
field_tree = proto_item_add_subtree(tf, *optp->subtree_index);
@@ -2544,7 +2545,7 @@ dissect_ccp_deflate_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
{
proto_item *tf;
proto_tree *field_tree;
- guint8 method;
+ guint8 method;
tf = proto_tree_add_text(tree, tvb, offset, length, "%s", optp->name);
field_tree = proto_item_add_subtree(tf, *optp->subtree_index);
@@ -2576,8 +2577,8 @@ dissect_cbcp_callback_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
proto_item *tf;
proto_tree *field_tree;
proto_tree *addr_tree;
- guint8 addr_type;
- guint addr_len;
+ guint8 addr_type;
+ guint addr_len;
tf = proto_tree_add_text(tree, tvb, offset, length, "%s", optp->name);
field_tree = proto_item_add_subtree(tf, *optp->subtree_index);
@@ -2633,7 +2634,7 @@ dissect_bap_link_type_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
{
proto_item *tf;
proto_tree *field_tree;
- guint8 link_type;
+ guint8 link_type;
tf = proto_tree_add_text(tree, tvb, offset, length, "%s", optp->name);
field_tree = proto_item_add_subtree(tf, *optp->subtree_index);
@@ -2656,8 +2657,8 @@ dissect_bap_phone_delta_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
proto_tree *field_tree;
proto_item *ti;
proto_tree *suboption_tree;
- guint8 subopt_type;
- guint8 subopt_len;
+ guint8 subopt_type;
+ guint8 subopt_len;
tf = proto_tree_add_text(tree, tvb, offset, length, "%s", optp->name);
field_tree = proto_item_add_subtree(tf, *optp->subtree_index);
@@ -2769,7 +2770,7 @@ dissect_bap_call_status_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
{
proto_item *tf;
proto_tree *field_tree;
- guint8 status, action;
+ guint8 status, action;
tf = proto_tree_add_text(tree, tvb, offset, length, "%s", optp->name);
field_tree = proto_item_add_subtree(tf, *optp->subtree_index);
@@ -3027,10 +3028,10 @@ dissect_vsncp_pco_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
{0x000A, "IP address allocation via NAS signalling" },
{0, NULL }
};
- int off = offset+3;
- guint8 i = 0;
+ int off = offset+3;
+ guint8 i = 0;
guint16 pcotype;
- guint8 len;
+ guint8 len;
proto_item *tf;
proto_tree *field_tree;
@@ -3066,13 +3067,13 @@ dissect_cp( tvbuff_t *tvb, int proto_id, int proto_subtree_index,
proto_item *tf;
proto_tree *field_tree;
- guint8 code;
- guint8 id;
- int length, offset;
+ guint8 code;
+ guint8 id;
+ int length, offset;
guint16 protocol;
- code = tvb_get_guint8(tvb, 0);
- id = tvb_get_guint8(tvb, 1);
+ code = tvb_get_guint8(tvb, 0);
+ id = tvb_get_guint8(tvb, 1);
length = tvb_get_ntohs(tvb, 2);
if(check_col(pinfo->cinfo, COL_PROTOCOL))
@@ -3351,7 +3352,7 @@ dissect_vsnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_item *vsnp_item = NULL;
proto_tree *vsnp_tree = NULL;
- guint32 offset = 0;
+ guint32 offset = 0;
/* To pass it on to IP */
tvbuff_t *next_tvb;
@@ -3368,7 +3369,7 @@ dissect_vsnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(vsnp_tree, hf_vsnp_pdnid, tvb, offset, 1, ENC_BIG_ENDIAN);
}
- next_tvb = tvb_new_subset(tvb, 1, -1, -1);
+ next_tvb = tvb_new_subset_remaining(tvb, 1);
/* do lookup with the subdissector table */
if (!dissector_try_uint(ppp_subdissector_table, PPP_IP, next_tvb, pinfo, tree))
@@ -3652,15 +3653,15 @@ dissect_pppmuxcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static void
dissect_pppmux(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- proto_tree *mux_tree, *hdr_tree, *sub_tree, *flag_tree;
- proto_tree *info_tree;
- proto_item *ti = NULL,*sub_ti = NULL;
- guint8 flags, byte;
- guint16 length;
- static guint16 pid;
- tvbuff_t *next_tvb;
- int offset = 0, length_remaining;
- int length_field = 0, pid_field = 0,hdr_length = 0;
+ proto_tree *mux_tree, *hdr_tree, *sub_tree, *flag_tree;
+ proto_tree *info_tree;
+ proto_item *ti = NULL,*sub_ti = NULL;
+ guint8 flags, byte;
+ guint16 length;
+ static guint16 pid;
+ tvbuff_t *next_tvb;
+ int offset = 0, length_remaining;
+ int length_field = 0, pid_field = 0,hdr_length = 0;
col_set_str(pinfo->cinfo,COL_PROTOCOL, "PPP PPPMux");
@@ -3782,18 +3783,18 @@ dissect_iphc_crtp_fh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *fh_tree, *info_tree;
proto_item *ti = NULL;
- guint ip_hdr_len, flags;
- guint length;
- guint hdr_len;
+ guint ip_hdr_len, flags;
+ guint length;
+ guint hdr_len;
tvbuff_t *next_tvb;
- int offset_seq;
- int offset_cid;
+ int offset_seq;
+ int offset_cid;
- guint8 ip_version;
- guint8 next_protocol;
+ guint8 ip_version;
+ guint8 next_protocol;
- guchar* ip_packet;
+ guchar *ip_packet;
length = tvb_reported_length(tvb);
@@ -3889,10 +3890,10 @@ static void
dissect_iphc_crtp_cudp16(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *cudp_tree;
- proto_item *ti = NULL;
- guint length;
- guint hdr_length;
- int offset = 0;
+ proto_item *ti = NULL;
+ guint length;
+ guint hdr_length;
+ int offset = 0;
col_set_str(pinfo->cinfo,COL_PROTOCOL, "CRTP");
@@ -3924,10 +3925,10 @@ static void
dissect_iphc_crtp_cudp8(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *cudp_tree;
- proto_item *ti = NULL;
- guint length;
- guint hdr_length;
- int offset = 0;
+ proto_item *ti = NULL;
+ guint length;
+ guint hdr_length;
+ int offset = 0;
col_set_str(pinfo->cinfo,COL_PROTOCOL, "CRTP");
@@ -3960,10 +3961,10 @@ static void
dissect_iphc_crtp_cs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *cs_tree;
- proto_item *ti = NULL;
- guint8 flags, cnt;
- guint length, cid_size;
- guint offset = 2, hf;
+ proto_item *ti = NULL;
+ guint8 flags, cnt;
+ guint length, cid_size;
+ guint offset = 2, hf;
col_set_str(pinfo->cinfo,COL_PROTOCOL, "CRTP");
@@ -4109,7 +4110,7 @@ dissect_mp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
static void
dissect_ppp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) {
- proto_item *ti = NULL;
+ proto_item *ti = NULL;
proto_tree *fh_tree = NULL;
if(tree) {
@@ -4123,11 +4124,11 @@ dissect_ppp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) {
static void
dissect_ppp_hdlc_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- proto_item *ti = NULL;
+ proto_item *ti = NULL;
proto_tree *fh_tree = NULL;
- guint8 byte0;
- int proto_offset;
- tvbuff_t *next_tvb;
+ guint8 byte0;
+ int proto_offset;
+ tvbuff_t *next_tvb;
byte0 = tvb_get_guint8(tvb, 0);
@@ -4252,7 +4253,7 @@ dissect_ppp_raw_hdlc( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
gint offset, end_offset, data_offset;
int length, data_length;
tvbuff_t *ppp_tvb;
- gboolean first = TRUE;
+ gboolean first = TRUE;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PPP");
@@ -4457,10 +4458,10 @@ dissect_pap( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) {
proto_item *ti, *data_ti;
proto_tree *fh_tree, *data_tree = NULL;
- guint8 code;
- gchar *peer_id, *password, *message;
- guint8 peer_id_length, password_length, message_length;
- int offset=0;
+ guint8 code;
+ gchar *peer_id, *password, *message;
+ guint8 peer_id_length, password_length, message_length;
+ int offset = 0;
code = tvb_get_guint8(tvb, 0);
@@ -4539,9 +4540,9 @@ dissect_chap( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) {
proto_item *tf;
proto_tree *field_tree;
- guint8 code, value_size;
+ guint8 code, value_size;
guint32 length;
- int offset;
+ int offset;
code = tvb_get_guint8(tvb, 0);
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PPP CHAP");
@@ -5021,7 +5022,7 @@ void
proto_reg_handoff_bcp(void)
{
dissector_handle_t bcp_handle;
- eth_withfcs_handle = find_dissector("eth_withfcs");
+ eth_withfcs_handle = find_dissector("eth_withfcs");
eth_withoutfcs_handle = find_dissector("eth_withoutfcs");
bcp_handle = create_dissector_handle(dissect_bcp, proto_bcp);
diff --git a/epan/dissectors/packet-scop.c b/epan/dissectors/packet-scop.c
index 887aeade9c..f314dde8cd 100644
--- a/epan/dissectors/packet-scop.c
+++ b/epan/dissectors/packet-scop.c
@@ -193,8 +193,8 @@ dissect_scop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *proto_root;
proto_tree *scop_tree;
- guint offset = 0;
- scop_packet packet;
+ guint offset = 0;
+ scop_packet packet;
memset(&packet, 0, sizeof(packet));
@@ -245,16 +245,16 @@ dissect_scop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Call the appropriate helper routine to dissect based on the service type. */
switch (packet.service) {
case SCOP_SERVICE_SCOP:
- dissect_scop_zip(tvb_new_subset(next_tvb, offset, -1, -1), pinfo, scop_tree);
+ dissect_scop_zip(tvb_new_subset_remaining(next_tvb, offset), pinfo, scop_tree);
break;
case SCOP_SERVICE_BRIDGE:
- dissect_scop_bridge(tvb_new_subset(next_tvb, offset, -1, -1), pinfo, scop_tree);
+ dissect_scop_bridge(tvb_new_subset_remaining(next_tvb, offset), pinfo, scop_tree);
break;
case SCOP_SERVICE_GATEWAY:
/* Nothing yet defined for the gateway. Fall-Through. */
default:
/* Unknown Service Type. */
- call_dissector(data_handle, tvb_new_subset(next_tvb, offset, -1, -1), pinfo, tree);
+ call_dissector(data_handle, tvb_new_subset_remaining(next_tvb, offset), pinfo, tree);
break;
}
} /* dissect_scop() */
@@ -293,7 +293,7 @@ dissect_scop_zip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* If there are any bytes left over, pass them to the data dissector. */
if (offset < tvb_length(tvb)) {
- tvbuff_t *payload_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ tvbuff_t *payload_tvb = tvb_new_subset_remaining(tvb, offset);
proto_tree *root = proto_tree_get_root(tree);
call_dissector(data_handle, payload_tvb, pinfo, root);
}
diff --git a/epan/dissectors/packet-tdmoe.c b/epan/dissectors/packet-tdmoe.c
index fd7557bd44..16beba5063 100644
--- a/epan/dissectors/packet-tdmoe.c
+++ b/epan/dissectors/packet-tdmoe.c
@@ -113,7 +113,7 @@ dissect_tdmoe(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
/* The rest is SAMPLES * CHANNELS bytes of channel data */
- next_client = tvb_new_subset(tvb, offset, -1, -1);
+ next_client = tvb_new_subset_remaining(tvb, offset);
return call_dissector(data_handle, next_client, pinfo, tdmoe_tree);
}
diff --git a/epan/dissectors/packet-tr.c b/epan/dissectors/packet-tr.c
index 04a29bfebe..58e58bfc0e 100644
--- a/epan/dissectors/packet-tr.c
+++ b/epan/dissectors/packet-tr.c
@@ -151,7 +151,7 @@ static
int check_for_old_linux_tvb(tvbuff_t *tvb)
{
const guint8 *data;
- int x, bytes;
+ int x, bytes;
/* Restrict our looping to the boundaries of the frame */
bytes = tvb_length(tvb);
@@ -324,7 +324,7 @@ dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *tr_tree, *bf_tree;
proto_item *ti, *hidden_item;
- guint8 rcf1, rcf2;
+ guint8 rcf1, rcf2;
tvbuff_t *next_tvb;
volatile int frame_type;
@@ -364,7 +364,7 @@ dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (x != 0) {
/* Actually packet starts x bytes into what we have got but with all
source routing compressed. See comment above */
- tr_tvb = tvb_new_subset((tvbuff_t*) tvb, x, -1, -1);
+ tr_tvb = tvb_new_subset_remaining((tvbuff_t*) tvb, x);
}
else {
tr_tvb = tvb;
@@ -590,9 +590,9 @@ static void
add_ring_bridge_pairs(int rcf_len, tvbuff_t *tvb, proto_tree *tree)
{
proto_item *hidden_item;
- int j, size;
- int segment, brdgnmb, unprocessed_rif;
- int buff_offset=0;
+ int j, size;
+ int segment, brdgnmb, unprocessed_rif;
+ int buff_offset=0;
#define RIF_OFFSET 16
#define RIF_BYTES_TO_PROCESS 30
diff --git a/epan/dissectors/packet-trill.c b/epan/dissectors/packet-trill.c
index 0e3c2096e6..9b1ec97359 100644
--- a/epan/dissectors/packet-trill.c
+++ b/epan/dissectors/packet-trill.c
@@ -52,18 +52,18 @@ static int hf_trill_options= -1 ;
static dissector_handle_t eth_dissector ;
-#define TRILL_VERSION_MASK 0xC000
-#define TRILL_RESERVED_MASK 0x3000
+#define TRILL_VERSION_MASK 0xC000
+#define TRILL_RESERVED_MASK 0x3000
#define TRILL_MULTI_DST_MASK 0x0800
-#define TRILL_OP_LEN_MASK 0x07C0
-#define TRILL_HOP_CNT_MASK 0x003F
+#define TRILL_OP_LEN_MASK 0x07C0
+#define TRILL_HOP_CNT_MASK 0x003F
#define TRILL_PROTO_COL_NAME "TRILL"
#define TRILL_PROTO_COL_INFO "TRILL Encapsulated Frame"
-#define TRILL_MIN_FRAME_LENGTH 6
-#define TRILL_BIT_FIELDS_LEN 2
-#define TRILL_NICKNAME_LEN 2
+#define TRILL_MIN_FRAME_LENGTH 6
+#define TRILL_BIT_FIELDS_LEN 2
+#define TRILL_NICKNAME_LEN 2
#define TRILL_OP_LENGTH_BYTE_UNITS 0x4
static const true_false_string multi_dst_strings = {
@@ -97,9 +97,9 @@ dissect_trill( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
{
proto_item *ti ;
proto_tree *trill_tree ;
- guint32 op_len ;
- tvbuff_t *next_tvb ;
- int offset = 0 ;
+ guint32 op_len ;
+ tvbuff_t *next_tvb ;
+ int offset = 0 ;
col_set_str( pinfo->cinfo, COL_PROTOCOL, TRILL_PROTO_COL_NAME ) ;
col_set_str( pinfo->cinfo, COL_INFO, TRILL_PROTO_COL_INFO ) ;
@@ -140,7 +140,7 @@ dissect_trill( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
}
/* call the eth dissector */
- next_tvb = tvb_new_subset( tvb, TRILL_MIN_FRAME_LENGTH + op_len , -1, -1 ) ;
+ next_tvb = tvb_new_subset_remaining( tvb, TRILL_MIN_FRAME_LENGTH + op_len ) ;
call_dissector( eth_dissector, next_tvb, pinfo, tree ) ;
return tvb_length( tvb ) ;