aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2010-01-22 13:56:19 +0000
committerBill Meier <wmeier@newsguy.com>2010-01-22 13:56:19 +0000
commit1a4283ccf885f5a519c294d77f04e615ca209ee9 (patch)
tree05bac2c93b046f4c68a65c859d58bf7c474eb056
parenta33e4ee41ef1f5408cf76b5cec564244aae15820 (diff)
Fixes for gcc -Wshadow warnings; Fix indentation and do other minor cleanup in a few cases.
svn path=/trunk/; revision=31617
-rw-r--r--epan/dissectors/packet-pw-atm.c136
-rw-r--r--epan/dissectors/packet-pw-cesopsn.c66
-rw-r--r--epan/dissectors/packet-pw-satop.c70
-rw-r--r--epan/dissectors/packet-q931.c20
-rw-r--r--epan/dissectors/packet-rdt.c60
-rw-r--r--epan/dissectors/packet-rlc-lte.c5
-rw-r--r--epan/dissectors/packet-rsvp.c10
-rw-r--r--epan/dissectors/packet-rtcp.c21
-rw-r--r--epan/dissectors/packet-rtps.c40
-rw-r--r--epan/dissectors/packet-rtps2.c62
-rw-r--r--epan/dissectors/packet-sdp.c696
-rw-r--r--epan/dissectors/packet-sip.c868
12 files changed, 1027 insertions, 1027 deletions
diff --git a/epan/dissectors/packet-pw-atm.c b/epan/dissectors/packet-pw-atm.c
index 0d0c967b78..4e86cf8f8f 100644
--- a/epan/dissectors/packet-pw-atm.c
+++ b/epan/dissectors/packet-pw-atm.c
@@ -448,7 +448,6 @@ void dissect_payload_and_padding(
if (padding_size != 0)
{
- tvbuff_t* tvb_2;
tvb_2 = tvb_new_subset(tvb
,(tvb_reported_length_remaining(tvb, 0) - padding_size)
,-1
@@ -626,21 +625,21 @@ void dissect_11_or_aal5_pdu(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tr
proto_item_set_text(item, proto_name_tree, 0/*-warn gcc 3.4.4*/);
pwc_item_append_text_n_items(item,cells,"good ATM cell");
{
- proto_tree* tree;
- tree = proto_item_add_subtree(item, ett_encaps);
+ proto_tree* tree2;
+ tree2 = proto_item_add_subtree(item, ett_encaps);
{
- proto_item* item;
- item = proto_tree_add_boolean(tree
+ proto_item* item2;
+ item2 = proto_tree_add_boolean(tree2
,VALUE_SELECTOR_VPC_VCC_PDU(pd.mode
,hf_pw_type_11_vpc
,hf_pw_type_11_vcc
,hf_pw_type_aal5_pdu)
,tvb, 0, 0, TRUE);
- PROTO_ITEM_SET_GENERATED(item);
+ PROTO_ITEM_SET_GENERATED(item2);
if (MODE_11(pd.mode))
{
- item = proto_tree_add_int(tree, hf_11_ncells, tvb, 0, 0, cells);
- PROTO_ITEM_SET_GENERATED(item);
+ item2 = proto_tree_add_int(tree2, hf_11_ncells, tvb, 0, 0, cells);
+ PROTO_ITEM_SET_GENERATED(item2);
}
}
}
@@ -861,10 +860,10 @@ void dissect_aal5_sdu(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
proto_item* item;
item = proto_tree_add_item(tree, proto_aal5_sdu, tvb, 0, -1, FALSE);
{
- proto_tree* tree;
- tree = proto_item_add_subtree(item, ett_encaps);
+ proto_tree* tree2;
+ tree2 = proto_item_add_subtree(item, ett_encaps);
{
- item = proto_tree_add_boolean(tree, hf_pw_type_aal5_sdu, tvb, 0, 0, TRUE);
+ item = proto_tree_add_boolean(tree2, hf_pw_type_aal5_sdu, tvb, 0, 0, TRUE);
PROTO_ITEM_SET_GENERATED(item);
}
}
@@ -1037,14 +1036,14 @@ void dissect_n1_cw(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
item = proto_tree_add_item(tree, proto_n1_cw, tvb, 0, -1, FALSE);
pwc_item_append_text_n_items(item,cells,"good ATM cell");
{
- proto_tree* tree;
- tree = proto_item_add_subtree(item, ett_encaps);
+ proto_tree* tree2;
+ tree2 = proto_item_add_subtree(item, ett_encaps);
{
- proto_item* item;
- item = proto_tree_add_boolean(tree, hf_pw_type_n1_cw, tvb, 0, 0, TRUE);
- PROTO_ITEM_SET_GENERATED(item);
- item = proto_tree_add_int(tree, hf_n1_cw_ncells, tvb, 0, 0, cells);
- PROTO_ITEM_SET_GENERATED(item);
+ proto_item* item2;
+ item2 = proto_tree_add_boolean(tree2, hf_pw_type_n1_cw, tvb, 0, 0, TRUE);
+ PROTO_ITEM_SET_GENERATED(item2);
+ item2 = proto_tree_add_int(tree2, hf_n1_cw_ncells, tvb, 0, 0, cells);
+ PROTO_ITEM_SET_GENERATED(item2);
}
}
if (pd.props & PWC_PAY_SIZE_BAD)
@@ -1117,14 +1116,14 @@ void dissect_n1_nocw(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
item = proto_tree_add_item(tree, proto_n1_nocw, tvb, 0, -1, FALSE);
pwc_item_append_text_n_items(item,cells,"ATM cell");
{
- proto_tree* tree;
- tree = proto_item_add_subtree(item, ett_encaps);
+ proto_tree* tree2;
+ tree2 = proto_item_add_subtree(item, ett_encaps);
{
- proto_item* item;
- item = proto_tree_add_boolean(tree, hf_pw_type_n1_nocw, tvb, 0, 0, TRUE);
- PROTO_ITEM_SET_GENERATED(item);
- item = proto_tree_add_int(tree, hf_n1_nocw_ncells, tvb, 0, 0, cells);
- PROTO_ITEM_SET_GENERATED(item);
+ proto_item* item2;
+ item2 = proto_tree_add_boolean(tree2, hf_pw_type_n1_nocw, tvb, 0, 0, TRUE);
+ PROTO_ITEM_SET_GENERATED(item2);
+ item2 = proto_tree_add_int(tree2, hf_n1_nocw_ncells, tvb, 0, 0, cells);
+ PROTO_ITEM_SET_GENERATED(item2);
}
}
if (pd.props & PWC_PAY_SIZE_BAD)
@@ -1214,12 +1213,12 @@ void dissect_control_word(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree
pwc_item_append_cw(item_top,tvb_get_ntohl(tvb, 0),FALSE);
{
- proto_tree* tree;
- tree = proto_item_add_subtree(item_top, ett_cw);
+ proto_tree* tree2;
+ tree2 = proto_item_add_subtree(item_top, ett_cw);
{
proto_item* item;
/* bits 0..3 */
- item = proto_tree_add_item(tree, hf_cw_bits03, tvb, 0, 1, FALSE);
+ item = proto_tree_add_item(tree2, hf_cw_bits03, tvb, 0, 1, FALSE);
if (pd->props & PWC_CW_BAD_BITS03)
{
/* add item to tree (and show it) only if its value is wrong*/
@@ -1234,7 +1233,7 @@ void dissect_control_word(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree
/* flags */
if (MODE_N1(pd->mode))
{
- item = proto_tree_add_item(tree, hf_pref_cw_flags, tvb, 0, 1, FALSE);
+ item = proto_tree_add_item(tree2, hf_pref_cw_flags, tvb, 0, 1, FALSE);
if (pd->props & PWC_CW_BAD_FLAGS)
{
expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
@@ -1243,10 +1242,10 @@ void dissect_control_word(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree
}
if (pd->mode == PWATM_MODE_AAL5_SDU)
{
- item = proto_tree_add_item(tree, hf_pref_cw_a5s_t, tvb, 0, 1, FALSE);
- item = proto_tree_add_item(tree, hf_pref_cw_a5s_e, tvb, 0, 1, FALSE);
- item = proto_tree_add_item(tree, hf_pref_cw_a5s_c, tvb, 0, 1, FALSE);
- item = proto_tree_add_item(tree, hf_pref_cw_a5s_u, tvb, 0, 1, FALSE);
+ proto_tree_add_item(tree2, hf_pref_cw_a5s_t, tvb, 0, 1, FALSE);
+ proto_tree_add_item(tree2, hf_pref_cw_a5s_e, tvb, 0, 1, FALSE);
+ proto_tree_add_item(tree2, hf_pref_cw_a5s_c, tvb, 0, 1, FALSE);
+ proto_tree_add_item(tree2, hf_pref_cw_a5s_u, tvb, 0, 1, FALSE);
/*
* rfc4717: [When FRF.8.1 Frame Relay/ATM PVC Service Interworking [RFC3916]
* traffic is being transported, the CPCS-UU Least Significant Bit
@@ -1271,12 +1270,12 @@ void dissect_control_word(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree
{
if (MODE_11_OR_AAL5_PDU(pd->mode))
{
- item = proto_tree_add_item(tree
+ item = proto_tree_add_item(tree2
,hf_generic_cw_rsv, tvb, 0, 1, FALSE);
}
else
{ /*preferred cw*/
- item = proto_tree_add_item(tree
+ item = proto_tree_add_item(tree2
,hf_pref_cw_rsv, tvb, 1, 1, FALSE);
}
@@ -1307,7 +1306,7 @@ void dissect_control_word(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree
if (pref_aal5_sdu_extend_cw_length_with_rsvd)
hf_len = hf_pref_cw_rsvlen;
}
- item = proto_tree_add_item(tree, hf_len, tvb, 1, 1, FALSE);
+ item = proto_tree_add_item(tree2, hf_len, tvb, 1, 1, FALSE);
}
if (pd->props & PWC_CW_BAD_LEN_MUST_BE_0)
{
@@ -1335,18 +1334,18 @@ void dissect_control_word(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree
}
/* sequence number */
- (void)proto_tree_add_item(tree, hf_cw_seq, tvb
+ proto_tree_add_item(tree2, hf_cw_seq, tvb
,MODE_11_OR_AAL5_PDU(pd->mode) ? 1 : 2, 2, FALSE);
/* atm-specific byte */
if (MODE_11(pd->mode))
{
- (void) proto_tree_add_item(tree, hf_gen_cw_atmbyte, tvb, 3, 1, FALSE);
+ proto_tree_add_item(tree2, hf_gen_cw_atmbyte, tvb, 3, 1, FALSE);
/*
* no need to highlight item in the tree, therefore
* expert_add_info_format() is not used here.
*/
- item = proto_tree_add_text(tree,tvb,3,1
+ item = proto_tree_add_text(tree2,tvb,3,1
,"ATM-specific byte of CW is fully dissected below as %s%s"
,(PWATM_MODE_11_VPC == pd->mode) ? "a part of " : ""
,"PW ATM Cell Header [000]");
@@ -1363,7 +1362,7 @@ void dissect_control_word(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree
{
tvbuff_t* tvb_2;
tvb_2 = tvb_new_subset(tvb, (PWC_SIZEOF_CW-1), -1, -1);
- call_dissector(dh_cell_header, tvb_2, pinfo, tree);
+ call_dissector(dh_cell_header, tvb_2, pinfo, tree2);
proto_item_append_text(item_top,", ");
proto_item_append_text_cwb3_fields(item_top,pd);
}
@@ -1514,100 +1513,100 @@ int dissect_cell_header(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
}
{
- proto_tree* tree;
- tree = proto_item_add_subtree(item, ett_cell_header);
+ proto_tree* tree2;
+ tree2 = proto_item_add_subtree(item, ett_cell_header);
if (is_enough_data)
{
- proto_item* item;
+ proto_item* item2;
if (MODE_N1(pd->mode)
|| (pd->mode == PWATM_MODE_AAL5_SDU && pd->submode == PWATM_SUBMODE_ADMIN_CELL))
{
- (void) proto_tree_add_uint(tree, hf_cell_h_vpi, tvb, 0, 2, (unsigned)pd->vpi);
- (void) proto_tree_add_uint(tree, hf_cell_h_vci, tvb, 1, 3, (unsigned)pd->vci);
+ proto_tree_add_uint(tree2, hf_cell_h_vpi, tvb, 0, 2, (unsigned)pd->vpi);
+ proto_tree_add_uint(tree2, hf_cell_h_vci, tvb, 1, 3, (unsigned)pd->vci);
- item = proto_tree_add_item(tree, hf_cell_h_pti, tvb, 3, 1, FALSE);
+ item2 = proto_tree_add_item(tree2, hf_cell_h_pti, tvb, 3, 1, FALSE);
if (NULL == match_strval(pd->pti,atm_pt_vals))
{
- expert_add_info_format(pinfo, item, PI_UNDECODED, PI_WARN,
+ expert_add_info_format(pinfo, item2, PI_UNDECODED, PI_WARN,
"Unknown value of PTI field (%d) in the ATM cell header",
pd->pti);
}
else if (pd->mode == PWATM_MODE_AAL5_SDU && !PTI_IS_ADMIN(pd->pti))
{
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
+ expert_add_info_format(pinfo, item2, PI_MALFORMED, PI_ERROR,
"ATM admin cell is transerred;"
" PTI field (%d) should be 4, 5 or 6.",
pd->pti);
}
- (void) proto_tree_add_item(tree, hf_cell_h_clp, tvb, 3, 1, FALSE);
+ proto_tree_add_item(tree2, hf_cell_h_clp, tvb, 3, 1, FALSE);
}
else if (MODE_11_OR_AAL5_PDU(pd->mode))
{
- item = proto_tree_add_item(tree, hf_cell_h_m , tvb, 0, 1, FALSE);
+ item2 = proto_tree_add_item(tree2, hf_cell_h_m , tvb, 0, 1, FALSE);
if ((0 != pd->cwb3.m) && MODE_11(pd->mode))
{
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
+ expert_add_info_format(pinfo, item2, PI_MALFORMED, PI_ERROR
,"1:1 mode:"
" M bit must be 0 to distinguish from AAL5 PDU mode");
}
- item = proto_tree_add_item(tree, hf_cell_h_v , tvb, 0, 1, FALSE);
+ item2 = proto_tree_add_item(tree2, hf_cell_h_v , tvb, 0, 1, FALSE);
if ((0 == pd->cwb3.v) && (PWATM_MODE_11_VPC == pd->mode))
{
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
+ expert_add_info_format(pinfo, item2, PI_MALFORMED, PI_ERROR
,"1:1 VPC mode:"
" V bit must be 1 to indicate that VCI is present");
}
if ((0 != pd->cwb3.v) && (PWATM_MODE_11_VCC == pd->mode))
{
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
+ expert_add_info_format(pinfo, item2, PI_MALFORMED, PI_ERROR
,"1:1 VCC mode:"
" V bit must be 0 to indicate that VCI is absent");
}
if ((0 != pd->cwb3.v) && (PWATM_MODE_AAL5_PDU == pd->mode))
{
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
+ expert_add_info_format(pinfo, item2, PI_MALFORMED, PI_ERROR
,"AAL5 PDU mode:"
" V bit must be 0 to indicate that VCI is absent");
}
- item = proto_tree_add_item(tree
+ item2 = proto_tree_add_item(tree2
,(PWATM_MODE_AAL5_PDU == pd->mode)
? hf_aal5_pdu_rsv
: hf_cell_h_rsv
,tvb, 0, 1, FALSE);
if (0 != pd->cwb3.rsv)
{
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
+ expert_add_info_format(pinfo, item2, PI_MALFORMED, PI_ERROR
,"Reserved bits in the 3rd byte of CW must be 0");
}
else
{
- PROTO_ITEM_SET_HIDDEN(item); /*...and show only in error cases */
+ PROTO_ITEM_SET_HIDDEN(item2); /*...and show only in error cases */
}
if (MODE_11(pd->mode))
{
- item = proto_tree_add_item(tree, hf_cell_h_pti, tvb, 0, 1, FALSE);
+ item2 = proto_tree_add_item(tree2, hf_cell_h_pti, tvb, 0, 1, FALSE);
if (NULL == match_strval(pd->pti,atm_pt_vals))
{
- expert_add_info_format(pinfo, item, PI_UNDECODED, PI_WARN,
+ expert_add_info_format(pinfo, item2, PI_UNDECODED, PI_WARN,
"Unknown value of PTI field (%d) in the atm-specific byte"
,pd->pti);
}
}
else
{
- (void) proto_tree_add_item(tree, hf_aal5_pdu_u, tvb, 0, 1, FALSE);
- (void) proto_tree_add_item(tree, hf_aal5_pdu_e, tvb, 0, 1, FALSE);
+ proto_tree_add_item(tree2, hf_aal5_pdu_u, tvb, 0, 1, FALSE);
+ proto_tree_add_item(tree2, hf_aal5_pdu_e, tvb, 0, 1, FALSE);
}
- (void) proto_tree_add_item(tree, hf_cell_h_clp, tvb, 0, 1, FALSE);
+ proto_tree_add_item(tree2, hf_cell_h_clp, tvb, 0, 1, FALSE);
if (PWATM_MODE_11_VPC == pd->mode)
{
- (void) proto_tree_add_uint(tree, hf_cell_h_vci, tvb, 1, 2
+ proto_tree_add_uint(tree2, hf_cell_h_vci, tvb, 1, 2
,(unsigned)pd->vci);
}
}
@@ -1628,6 +1627,7 @@ int dissect_cell_header(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
}
+
static
int dissect_cell(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
@@ -1674,12 +1674,12 @@ int dissect_cell(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
}
{
- proto_tree* tree;
+ proto_tree* tree2;
tvbuff_t* tvb_d;
- tree = proto_item_add_subtree(item, ett_cell);
+ tree2 = proto_item_add_subtree(item, ett_cell);
tvb_d = tvb_new_subset(tvb, 0, dissect_size, -1);
- call_dissector(dh_data, tvb_d, pinfo, tree);
- item = proto_tree_add_int(tree, hf_cell_payload_len, tvb, 0, 0, dissect_size);
+ call_dissector(dh_data, tvb_d, pinfo, tree2);
+ item = proto_tree_add_int(tree2, hf_cell_payload_len, tvb, 0, 0, dissect_size);
PROTO_ITEM_SET_HIDDEN(item);
}
}
diff --git a/epan/dissectors/packet-pw-cesopsn.c b/epan/dissectors/packet-pw-cesopsn.c
index 20e5eca8f5..7029bd77fe 100644
--- a/epan/dissectors/packet-pw-cesopsn.c
+++ b/epan/dissectors/packet-pw-cesopsn.c
@@ -265,64 +265,64 @@ void dissect_pw_cesopsn( tvbuff_t * tvb_original
pwc_item_append_cw(item,tvb_get_ntohl(tvb_original, 0),TRUE);
pwc_item_append_text_n_items(item,(int)payload_size,"octet");
{
- proto_tree* tree;
- tree = proto_item_add_subtree(item, ett);
+ proto_tree* tree2;
+ tree2 = proto_item_add_subtree(item, ett);
{
tvbuff_t* tvb;
- proto_item* item;
+ proto_item* item2;
tvb = tvb_new_subset(tvb_original, 0, PWC_SIZEOF_CW, PWC_SIZEOF_CW);
- item = proto_tree_add_item(tree, hf_cw, tvb, 0, -1, FALSE);
- pwc_item_append_cw(item,tvb_get_ntohl(tvb, 0),FALSE);
+ item2 = proto_tree_add_item(tree2, hf_cw, tvb, 0, -1, FALSE);
+ pwc_item_append_cw(item2,tvb_get_ntohl(tvb, 0),FALSE);
{
- proto_tree* tree;
- tree = proto_item_add_subtree(item, ett);
+ proto_tree* tree3;
+ tree3 = proto_item_add_subtree(item, ett);
{
- proto_item* item;
+ proto_item* item3;
if (properties & PWC_CW_BAD_BITS03) /*display only if value is wrong*/
{
- item = proto_tree_add_item(tree, hf_cw_bits03, tvb, 0, 1, FALSE);
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
+ item3 = proto_tree_add_item(tree3, hf_cw_bits03, tvb, 0, 1, FALSE);
+ expert_add_info_format(pinfo, item3, PI_MALFORMED, PI_ERROR
,"Bits 0..3 of Control Word must be 0");
}
- item = proto_tree_add_item(tree, hf_cw_lm, tvb, 0, 1, FALSE);
+ item3 = proto_tree_add_item(tree3, hf_cw_lm, tvb, 0, 1, FALSE);
if (properties & PWC_CW_SUSPECT_LM)
{
- expert_add_info_format(pinfo, item, PI_UNDECODED, PI_WARN
+ expert_add_info_format(pinfo, item3, PI_UNDECODED, PI_WARN
,"Reserved combination of L and Modifier bits");
}
- (void)proto_tree_add_item(tree, hf_cw_r, tvb, 0, 1, FALSE);
+ proto_tree_add_item(tree3, hf_cw_r, tvb, 0, 1, FALSE);
- item = proto_tree_add_item(tree, hf_cw_frg, tvb, 1, 1, FALSE);
+ item3 = proto_tree_add_item(tree3, hf_cw_frg, tvb, 1, 1, FALSE);
if (properties & PWC_CW_BAD_FRAG)
{
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
+ expert_add_info_format(pinfo, item3, PI_MALFORMED, PI_ERROR
,"Fragmentation of payload is not allowed"
" for basic CESoPSN mode");
}
- item = proto_tree_add_item(tree, hf_cw_len, tvb, 1, 1, FALSE);
+ item3 = proto_tree_add_item(tree3, hf_cw_len, tvb, 1, 1, FALSE);
if (properties & PWC_CW_BAD_PAYLEN_LT_0)
{
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
+ expert_add_info_format(pinfo, item3, PI_MALFORMED, PI_ERROR
,"Bad Length: too small, must be > %d"
,(int)encaps_size);
}
if (properties & PWC_CW_BAD_PAYLEN_GT_PACKET)
{
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
+ expert_add_info_format(pinfo, item3, PI_MALFORMED, PI_ERROR
,"Bad Length: must be <= than PSN packet size (%d)"
,(int)packet_size);
}
if (properties & PWC_CW_BAD_LEN_MUST_BE_0)
{
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
+ expert_add_info_format(pinfo, item3, PI_MALFORMED, PI_ERROR
,"Bad Length: must be 0 if CESoPSN packet size (%d) is > 64"
,(int)packet_size);
}
- proto_tree_add_item(tree, hf_cw_seq, tvb, 2, 2, FALSE);
+ proto_tree_add_item(tree3, hf_cw_seq, tvb, 2, 2, FALSE);
}
}
@@ -345,36 +345,36 @@ void dissect_pw_cesopsn( tvbuff_t * tvb_original
}
else
{
- proto_tree* tree;
- tree = proto_item_add_subtree(item, ett);
+ proto_tree* tree2;
+ tree2 = proto_item_add_subtree(item, ett);
{
- proto_item* item;
+ proto_item* item2;
tvbuff_t* tvb;
tvb = tvb_new_subset(tvb_original, PWC_SIZEOF_CW, payload_size, payload_size);
- item = proto_tree_add_item(tree, hf_payload, tvb, 0, -1, FALSE);
- pwc_item_append_text_n_items(item,(int)payload_size,"octet");
+ item2 = proto_tree_add_item(tree2, hf_payload, tvb, 0, -1, FALSE);
+ pwc_item_append_text_n_items(item2,(int)payload_size,"octet");
if (properties & PWC_PAY_SIZE_BAD)
{
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
+ expert_add_info_format(pinfo, item2, PI_MALFORMED, PI_ERROR
,"CESoPSN packet payload size must be multiple of 8");
}
- tree = proto_item_add_subtree(item, ett);
- call_dissector(data_handle, tvb, pinfo, tree);
- item = proto_tree_add_int(tree, hf_payload_l, tvb, 0, 0
+ tree2 = proto_item_add_subtree(item2, ett);
+ call_dissector(data_handle, tvb, pinfo, tree2);
+ item2 = proto_tree_add_int(tree2, hf_payload_l, tvb, 0, 0
,(int)payload_size); /* allow filtering */
- PROTO_ITEM_SET_HIDDEN(item);
+ PROTO_ITEM_SET_HIDDEN(item2);
}
}
/* padding */
if (padding_size > 0)
{
- proto_tree* tree;
- tree = proto_item_add_subtree(item, ett);
+ proto_tree* tree2;
+ tree2 = proto_item_add_subtree(item, ett);
{
tvbuff_t* tvb;
tvb = tvb_new_subset(tvb_original, PWC_SIZEOF_CW + payload_size, padding_size, -1);
- call_dissector(pw_padding_handle, tvb, pinfo, tree);
+ call_dissector(pw_padding_handle, tvb, pinfo, tree2);
}
}
}
diff --git a/epan/dissectors/packet-pw-satop.c b/epan/dissectors/packet-pw-satop.c
index 2bb408f97d..a8af6fe156 100644
--- a/epan/dissectors/packet-pw-satop.c
+++ b/epan/dissectors/packet-pw-satop.c
@@ -262,64 +262,64 @@ void dissect_pw_satop(tvbuff_t * tvb_original
pwc_item_append_cw(item,tvb_get_ntohl(tvb_original, 0),TRUE);
pwc_item_append_text_n_items(item,(int)payload_size,"octet");
{
- proto_tree* tree;
- tree = proto_item_add_subtree(item, ett);
+ proto_tree* tree2;
+ tree2 = proto_item_add_subtree(item, ett);
{
tvbuff_t* tvb;
- proto_item* item;
+ proto_item* item2;
tvb = tvb_new_subset(tvb_original, 0, PWC_SIZEOF_CW, PWC_SIZEOF_CW);
- item = proto_tree_add_item(tree, hf_cw, tvb, 0, -1, FALSE);
- pwc_item_append_cw(item,tvb_get_ntohl(tvb, 0),FALSE);
+ item2 = proto_tree_add_item(tree2, hf_cw, tvb, 0, -1, FALSE);
+ pwc_item_append_cw(item2, tvb_get_ntohl(tvb, 0),FALSE);
{
- proto_tree* tree;
- tree = proto_item_add_subtree(item, ett);
+ proto_tree* tree3;
+ tree3 = proto_item_add_subtree(item2, ett);
{
- proto_item* item;
+ proto_item* item3;
if (properties & PWC_CW_BAD_BITS03) /*display only if value is wrong*/
{
- item = proto_tree_add_item(tree, hf_cw_bits03, tvb, 0, 1, FALSE);
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
+ item3 = proto_tree_add_item(tree3, hf_cw_bits03, tvb, 0, 1, FALSE);
+ expert_add_info_format(pinfo, item3, PI_MALFORMED, PI_ERROR
,"Bits 0..3 of Control Word must be 0");
}
- (void) proto_tree_add_item(tree, hf_cw_l , tvb, 0, 1, FALSE);
- (void) proto_tree_add_item(tree, hf_cw_r , tvb, 0, 1, FALSE);
+ proto_tree_add_item(tree3, hf_cw_l , tvb, 0, 1, FALSE);
+ proto_tree_add_item(tree3, hf_cw_r , tvb, 0, 1, FALSE);
- item = proto_tree_add_item(tree, hf_cw_rsv, tvb, 0, 1, FALSE);
+ item3 = proto_tree_add_item(tree3, hf_cw_rsv, tvb, 0, 1, FALSE);
if (properties & PWC_CW_BAD_RSV)
{
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
+ expert_add_info_format(pinfo, item3, PI_MALFORMED, PI_ERROR
,"RSV bits of Control Word must be 0");
}
- item = proto_tree_add_item(tree, hf_cw_frg, tvb, 1, 1, FALSE);
+ item3 = proto_tree_add_item(tree3, hf_cw_frg, tvb, 1, 1, FALSE);
if (properties & PWC_CW_BAD_FRAG)
{
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
+ expert_add_info_format(pinfo, item3, PI_MALFORMED, PI_ERROR
,"Fragmentation of payload is not allowed for SAToP");
}
- item = proto_tree_add_item(tree, hf_cw_len, tvb, 1, 1, FALSE);
+ item3 = proto_tree_add_item(tree3, hf_cw_len, tvb, 1, 1, FALSE);
if (properties & PWC_CW_BAD_PAYLEN_LT_0)
{
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
+ expert_add_info_format(pinfo, item3, PI_MALFORMED, PI_ERROR
,"Bad Length: too small, must be > %d"
,(int)encaps_size);
}
if (properties & PWC_CW_BAD_PAYLEN_GT_PACKET)
{
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
+ expert_add_info_format(pinfo, item3, PI_MALFORMED, PI_ERROR
,"Bad Length: must be <= than PSN packet size (%d)"
,(int)packet_size);
}
if (properties & PWC_CW_BAD_LEN_MUST_BE_0)
{
- expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR
+ expert_add_info_format(pinfo, item3, PI_MALFORMED, PI_ERROR
,"Bad Length: must be 0 if SAToP packet size (%d) is > 64"
,(int)packet_size);
}
- (void)proto_tree_add_item(tree, hf_cw_seq, tvb, 2, 2, FALSE);
+ proto_tree_add_item(tree3, hf_cw_seq, tvb, 2, 2, FALSE);
}
}
}
@@ -339,16 +339,16 @@ void dissect_pw_satop(tvbuff_t * tvb_original
else
{
- proto_tree* tree;
- tree = proto_item_add_subtree(item, ett);
+ proto_tree* tree2;
+ tree2 = proto_item_add_subtree(item, ett);
{
- proto_item* item;
+ proto_item* item2;
tvbuff_t* tvb;
tvb = tvb_new_subset(tvb_original, PWC_SIZEOF_CW, payload_size, payload_size);
- item = proto_tree_add_item(tree, hf_payload, tvb, 0, -1, FALSE);
- pwc_item_append_text_n_items(item,(int)payload_size,"octet");
+ item2 = proto_tree_add_item(tree2, hf_payload, tvb, 0, -1, FALSE);
+ pwc_item_append_text_n_items(item2,(int)payload_size,"octet");
{
- proto_tree* tree;
+ proto_tree* tree3;
const char* s;
switch(payload_properties)
{
@@ -369,12 +369,12 @@ void dissect_pw_satop(tvbuff_t * tvb_original
s = "";
break;
}
- proto_item_append_text(item, "%s", s);
- tree = proto_item_add_subtree(item, ett);
- call_dissector(data_handle, tvb, pinfo, tree);
- item = proto_tree_add_int(tree, hf_payload_l, tvb, 0, 0
+ proto_item_append_text(item2, "%s", s);
+ tree3 = proto_item_add_subtree(item2, ett);
+ call_dissector(data_handle, tvb, pinfo, tree3);
+ item2 = proto_tree_add_int(tree3, hf_payload_l, tvb, 0, 0
,(int)payload_size); /* allow filtering */
- PROTO_ITEM_SET_HIDDEN(item);
+ PROTO_ITEM_SET_HIDDEN(item2);
}
}
}
@@ -382,12 +382,12 @@ void dissect_pw_satop(tvbuff_t * tvb_original
/* padding */
if (padding_size > 0)
{
- proto_tree* tree;
- tree = proto_item_add_subtree(item, ett);
+ proto_tree* tree2;
+ tree2 = proto_item_add_subtree(item, ett);
{
tvbuff_t* tvb;
tvb = tvb_new_subset(tvb_original, PWC_SIZEOF_CW + payload_size, padding_size, -1);
- call_dissector(pw_padding_handle, tvb, pinfo, tree);
+ call_dissector(pw_padding_handle, tvb, pinfo, tree2);
}
}
}
diff --git a/epan/dissectors/packet-q931.c b/epan/dissectors/packet-q931.c
index 57e322add1..74e9818576 100644
--- a/epan/dissectors/packet-q931.c
+++ b/epan/dissectors/packet-q931.c
@@ -1543,20 +1543,20 @@ dissect_q931_channel_identification_ie(tvbuff_t *tvb, int offset, int len,
len -= 1;
if (octet & Q931_INTERFACE_IDENTIFIED) {
- guint8 octet;
+ guint8 octet2;
guint32 identifier_val = 0;
int identifier_offset = offset;
int identifier_len = 0;
do {
if (len == 0)
break;
- octet = tvb_get_guint8(tvb, offset);
+ octet2 = tvb_get_guint8(tvb, offset);
offset += 1;
len -= 1;
identifier_len++;
identifier_val <<= 7;
- identifier_val |= octet & 0x7F;
- } while (!(octet & Q931_IE_VL_EXTENSION));
+ identifier_val |= octet2 & 0x7F;
+ } while (!(octet2 & Q931_IE_VL_EXTENSION));
if (identifier_len != 0) {
proto_tree_add_text(tree, tvb, identifier_offset,
@@ -1589,27 +1589,27 @@ dissect_q931_channel_identification_ie(tvbuff_t *tvb, int offset, int len,
len -= 1;
if (octet & Q931_IS_SLOT_MAP) {
- guint8 octet;
+ guint8 octet2;
while (len) {
- octet = tvb_get_guint8(tvb, offset);
+ octet2 = tvb_get_guint8(tvb, offset);
proto_tree_add_text(tree, tvb, offset, 1,
- "Slot map: 0x%02x", octet);
+ "Slot map: 0x%02x", octet2);
offset += 1;
len -= 1;
}
} else {
- guint8 octet;
+ guint8 octet2;
do {
if (len == 0)
break;
- octet = tvb_get_guint8(tvb, offset);
+ octet2 = tvb_get_guint8(tvb, offset);
proto_tree_add_item(tree, hf_q931_extension_ind, tvb, offset, 1, FALSE);
proto_tree_add_item(tree,hf_q931_channel_number,tvb,offset,1,FALSE);
offset += 1;
len -= 1;
- } while (!(octet & Q931_IE_VL_EXTENSION));
+ } while (!(octet2 & Q931_IE_VL_EXTENSION));
}
}
}
diff --git a/epan/dissectors/packet-rdt.c b/epan/dissectors/packet-rdt.c
index 7352305e52..b9316a8083 100644
--- a/epan/dissectors/packet-rdt.c
+++ b/epan/dissectors/packet-rdt.c
@@ -242,7 +242,7 @@ void rdt_add_address(packet_info *pinfo,
{
address null_addr;
conversation_t* p_conv;
- struct _rdt_conversation_info *p_conv_data = NULL;
+ struct _rdt_conversation_info *p_conv_data;
/* If this isn't the first time this packet has been processed,
we've already done this work, so we don't need to do it
@@ -296,9 +296,9 @@ static void dissect_rdt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint previous_offset = 0;
gint offset = 0;
- proto_item *ti = NULL;
+ proto_item *ti;
proto_tree *rdt_tree = NULL;
- proto_tree *rdt_packet_tree = NULL;
+ proto_tree *rdt_packet_tree;
guint16 packet_type;
/* Set/clear columns */
@@ -419,9 +419,9 @@ guint dissect_rdt_data_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
guint16 asm_rule_number;
guint8 back_to_back;
guint8 slow_data;
- proto_tree *flags_tree1 = NULL;
- proto_tree *flags_tree2 = NULL;
- proto_item *ti = NULL;
+ proto_tree *flags_tree1;
+ proto_tree *flags_tree2;
+ proto_item *ti;
/* Flags in first byte */
flags1 = tvb_get_guint8(tvb, offset);
@@ -554,8 +554,8 @@ guint dissect_rdt_asm_action_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tre
guint8 length_included_flag;
guint16 stream_id;
guint16 rel_seqno;
- proto_tree *flags_tree = NULL;
- proto_item *ti = NULL;
+ proto_tree *flags_tree;
+ proto_item *ti;
/* Flags in first byte */
flags1 = tvb_get_guint8(tvb, offset);
@@ -636,8 +636,8 @@ guint dissect_rdt_bandwidth_report_packet(tvbuff_t *tvb, packet_info *pinfo, pro
guint16 packet_length;
guint8 flags1;
guint8 length_included_flag;
- proto_tree *flags_tree = NULL;
- proto_item *ti = NULL;
+ proto_tree *flags_tree;
+ proto_item *ti;
/* Flags in first byte */
flags1 = tvb_get_guint8(tvb, offset);
@@ -702,8 +702,8 @@ guint dissect_rdt_ack_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
guint8 flags1;
guint8 length_included_flag;
guint8 lost_high_flag;
- proto_tree *flags_tree = NULL;
- proto_item *ti = NULL;
+ proto_tree *flags_tree;
+ proto_item *ti;
/* Flags in first byte */
flags1 = tvb_get_guint8(tvb, offset);
@@ -834,8 +834,8 @@ guint dissect_rdt_stream_end_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tre
guint16 stream_id;
guint8 packet_sent;
guint8 ext_flag;
- proto_tree *flags_tree = NULL;
- proto_item *ti = NULL;
+ proto_tree *flags_tree;
+ proto_item *ti;
/* Flags in first byte */
flags1 = tvb_get_guint8(tvb, offset);
@@ -914,8 +914,8 @@ guint dissect_rdt_report_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
guint16 packet_length;
guint8 flags1;
guint8 length_included_flag;
- proto_tree *flags_tree = NULL;
- proto_item *ti = NULL;
+ proto_tree *flags_tree;
+ proto_item *ti;
/* Flags in first byte */
flags1 = tvb_get_guint8(tvb, offset);
@@ -976,8 +976,8 @@ guint dissect_rdt_latency_report_packet(tvbuff_t *tvb, packet_info *pinfo, proto
guint8 flags1;
guint8 length_included_flag;
guint32 server_out_time;
- proto_tree *flags_tree = NULL;
- proto_item *ti = NULL;
+ proto_tree *flags_tree;
+ proto_item *ti;
/* Flags in first byte */
flags1 = tvb_get_guint8(tvb, offset);
@@ -1041,8 +1041,8 @@ guint dissect_rdt_transport_info_request_packet(tvbuff_t *tvb, packet_info *pinf
guint8 request_rtt_info_flag;
guint8 request_buffer_info_flag;
guint32 request_time_msec;
- proto_tree *flags_tree = NULL;
- proto_item *ti = NULL;
+ proto_tree *flags_tree;
+ proto_item *ti;
/* Flags in first byte */
flags1 = tvb_get_guint8(tvb, offset);
@@ -1089,8 +1089,8 @@ guint dissect_rdt_transport_info_response_packet(tvbuff_t *tvb, packet_info *pin
guint8 has_buffer_info;
guint32 request_time_msec;
guint32 response_time_msec;
- proto_tree *flags_tree = NULL;
- proto_item *ti = NULL;
+ proto_tree *flags_tree;
+ proto_item *ti;
/* Flags in first byte */
flags1 = tvb_get_guint8(tvb, offset);
@@ -1146,15 +1146,15 @@ guint dissect_rdt_transport_info_response_packet(tvbuff_t *tvb, packet_info *pin
for (n=0; n < buffer_info_count; n++)
{
- proto_tree *buffer_info_tree = NULL;
- proto_item *ti = NULL;
+ proto_tree *buffer_info_tree;
+ proto_item *ti2;
/* Each buffer info in a new subtree */
- ti = proto_tree_add_string_format(tree, hf_rdt_tirp_buffer_info, tvb, offset, 14,
+ ti2 = proto_tree_add_string_format(tree, hf_rdt_tirp_buffer_info, tvb, offset, 14,
"",
"Buffer info %u",
n+1);
- buffer_info_tree = proto_item_add_subtree(ti, ett_rdt_tirp_buffer_info);
+ buffer_info_tree = proto_item_add_subtree(ti2, ett_rdt_tirp_buffer_info);
/* Read individual buffer info */
proto_tree_add_item(buffer_info_tree, hf_rdt_tirp_buffer_info_stream_id, tvb, offset, 2, FALSE);
@@ -1183,8 +1183,8 @@ guint dissect_rdt_bw_probing_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tre
guint16 packet_length;
guint8 flags1;
guint8 length_included_flag;
- proto_tree *flags_tree = NULL;
- proto_item *ti = NULL;
+ proto_tree *flags_tree;
+ proto_item *ti;
/* Flags in first byte */
flags1 = tvb_get_guint8(tvb, offset);
@@ -1266,8 +1266,8 @@ guint dissect_rdt_unknown_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree
static void show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
/* Conversation and current data */
- conversation_t *p_conv = NULL;
- struct _rdt_conversation_info *p_conv_data = NULL;
+ conversation_t *p_conv;
+ struct _rdt_conversation_info *p_conv_data;
/* Use existing packet info if available */
p_conv_data = p_get_proto_data(pinfo->fd, proto_rdt);
diff --git a/epan/dissectors/packet-rlc-lte.c b/epan/dissectors/packet-rlc-lte.c
index e31684064e..3f12b9dda5 100644
--- a/epan/dissectors/packet-rlc-lte.c
+++ b/epan/dissectors/packet-rlc-lte.c
@@ -1322,9 +1322,8 @@ void dissect_rlc_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Can't dissect anything without it... */
if (p_rlc_lte_info == NULL) {
- proto_item *ti =
- proto_tree_add_text(rlc_lte_tree, tvb, offset, -1,
- "Can't dissect LTE RLC frame because no per-frame info was attached!");
+ ti = proto_tree_add_text(rlc_lte_tree, tvb, offset, -1,
+ "Can't dissect LTE RLC frame because no per-frame info was attached!");
PROTO_ITEM_SET_GENERATED(ti);
return;
}
diff --git a/epan/dissectors/packet-rsvp.c b/epan/dissectors/packet-rsvp.c
index 03fa4d9e0d..9b457ee7ce 100644
--- a/epan/dissectors/packet-rsvp.c
+++ b/epan/dissectors/packet-rsvp.c
@@ -5344,14 +5344,14 @@ dissect_rsvp_msg_tree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (message_type == RSVP_MSG_BUNDLE) {
/* Bundle message. Dissect component messages */
if (rsvp_bundle_dissect) {
- int len = 8;
- while (len < msg_length) {
+ int len2 = 8;
+ while (len2 < msg_length) {
gint sub_len;
tvbuff_t *tvb_sub;
- sub_len = tvb_get_ntohs(tvb, len+6);
- tvb_sub = tvb_new_subset(tvb, len, sub_len, sub_len);
+ sub_len = tvb_get_ntohs(tvb, len2+6);
+ tvb_sub = tvb_new_subset(tvb, len2, sub_len, sub_len);
dissect_rsvp_msg_tree(tvb_sub, pinfo, rsvp_tree, TREE(TT_BUNDLE_COMPMSG), rsvph);
- len += sub_len;
+ len2 += sub_len;
}
} else {
proto_tree_add_text(rsvp_tree, tvb, offset, msg_length - len,
diff --git a/epan/dissectors/packet-rtcp.c b/epan/dissectors/packet-rtcp.c
index d43adecb25..39f293986e 100644
--- a/epan/dissectors/packet-rtcp.c
+++ b/epan/dissectors/packet-rtcp.c
@@ -838,7 +838,8 @@ dissect_rtcp_fir( tvbuff_t *tvb, int offset, proto_tree *tree )
static int
dissect_rtcp_app( tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree *tree,
- unsigned int padding, unsigned int packet_len, guint rtcp_subtype, guint32 app_length )
+ unsigned int padding, unsigned int packet_len, guint rtcp_subtype,
+ guint32 app_length )
{
unsigned int counter = 0;
char ascii_name[5];
@@ -1120,9 +1121,9 @@ dissect_rtcp_app( tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree *tree
/* Move onto next 4-byte boundary */
if (offset % 4) {
- int padding = (4-(offset%4));
- offset += padding;
- packet_len -= padding;
+ int padding2 = (4-(offset%4));
+ offset += padding2;
+ packet_len -= padding2;
}
}
@@ -1349,18 +1350,18 @@ dissect_rtcp_app( tvbuff_t *tvb,packet_info *pinfo, int offset, proto_tree *tree
i < sizeof(contents) / sizeof(contents[0]);
++i ) {
if ( contents[i] ) {
- guint sdes_type, sdes_len;
- /* (sdes_type not currently used...). Could complain if type
+ guint sdes_type2, sdes_len2;
+ /* (sdes_type2 not currently used...). Could complain if type
doesn't match expected for item... */
- sdes_type = tvb_get_guint8( tvb, offset++ );
- sdes_len = tvb_get_guint8( tvb, offset );
+ sdes_type2 = tvb_get_guint8( tvb, offset++ );
+ sdes_len2 = tvb_get_guint8( tvb, offset );
/* Add SDES field indicated as present */
proto_tree_add_item( PoC1_tree, hf_rtcp_app_poc1_conn_sdes_items[i], tvb, offset, 1, FALSE );
/* Move past field */
- offset += sdes_len + 1;
- packet_len -= (sdes_len + 2);
+ offset += sdes_len2 + 1;
+ packet_len -= (sdes_len2 + 2);
}
}
break;
diff --git a/epan/dissectors/packet-rtps.c b/epan/dissectors/packet-rtps.c
index 4175fc9e4a..0b95307fd5 100644
--- a/epan/dissectors/packet-rtps.c
+++ b/epan/dissectors/packet-rtps.c
@@ -1022,10 +1022,10 @@ static void rtps_util_add_ipv4_address_t(proto_tree *tree, /* Can be NULL */
guint8 * buffer, /* Can be NULL */
gint buffer_size) { /* Can be 0 */
- guint32 address;
+ guint32 addr;
- address = NEXT_guint32(tvb, offset, little_endian);
- if (address == IPADDRESS_INVALID) {
+ addr = NEXT_guint32(tvb, offset, little_endian);
+ if (addr == IPADDRESS_INVALID) {
if (buffer) {
g_strlcpy(buffer, IPADDRESS_INVALID_STRING, buffer_size);
}
@@ -1042,10 +1042,10 @@ static void rtps_util_add_ipv4_address_t(proto_tree *tree, /* Can be NULL */
if (buffer) {
g_snprintf(buffer, buffer_size,
"%d.%d.%d.%d",
- (address >> 24) & 0xff,
- (address >> 16) & 0xff,
- (address >> 8) & 0xff,
- address & 0xff);
+ (addr >> 24) & 0xff,
+ (addr >> 16) & 0xff,
+ (addr >> 8) & 0xff,
+ addr & 0xff);
}
if (tree) {
proto_tree_add_text(tree,
@@ -1054,10 +1054,10 @@ static void rtps_util_add_ipv4_address_t(proto_tree *tree, /* Can be NULL */
4,
"%s: %d.%d.%d.%d",
label,
- (address >> 24) & 0xff,
- (address >> 16) & 0xff,
- (address >> 8) & 0xff,
- address & 0xff);
+ (addr >> 24) & 0xff,
+ (addr >> 16) & 0xff,
+ (addr >> 8) & 0xff,
+ addr & 0xff);
}
}
}
@@ -1084,7 +1084,7 @@ static void rtps_util_add_locator_udp_v4(proto_tree *tree, /* Can NOT be NULL */
proto_tree * locator_tree;
guint32 port;
char portLabel[MAX_PORT_SIZE];
- char address[MAX_IPV4_ADDRESS_SIZE];
+ char addr[MAX_IPV4_ADDRESS_SIZE];
port = NEXT_guint32(tvb, offset+4, little_endian);
@@ -1105,7 +1105,7 @@ static void rtps_util_add_locator_udp_v4(proto_tree *tree, /* Can NOT be NULL */
offset,
little_endian,
"address",
- address,
+ addr,
MAX_IPV4_ADDRESS_SIZE);
proto_tree_add_text(locator_tree,
tvb,
@@ -1116,7 +1116,7 @@ static void rtps_util_add_locator_udp_v4(proto_tree *tree, /* Can NOT be NULL */
proto_item_set_text(ti, "%s: { address=%s, port=%s }",
label,
- address,
+ addr,
portLabel);
}
@@ -2475,9 +2475,9 @@ static gint rtps_util_add_typecode(proto_tree *tree,
* - A4: 4: Sequence max length
* - the sequence typecode
*/
- guint32 seq_max_len;
+ guint32 seq_max_len2;
LONG_ALIGN(offset);
- seq_max_len = NEXT_guint32(tvb, offset, little_endian);
+ seq_max_len2 = NEXT_guint32(tvb, offset, little_endian);
offset += 4;
/* Recursive decode seq typecode */
@@ -2492,7 +2492,7 @@ static gint rtps_util_add_typecode(proto_tree *tree,
is_key,
offset_begin,
name,
- seq_max_len,
+ seq_max_len2,
NULL,
ndds_40_hack);
/* Differently from the other typecodes, the line has been already printed */
@@ -5630,14 +5630,14 @@ static gboolean dissect_rtps(tvbuff_t *tvb,
int domain_id;
int participant_idx;
int nature;
- proto_item *ti;
+ proto_item *ti2;
proto_tree *mapping_tree;
domain_id = ((pinfo->destport - PORT_BASE)/10) % 100;
participant_idx = (pinfo->destport - PORT_BASE) / 1000;
nature = (pinfo->destport % 10);
- ti = proto_tree_add_text(rtps_tree,
+ ti2 = proto_tree_add_text(rtps_tree,
tvb,
0,
4,
@@ -5647,7 +5647,7 @@ static gboolean dissect_rtps(tvbuff_t *tvb,
participant_idx,
val_to_str(nature, nature_type_vals, "%02x"));
- mapping_tree = proto_item_add_subtree(ti, ett_rtps_default_mapping);
+ mapping_tree = proto_item_add_subtree(ti2, ett_rtps_default_mapping);
proto_tree_add_uint(mapping_tree,
hf_rtps_domain_id,
tvb,
diff --git a/epan/dissectors/packet-rtps2.c b/epan/dissectors/packet-rtps2.c
index 494b7fe15c..f7dd5a0892 100644
--- a/epan/dissectors/packet-rtps2.c
+++ b/epan/dissectors/packet-rtps2.c
@@ -1279,10 +1279,10 @@ static void rtps_util_add_ipv4_address_t(proto_tree *tree,
guint8 * buffer, /* Can be NULL */
gint buffer_size) { /* Can be 0 */
- guint32 address;
+ guint32 addr;
- address = NEXT_guint32(tvb, offset, little_endian);
- if (address == IPADDRESS_INVALID) {
+ addr = NEXT_guint32(tvb, offset, little_endian);
+ if (addr == IPADDRESS_INVALID) {
if (buffer) {
g_strlcpy(buffer, IPADDRESS_INVALID_STRING, buffer_size);
}
@@ -1299,10 +1299,10 @@ static void rtps_util_add_ipv4_address_t(proto_tree *tree,
if (buffer) {
g_snprintf(buffer, buffer_size,
"%d.%d.%d.%d",
- (address >> 24) & 0xff,
- (address >> 16) & 0xff,
- (address >> 8) & 0xff,
- address & 0xff);
+ (addr >> 24) & 0xff,
+ (addr >> 16) & 0xff,
+ (addr >> 8) & 0xff,
+ addr & 0xff);
}
if (tree) {
proto_tree_add_text(tree,
@@ -1311,10 +1311,10 @@ static void rtps_util_add_ipv4_address_t(proto_tree *tree,
4,
"%s: %d.%d.%d.%d",
label,
- (address >> 24) & 0xff,
- (address >> 16) & 0xff,
- (address >> 8) & 0xff,
- address & 0xff);
+ (addr >> 24) & 0xff,
+ (addr >> 16) & 0xff,
+ (addr >> 8) & 0xff,
+ addr & 0xff);
}
}
}
@@ -1341,7 +1341,7 @@ static void rtps_util_add_locator_udp_v4(proto_tree *tree,
proto_tree * locator_tree;
guint32 port;
char portLabel[MAX_PORT_SIZE];
- char address[MAX_IPV4_ADDRESS_SIZE];
+ char addr[MAX_IPV4_ADDRESS_SIZE];
port = NEXT_guint32(tvb, offset+4, little_endian);
@@ -1362,7 +1362,7 @@ static void rtps_util_add_locator_udp_v4(proto_tree *tree,
offset,
little_endian,
"address",
- address,
+ addr,
MAX_IPV4_ADDRESS_SIZE);
proto_tree_add_text(locator_tree,
tvb,
@@ -1373,7 +1373,7 @@ static void rtps_util_add_locator_udp_v4(proto_tree *tree,
proto_item_set_text(ti, "%s: { address=%s, port=%s }",
label,
- address,
+ addr,
portLabel);
}
}
@@ -2781,9 +2781,9 @@ static gint rtps_util_add_typecode(proto_tree *tree,
* - A4: 4: Sequence max length
* - the sequence typecode
*/
- guint32 seq_max_len;
+ guint32 seq_max_len2;
LONG_ALIGN(offset);
- seq_max_len = NEXT_guint32(tvb, offset, little_endian);
+ seq_max_len2 = NEXT_guint32(tvb, offset, little_endian);
offset += 4;
/* Recursive decode seq typecode */
@@ -2798,7 +2798,7 @@ static gint rtps_util_add_typecode(proto_tree *tree,
is_key,
offset_begin,
name,
- seq_max_len,
+ seq_max_len2,
NULL,
ndds_40_hack);
/* Differently from the other typecodes, the line has been already printed */
@@ -8269,7 +8269,7 @@ static void dissect_RTPS_DATA_BATCH(tvbuff_t *tvb,
/* Sample Info List: start decoding the sample info list until the offset
* is greater or equal than 'sampleListOffset' */
while (offset < sampleListOffset) {
- guint16 flags;
+ guint16 flags2;
guint16 octetsToInlineQos;
gint min_length;
proto_tree * si_tree;
@@ -8292,9 +8292,9 @@ static void dissect_RTPS_DATA_BATCH(tvbuff_t *tvb,
"sampleInfo[%d]", sample_info_count);
si_tree = proto_item_add_subtree(ti, ett_rtps_sample_info);
- flags = NEXT_guint16(tvb, offset, 0); /* Flags are always big endian */
- sample_info_flags[sample_info_count] = flags;
- rtps_util_decode_flags_16bit(si_tree, tvb, offset, flags, RTPS_SAMPLE_INFO_FLAGS16);
+ flags2 = NEXT_guint16(tvb, offset, 0); /* Flags are always big endian */
+ sample_info_flags[sample_info_count] = flags2;
+ rtps_util_decode_flags_16bit(si_tree, tvb, offset, flags2, RTPS_SAMPLE_INFO_FLAGS16);
offset += 2;
octetsToInlineQos = rtps_util_add_short(si_tree,
tvb,
@@ -8309,9 +8309,9 @@ static void dissect_RTPS_DATA_BATCH(tvbuff_t *tvb,
offset += 2;
min_length = 4;
- if ((flags & FLAG_SAMPLE_INFO_T) != 0) min_len += 8;
- if ((flags & FLAG_SAMPLE_INFO_Q) != 0) min_len += 4;
- if ((flags & FLAG_SAMPLE_INFO_O) != 0) min_len += 4;
+ if ((flags2 & FLAG_SAMPLE_INFO_T) != 0) min_len += 8;
+ if ((flags2 & FLAG_SAMPLE_INFO_Q) != 0) min_len += 4;
+ if ((flags2 & FLAG_SAMPLE_INFO_O) != 0) min_len += 4;
/* Ensure there are enough bytes to decode */
if (sampleListOffset - offset < min_length) {
@@ -8337,7 +8337,7 @@ static void dissect_RTPS_DATA_BATCH(tvbuff_t *tvb,
offset += 4;
/* Timestamp [only if T==1] */
- if ((flags & FLAG_SAMPLE_INFO_T) != 0) {
+ if ((flags2 & FLAG_SAMPLE_INFO_T) != 0) {
rtps_util_add_ntp_time(si_tree,
tvb,
offset,
@@ -8349,7 +8349,7 @@ static void dissect_RTPS_DATA_BATCH(tvbuff_t *tvb,
}
/* Offset SN [only if O==1] */
- if ((flags & FLAG_SAMPLE_INFO_O) != 0) {
+ if ((flags2 & FLAG_SAMPLE_INFO_O) != 0) {
rtps_util_add_long(si_tree,
tvb,
offset,
@@ -8364,7 +8364,7 @@ static void dissect_RTPS_DATA_BATCH(tvbuff_t *tvb,
}
/* Parameter list [only if Q==1] */
- if ((flags & FLAG_SAMPLE_INFO_Q) != 0) {
+ if ((flags2 & FLAG_SAMPLE_INFO_Q) != 0) {
offset = dissect_parameter_sequence(si_tree,
tvb,
offset,
@@ -8545,7 +8545,7 @@ static gboolean dissect_rtps(tvbuff_t *tvb,
int participant_idx = -1;
int nature;
int Doffset;
- proto_item *ti;
+ proto_item *ti2;
proto_tree *mapping_tree;
/* For a complete description of these rules, see RTPS documentation
@@ -8597,7 +8597,7 @@ static gboolean dissect_rtps(tvbuff_t *tvb,
}
if (nature == PORT_METATRAFFIC_UNICAST || nature == PORT_USERTRAFFIC_UNICAST) {
- ti = proto_tree_add_text(rtps_tree,
+ ti2 = proto_tree_add_text(rtps_tree,
tvb,
0,
4,
@@ -8608,7 +8608,7 @@ static gboolean dissect_rtps(tvbuff_t *tvb,
participant_idx);
} else {
/* Multicast doesn't print the participant index */
- ti = proto_tree_add_text(rtps_tree,
+ ti2 = proto_tree_add_text(rtps_tree,
tvb,
0,
4,
@@ -8618,7 +8618,7 @@ static gboolean dissect_rtps(tvbuff_t *tvb,
}
/* Build the searchable protocol tree */
- mapping_tree = proto_item_add_subtree(ti, ett_rtps_default_mapping);
+ mapping_tree = proto_item_add_subtree(ti2, ett_rtps_default_mapping);
proto_tree_add_uint(mapping_tree,
hf_rtps_domain_id,
tvb,
diff --git a/epan/dissectors/packet-sdp.c b/epan/dissectors/packet-sdp.c
index 6e7c0c9efa..37ecc38c2b 100644
--- a/epan/dissectors/packet-sdp.c
+++ b/epan/dissectors/packet-sdp.c
@@ -295,7 +295,7 @@ dissect_sdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
transport_info.connection_type=NULL;
transport_info.media_type=NULL;
for (n=0; n < SDP_NO_OF_PT; n++){
- transport_info.encoding_name[n]=unknown_encoding;
+ transport_info.encoding_name[n]=unknown_encoding;
}
for (n=0; n < SDP_MAX_RTP_CHANNELS; n++)
{
@@ -351,8 +351,8 @@ dissect_sdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
type = tvb_get_guint8(tvb,offset);
delim = tvb_get_guint8(tvb,offset + 1);
if (delim != '=') {
- proto_item *ti = proto_tree_add_item(sdp_tree, hf_invalid, tvb, offset, linelen, FALSE);
- expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_NOTE,
+ proto_item *ti2 = proto_tree_add_item(sdp_tree, hf_invalid, tvb, offset, linelen, FALSE);
+ expert_add_info_format(pinfo, ti2, PI_MALFORMED, PI_NOTE,
"Invalid SDP line (no '=' delimiter)");
offset = next_offset;
continue;
@@ -454,15 +454,15 @@ dissect_sdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* and stream decoding is enabled in preferences
*/
if(global_sdp_establish_conversation){
- /* Check if media protocol is RTP */
- is_rtp = (strcmp(transport_info.media_proto[n],"RTP/AVP")==0);
- /* Check if media protocol is SRTP */
- is_srtp = (strcmp(transport_info.media_proto[n],"RTP/SAVP")==0);
- /* Check if media protocol is T38 */
- is_t38 = ( (strcmp(transport_info.media_proto[n],"UDPTL")==0) ||
- (strcmp(transport_info.media_proto[n],"udptl")==0) );
- /* Check if media protocol is MSRP/TCP */
- is_msrp = (strcmp(transport_info.media_proto[n],"msrp/tcp")==0);
+ /* Check if media protocol is RTP */
+ is_rtp = (strcmp(transport_info.media_proto[n],"RTP/AVP")==0);
+ /* Check if media protocol is SRTP */
+ is_srtp = (strcmp(transport_info.media_proto[n],"RTP/SAVP")==0);
+ /* Check if media protocol is T38 */
+ is_t38 = ( (strcmp(transport_info.media_proto[n],"UDPTL")==0) ||
+ (strcmp(transport_info.media_proto[n],"udptl")==0) );
+ /* Check if media protocol is MSRP/TCP */
+ is_msrp = (strcmp(transport_info.media_proto[n],"msrp/tcp")==0);
}
}
@@ -487,9 +487,9 @@ dissect_sdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
}
}
- if (strcmp(transport_info.media_type,"video")==0){
- is_video = TRUE;
- }
+ if (strcmp(transport_info.media_type,"video")==0){
+ is_video = TRUE;
+ }
set_rtp = FALSE;
/* Add (s)rtp and (s)rtcp conversation, if available (overrides t38 if conversation already set) */
if((!pinfo->fd->flags.visited) && port!=0 && (is_rtp||is_srtp) && (is_ipv4_addr || is_ipv6_addr)){
@@ -522,14 +522,14 @@ dissect_sdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Add MSRP conversation. Uses addresses discovered in attribute
rather than connection information of media session line */
if (is_msrp ){
- if ((!pinfo->fd->flags.visited) && msrp_transport_address_set){
- if(msrp_handle){
- src_addr.type=AT_IPv4;
- src_addr.len=4;
- src_addr.data=(guint8*)&msrp_ipaddr;
- msrp_add_address(pinfo, &src_addr, msrp_port_number, "SDP", pinfo->fd->num);
- }
+ if ((!pinfo->fd->flags.visited) && msrp_transport_address_set){
+ if(msrp_handle){
+ src_addr.type=AT_IPv4;
+ src_addr.len=4;
+ src_addr.data=(guint8*)&msrp_ipaddr;
+ msrp_add_address(pinfo, &src_addr, msrp_port_number, "SDP", pinfo->fd->num);
}
+ }
}
/* Create the RTP summary str for the Voip Call analysis */
@@ -763,14 +763,14 @@ dissect_sdp_bandwidth(tvbuff_t *tvb, proto_item *ti){
item = proto_tree_add_item(sdp_bandwidth_tree, hf_bandwidth_modifier, tvb, offset,
tokenlen, FALSE);
if (tvb_strneql(tvb, offset, "CT", 2) == 0){
- proto_item_append_text(item, " [Conference Total(total bandwidth of all RTP sessions)]");
- unit_is_kbs = TRUE;
+ proto_item_append_text(item, " [Conference Total(total bandwidth of all RTP sessions)]");
+ unit_is_kbs = TRUE;
}else if (tvb_strneql(tvb, offset, "AS", 2) == 0){
- proto_item_append_text(item, " [Application Specific (RTP session bandwidth)]");
- unit_is_kbs = TRUE;
+ proto_item_append_text(item, " [Application Specific (RTP session bandwidth)]");
+ unit_is_kbs = TRUE;
}else if (tvb_strneql(tvb, offset, "TIAS", 4) == 0){
- proto_item_append_text(item, " [Transport Independent Application Specific maximum]");
- unit_is_bps = TRUE;
+ proto_item_append_text(item, " [Transport Independent Application Specific maximum]");
+ unit_is_bps = TRUE;
}
@@ -779,9 +779,9 @@ dissect_sdp_bandwidth(tvbuff_t *tvb, proto_item *ti){
item = proto_tree_add_item(sdp_bandwidth_tree, hf_bandwidth_value, tvb, offset, -1,
FALSE);
if (unit_is_kbs == TRUE)
- proto_item_append_text(item, " kb/s");
+ proto_item_append_text(item, " kb/s");
if (unit_is_bps == TRUE)
- proto_item_append_text(item, " b/s");
+ proto_item_append_text(item, " b/s");
}
static void dissect_sdp_time(tvbuff_t *tvb, proto_item* ti){
@@ -910,7 +910,7 @@ static void dissect_sdp_encryption_key(tvbuff_t *tvb, proto_item * ti){
}
static void dissect_key_mgmt(tvbuff_t *tvb, packet_info * pinfo, proto_item * ti){
- gchar *data = NULL;
+ gchar *data_p = NULL;
gchar *prtcl_id = NULL;
gint len;
tvbuff_t *keymgmt_tvb;
@@ -938,8 +938,8 @@ static void dissect_key_mgmt(tvbuff_t *tvb, packet_info * pinfo, proto_item * ti
if (len < 0)
return;
- data = tvb_get_ephemeral_string(tvb, offset, len);
- keymgmt_tvb = base64_to_tvb(tvb, data);
+ data_p = tvb_get_ephemeral_string(tvb, offset, len);
+ keymgmt_tvb = base64_to_tvb(tvb, data_p);
add_new_data_source(pinfo, keymgmt_tvb, "Key Management Data");
if ( prtcl_id != NULL && key_mgmt_dissector_table != NULL ) {
@@ -950,9 +950,9 @@ static void dissect_key_mgmt(tvbuff_t *tvb, packet_info * pinfo, proto_item * ti
}
if (found_match) {
- proto_item *ti = proto_tree_add_item(key_tree, hf_key_mgmt_data,
+ proto_item *ti2 = proto_tree_add_item(key_tree, hf_key_mgmt_data,
keymgmt_tvb, 0, -1, FALSE);
- PROTO_ITEM_SET_HIDDEN(ti);
+ PROTO_ITEM_SET_HIDDEN(ti2);
}
else {
proto_tree_add_item(key_tree, hf_key_mgmt_data,
@@ -1034,7 +1034,7 @@ static void
dissect_sdp_media(tvbuff_t *tvb, proto_item *ti,
transport_info_t *transport_info){
proto_tree *sdp_media_tree;
- gint offset, next_offset, tokenlen, index;
+ gint offset, next_offset, tokenlen, idx;
guint8 *media_format;
offset = 0;
@@ -1128,9 +1128,9 @@ dissect_sdp_media(tvbuff_t *tvb, proto_item *ti,
media_format = tvb_get_ephemeral_string(tvb, offset, tokenlen);
proto_tree_add_string(sdp_media_tree, hf_media_format, tvb, offset,
tokenlen, val_to_str(atol((char*)media_format), rtp_payload_type_vals, "%u"));
- index = transport_info->media[transport_info->media_count].pt_count;
- transport_info->media[transport_info->media_count].pt[index] = atol((char*)media_format);
- if (index < (SDP_MAX_RTP_PAYLOAD_TYPES-1))
+ idx = transport_info->media[transport_info->media_count].pt_count;
+ transport_info->media[transport_info->media_count].pt[idx] = atol((char*)media_format);
+ if (idx < (SDP_MAX_RTP_PAYLOAD_TYPES-1))
transport_info->media[transport_info->media_count].pt_count++;
} else {
proto_tree_add_item(sdp_media_tree, hf_media_format, tvb, offset,
@@ -1156,76 +1156,76 @@ dissect_sdp_media(tvbuff_t *tvb, proto_item *ti,
static tvbuff_t *
ascii_bytes_to_tvb(tvbuff_t *tvb, packet_info *pinfo, gint len, gchar *msg)
{
- guint8 *buf = g_malloc(10240);
-
- /* arbitrary maximum length */
- if(len<20480){
- int i;
- tvbuff_t *bytes_tvb;
-
- /* first, skip to where the encoded pdu starts, this is
- the first hex digit after the '=' char.
- */
- while(1){
- if((*msg==0)||(*msg=='\n')){
- return NULL;
- }
- if(*msg=='='){
- msg++;
- break;
- }
- msg++;
- }
- while(1){
- if((*msg==0)||(*msg=='\n')){
- return NULL;
- }
- if( ((*msg>='0')&&(*msg<='9'))
- || ((*msg>='a')&&(*msg<='f'))
- || ((*msg>='A')&&(*msg<='F'))){
- break;
- }
- msg++;
- }
- i=0;
- while( ((*msg>='0')&&(*msg<='9'))
- ||((*msg>='a')&&(*msg<='f'))
- ||((*msg>='A')&&(*msg<='F')) ){
- int val;
- if((*msg>='0')&&(*msg<='9')){
- val=(*msg)-'0';
- } else if((*msg>='a')&&(*msg<='f')){
- val=(*msg)-'a'+10;
- } else if((*msg>='A')&&(*msg<='F')){
- val=(*msg)-'A'+10;
- } else {
- return NULL;
- }
- val<<=4;
- msg++;
- if((*msg>='0')&&(*msg<='9')){
- val|=(*msg)-'0';
- } else if((*msg>='a')&&(*msg<='f')){
- val|=(*msg)-'a'+10;
- } else if((*msg>='A')&&(*msg<='F')){
- val|=(*msg)-'A'+10;
- } else {
- return NULL;
- }
- msg++;
-
- buf[i]=(guint8)val;
- i++;
- }
- if(i==0){
- return NULL;
- }
- bytes_tvb = tvb_new_child_real_data(tvb, buf,i,i);
- tvb_set_free_cb(bytes_tvb, g_free);
- add_new_data_source(pinfo, bytes_tvb, "ASCII bytes to tvb");
- return bytes_tvb;
- }
- return NULL;
+ guint8 *buf = g_malloc(10240);
+
+ /* arbitrary maximum length */
+ if(len<20480){
+ int i;
+ tvbuff_t *bytes_tvb;
+
+ /* first, skip to where the encoded pdu starts, this is
+ the first hex digit after the '=' char.
+ */
+ while(1){
+ if((*msg==0)||(*msg=='\n')){
+ return NULL;
+ }
+ if(*msg=='='){
+ msg++;
+ break;
+ }
+ msg++;
+ }
+ while(1){
+ if((*msg==0)||(*msg=='\n')){
+ return NULL;
+ }
+ if( ((*msg>='0')&&(*msg<='9'))
+ || ((*msg>='a')&&(*msg<='f'))
+ || ((*msg>='A')&&(*msg<='F'))){
+ break;
+ }
+ msg++;
+ }
+ i=0;
+ while( ((*msg>='0')&&(*msg<='9'))
+ ||((*msg>='a')&&(*msg<='f'))
+ ||((*msg>='A')&&(*msg<='F')) ){
+ int val;
+ if((*msg>='0')&&(*msg<='9')){
+ val=(*msg)-'0';
+ } else if((*msg>='a')&&(*msg<='f')){
+ val=(*msg)-'a'+10;
+ } else if((*msg>='A')&&(*msg<='F')){
+ val=(*msg)-'A'+10;
+ } else {
+ return NULL;
+ }
+ val<<=4;
+ msg++;
+ if((*msg>='0')&&(*msg<='9')){
+ val|=(*msg)-'0';
+ } else if((*msg>='a')&&(*msg<='f')){
+ val|=(*msg)-'a'+10;
+ } else if((*msg>='A')&&(*msg<='F')){
+ val|=(*msg)-'A'+10;
+ } else {
+ return NULL;
+ }
+ msg++;
+
+ buf[i]=(guint8)val;
+ i++;
+ }
+ if(i==0){
+ return NULL;
+ }
+ bytes_tvb = tvb_new_child_real_data(tvb, buf,i,i);
+ tvb_set_free_cb(bytes_tvb, g_free);
+ add_new_data_source(pinfo, bytes_tvb, "ASCII bytes to tvb");
+ return bytes_tvb;
+ }
+ return NULL;
}
/* Annex X Profiles and levels definition */
@@ -1311,16 +1311,16 @@ decode_sdp_fmtp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint offset
item = proto_tree_add_uint(tree, hf_sdp_fmtp_mpeg4_profile_level_id, tvb, offset, tokenlen,
atol((char*)format_specific_parameter));
PROTO_ITEM_SET_GENERATED(item);
- }else if(strcmp((char*)field_name, "config") == 0) {
- /* String including "=" */
- tokenlen = end_offset - offset;
- format_specific_parameter = tvb_get_ephemeral_string(tvb, offset, tokenlen);
- /* ascii_bytes_to_tvb requires the "=" to be in the buffer */
- data_tvb = ascii_bytes_to_tvb(tvb, pinfo, tokenlen, format_specific_parameter);
- if(mp4ves_handle && data_tvb){
- dissect_mp4ves_config(data_tvb, pinfo, tree);
- }
- }
+ } else if (strcmp((char*)field_name, "config") == 0) {
+ /* String including "=" */
+ tokenlen = end_offset - offset;
+ format_specific_parameter = tvb_get_ephemeral_string(tvb, offset, tokenlen);
+ /* ascii_bytes_to_tvb requires the "=" to be in the buffer */
+ data_tvb = ascii_bytes_to_tvb(tvb, pinfo, tokenlen, format_specific_parameter);
+ if(mp4ves_handle && data_tvb){
+ dissect_mp4ves_config(data_tvb, pinfo, tree);
+ }
+ }
}
/* Dissect the H263-2000 profile parameter if present */
@@ -1357,73 +1357,73 @@ decode_sdp_fmtp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint offset
*/
if (mime_type != NULL && g_ascii_strcasecmp(mime_type, "H264") == 0) {
if (strcmp(field_name, "profile-level-id") == 0) {
- int length;
+ int length;
- /* Length includes "=" as it's required by ascii_bytes_to_tvb()*/
+ /* Length includes "=" as it's required by ascii_bytes_to_tvb()*/
tokenlen = end_offset - offset;
format_specific_parameter = tvb_get_ephemeral_string(tvb, offset, tokenlen);
- data_tvb = ascii_bytes_to_tvb(tvb, pinfo, tokenlen, format_specific_parameter);
- length = tvb_length(data_tvb);
- if (length == 3){
- if(h264_handle && data_tvb){
- dissect_h264_profile(data_tvb, pinfo, tree);
- }
- }else{
- item = proto_tree_add_text(tree, tvb, offset, tokenlen, "Incorrectly coded, must be three bytes");
- PROTO_ITEM_SET_GENERATED(item);
- }
- }else if (strcmp(field_name, "packetization-mode") == 0) {
+ data_tvb = ascii_bytes_to_tvb(tvb, pinfo, tokenlen, format_specific_parameter);
+ length = tvb_length(data_tvb);
+ if (length == 3){
+ if(h264_handle && data_tvb){
+ dissect_h264_profile(data_tvb, pinfo, tree);
+ }
+ }else{
+ item = proto_tree_add_text(tree, tvb, offset, tokenlen, "Incorrectly coded, must be three bytes");
+ PROTO_ITEM_SET_GENERATED(item);
+ }
+ }else if (strcmp(field_name, "packetization-mode") == 0) {
offset++;
tokenlen = end_offset - offset;
format_specific_parameter = tvb_get_ephemeral_string(tvb, offset, tokenlen);
item = proto_tree_add_uint(tree, hf_sdp_h264_packetization_mode, tvb, offset, tokenlen,
atol((char*)format_specific_parameter));
- PROTO_ITEM_SET_GENERATED(item);
-
- }else if (strcmp(field_name, "sprop-parameter-sets") == 0) {
- /* The value of the parameter is the
- base64 [6] representation of the initial
- parameter set NAL units as specified in
- sections 7.3.2.1 and 7.3.2.2 of [1]. The
- parameter sets are conveyed in decoding order,
- and no framing of the parameter set NAL units
- takes place. A comma is used to separate any
- pair of parameter sets in the list.
- */
- gchar *data = NULL;
- gint comma_offset;
-
-
- /* Move past '=' */
- offset++;
- comma_offset = tvb_find_guint8(tvb,offset,-1,',');
- if (comma_offset != -1){
- tokenlen = comma_offset - offset;
- }else{
- tokenlen = end_offset - offset;
- }
+ PROTO_ITEM_SET_GENERATED(item);
+
+ }else if (strcmp(field_name, "sprop-parameter-sets") == 0) {
+ /* The value of the parameter is the
+ base64 [6] representation of the initial
+ parameter set NAL units as specified in
+ sections 7.3.2.1 and 7.3.2.2 of [1]. The
+ parameter sets are conveyed in decoding order,
+ and no framing of the parameter set NAL units
+ takes place. A comma is used to separate any
+ pair of parameter sets in the list.
+ */
+ gchar *data_p = NULL;
+ gint comma_offset;
+
+
+ /* Move past '=' */
+ offset++;
+ comma_offset = tvb_find_guint8(tvb,offset,-1,',');
+ if (comma_offset != -1){
+ tokenlen = comma_offset - offset;
+ }else{
+ tokenlen = end_offset - offset;
+ }
- data = tvb_get_ephemeral_string(tvb, offset, tokenlen);
- proto_tree_add_text(tree, tvb, offset, tokenlen, "NAL unit 1 string: %s", data);
-
- /* proto_tree_add_text(tree, tvb, offset, tokenlen, "String %s",data); */
- data_tvb = base64_to_tvb(tvb, data);
- add_new_data_source(pinfo, data_tvb, "h264 prop-parameter-sets");
-
- if(h264_handle && data_tvb){
- dissect_h264_nal_unit(data_tvb, pinfo, tree);
- if (comma_offset != -1){
- /* Second NAL unit */
- offset = comma_offset +1;
- tokenlen = end_offset - offset;
- data = tvb_get_ephemeral_string(tvb, offset, tokenlen);
- proto_tree_add_text(tree, tvb, offset, tokenlen, "NAL unit 2 string: %s", data);
- data_tvb = base64_to_tvb(tvb, data);
- add_new_data_source(pinfo, data_tvb, "h264 prop-parameter-sets 2");
- dissect_h264_nal_unit(data_tvb, pinfo, tree);
- }
- }
- }
+ data_p = tvb_get_ephemeral_string(tvb, offset, tokenlen);
+ proto_tree_add_text(tree, tvb, offset, tokenlen, "NAL unit 1 string: %s", data_p);
+
+ /* proto_tree_add_text(tree, tvb, offset, tokenlen, "String %s",data_p); */
+ data_tvb = base64_to_tvb(tvb, data_p);
+ add_new_data_source(pinfo, data_tvb, "h264 prop-parameter-sets");
+
+ if(h264_handle && data_tvb){
+ dissect_h264_nal_unit(data_tvb, pinfo, tree);
+ if (comma_offset != -1){
+ /* Second NAL unit */
+ offset = comma_offset +1;
+ tokenlen = end_offset - offset;
+ data_p = tvb_get_ephemeral_string(tvb, offset, tokenlen);
+ proto_tree_add_text(tree, tvb, offset, tokenlen, "NAL unit 2 string: %s", data_p);
+ data_tvb = base64_to_tvb(tvb, data_p);
+ add_new_data_source(pinfo, data_tvb, "h264 prop-parameter-sets 2");
+ dissect_h264_nal_unit(data_tvb, pinfo, tree);
+ }
+ }
+ }
}
}
@@ -1438,24 +1438,24 @@ typedef struct {
#define SDP_H248_ITEM 4
static const sdp_names_t sdp_media_attribute_names[] = {
- { "Unknown-name"}, /* 0 Pad so that the real headers start at index 1 */
- { "rtpmap"}, /* 1 */
- { "fmtp"}, /* 2 */
- { "path"}, /* 3 */
- { "h248item"}, /* 4 */
+ { "Unknown-name"}, /* 0 Pad so that the real headers start at index 1 */
+ { "rtpmap"}, /* 1 */
+ { "fmtp"}, /* 2 */
+ { "path"}, /* 3 */
+ { "h248item"}, /* 4 */
};
static gint find_sdp_media_attribute_names(tvbuff_t *tvb, int offset, guint len)
{
- guint i;
+ guint i;
- for (i = 1; i < array_length(sdp_media_attribute_names); i++) {
- if (len == strlen(sdp_media_attribute_names[i].name) &&
- tvb_strncaseeql(tvb, offset, sdp_media_attribute_names[i].name, len) == 0)
- return i;
- }
+ for (i = 1; i < array_length(sdp_media_attribute_names); i++) {
+ if (len == strlen(sdp_media_attribute_names[i].name) &&
+ tvb_strncaseeql(tvb, offset, sdp_media_attribute_names[i].name, len) == 0)
+ return i;
+ }
- return -1;
+ return -1;
}
static void dissect_sdp_media_attribute(tvbuff_t *tvb, packet_info *pinfo, proto_item * ti, transport_info_t *transport_info){
@@ -1510,198 +1510,198 @@ static void dissect_sdp_media_attribute(tvbuff_t *tvb, packet_info *pinfo, proto
switch (sdp_media_attrbute_code){
case SDP_RTPMAP:
- /* decode the rtpmap to see if it is DynamicPayload to dissect them automatic */
- next_offset = tvb_find_guint8(tvb,offset,-1,' ');
+ /* decode the rtpmap to see if it is DynamicPayload to dissect them automatic */
+ next_offset = tvb_find_guint8(tvb,offset,-1,' ');
- if(next_offset == -1)
- return;
+ if(next_offset == -1)
+ return;
- tokenlen = next_offset - offset;
+ tokenlen = next_offset - offset;
- proto_tree_add_item(sdp_media_attribute_tree, hf_media_format, tvb,
+ proto_tree_add_item(sdp_media_attribute_tree, hf_media_format, tvb,
offset, tokenlen, FALSE);
- payload_type = tvb_get_ephemeral_string(tvb, offset, tokenlen);
+ payload_type = tvb_get_ephemeral_string(tvb, offset, tokenlen);
- offset = next_offset + 1;
+ offset = next_offset + 1;
- next_offset = tvb_find_guint8(tvb,offset,-1,'/');
+ next_offset = tvb_find_guint8(tvb,offset,-1,'/');
- if(next_offset == -1){
- return;
- }
+ if(next_offset == -1){
+ return;
+ }
- tokenlen = next_offset - offset;
+ tokenlen = next_offset - offset;
- proto_tree_add_item(sdp_media_attribute_tree, hf_media_encoding_name, tvb,
+ proto_tree_add_item(sdp_media_attribute_tree, hf_media_encoding_name, tvb,
offset, tokenlen, FALSE);
- key=g_malloc( sizeof(gint) );
- *key=atol((char*)payload_type);
- pt = atoi((char*)payload_type);
- if (pt >= SDP_NO_OF_PT) {
- return; /* Invalid */
- }
- transport_info->encoding_name[pt] = (char*)tvb_get_ephemeral_string(tvb, offset, tokenlen);
+ key=g_malloc( sizeof(gint) );
+ *key=atol((char*)payload_type);
+ pt = atoi((char*)payload_type);
+ if (pt >= SDP_NO_OF_PT) {
+ return; /* Invalid */
+ }
+ transport_info->encoding_name[pt] = (char*)tvb_get_ephemeral_string(tvb, offset, tokenlen);
- offset = next_offset + 1;
- tvb_find_line_end_unquoted(tvb, offset, -1, &next_offset);
+ offset = next_offset + 1;
+ tvb_find_line_end_unquoted(tvb, offset, -1, &next_offset);
- tokenlen = next_offset - offset;
- proto_tree_add_item(sdp_media_attribute_tree, hf_media_sample_rate, tvb,
+ tokenlen = next_offset - offset;
+ proto_tree_add_item(sdp_media_attribute_tree, hf_media_sample_rate, tvb,
offset, tokenlen, FALSE);
- /* As per RFC2327 it is possible to have multiple Media Descriptions ("m=").
- For example:
-
- a=rtpmap:101 G726-32/8000
- m=audio 49170 RTP/AVP 0 97
- a=rtpmap:97 telephone-event/8000
- m=audio 49172 RTP/AVP 97 101
- a=rtpmap:97 G726-24/8000
-
- The Media attributes ("a="s) after the "m=" only apply for that "m=".
- If there is an "a=" before the first "m=", that attribute applies for
- all the session (all the "m="s).
- */
-
- /* so, if this "a=" appear before any "m=", we add it to all the dynamic
- * hash tables
- */
- if (transport_info->media_count == 0) {
- for (n=0; n < SDP_MAX_RTP_CHANNELS; n++) {
- if (n==0)
- g_hash_table_insert(transport_info->media[n].rtp_dyn_payload,
- key, g_strdup(transport_info->encoding_name[pt]));
- else { /* we create a new key and encoding_name to assign to the other hash tables */
- gint *key2;
- key2=g_malloc( sizeof(gint) );
- *key2=atol((char*)payload_type);
- g_hash_table_insert(transport_info->media[n].rtp_dyn_payload,
- key2, g_strdup(transport_info->encoding_name[pt]));
- }
- }
- return;
- /* if the "a=" is after an "m=", only apply to this "m=" */
- }else
- /* in case there is an overflow in SDP_MAX_RTP_CHANNELS, we keep always the last "m=" */
- if (transport_info->media_count == SDP_MAX_RTP_CHANNELS-1)
- g_hash_table_insert(transport_info->media[ transport_info->media_count ].rtp_dyn_payload,
- key, g_strdup(transport_info->encoding_name[pt]));
- else
- g_hash_table_insert(transport_info->media[ transport_info->media_count-1 ].rtp_dyn_payload,
- key, g_strdup(transport_info->encoding_name[pt]));
- break;
+ /* As per RFC2327 it is possible to have multiple Media Descriptions ("m=").
+ For example:
+
+ a=rtpmap:101 G726-32/8000
+ m=audio 49170 RTP/AVP 0 97
+ a=rtpmap:97 telephone-event/8000
+ m=audio 49172 RTP/AVP 97 101
+ a=rtpmap:97 G726-24/8000
+
+ The Media attributes ("a="s) after the "m=" only apply for that "m=".
+ If there is an "a=" before the first "m=", that attribute applies for
+ all the session (all the "m="s).
+ */
+
+ /* so, if this "a=" appear before any "m=", we add it to all the dynamic
+ * hash tables
+ */
+ if (transport_info->media_count == 0) {
+ for (n=0; n < SDP_MAX_RTP_CHANNELS; n++) {
+ if (n==0)
+ g_hash_table_insert(transport_info->media[n].rtp_dyn_payload,
+ key, g_strdup(transport_info->encoding_name[pt]));
+ else { /* we create a new key and encoding_name to assign to the other hash tables */
+ gint *key2;
+ key2=g_malloc( sizeof(gint) );
+ *key2=atol((char*)payload_type);
+ g_hash_table_insert(transport_info->media[n].rtp_dyn_payload,
+ key2, g_strdup(transport_info->encoding_name[pt]));
+ }
+ }
+ return;
+ /* if the "a=" is after an "m=", only apply to this "m=" */
+ }else
+ /* in case there is an overflow in SDP_MAX_RTP_CHANNELS, we keep always the last "m=" */
+ if (transport_info->media_count == SDP_MAX_RTP_CHANNELS-1)
+ g_hash_table_insert(transport_info->media[ transport_info->media_count ].rtp_dyn_payload,
+ key, g_strdup(transport_info->encoding_name[pt]));
+ else
+ g_hash_table_insert(transport_info->media[ transport_info->media_count-1 ].rtp_dyn_payload,
+ key, g_strdup(transport_info->encoding_name[pt]));
+ break;
case SDP_FMTP:
- if(sdp_media_attribute_tree){
- guint8 media_format;
- /* Reading the Format parameter(fmtp) */
- /* Skip leading space, if any */
- offset = tvb_skip_wsp(tvb,offset,tvb_length_remaining(tvb,offset));
- /* Media format extends to the next space */
- next_offset = tvb_find_guint8(tvb,offset,-1,' ');
+ if(sdp_media_attribute_tree){
+ guint8 media_format;
+ /* Reading the Format parameter(fmtp) */
+ /* Skip leading space, if any */
+ offset = tvb_skip_wsp(tvb,offset,tvb_length_remaining(tvb,offset));
+ /* Media format extends to the next space */
+ next_offset = tvb_find_guint8(tvb,offset,-1,' ');
- if(next_offset == -1)
- return;
+ if(next_offset == -1)
+ return;
- tokenlen = next_offset - offset;
+ tokenlen = next_offset - offset;
- media_format_item = proto_tree_add_item(sdp_media_attribute_tree,
- hf_media_format, tvb, offset,
- tokenlen, FALSE);
- media_format = atoi((char*)tvb_get_ephemeral_string(tvb, offset, tokenlen));
- if (media_format >= SDP_NO_OF_PT) {
- return; /* Invalid */
- }
-
- /* Append encoding name to format if known */
- proto_item_append_text(media_format_item, " [%s]",
+ media_format_item = proto_tree_add_item(sdp_media_attribute_tree,
+ hf_media_format, tvb, offset,
+ tokenlen, FALSE);
+ media_format = atoi((char*)tvb_get_ephemeral_string(tvb, offset, tokenlen));
+ if (media_format >= SDP_NO_OF_PT) {
+ return; /* Invalid */
+ }
+
+ /* Append encoding name to format if known */
+ proto_item_append_text(media_format_item, " [%s]",
transport_info->encoding_name[media_format]);
- payload_type = tvb_get_ephemeral_string(tvb, offset, tokenlen);
- /* Move offset past the payload type */
- offset = next_offset + 1;
+ payload_type = tvb_get_ephemeral_string(tvb, offset, tokenlen);
+ /* Move offset past the payload type */
+ offset = next_offset + 1;
- while(has_more_pars==TRUE){
- next_offset = tvb_find_guint8(tvb,offset,-1,';');
- offset = tvb_skip_wsp(tvb,offset,tvb_length_remaining(tvb,offset));
+ while(has_more_pars==TRUE){
+ next_offset = tvb_find_guint8(tvb,offset,-1,';');
+ offset = tvb_skip_wsp(tvb,offset,tvb_length_remaining(tvb,offset));
- if(next_offset == -1){
- has_more_pars = FALSE;
- next_offset= tvb_length(tvb);
- }else{
+ if(next_offset == -1){
+ has_more_pars = FALSE;
+ next_offset= tvb_length(tvb);
+ }else{
- }
+ }
- /* There are at least 2 - add the first parameter */
- tokenlen = next_offset - offset;
- fmtp_item = proto_tree_add_item(sdp_media_attribute_tree,
- hf_media_format_specific_parameter, tvb,
- offset, tokenlen, FALSE);
+ /* There are at least 2 - add the first parameter */
+ tokenlen = next_offset - offset;
+ fmtp_item = proto_tree_add_item(sdp_media_attribute_tree,
+ hf_media_format_specific_parameter, tvb,
+ offset, tokenlen, FALSE);
- fmtp_tree = proto_item_add_subtree(fmtp_item, ett_sdp_fmtp);
+ fmtp_tree = proto_item_add_subtree(fmtp_item, ett_sdp_fmtp);
- decode_sdp_fmtp(fmtp_tree, tvb, pinfo, offset, tokenlen,
- transport_info->encoding_name[media_format]);
+ decode_sdp_fmtp(fmtp_tree, tvb, pinfo, offset, tokenlen,
+ transport_info->encoding_name[media_format]);
- /* Move offset past "; " and onto firts char */
- offset = next_offset + 1;
- }
- }
- break;
+ /* Move offset past "; " and onto firts char */
+ offset = next_offset + 1;
+ }
+ }
+ break;
case SDP_PATH:
- /* msrp attributes that contain address needed for conversation */
- if (strncmp((char*)attribute_value, msrp_res, strlen(msrp_res)) == 0){
- int address_offset, port_offset, port_end_offset;
-
- /* Address starts here */
- address_offset = offset + (int)strlen(msrp_res);
-
- /* Port is after next ':' */
- port_offset = tvb_find_guint8(tvb, address_offset, -1, ':');
-
- /* Port ends with '/' */
- port_end_offset = tvb_find_guint8(tvb, port_offset, -1, '/');
-
- /* Attempt to convert address */
- if (inet_pton(AF_INET, (char*)tvb_get_ephemeral_string(tvb, address_offset, port_offset-address_offset), &msrp_ipaddr) > 0) {
- /* Get port number */
- msrp_port_number = atoi((char*)tvb_get_ephemeral_string(tvb, port_offset+1, port_end_offset-port_offset-1));
- /* Set flag so this info can be used */
- msrp_transport_address_set = TRUE;
- }
- }
- break;
+ /* msrp attributes that contain address needed for conversation */
+ if (strncmp((char*)attribute_value, msrp_res, strlen(msrp_res)) == 0){
+ int address_offset, port_offset, port_end_offset;
+
+ /* Address starts here */
+ address_offset = offset + (int)strlen(msrp_res);
+
+ /* Port is after next ':' */
+ port_offset = tvb_find_guint8(tvb, address_offset, -1, ':');
+
+ /* Port ends with '/' */
+ port_end_offset = tvb_find_guint8(tvb, port_offset, -1, '/');
+
+ /* Attempt to convert address */
+ if (inet_pton(AF_INET, (char*)tvb_get_ephemeral_string(tvb, address_offset, port_offset-address_offset), &msrp_ipaddr) > 0) {
+ /* Get port number */
+ msrp_port_number = atoi((char*)tvb_get_ephemeral_string(tvb, port_offset+1, port_end_offset-port_offset-1));
+ /* Set flag so this info can be used */
+ msrp_transport_address_set = TRUE;
+ }
+ }
+ break;
case SDP_H248_ITEM:
- /* Decode h248 item ITU-T Rec. H.248.12 (2001)/Amd.1 (11/2002)*/
- if (strncmp((char*)attribute_value, h324ext_h223lcparm, strlen(msrp_res)) == 0){
- /* A.5.1.3 H.223 Logical channel parameters
- * This property indicates the H.245
- * H223LogicalChannelsParameters structure encoded by applying the PER specified in
- * ITU-T Rec. X.691. Value encoded as per A.5.1.2. For text encoding the mechanism defined
- * in ITU-T Rec. H.248.15 is used.
- */
- gint len;
- asn1_ctx_t actx;
-
- len = (gint)strlen(attribute_value);
- h245_tvb = ascii_bytes_to_tvb(tvb, pinfo, len, attribute_value);
- /* arbitrary maximum length */
- /* should go through a handle, however, the two h245 entry
- points are different, one is over tpkt and the other is raw
- */
- if (h245_tvb){
- asn1_ctx_init(&actx, ASN1_ENC_PER, TRUE, pinfo);
- dissect_h245_H223LogicalChannelParameters(h245_tvb, 0, &actx, sdp_media_attribute_tree, hf_SDPh223LogicalChannelParameters);
- }
- }
- break;
+ /* Decode h248 item ITU-T Rec. H.248.12 (2001)/Amd.1 (11/2002)*/
+ if (strncmp((char*)attribute_value, h324ext_h223lcparm, strlen(msrp_res)) == 0){
+ /* A.5.1.3 H.223 Logical channel parameters
+ * This property indicates the H.245
+ * H223LogicalChannelsParameters structure encoded by applying the PER specified in
+ * ITU-T Rec. X.691. Value encoded as per A.5.1.2. For text encoding the mechanism defined
+ * in ITU-T Rec. H.248.15 is used.
+ */
+ gint len;
+ asn1_ctx_t actx;
+
+ len = (gint)strlen(attribute_value);
+ h245_tvb = ascii_bytes_to_tvb(tvb, pinfo, len, attribute_value);
+ /* arbitrary maximum length */
+ /* should go through a handle, however, the two h245 entry
+ points are different, one is over tpkt and the other is raw
+ */
+ if (h245_tvb){
+ asn1_ctx_init(&actx, ASN1_ENC_PER, TRUE, pinfo);
+ dissect_h245_H223LogicalChannelParameters(h245_tvb, 0, &actx, sdp_media_attribute_tree, hf_SDPh223LogicalChannelParameters);
+ }
+ }
+ break;
default:
- /* No special treatment for values of this attribute type, just add as one item. */
- proto_tree_add_item(sdp_media_attribute_tree, hf_media_attribute_value,
- tvb, offset, -1, FALSE);
- break;
+ /* No special treatment for values of this attribute type, just add as one item. */
+ proto_tree_add_item(sdp_media_attribute_tree, hf_media_attribute_value,
+ tvb, offset, -1, FALSE);
+ break;
}
}
diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c
index 175cad7dad..26fe61e4b2 100644
--- a/epan/dissectors/packet-sip.c
+++ b/epan/dissectors/packet-sip.c
@@ -72,115 +72,115 @@ static gint sip_tap = -1;
static dissector_handle_t sigcomp_handle;
/* Initialize the protocol and registered fields */
-static gint proto_sip = -1;
-static gint proto_raw_sip = -1;
-static gint hf_raw_sip_line = -1;
-static gint hf_msg_hdr = -1;
-static gint hf_Method = -1;
-static gint hf_Request_Line = -1;
-static gint hf_sip_ruri = -1;
-static gint hf_sip_ruri_user = -1;
-static gint hf_sip_ruri_host = -1;
-static gint hf_sip_ruri_port = -1;
-static gint hf_Status_Code = -1;
-static gint hf_Status_Line = -1;
-static gint hf_sip_display = -1;
-static gint hf_sip_to_addr = -1;
-static gint hf_sip_to_user = -1;
-static gint hf_sip_to_host = -1;
-static gint hf_sip_to_port = -1;
-static gint hf_sip_from_addr = -1;
-static gint hf_sip_from_user = -1;
-static gint hf_sip_from_host = -1;
-static gint hf_sip_from_port = -1;
-static gint hf_sip_tag = -1;
-static gint hf_sip_pai_addr = -1;
-static gint hf_sip_pai_user = -1;
-static gint hf_sip_pai_host = -1;
-static gint hf_sip_pai_port = -1;
-static gint hf_sip_pmiss_addr = -1;
-static gint hf_sip_pmiss_user = -1;
-static gint hf_sip_pmiss_host = -1;
-static gint hf_sip_pmiss_port = -1;
-static gint hf_sip_ppi_addr = -1;
-static gint hf_sip_ppi_user = -1;
-static gint hf_sip_ppi_host = -1;
-static gint hf_sip_ppi_port = -1;
-static gint hf_sip_tc_addr = -1;
-static gint hf_sip_tc_user = -1;
-static gint hf_sip_tc_host = -1;
-static gint hf_sip_tc_port = -1;
-static gint hf_sip_tc_turi = -1;
-static gint hf_sip_uri = -1;
-static gint hf_sip_contact_addr = -1;
-static gint hf_sip_contact_item = -1;
-static gint hf_sip_resend = -1;
-static gint hf_sip_original_frame = -1;
+static gint proto_sip = -1;
+static gint proto_raw_sip = -1;
+static gint hf_raw_sip_line = -1;
+static gint hf_msg_hdr = -1;
+static gint hf_Method = -1;
+static gint hf_Request_Line = -1;
+static gint hf_sip_ruri = -1;
+static gint hf_sip_ruri_user = -1;
+static gint hf_sip_ruri_host = -1;
+static gint hf_sip_ruri_port = -1;
+static gint hf_Status_Code = -1;
+static gint hf_Status_Line = -1;
+static gint hf_sip_display = -1;
+static gint hf_sip_to_addr = -1;
+static gint hf_sip_to_user = -1;
+static gint hf_sip_to_host = -1;
+static gint hf_sip_to_port = -1;
+static gint hf_sip_from_addr = -1;
+static gint hf_sip_from_user = -1;
+static gint hf_sip_from_host = -1;
+static gint hf_sip_from_port = -1;
+static gint hf_sip_tag = -1;
+static gint hf_sip_pai_addr = -1;
+static gint hf_sip_pai_user = -1;
+static gint hf_sip_pai_host = -1;
+static gint hf_sip_pai_port = -1;
+static gint hf_sip_pmiss_addr = -1;
+static gint hf_sip_pmiss_user = -1;
+static gint hf_sip_pmiss_host = -1;
+static gint hf_sip_pmiss_port = -1;
+static gint hf_sip_ppi_addr = -1;
+static gint hf_sip_ppi_user = -1;
+static gint hf_sip_ppi_host = -1;
+static gint hf_sip_ppi_port = -1;
+static gint hf_sip_tc_addr = -1;
+static gint hf_sip_tc_user = -1;
+static gint hf_sip_tc_host = -1;
+static gint hf_sip_tc_port = -1;
+static gint hf_sip_tc_turi = -1;
+static gint hf_sip_uri = -1;
+static gint hf_sip_contact_addr = -1;
+static gint hf_sip_contact_item = -1;
+static gint hf_sip_resend = -1;
+static gint hf_sip_original_frame = -1;
static gint hf_sip_matching_request_frame = -1;
-static gint hf_sip_response_time = -1;
-static gint hf_sip_release_time = -1;
-
-static gint hf_sip_auth = -1;
-static gint hf_sip_auth_scheme = -1;
-static gint hf_sip_auth_digest_response = -1;
-static gint hf_sip_auth_nc = -1;
-static gint hf_sip_auth_username = -1;
-static gint hf_sip_auth_realm = -1;
-static gint hf_sip_auth_nonce = -1;
-static gint hf_sip_auth_algorithm = -1;
-static gint hf_sip_auth_opaque = -1;
-static gint hf_sip_auth_qop = -1;
-static gint hf_sip_auth_cnonce = -1;
-static gint hf_sip_auth_uri = -1;
-static gint hf_sip_auth_domain = -1;
-static gint hf_sip_auth_stale = -1;
-static gint hf_sip_auth_auts = -1;
-static gint hf_sip_auth_rspauth = -1;
-static gint hf_sip_auth_nextnonce = -1;
-static gint hf_sip_auth_ik = -1;
-static gint hf_sip_auth_ck = -1;
-
-static gint hf_sip_cseq_seq_no = -1;
-static gint hf_sip_cseq_method = -1;
-
-static gint hf_sip_via_transport = -1;
-static gint hf_sip_via_sent_by_address = -1;
-static gint hf_sip_via_sent_by_port = -1;
-static gint hf_sip_via_branch = -1;
-static gint hf_sip_via_maddr = -1;
-static gint hf_sip_via_rport = -1;
-static gint hf_sip_via_received = -1;
-static gint hf_sip_via_ttl = -1;
-static gint hf_sip_via_comp = -1;
-static gint hf_sip_via_sigcomp_id = -1;
-
-static gint hf_sip_rack_rseq_no = -1;
-static gint hf_sip_rack_cseq_no = -1;
-static gint hf_sip_rack_cseq_method = -1;
-
-static gint hf_sip_msg_body = -1;
+static gint hf_sip_response_time = -1;
+static gint hf_sip_release_time = -1;
+
+static gint hf_sip_auth = -1;
+static gint hf_sip_auth_scheme = -1;
+static gint hf_sip_auth_digest_response = -1;
+static gint hf_sip_auth_nc = -1;
+static gint hf_sip_auth_username = -1;
+static gint hf_sip_auth_realm = -1;
+static gint hf_sip_auth_nonce = -1;
+static gint hf_sip_auth_algorithm = -1;
+static gint hf_sip_auth_opaque = -1;
+static gint hf_sip_auth_qop = -1;
+static gint hf_sip_auth_cnonce = -1;
+static gint hf_sip_auth_uri = -1;
+static gint hf_sip_auth_domain = -1;
+static gint hf_sip_auth_stale = -1;
+static gint hf_sip_auth_auts = -1;
+static gint hf_sip_auth_rspauth = -1;
+static gint hf_sip_auth_nextnonce = -1;
+static gint hf_sip_auth_ik = -1;
+static gint hf_sip_auth_ck = -1;
+
+static gint hf_sip_cseq_seq_no = -1;
+static gint hf_sip_cseq_method = -1;
+
+static gint hf_sip_via_transport = -1;
+static gint hf_sip_via_sent_by_address = -1;
+static gint hf_sip_via_sent_by_port = -1;
+static gint hf_sip_via_branch = -1;
+static gint hf_sip_via_maddr = -1;
+static gint hf_sip_via_rport = -1;
+static gint hf_sip_via_received = -1;
+static gint hf_sip_via_ttl = -1;
+static gint hf_sip_via_comp = -1;
+static gint hf_sip_via_sigcomp_id = -1;
+
+static gint hf_sip_rack_rseq_no = -1;
+static gint hf_sip_rack_cseq_no = -1;
+static gint hf_sip_rack_cseq_method = -1;
+
+static gint hf_sip_msg_body = -1;
/* Initialize the subtree pointers */
-static gint ett_sip = -1;
-static gint ett_sip_reqresp = -1;
-static gint ett_sip_hdr = -1;
-static gint ett_sip_ext_hdr = -1;
-static gint ett_raw_text = -1;
-static gint ett_sip_element = -1;
-static gint ett_sip_uri = -1;
-static gint ett_sip_contact_item = -1;
-static gint ett_sip_message_body = -1;
-static gint ett_sip_cseq = -1;
-static gint ett_sip_via = -1;
-static gint ett_sip_reason = -1;
-static gint ett_sip_rack = -1;
-static gint ett_sip_ruri = -1;
-static gint ett_sip_to_uri = -1;
-static gint ett_sip_from_uri = -1;
-static gint ett_sip_pai_uri = -1;
-static gint ett_sip_pmiss_uri = -1;
-static gint ett_sip_ppi_uri = -1;
-static gint ett_sip_tc_uri = -1;
+static gint ett_sip = -1;
+static gint ett_sip_reqresp = -1;
+static gint ett_sip_hdr = -1;
+static gint ett_sip_ext_hdr = -1;
+static gint ett_raw_text = -1;
+static gint ett_sip_element = -1;
+static gint ett_sip_uri = -1;
+static gint ett_sip_contact_item = -1;
+static gint ett_sip_message_body = -1;
+static gint ett_sip_cseq = -1;
+static gint ett_sip_via = -1;
+static gint ett_sip_reason = -1;
+static gint ett_sip_rack = -1;
+static gint ett_sip_ruri = -1;
+static gint ett_sip_to_uri = -1;
+static gint ett_sip_from_uri = -1;
+static gint ett_sip_pai_uri = -1;
+static gint ett_sip_pmiss_uri = -1;
+static gint ett_sip_ppi_uri = -1;
+static gint ett_sip_tc_uri = -1;
/* PUBLISH method added as per http://www.ietf.org/internet-drafts/draft-ietf-sip-publish-01.txt */
static const char *sip_methods[] = {
@@ -232,317 +232,317 @@ typedef struct {
const char *compact_name;
} sip_header_t;
static const sip_header_t sip_headers[] = {
- { "Unknown-header", NULL }, /* 0 Pad so that the real headers start at index 1 */
- { "Accept", NULL }, /* 1 */
- { "Accept-Contact", "a" }, /* 2 RFC3841 */
- { "Accept-Encoding", NULL }, /* 3 */
- { "Accept-Language", NULL }, /* 4 */
- { "Accept-Resource-Priority", NULL }, /* 5 RFC4412 */
- { "Alert-Info", NULL },
- { "Allow", NULL },
- { "Allow-Events", "u" }, /* 8 RFC3265 */
- { "Answer-Mode", NULL }, /* 9 RFC5373 */
- { "Authentication-Info", NULL },
- { "Authorization", NULL }, /* 11 */
- { "Call-ID", "i" },
- { "Call-Info", NULL },
- { "Contact", "m" },
- { "Content-Disposition", NULL },
- { "Content-Encoding", "e" }, /* 16 */
- { "Content-Language", NULL },
- { "Content-Length", "l" },
- { "Content-Type", "c" },
- { "CSeq", NULL },
- { "Date", NULL }, /* 21 */
+ { "Unknown-header", NULL }, /* 0 Pad so that the real headers start at index 1 */
+ { "Accept", NULL }, /* 1 */
+ { "Accept-Contact", "a" }, /* 2 RFC3841 */
+ { "Accept-Encoding", NULL }, /* 3 */
+ { "Accept-Language", NULL }, /* 4 */
+ { "Accept-Resource-Priority", NULL }, /* 5 RFC4412 */
+ { "Alert-Info", NULL },
+ { "Allow", NULL },
+ { "Allow-Events", "u" }, /* 8 RFC3265 */
+ { "Answer-Mode", NULL }, /* 9 RFC5373 */
+ { "Authentication-Info", NULL },
+ { "Authorization", NULL }, /* 11 */
+ { "Call-ID", "i" },
+ { "Call-Info", NULL },
+ { "Contact", "m" },
+ { "Content-Disposition", NULL },
+ { "Content-Encoding", "e" }, /* 16 */
+ { "Content-Language", NULL },
+ { "Content-Length", "l" },
+ { "Content-Type", "c" },
+ { "CSeq", NULL },
+ { "Date", NULL }, /* 21 */
/* Encryption (Deprecated) [RFC3261] */
- { "Error-Info", NULL },
- { "Event", "o" },
- { "Expires", NULL },
- /* Flow-Timer [RFC5626]*/
- { "From", "f" }, /* 25 */
+ { "Error-Info", NULL },
+ { "Event", "o" },
+ { "Expires", NULL },
+ /* Flow-Timer [RFC5626]*/
+ { "From", "f" }, /* 25 */
/* Hide [RFC3261] (deprecated)*/
- { "History-Info", NULL }, /* 26 RFC4244 */
- { "Identity", "y" }, /* 27 RFC4474 */
- { "Identity-Info", "n" }, /* 28 RFC4474 */
- { "In-Reply-To", NULL }, /* 29 RFC3261 */
- { "Join", NULL }, /* 30 RFC3911 */
- { "Max-Breadth", NULL }, /* 31 RFC5393*/
- { "Max-Forwards", NULL }, /* 32 */
- { "MIME-Version", NULL }, /* 33 */
- { "Min-Expires", NULL }, /* 34 */
- { "Min-SE", NULL }, /* 35 RFC4028 */
- { "Organization", NULL }, /* 36 RFC3261 */
- { "P-Access-Network-Info", NULL }, /* 37 RFC3455 */
- { "P-Answer-State", NULL }, /* 38 RFC4964 */
- { "P-Asserted-Identity", NULL }, /* 39 RFC3325 */
- { "P-Associated-URI", NULL }, /* 40 RFC3455 */
- { "P-Called-Party-ID", NULL }, /* 41 RFC3455 */
- { "P-Charging-Function-Addresses",NULL },/* 42 RFC3455 */
- { "P-Charging-Vector", NULL }, /* 43 RFC3455 */
- { "P-DCS-Trace-Party-ID", NULL }, /* 44 RFC5503 */
- { "P-DCS-OSPS", NULL }, /* 45 RFC5503 */
- { "P-DCS-Billing-Info", NULL }, /* 46 RFC5503 */
- { "P-DCS-LAES", NULL }, /* 47 RFC5503 */
- { "P-DCS-Redirect", NULL }, /* 48 RFC5503 */
- { "P-Early-Media", NULL }, /* 49 RFC5009 */
- { "P-Media-Authorization", NULL }, /* 50 RFC3313 */
- { "P-Preferred-Identity", NULL }, /* 51 RFC3325 */
- { "P-Profile-Key", NULL }, /* 52 RFC5002 */
- { "P-Refused-URI-List", NULL }, /* 53 RFC5318 */
- { "P-Served-User", NULL }, /* 54 RFC5502 */
- { "P-User-Database", NULL }, /* 55 RFC4457 */
- { "P-Visited-Network-ID", NULL }, /* 56 RFC3455 */
- { "Path", NULL }, /* 57 RFC3327 */
- { "Permission-Missing", NULL }, /* 58 RFC5360 */
- { "Priority", NULL }, /* 59 RFC3261 */
- { "Priv-Answer-Mode", NULL }, /* 60 RFC5373 */
- { "Privacy", NULL }, /* 61 RFC3323 */
- { "Proxy-Authenticate", NULL }, /* 62 */
- { "Proxy-Authorization", NULL }, /* 63 */
- { "Proxy-Require", NULL }, /* 64 */
- { "RAck", NULL }, /* 65 RFC3262 */
- { "Reason", NULL }, /* 66 RFC3326 */
- { "Record-Route", NULL }, /* 67 */
- { "Refer-Sub", NULL }, /* 68 RFC4488 */
- { "Refer-To", "r" }, /* 69 RFC3515 */
- { "Referred-By", "b" }, /* 70 RFC3892 */
- { "Reject-Contact", "j" }, /* 71 RFC3841 */
- { "Replaces", NULL }, /* 72 RFC3891 */
- { "Reply-To", NULL }, /* 73 RFC3261 */
- { "Request-Disposition", "d" }, /* 74 RFC3841 */
- { "Require", NULL }, /* 75 RFC3261 */
- { "Resource-Priority", NULL }, /* 76 RFC4412 */
- /*
- { "Response-Key (Deprecated) [RFC3261]
- */
- { "Retry-After", NULL }, /* 77 RFC3261 */
- { "Route", NULL }, /* 78 RFC3261 */
- { "RSeq", NULL }, /* 79 RFC3262 */
- { "Security-Client", NULL }, /* 80 RFC3329 */
- { "Security-Server", NULL }, /* 81 RFC3329 */
- { "Security-Verify", NULL }, /* 82 RFC3329 */
- { "Server", NULL }, /* 83 RFC3261 */
- { "Service-Route", NULL }, /* 84 RFC3608 */
- { "Session-Expires", "x" }, /* 85 RFC4028 */
- { "SIP-ETag", NULL }, /* 86 RFC3903 */
- { "SIP-If-Match", NULL }, /* 87 RFC3903 */
- { "Subject", "s" }, /* 88 RFC3261 */
- { "Subscription-State", NULL }, /* 89 RFC3265 */
- { "Supported", "k" }, /* 90 RFC3261 */
- { "Target-Dialog", NULL }, /* 81 RFC4538 */
- { "Timestamp", NULL }, /* 92 RFC3261 */
- { "To", "t" }, /* 93 RFC3261 */
- { "Trigger-Consent", NULL }, /* 94 RFC5360 */
- { "Unsupported", NULL }, /* 95 RFC3261 */
- { "User-Agent", NULL }, /* 96 RFC3261 */
- { "Via", "v" }, /* 97 RFC3261 */
- { "Warning", NULL }, /* 98 RFC3261 */
- { "WWW-Authenticate", NULL }, /* 99 RFC3261 */
+ { "History-Info", NULL }, /* 26 RFC4244 */
+ { "Identity", "y" }, /* 27 RFC4474 */
+ { "Identity-Info", "n" }, /* 28 RFC4474 */
+ { "In-Reply-To", NULL }, /* 29 RFC3261 */
+ { "Join", NULL }, /* 30 RFC3911 */
+ { "Max-Breadth", NULL }, /* 31 RFC5393*/
+ { "Max-Forwards", NULL }, /* 32 */
+ { "MIME-Version", NULL }, /* 33 */
+ { "Min-Expires", NULL }, /* 34 */
+ { "Min-SE", NULL }, /* 35 RFC4028 */
+ { "Organization", NULL }, /* 36 RFC3261 */
+ { "P-Access-Network-Info", NULL }, /* 37 RFC3455 */
+ { "P-Answer-State", NULL }, /* 38 RFC4964 */
+ { "P-Asserted-Identity", NULL }, /* 39 RFC3325 */
+ { "P-Associated-URI", NULL }, /* 40 RFC3455 */
+ { "P-Called-Party-ID", NULL }, /* 41 RFC3455 */
+ { "P-Charging-Function-Addresses", NULL },/* 42 RFC3455 */
+ { "P-Charging-Vector", NULL }, /* 43 RFC3455 */
+ { "P-DCS-Trace-Party-ID", NULL }, /* 44 RFC5503 */
+ { "P-DCS-OSPS", NULL }, /* 45 RFC5503 */
+ { "P-DCS-Billing-Info", NULL }, /* 46 RFC5503 */
+ { "P-DCS-LAES", NULL }, /* 47 RFC5503 */
+ { "P-DCS-Redirect", NULL }, /* 48 RFC5503 */
+ { "P-Early-Media", NULL }, /* 49 RFC5009 */
+ { "P-Media-Authorization", NULL }, /* 50 RFC3313 */
+ { "P-Preferred-Identity", NULL }, /* 51 RFC3325 */
+ { "P-Profile-Key", NULL }, /* 52 RFC5002 */
+ { "P-Refused-URI-List", NULL }, /* 53 RFC5318 */
+ { "P-Served-User", NULL }, /* 54 RFC5502 */
+ { "P-User-Database", NULL }, /* 55 RFC4457 */
+ { "P-Visited-Network-ID", NULL }, /* 56 RFC3455 */
+ { "Path", NULL }, /* 57 RFC3327 */
+ { "Permission-Missing", NULL }, /* 58 RFC5360 */
+ { "Priority", NULL }, /* 59 RFC3261 */
+ { "Priv-Answer-Mode", NULL }, /* 60 RFC5373 */
+ { "Privacy", NULL }, /* 61 RFC3323 */
+ { "Proxy-Authenticate", NULL }, /* 62 */
+ { "Proxy-Authorization", NULL }, /* 63 */
+ { "Proxy-Require", NULL }, /* 64 */
+ { "RAck", NULL }, /* 65 RFC3262 */
+ { "Reason", NULL }, /* 66 RFC3326 */
+ { "Record-Route", NULL }, /* 67 */
+ { "Refer-Sub", NULL }, /* 68 RFC4488 */
+ { "Refer-To", "r" }, /* 69 RFC3515 */
+ { "Referred-By", "b" }, /* 70 RFC3892 */
+ { "Reject-Contact", "j" }, /* 71 RFC3841 */
+ { "Replaces", NULL }, /* 72 RFC3891 */
+ { "Reply-To", NULL }, /* 73 RFC3261 */
+ { "Request-Disposition", "d" }, /* 74 RFC3841 */
+ { "Require", NULL }, /* 75 RFC3261 */
+ { "Resource-Priority", NULL }, /* 76 RFC4412 */
+ /*
+ { "Response-Key (Deprecated) [RFC3261]
+ */
+ { "Retry-After", NULL }, /* 77 RFC3261 */
+ { "Route", NULL }, /* 78 RFC3261 */
+ { "RSeq", NULL }, /* 79 RFC3262 */
+ { "Security-Client", NULL }, /* 80 RFC3329 */
+ { "Security-Server", NULL }, /* 81 RFC3329 */
+ { "Security-Verify", NULL }, /* 82 RFC3329 */
+ { "Server", NULL }, /* 83 RFC3261 */
+ { "Service-Route", NULL }, /* 84 RFC3608 */
+ { "Session-Expires", "x" }, /* 85 RFC4028 */
+ { "SIP-ETag", NULL }, /* 86 RFC3903 */
+ { "SIP-If-Match", NULL }, /* 87 RFC3903 */
+ { "Subject", "s" }, /* 88 RFC3261 */
+ { "Subscription-State", NULL }, /* 89 RFC3265 */
+ { "Supported", "k" }, /* 90 RFC3261 */
+ { "Target-Dialog", NULL }, /* 81 RFC4538 */
+ { "Timestamp", NULL }, /* 92 RFC3261 */
+ { "To", "t" }, /* 93 RFC3261 */
+ { "Trigger-Consent", NULL }, /* 94 RFC5360 */
+ { "Unsupported", NULL }, /* 95 RFC3261 */
+ { "User-Agent", NULL }, /* 96 RFC3261 */
+ { "Via", "v" }, /* 97 RFC3261 */
+ { "Warning", NULL }, /* 98 RFC3261 */
+ { "WWW-Authenticate", NULL }, /* 99 RFC3261 */
};
-#define POS_ACCEPT 1
-#define POS_ACCEPT_CONTACT 2
-#define POS_ACCEPT_ENCODING 3
-#define POS_ACCEPT_LANGUAGE 4
-#define POS_ACCEPT_RESOURCE_PRIORITY 5
-#define POS_ALERT_INFO 6
-#define POS_ALLOW 7
-#define POS_ALLOW_EVENTS 8
-#define POS_ANSWER_MODE 9
-#define POS_AUTHENTICATION_INFO 10
-#define POS_AUTHORIZATION 11
-#define POS_CALL_ID 12
-#define POS_CALL_INFO 13
-#define POS_CONTACT 14
-#define POS_CONTENT_DISPOSITION 15
-#define POS_CONTENT_ENCODING 16
-#define POS_CONTENT_LANGUAGE 17
-#define POS_CONTENT_LENGTH 18
-#define POS_CONTENT_TYPE 19
-#define POS_CSEQ 20
-#define POS_DATE 21
-#define POS_ERROR_INFO 22
-#define POS_EVENT 23
-#define POS_EXPIRES 24
-#define POS_FROM 25
-#define POS_HISTORY_INFO 26
-#define POS_IDENTITY 27
-#define POS_IDENTITY_INFO 28
-#define POS_IN_REPLY_TO 29
-#define POS_JOIN 30
-#define POS_MAX_BREADTH 31
-#define POS_MAX_FORWARDS 32
-#define POS_MIME_VERSION 33
-#define POS_MIN_EXPIRES 34
-#define POS_MIN_SE 35
-#define POS_ORGANIZATION 36
-#define POS_P_ACCESS_NETWORK_INFO 37
-#define POS_P_ANSWER_STATE 38
-#define POS_P_ASSERTED_IDENTITY 39
-#define POS_P_ASSOCIATED_URI 40
-#define POS_P_CALLED_PARTY_ID 41
+#define POS_ACCEPT 1
+#define POS_ACCEPT_CONTACT 2
+#define POS_ACCEPT_ENCODING 3
+#define POS_ACCEPT_LANGUAGE 4
+#define POS_ACCEPT_RESOURCE_PRIORITY 5
+#define POS_ALERT_INFO 6
+#define POS_ALLOW 7
+#define POS_ALLOW_EVENTS 8
+#define POS_ANSWER_MODE 9
+#define POS_AUTHENTICATION_INFO 10
+#define POS_AUTHORIZATION 11
+#define POS_CALL_ID 12
+#define POS_CALL_INFO 13
+#define POS_CONTACT 14
+#define POS_CONTENT_DISPOSITION 15
+#define POS_CONTENT_ENCODING 16
+#define POS_CONTENT_LANGUAGE 17
+#define POS_CONTENT_LENGTH 18
+#define POS_CONTENT_TYPE 19
+#define POS_CSEQ 20
+#define POS_DATE 21
+#define POS_ERROR_INFO 22
+#define POS_EVENT 23
+#define POS_EXPIRES 24
+#define POS_FROM 25
+#define POS_HISTORY_INFO 26
+#define POS_IDENTITY 27
+#define POS_IDENTITY_INFO 28
+#define POS_IN_REPLY_TO 29
+#define POS_JOIN 30
+#define POS_MAX_BREADTH 31
+#define POS_MAX_FORWARDS 32
+#define POS_MIME_VERSION 33
+#define POS_MIN_EXPIRES 34
+#define POS_MIN_SE 35
+#define POS_ORGANIZATION 36
+#define POS_P_ACCESS_NETWORK_INFO 37
+#define POS_P_ANSWER_STATE 38
+#define POS_P_ASSERTED_IDENTITY 39
+#define POS_P_ASSOCIATED_URI 40
+#define POS_P_CALLED_PARTY_ID 41
#define POS_P_CHARGING_FUNCTION_ADDRESSES 42
-#define POS_P_CHARGING_VECTOR 43
-#define POS_P_DCS_TRACE_PARTY_ID 44
-#define POS_P_DCS_OSPS 45
-#define POS_P_DCS_BILLING_INFO 46
-#define POS_P_DCS_LAES 47
-#define POS_P_DCS_REDIRECT 48
-#define POS_P_EARLY_MEDIA 49
-#define POS_P_MEDIA_AUTHORIZATION 50
-#define POS_P_PREFERRED_IDENTITY 51
-#define POS_P_PROFILE_KEY 52
-#define POS_P_REFUSED_URI_LST 53
-#define POS_P_SERVED_USER 54
-#define POS_P_USER_DATABASE 55
-#define POS_P_VISITED_NETWORK_ID 56
-#define POS_PATH 57
-#define POS_PERMISSION_MISSING 58
-#define POS_PRIORITY 59
-#define POS_PRIV_ANSWER_MODE 60
-#define POS_PRIVACY 61
-#define POS_PROXY_AUTHENTICATE 62
-#define POS_PROXY_AUTHORIZATION 63
-#define POS_PROXY_REQUIRE 64
-#define POS_RACK 65
-#define POS_REASON 66
-#define POS_RECORD_ROUTE 67
-#define POS_REFER_SUB 68
-#define POS_REFER_TO 69
-#define POS_REFERED_BY 70
-#define POS_REJECT_CONTACT 71
-#define POS_REPLACES 72
-#define POS_REPLY_TO 73
-#define POS_REQUEST_DISPOSITION 74
-#define POS_REQUIRE 75
-#define POS_RESOURCE_PRIORITY 76
-#define POS_RETRY_AFTER 77
-#define POS_ROUTE 78
-#define POS_RSEQ 79
-#define POS_SECURITY_CLIENT 80
-#define POS_SECURITY_SERVER 81
-#define POS_SECURITY_VERIFY 82
-#define POS_SERVER 83
-#define POS_SERVICE_ROUTE 84
-#define POS_SESSION_EXPIRES 85
-#define POS_SIP_ETAG 86
-#define POS_SIP_IF_MATCH 87
-#define POS_SUBJECT 88
-#define POS_SUBSCRIPTION_STATE 89
-#define POS_SUPPORTED 90
-#define POS_TARGET_DALOG 91
-#define POS_TIMESTAMP 92
-#define POS_TO 93
-#define POS_TRIGGER_CONSENT 94
-#define POS_UNSUPPORTED 95
-#define POS_USER_AGENT 96
-#define POS_VIA 97
-#define POS_WARNING 98
-#define POS_WWW_AUTHENTICATE 99
+#define POS_P_CHARGING_VECTOR 43
+#define POS_P_DCS_TRACE_PARTY_ID 44
+#define POS_P_DCS_OSPS 45
+#define POS_P_DCS_BILLING_INFO 46
+#define POS_P_DCS_LAES 47
+#define POS_P_DCS_REDIRECT 48
+#define POS_P_EARLY_MEDIA 49
+#define POS_P_MEDIA_AUTHORIZATION 50
+#define POS_P_PREFERRED_IDENTITY 51
+#define POS_P_PROFILE_KEY 52
+#define POS_P_REFUSED_URI_LST 53
+#define POS_P_SERVED_USER 54
+#define POS_P_USER_DATABASE 55
+#define POS_P_VISITED_NETWORK_ID 56
+#define POS_PATH 57
+#define POS_PERMISSION_MISSING 58
+#define POS_PRIORITY 59
+#define POS_PRIV_ANSWER_MODE 60
+#define POS_PRIVACY 61
+#define POS_PROXY_AUTHENTICATE 62
+#define POS_PROXY_AUTHORIZATION 63
+#define POS_PROXY_REQUIRE 64
+#define POS_RACK 65
+#define POS_REASON 66
+#define POS_RECORD_ROUTE 67
+#define POS_REFER_SUB 68
+#define POS_REFER_TO 69
+#define POS_REFERED_BY 70
+#define POS_REJECT_CONTACT 71
+#define POS_REPLACES 72
+#define POS_REPLY_TO 73
+#define POS_REQUEST_DISPOSITION 74
+#define POS_REQUIRE 75
+#define POS_RESOURCE_PRIORITY 76
+#define POS_RETRY_AFTER 77
+#define POS_ROUTE 78
+#define POS_RSEQ 79
+#define POS_SECURITY_CLIENT 80
+#define POS_SECURITY_SERVER 81
+#define POS_SECURITY_VERIFY 82
+#define POS_SERVER 83
+#define POS_SERVICE_ROUTE 84
+#define POS_SESSION_EXPIRES 85
+#define POS_SIP_ETAG 86
+#define POS_SIP_IF_MATCH 87
+#define POS_SUBJECT 88
+#define POS_SUBSCRIPTION_STATE 89
+#define POS_SUPPORTED 90
+#define POS_TARGET_DALOG 91
+#define POS_TIMESTAMP 92
+#define POS_TO 93
+#define POS_TRIGGER_CONSENT 94
+#define POS_UNSUPPORTED 95
+#define POS_USER_AGENT 96
+#define POS_VIA 97
+#define POS_WARNING 98
+#define POS_WWW_AUTHENTICATE 99
static gint hf_header_array[] = {
-1, /* 0"Unknown-header" - Pad so that the real headers start at index 1 */
- -1, /* 1"Accept" */
- -1, /* 2"Accept-Contact" RFC3841 */
- -1, /* 3"Accept-Encoding" */
- -1, /* 4"Accept-Language" */
- -1, /* 5"Accept-Resource-Priority" RFC4412 */
- -1, /* 6"Alert-Info", */
- -1, /* 7"Allow", */
- -1, /* 8"Allow-Events", RFC3265 */
- -1, /* 9"Answer-Mode" RFC5373 */
- -1, /* 10"Authentication-Info" */
- -1, /* 11"Authorization", */
- -1, /* 12"Call-ID", */
- -1, /* 13"Call-Info" */
- -1, /* 14"Contact", */
- -1, /* 15"Content-Disposition", */
- -1, /* 16"Content-Encoding", */
- -1, /* 17"Content-Language", */
- -1, /* 18"Content-Length", */
- -1, /* 19"Content-Type", */
- -1, /* 20"CSeq", */
- -1, /* 21"Date", */
- -1, /* 22"Error-Info", */
- -1, /* 23"Event", */
- -1, /* 24"Expires", */
- -1, /* 25"From", */
- -1, /* 26"History-Info", RFC4244 */
- -1, /* 27"Identity", */
- -1, /* 28"Identity-Info", RFC4474 */
- -1, /* 29"In-Reply-To", RFC3261 */
- -1, /* 30"Join", RFC3911 */
- -1, /* 31"Max-Breadth" RFC5393 */
- -1, /* 32"Max-Forwards", */
- -1, /* 33"MIME-Version", */
- -1, /* 34"Min-Expires", */
- -1, /* 35"Min-SE", RFC4028 */
- -1, /* 36"Organization", */
- -1, /* 37"P-Access-Network-Info", RFC3455 */
- -1, /* 38"P-Answer-State", RFC4964 */
- -1, /* 39"P-Asserted-Identity", RFC3325 */
- -1, /* 40"P-Associated-URI", RFC3455 */
- -1, /* 41"P-Called-Party-ID", RFC3455 */
- -1, /* 42"P-Charging-Function-Addresses", RFC3455 */
- -1, /* 43"P-Charging-Vector", RFC3455 */
- -1, /* 44"P-DCS-Trace-Party-ID", RFC3603 */
- -1, /* 45"P-DCS-OSPS", RFC3603 */
- -1, /* 46"P-DCS-Billing-Info", RFC3603 */
- -1, /* 47"P-DCS-LAES", RFC3603 */
- -1, /* 48"P-DCS-Redirect", RFC3603 */
- -1, /* 49"P-Early-Media", */
- -1, /* 50"P-Media-Authorization", RFC3313 */
- -1, /* 51"P-Preferred-Identity", RFC3325 */
- -1, /* 52"P-Profile-Key", */
- -1, /* 53"P-Refused-URI-List", RFC5318 */
- -1, /* 54"P-Served-User", RFC5502 */
- -1, /* 55"P-User-Database RFC4457 */
- -1, /* 56"P-Visited-Network-ID", RFC3455 */
- -1, /* 57"Path", RFC3327 */
- -1, /* 58"Permission-Missing" RFC5360 */
- -1, /* 59"Priority" */
- -1, /* 60"Priv-Answer-mode" RFC5373 */
- -1, /* 61"Privacy", RFC3323 */
- -1, /* 62"Proxy-Authenticate", */
- -1, /* 63"Proxy-Authorization", */
- -1, /* 64"Proxy-Require", */
- -1, /* 65"RAck", RFC3262 */
- -1, /* 66"Reason", RFC3326 */
- -1, /* 67"Record-Route", */
- -1, /* 68"Refer-Sub",", RFC4488 */
- -1, /* 69"Refer-To", RFC3515 */
- -1, /* 70"Referred-By", */
- -1, /* 71"Reject-Contact", RFC3841 */
- -1, /* 72"Replaces", RFC3891 */
- -1, /* 73"Reply-To", RFC3261 */
- -1, /* 74"Request-Disposition", RFC3841 */
- -1, /* 75"Require", RFC3261 */
- -1, /* 76"Resource-Priority", RFC4412 */
- -1, /* 77"Retry-After", RFC3261 */
- -1, /* 78"Route", RFC3261 */
- -1, /* 79"RSeq", RFC3262 */
- -1, /* 80"Security-Client", RFC3329 */
- -1, /* 81"Security-Server", RFC3329 */
- -1, /* 82"Security-Verify", RFC3329 */
- -1, /* 83"Server", RFC3261 */
- -1, /* 84"Service-Route", RFC3608 */
- -1, /* 85"Session-Expires", RFC4028 */
- -1, /* 86"SIP-ETag", RFC3903 */
- -1, /* 87"SIP-If-Match", RFC3903 */
- -1, /* 88"Subject", RFC3261 */
- -1, /* 89"Subscription-State", RFC3265 */
- -1, /* 90"Supported", RFC3261 */
- -1, /* 91"Target-Dialog", RFC4538 */
- -1, /* 92"Timestamp", RFC3261 */
- -1, /* 93"To", RFC3261 */
- -1, /* 94"Trigger-Consent" RFC5380 */
- -1, /* 95"Unsupported", RFC3261 */
- -1, /* 96"User-Agent", RFC3261 */
- -1, /* 97"Via", RFC3261 */
- -1, /* 98"Warning", RFC3261 */
- -1, /* 99"WWW-Authenticate", RFC3261 */
+ -1, /* 1"Accept" */
+ -1, /* 2"Accept-Contact" RFC3841 */
+ -1, /* 3"Accept-Encoding" */
+ -1, /* 4"Accept-Language" */
+ -1, /* 5"Accept-Resource-Priority" RFC4412 */
+ -1, /* 6"Alert-Info", */
+ -1, /* 7"Allow", */
+ -1, /* 8"Allow-Events", RFC3265 */
+ -1, /* 9"Answer-Mode" RFC5373 */
+ -1, /* 10"Authentication-Info" */
+ -1, /* 11"Authorization", */
+ -1, /* 12"Call-ID", */
+ -1, /* 13"Call-Info" */
+ -1, /* 14"Contact", */
+ -1, /* 15"Content-Disposition", */
+ -1, /* 16"Content-Encoding", */
+ -1, /* 17"Content-Language", */
+ -1, /* 18"Content-Length", */
+ -1, /* 19"Content-Type", */
+ -1, /* 20"CSeq", */
+ -1, /* 21"Date", */
+ -1, /* 22"Error-Info", */
+ -1, /* 23"Event", */
+ -1, /* 24"Expires", */
+ -1, /* 25"From", */
+ -1, /* 26"History-Info", RFC4244 */
+ -1, /* 27"Identity", */
+ -1, /* 28"Identity-Info", RFC4474 */
+ -1, /* 29"In-Reply-To", RFC3261 */
+ -1, /* 30"Join", RFC3911 */
+ -1, /* 31"Max-Breadth" RFC5393 */
+ -1, /* 32"Max-Forwards", */
+ -1, /* 33"MIME-Version", */
+ -1, /* 34"Min-Expires", */
+ -1, /* 35"Min-SE", RFC4028 */
+ -1, /* 36"Organization", */
+ -1, /* 37"P-Access-Network-Info", RFC3455 */
+ -1, /* 38"P-Answer-State", RFC4964 */
+ -1, /* 39"P-Asserted-Identity", RFC3325 */
+ -1, /* 40"P-Associated-URI", RFC3455 */
+ -1, /* 41"P-Called-Party-ID", RFC3455 */
+ -1, /* 42"P-Charging-Function-Addresses", RFC3455 */
+ -1, /* 43"P-Charging-Vector", RFC3455 */
+ -1, /* 44"P-DCS-Trace-Party-ID", RFC3603 */
+ -1, /* 45"P-DCS-OSPS", RFC3603 */
+ -1, /* 46"P-DCS-Billing-Info", RFC3603 */
+ -1, /* 47"P-DCS-LAES", RFC3603 */
+ -1, /* 48"P-DCS-Redirect", RFC3603 */
+ -1, /* 49"P-Early-Media", */
+ -1, /* 50"P-Media-Authorization", RFC3313 */
+ -1, /* 51"P-Preferred-Identity", RFC3325 */
+ -1, /* 52"P-Profile-Key", */
+ -1, /* 53"P-Refused-URI-List", RFC5318 */
+ -1, /* 54"P-Served-User", RFC5502 */
+ -1, /* 55"P-User-Database RFC4457 */
+ -1, /* 56"P-Visited-Network-ID", RFC3455 */
+ -1, /* 57"Path", RFC3327 */
+ -1, /* 58"Permission-Missing" RFC5360 */
+ -1, /* 59"Priority" */
+ -1, /* 60"Priv-Answer-mode" RFC5373 */
+ -1, /* 61"Privacy", RFC3323 */
+ -1, /* 62"Proxy-Authenticate", */
+ -1, /* 63"Proxy-Authorization", */
+ -1, /* 64"Proxy-Require", */
+ -1, /* 65"RAck", RFC3262 */
+ -1, /* 66"Reason", RFC3326 */
+ -1, /* 67"Record-Route", */
+ -1, /* 68"Refer-Sub",", RFC4488 */
+ -1, /* 69"Refer-To", RFC3515 */
+ -1, /* 70"Referred-By", */
+ -1, /* 71"Reject-Contact", RFC3841 */
+ -1, /* 72"Replaces", RFC3891 */
+ -1, /* 73"Reply-To", RFC3261 */
+ -1, /* 74"Request-Disposition", RFC3841 */
+ -1, /* 75"Require", RFC3261 */
+ -1, /* 76"Resource-Priority", RFC4412 */
+ -1, /* 77"Retry-After", RFC3261 */
+ -1, /* 78"Route", RFC3261 */
+ -1, /* 79"RSeq", RFC3262 */
+ -1, /* 80"Security-Client", RFC3329 */
+ -1, /* 81"Security-Server", RFC3329 */
+ -1, /* 82"Security-Verify", RFC3329 */
+ -1, /* 83"Server", RFC3261 */
+ -1, /* 84"Service-Route", RFC3608 */
+ -1, /* 85"Session-Expires", RFC4028 */
+ -1, /* 86"SIP-ETag", RFC3903 */
+ -1, /* 87"SIP-If-Match", RFC3903 */
+ -1, /* 88"Subject", RFC3261 */
+ -1, /* 89"Subscription-State", RFC3265 */
+ -1, /* 90"Supported", RFC3261 */
+ -1, /* 91"Target-Dialog", RFC4538 */
+ -1, /* 92"Timestamp", RFC3261 */
+ -1, /* 93"To", RFC3261 */
+ -1, /* 94"Trigger-Consent" RFC5380 */
+ -1, /* 95"Unsupported", RFC3261 */
+ -1, /* 96"User-Agent", RFC3261 */
+ -1, /* 97"Via", RFC3261 */
+ -1, /* 98"Warning", RFC3261 */
+ -1, /* 99"WWW-Authenticate", RFC3261 */
};
@@ -1826,7 +1826,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
const char *descr;
guint token_1_len = 0;
guint current_method_idx = SIP_METHOD_INVALID;
- proto_item *ts = NULL, *ti = NULL, *th = NULL, *sip_element_item = NULL;
+ proto_item *ts = NULL, *ti_a = NULL, *th = NULL, *sip_element_item = NULL;
proto_tree *sip_tree = NULL, *reqresp_tree = NULL , *hdr_tree = NULL,
*sip_element_tree = NULL, *message_body_tree = NULL, *cseq_tree = NULL,
*via_tree = NULL, *reason_tree = NULL, *rack_tree = NULL;
@@ -1944,28 +1944,28 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
case REQUEST_LINE:
if (sip_tree) {
- ti = proto_tree_add_string(sip_tree, hf_Request_Line, tvb, offset, next_offset-offset,
+ ti_a = proto_tree_add_string(sip_tree, hf_Request_Line, tvb, offset, next_offset-offset,
tvb_format_text(tvb, offset, linelen));
- reqresp_tree = proto_item_add_subtree(ti, ett_sip_reqresp);
+ reqresp_tree = proto_item_add_subtree(ti_a, ett_sip_reqresp);
}
dfilter_sip_request_line(tvb, reqresp_tree, token_1_len);
break;
case STATUS_LINE:
if (sip_tree) {
- ti = proto_tree_add_string(sip_tree, hf_Status_Line, tvb, offset, next_offset-offset,
+ ti_a = proto_tree_add_string(sip_tree, hf_Status_Line, tvb, offset, next_offset-offset,
tvb_format_text(tvb, offset, linelen));
- reqresp_tree = proto_item_add_subtree(ti, ett_sip_reqresp);
+ reqresp_tree = proto_item_add_subtree(ti_a, ett_sip_reqresp);
}
dfilter_sip_status_line(tvb, reqresp_tree);
break;
case OTHER_LINE:
if (sip_tree) {
- ti = proto_tree_add_text(sip_tree, tvb, offset, next_offset,
+ ti_a = proto_tree_add_text(sip_tree, tvb, offset, next_offset,
"%s line: %s", descr,
tvb_format_text(tvb, offset, linelen));
- reqresp_tree = proto_item_add_subtree(ti, ett_sip_reqresp);
+ reqresp_tree = proto_item_add_subtree(ti_a, ett_sip_reqresp);
proto_tree_add_text(sip_tree, tvb, offset, -1,
"Continuation data");
}
@@ -2008,7 +2008,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
char *value;
gboolean is_no_header_termination = FALSE;
proto_item *cause;
- proto_item *ti;
+ proto_item *ti_b;
proto_tree *pai_uri_item_tree = NULL;
proto_tree *pmiss_uri_item_tree = NULL;
proto_tree *ppi_uri_item_tree = NULL;
@@ -2073,18 +2073,18 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
value = tvb_get_ephemeral_string(tvb, value_offset, value_len);
if (hf_index == -1) {
- proto_item *ti = proto_tree_add_text(hdr_tree, tvb,
+ proto_item *ti_c = proto_tree_add_text(hdr_tree, tvb,
offset, next_offset - offset, "%s",
tvb_format_text(tvb, offset, linelen));
header_name = (gchar*)tvb_get_ephemeral_string(tvb, offset, header_len);
ascii_strdown_inplace(header_name);
ext_hdr_handle = dissector_get_string_handle(ext_hdr_subdissector_table, header_name);
if (ext_hdr_handle != NULL) {
- tvbuff_t *next_tvb;
- next_tvb = tvb_new_subset(tvb, value_offset, value_len, value_len);
- dissector_try_string(ext_hdr_subdissector_table, header_name, next_tvb, pinfo, proto_item_add_subtree(ti, ett_sip_ext_hdr));
+ tvbuff_t *next_tvb2;
+ next_tvb2 = tvb_new_subset(tvb, value_offset, value_len, value_len);
+ dissector_try_string(ext_hdr_subdissector_table, header_name, next_tvb2, pinfo, proto_item_add_subtree(ti_c, ett_sip_ext_hdr));
} else {
- expert_add_info_format(pinfo, ti,
+ expert_add_info_format(pinfo, ti_c,
PI_UNDECODED, PI_NOTE,
"Unrecognised SIP header (%s)",
tvb_format_text(tvb, offset, header_len));
@@ -2144,9 +2144,9 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
}
separator_found:
parameter_len = parameter_end_offset - parameter_offset;
- ti = proto_tree_add_item(sip_element_tree, hf_sip_to_addr, tvb, parameter_offset,
+ ti_b = proto_tree_add_item(sip_element_tree, hf_sip_to_addr, tvb, parameter_offset,
parameter_len, FALSE);
- to_uri_item_tree = proto_item_add_subtree(ti, ett_sip_to_uri);
+ to_uri_item_tree = proto_item_add_subtree(ti_b, ett_sip_to_uri);
/*info for the tap for voip_calls.c*/
stat_info->tap_to_addr=tvb_get_ephemeral_string(tvb, parameter_offset, parameter_len);
@@ -2181,9 +2181,9 @@ separator_found:
if ( parameter_end_offset == -1)
parameter_end_offset = line_end_offset;
parameter_len = parameter_end_offset - parameter_offset;
- ti = proto_tree_add_item(sip_element_tree, hf_sip_to_addr, tvb, parameter_offset,
+ ti_b = proto_tree_add_item(sip_element_tree, hf_sip_to_addr, tvb, parameter_offset,
parameter_len, FALSE);
- to_uri_item_tree = proto_item_add_subtree(ti, ett_sip_to_uri);
+ to_uri_item_tree = proto_item_add_subtree(ti_b, ett_sip_to_uri);
/*info for the tap for voip_calls.c*/
stat_info->tap_to_addr=tvb_get_ephemeral_string(tvb, parameter_offset, parameter_len);
@@ -2284,9 +2284,9 @@ separator_found:
}
separator_found2:
parameter_len = parameter_end_offset - parameter_offset;
- ti = proto_tree_add_item(sip_element_tree, hf_sip_from_addr, tvb, parameter_offset,
+ ti_b = proto_tree_add_item(sip_element_tree, hf_sip_from_addr, tvb, parameter_offset,
parameter_len, FALSE);
- from_uri_item_tree = proto_item_add_subtree(ti, ett_sip_from_uri);
+ from_uri_item_tree = proto_item_add_subtree(ti_b, ett_sip_from_uri);
/*info for the tap for voip_calls.c*/
stat_info->tap_from_addr=tvb_get_ephemeral_string(tvb, parameter_offset, parameter_len);
parameter_offset = parameter_end_offset + 1;
@@ -2319,9 +2319,9 @@ separator_found2:
if ( parameter_end_offset == -1)
parameter_end_offset = line_end_offset;
parameter_len = parameter_end_offset - parameter_offset;
- ti = proto_tree_add_item(sip_element_tree, hf_sip_from_addr, tvb, parameter_offset,
+ ti_b = proto_tree_add_item(sip_element_tree, hf_sip_from_addr, tvb, parameter_offset,
parameter_len, FALSE);
- from_uri_item_tree = proto_item_add_subtree(ti, ett_sip_from_uri);
+ from_uri_item_tree = proto_item_add_subtree(ti_b, ett_sip_from_uri);
/*info for the tap for voip_calls.c*/
stat_info->tap_from_addr=tvb_get_ephemeral_string(tvb, parameter_offset, parameter_len);
offset = parameter_end_offset;
@@ -2742,7 +2742,7 @@ separator_found2:
case POS_AUTHENTICATION_INFO:
/* Add tree using whole text of line */
if (hdr_tree) {
- proto_item *ti;
+ proto_item *ti_c;
/* Add whole line as header tree */
sip_element_item = proto_tree_add_string_format(hdr_tree,
hf_header_array[hf_index], tvb,
@@ -2753,10 +2753,10 @@ separator_found2:
ett_sip_element);
/* Set sip.auth as a hidden field/filter */
- ti = proto_tree_add_item(hdr_tree, hf_sip_auth, tvb,
+ ti_c = proto_tree_add_item(hdr_tree, hf_sip_auth, tvb,
offset, next_offset-offset,
FALSE);
- PROTO_ITEM_SET_HIDDEN(ti);
+ PROTO_ITEM_SET_HIDDEN(ti_c);
}
/* Parse each individual parameter in the line */
@@ -2853,9 +2853,9 @@ separator_found2:
proto_item_set_end(th, tvb, offset);
next_tvb = tvb_new_subset(tvb, offset, datalen, reported_datalen);
if(sip_tree) {
- ti = proto_tree_add_item(sip_tree, hf_sip_msg_body, next_tvb, 0, -1,
+ ti_a = proto_tree_add_item(sip_tree, hf_sip_msg_body, next_tvb, 0, -1,
FALSE);
- message_body_tree = proto_item_add_subtree(ti, ett_sip_message_body);
+ message_body_tree = proto_item_add_subtree(ti_a, ett_sip_message_body);
}
/* give the content type parameters to sub dissectors */
@@ -2947,7 +2947,7 @@ separator_found2:
}
}
- /* For responses, try to link back to request frame */
+ /* For responses, try to link back to request frame */
if (line_type == STATUS_LINE)
{
request_for_response = sip_find_request(pinfo, cseq_method, call_id,