aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2007-11-16 23:56:18 +0000
committerGerald Combs <gerald@wireshark.org>2007-11-16 23:56:18 +0000
commitc2d537141a37e6313582f2936f4695036a8f0e9d (patch)
tree7f5d578f1aa7c693ad7b2764adc85d929aa33bc1
parent24d6a39eb09534179a523613b0b431578608af75 (diff)
Fix a buffer overflow in the PPP dissector. Try to fix uninitialized
variable warnings turned up by Valgrind. svn path=/trunk/; revision=23475
-rw-r--r--docbook/release-notes.xml12
-rw-r--r--epan/dissectors/packet-3g-a11.c183
-rw-r--r--epan/dissectors/packet-ppp.c58
-rw-r--r--epan/dissectors/packet-rsvp.c314
4 files changed, 293 insertions, 274 deletions
diff --git a/docbook/release-notes.xml b/docbook/release-notes.xml
index 5d0e6f7900..13d3615ef1 100644
--- a/docbook/release-notes.xml
+++ b/docbook/release-notes.xml
@@ -154,6 +154,18 @@ Wireshark Info
</para>
</listitem>
+ <listitem>
+ <para>
+ The PPP dissector could overflow a buffer.
+ <!-- Fixed in r23475 -->
+ <!-- (Bug <ulink url="http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1926">1926</ulink>) -->
+ </para>
+ <para>Versions affected: 0.99.6</para>
+ <para>
+ <!-- <ulink url="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-????">CVE-2007-????</ulink> -->
+ </para>
+ </listitem>
+
<!-- rtsp? -->
</itemizedlist>
diff --git a/epan/dissectors/packet-3g-a11.c b/epan/dissectors/packet-3g-a11.c
index 1222d6bc5f..38c9159c90 100644
--- a/epan/dissectors/packet-3g-a11.c
+++ b/epan/dissectors/packet-3g-a11.c
@@ -21,12 +21,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -186,7 +186,7 @@ static const value_string a11_reply_codes[]= {
{9, "Connection Update"},
#if 0
{1, "Reg Accepted, but Simultaneous Bindings Unsupported."},
- {64, "Reg Deny (FA)- Unspecified Reason"},
+ {64, "Reg Deny (FA)- Unspecified Reason"},
{65, "Reg Deny (FA)- Administratively Prohibited"},
{66, "Reg Deny (FA)- Insufficient Resources"},
{67, "Reg Deny (FA)- MN failed Authentication"},
@@ -350,11 +350,11 @@ static const value_string a11_airlink_types[]= {
#define ATTRIBUTE_NAME_LEN_MAX 128
#define ATTR_TYPE_NULL 0
-#define ATTR_TYPE_INT 1
-#define ATTR_TYPE_STR 2
+#define ATTR_TYPE_INT 1
+#define ATTR_TYPE_STR 2
#define ATTR_TYPE_IPV4 3
-#define ATTR_TYPE_TYPE 4
-#define ATTR_TYPE_MSID 5
+#define ATTR_TYPE_TYPE 4
+#define ATTR_TYPE_MSID 5
#define A11_MSG_MSID_ELEM_LEN_MAX 8
#define A11_MSG_MSID_LEN_MAX 15
@@ -413,7 +413,7 @@ static const struct radius_attribute attrs[]={
/* decode MSID from SSE */
-/* MSID is encoded in Binary Coded Decimal format
+/* MSID is encoded in Binary Coded Decimal format
Fisrt Byte: [odd-indicator] [Digit 1]
Seond Byte: [Digit 3] [Digit 2]
..
@@ -510,6 +510,9 @@ decode_sse(proto_tree* ext_tree, tvbuff_t* tvb, int offset, size_t ext_len)
if(msid_len > A11_MSG_MSID_ELEM_LEN_MAX)
{
p_msid = "MSID is too long";
+ }else if(msid_len < 1)
+ {
+ p_msid = "MSID is too short";
}else
{
/* Decode the BCD digits */
@@ -518,14 +521,14 @@ decode_sse(proto_tree* ext_tree, tvbuff_t* tvb, int offset, size_t ext_len)
guint8 msid_digit = tvb_get_guint8(tvb, offset);
offset += 1;
ext_len -= 1;
-
+
msid_digits[msid_index*2] = (msid_digit & 0x0F) + '0';
msid_digits[(msid_index*2) + 1] = ((msid_digit & 0xF0) >> 4) + '0';
}
-
+
odd_even_ind = (msid_digits[0] == '1');
msid_num_digits = 0;
-
+
if(odd_even_ind)
{
msid_num_digits = ((msid_len-1) * 2) + 1;
@@ -533,11 +536,11 @@ decode_sse(proto_tree* ext_tree, tvbuff_t* tvb, int offset, size_t ext_len)
{
msid_num_digits = (msid_len-1) * 2;
}
-
+
msid_digits[msid_num_digits + 1] = 0;
p_msid = msid_digits + 1;
}
-
+
proto_tree_add_string
(ext_tree, hf_a11_ses_msid, tvb, msid_start_offset, msid_len, p_msid);
@@ -603,7 +606,7 @@ dissect_a11_radius( tvbuff_t *tvb, int offset, proto_tree *tree, int app_len)
offset += radius_len;
continue;
}
- radius_vendor_id = tvb_get_ntohl(tvb, offset +2);
+ radius_vendor_id = tvb_get_ntohl(tvb, offset +2);
if(radius_vendor_id != VENDOR_THE3GPP2)
{
@@ -646,7 +649,7 @@ dissect_a11_radius( tvbuff_t *tvb, int offset, proto_tree *tree, int app_len)
offset += radius_len;
continue;
}
-
+
offset += SKIP_HDR_LEN;
radius_len -= SKIP_HDR_LEN;
radius_offset = 0;
@@ -664,7 +667,7 @@ dissect_a11_radius( tvbuff_t *tvb, int offset, proto_tree *tree, int app_len)
return;
}
- radius_subtype = tvb_get_guint8(tvb, offset + radius_offset);
+ radius_subtype = tvb_get_guint8(tvb, offset + radius_offset);
attribute_len = tvb_get_guint8(tvb, offset + radius_offset + 1);
if (attribute_len < 2)
{
@@ -759,7 +762,7 @@ static void dissect_ase(tvbuff_t* tvb, int offset, int ase_len, proto_tree* ext_
proto_item* ti = proto_tree_add_text
(ext_tree, tvb, offset+clen, 0x0D+1, "GRE Key Entry (SRID: %d)", srid);
proto_tree* exts_tree = proto_item_add_subtree(ti, ett_a11_ase);
-
+
/* Entry Length */
proto_tree_add_item(exts_tree, hf_a11_ase_len_type, tvb, offset+clen, 1, FALSE);
clen++;
@@ -873,7 +876,7 @@ static void dissect_fwd_qosinfo(tvbuff_t* tvb, int offset, proto_tree* ext_tree)
/* SR Id */
- srid = tvb_get_guint8(tvb, offset+clen);
+ srid = tvb_get_guint8(tvb, offset+clen);
proto_tree_add_item(ext_tree, hf_a11_fqi_srid, tvb, offset+clen, 1, FALSE);
clen++;
@@ -899,7 +902,7 @@ static void dissect_fwd_qosinfo(tvbuff_t* tvb, int offset, proto_tree* ext_tree)
(ext_tree, tvb, offset+clen, entry_len+1, "Forward Flow Entry (Flow Id: %d)", flow_id);
proto_tree* exts_tree = proto_item_add_subtree(ti, ett_a11_fqi_flowentry);
-
+
/* Entry Length */
proto_tree_add_item(exts_tree, hf_a11_fqi_entrylen, tvb, offset+clen, 1, FALSE);
clen++;
@@ -923,7 +926,7 @@ static void dissect_fwd_qosinfo(tvbuff_t* tvb, int offset, proto_tree* ext_tree)
if(requested_qos_len)
{
proto_tree_add_item
- (exts_tree, hf_a11_fqi_requested_qos, tvb, offset+clen,
+ (exts_tree, hf_a11_fqi_requested_qos, tvb, offset+clen,
requested_qos_len, FALSE);
clen += requested_qos_len;
}
@@ -952,7 +955,7 @@ static void dissect_rev_qosinfo(tvbuff_t* tvb, int offset, proto_tree* ext_tree)
guint8 flow_index = 0;
/* SR Id */
- srid = tvb_get_guint8(tvb, offset+clen);
+ srid = tvb_get_guint8(tvb, offset+clen);
proto_tree_add_item(ext_tree, hf_a11_rqi_srid, tvb, offset+clen, 1, FALSE);
clen++;
@@ -974,7 +977,7 @@ static void dissect_rev_qosinfo(tvbuff_t* tvb, int offset, proto_tree* ext_tree)
(ext_tree, tvb, offset+clen, entry_len+1, "Reverse Flow Entry (Flow Id: %d)", flow_id);
proto_tree* exts_tree = proto_item_add_subtree(ti, ett_a11_rqi_flowentry);
-
+
/* Entry Length */
proto_tree_add_item(exts_tree, hf_a11_rqi_entrylen, tvb, offset+clen, 1, FALSE);
clen++;
@@ -1023,9 +1026,9 @@ static void dissect_subscriber_qos_profile(tvbuff_t* tvb, int offset, int ext_le
int qos_profile_len = ext_len;
- proto_item* ti =
- proto_tree_add_text (ext_tree, tvb, offset, 0,
- "Subscriber Qos Profile (%d bytes)",
+ proto_item* ti =
+ proto_tree_add_text (ext_tree, tvb, offset, 0,
+ "Subscriber Qos Profile (%d bytes)",
qos_profile_len);
exts_tree = proto_item_add_subtree(ti, ett_a11_subscriber_profile);
@@ -1034,7 +1037,7 @@ static void dissect_subscriber_qos_profile(tvbuff_t* tvb, int offset, int ext_le
if(qos_profile_len)
{
proto_tree_add_item
- (exts_tree, hf_a11_subsciber_profile, tvb, offset,
+ (exts_tree, hf_a11_subsciber_profile, tvb, offset,
qos_profile_len, FALSE);
}
}
@@ -1063,7 +1066,7 @@ static void dissect_fwd_qosupdate_info(tvbuff_t* tvb, int offset, proto_tree* ex
clen++;
exts_tree = proto_item_add_subtree(ti, ett_a11_fqui_flowentry);
-
+
/* Forward QoS Sub Blob Length */
granted_qos_len = tvb_get_guint8(tvb, offset+clen);
proto_tree_add_item
@@ -1074,7 +1077,7 @@ static void dissect_fwd_qosupdate_info(tvbuff_t* tvb, int offset, proto_tree* ex
if(granted_qos_len)
{
proto_tree_add_item
- (exts_tree, hf_a11_fqui_updated_qos, tvb, offset+clen,
+ (exts_tree, hf_a11_fqui_updated_qos, tvb, offset+clen,
granted_qos_len, FALSE);
clen += granted_qos_len;
}
@@ -1105,7 +1108,7 @@ static void dissect_rev_qosupdate_info(tvbuff_t* tvb, int offset, proto_tree* ex
(ext_tree, tvb, offset+clen, 1, "Reverse Flow Entry (Flow Id: %d)", flow_id);
clen++;
exts_tree = proto_item_add_subtree(ti, ett_a11_rqui_flowentry);
-
+
/* Reverse QoS Sub Blob Length */
granted_qos_len = tvb_get_guint8(tvb, offset+clen);
proto_tree_add_item
@@ -1159,13 +1162,13 @@ dissect_a11_extensions( tvbuff_t *tvb, int offset, proto_tree *tree)
hdrLen = 4;
} else if (ext_type == CVSE_EXT || ext_type == OLD_CVSE_EXT) {
ext_len = tvb_get_ntohs(tvb, offset + 2);
- ext_subtype = tvb_get_guint8(tvb, offset + 8);
+ ext_subtype = tvb_get_guint8(tvb, offset + 8);
hdrLen = 4;
} else {
ext_len = tvb_get_guint8(tvb, offset + 1);
hdrLen = 2;
}
-
+
ti = proto_tree_add_text(exts_tree, tvb, offset, ext_len + hdrLen,
"Extension: %s",
val_to_str(ext_type, a11_ext_types,
@@ -1215,7 +1218,7 @@ dissect_a11_extensions( tvbuff_t *tvb, int offset, proto_tree *tree)
case MN_NAI_EXT:
if (ext_len == 0)
break;
- proto_tree_add_item(ext_tree, hf_a11_next_nai, tvb, offset,
+ proto_tree_add_item(ext_tree, hf_a11_next_nai, tvb, offset,
ext_len, FALSE);
break;
@@ -1239,7 +1242,7 @@ dissect_a11_extensions( tvbuff_t *tvb, int offset, proto_tree *tree)
break;
proto_tree_add_item(ext_tree, hf_a11_aext_auth, tvb, offset,
ext_len, FALSE);
-
+
break;
case OLD_CVSE_EXT: /* RFC 3115 */
case CVSE_EXT: /* RFC 3115 */
@@ -1362,7 +1365,7 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 flags;
size_t offset=0;
const guint8 *reftime;
-
+
if (!tvb_bytes_exist(tvb, offset, 1))
return 0; /* not enough data to check message type */
@@ -1371,27 +1374,27 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return 0; /* not a known message type */
/* Make entries in Protocol column and Info column on summary display */
-
- if (check_col(pinfo->cinfo, COL_PROTOCOL))
+
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_set_str(pinfo->cinfo, COL_PROTOCOL, "3GPP2 A11");
- if (check_col(pinfo->cinfo, COL_INFO))
+ if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
switch (type) {
case REGISTRATION_REQUEST:
- if (check_col(pinfo->cinfo, COL_INFO))
- col_add_fstr(pinfo->cinfo, COL_INFO, "Reg Request: PDSN=%s PCF=%s",
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Reg Request: PDSN=%s PCF=%s",
ip_to_str(tvb_get_ptr(tvb, 8, 4)),
ip_to_str(tvb_get_ptr(tvb,12,4)));
-
+
if (tree) {
ti = proto_tree_add_item(tree, proto_a11, tvb, offset, -1, FALSE);
a11_tree = proto_item_add_subtree(ti, ett_a11);
-
+
/* type */
proto_tree_add_uint(a11_tree, hf_a11_type, tvb, offset, 1, type);
offset++;
-
+
/* flags */
flags = tvb_get_guint8(tvb, offset);
tf = proto_tree_add_uint(a11_tree, hf_a11_flags, tvb,
@@ -1409,15 +1412,15 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* lifetime */
proto_tree_add_item(a11_tree, hf_a11_life, tvb, offset, 2, FALSE);
offset +=2;
-
+
/* home address */
proto_tree_add_item(a11_tree, hf_a11_homeaddr, tvb, offset, 4, FALSE);
offset += 4;
-
+
/* home agent address */
proto_tree_add_item(a11_tree, hf_a11_haaddr, tvb, offset, 4, FALSE);
offset += 4;
-
+
/* Care of Address */
proto_tree_add_item(a11_tree, hf_a11_coa, tvb, offset, 4, FALSE);
offset += 4;
@@ -1429,23 +1432,23 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
"%s",
ntp_fmt_ts(reftime));
offset += 8;
-
+
} /* if tree */
break;
case REGISTRATION_REPLY:
- if (check_col(pinfo->cinfo, COL_INFO))
- col_add_fstr(pinfo->cinfo, COL_INFO, "Reg Reply: PDSN=%s, Code=%u",
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Reg Reply: PDSN=%s, Code=%u",
ip_to_str(tvb_get_ptr(tvb,8,4)), tvb_get_guint8(tvb,1));
-
+
if (tree) {
/* Add Subtree */
ti = proto_tree_add_item(tree, proto_a11, tvb, offset, -1, FALSE);
a11_tree = proto_item_add_subtree(ti, ett_a11);
-
+
/* Type */
proto_tree_add_uint(a11_tree, hf_a11_type, tvb, offset, 1, type);
offset++;
-
+
/* Reply Code */
proto_tree_add_item(a11_tree, hf_a11_code, tvb, offset, 1, FALSE);
offset++;
@@ -1471,24 +1474,24 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ntp_fmt_ts(reftime));
offset += 8;
} /* if tree */
-
+
break;
case REGISTRATION_UPDATE:
- if (check_col(pinfo->cinfo, COL_INFO))
- col_add_fstr(pinfo->cinfo, COL_INFO,"Reg Update: PDSN=%s",
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO,"Reg Update: PDSN=%s",
ip_to_str(tvb_get_ptr(tvb,8,4)));
if (tree) {
/* Add Subtree */
ti = proto_tree_add_item(tree, proto_a11, tvb, offset, -1, FALSE);
a11_tree = proto_item_add_subtree(ti, ett_a11);
-
+
/* Type */
proto_tree_add_uint(a11_tree, hf_a11_type, tvb, offset, 1, type);
offset++;
/* Reserved */
offset+=3;
-
+
/* Home address */
proto_tree_add_item(a11_tree, hf_a11_homeaddr, tvb, offset, 4, FALSE);
offset += 4;
@@ -1509,19 +1512,19 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
} /* if tree */
break;
case REGISTRATION_ACK:
- if (check_col(pinfo->cinfo, COL_INFO))
- col_add_fstr(pinfo->cinfo, COL_INFO, "Reg Ack: PCF=%s Status=%u",
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Reg Ack: PCF=%s Status=%u",
ip_to_str(tvb_get_ptr(tvb, 8, 4)),
tvb_get_guint8(tvb,3));
if (tree) {
/* Add Subtree */
ti = proto_tree_add_item(tree, proto_a11, tvb, offset, -1, FALSE);
a11_tree = proto_item_add_subtree(ti, ett_a11);
-
+
/* Type */
proto_tree_add_uint(a11_tree, hf_a11_type, tvb, offset, 1, type);
offset++;
-
+
/* Reserved */
offset+=2;
@@ -1549,21 +1552,21 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
} /* if tree */
break;
case SESSION_UPDATE: /* IOS4.3 */
- if (check_col(pinfo->cinfo, COL_INFO))
- col_add_fstr(pinfo->cinfo, COL_INFO,"Ses Update: PDSN=%s",
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO,"Ses Update: PDSN=%s",
ip_to_str(tvb_get_ptr(tvb,8,4)));
if (tree) {
/* Add Subtree */
ti = proto_tree_add_item(tree, proto_a11, tvb, offset, -1, FALSE);
a11_tree = proto_item_add_subtree(ti, ett_a11);
-
+
/* Type */
proto_tree_add_uint(a11_tree, hf_a11_type, tvb, offset, 1, type);
offset++;
/* Reserved */
offset+=3;
-
+
/* Home address */
proto_tree_add_item(a11_tree, hf_a11_homeaddr, tvb, offset, 4, FALSE);
offset += 4;
@@ -1584,19 +1587,19 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
} /* if tree */
break;
case SESSION_ACK: /* IOS4.3 */
- if (check_col(pinfo->cinfo, COL_INFO))
- col_add_fstr(pinfo->cinfo, COL_INFO, "Ses Upd Ack: PCF=%s, Status=%u",
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Ses Upd Ack: PCF=%s, Status=%u",
ip_to_str(tvb_get_ptr(tvb, 8, 4)),
tvb_get_guint8(tvb,3));
if (tree) {
/* Add Subtree */
ti = proto_tree_add_item(tree, proto_a11, tvb, offset, -1, FALSE);
a11_tree = proto_item_add_subtree(ti, ett_a11);
-
+
/* Type */
proto_tree_add_uint(a11_tree, hf_a11_type, tvb, offset, 1, type);
offset++;
-
+
/* Reserved */
offset+=2;
@@ -1636,13 +1639,13 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
void proto_register_a11(void);
void proto_register_a11(void)
-{
+{
/* Setup list of header fields */
static hf_register_info hf[] = {
{ &hf_a11_type,
{ "Message Type", "a11.type",
- FT_UINT8, BASE_DEC, VALS(a11_types), 0,
+ FT_UINT8, BASE_DEC, VALS(a11_types), 0,
"A11 Message type.", HFILL }
},
{ &hf_a11_flags,
@@ -1653,83 +1656,83 @@ void proto_register_a11(void)
{ &hf_a11_s,
{"Simultaneous Bindings", "a11.s",
- FT_BOOLEAN, 8, NULL, 128,
+ FT_BOOLEAN, 8, NULL, 128,
"Simultaneous Bindings Allowed", HFILL }
},
{ &hf_a11_b,
{"Broadcast Datagrams", "a11.b",
- FT_BOOLEAN, 8, NULL, 64,
+ FT_BOOLEAN, 8, NULL, 64,
"Broadcast Datagrams requested", HFILL }
},
{ &hf_a11_d,
{ "Co-located Care-of Address", "a11.d",
- FT_BOOLEAN, 8, NULL, 32,
+ FT_BOOLEAN, 8, NULL, 32,
"MN using Co-located Care-of address", HFILL }
},
{ &hf_a11_m,
{"Minimal Encapsulation", "a11.m",
- FT_BOOLEAN, 8, NULL, 16,
+ FT_BOOLEAN, 8, NULL, 16,
"MN wants Minimal encapsulation", HFILL }
},
{ &hf_a11_g,
{"GRE", "a11.g",
- FT_BOOLEAN, 8, NULL, 8,
+ FT_BOOLEAN, 8, NULL, 8,
"MN wants GRE encapsulation", HFILL }
},
{ &hf_a11_v,
{ "Van Jacobson", "a11.v",
- FT_BOOLEAN, 8, NULL, 4,
+ FT_BOOLEAN, 8, NULL, 4,
"Van Jacobson", HFILL }
},
{ &hf_a11_t,
{ "Reverse Tunneling", "a11.t",
- FT_BOOLEAN, 8, NULL, 2,
+ FT_BOOLEAN, 8, NULL, 2,
"Reverse tunneling requested", HFILL }
},
{ &hf_a11_code,
{ "Reply Code", "a11.code",
- FT_UINT8, BASE_DEC, VALS(a11_reply_codes), 0,
+ FT_UINT8, BASE_DEC, VALS(a11_reply_codes), 0,
"A11 Registration Reply code.", HFILL }
},
{ &hf_a11_status,
{ "Reply Status", "a11.ackstat",
- FT_UINT8, BASE_DEC, VALS(a11_ack_status), 0,
+ FT_UINT8, BASE_DEC, VALS(a11_ack_status), 0,
"A11 Registration Ack Status.", HFILL }
},
{ &hf_a11_life,
{ "Lifetime", "a11.life",
- FT_UINT16, BASE_DEC, NULL, 0,
+ FT_UINT16, BASE_DEC, NULL, 0,
"A11 Registration Lifetime.", HFILL }
},
{ &hf_a11_homeaddr,
{ "Home Address", "a11.homeaddr",
- FT_IPv4, BASE_NONE, NULL, 0,
+ FT_IPv4, BASE_NONE, NULL, 0,
"Mobile Node's home address.", HFILL }
},
-
+
{ &hf_a11_haaddr,
{ "Home Agent", "a11.haaddr",
- FT_IPv4, BASE_NONE, NULL, 0,
+ FT_IPv4, BASE_NONE, NULL, 0,
"Home agent IP Address.", HFILL }
},
{ &hf_a11_coa,
{ "Care of Address", "a11.coa",
- FT_IPv4, BASE_NONE, NULL, 0,
+ FT_IPv4, BASE_NONE, NULL, 0,
"Care of Address.", HFILL }
},
{ &hf_a11_ident,
{ "Identification", "a11.ident",
- FT_BYTES, BASE_NONE, NULL, 0,
+ FT_BYTES, BASE_NONE, NULL, 0,
"MN Identification.", HFILL }
},
{ &hf_a11_ext_type,
{ "Extension Type", "a11.ext.type",
- FT_UINT8, BASE_DEC, VALS(a11_ext_types), 0,
+ FT_UINT8, BASE_DEC, VALS(a11_ext_types), 0,
"Mobile IP Extension Type.", HFILL }
},
{ &hf_a11_ext_stype,
{ "Gen Auth Ext SubType", "a11.ext.auth.subtype",
- FT_UINT8, BASE_DEC, VALS(a11_ext_stypes), 0,
+ FT_UINT8, BASE_DEC, VALS(a11_ext_stypes), 0,
"Mobile IP Auth Extension Sub Type.", HFILL }
},
{ &hf_a11_ext_len,
@@ -1804,17 +1807,17 @@ void proto_register_a11(void)
},
{ &hf_a11_vse_ppaddr,
{ "Anchor P-P Address", "a11.ext.ppaddr",
- FT_IPv4, BASE_NONE, NULL, 0,
+ FT_IPv4, BASE_NONE, NULL, 0,
"Anchor P-P Address.", HFILL }
},
{ &hf_a11_vse_dormant,
{ "All Dormant Indicator", "a11.ext.dormant",
- FT_UINT16, BASE_HEX, VALS(a11_ext_dormant), 0,
+ FT_UINT16, BASE_HEX, VALS(a11_ext_dormant), 0,
"All Dormant Indicator.", HFILL }
},
{ &hf_a11_vse_code,
{ "Reply Code", "a11.ext.code",
- FT_UINT8, BASE_DEC, VALS(a11_reply_codes), 0,
+ FT_UINT8, BASE_DEC, VALS(a11_reply_codes), 0,
"PDSN Code.", HFILL }
},
{ &hf_a11_vse_pdit,
diff --git a/epan/dissectors/packet-ppp.c b/epan/dissectors/packet-ppp.c
index 8fa857ff85..f20c96ddf5 100644
--- a/epan/dissectors/packet-ppp.c
+++ b/epan/dissectors/packet-ppp.c
@@ -185,7 +185,7 @@ static int proto_ipv6cp = -1; /* IPv6CP vars */
static gint ett_ipv6cp = -1;
static gint ett_ipv6cp_options = -1;
static gint ett_ipv6cp_if_id_opt = -1;
-static gint ett_ipv6cp_compress_opt = -1;
+static gint ett_ipv6cp_compress_opt = -1;
static int proto_iphc_crtp = -1; /* CRTP vars */
static int hf_iphc_crtp_cid8 = -1;
@@ -2109,7 +2109,7 @@ static void dissect_ipcp_compress_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
}
break;
-
+
case IPCP_COMPRESS_IPHC:
if ( length < 2 ) {
break;
@@ -2815,7 +2815,7 @@ dissect_ppp_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
static void
dissect_lcp_options(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- dissect_ip_tcp_options(tvb, 0, tvb_reported_length(tvb), lcp_opts, N_LCP_OPTS,
+ dissect_ip_tcp_options(tvb, 0, tvb_reported_length(tvb), lcp_opts, N_LCP_OPTS,
-1, pinfo, tree);
}
@@ -3106,9 +3106,9 @@ static const value_string iphc_crtp_cs_flags[] = {
{0, NULL }
};
-/*
- * 0x61 Packets: Full IP/UDP Header
- */
+/*
+ * 0x61 Packets: Full IP/UDP Header
+ */
static void
dissect_iphc_crtp_fh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
@@ -3145,7 +3145,7 @@ dissect_iphc_crtp_fh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (tree) {
- ti = proto_tree_add_protocol_format(tree, proto_iphc_crtp, tvb, 0, -1,
+ ti = proto_tree_add_protocol_format(tree, proto_iphc_crtp, tvb, 0, -1,
"%s", val_to_str(PPP_RTP_FH, ppp_vals, "Unknown"));
fh_tree = proto_item_add_subtree(ti, ett_iphc_crtp);
@@ -3153,13 +3153,13 @@ dissect_iphc_crtp_fh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* calculate length of IP header, assume IPv4 */
ip_hdr_len = (tvb_get_guint8(tvb, 0) & 0x0f) * 4;
-
+
/* calculate total hdr length, assume UDP */
hdr_len = ip_hdr_len + 8;
/* flags field */
ti = proto_tree_add_item(fh_tree, hf_iphc_crtp_fh_flags, tvb, 2, 1, FALSE);
-
+
/* generation field */
ti = proto_tree_add_item(fh_tree, hf_iphc_crtp_gen, tvb, 2, 1, FALSE);
@@ -3182,7 +3182,7 @@ dissect_iphc_crtp_fh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
/* information field */
- tvb_ensure_bytes_exist (tvb, 0, length);
+ tvb_ensure_bytes_exist (tvb, 0, hdr_len);
ti = proto_tree_add_text(fh_tree, tvb, 0,length,"Information Field");
info_tree = proto_item_add_subtree(ti,ett_iphc_crtp_info);
@@ -3207,7 +3207,7 @@ dissect_iphc_crtp_fh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
} /* if tree */
}
-/*
+/*
* 0x2067 Packets: Compressed UDP with 16-bit Context Identifier
*/
static void
@@ -3228,7 +3228,7 @@ dissect_iphc_crtp_cudp16(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
length = tvb_reported_length(tvb);
if (tree) {
- ti = proto_tree_add_protocol_format(tree, proto_iphc_crtp, tvb, 0, -1,
+ ti = proto_tree_add_protocol_format(tree, proto_iphc_crtp, tvb, 0, -1,
"%s", val_to_str(PPP_RTP_CUDP16, ppp_vals, "Unknown"));
cudp_tree = proto_item_add_subtree(ti, ett_iphc_crtp);
@@ -3244,7 +3244,7 @@ dissect_iphc_crtp_cudp16(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
} /* if tree */
}
-/*
+/*
* 0x67 Packets: Compressed UDP with 8-bit Context Identifier
*/
static void
@@ -3265,7 +3265,7 @@ dissect_iphc_crtp_cudp8(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
length = tvb_reported_length(tvb);
if (tree) {
- ti = proto_tree_add_protocol_format(tree, proto_iphc_crtp, tvb, 0, -1,
+ ti = proto_tree_add_protocol_format(tree, proto_iphc_crtp, tvb, 0, -1,
"%s", val_to_str(PPP_RTP_CUDP8, ppp_vals, "Unknown"));
cudp_tree = proto_item_add_subtree(ti, ett_iphc_crtp);
@@ -3282,7 +3282,7 @@ dissect_iphc_crtp_cudp8(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
-/*
+/*
* 0x2065 Packets: Context State
*/
static void
@@ -3301,10 +3301,10 @@ dissect_iphc_crtp_cs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str(pinfo->cinfo, COL_INFO, "Context State");
if (tree) {
-
- ti = proto_tree_add_protocol_format(tree, proto_iphc_crtp, tvb, 0, -1,
+
+ ti = proto_tree_add_protocol_format(tree, proto_iphc_crtp, tvb, 0, -1,
"%s", val_to_str(PPP_RTP_CS, ppp_vals, "Unknown"));
-
+
cs_tree = proto_item_add_subtree(ti, ett_iphc_crtp);
ti = proto_tree_add_item(cs_tree, hf_iphc_crtp_cs_flags, tvb, 0, 1, FALSE);
@@ -3323,7 +3323,7 @@ dissect_iphc_crtp_cs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
cid_size = 2;
length = 4 * cnt;
}
-
+
tvb_ensure_bytes_exist(tvb, offset, length);
while (offset < length) {
@@ -3535,7 +3535,7 @@ remove_escape_chars(tvbuff_t *tvb, int offset, int length)
int scanned_len = 0;
guint8 octet;
tvbuff_t *next_tvb;
-
+
buff = g_malloc(length);
i = 0;
while ( scanned_len < length ){
@@ -3561,7 +3561,7 @@ remove_escape_chars(tvbuff_t *tvb, int offset, int length)
next_tvb = tvb_new_real_data(buff,i,i);
/* Arrange that the allocated packet data copy be freed when the
- * tvbuff is freed.
+ * tvbuff is freed.
*/
tvb_set_free_cb( next_tvb, g_free );
@@ -3864,7 +3864,7 @@ dissect_chap( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) {
/* Identifier */
proto_tree_add_item(fh_tree, hf_chap_identifier, tvb, 1, 1, FALSE);
}
-
+
/* Length - make sure it's valid */
length = tvb_get_ntohs(tvb, 2);
if(length < 4) {
@@ -3877,12 +3877,12 @@ dissect_chap( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) {
}
proto_item_set_len(ti, length);
if(tree) {
- proto_tree_add_item(fh_tree, hf_chap_length, tvb, 2, 2, FALSE);
+ proto_tree_add_item(fh_tree, hf_chap_length, tvb, 2, 2, FALSE);
}
/* Offset moved to after length field */
offset = 4;
- /* Length includes previous 4 bytes, subtract */
+ /* Length includes previous 4 bytes, subtract */
length -= 4;
switch (code) {
@@ -3951,7 +3951,7 @@ dissect_chap( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) {
proto_tree_add_item(fh_tree, hf_chap_message, tvb, offset, length, FALSE);
}
}
-
+
/* Show message in info column */
if(check_col(pinfo->cinfo, COL_INFO)){
col_append_fstr(pinfo->cinfo, COL_INFO, " (MESSAGE='%s')",
@@ -4525,7 +4525,7 @@ proto_reg_handoff_chap(void)
* registering with the "ethertype" dissector table.
*/
dissector_add("ethertype", PPP_CHAP, chap_handle);
-
+
/*
* for GSM-A / MobileL3 / GPRS SM / PCO
*/
@@ -4570,10 +4570,10 @@ proto_register_pppmux(void)
{
{ &hf_pppmux_protocol,
{ "Protocol", "ppp.protocol", FT_UINT16, BASE_HEX,
- VALS(ppp_vals), 0x0,
+ VALS(ppp_vals), 0x0,
"The protocol of the sub-frame.", HFILL }},
};
-
+
static gint *ett[] = {
&ett_pppmux,
&ett_pppmux_subframe,
@@ -4768,7 +4768,7 @@ proto_register_iphc_crtp(void)
}
},
};
-
+
static gint *ett[] = {
&ett_iphc_crtp,
&ett_iphc_crtp_hdr,
diff --git a/epan/dissectors/packet-rsvp.c b/epan/dissectors/packet-rsvp.c
index 3c05eacad0..1ec8a36afb 100644
--- a/epan/dissectors/packet-rsvp.c
+++ b/epan/dissectors/packet-rsvp.c
@@ -102,7 +102,7 @@ static dissector_handle_t data_handle;
static int rsvp_tap = -1;
/*
- * All RSVP packets belonging to a particular flow belong to the same
+ * All RSVP packets belonging to a particular flow belong to the same
* conversation. The following structure definitions are for auxillary
* structures which have all the relevant flow information to make up the
* RSVP five-tuple. Note that the values of the five-tuple are determined
@@ -153,12 +153,12 @@ typedef struct rsvp_template_filter_info {
guint16 udp_source_port;
} rsvp_template_filter_info;
-/*
+/*
* The actual request key consists of a union of the various session objects
- * (which are uniquely identified based on the session type), and the
- * source_info structure, which has the information derived from the sender
+ * (which are uniquely identified based on the session type), and the
+ * source_info structure, which has the information derived from the sender
* template or the filter spec.
- * The request key is populated by copying the information from the
+ * The request key is populated by copying the information from the
* rsvp_conversation_info structure (rsvph), which in turn is populated when
* the session, filter and sender template objects are dissected.
*/
@@ -373,13 +373,13 @@ enum rsvp_classes {
RSVP_CLASS_LSP_REQUIRED_ATTRIBUTES,
/* 68-127 Unassigned */
-
+
RSVP_CLASS_NODE_CHAR = 128,
RSVP_CLASS_SUGGESTED_LABEL,
RSVP_CLASS_ACCEPTABLE_LABEL_SET,
RSVP_CLASS_RESTART_CAP,
- /* 132-160 Unassigned */
+ /* 132-160 Unassigned */
/* 166-191 Unassigned */
@@ -433,7 +433,7 @@ static value_string rsvp_class_vals[] = {
{RSVP_CLASS_CONFIRM, "CONFIRM object"},
{RSVP_CLASS_LABEL, "LABEL object"},
{RSVP_CLASS_HOP_COUNT, "HOP_COUNT object"},
- {RSVP_CLASS_STRICT_SOURCE_ROUTE, "STRICT_SOURCE_ROUTE object"},
+ {RSVP_CLASS_STRICT_SOURCE_ROUTE, "STRICT_SOURCE_ROUTE object"},
{RSVP_CLASS_LABEL_REQUEST, "LABEL REQUEST object"},
{RSVP_CLASS_EXPLICIT_ROUTE, "EXPLICIT ROUTE object"},
{RSVP_CLASS_RECORD_ROUTE, "RECORD ROUTE object"},
@@ -486,7 +486,7 @@ enum rsvp_error_types {
RSVP_ERROR_NOTIFY, /* 25 */
RSVP_ERROR_DIFFSERV = 27,
RSVP_ERROR_DSTE = 28 /* FF: RFC4124 */
- /*missing (11-2006) :
+ /*missing (11-2006) :
- 29 : Unknown Attributes TLV , RFC4420
- 30 : Unknown Attributes Bit RFC4420
- 31 : Alarms RFC-ietf-ccamp-gmpls-alarm-spec-06.txt
@@ -582,7 +582,7 @@ static value_string rsvp_admission_control_error_vals[] = {
{0, NULL}
};
-static value_string rsvp_traffic_control_error_vals[] = {
+static value_string rsvp_traffic_control_error_vals[] = {
{RSVP_TRAFFIC_CONTROL_ERROR_SERVICE_CONFLICT, "Service conflict"},
{RSVP_TRAFFIC_CONTROL_ERROR_SERVIEC_UNSUPPORTED, "Service unsupported"},
{RSVP_TRAFFIC_CONTROL_ERROR_BAD_FLOWSPEC, "Bad Flowspec value"},
@@ -633,7 +633,7 @@ static value_string rsvp_diffserv_aware_te_error_vals[] = {
{RSVP_DSTE_ERROR_INVALID_CLASSTYPE_VALUE, "Invalid Class-Type value"},
{RSVP_DSTE_ERROR_CT_SETUP_PRIO_NOT_CONFIGURED, "CT and setup priority do not form a configured TE-Class"},
{RSVP_DSTE_ERROR_CT_HOLDING_PRIO_NOT_CONFIGURED, "CT and holding priority do not form a configured TE-Class"},
- {RSVP_DSTE_ERROR_CT_SETUP_PRIO_AND_CT_HOLDING_PRIO_NOT_CONFIGURED,
+ {RSVP_DSTE_ERROR_CT_SETUP_PRIO_AND_CT_HOLDING_PRIO_NOT_CONFIGURED,
"CT and setup priority do not form a configured TE-Class AND CT and holding priority do not form a configured TE-Class"},
{RSVP_DSTE_ERROR_INCONSISTENCY_PSC_CT, "Inconsistency between signaled PSC and signaled CT"},
{RSVP_DSTE_ERROR_INCONSISTENCY_PHB_CT, "Inconsistency between signaled PHBs and signaled CT"},
@@ -1052,7 +1052,7 @@ static hf_register_info rsvpf_info[] = {
{&rsvp_filter[RSVPF_NOTIFY],
{ "Notify Message", "rsvp.notify", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"", HFILL }},
-
+
/* Object present shorthands */
{&rsvp_filter[RSVPF_SESSION],
{ "SESSION", "rsvp.session", FT_NONE, BASE_NONE, NULL, 0x0,
@@ -1293,10 +1293,10 @@ static hf_register_info rsvpf_info[] = {
* Compare two RSVP request keys to see if they are equal. Return 1 if they
* are, 0 otherwise.
* Two RSVP request keys are equal if and only if they have the exactly the
- * same internal conversation identifier, session type, and matching values in
+ * same internal conversation identifier, session type, and matching values in
* the session info and source info structures.
*/
-static gint
+static gint
rsvp_equal (gconstpointer k1, gconstpointer k2)
{
const struct rsvp_request_key *key1 = (const struct rsvp_request_key*) k1;
@@ -1318,10 +1318,10 @@ rsvp_equal (gconstpointer k1, gconstpointer k2)
if (key1->u.session_ipv4.protocol != key2->u.session_ipv4.protocol)
return 0;
-
+
if (key1->u.session_ipv4.udp_dest_port != key2->u.session_ipv4.udp_dest_port)
return 0;
-
+
break;
case RSVP_SESSION_TYPE_IPV6:
@@ -1332,13 +1332,13 @@ rsvp_equal (gconstpointer k1, gconstpointer k2)
if (ADDRESSES_EQUAL(&key1->u.session_ipv4_lsp.destination,
&key2->u.session_ipv4_lsp.destination) == FALSE)
return 0;
-
- if (key1->u.session_ipv4_lsp.udp_dest_port !=
+
+ if (key1->u.session_ipv4_lsp.udp_dest_port !=
key2->u.session_ipv4_lsp.udp_dest_port)
return 0;
-
- if (key1->u.session_ipv4_lsp.ext_tunnel_id !=
+
+ if (key1->u.session_ipv4_lsp.ext_tunnel_id !=
key2->u.session_ipv4_lsp.ext_tunnel_id)
return 0;
@@ -1351,7 +1351,7 @@ rsvp_equal (gconstpointer k1, gconstpointer k2)
if (key1->u.session_agg_ipv4.dscp != key2->u.session_agg_ipv4.dscp)
return 0;
-
+
break;
case RSVP_SESSION_TYPE_AGGREGATE_IPV6:
@@ -1362,13 +1362,13 @@ rsvp_equal (gconstpointer k1, gconstpointer k2)
if (ADDRESSES_EQUAL(&key1->u.session_ipv4_uni.destination,
&key2->u.session_ipv4_uni.destination) == FALSE)
return 0;
-
- if (key1->u.session_ipv4_uni.udp_dest_port !=
+
+ if (key1->u.session_ipv4_uni.udp_dest_port !=
key2->u.session_ipv4_uni.udp_dest_port)
return 0;
-
- if (key1->u.session_ipv4_uni.ext_tunnel_id !=
+
+ if (key1->u.session_ipv4_uni.ext_tunnel_id !=
key2->u.session_ipv4_uni.ext_tunnel_id)
return 0;
@@ -1378,13 +1378,13 @@ rsvp_equal (gconstpointer k1, gconstpointer k2)
if (ADDRESSES_EQUAL(&key1->u.session_ipv4_enni.destination,
&key2->u.session_ipv4_enni.destination) == FALSE)
return 0;
-
- if (key1->u.session_ipv4_enni.udp_dest_port !=
+
+ if (key1->u.session_ipv4_enni.udp_dest_port !=
key2->u.session_ipv4_enni.udp_dest_port)
return 0;
-
- if (key1->u.session_ipv4_enni.ext_tunnel_id !=
+
+ if (key1->u.session_ipv4_enni.ext_tunnel_id !=
key2->u.session_ipv4_enni.ext_tunnel_id)
return 0;
@@ -1395,7 +1395,7 @@ rsvp_equal (gconstpointer k1, gconstpointer k2)
break;
}
- if (ADDRESSES_EQUAL(&key1->source_info.source,
+ if (ADDRESSES_EQUAL(&key1->source_info.source,
&key2->source_info.source) == FALSE)
return 0;
@@ -1407,10 +1407,10 @@ rsvp_equal (gconstpointer k1, gconstpointer k2)
}
/*
- * Calculate a hash key for the supplied RSVP request. The internally allocated
+ * Calculate a hash key for the supplied RSVP request. The internally allocated
* conversation-id is unique, so we just use that.
*/
-static guint
+static guint
rsvp_hash (gconstpointer k)
{
const struct rsvp_request_key *key = (const struct rsvp_request_key*) k;
@@ -1418,7 +1418,7 @@ rsvp_hash (gconstpointer k)
}
/*
- * Conversation specific initialization code that deletes any unused memory that
+ * Conversation specific initialization code that deletes any unused memory that
* might need to be freed, and allocates the memory for the various conversation
* hash tables.
*/
@@ -1751,8 +1751,8 @@ dissect_rsvp_session (proto_item *ti, proto_tree *rsvp_object_tree,
"Destination port: %u",
tvb_get_ntohs(tvb, offset2+18));
/*
- * Save this information to build the conversation request key
- * later. IPv6 conversatiuon support is not implemented yet, so only
+ * Save this information to build the conversation request key
+ * later. IPv6 conversatiuon support is not implemented yet, so only
* the session type is stored.
*/
rsvph->session_type = RSVP_SESSION_TYPE_IPV6;
@@ -1778,12 +1778,12 @@ dissect_rsvp_session (proto_item *ti, proto_tree *rsvp_object_tree,
rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
tvb, offset2+8, 4, FALSE);
- /*
- * Save this information to build the conversation request key
+ /*
+ * Save this information to build the conversation request key
* later.
*/
rsvph->session_type = RSVP_SESSION_TYPE_IPV4_LSP;
- SET_ADDRESS(&rsvph->destination, AT_IPv4, 4,
+ SET_ADDRESS(&rsvph->destination, AT_IPv4, 4,
tvb_get_ptr(tvb, offset2, 4));
rsvph->udp_dest_port = tvb_get_ntohs(tvb, offset2+6);
rsvph->ext_tunnel_id = tvb_get_ntohl(tvb, offset2 + 8);
@@ -1801,12 +1801,12 @@ dissect_rsvp_session (proto_item *ti, proto_tree *rsvp_object_tree,
tvb_get_guint8(tvb, offset2+7),
val_to_str(tvb_get_guint8(tvb, offset2+7),
dscp_vals, "Unknown (%d)"));
- /*
- * Save this information to build the conversation request key
+ /*
+ * Save this information to build the conversation request key
* later.
*/
rsvph->session_type = RSVP_SESSION_TYPE_AGGREGATE_IPV4;
- SET_ADDRESS(&rsvph->destination, AT_IPv4, 4,
+ SET_ADDRESS(&rsvph->destination, AT_IPv4, 4,
tvb_get_ptr(tvb, offset2, 4));
rsvph->dscp = tvb_get_guint8(tvb, offset2+7);
rsvph->ext_tunnel_id = tvb_get_ntohl(tvb, offset2 + 8);
@@ -1830,12 +1830,12 @@ dissect_rsvp_session (proto_item *ti, proto_tree *rsvp_object_tree,
rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
tvb, offset2+8, 4, FALSE);
- /*
- * Save this information to build the conversation request key
+ /*
+ * Save this information to build the conversation request key
* later.
*/
rsvph->session_type = RSVP_SESSION_TYPE_IPV4_UNI;
- SET_ADDRESS(&rsvph->destination, AT_IPv4, 4,
+ SET_ADDRESS(&rsvph->destination, AT_IPv4, 4,
tvb_get_ptr(tvb, offset2, 4));
rsvph->udp_dest_port = tvb_get_ntohs(tvb, offset2+6);
rsvph->ext_tunnel_id = tvb_get_ntohl(tvb, offset2 + 8);
@@ -1860,12 +1860,12 @@ dissect_rsvp_session (proto_item *ti, proto_tree *rsvp_object_tree,
rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
tvb, offset2+8, 4, FALSE);
- /*
- * Save this information to build the conversation request key
+ /*
+ * Save this information to build the conversation request key
* later.
*/
rsvph->session_type = RSVP_SESSION_TYPE_IPV4_E_NNI;
- SET_ADDRESS(&rsvph->destination, AT_IPv4, 4,
+ SET_ADDRESS(&rsvph->destination, AT_IPv4, 4,
tvb_get_ptr(tvb, offset2, 4));
rsvph->udp_dest_port = tvb_get_ntohs(tvb, offset2+6);
rsvph->ext_tunnel_id = tvb_get_ntohl(tvb, offset2 + 8);
@@ -1886,8 +1886,8 @@ dissect_rsvp_session (proto_item *ti, proto_tree *rsvp_object_tree,
* TLVs for HOP, ERROR and other IF_ID extended objects
*------------------------------------------------------------------------------*/
static void
-dissect_rsvp_ifid_tlv (proto_tree *ti, proto_tree *rsvp_object_tree,
- tvbuff_t *tvb, int offset, int obj_length,
+dissect_rsvp_ifid_tlv (proto_tree *ti, proto_tree *rsvp_object_tree,
+ tvbuff_t *tvb, int offset, int obj_length,
int subtree_type)
{
int tlv_off;
@@ -1925,7 +1925,7 @@ dissect_rsvp_ifid_tlv (proto_tree *ti, proto_tree *rsvp_object_tree,
proto_item_append_text(ti, "Data IPv4: %s. ",
ip_to_str(tvb_get_ptr(tvb, offset+tlv_off+4, 4)));
break;
-
+
case 3:
ifindex_name = "";
goto ifid_ifindex;
@@ -1957,7 +1957,7 @@ dissect_rsvp_ifid_tlv (proto_tree *ti, proto_tree *rsvp_object_tree,
ip_to_str(tvb_get_ptr(tvb, offset+tlv_off+4, 4)),
tvb_get_ntohl(tvb, offset+tlv_off+8));
break;
-
+
default:
proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 4,
"Logical interface: %u",
@@ -2016,9 +2016,9 @@ dissect_rsvp_hop (proto_item *ti, proto_tree *rsvp_object_tree,
proto_item_set_text(ti, "HOP: IPv4 IF-ID. Control IPv4: %s. ",
ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
- dissect_rsvp_ifid_tlv(ti, rsvp_object_tree, tvb, offset+12, obj_length,
+ dissect_rsvp_ifid_tlv(ti, rsvp_object_tree, tvb, offset+12, obj_length,
TREE(TT_HOP_SUBOBJ));
-
+
break;
default:
@@ -2206,7 +2206,7 @@ dissect_rsvp_error (proto_item *ti, proto_tree *rsvp_object_tree,
proto_item_set_text(ti, "ERROR: IPv4 IF-ID, Error code: %s, Value: %d, Control Node: %s. ",
val_to_str(error_code, rsvp_error_codes, "Unknown (%d)"),
error_val, ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
- dissect_rsvp_ifid_tlv(ti, rsvp_object_tree, tvb, offset+12, obj_length,
+ dissect_rsvp_ifid_tlv(ti, rsvp_object_tree, tvb, offset+12, obj_length,
TREE(TT_ERROR_SUBOBJ));
break;
}
@@ -3203,9 +3203,9 @@ dissect_rsvp_label_request (proto_item *ti, proto_tree *rsvp_object_tree,
"L3PID: %s (0x%04x)",
val_to_str(l3pid, etype_vals, "Unknown"),
l3pid);
- proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 1,
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 1,
"M: %s Merge in Data Plane",
- (tvb_get_guint8(tvb, offset2+4) & 0x80) ?
+ (tvb_get_guint8(tvb, offset2+4) & 0x80) ?
"1: Can" : "0: Cannot");
min_vpi = tvb_get_ntohs(tvb, offset2+4) & 0x7f;
min_vci = tvb_get_ntohs(tvb, offset2+6);
@@ -3221,7 +3221,7 @@ dissect_rsvp_label_request (proto_item *ti, proto_tree *rsvp_object_tree,
"Max VCI: %d", max_vci);
proto_item_set_text(ti, "LABEL REQUEST: ATM: L3PID: %s (0x%04x). VPI/VCI: Min: %d/%d, Max: %d/%d. %s Merge. ",
val_to_str(l3pid, etype_vals, "Unknown"), l3pid,
- min_vpi, min_vci, max_vpi, max_vci,
+ min_vpi, min_vci, max_vpi, max_vci,
(tvb_get_guint8(tvb, offset2+4) & 0x80) ? "Can" : "Cannot");
break;
}
@@ -3235,11 +3235,11 @@ dissect_rsvp_label_request (proto_item *ti, proto_tree *rsvp_object_tree,
"L3PID: %s (0x%04x)",
val_to_str(l3pid, etype_vals, "Unknown"),
l3pid);
- dlci_len_code = (tvb_get_ntohs(tvb, offset2+4) & 0x0180) >> 7;
+ dlci_len_code = (tvb_get_ntohs(tvb, offset2+4) & 0x0180) >> 7;
min_dlci = tvb_get_ntohl(tvb, offset2+4) & 0x7fffff;
max_dlci = tvb_get_ntohl(tvb, offset2+8) & 0x7fffff;
switch(dlci_len_code) {
- case 0:
+ case 0:
/* 10-bit DLCIs */
dlci_len = 10;
min_dlci &= 0x3ff;
@@ -3251,10 +3251,10 @@ dissect_rsvp_label_request (proto_item *ti, proto_tree *rsvp_object_tree,
min_dlci = 0;
max_dlci = 0;
}
- proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 2,
- "DLCI Length: %s (%d)",
- dlci_len==10 ? "10 bits" :
- dlci_len==23 ? "23 bits" :
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 2,
+ "DLCI Length: %s (%d)",
+ dlci_len==10 ? "10 bits" :
+ dlci_len==23 ? "23 bits" :
"INVALID", dlci_len_code);
proto_tree_add_text(rsvp_object_tree, tvb, offset2+5, 3,
"Min DLCI: %d", min_dlci);
@@ -3262,8 +3262,8 @@ dissect_rsvp_label_request (proto_item *ti, proto_tree *rsvp_object_tree,
"Max DLCI: %d", max_dlci);
proto_item_set_text(ti, "LABEL REQUEST: Frame: L3PID: %s (0x%04x). DLCI Len: %s. Min DLCI: %d. Max DLCI: %d",
val_to_str(l3pid, etype_vals, "Unknown"), l3pid,
- dlci_len==10 ? "10 bits" :
- dlci_len==23 ? "23 bits" :
+ dlci_len==10 ? "10 bits" :
+ dlci_len==23 ? "23 bits" :
"INVALID", min_dlci, max_dlci);
break;
}
@@ -3386,7 +3386,7 @@ dissect_rsvp_label_set (proto_item *ti, proto_tree *rsvp_object_tree,
len = obj_length - 8;
proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1, "C-type: %u", type);
- proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 1, "Action: %s",
+ proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 1, "Action: %s",
val_to_str(tvb_get_guint8(tvb, offset+4),
action_type_vals, "Unknown (%u)"));
proto_item_append_text(ti, ": %s",
@@ -3434,13 +3434,13 @@ dissect_rsvp_session_attribute (proto_item *ti, proto_tree *rsvp_object_tree,
proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
"C-type: %u - IPv4 LSP (%sResource Affinities)",
type, (type == 1) ? "" : "No ");
-
+
if (type == 1) {
- proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
"Exclude-Any: 0x%0x", tvb_get_ntohl(tvb, offset2));
- proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 4,
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 4,
"Include-Any: 0x%0x", tvb_get_ntohl(tvb, offset2+4));
- proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 4,
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 4,
"Include-All: 0x%0x", tvb_get_ntohl(tvb, offset2+8));
offset2 = offset2+12;
}
@@ -3509,7 +3509,7 @@ dissect_rsvp_session_attribute (proto_item *ti, proto_tree *rsvp_object_tree,
* EXPLICIT ROUTE AND RECORD ROUTE SUBOBJECTS
*------------------------------------------------------------------------------*/
static void
-dissect_rsvp_ero_rro_subobjects (proto_tree *ti, proto_tree *rsvp_object_tree,
+dissect_rsvp_ero_rro_subobjects (proto_tree *ti, proto_tree *rsvp_object_tree,
tvbuff_t *tvb,
int offset, int obj_length, int class)
{
@@ -3519,10 +3519,10 @@ dissect_rsvp_ero_rro_subobjects (proto_tree *ti, proto_tree *rsvp_object_tree,
switch(class) {
case RSVP_CLASS_EXPLICIT_ROUTE:
- tree_type = TREE(TT_EXPLICIT_ROUTE_SUBOBJ);
+ tree_type = TREE(TT_EXPLICIT_ROUTE_SUBOBJ);
break;
case RSVP_CLASS_RECORD_ROUTE:
- tree_type = TREE(TT_RECORD_ROUTE_SUBOBJ);
+ tree_type = TREE(TT_RECORD_ROUTE_SUBOBJ);
break;
default:
/* Bail out */
@@ -3538,11 +3538,11 @@ dissect_rsvp_ero_rro_subobjects (proto_tree *ti, proto_tree *rsvp_object_tree,
offset+l, 8,
"IPv4 Subobject - %s%s",
ip_to_str(tvb_get_ptr(tvb, offset+l+2, 4)),
- class == RSVP_CLASS_EXPLICIT_ROUTE ?
+ class == RSVP_CLASS_EXPLICIT_ROUTE ?
(k ? ", Loose" : ", Strict") : "");
rsvp_ro_subtree =
proto_item_add_subtree(ti2, tree_type);
- if (class == RSVP_CLASS_EXPLICIT_ROUTE)
+ if (class == RSVP_CLASS_EXPLICIT_ROUTE)
proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
k ? "Loose Hop " : "Strict Hop");
proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
@@ -3573,22 +3573,22 @@ dissect_rsvp_ero_rro_subobjects (proto_tree *ti, proto_tree *rsvp_object_tree,
if (flags&0x08) proto_item_append_text(ti2, ", Backup is Next-Next-Hop");
ti2 = proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+7, 1,
"Flags: 0x%02x", flags);
- rsvp_rro_flags_subtree =
- proto_item_add_subtree(ti2, TREE(TT_RECORD_ROUTE_SUBOBJ_FLAGS));
+ rsvp_rro_flags_subtree =
+ proto_item_add_subtree(ti2, TREE(TT_RECORD_ROUTE_SUBOBJ_FLAGS));
proto_tree_add_text(rsvp_rro_flags_subtree, tvb, offset+l+7, 1,
- decode_boolean_bitfield(flags, 0x01, 8,
+ decode_boolean_bitfield(flags, 0x01, 8,
"Local Protection Available",
"Local Protection Not Available"));
proto_tree_add_text(rsvp_rro_flags_subtree, tvb, offset+l+7, 1,
- decode_boolean_bitfield(flags, 0x02, 8,
+ decode_boolean_bitfield(flags, 0x02, 8,
"Local Protection In Use",
"Local Protection Not In Use"));
proto_tree_add_text(rsvp_rro_flags_subtree, tvb, offset+l+7, 1,
- decode_boolean_bitfield(flags, 0x04, 8,
+ decode_boolean_bitfield(flags, 0x04, 8,
"Bandwidth Protection Available",
"Bandwidth Protection Not Available"));
proto_tree_add_text(rsvp_rro_flags_subtree, tvb, offset+l+7, 1,
- decode_boolean_bitfield(flags, 0x08, 8,
+ decode_boolean_bitfield(flags, 0x08, 8,
"Node Protection Available",
"Node Protection Not Available"));
proto_tree_add_text(rsvp_rro_flags_subtree, tvb, offset+l+7, 1,
@@ -3606,7 +3606,7 @@ dissect_rsvp_ero_rro_subobjects (proto_tree *ti, proto_tree *rsvp_object_tree,
rsvp_ro_subtree =
proto_item_add_subtree(ti2, tree_type);
k = tvb_get_guint8(tvb, offset+l) & 0x80;
- if (class == RSVP_CLASS_EXPLICIT_ROUTE)
+ if (class == RSVP_CLASS_EXPLICIT_ROUTE)
proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
k ? "Loose Hop " : "Strict Hop");
proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
@@ -3635,22 +3635,22 @@ dissect_rsvp_ero_rro_subobjects (proto_tree *ti, proto_tree *rsvp_object_tree,
if (flags&0x08) proto_item_append_text(ti2, ", Backup is Next-Next-Hop");
ti2 = proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+19, 1,
"Flags: 0x%02x", flags);
- rsvp_rro_flags_subtree =
- proto_item_add_subtree(ti2, TREE(TT_RECORD_ROUTE_SUBOBJ_FLAGS));
+ rsvp_rro_flags_subtree =
+ proto_item_add_subtree(ti2, TREE(TT_RECORD_ROUTE_SUBOBJ_FLAGS));
proto_tree_add_text(rsvp_rro_flags_subtree, tvb, offset+l+19, 1,
- decode_boolean_bitfield(flags, 0x01, 8,
+ decode_boolean_bitfield(flags, 0x01, 8,
"Local Protection Available",
"Local Protection Not Available"));
proto_tree_add_text(rsvp_rro_flags_subtree, tvb, offset+l+19, 1,
- decode_boolean_bitfield(flags, 0x02, 8,
+ decode_boolean_bitfield(flags, 0x02, 8,
"Local Protection In Use",
"Local Protection Not In Use"));
proto_tree_add_text(rsvp_rro_flags_subtree, tvb, offset+l+19, 1,
- decode_boolean_bitfield(flags, 0x04, 8,
+ decode_boolean_bitfield(flags, 0x04, 8,
"Backup Tunnel Has Bandwidth",
"Backup Tunnel Does Not Have Bandwidth"));
proto_tree_add_text(rsvp_rro_flags_subtree, tvb, offset+l+19, 1,
- decode_boolean_bitfield(flags, 0x08, 8,
+ decode_boolean_bitfield(flags, 0x08, 8,
"Backup Tunnel Goes To Next-Next-Hop",
"Backup Tunnel Goes To Next-Hop"));
proto_tree_add_text(rsvp_rro_flags_subtree, tvb, offset+l+19, 1,
@@ -3667,11 +3667,11 @@ dissect_rsvp_ero_rro_subobjects (proto_tree *ti, proto_tree *rsvp_object_tree,
offset+l, 8,
"Label Subobject - %d, %s",
tvb_get_ntohl(tvb, offset+l+4),
- class == RSVP_CLASS_EXPLICIT_ROUTE ?
+ class == RSVP_CLASS_EXPLICIT_ROUTE ?
(k ? "Loose" : "Strict") : "");
rsvp_ro_subtree =
proto_item_add_subtree(ti2, tree_type);
- if (class == RSVP_CLASS_EXPLICIT_ROUTE)
+ if (class == RSVP_CLASS_EXPLICIT_ROUTE)
proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
k ? "Loose Hop " : "Strict Hop");
proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
@@ -3687,22 +3687,22 @@ dissect_rsvp_ero_rro_subobjects (proto_tree *ti, proto_tree *rsvp_object_tree,
if (flags&0x08) proto_item_append_text(ti2, ", Backup is Next-Next-Hop");
ti2 = proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+2, 1,
"Flags: 0x%02x", flags);
- rsvp_rro_flags_subtree =
- proto_item_add_subtree(ti2, TREE(TT_RECORD_ROUTE_SUBOBJ_FLAGS));
+ rsvp_rro_flags_subtree =
+ proto_item_add_subtree(ti2, TREE(TT_RECORD_ROUTE_SUBOBJ_FLAGS));
proto_tree_add_text(rsvp_rro_flags_subtree, tvb, offset+l+2, 1,
- decode_boolean_bitfield(flags, 0x01, 8,
+ decode_boolean_bitfield(flags, 0x01, 8,
"Local Protection Available",
"Local Protection Not Available"));
proto_tree_add_text(rsvp_rro_flags_subtree, tvb, offset+l+2, 1,
- decode_boolean_bitfield(flags, 0x02, 8,
+ decode_boolean_bitfield(flags, 0x02, 8,
"Local Protection In Use",
"Local Protection Not In Use"));
proto_tree_add_text(rsvp_rro_flags_subtree, tvb, offset+l+2, 1,
- decode_boolean_bitfield(flags, 0x04, 8,
+ decode_boolean_bitfield(flags, 0x04, 8,
"Backup Tunnel Has Bandwidth",
"Backup Tunnel Does Not Have Bandwidth"));
proto_tree_add_text(rsvp_rro_flags_subtree, tvb, offset+l+2, 1,
- decode_boolean_bitfield(flags, 0x08, 8,
+ decode_boolean_bitfield(flags, 0x08, 8,
"Backup Tunnel Goes To Next-Next-Hop",
"Backup Tunnel Goes To Next-Hop"));
}
@@ -3726,11 +3726,11 @@ dissect_rsvp_ero_rro_subobjects (proto_tree *ti, proto_tree *rsvp_object_tree,
"Unnumbered Interface-ID - %s, %d, %s",
ip_to_str(tvb_get_ptr(tvb, offset+l+4, 4)),
tvb_get_ntohl(tvb, offset+l+8),
- class == RSVP_CLASS_EXPLICIT_ROUTE ?
+ class == RSVP_CLASS_EXPLICIT_ROUTE ?
(k ? "Loose" : "Strict") : "");
rsvp_ro_subtree =
proto_item_add_subtree(ti2, tree_type);
- if (class == RSVP_CLASS_EXPLICIT_ROUTE)
+ if (class == RSVP_CLASS_EXPLICIT_ROUTE)
proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
k ? "Loose Hop " : "Strict Hop");
proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l, 1,
@@ -3746,22 +3746,22 @@ dissect_rsvp_ero_rro_subobjects (proto_tree *ti, proto_tree *rsvp_object_tree,
if (flags&0x08) proto_item_append_text(ti2, ", Backup is Next-Next-Hop");
ti2 = proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+2, 1,
"Flags: 0x%02x", flags);
- rsvp_rro_flags_subtree =
- proto_item_add_subtree(ti2, TREE(TT_RECORD_ROUTE_SUBOBJ_FLAGS));
+ rsvp_rro_flags_subtree =
+ proto_item_add_subtree(ti2, TREE(TT_RECORD_ROUTE_SUBOBJ_FLAGS));
proto_tree_add_text(rsvp_rro_flags_subtree, tvb, offset+l+2, 1,
- decode_boolean_bitfield(flags, 0x01, 8,
+ decode_boolean_bitfield(flags, 0x01, 8,
"Local Protection Available",
"Local Protection Not Available"));
proto_tree_add_text(rsvp_rro_flags_subtree, tvb, offset+l+2, 1,
- decode_boolean_bitfield(flags, 0x02, 8,
+ decode_boolean_bitfield(flags, 0x02, 8,
"Local Protection In Use",
"Local Protection Not In Use"));
proto_tree_add_text(rsvp_rro_flags_subtree, tvb, offset+l+2, 1,
- decode_boolean_bitfield(flags, 0x04, 8,
+ decode_boolean_bitfield(flags, 0x04, 8,
"Backup Tunnel Has Bandwidth",
"Backup Tunnel Does Not Have Bandwidth"));
proto_tree_add_text(rsvp_rro_flags_subtree, tvb, offset+l+2, 1,
- decode_boolean_bitfield(flags, 0x08, 8,
+ decode_boolean_bitfield(flags, 0x08, 8,
"Backup Tunnel Goes To Next-Next-Hop",
"Backup Tunnel Goes To Next-Hop"));
}
@@ -3836,7 +3836,7 @@ dissect_rsvp_ero_rro_subobjects (proto_tree *ti, proto_tree *rsvp_object_tree,
}
}
}
-
+
/*------------------------------------------------------------------------------
* EXPLICIT ROUTE OBJECT
*------------------------------------------------------------------------------*/
@@ -3852,7 +3852,7 @@ dissect_rsvp_explicit_route (proto_item *ti, proto_tree *rsvp_object_tree,
/* mylen = obj_length - 4; */
switch(type) {
- case 1:
+ case 1:
proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
"C-type: 1");
proto_item_set_text(ti, "EXPLICIT ROUTE: ");
@@ -3887,7 +3887,7 @@ dissect_rsvp_record_route (proto_item *ti, proto_tree *rsvp_object_tree,
proto_item_set_text(ti, "RECORD ROUTE: ");
/* mylen = obj_length - 4; */
switch(type) {
- case 1:
+ case 1:
proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
"C-type: 1");
@@ -3895,7 +3895,7 @@ dissect_rsvp_record_route (proto_item *ti, proto_tree *rsvp_object_tree,
offset + 4, obj_length, class);
break;
- default:
+ default:
proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
"C-type: Unknown (%u)",
type);
@@ -4044,8 +4044,8 @@ dissect_rsvp_hello (proto_tree *ti, proto_tree *rsvp_object_tree,
"Source Instance: 0x%x",tvb_get_ntohl(tvb, offset+4));
proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
"Destination Instance: 0x%x",tvb_get_ntohl(tvb, offset+8));
- proto_item_append_text(ti, ": %s. Src Instance: 0x%0x. Dest Instance: 0x%0x. ",
- type==1 ? "REQUEST" : "ACK",
+ proto_item_append_text(ti, ": %s. Src Instance: 0x%0x. Dest Instance: 0x%0x. ",
+ type==1 ? "REQUEST" : "ACK",
tvb_get_ntohl(tvb, offset+4),
tvb_get_ntohl(tvb, offset+8));
break;
@@ -4181,7 +4181,7 @@ dissect_rsvp_association (proto_tree *ti, proto_tree *rsvp_object_tree,
"C-type: 1 (IPv4)");
proto_item_append_text(ti, "(IPv4): ");
proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 2,
- "Association type: %s",
+ "Association type: %s",
val_to_str(association_type, association_type_vals, "Unknown (%u)"));
proto_item_append_text(ti, "%s. ",
val_to_str(association_type, association_type_vals, "Unknown (%u)"));
@@ -4198,7 +4198,7 @@ dissect_rsvp_association (proto_tree *ti, proto_tree *rsvp_object_tree,
"C-type: 2 (IPv6)");
proto_item_append_text(ti, "(IPv6): ");
proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 2,
- "Association type: %s",
+ "Association type: %s",
val_to_str(association_type, association_type_vals, "Unknown (%u)"));
proto_item_append_text(ti, "%s. ",
val_to_str(association_type, association_type_vals, "Unknown (%u)"));
@@ -4610,7 +4610,7 @@ dissect_rsvp_call_id (proto_tree *ti, proto_tree *rsvp_object_tree,
val_to_str(type, address_type_vals, "Unknown (%u)"));
proto_tree_add_text(rsvp_object_tree, tvb, offset2+1, 3, "Reserved: %u",
tvb_get_ntoh24(tvb, offset2+1));
- proto_item_append_text(ti, "Operator-Specific. Addr Type: %s. ",
+ proto_item_append_text(ti, "Operator-Specific. Addr Type: %s. ",
val_to_str(type, address_type_vals, "Unknown (%u)"));
}
else {
@@ -4620,14 +4620,14 @@ dissect_rsvp_call_id (proto_tree *ti, proto_tree *rsvp_object_tree,
"C-type: 2 (globally unique)");
proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1, "Address type: %s",
val_to_str(type, address_type_vals, "Unknown (%u)"));
- str = tvb_get_ephemeral_string (tvb, offset2 + 1, 3);
+ str = tvb_get_ephemeral_string (tvb, offset2 + 1, 3);
proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 1, 3,
- "International Segment: %s", str);
- proto_item_append_text(ti, "Globally-Unique. Addr Type: %s. Intl Segment: %s. ",
+ "International Segment: %s", str);
+ proto_item_append_text(ti, "Globally-Unique. Addr Type: %s. Intl Segment: %s. ",
val_to_str(type, address_type_vals, "Unknown (%u)"), str);
- str = tvb_get_ephemeral_string (tvb, offset2 + 4, 12);
+ str = tvb_get_ephemeral_string (tvb, offset2 + 4, 12);
proto_tree_add_text(rsvp_object_tree, tvb, offset2 + 4, 12,
- "National Segment: %s", str);
+ "National Segment: %s", str);
proto_item_append_text(ti, "Natl Segment: %s. ", str);
}
@@ -4638,29 +4638,29 @@ dissect_rsvp_call_id (proto_tree *ti, proto_tree *rsvp_object_tree,
ip_to_str(tvb_get_ptr(tvb, offset3, 4)));
proto_item_append_text(ti, "Src: %s. ", ip_to_str(tvb_get_ptr(tvb, offset3, 4)));
break;
-
+
case 2:
offset4 = offset3 + 16;
proto_tree_add_text(rsvp_object_tree, tvb, offset3, 16, "Source Transport Network addr: %s",
ip6_to_str((const struct e_in6_addr *) tvb_get_ptr(tvb, offset3, 16)));
- proto_item_append_text(ti, "Src: %s. ",
+ proto_item_append_text(ti, "Src: %s. ",
ip6_to_str((const struct e_in6_addr *) tvb_get_ptr(tvb, offset3, 16)));
break;
-
+
case 3:
offset4 = offset3 + 20;
proto_tree_add_text(rsvp_object_tree, tvb, offset3, 20, "Source Transport Network addr: %s",
tvb_bytes_to_str(tvb, offset3, 20));
proto_item_append_text(ti, "Src: %s. ", tvb_bytes_to_str(tvb, offset3, 20));
break;
-
+
case 4:
offset4 = offset3 + 6;
proto_tree_add_text(rsvp_object_tree, tvb, offset3, 6, "Source Transport Network addr: %s",
tvb_bytes_to_str(tvb, offset3, 6));
proto_item_append_text(ti, "Src: %s. ", tvb_bytes_to_str(tvb, offset3, 6));
break;
-
+
case 0x7F:
offset4 = offset3 + len;
proto_tree_add_text(rsvp_object_tree, tvb, offset3, len, "Source Transport Network addr: %s",
@@ -4706,10 +4706,10 @@ dissect_rsvp_restart_cap (proto_tree *ti, proto_tree *rsvp_object_tree,
proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
"C-type: 1");
proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
- "Restart Time: %d ms",
+ "Restart Time: %d ms",
tvb_get_ntohl(tvb, offset2));
proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 4,
- "Recovery Time: %d ms",
+ "Recovery Time: %d ms",
tvb_get_ntohl(tvb, offset2+4));
proto_item_append_text(ti, "Restart Time: %d ms. Recovery Time: %d ms.",
tvb_get_ntohl(tvb, offset2), tvb_get_ntohl(tvb, offset2+4));
@@ -4778,22 +4778,22 @@ dissect_rsvp_fast_reroute (proto_tree *ti, proto_tree *rsvp_object_tree,
case 1:
case 7:
if ((type==1 && obj_length!=24) || (type==7 && obj_length!=20)) {
- proto_tree_add_text(rsvp_object_tree, tvb, offset, obj_length,
+ proto_tree_add_text(rsvp_object_tree, tvb, offset, obj_length,
"<<<Invalid length: cannot decode>>>");
proto_item_append_text(ti, "Invalid length");
break;
}
proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
"C-type: %u", type);
- proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 1,
+ proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 1,
"Setup Priority: %d", tvb_get_guint8(tvb, offset+4));
- proto_tree_add_text(rsvp_object_tree, tvb, offset+5, 1,
+ proto_tree_add_text(rsvp_object_tree, tvb, offset+5, 1,
"Hold Priority: %d", tvb_get_guint8(tvb, offset+5));
- proto_tree_add_text(rsvp_object_tree, tvb, offset+6, 1,
+ proto_tree_add_text(rsvp_object_tree, tvb, offset+6, 1,
"Hop Limit: %d", tvb_get_guint8(tvb, offset+6));
flags = tvb_get_guint8(tvb, offset+7);
- ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset+7, 1,
+ ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset+7, 1,
"Flags: 0x%02x", flags);
rsvp_frr_flags_tree = proto_item_add_subtree(ti2,
TREE(TT_FAST_REROUTE_FLAGS));
@@ -4805,14 +4805,14 @@ dissect_rsvp_fast_reroute (proto_tree *ti, proto_tree *rsvp_object_tree,
decode_boolean_bitfield(flags, 0x02, 8,
"Facility Backup desired",
"Facility Backup not desired"));
- proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
+ proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
"Bandwidth: %.10g", tvb_get_ntohieee_float(tvb, offset+8));
- proto_tree_add_text(rsvp_object_tree, tvb, offset+12, 4,
+ proto_tree_add_text(rsvp_object_tree, tvb, offset+12, 4,
"Include-Any: 0x%0x", tvb_get_ntohl(tvb, offset+12));
- proto_tree_add_text(rsvp_object_tree, tvb, offset+16, 4,
+ proto_tree_add_text(rsvp_object_tree, tvb, offset+16, 4,
"Exclude-Any: 0x%0x", tvb_get_ntohl(tvb, offset+16));
if (type==1) {
- proto_tree_add_text(rsvp_object_tree, tvb, offset+20, 4,
+ proto_tree_add_text(rsvp_object_tree, tvb, offset+20, 4,
"Include-All: 0x%0x", tvb_get_ntohl(tvb, offset+20));
}
@@ -4852,19 +4852,19 @@ dissect_rsvp_detour (proto_tree *ti, proto_tree *rsvp_object_tree,
for (remaining_length = obj_length - 4, count = 1;
remaining_length > 0; remaining_length -= 8, count++) {
if (remaining_length < 8) {
- proto_tree_add_text(rsvp_object_tree, tvb, offset+remaining_length,
- obj_length-remaining_length,
+ proto_tree_add_text(rsvp_object_tree, tvb, offset+remaining_length,
+ obj_length-remaining_length,
"<<<Invalid length: cannot decode>>>");
proto_item_append_text(ti, "Invalid length");
break;
}
iter++;
proto_tree_add_text(rsvp_object_tree, tvb, offset+(4*iter), 4,
- "PLR ID %d: %s", count,
+ "PLR ID %d: %s", count,
ip_to_str(tvb_get_ptr(tvb, offset+(4*iter), 4)));
iter++;
proto_tree_add_text(rsvp_object_tree, tvb, offset+(4*iter), 4,
- "Avoid Node ID %d: %s", count,
+ "Avoid Node ID %d: %s", count,
ip_to_str(tvb_get_ptr(tvb, offset+(4*iter), 4)));
}
break;
@@ -4948,7 +4948,7 @@ dissect_rsvp_diffserv_aware_te(proto_tree *ti, proto_tree *rsvp_object_tree,
{
int offset2 = offset + 4;
guint8 ct = 0;
-
+
proto_tree_add_item_hidden(rsvp_object_tree,
rsvp_filter[RSVPF_DSTE],
tvb, offset, 8, FALSE);
@@ -4956,7 +4956,7 @@ dissect_rsvp_diffserv_aware_te(proto_tree *ti, proto_tree *rsvp_object_tree,
case 1:
ct = tvb_get_guint8(tvb, offset2+3);
proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1, "C-type: 1");
- proto_tree_add_item(rsvp_object_tree,
+ proto_tree_add_item(rsvp_object_tree,
rsvp_filter[RSVPF_DSTE_CLASSTYPE],
tvb, offset2+3, 1, FALSE);
proto_item_set_text(ti, "CLASSTYPE: CT %u", ct);
@@ -5002,7 +5002,7 @@ dissect_rsvp_msg_tree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
ti = proto_tree_add_item(tree, proto_rsvp, tvb, offset, msg_length,
FALSE);
rsvp_tree = proto_item_add_subtree(ti, tree_mode);
- if (pinfo->ipproto == IP_PROTO_RSVPE2EI)
+ if (pinfo->ipproto == IP_PROTO_RSVPE2EI)
proto_item_append_text(rsvp_tree, " (E2E-IGNORE)");
proto_item_append_text(rsvp_tree, ": ");
proto_item_append_text(rsvp_tree, val_to_str(message_type, message_type_vals,
@@ -5016,7 +5016,7 @@ dissect_rsvp_msg_tree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
ti = proto_tree_add_text(rsvp_tree, tvb, offset, 8, "RSVP Header. %s",
val_to_str(message_type, message_type_vals,
"Unknown Message (%u). "));
- if (pinfo->ipproto == IP_PROTO_RSVPE2EI)
+ if (pinfo->ipproto == IP_PROTO_RSVPE2EI)
proto_item_append_text(ti, " (E2E-IGNORE)");
rsvp_header_tree = proto_item_add_subtree(ti, TREE(TT_HDR));
@@ -5298,7 +5298,7 @@ dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
struct rsvp_request_val *request_val = NULL;
if (check_col(pinfo->cinfo, COL_PROTOCOL))
- col_set_str(pinfo->cinfo, COL_PROTOCOL,
+ col_set_str(pinfo->cinfo, COL_PROTOCOL,
(pinfo->ipproto == IP_PROTO_RSVPE2EI) ? "RSVP-E2EI" : "RSVP");
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
@@ -5308,6 +5308,7 @@ dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
msg_length = tvb_get_ntohs(tvb, 6);
rsvph = ep_alloc(sizeof(rsvp_conversation_info));
+ rsvph->session_type = 0;
/* Copy over the source and destination addresses from the pinfo strucutre */
SET_ADDRESS(&rsvph->source, pinfo->src.type, pinfo->src.len, pinfo->src.data);
@@ -5346,14 +5347,14 @@ dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Find out what conversation this packet is part of. */
conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport,
+ pinfo->ptype, pinfo->srcport,
pinfo->destport, 0);
if (conversation == NULL) {
/* Not part of any conversation; create a new one. */
- conversation =
- conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst,
- pinfo->ptype, pinfo->srcport,
+ conversation =
+ conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst,
+ pinfo->ptype, pinfo->srcport,
pinfo->destport, 0);
}
@@ -5363,7 +5364,7 @@ dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch (request_key.session_type) {
case RSVP_SESSION_TYPE_IPV4:
- SET_ADDRESS(&request_key.u.session_ipv4.destination,
+ SET_ADDRESS(&request_key.u.session_ipv4.destination,
rsvph->destination.type, rsvph->destination.len,
rsvph->destination.data);
request_key.u.session_ipv4.protocol = rsvph->protocol;
@@ -5375,7 +5376,7 @@ dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
case RSVP_SESSION_TYPE_IPV4_LSP:
- SET_ADDRESS(&request_key.u.session_ipv4_lsp.destination,
+ SET_ADDRESS(&request_key.u.session_ipv4_lsp.destination,
rsvph->destination.type, rsvph->destination.len,
rsvph->destination.data);
request_key.u.session_ipv4_lsp.udp_dest_port = rsvph->udp_dest_port;
@@ -5383,14 +5384,14 @@ dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
case RSVP_SESSION_TYPE_AGGREGATE_IPV4:
- SET_ADDRESS(&request_key.u.session_agg_ipv4.destination,
+ SET_ADDRESS(&request_key.u.session_agg_ipv4.destination,
rsvph->destination.type, rsvph->destination.len,
rsvph->destination.data);
request_key.u.session_agg_ipv4.dscp = rsvph->dscp;
break;
case RSVP_SESSION_TYPE_IPV4_UNI:
- SET_ADDRESS(&request_key.u.session_ipv4_uni.destination,
+ SET_ADDRESS(&request_key.u.session_ipv4_uni.destination,
rsvph->destination.type, rsvph->destination.len,
rsvph->destination.data);
request_key.u.session_ipv4_uni.udp_dest_port = rsvph->udp_dest_port;
@@ -5398,7 +5399,7 @@ dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
case RSVP_SESSION_TYPE_IPV4_E_NNI:
- SET_ADDRESS(&request_key.u.session_ipv4_enni.destination,
+ SET_ADDRESS(&request_key.u.session_ipv4_enni.destination,
rsvph->destination.type, rsvph->destination.len,
rsvph->destination.data);
request_key.u.session_ipv4_enni.udp_dest_port = rsvph->udp_dest_port;
@@ -5406,15 +5407,18 @@ dissect_rsvp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
default:
/* This should never happen. */
+ if (tree) {
+ proto_tree_add_text(tree, tvb, 0, 0, "Unknown session type");
+ }
break;
}
- SET_ADDRESS(&request_key.source_info.source,
+ SET_ADDRESS(&request_key.source_info.source,
rsvph->source.type, rsvph->source.len, rsvph->source.data);
request_key.source_info.udp_source_port = rsvph->udp_source_port;
/* See if a request with this key already exists */
- request_val =
+ request_val =
(struct rsvp_request_val *) g_hash_table_lookup(rsvp_request_hash,
&request_key);
@@ -5462,7 +5466,7 @@ proto_register_rsvp(void)
rsvp_dissector_table = register_dissector_table("rsvp.proto", "RSVP Protocol",
FT_UINT8, BASE_DEC);
-
+
/* Initialization routine for RSVP conversations */
register_init_routine(&rsvp_init_protocol);
}