aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2011-01-15 03:25:43 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2011-01-15 03:25:43 +0000
commite11921d1929f4f262d6319273a1fa5488c14ad71 (patch)
tree446025fc941c9045fa66dc95f5fcd7f492e0d093 /epan/dissectors
parent862e2d498cc7834f59e2e79bf0ad964a643aba9b (diff)
Replace ip_to_str((tvb_get_ptr(...)) with tvb_ip_to_str().
Replace ip6_to_str((tvb_get_ptr(...)) with tvb_ip6_to_str(). svn path=/trunk/; revision=35540
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-pcep.c250
-rw-r--r--epan/dissectors/packet-pim.c42
-rw-r--r--epan/dissectors/packet-ppp.c14
-rw-r--r--epan/dissectors/packet-rip.c2
-rw-r--r--epan/dissectors/packet-rsvp.c203
-rw-r--r--epan/dissectors/packet-slimp3.c16
-rw-r--r--epan/dissectors/packet-tapa.c4
-rw-r--r--epan/dissectors/packet-tpncp.c2
-rw-r--r--epan/dissectors/packet-xdmcp.c10
9 files changed, 269 insertions, 274 deletions
diff --git a/epan/dissectors/packet-pcep.c b/epan/dissectors/packet-pcep.c
index f7e992b736..5b4910f2b2 100644
--- a/epan/dissectors/packet-pcep.c
+++ b/epan/dissectors/packet-pcep.c
@@ -4,9 +4,9 @@
* draft-ietf-pce-pcep-xro-02
* See also RFC 4655 and RFC 4657
*
- * (c) Copyright 2007 Silvia Cristina Tejedor <silviacristina.tejedor@gmail.com>
+ * (c) Copyright 2007 Silvia Cristina Tejedor <silviacristina.tejedor@gmail.com>
*
- * $Id$
+ * $Id$
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
@@ -61,10 +61,10 @@
/*Subobjects of EXPLICIT ROUTE Object*/
#define PCEP_SUB_IPv4 1
-#define PCEP_SUB_IPv6 2
-#define PCEP_SUB_LABEL_CONTROL 3
+#define PCEP_SUB_IPv6 2
+#define PCEP_SUB_LABEL_CONTROL 3
#define PCEP_SUB_UNNUMB_INTERFACE_ID 4
-#define PCEP_SUB_SRLG 5
+#define PCEP_SUB_SRLG 5
#define PCEP_SUB_AUTONOMOUS_SYS_NUM 32
#define PCEP_SUB_EXRS 33
#define PCEP_SUB_AUTONOMOUS_SYS_NUM_XRO 4
@@ -93,21 +93,21 @@
#define PCEP_CONGESTION 2
/*Possible values of Notification Value for NT=1*/
-#define NOTI_PCC_CANCEL_REQ 1
+#define NOTI_PCC_CANCEL_REQ 1
#define NOTI_PCE_CANCEL_REQ 2
/*Possible values of Notification Value for NT=2*/
-#define NOTI_PCE_CONGEST 1
+#define NOTI_PCE_CONGEST 1
#define NOTI_PCE_NO_CONGEST 2
/*Possible types of errors */
#define ESTABLISH_FAILURE 1
#define CAP_NOT_SUPPORTED 2
-#define UNKNOWN_OBJ 3
+#define UNKNOWN_OBJ 3
#define NOT_SUPP_OBJ 4
#define POLICY_VIOLATION 5
-#define MANDATORY_OBJ_MIS 6
-#define SYNCH_PCREQ_MIS 7
+#define MANDATORY_OBJ_MIS 6
+#define SYNCH_PCREQ_MIS 7
#define UNKNOWN_REQ_REF 8
#define ATTEMPT_2_SESSION 9
#define UNRECO_IRO_SUBOBJ 11
@@ -117,9 +117,9 @@
#define RX_MALFORM_PKT 1
#define NO_OPEN_MSG 2
#define UNACEP_NO_NEGO_SSESION 3
-#define UNACEP_NEG_SESSION 4
+#define UNACEP_NEG_SESSION 4
#define TWO_OPEN_MSG_UNACEP 5
-#define RX_PCEPERR_UNACEP_SESSION 6
+#define RX_PCEPERR_UNACEP_SESSION 6
#define NO_KEEPALIVE_PCEPERR 7
/*Different values of errors type=3*/
@@ -142,7 +142,7 @@
/*Different values of Reason in the CLOSE object */
#define NO_EXP_PROV 1
#define DEADTIME_PROV 2
-#define RECEP_MALFORM_MSG 3
+#define RECEP_MALFORM_MSG 3
/*Different values of Attribute in the XRO object */
#define ATTR_INTERFACE 0
@@ -184,7 +184,7 @@
#define Mask_L 0x80
#define Mask_Type 0x7f
-#define TCP_PORT_PCEP 1010
+#define TCP_PORT_PCEP 1010
#define IPv4 1
#define IPv6 2
@@ -251,12 +251,12 @@ static gint ett_pcep_obj_unknown = -1;
typedef enum {
PCEP_MSG_NO_VALID,
PCEP_MSG_OPEN,
- PCEP_MSG_KEEPALIVE,
+ PCEP_MSG_KEEPALIVE,
PCEP_MSG_PATH_COMPUTATION_REQUEST,
- PCEP_MSG_PATH_COMPUTATION_REPLY,
- PCEP_MSG_NOTIFICATION,
- PCEP_MSG_ERROR,
- PCEP_MSG_CLOSE
+ PCEP_MSG_PATH_COMPUTATION_REPLY,
+ PCEP_MSG_NOTIFICATION,
+ PCEP_MSG_ERROR,
+ PCEP_MSG_CLOSE
} pcep_message_types;
static const value_string message_type_vals[] = {
@@ -265,7 +265,7 @@ static const value_string message_type_vals[] = {
{PCEP_MSG_PATH_COMPUTATION_REQUEST, "PATH COMPUTATION REQUEST MESSAGE" },
{PCEP_MSG_PATH_COMPUTATION_REPLY, "PATH COMPUTATION REPLY MESSAGE" },
{PCEP_MSG_NOTIFICATION, "NOTIFICATION MESSAGE" },
- {PCEP_MSG_ERROR, "ERROR MESSAGE" },
+ {PCEP_MSG_ERROR, "ERROR MESSAGE" },
{PCEP_MSG_CLOSE, "CLOSE MESSAGE" },
{0, NULL }
};
@@ -276,9 +276,9 @@ static const value_string pcep_class_vals[] = {
{PCEP_NO_PATH_OBJ, "NO-PATH OBJECT" },
{PCEP_END_POINT_OBJ, "END-POINT OBJECT" },
{PCEP_BANDWIDTH_OBJ, "BANDWIDTH OBJECT" },
- {PCEP_METRIC_OBJ, "METRIC OBJECT" },
- {PCEP_EXPLICIT_ROUTE_OBJ, "EXPLICIT ROUTE OBJECT (ERO)" },
- {PCEP_RECORD_ROUTE_OBJ, "RECORD ROUTE OBJECT (RRO)" },
+ {PCEP_METRIC_OBJ, "METRIC OBJECT" },
+ {PCEP_EXPLICIT_ROUTE_OBJ, "EXPLICIT ROUTE OBJECT (ERO)" },
+ {PCEP_RECORD_ROUTE_OBJ, "RECORD ROUTE OBJECT (RRO)" },
{PCEP_LSPA_OBJ, "LSPA OBJECT" },
{PCEP_IRO_OBJ, "IRO OBJECT" },
{PCEP_SVEC_OBJ, "SVEC OBJECT" },
@@ -305,36 +305,36 @@ static const value_string pcep_subobj_vals[] = {
static const value_string pcep_subobj_xro_vals[] = {
{PCEP_SUB_IPv4, "SUBOBJECT IPv4" },
{PCEP_SUB_IPv6, "SUBOBJECT IPv6" },
- {PCEP_SUB_UNNUMB_INTERFACE_ID_XRO,"SUBOBJECT UNNUMBERED INTERFACE-ID" },
+ {PCEP_SUB_UNNUMB_INTERFACE_ID_XRO,"SUBOBJECT UNNUMBERED INTERFACE-ID" },
{PCEP_SUB_AUTONOMOUS_SYS_NUM_XRO,"SUBOBJECT AUTONOMOUS SYSTEM NUMBER" },
{PCEP_SUB_SRLG, "SUBOBJECT SRLG" },
{0, NULL }
};
-/*In the NO-PATH Object the two different possibilities that NI can have*/
+/*In the NO-PATH Object the two different possibilities that NI can have*/
static const value_string pcep_no_path_obj_vals[] = {
{NO_SATISFYING, "Nature of Issue: No path satisfying the set of constraints could be found (0x0)" },
{CHAIN_BROKEN, "Nature of Issue: PCEP Chain Broken (0x1)" },
{0, NULL }
};
-/*Different values of "Type (T)" in the METRIC Obj */
+/*Different values of "Type (T)" in the METRIC Obj */
static const value_string pcep_metric_obj_vals[] = {
{NO_DEFINED, "Type not defined" },
{IGP_METRIC, "Type: IGP Metric (T=1)" },
{TE_METRIC, "Type: TE Metric (T=2)" },
- {HOP_COUNTS, "Type: Hop Counts (T=3)" },
+ {HOP_COUNTS, "Type: Hop Counts (T=3)" },
{0, NULL }
};
-/*Different values for (L) in the ERO and IRO Objs */
+/*Different values for (L) in the ERO and IRO Objs */
static const value_string pcep_route_l_obj_vals[] = {
{STRICT_HOP, "L=0 Strict Hop in the Explicit Route" },
{LOOSE_HOP, "L=1 Loose Hop in the Explicit Route" },
{0, NULL }
};
-/*Different values of the direction of the label (U) in the ERO and RRO Objs */
+/*Different values of the direction of the label (U) in the ERO and RRO Objs */
static const value_string pcep_route_u_obj_vals[] = {
{DOWNSTREAM_LABEL, "U=0 S Downstream Label" },
{UPSTREAM_LABEL, "U=1 Upstream Label" },
@@ -405,7 +405,7 @@ enum pcep_filter_keys{
PCEPF_PATH_COMPUTATION_REPLY,
PCEPF_NOTIFICATION,
PCEPF_ERROR,
- PCEPF_CLOSE,
+ PCEPF_CLOSE,
PCEPF_OBJECT_CLASS,
PCEPF_OBJ_OPEN,
@@ -462,12 +462,12 @@ static gint *ett[] = {
&ett_pcep_obj_notification,
&ett_pcep_obj_error,
&ett_pcep_obj_load_balancing,
- &ett_pcep_obj_close,
+ &ett_pcep_obj_close,
&ett_pcep_obj_xro,
&ett_pcep_obj_unknown
};
-/*Registering data structures*/
+/*Registering data structures*/
static int pcep_filter[PCEPF_MAX];
@@ -493,13 +493,13 @@ dissect_pcep_tlvs(proto_tree *pcep_obj, tvbuff_t *tvb, int offset, gint length,
tlv = proto_item_add_subtree(ti, ett_pcep_obj);
proto_tree_add_text(tlv, tvb, offset + j, 2, "Type: %u", tlv_type);
proto_tree_add_text(tlv, tvb, offset + 2 + j, 2, "Length: %u", tlv_length);
- proto_tree_add_text(tlv, tvb, offset+4+j, tlv_length, "Data: %s",
+ proto_tree_add_text(tlv, tvb, offset+4+j, tlv_length, "Data: %s",
bytestring_to_str(tvb_get_ptr(tvb, (offset) + 4 + j, tlv_length), tlv_length, ' '));
padding = (4 - (tlv_length % 4)) % 4;
if (padding != 0){
- proto_tree_add_text(tlv, tvb, offset+4+j+tlv_length, padding, "Padding: %s",
+ proto_tree_add_text(tlv, tvb, offset+4+j+tlv_length, padding, "Padding: %s",
bytestring_to_str(tvb_get_ptr(tvb, (offset) + 4 + j + tlv_length, padding), padding, ' '));
- }
+ }
}
}
@@ -535,7 +535,7 @@ dissect_subobj_ipv4(proto_tree *pcep_subobj_tree, tvbuff_t *tvb, int offset, int
proto_tree_add_text(pcep_subobj_ipv4, tvb, offset, 1, "%s",val_to_str(l, pcep_route_l_obj_vals, "Unknown Object (%u). "));
proto_tree_add_uint(pcep_subobj_ipv4, pcep_filter[PCEPF_SUBOBJ], tvb, offset, 1, (l_and_or_type & 0x7f));
proto_tree_add_text(pcep_subobj_ipv4, tvb, offset+1, 1, "Length: %u", length);
- proto_tree_add_text(pcep_subobj_ipv4, tvb, offset+2, 4, "IPv4 Address: (%s)", ip_to_str(tvb_get_ptr(tvb, offset+2, 4)));
+ proto_tree_add_text(pcep_subobj_ipv4, tvb, offset+2, 4, "IPv4 Address: (%s)", tvb_ip_to_str(tvb, offset+2));
proto_tree_add_text(pcep_subobj_ipv4, tvb, offset+6, 1, "Prefix Length: %u", prefix_length);
proto_tree_add_text(pcep_subobj_ipv4, tvb, offset+7, 1, "Padding: 0x%02x", resvd);
break;
@@ -543,7 +543,7 @@ dissect_subobj_ipv4(proto_tree *pcep_subobj_tree, tvbuff_t *tvb, int offset, int
case PCEP_RECORD_ROUTE_OBJ:
proto_tree_add_uint(pcep_subobj_ipv4, pcep_filter[PCEPF_SUBOBJ], tvb, offset, 1, l_and_or_type);
proto_tree_add_text(pcep_subobj_ipv4, tvb, offset+1, 1, "Length: %u", length);
- proto_tree_add_text(pcep_subobj_ipv4, tvb, offset+2, 4, "IPv4 Address: (%s)", ip_to_str(tvb_get_ptr(tvb, offset+2, 4)));
+ proto_tree_add_text(pcep_subobj_ipv4, tvb, offset+2, 4, "IPv4 Address: (%s)", tvb_ip_to_str(tvb, offset+2));
proto_tree_add_text(pcep_subobj_ipv4, tvb, offset+6, 1, "Prefix Length: %u", prefix_length);
ti = proto_tree_add_text(pcep_subobj_ipv4, tvb, offset+7, 1, "Flags: 0x%02x ", resvd);
pcep_subobj_ipv4_flags = proto_item_add_subtree(ti, ett_pcep_obj);
@@ -555,7 +555,7 @@ dissect_subobj_ipv4(proto_tree *pcep_subobj_tree, tvbuff_t *tvb, int offset, int
proto_tree_add_text(pcep_subobj_ipv4, tvb, offset, 1, "l: %x", (l_and_or_type & 0x80)>>7);
proto_tree_add_uint(pcep_subobj_ipv4, pcep_filter[PCEPF_SUBOBJ], tvb, offset, 1, (l_and_or_type & 0x7f));
proto_tree_add_text(pcep_subobj_ipv4, tvb, offset+1, 1, "Length: %u", length);
- proto_tree_add_text(pcep_subobj_ipv4, tvb, offset+2, 4, "IPv4 Address: (%s)", ip_to_str(tvb_get_ptr(tvb, offset+2, 4)));
+ proto_tree_add_text(pcep_subobj_ipv4, tvb, offset+2, 4, "IPv4 Address: (%s)", tvb_ip_to_str(tvb, offset+2));
proto_tree_add_text(pcep_subobj_ipv4, tvb, offset+6, 1, "Prefix Length: %u", prefix_length);
proto_tree_add_text(pcep_subobj_ipv4, tvb, offset+7, 1, "Padding: 0x%02x", resvd);
break;
@@ -565,7 +565,7 @@ dissect_subobj_ipv4(proto_tree *pcep_subobj_tree, tvbuff_t *tvb, int offset, int
proto_tree_add_uint(pcep_subobj_ipv4, pcep_filter[PCEPF_SUBOBJ_XRO], tvb, offset, 1, (l_and_or_type & 0x7f));
proto_tree_add_text(pcep_subobj_ipv4, tvb, offset, 1, "Type: %u", (l_and_or_type & 0x7f));
proto_tree_add_text(pcep_subobj_ipv4, tvb, offset+1, 1, "Length: %u", length);
- proto_tree_add_text(pcep_subobj_ipv4, tvb, offset+2, 4, "IPv4 Address: (%s)", ip_to_str(tvb_get_ptr(tvb, offset+2, 4)));
+ proto_tree_add_text(pcep_subobj_ipv4, tvb, offset+2, 4, "IPv4 Address: (%s)", tvb_ip_to_str(tvb, offset+2));
proto_tree_add_text(pcep_subobj_ipv4, tvb, offset+6, 1, "Prefix Length: %u", prefix_length);
proto_tree_add_text(pcep_subobj_ipv4, tvb, offset+7, 1, "%s",val_to_str(resvd, pcep_xro_attribute_obj_vals, "Unknown Attribute (%u). "));
break;
@@ -603,7 +603,7 @@ dissect_subobj_ipv6(proto_tree *pcep_subobj_tree, tvbuff_t *tvb, int offset, int
proto_tree_add_text(pcep_subobj_ipv6, tvb, offset, 1, "%s",val_to_str(l, pcep_route_l_obj_vals, "Unknown Object (%u). "));
proto_tree_add_uint(pcep_subobj_ipv6, pcep_filter[PCEPF_SUBOBJ], tvb, offset, 1, (l_and_or_type & 0x7f));
proto_tree_add_text(pcep_subobj_ipv6, tvb, offset+1, 1, "Length: %u", length);
- proto_tree_add_text(pcep_subobj_ipv6, tvb, offset+2, 16, "IPv6 Address: %s", ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset+2, 16)));
+ proto_tree_add_text(pcep_subobj_ipv6, tvb, offset+2, 16, "IPv6 Address: %s", tvb_ip6_to_str(tvb, offset+2));
proto_tree_add_text(pcep_subobj_ipv6, tvb, offset+18, 1, "Prefix Length: %u", prefix_length);
proto_tree_add_text(pcep_subobj_ipv6, tvb, offset+19, 1, "Padding: 0x%02x", resv);
break;
@@ -611,7 +611,7 @@ dissect_subobj_ipv6(proto_tree *pcep_subobj_tree, tvbuff_t *tvb, int offset, int
case PCEP_RECORD_ROUTE_OBJ:
proto_tree_add_uint(pcep_subobj_ipv6, pcep_filter[PCEPF_SUBOBJ], tvb, offset, 1, l_and_or_type);
proto_tree_add_text(pcep_subobj_ipv6, tvb, offset+1, 1, "Length: %u", length);
- proto_tree_add_text(pcep_subobj_ipv6, tvb, offset+2, 16, "IPv6 Address: %s", ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset+2, 16)));
+ proto_tree_add_text(pcep_subobj_ipv6, tvb, offset+2, 16, "IPv6 Address: %s", tvb_ip6_to_str(tvb, offset+2));
proto_tree_add_text(pcep_subobj_ipv6, tvb, offset+18, 1, "Prefix Length: %u", prefix_length);
ti = proto_tree_add_text(pcep_subobj_ipv6, tvb, offset+19, 1, "Flags: 0x%02x ", resv);
pcep_subobj_ipv6_flags = proto_item_add_subtree(ti, ett_pcep_obj);
@@ -623,7 +623,7 @@ dissect_subobj_ipv6(proto_tree *pcep_subobj_tree, tvbuff_t *tvb, int offset, int
proto_tree_add_text(pcep_subobj_ipv6, tvb, offset, 1, "l: %x", (l_and_or_type & 0x80)>>7);
proto_tree_add_uint(pcep_subobj_ipv6, pcep_filter[PCEPF_SUBOBJ], tvb, offset, 1, (l_and_or_type & 0x7f));
proto_tree_add_text(pcep_subobj_ipv6, tvb, offset+1, 1, "Length: %u", length);
- proto_tree_add_text(pcep_subobj_ipv6, tvb, offset+2, 16, "IPv6 Address: %s", ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset+2, 16)));
+ proto_tree_add_text(pcep_subobj_ipv6, tvb, offset+2, 16, "IPv6 Address: %s", tvb_ip6_to_str(tvb, offset+2));
proto_tree_add_text(pcep_subobj_ipv6, tvb, offset+18, 1, "Prefix Length: %u", prefix_length);
proto_tree_add_text(pcep_subobj_ipv6, tvb, offset+19, 1, "Padding: 0x%02x", resv);
break;
@@ -632,7 +632,7 @@ dissect_subobj_ipv6(proto_tree *pcep_subobj_tree, tvbuff_t *tvb, int offset, int
proto_tree_add_text(pcep_subobj_ipv6, tvb, offset, 1, "X: %x", (l_and_or_type & 0x01)>>7);
proto_tree_add_uint(pcep_subobj_ipv6, pcep_filter[PCEPF_SUBOBJ_XRO], tvb, offset, 1, (l_and_or_type & 0x7f));
proto_tree_add_text(pcep_subobj_ipv6, tvb, offset+1, 1, "Length: %u", length);
- proto_tree_add_text(pcep_subobj_ipv6, tvb, offset+2, 16, "IPv6 Address: %s", ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset+2, 16)));
+ proto_tree_add_text(pcep_subobj_ipv6, tvb, offset+2, 16, "IPv6 Address: %s", tvb_ip6_to_str(tvb, offset+2));
proto_tree_add_text(pcep_subobj_ipv6, tvb, offset+18, 1, "Prefix Length: %u", prefix_length);
proto_tree_add_text(pcep_subobj_ipv6, tvb, offset+19, 1, "%s", val_to_str(resv, pcep_xro_attribute_obj_vals, "Unknown Attribute (%u). "));
break;
@@ -640,7 +640,7 @@ dissect_subobj_ipv6(proto_tree *pcep_subobj_tree, tvbuff_t *tvb, int offset, int
default:
proto_tree_add_text(pcep_subobj_ipv6, tvb, offset, 20, "Non defined subobject for this object");
break;
- }
+ }
}
@@ -678,11 +678,11 @@ dissect_subobj_label_control(proto_tree *pcep_subobj_tree, tvbuff_t *tvb, int
proto_tree_add_text(pcep_subobj_label_control, tvb, offset+2, 1, "%s", val_to_str(u, pcep_route_u_obj_vals, "Unknown Object (%u). "));
proto_tree_add_text(pcep_subobj_label_control, tvb, offset+2, 1, "Reserved: %u", (u_reserved & 0x7f));
proto_tree_add_text(pcep_subobj_label_control, tvb, offset+3, 1, "C-Type: %u", c_type);
- proto_tree_add_text(pcep_subobj_label_control, tvb, offset+4, length-4, "Label: %s",
+ proto_tree_add_text(pcep_subobj_label_control, tvb, offset+4, length-4, "Label: %s",
bytestring_to_str(tvb_get_ptr(tvb, offset+4, length-4), length-4, ' '));
break;
- case PCEP_RECORD_ROUTE_OBJ:
+ case PCEP_RECORD_ROUTE_OBJ:
proto_tree_add_uint(pcep_subobj_label_control, pcep_filter[PCEPF_SUBOBJ], tvb, offset, 1, l_and_or_type);
proto_tree_add_text(pcep_subobj_label_control, tvb, offset+1, 1, "Length: %u", length);
u = (u_reserved & 0x80)>>7;
@@ -692,14 +692,14 @@ dissect_subobj_label_control(proto_tree *pcep_subobj_tree, tvbuff_t *tvb, int
pcep_subobj_label_flags = proto_item_add_subtree(ti, ett_pcep_obj);
proto_tree_add_boolean(pcep_subobj_label_flags, pcep_subobj_label_flags_gl, tvb, offset+2, 1, (u_reserved & 0x7f));
proto_tree_add_text(pcep_subobj_label_control, tvb, offset+3, 1, "C-Type: %u", c_type);
- proto_tree_add_text(pcep_subobj_label_control, tvb, offset+4, length-4, "Label: %s",
+ proto_tree_add_text(pcep_subobj_label_control, tvb, offset+4, length-4, "Label: %s",
bytestring_to_str(tvb_get_ptr(tvb, offset+4, length-4), length-4, ' '));
break;
default:
proto_tree_add_text(pcep_subobj_label_control, tvb, offset, length, "Non defined subobject for this object");
break;
- }
+ }
}
static void
@@ -765,7 +765,7 @@ dissect_subobj_unnumb_interfaceID(proto_tree *pcep_subobj_tree, tvbuff_t *tvb, i
default:
proto_tree_add_text(pcep_subobj_unnumb_interfaceID, tvb, offset, 12, "Non defined subobject for this object");
break;
- }
+ }
proto_tree_add_text(pcep_subobj_unnumb_interfaceID, tvb, offset+4, 4, "Router ID: 0x%08x", router_ID);
proto_tree_add_text(pcep_subobj_unnumb_interfaceID, tvb, offset+8, 4, "Interface ID: 0x%08x", interface_ID);
@@ -784,7 +784,7 @@ dissect_subobj_autonomous_sys_num(proto_tree *pcep_subobj_tree, tvbuff_t *tvb, i
int l;
l = (l_and_or_type& Mask_L)>>7;
- if(obj_class == PCEP_XRO_OBJ){
+ if(obj_class == PCEP_XRO_OBJ){
reserved = tvb_get_guint8(tvb, offset+2);
attribute = tvb_get_guint8(tvb, offset+3);
op_AS_nu_high_oct = tvb_get_ntohs(tvb, offset+4);
@@ -820,7 +820,7 @@ dissect_subobj_autonomous_sys_num(proto_tree *pcep_subobj_tree, tvbuff_t *tvb, i
if(obj_class == PCEP_IRO_OBJ)
proto_tree_add_text(pcep_subobj_autonomous_sys_num, tvb, offset, 1, "l: %x", (l_and_or_type & 0x80)>>7);
- else
+ else
proto_tree_add_text(pcep_subobj_autonomous_sys_num, tvb, offset, 1, "%s", val_to_str(l, pcep_route_l_obj_vals, "Unknown Object (%u). "));
proto_tree_add_uint(pcep_subobj_autonomous_sys_num, pcep_filter[PCEPF_SUBOBJ], tvb, offset, 1, (l_and_or_type & 0x7f));
proto_tree_add_text(pcep_subobj_autonomous_sys_num, tvb, offset+1, 1, "Length: %u", length);
@@ -983,10 +983,10 @@ dissect_pcep_open_obj (proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2,
*------------------------------------------------------------------------------*/
#define RP_OBJ_MIN_LEN 8
-static void
+static void
dissect_pcep_rp_obj(proto_tree *pcep_object_tree,
tvbuff_t *tvb, int offset2, int obj_length)
-{
+{
proto_tree *pcep_rp_obj_flags;
proto_item *ti;
guint8 reserved;
@@ -1027,10 +1027,10 @@ dissect_pcep_rp_obj(proto_tree *pcep_object_tree,
*------------------------------------------------------------------------------*/
#define NO_PATH_OBJ_MIN_LEN 4
-static void
+static void
dissect_pcep_no_path_obj(proto_tree *pcep_object_tree,
tvbuff_t *tvb, int offset2, int obj_length)
-{
+{
proto_tree *pcep_no_path_obj_flags;
proto_item *ti;
guint8 ni;
@@ -1067,13 +1067,13 @@ dissect_pcep_no_path_obj(proto_tree *pcep_object_tree,
#define END_POINT_IPV4_OBJ_LEN 8
#define END_POINT_IPV6_OBJ_LEN 32
-static void
+static void
dissect_pcep_end_point_obj(proto_tree *pcep_object_tree,
tvbuff_t *tvb, int offset2, int obj_length, int type)
{
switch(type)
{
- case IPv4:
+ case IPv4:
if (obj_length != OBJ_HDR_LEN+END_POINT_IPV4_OBJ_LEN) {
proto_tree_add_text(pcep_object_tree, tvb, offset2, obj_length,
"Bad IPv4 END-POINTS object length %u, should be %u", obj_length,
@@ -1081,8 +1081,8 @@ dissect_pcep_end_point_obj(proto_tree *pcep_object_tree,
return;
}
- proto_tree_add_text(pcep_object_tree, tvb, offset2, 4, "Source IPv4 Address: (%s)", ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
- proto_tree_add_text(pcep_object_tree, tvb, offset2+4, 4, "Destination IPv4 Address: (%s)", ip_to_str(tvb_get_ptr(tvb, offset2+4, 4)));
+ proto_tree_add_text(pcep_object_tree, tvb, offset2, 4, "Source IPv4 Address: (%s)", tvb_ip_to_str(tvb, offset2));
+ proto_tree_add_text(pcep_object_tree, tvb, offset2+4, 4, "Destination IPv4 Address: (%s)", tvb_ip_to_str(tvb, offset2+4));
break;
case IPv6:
@@ -1094,15 +1094,15 @@ dissect_pcep_end_point_obj(proto_tree *pcep_object_tree,
}
proto_tree_add_text(pcep_object_tree, tvb, offset2, 16, "Source IPv6 Address: %s",
- ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2, 16)));
+ tvb_ip6_to_str(tvb, offset2));
proto_tree_add_text(pcep_object_tree, tvb, offset2+16, 16, "Destination IPv6 Address: %s",
- ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2+16, 16)));
+ tvb_ip6_to_str(tvb, offset2+16));
break;
default:
proto_tree_add_text(pcep_object_tree, tvb, offset2, obj_length-OBJ_HDR_LEN, "UNKNOWN Type Object (%u)", type);
break;
- }
+ }
}
@@ -1112,9 +1112,9 @@ dissect_pcep_end_point_obj(proto_tree *pcep_object_tree,
*------------------------------------------------------------------------------*/
#define BANDWIDTH_OBJ_LEN 4
-static void
+static void
dissect_pcep_bandwidth_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2, int obj_length)
-{
+{
guint32 bandwidth;
if (obj_length != OBJ_HDR_LEN+BANDWIDTH_OBJ_LEN) {
@@ -1123,7 +1123,7 @@ dissect_pcep_bandwidth_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offs
OBJ_HDR_LEN+BANDWIDTH_OBJ_LEN);
return;
}
-
+
bandwidth = tvb_get_ntohl(tvb, offset2);
proto_tree_add_text(pcep_object_tree, tvb, offset2, 4, "Bandwidth: 0x%x", bandwidth);
}
@@ -1133,10 +1133,10 @@ dissect_pcep_bandwidth_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offs
*------------------------------------------------------------------------------*/
#define METRIC_OBJ_LEN 8
-static void
+static void
dissect_pcep_metric_obj(proto_tree *pcep_object_tree,
tvbuff_t *tvb, int offset2, int obj_length)
-{
+{
proto_tree *pcep_metric_obj_flags;
proto_item *ti;
guint16 reserved;
@@ -1170,7 +1170,7 @@ dissect_pcep_metric_obj(proto_tree *pcep_object_tree,
/*------------------------------------------------------------------------------
* EXPLICIT ROUTE OBJECT (ERO)
*------------------------------------------------------------------------------*/
-static void
+static void
dissect_pcep_explicit_route_obj(proto_tree *pcep_object_tree,
tvbuff_t *tvb, int offset2, int obj_length, int obj_class)
{
@@ -1226,16 +1226,16 @@ dissect_pcep_explicit_route_obj(proto_tree *pcep_object_tree,
default:
proto_tree_add_text(pcep_object_tree, tvb, offset2, length, "Non defined subobject (%d)", type_exp_route);
break;
- }
+ }
offset2 += length;
body_obj_len -= length;
- }
+ }
}
/*------------------------------------------------------------------------------
* RECORD ROUTE OBJECT (RRO)
*------------------------------------------------------------------------------*/
-static void
+static void
dissect_pcep_record_route_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2, int obj_length, int obj_class)
{
guint8 type;
@@ -1288,7 +1288,7 @@ dissect_pcep_record_route_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int o
}
offset2 += length;
body_obj_len -= length;
- }
+ }
}
/*------------------------------------------------------------------------------
@@ -1296,9 +1296,9 @@ dissect_pcep_record_route_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int o
*------------------------------------------------------------------------------*/
#define LSPA_OBJ_MIN_LEN 16
-static void
+static void
dissect_pcep_lspa_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2, int obj_length)
-{
+{
proto_tree *pcep_lspa_obj_flags;
proto_item *ti;
guint32 exclude_any;
@@ -1348,10 +1348,10 @@ dissect_pcep_lspa_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2,
/*------------------------------------------------------------------------------
* INCLUDE ROUTE OBJECT (IRO)
*------------------------------------------------------------------------------*/
-static void
+static void
dissect_pcep_iro_obj(proto_tree *pcep_object_tree,
tvbuff_t *tvb, int offset2, int obj_length, int obj_class)
-{
+{
guint8 l_type;
guint8 length;
int type_iro;
@@ -1405,18 +1405,18 @@ dissect_pcep_iro_obj(proto_tree *pcep_object_tree,
default:
proto_tree_add_text(pcep_object_tree, tvb, offset2, length, "Non defined subobject (%d)", type_iro);
break;
- }
+ }
offset2 += length;
body_obj_len -= length;
}
}
/*------------------------------------------------------------------------------
- * SVEC OBJECT
+ * SVEC OBJECT
*------------------------------------------------------------------------------*/
#define SVEC_OBJ_MIN_LEN 4
-static void
+static void
dissect_pcep_svec_obj(proto_tree *pcep_object_tree,
tvbuff_t *tvb, int offset2, int obj_length)
{
@@ -1452,13 +1452,13 @@ dissect_pcep_svec_obj(proto_tree *pcep_object_tree,
}
/*------------------------------------------------------------------------------
- * NOTIFICATION OBJECT
- *------------------------------------------------------------------------------*/
+ * NOTIFICATION OBJECT
+ *------------------------------------------------------------------------------*/
#define NOTIFICATION_OBJ_MIN_LEN 4
-static void
+static void
dissect_pcep_notification_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2, int obj_length)
-{
+{
guint8 reserved;
guint8 flags;
guint8 nt;
@@ -1486,7 +1486,7 @@ dissect_pcep_notification_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int o
proto_tree_add_uint(pcep_object_tree, pcep_filter[PCEPF_NOTI_VAL1], tvb, offset2+2, 1, nt);
break;
- case 2:
+ case 2:
proto_tree_add_uint(pcep_object_tree, pcep_filter[PCEPF_NOTI_VAL2], tvb, offset2+2, 1, nt);
break;
@@ -1505,13 +1505,13 @@ dissect_pcep_notification_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int o
}
/*------------------------------------------------------------------------------
- * ERROR OBJECT
- *------------------------------------------------------------------------------*/
+ * ERROR OBJECT
+ *------------------------------------------------------------------------------*/
#define ERROR_OBJ_MIN_LEN 4
-static void
+static void
dissect_pcep_error_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2, int obj_length)
-{
+{
proto_tree *pcep_error_types_obj;
proto_item *ti;
guint8 reserved;
@@ -1537,7 +1537,7 @@ dissect_pcep_error_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2,
pcep_error_types_obj = proto_item_add_subtree(ti, ett_pcep_obj_error);
error_value = tvb_get_guint8(tvb, offset2+3);
- switch(error_type){
+ switch(error_type){
case ESTABLISH_FAILURE:
switch(error_value){
case RX_MALFORM_PKT:
@@ -1582,7 +1582,7 @@ dissect_pcep_error_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2,
default:
proto_tree_add_text(pcep_error_types_obj, tvb, offset2+3, 1,
"Error-value: %u Non defined Error-Value", error_value);
- }
+ }
break;
case NOT_SUPP_OBJ:
switch(error_value){
@@ -1610,7 +1610,7 @@ dissect_pcep_error_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2,
"Error-value: %u Non defined Error-Value", error_value);
}
break;
- case MANDATORY_OBJ_MIS:
+ case MANDATORY_OBJ_MIS:
switch(error_value){
case RP_OBJ_MISS:
proto_tree_add_text(pcep_error_types_obj, tvb, offset2+3, 1, "Error-value: %u RP Object missing", error_value);
@@ -1621,7 +1621,7 @@ dissect_pcep_error_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2,
case END_POINT_OBJ_MISS:
proto_tree_add_text(pcep_error_types_obj, tvb, offset2+3, 1, "Error-value: %u END-POINTS Objects missing", error_value);
break;
- default:
+ default:
proto_tree_add_text(pcep_error_types_obj, tvb, offset2+3, 1,
"Error-value: %u Non defined Error-Value", error_value);
}
@@ -1629,7 +1629,7 @@ dissect_pcep_error_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2,
case SYNCH_PCREQ_MIS:
proto_tree_add_text(pcep_error_types_obj, tvb, offset2+3, 1, "Error-Value: %u ", error_value);
break;
- case UNKNOWN_REQ_REF:
+ case UNKNOWN_REQ_REF:
proto_tree_add_text(pcep_error_types_obj, tvb, offset2+3, 1, "Error-Value: %u ", error_value);
break;
case ATTEMPT_2_SESSION:
@@ -1654,13 +1654,13 @@ dissect_pcep_error_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2,
/*------------------------------------------------------------------------------
- * LOAD-BALANCING OBJECT
- *------------------------------------------------------------------------------*/
+ * LOAD-BALANCING OBJECT
+ *------------------------------------------------------------------------------*/
#define LOAD_BALANCING_OBJ_LEN 8
-static void
+static void
dissect_pcep_balancing_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2, int obj_length)
-{
+{
guint16 reserved;
guint8 flags;
guint8 max_LSP;
@@ -1687,11 +1687,11 @@ dissect_pcep_balancing_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offs
}
/*------------------------------------------------------------------------------
- * CLOSE OBJECT
- *------------------------------------------------------------------------------*/
+ * CLOSE OBJECT
+ *------------------------------------------------------------------------------*/
#define CLOSE_OBJ_MIN_LEN 4
-static void
+static void
dissect_pcep_close_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2, int obj_length)
{
guint16 reserved;
@@ -1721,11 +1721,11 @@ dissect_pcep_close_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2,
}
/*------------------------------------------------------------------------------
- * XRO OBJECT
- *------------------------------------------------------------------------------*/
+ * XRO OBJECT
+ *------------------------------------------------------------------------------*/
#define XRO_OBJ_MIN_LEN 4
-static void
+static void
dissect_pcep_xro_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2, int obj_length, int obj_class)
{
proto_tree *pcep_xro_flags_obj;
@@ -1808,12 +1808,12 @@ dissect_pcep_xro_obj(proto_tree *pcep_object_tree, tvbuff_t *tvb, int offset2, i
}
}
-/*------------------------------------------------------------------------------*/
+/*------------------------------------------------------------------------------*/
/* Dissect in Objects */
/*------------------------------------------------------------------------------*/
static void
-dissect_pcep_obj_tree(proto_tree *pcep_tree, tvbuff_t *tvb, int len, int offset, int msg_length)
-{
+dissect_pcep_obj_tree(proto_tree *pcep_tree, tvbuff_t *tvb, int len, int offset, int msg_length)
+{
guint8 obj_class;
guint8 ot_res_p_i;
guint16 obj_length;
@@ -2006,7 +2006,7 @@ dissect_pcep_obj_tree(proto_tree *pcep_tree, tvbuff_t *tvb, int len, int offset,
offset += obj_length;
len += obj_length;
- }
+ }
}
@@ -2120,7 +2120,7 @@ proto_register_pcep(void){
NULL, HFILL }},
{&pcep_hdr_msg_flags_reserved,
{ "Reserved Flags", "pcep.hdr.msg.flags.reserved", FT_BOOLEAN, 8, TFS(&tfs_set_notset), PCEP_HDR_MSG_RESERVED,
- NULL, HFILL }},
+ NULL, HFILL }},
{&pcep_filter[PCEPF_OPEN],
{ "Open Message", "pcep.msg.open", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
@@ -2141,7 +2141,7 @@ proto_register_pcep(void){
NULL, HFILL }},
{&pcep_filter[PCEPF_CLOSE],
{ "Close Message", "pcep.msg.close", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ NULL, HFILL }},
/*Object header*/
{&pcep_hdr_obj_flags_reserved,
@@ -2152,7 +2152,7 @@ proto_register_pcep(void){
NULL, HFILL }},
{&pcep_hdr_obj_flags_i,
{ "Ignore (I)", "pcep.hdr.obj.flags.i", FT_BOOLEAN, 4, TFS(&tfs_set_notset), PCEP_HDR_OBJ_I,
- NULL, HFILL }},
+ NULL, HFILL }},
/* Object class */
{&pcep_filter[PCEPF_OBJECT_CLASS],
{ "Object Class", "pcep.object", FT_UINT32, BASE_DEC, VALS(pcep_class_vals), 0x0,
@@ -2191,7 +2191,7 @@ proto_register_pcep(void){
NULL, HFILL }},
{&pcep_filter[PCEPF_OBJ_END_POINT],
{ "END-POINT object", "pcep.obj.endpoint", FT_NONE, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ NULL, HFILL }},
{&pcep_filter[PCEPF_OBJ_BANDWIDTH],
{ "BANDWIDTH object", "pcep.obj.bandwidth", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
@@ -2209,19 +2209,19 @@ proto_register_pcep(void){
NULL, HFILL }},
{&pcep_filter[PCEPF_OBJ_RECORD_ROUTE],
{ "RECORD ROUTE object (RRO)", "pcep.obj.rro", FT_NONE, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ NULL, HFILL }},
{&pcep_filter[PCEPF_OBJ_LSPA],
{ "LSPA object", "pcep.obj.lspa", FT_NONE, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ NULL, HFILL }},
{&pcep_lspa_flags_l,
{ "Local Protection Desired (L)", "pcep.lspa.flags.l", FT_BOOLEAN, 8, TFS(&tfs_set_notset), PCEP_LSPA_L,
NULL, HFILL }},
{&pcep_filter[PCEPF_OBJ_IRO],
{ "IRO object", "pcep.obj.iro", FT_NONE, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ NULL, HFILL }},
{&pcep_filter[PCEPF_OBJ_SVEC],
{ "SVEC object", "pcep.obj.svec", FT_NONE, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ NULL, HFILL }},
{&pcep_svec_flags_l,
{ "Link diverse (L)", "pcep.svec.flags.l", FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_SVEC_L,
@@ -2233,11 +2233,11 @@ proto_register_pcep(void){
{&pcep_svec_flags_s,
{ "SRLG diverse (S)", "pcep.svec.flags.s", FT_BOOLEAN, 24, TFS(&tfs_set_notset), PCEP_SVEC_S,
- NULL, HFILL }},
+ NULL, HFILL }},
{&pcep_filter[PCEPF_OBJ_NOTIFICATION],
{ "NOTIFICATION object", "pcep.obj.notification", FT_NONE, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ NULL, HFILL }},
{&pcep_filter[PCEPF_NOTI_TYPE],
{ "Notification Value", "pcep.notification.value1", FT_UINT32, BASE_DEC, VALS(pcep_notification_types_vals), 0x0,
@@ -2251,24 +2251,24 @@ proto_register_pcep(void){
{&pcep_filter[PCEPF_OBJ_PCEP_ERROR],
{ "ERROR object", "pcep.obj.error", FT_NONE, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ NULL, HFILL }},
{&pcep_filter[PCEPF_ERROR_TYPE],
{ "Error-Type", "pcep.error.type", FT_UINT8, BASE_DEC, VALS(pcep_error_types_obj_vals), 0x0,
- NULL, HFILL }},
+ NULL, HFILL }},
{&pcep_filter[PCEPF_OBJ_LOAD_BALANCING],
{ "LOAD BALANCING object", "pcep.obj.loadbalancing", FT_NONE, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ NULL, HFILL }},
{&pcep_filter[PCEPF_OBJ_CLOSE],
{ "CLOSE object", "pcep.obj.close", FT_NONE, BASE_NONE, NULL, 0x0,
- NULL, HFILL }},
+ NULL, HFILL }},
{&pcep_filter[PCEPF_OBJ_XRO],
{ "EXCLUDE ROUTE object (XRO)", "pcep.obj.xro", FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }},
- /*Subobjects*/
+ /*Subobjects*/
{&pcep_filter[PCEPF_SUBOBJ],
{ "Type", "pcep.subobj", FT_UINT8, BASE_DEC, VALS(pcep_subobj_vals), 0x0,
- NULL, HFILL }},
+ NULL, HFILL }},
{&pcep_filter[PCEPF_SUBOBJ_IPv4],
{ "SUBOBJECT: IPv4 Prefix", "pcep.subobj.ipv4", FT_NONE, BASE_NONE, NULL, 0x0,
@@ -2306,10 +2306,10 @@ proto_register_pcep(void){
NULL, HFILL }},
{&pcep_subobj_flags_lpu,
{ "Local protection in Use", "pcep.subobj.flags.lpu", FT_BOOLEAN, 8, TFS(&tfs_set_notset), PCEP_SUB_LPU,
- NULL, HFILL }},
+ NULL, HFILL }},
{&pcep_subobj_label_flags_gl,
{ "Global Label", "pcep.subobj.label.flags.gl", FT_BOOLEAN, 8, TFS(&tfs_set_notset), PCEP_SUB_LABEL_GL,
- NULL, HFILL }},
+ NULL, HFILL }},
};
/*Register the protocol name and description*/
diff --git a/epan/dissectors/packet-pim.c b/epan/dissectors/packet-pim.c
index 8a1c82d580..47d08c6f78 100644
--- a/epan/dissectors/packet-pim.c
+++ b/epan/dissectors/packet-pim.c
@@ -103,7 +103,7 @@ dissect_pimv1_addr(tvbuff_t *tvb, int offset) {
flags_masklen & 0x0040 ? "R" : "");
} else {
return ep_strdup_printf("%s/%u",
- ip_to_str(tvb_get_ptr(tvb, offset + 2, 4)), flags_masklen & 0x3f);
+ tvb_ip_to_str(tvb, offset + 2), flags_masklen & 0x3f);
}
}
@@ -282,10 +282,10 @@ dissect_pimv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
"IPv4 dummy header");
proto_tree_add_text(pimopt_tree, tvb, offset + 12, 4,
"Source: %s",
- ip_to_str(tvb_get_ptr(tvb, offset + 12, 4)));
+ tvb_ip_to_str(tvb, offset + 12));
proto_tree_add_text(pimopt_tree, tvb, offset + 16, 4,
"Group: %s",
- ip_to_str(tvb_get_ptr(tvb, offset + 16, 4)));
+ tvb_ip_to_str(tvb, offset + 16));
} else if (pinfo->src.type == AT_IPv6) {
struct ip6_hdr ip6_hdr;
tvb_memcpy(tvb, (guint8 *)&ip6_hdr, offset,
@@ -330,11 +330,11 @@ dissect_pimv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
{
proto_tree_add_text(pimopt_tree, tvb, offset, 4,
"Group: %s",
- ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+ tvb_ip_to_str(tvb, offset));
offset += 4;
proto_tree_add_text(pimopt_tree, tvb, offset, 4,
"Source: %s",
- ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+ tvb_ip_to_str(tvb, offset));
offset += 4;
break;
}
@@ -356,7 +356,7 @@ dissect_pimv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree_add_text(pimopt_tree, tvb, offset, 4,
"Upstream-neighbor: %s",
- ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+ tvb_ip_to_str(tvb, offset));
offset += 4;
offset += 2; /* skip reserved stuff */
@@ -391,13 +391,13 @@ dissect_pimv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
*/
tigroup = proto_tree_add_text(pimopt_tree, tvb, offset, 4,
"Group %d: %s", i,
- ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+ tvb_ip_to_str(tvb, offset));
grouptree = proto_item_add_subtree(tigroup, ett_pim);
offset += 4;
proto_tree_add_text(grouptree, tvb, offset, 4,
"Group %d Mask: %s", i,
- ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+ tvb_ip_to_str(tvb, offset));
offset += 4;
njoin = tvb_get_ntohs(tvb, offset);
@@ -433,17 +433,17 @@ dissect_pimv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree_add_text(pimopt_tree, tvb, offset, 4,
"Group Address: %s",
- ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+ tvb_ip_to_str(tvb, offset));
offset += 4;
proto_tree_add_text(pimopt_tree, tvb, offset, 4,
"Group Mask: %s",
- ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+ tvb_ip_to_str(tvb, offset));
offset += 4;
proto_tree_add_text(pimopt_tree, tvb, offset, 4,
"RP Address: %s",
- ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+ tvb_ip_to_str(tvb, offset));
offset += 4;
offset += 2; /* skip reserved stuff */
@@ -463,12 +463,12 @@ dissect_pimv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree_add_text(pimopt_tree, tvb, offset, 4,
"Group Address: %s",
- ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+ tvb_ip_to_str(tvb, offset));
offset += 4;
proto_tree_add_text(pimopt_tree, tvb, offset, 4,
"Group Mask: %s",
- ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+ tvb_ip_to_str(tvb, offset));
offset += 4;
proto_tree_add_item(pimopt_tree, hf_pim_rpt, tvb, offset, 1, FALSE);
@@ -527,12 +527,12 @@ dissect_pim_addr(tvbuff_t *tvb, int offset, enum pimv2_addrtype at,
switch (af) {
case AFNUM_INET:
len = 4;
- ep_strbuf_printf(strbuf, "%s", ip_to_str(tvb_get_ptr(tvb, offset + 2, len)));
+ ep_strbuf_printf(strbuf, "%s", tvb_ip_to_str(tvb, offset + 2));
break;
case AFNUM_INET6:
len = 16;
- ep_strbuf_printf(strbuf, "%s", ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset + 2, len)));
+ ep_strbuf_printf(strbuf, "%s", tvb_ip6_to_str(tvb, offset + 2));
break;
}
if (advance)
@@ -545,13 +545,13 @@ dissect_pim_addr(tvbuff_t *tvb, int offset, enum pimv2_addrtype at,
case AFNUM_INET:
len = 4;
ep_strbuf_printf(strbuf, "%s/%u",
- ip_to_str(tvb_get_ptr(tvb, offset + 4, len)), mask_len);
+ tvb_ip_to_str(tvb, offset + 4), mask_len);
break;
case AFNUM_INET6:
len = 16;
ep_strbuf_printf(strbuf, "%s/%u",
- ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset + 4, len)), mask_len);
+ tvb_ip6_to_str(tvb, offset + 4), mask_len);
break;
}
if (advance)
@@ -565,13 +565,13 @@ dissect_pim_addr(tvbuff_t *tvb, int offset, enum pimv2_addrtype at,
case AFNUM_INET:
len = 4;
ep_strbuf_printf(strbuf, "%s/%u",
- ip_to_str(tvb_get_ptr(tvb, offset + 4, len)), mask_len);
+ tvb_ip_to_str(tvb, offset + 4), mask_len);
break;
case AFNUM_INET6:
len = 16;
ep_strbuf_printf(strbuf, "%s/%u",
- ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset + 4, len)), mask_len);
+ tvb_ip6_to_str(tvb, offset + 4), mask_len);
break;
}
if (flags) {
@@ -896,10 +896,10 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
"IPv4 dummy header");
proto_tree_add_text(pimopt_tree, tvb, offset + 12, 4,
"Source: %s",
- ip_to_str(tvb_get_ptr(tvb, offset + 12, 4)));
+ tvb_ip_to_str(tvb, offset + 12));
proto_tree_add_text(pimopt_tree, tvb, offset + 16, 4,
"Group: %s",
- ip_to_str(tvb_get_ptr(tvb, offset + 16, 4)));
+ tvb_ip_to_str(tvb, offset + 16));
} else if (pinfo->src.type == AT_IPv6) {
struct ip6_hdr ip6_hdr;
tvb_memcpy(tvb, (guint8 *)&ip6_hdr, offset,
diff --git a/epan/dissectors/packet-ppp.c b/epan/dissectors/packet-ppp.c
index 7cb9e47f83..71b91b9656 100644
--- a/epan/dissectors/packet-ppp.c
+++ b/epan/dissectors/packet-ppp.c
@@ -2110,7 +2110,7 @@ dissect_lcp_multilink_ep_disc_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
length, plurality(length, "", "s"));
} else {
proto_tree_add_text(field_tree, tvb, offset, length,
- "Address: %s", ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+ "Address: %s", tvb_ip_to_str(tvb, offset));
}
break;
@@ -2217,12 +2217,12 @@ dissect_ipcp_addrs_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
length -= 2;
proto_tree_add_text(field_tree, tvb, offset, 4,
"Source IP address: %s",
- ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+ tvb_ip_to_str(tvb, offset));
offset += 4;
length -= 4;
proto_tree_add_text(field_tree, tvb, offset, 4,
"Destination IP address: %s",
- ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+ tvb_ip_to_str(tvb, offset));
}
static void
@@ -2231,7 +2231,7 @@ dissect_ipcp_addr_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
proto_tree *tree)
{
proto_tree_add_text(tree, tvb, offset, length, "%s: %s", optp->name,
- ip_to_str(tvb_get_ptr(tvb, offset + 2, 4)));
+ tvb_ip_to_str(tvb, offset + 2));
}
static void
@@ -2915,7 +2915,7 @@ dissect_vsncp_pdnaddress_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
case 1:
proto_tree_add_text(field_tree, tvb, offset+3, length-3, "%s: %s",
val_to_str_const(pdnaddtype, pdntype_vals, "Unknown"),
- ip_to_str(tvb_get_ptr(tvb, offset + 3, 4)));
+ tvb_ip_to_str(tvb, offset + 3));
break;
case 2:
@@ -2937,7 +2937,7 @@ dissect_vsncp_pdnaddress_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
proto_tree_add_text(field_tree, tvb, offset+11, length-11, "%s: %s",
val_to_str_const(pdnaddtype, pdntype_vals, "Unknown"),
- ip_to_str(tvb_get_ptr(tvb, offset + 11, 4)));
+ tvb_ip_to_str(tvb, offset + 11));
break;
}
default:
@@ -2953,7 +2953,7 @@ dissect_vsncp_ipv4adress_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
proto_tree *tree)
{
proto_tree_add_text(tree, tvb, offset, length, "%s: %s", optp->name,
- ip_to_str(tvb_get_ptr(tvb, offset + 2, 4)));
+ tvb_ip_to_str(tvb, offset + 2));
offset += 2;
}
diff --git a/epan/dissectors/packet-rip.c b/epan/dissectors/packet-rip.c
index cdef5cc7bc..acee4a00ef 100644
--- a/epan/dissectors/packet-rip.c
+++ b/epan/dissectors/packet-rip.c
@@ -217,7 +217,7 @@ dissect_ip_rip_vektor(tvbuff_t *tvb, int offset, guint8 version,
metric = tvb_get_ntohl(tvb, offset+16);
ti = proto_tree_add_text(tree, tvb, offset,
RIP_ENTRY_LENGTH, "IP Address: %s, Metric: %u",
- ip_to_str(tvb_get_ptr(tvb, offset+4, 4)), metric);
+ tvb_ip_to_str(tvb, offset+4), metric);
rip_vektor_tree = proto_item_add_subtree(ti, ett_rip_vec);
proto_tree_add_item(rip_vektor_tree, hf_rip_family, tvb, offset, 2, FALSE);
diff --git a/epan/dissectors/packet-rsvp.c b/epan/dissectors/packet-rsvp.c
index 1417e3d971..ea12f0027e 100644
--- a/epan/dissectors/packet-rsvp.c
+++ b/epan/dissectors/packet-rsvp.c
@@ -76,7 +76,7 @@
* da-labels-05). Add related user preference option.
* (FF) <francesco.fondelli[AT]gmail.com>
*
- * Dec 3, 2010: add support for vendor private class object and ERO/RRO
+ * Dec 3, 2010: add support for vendor private class object and ERO/RRO
* sub-object (see RFC 3936).
* (FF) <francesco.fondelli[AT]gmail.com>
*/
@@ -1502,32 +1502,32 @@ static char *summary_session (tvbuff_t *tvb, int offset)
switch(tvb_get_guint8(tvb, offset+3)) {
case RSVP_SESSION_TYPE_IPV4:
g_snprintf(buf, 100, "SESSION: IPv4, Destination %s, Protocol %d, Port %d. ",
- ip_to_str(tvb_get_ptr(tvb, offset+4, 4)),
+ tvb_ip_to_str(tvb, offset+4),
tvb_get_guint8(tvb, offset+8),
tvb_get_ntohs(tvb, offset+10));
break;
case RSVP_SESSION_TYPE_IPV4_LSP:
g_snprintf(buf, 100, "SESSION: IPv4-LSP, Destination %s, Tunnel ID %d, Ext ID %0x. ",
- ip_to_str(tvb_get_ptr(tvb, offset+4, 4)),
+ tvb_ip_to_str(tvb, offset+4),
tvb_get_ntohs(tvb, offset+10),
tvb_get_ntohl(tvb, offset+12));
break;
case RSVP_SESSION_TYPE_AGGREGATE_IPV4:
g_snprintf(buf, 100, "SESSION: IPv4-Aggregate, Destination %s, DSCP %d. ",
- ip_to_str(tvb_get_ptr(tvb, offset+4, 4)),
+ tvb_ip_to_str(tvb, offset+4),
tvb_get_guint8(tvb, offset+11));
break;
case RSVP_SESSION_TYPE_IPV4_UNI:
g_snprintf(buf, 100, "SESSION: IPv4-UNI, Destination %s, Tunnel ID %d, Ext Address %s. ",
- ip_to_str(tvb_get_ptr(tvb, offset+4, 4)),
+ tvb_ip_to_str(tvb, offset+4),
tvb_get_ntohs(tvb, offset+10),
- ip_to_str(tvb_get_ptr(tvb, offset+12, 4)));
+ tvb_ip_to_str(tvb, offset+12));
break;
case RSVP_SESSION_TYPE_IPV4_E_NNI:
g_snprintf(buf, 100, "SESSION: IPv4-E-NNI, Destination %s, Tunnel ID %d, Ext Address %s. ",
- ip_to_str(tvb_get_ptr(tvb, offset+4, 4)),
+ tvb_ip_to_str(tvb, offset+4),
tvb_get_ntohs(tvb, offset+10),
- ip_to_str(tvb_get_ptr(tvb, offset+12, 4)));
+ tvb_ip_to_str(tvb, offset+12));
break;
default:
g_snprintf(buf, 100, "SESSION: Type %d. ", tvb_get_guint8(tvb, offset+3));
@@ -1549,17 +1549,17 @@ static char *summary_template (tvbuff_t *tvb, int offset)
switch(tvb_get_guint8(tvb, offset+3)) {
case 1:
g_snprintf(buf, 80, "%s: IPv4, Sender %s, Port %d. ", objtype,
- ip_to_str(tvb_get_ptr(tvb, offset+4, 4)),
+ tvb_ip_to_str(tvb, offset+4),
tvb_get_ntohs(tvb, offset+10));
break;
case 7:
g_snprintf(buf, 80, "%s: IPv4-LSP, Tunnel Source: %s, LSP ID: %d. ", objtype,
- ip_to_str(tvb_get_ptr(tvb, offset+4, 4)),
+ tvb_ip_to_str(tvb, offset+4),
tvb_get_ntohs(tvb, offset+10));
break;
case 9:
g_snprintf(buf, 80, "%s: IPv4-Aggregate, Aggregator %s. ", objtype,
- ip_to_str(tvb_get_ptr(tvb, offset+4, 4)));
+ tvb_ip_to_str(tvb, offset+4));
break;
default:
g_snprintf(buf, 80, "%s: Type %d. ", objtype, tvb_get_guint8(tvb, offset+3));
@@ -1618,7 +1618,7 @@ dissect_rsvp_session (proto_item *ti, proto_tree *rsvp_object_tree,
"C-type: 2 - IPv6");
proto_tree_add_text(rsvp_object_tree, tvb, offset2, 16,
"Destination address: %s",
- ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2, 16)));
+ tvb_ip6_to_str(tvb, offset2));
proto_tree_add_text(rsvp_object_tree, tvb, offset2+16, 1,
"Protocol: %u",
tvb_get_guint8(tvb, offset2+16));
@@ -1651,7 +1651,7 @@ dissect_rsvp_session (proto_item *ti, proto_tree *rsvp_object_tree,
proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 4,
"Extended Tunnel ID: %u (%s)",
tvb_get_ntohl(tvb, offset2+8),
- ip_to_str(tvb_get_ptr(tvb, offset2+8, 4)));
+ tvb_ip_to_str(tvb, offset2+8));
hidden_item = proto_tree_add_item(rsvp_object_tree,
hf_rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
tvb, offset2+8, 4, FALSE);
@@ -1704,7 +1704,7 @@ dissect_rsvp_session (proto_item *ti, proto_tree *rsvp_object_tree,
proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 4,
"Extended IPv4 Address: %s",
- ip_to_str(tvb_get_ptr(tvb, offset2+8, 4)));
+ tvb_ip_to_str(tvb, offset2+8));
hidden_item = proto_tree_add_item(rsvp_object_tree,
hf_rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
tvb, offset2+8, 4, FALSE);
@@ -1735,7 +1735,7 @@ dissect_rsvp_session (proto_item *ti, proto_tree *rsvp_object_tree,
proto_tree_add_text(rsvp_object_tree, tvb, offset2+8, 4,
"Extended IPv4 Address: %s",
- ip_to_str(tvb_get_ptr(tvb, offset2+8, 4)));
+ tvb_ip_to_str(tvb, offset2+8));
hidden_item = proto_tree_add_item(rsvp_object_tree,
hf_rsvp_filter[RSVPF_SESSION_EXT_TUNNEL_ID],
tvb, offset2+8, 4, FALSE);
@@ -1792,7 +1792,7 @@ dissect_rsvp_ifid_tlv (proto_tree *ti, proto_tree *rsvp_object_tree,
ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
offset+tlv_off, 8,
"IPv4 TLV - %s",
- ip_to_str(tvb_get_ptr(tvb, offset+tlv_off+4, 4)));
+ tvb_ip_to_str(tvb, offset+tlv_off+4));
rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off, 2,
@@ -1802,9 +1802,9 @@ dissect_rsvp_ifid_tlv (proto_tree *ti, proto_tree *rsvp_object_tree,
tvb_get_ntohs(tvb, offset+tlv_off+2));
proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+4, 4,
"IPv4 address: %s",
- ip_to_str(tvb_get_ptr(tvb, offset+tlv_off+4, 4)));
+ tvb_ip_to_str(tvb, offset+tlv_off+4));
proto_item_append_text(ti, "Data IPv4: %s. ",
- ip_to_str(tvb_get_ptr(tvb, offset+tlv_off+4, 4)));
+ tvb_ip_to_str(tvb, offset+tlv_off+4));
break;
case 3:
@@ -1820,7 +1820,7 @@ dissect_rsvp_ifid_tlv (proto_tree *ti, proto_tree *rsvp_object_tree,
offset+tlv_off, 12,
"Interface-Index%s TLV - %s, %d",
ifindex_name,
- ip_to_str(tvb_get_ptr(tvb, offset+tlv_off+4, 4)),
+ tvb_ip_to_str(tvb, offset+tlv_off+4),
tvb_get_ntohl(tvb, offset+tlv_off+8));
rsvp_ifid_subtree = proto_item_add_subtree(ti2, subtree_type);
proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off, 2,
@@ -1830,12 +1830,12 @@ dissect_rsvp_ifid_tlv (proto_tree *ti, proto_tree *rsvp_object_tree,
tvb_get_ntohs(tvb, offset+tlv_off+2));
proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+4, 4,
"IPv4 address: %s",
- ip_to_str(tvb_get_ptr(tvb, offset+tlv_off+4, 4)));
+ tvb_ip_to_str(tvb, offset+tlv_off+4));
proto_tree_add_text(rsvp_ifid_subtree, tvb, offset+tlv_off+8, 4,
"Interface-ID: %d",
tvb_get_ntohl(tvb, offset+tlv_off+8));
proto_item_append_text(ti, "Data If-Index%s: %s, %d. ", ifindex_name,
- ip_to_str(tvb_get_ptr(tvb, offset+tlv_off+4, 4)),
+ tvb_ip_to_str(tvb, offset+tlv_off+4),
tvb_get_ntohl(tvb, offset+tlv_off+8));
break;
@@ -1901,12 +1901,12 @@ dissect_rsvp_hop (proto_item *ti, proto_tree *rsvp_object_tree,
"C-type: 1 - IPv4");
proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
"Neighbor address: %s",
- ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
+ tvb_ip_to_str(tvb, offset2));
proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 4,
"Logical interface: %u",
tvb_get_ntohl(tvb, offset2+4));
proto_item_set_text(ti, "HOP: IPv4, %s",
- ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
+ tvb_ip_to_str(tvb, offset2));
break;
case 2:
@@ -1914,7 +1914,7 @@ dissect_rsvp_hop (proto_item *ti, proto_tree *rsvp_object_tree,
"C-type: 2 - IPv6");
proto_tree_add_text(rsvp_object_tree, tvb, offset2, 16,
"Neighbor address: %s",
- ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2, 16)));
+ tvb_ip6_to_str(tvb, offset2));
proto_tree_add_text(rsvp_object_tree, tvb, offset2+16, 4,
"Logical interface: 0x%08x",
tvb_get_ntohl(tvb, offset2+16));
@@ -1925,13 +1925,13 @@ dissect_rsvp_hop (proto_item *ti, proto_tree *rsvp_object_tree,
"C-type: 3 - IPv4 IF-ID");
proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
"Neighbor address: %s",
- ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
+ tvb_ip_to_str(tvb, offset2));
proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 4,
"Logical interface: %u",
tvb_get_ntohl(tvb, offset2+4));
proto_item_set_text(ti, "HOP: IPv4 IF-ID. Control IPv4: %s. ",
- ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
+ tvb_ip_to_str(tvb, offset2));
dissect_rsvp_ifid_tlv(ti, rsvp_object_tree, tvb, offset+12, obj_length,
TREE(TT_HOP_SUBOBJ));
@@ -2053,7 +2053,7 @@ dissect_rsvp_error (proto_item *ti, proto_tree *rsvp_object_tree,
"C-type: 1 - IPv4");
proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
"Error node: %s",
- ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
+ tvb_ip_to_str(tvb, offset2));
offset3 = offset2+4;
break;
}
@@ -2063,7 +2063,7 @@ dissect_rsvp_error (proto_item *ti, proto_tree *rsvp_object_tree,
"C-type: 2 - IPv6");
proto_tree_add_text(rsvp_object_tree, tvb, offset2, 16,
"Error node: %s",
- ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2, 16)));
+ tvb_ip6_to_str(tvb, offset2));
offset3 = offset2+16;
break;
}
@@ -2073,7 +2073,7 @@ dissect_rsvp_error (proto_item *ti, proto_tree *rsvp_object_tree,
"C-type: 3 - IPv4 IF-ID");
proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
"Error node: %s",
- ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
+ tvb_ip_to_str(tvb, offset2));
offset3 = offset2+4;
break;
}
@@ -2117,12 +2117,12 @@ dissect_rsvp_error (proto_item *ti, proto_tree *rsvp_object_tree,
case 1:
proto_item_set_text(ti, "ERROR: IPv4, Error code: %s, Value: %d, Error Node: %s",
val_to_str(error_code, rsvp_error_codes, "Unknown (%d)"),
- error_val, ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
+ error_val, tvb_ip_to_str(tvb, offset2));
break;
case 3:
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)));
+ error_val, tvb_ip_to_str(tvb, offset2));
dissect_rsvp_ifid_tlv(ti, rsvp_object_tree, tvb, offset+12, obj_length,
TREE(TT_ERROR_SUBOBJ));
break;
@@ -2149,7 +2149,7 @@ dissect_rsvp_scope (proto_item *ti _U_, proto_tree *rsvp_object_tree,
while (mylen > 0) {
proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
"IPv4 Address: %s",
- ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
+ tvb_ip_to_str(tvb, offset2));
offset2 += 4;
mylen -= 4;
}
@@ -2162,7 +2162,7 @@ dissect_rsvp_scope (proto_item *ti _U_, proto_tree *rsvp_object_tree,
while (mylen > 0) {
proto_tree_add_text(rsvp_object_tree, tvb, offset2, 16,
"IPv6 Address: %s",
- ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2, 16)));
+ tvb_ip6_to_str(tvb, offset2));
offset2 += 16;
mylen -= 16;
}
@@ -2235,9 +2235,9 @@ dissect_rsvp_confirm (proto_item *ti, proto_tree *rsvp_object_tree,
"C-type: 1 - IPv4");
proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
"Receiver address: %s",
- ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
+ tvb_ip_to_str(tvb, offset2));
proto_item_set_text(ti, "CONFIRM: Receiver %s",
- ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
+ tvb_ip_to_str(tvb, offset2));
break;
}
@@ -2246,7 +2246,7 @@ dissect_rsvp_confirm (proto_item *ti, proto_tree *rsvp_object_tree,
"C-type: 2 - IPv6");
proto_tree_add_text(rsvp_object_tree, tvb, offset2, 16,
"Receiver address: %s",
- ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2, 16)));
+ tvb_ip6_to_str(tvb, offset2));
break;
}
@@ -2295,7 +2295,7 @@ dissect_rsvp_template_filter (proto_item *ti, proto_tree *rsvp_object_tree,
"C-type: 2 - IPv6");
proto_tree_add_text(rsvp_object_tree, tvb, offset2, 16,
"Source address: %s",
- ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2, 16)));
+ tvb_ip6_to_str(tvb, offset2));
proto_tree_add_text(rsvp_object_tree, tvb, offset2+18, 2,
"Source port: %u",
tvb_get_ntohs(tvb, offset2+18));
@@ -3807,7 +3807,7 @@ dissect_rsvp_ero_rro_subobjects (proto_tree *ti, proto_tree *rsvp_object_tree,
ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
offset+l, 8,
"IPv4 Subobject - %s%s",
- ip_to_str(tvb_get_ptr(tvb, offset+l+2, 4)),
+ tvb_ip_to_str(tvb, offset+l+2),
class == RSVP_CLASS_EXPLICIT_ROUTE ?
(k ? ", Loose" : ", Strict") : "");
rsvp_ro_subtree =
@@ -3822,13 +3822,13 @@ dissect_rsvp_ero_rro_subobjects (proto_tree *ti, proto_tree *rsvp_object_tree,
tvb_get_guint8(tvb, offset+l+1));
proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+2, 4,
"IPv4 hop: %s",
- ip_to_str(tvb_get_ptr(tvb, offset+l+2, 4)));
+ tvb_ip_to_str(tvb, offset+l+2));
proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+6, 1,
"Prefix length: %u",
tvb_get_guint8(tvb, offset+l+6));
if (i < 4) {
proto_item_append_text(ti, "IPv4 %s%s",
- ip_to_str(tvb_get_ptr(tvb, offset+l+2, 4)),
+ tvb_ip_to_str(tvb, offset+l+2),
k ? " [L]" : "");
}
if (class == RSVP_CLASS_RECORD_ROUTE) {
@@ -3886,7 +3886,7 @@ dissect_rsvp_ero_rro_subobjects (proto_tree *ti, proto_tree *rsvp_object_tree,
tvb_get_guint8(tvb, offset+l+1));
proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+2, 16,
"IPv6 hop: %s",
- ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset+l+2, 16)));
+ tvb_ip6_to_str(tvb, offset+l+2));
proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+18, 1,
"Prefix length: %u",
tvb_get_guint8(tvb, offset+l+18));
@@ -3994,7 +3994,7 @@ dissect_rsvp_ero_rro_subobjects (proto_tree *ti, proto_tree *rsvp_object_tree,
ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
offset+l, 8,
"Unnumbered Interface-ID - %s, %d, %s",
- ip_to_str(tvb_get_ptr(tvb, offset+l+4, 4)),
+ tvb_ip_to_str(tvb, offset+l+4),
tvb_get_ntohl(tvb, offset+l+8),
class == RSVP_CLASS_EXPLICIT_ROUTE ?
(k ? "Loose" : "Strict") : "");
@@ -4037,13 +4037,13 @@ dissect_rsvp_ero_rro_subobjects (proto_tree *ti, proto_tree *rsvp_object_tree,
}
proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+4, 4,
"Router-ID: %s",
- ip_to_str(tvb_get_ptr(tvb, offset+l+4, 4)));
+ tvb_ip_to_str(tvb, offset+l+4));
proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+8, 4,
"Interface-ID: %d",
tvb_get_ntohl(tvb, offset+l+8));
if (i < 4) {
proto_item_append_text(ti, "Unnum %s/%d%s",
- ip_to_str(tvb_get_ptr(tvb, offset+l+4, 4)),
+ tvb_ip_to_str(tvb, offset+l+4),
tvb_get_ntohl(tvb, offset+l+8),
k ? " [L]":"");
}
@@ -4077,12 +4077,12 @@ dissect_rsvp_ero_rro_subobjects (proto_tree *ti, proto_tree *rsvp_object_tree,
case 125:
case 126:
case 127:
- /*
- * FF: Types 124 through 127 are to be reserved for Vendor
- * Private Use (see RFC 3936, Section 2.3.1) in case of
+ /*
+ * FF: Types 124 through 127 are to be reserved for Vendor
+ * Private Use (see RFC 3936, Section 2.3.1) in case of
* EXPLICIT_ROUTE (aka ERO).
*/
- if (class == RSVP_CLASS_RECORD_ROUTE)
+ if (class == RSVP_CLASS_RECORD_ROUTE)
goto defaultsub;
else
goto privatesub;
@@ -4092,12 +4092,12 @@ dissect_rsvp_ero_rro_subobjects (proto_tree *ti, proto_tree *rsvp_object_tree,
case 253:
case 254:
case 255:
- /*
- * FF: Types 252 through 255 are to be reserved for Vendor
- * Private Use (see RFC 3936, Section 2.3.1) in case of
+ /*
+ * FF: Types 252 through 255 are to be reserved for Vendor
+ * Private Use (see RFC 3936, Section 2.3.1) in case of
* RECORD_ROUTE (aka RRO).
*/
- if (class == RSVP_CLASS_EXPLICIT_ROUTE)
+ if (class == RSVP_CLASS_EXPLICIT_ROUTE)
goto defaultsub;
else
goto privatesub;
@@ -4105,9 +4105,9 @@ dissect_rsvp_ero_rro_subobjects (proto_tree *ti, proto_tree *rsvp_object_tree,
privatesub: /* Private subobject */
/*
- * FF: The first four octets of the sub-object contents of
- * a Vendor Private sub-object of an EXPLICIT_ROUTE or
- * RECORD_ROUTE object MUST be that vendor's SMI enterprise
+ * FF: The first four octets of the sub-object contents of
+ * a Vendor Private sub-object of an EXPLICIT_ROUTE or
+ * RECORD_ROUTE object MUST be that vendor's SMI enterprise
* code in network octet order.
*/
{
@@ -4126,15 +4126,15 @@ dissect_rsvp_ero_rro_subobjects (proto_tree *ti, proto_tree *rsvp_object_tree,
proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+1, 1,
"Length: %u",
private_so_len);
-
+
proto_tree_add_item(rsvp_ro_subtree,
hf_rsvp_filter[RSVPF_ENT_CODE],
tvb, offset+l+4, 4, FALSE);
if (private_so_len > 8) {
/* some private data */
- proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+8,
+ proto_tree_add_text(rsvp_ro_subtree, tvb, offset+l+8,
private_so_len - 8,
- "Data (%d bytes)",
+ "Data (%d bytes)",
private_so_len - 8);
}
}
@@ -4517,8 +4517,8 @@ dissect_rsvp_association (proto_tree *ti, proto_tree *rsvp_object_tree,
"Association ID: %u", association_id);
proto_item_append_text(ti, "ID: %u. ", association_id);
proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
- "Association source: %s", ip_to_str(tvb_get_ptr(tvb, offset+8, 4)));
- proto_item_append_text(ti, "Src: %s", ip_to_str(tvb_get_ptr(tvb, offset+8, 4)));
+ "Association source: %s", tvb_ip_to_str(tvb, offset+8));
+ proto_item_append_text(ti, "Src: %s", tvb_ip_to_str(tvb, offset+8));
break;
case 2:
@@ -4534,10 +4534,8 @@ dissect_rsvp_association (proto_tree *ti, proto_tree *rsvp_object_tree,
"Association ID: %u", association_id);
proto_item_append_text(ti, "ID: %u. ", association_id);
proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 16,
- "Association source: %s", ip6_to_str((const struct e_in6_addr *)
- tvb_get_ptr(tvb, offset+8, 16)));
- proto_item_append_text(ti, "Src: %s", ip6_to_str((const struct e_in6_addr *)
- tvb_get_ptr(tvb, offset+8, 16)));
+ "Association source: %s", tvb_ip6_to_str(tvb, offset+8));
+ proto_item_append_text(ti, "Src: %s", tvb_ip6_to_str(tvb, offset+8));
break;
default:
@@ -4592,7 +4590,7 @@ dissect_rsvp_lsp_tunnel_if_id_tlv(proto_tree *rsvp_object_tree,
ti = proto_tree_add_text(rsvp_object_tree, tvb,
offset+tlv_off, tlv_len,
"IPv4 component link identifier: %s",
- ip_to_str(tvb_get_ptr(tvb, offset+tlv_off+4, 4)));
+ tvb_ip_to_str(tvb, offset+tlv_off+4));
rsvp_lsp_tunnel_if_id_subtree = proto_item_add_subtree(ti, subtree_type);
proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off, 2,
"Type: 2 (IPv4 component link identifier)");
@@ -4600,7 +4598,7 @@ dissect_rsvp_lsp_tunnel_if_id_tlv(proto_tree *rsvp_object_tree,
"Length: %u", tlv_len);
proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+4, 4,
"Component link identifier: %s",
- ip_to_str(tvb_get_ptr(tvb, offset+tlv_off+4, 4)));
+ tvb_ip_to_str(tvb, offset+tlv_off+4));
break;
case 32769: /* oif-p0040.002.09 demo spec */
@@ -4630,10 +4628,10 @@ dissect_rsvp_lsp_tunnel_if_id_tlv(proto_tree *rsvp_object_tree,
tvb_bytes_to_str(tvb, offset+tlv_off+8, 8));
proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+16, 4,
"SC PC ID: %s",
- ip_to_str(tvb_get_ptr(tvb, offset+tlv_off+16, 4)));
+ tvb_ip_to_str(tvb, offset+tlv_off+16));
proto_tree_add_text(rsvp_lsp_tunnel_if_id_subtree, tvb, offset+tlv_off+20, 4,
"SC PC SCN Address: %s",
- ip_to_str(tvb_get_ptr(tvb, offset+tlv_off+20, 4)));
+ tvb_ip_to_str(tvb, offset+tlv_off+20));
proto_item_append_text(ti, "LSP Encoding=%s, Switching Type=%s, Signal Type=%s",
rval_to_str(tvb_get_guint8(tvb,offset+tlv_off+4),
gmpls_lsp_enc_rvals, "Unknown (%d)"),
@@ -4677,11 +4675,11 @@ dissect_rsvp_lsp_tunnel_if_id (proto_tree *ti, proto_tree *rsvp_object_tree,
"C-type: 1 - Unnumbered interface");
proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 4,
"Router ID: %s",
- ip_to_str(tvb_get_ptr(tvb, offset+4, 4)));
+ tvb_ip_to_str(tvb, offset+4));
proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
"Interface ID: %u", tvb_get_ntohl(tvb, offset+8));
proto_item_set_text(ti, "LSP INTERFACE-ID: Unnumbered, Router-ID %s, Interface-ID %d",
- ip_to_str(tvb_get_ptr(tvb, offset+4, 4)),
+ tvb_ip_to_str(tvb, offset+4),
tvb_get_ntohl(tvb, offset+8));
break;
@@ -4690,14 +4688,14 @@ dissect_rsvp_lsp_tunnel_if_id (proto_tree *ti, proto_tree *rsvp_object_tree,
"C-type: 2 - IPv4");
proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 4,
"IPv4 interface address: %s",
- ip_to_str(tvb_get_ptr(tvb, offset+4, 4)));
+ tvb_ip_to_str(tvb, offset+4));
proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
"Target IGP instance: %s",
- ip_to_str(tvb_get_ptr(tvb, offset+8, 4)));
+ tvb_ip_to_str(tvb, offset+8));
proto_item_set_text(ti, "LSP INTERFACE-ID: IPv4, interface address %s,"
"IGP instance %s",
- ip_to_str(tvb_get_ptr(tvb, offset+4, 4)),
- ip_to_str(tvb_get_ptr(tvb, offset+8, 4)));
+ tvb_ip_to_str(tvb, offset+4),
+ tvb_ip_to_str(tvb, offset+8));
action = tvb_get_guint8(tvb, offset+12);
action >>= 4;
proto_tree_add_text(rsvp_object_tree, tvb, offset+12, 1, "Action: %d - %s",
@@ -4712,16 +4710,14 @@ dissect_rsvp_lsp_tunnel_if_id (proto_tree *ti, proto_tree *rsvp_object_tree,
"C-type: 3 - IPv6");
proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 16,
"IPv6 interface address: %s",
- ip6_to_str((const struct e_in6_addr *)
- tvb_get_ptr(tvb, offset+4, 16)));
+ tvb_ip6_to_str(tvb, offset+4));
proto_tree_add_text(rsvp_object_tree, tvb, offset+20, 4,
"Target IGP instance: %s",
- ip_to_str(tvb_get_ptr(tvb, offset+20, 4)));
+ tvb_ip_to_str(tvb, offset+20));
proto_item_set_text(ti, "LSP INTERFACE-ID: IPv6, interface address %s,"
"IGP instance %s",
- ip6_to_str((const struct e_in6_addr *)
- tvb_get_ptr(tvb, offset+4, 16)),
- ip_to_str(tvb_get_ptr(tvb, offset+20, 4)));
+ tvb_ip6_to_str(tvb, offset+4),
+ tvb_ip_to_str(tvb, offset+20));
action = tvb_get_guint8(tvb, offset+24);
action >>= 4;
proto_tree_add_text(rsvp_object_tree, tvb, offset+24, 1, "Action: %d - %s",
@@ -4736,17 +4732,17 @@ dissect_rsvp_lsp_tunnel_if_id (proto_tree *ti, proto_tree *rsvp_object_tree,
"C-type: 4 - Unnumbered interface with target");
proto_tree_add_text(rsvp_object_tree, tvb, offset+4, 4,
"Router ID: %s",
- ip_to_str(tvb_get_ptr(tvb, offset+4, 4)));
+ tvb_ip_to_str(tvb, offset+4));
proto_tree_add_text(rsvp_object_tree, tvb, offset+8, 4,
"Interface ID: %u", tvb_get_ntohl(tvb, offset+8));
proto_tree_add_text(rsvp_object_tree, tvb, offset+12, 4,
"Target IGP instance: %s",
- ip_to_str(tvb_get_ptr(tvb, offset+12, 4)));
+ tvb_ip_to_str(tvb, offset+12));
proto_item_set_text(ti, "LSP INTERFACE-ID: Unnumbered with target, Router-ID %s,"
" Interface-ID %d, IGP instance %s",
- ip_to_str(tvb_get_ptr(tvb, offset+4, 4)),
+ tvb_ip_to_str(tvb, offset+4),
tvb_get_ntohl(tvb, offset+8),
- ip_to_str(tvb_get_ptr(tvb, offset+12, 4)));
+ tvb_ip_to_str(tvb, offset+12));
action = tvb_get_guint8(tvb, offset+16);
action >>= 4;
proto_tree_add_text(rsvp_object_tree, tvb, offset+16, 1, "Action: %d - %s",
@@ -4783,9 +4779,9 @@ dissect_rsvp_notify_request (proto_item *ti, proto_tree *rsvp_object_tree,
"C-type: 1 - IPv4");
proto_tree_add_text(rsvp_object_tree, tvb, offset2, 4,
"Notify node address: %s",
- ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
+ tvb_ip_to_str(tvb, offset2));
proto_item_append_text(ti, ": Notify node: %s",
- ip_to_str(tvb_get_ptr(tvb, offset2, 4)));
+ tvb_ip_to_str(tvb, offset2));
break;
}
@@ -4794,9 +4790,9 @@ dissect_rsvp_notify_request (proto_item *ti, proto_tree *rsvp_object_tree,
"C-type: 2 - IPv6");
proto_tree_add_text(rsvp_object_tree, tvb, offset2, 16,
"Notify node address: %s",
- ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2, 16)));
+ tvb_ip6_to_str(tvb, offset2));
proto_item_append_text(ti, ": Notify node: %s",
- ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset2, 16)));
+ tvb_ip6_to_str(tvb, offset2));
break;
}
@@ -4846,7 +4842,7 @@ dissect_rsvp_gen_uni (proto_tree *ti, proto_tree *rsvp_object_tree,
ti2 = proto_tree_add_text(rsvp_object_tree, tvb,
offset2+l, 8,
"%s IPv4 TNA: %s", c,
- ip_to_str(tvb_get_ptr(tvb, offset2+l+4, 4)));
+ tvb_ip_to_str(tvb, offset2+l+4));
rsvp_gen_uni_subtree =
proto_item_add_subtree(ti2, TREE(TT_GEN_UNI_SUBOBJ));
proto_tree_add_text(rsvp_gen_uni_subtree, tvb, offset2+l+2, 1,
@@ -4864,7 +4860,7 @@ dissect_rsvp_gen_uni (proto_tree *ti, proto_tree *rsvp_object_tree,
tvb, offset2+l+4, 4, FALSE);
if (i < 4) {
proto_item_append_text(ti, "%s IPv4 TNA: %s", c,
- ip_to_str(tvb_get_ptr(tvb, offset2+l+4, 4)));
+ tvb_ip_to_str(tvb, offset2+l+4));
}
break;
@@ -4889,8 +4885,7 @@ dissect_rsvp_gen_uni (proto_tree *ti, proto_tree *rsvp_object_tree,
tvb, offset2+l+4, 16, FALSE);
if (i < 4) {
proto_item_append_text(ti, "%s IPv6 %s", c,
- ip6_to_str((const struct e_in6_addr *)
- tvb_get_ptr(tvb, offset2+l+4, 16)));
+ tvb_ip6_to_str(tvb, offset2+l+4));
}
break;
@@ -5194,7 +5189,7 @@ dissect_rsvp_call_id (proto_tree *ti, proto_tree *rsvp_object_tree,
offset4 = offset3 + 4;
proto_tree_add_item(rsvp_object_tree, hf_rsvp_filter[RSVPF_CALL_ID_SRC_ADDR_IPV4],
tvb, offset3, 4, FALSE);
- proto_item_append_text(ti, "Src: %s. ", ip_to_str(tvb_get_ptr(tvb, offset3, 4)));
+ proto_item_append_text(ti, "Src: %s. ", tvb_ip_to_str(tvb, offset3));
break;
case 2:
@@ -5202,7 +5197,7 @@ dissect_rsvp_call_id (proto_tree *ti, proto_tree *rsvp_object_tree,
proto_tree_add_item(rsvp_object_tree, hf_rsvp_filter[RSVPF_CALL_ID_SRC_ADDR_IPV6],
tvb, offset3, 16, FALSE);
proto_item_append_text(ti, "Src: %s. ",
- ip6_to_str((const struct e_in6_addr *) tvb_get_ptr(tvb, offset3, 16)));
+ tvb_ip6_to_str(tvb, offset3));
break;
case 3:
@@ -5455,11 +5450,11 @@ dissect_rsvp_detour (proto_tree *ti, proto_tree *rsvp_object_tree,
iter++;
proto_tree_add_text(rsvp_object_tree, tvb, offset+(4*iter), 4,
"PLR ID %d: %s", count,
- ip_to_str(tvb_get_ptr(tvb, offset+(4*iter), 4)));
+ tvb_ip_to_str(tvb, offset+(4*iter)));
iter++;
proto_tree_add_text(rsvp_object_tree, tvb, offset+(4*iter), 4,
"Avoid Node ID %d: %s", count,
- ip_to_str(tvb_get_ptr(tvb, offset+(4*iter), 4)));
+ tvb_ip_to_str(tvb, offset+(4*iter)));
}
break;
@@ -5572,7 +5567,7 @@ dissect_rsvp_diffserv_aware_te(proto_tree *ti, proto_tree *rsvp_object_tree,
* VENDOR PRIVATE USE
*---------------------------------------------------------------------------*/
static void
-dissect_rsvp_vendor_private_use(proto_tree *ti _U_,
+dissect_rsvp_vendor_private_use(proto_tree *ti _U_,
proto_tree *rsvp_object_tree,
tvbuff_t *tvb,
int offset, int obj_length,
@@ -5585,8 +5580,8 @@ dissect_rsvp_vendor_private_use(proto_tree *ti _U_,
* enterprise-specific; these MUST NOT be registered with IANA. For
* Vendor Private values, the first 4-octet word of the data field MUST
* be an enterprise code [ENT: www.iana.org/assignments/enterprise-numbers]
- * (network order) as registered with the IANA SMI Network Management
- * Private Enterprise Codes, and the rest of the data thereafter is for
+ * (network order) as registered with the IANA SMI Network Management
+ * Private Enterprise Codes, and the rest of the data thereafter is for
* the private use of the registered enterprise.
*/
proto_item *hidden_item = NULL;
@@ -5596,7 +5591,7 @@ dissect_rsvp_vendor_private_use(proto_tree *ti _U_,
hf_rsvp_filter[RSVPF_PRIVATE_OBJ],
tvb, offset, obj_length, FALSE);
PROTO_ITEM_SET_HIDDEN(hidden_item);
- proto_tree_add_text(rsvp_object_tree, tvb, offset + 3, 1,
+ proto_tree_add_text(rsvp_object_tree, tvb, offset + 3, 1,
"C-type: %u", type);
enterprise_code = tvb_get_ntohl(tvb, offset + 4);
proto_tree_add_item(rsvp_object_tree,
@@ -6429,14 +6424,14 @@ proto_register_rsvp(void)
{ "Source Transport Network Address", "rsvp.callid.srcaddr.ipv6", FT_IPv6,
BASE_NONE, NULL, 0x0, NULL, HFILL }},
- /*
- * FF: Vendor Private object field, please see
+ /*
+ * FF: Vendor Private object field, please see
* http://www.iana.org/assignments/enterprise-numbers
*/
{&hf_rsvp_filter[RSVPF_ENT_CODE],
{ "Enterprise Code",
- "rsvp.obj_private.enterprise", FT_UINT32,
- BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x0,
+ "rsvp.obj_private.enterprise", FT_UINT32,
+ BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x0,
"IANA Network Management Private Enterprise Code", HFILL }}
};
diff --git a/epan/dissectors/packet-slimp3.c b/epan/dissectors/packet-slimp3.c
index 868b0e0d6a..ed09877758 100644
--- a/epan/dissectors/packet-slimp3.c
+++ b/epan/dissectors/packet-slimp3.c
@@ -424,7 +424,7 @@ dissect_slimp3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (check_col(pinfo->cinfo, COL_INFO)) {
i1 = 18;
lcd_strlen = 0;
- while (tvb_offset_exists(tvb, offset + i1) &&
+ while (tvb_offset_exists(tvb, offset + i1) &&
lcd_strlen < MAX_LCD_STR_LEN) {
switch (tvb_get_guint8(tvb, offset + i1)) {
@@ -554,7 +554,7 @@ dissect_slimp3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
PROTO_ITEM_SET_HIDDEN(hidden_item);
if (old_protocol) {
proto_tree_add_text(slimp3_tree, tvb, offset, -1,
- "Length: %d bytes",
+ "Length: %d bytes",
tvb_reported_length_remaining(tvb, offset+18));
proto_tree_add_text(slimp3_tree, tvb, offset+2, 2,
"Buffer offset: %d bytes.",
@@ -565,7 +565,7 @@ dissect_slimp3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
val_to_str(tvb_get_guint8(tvb, offset+1),
slimp3_mpg_control, "Unknown (0x%0x)"));
proto_tree_add_text(slimp3_tree, tvb, offset, -1,
- "Length: %d bytes",
+ "Length: %d bytes",
tvb_reported_length_remaining(tvb, offset+18));
proto_tree_add_text(slimp3_tree, tvb, offset+6, 2,
"Write Pointer: %d",
@@ -578,13 +578,13 @@ dissect_slimp3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (check_col(pinfo->cinfo, COL_INFO)) {
if (old_protocol) {
- col_append_fstr(pinfo->cinfo, COL_INFO,
+ col_append_fstr(pinfo->cinfo, COL_INFO,
", Length: %d bytes, Offset: %d bytes.",
tvb_reported_length_remaining(tvb, offset+18),
tvb_get_ntohs(tvb, offset+2) * 2);
}
else {
- col_append_fstr(pinfo->cinfo, COL_INFO,
+ col_append_fstr(pinfo->cinfo, COL_INFO,
", %s, %d bytes at %d, Sequence: %d",
val_to_str(tvb_get_guint8(tvb, offset+1),
slimp3_mpg_control, "Unknown (0x%0x)"),
@@ -622,14 +622,14 @@ dissect_slimp3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
PROTO_ITEM_SET_HIDDEN(hidden_item);
proto_tree_add_text(slimp3_tree, tvb, offset+2, 4,
"Server Address: %s.",
- ip_to_str(tvb_get_ptr(tvb, offset+2, 4)));
+ tvb_ip_to_str(tvb, offset+2));
proto_tree_add_text(slimp3_tree, tvb, offset+6, 2,
"Server Port: %d", tvb_get_ntohs(tvb, offset + 6));
}
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO, ", Server Address: %s. Server Port: %d",
- ip_to_str(tvb_get_ptr(tvb, offset+2, 4)),
+ tvb_ip_to_str(tvb, offset+2),
tvb_get_ntohs(tvb, offset + 6));
}
break;
@@ -638,7 +638,7 @@ dissect_slimp3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Acknowledge MPEG data
*
* [0] 'a'
- * [1..5]
+ * [1..5]
* [6..7] Write pointer (in words)
* [8..9] Read pointer (in words)
* [10..11] Sequence number
diff --git a/epan/dissectors/packet-tapa.c b/epan/dissectors/packet-tapa.c
index cef3577f13..f399b57b62 100644
--- a/epan/dissectors/packet-tapa.c
+++ b/epan/dissectors/packet-tapa.c
@@ -28,7 +28,7 @@
TODO:
Specs:
-
+
No specs available.
*/
@@ -151,7 +151,7 @@ dissect_tapa_discover_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tapa_
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, ", Switch: %s",
- ip_to_str(tvb_get_ptr(tvb, offset, 4)));
+ tvb_ip_to_str(tvb, offset));
offset += 4;
diff --git a/epan/dissectors/packet-tpncp.c b/epan/dissectors/packet-tpncp.c
index f5b4411a05..91d640f3ba 100644
--- a/epan/dissectors/packet-tpncp.c
+++ b/epan/dissectors/packet-tpncp.c
@@ -205,7 +205,7 @@ static void dissect_tpncp_data(gint data_id, tvbuff_t *tvb, proto_item *item,
}
/* Add string representation for ip_address's field (if needed). */
if (current_tpncp_data_field_info->tpncp_data_field_is_ip_addr) {
- proto_item_append_text(pi, " (%s)", ip_to_str(tvb_get_ptr(tvb, *offset, 4)));
+ proto_item_append_text(pi, " (%s)", tvb_ip_to_str(tvb, *offset));
}
(*offset) += 4;
break;
diff --git a/epan/dissectors/packet-xdmcp.c b/epan/dissectors/packet-xdmcp.c
index d751041a85..7b55f364e5 100644
--- a/epan/dissectors/packet-xdmcp.c
+++ b/epan/dissectors/packet-xdmcp.c
@@ -244,7 +244,7 @@ static void dissect_xdmcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
offset += 2;
if (check_col(pinfo->cinfo, COL_INFO)) {
- col_add_str(pinfo->cinfo, COL_INFO,
+ col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(opcode, opcode_vals, "Unknown (0x%04x)"));
}
@@ -265,12 +265,12 @@ static void dissect_xdmcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (alen == 4) {
proto_tree_add_text(xdmcp_tree, tvb, offset, alen+2,
"Client address: %s",
- ip_to_str(tvb_get_ptr(tvb, offset+2, 4)));
+ tvb_ip_to_str(tvb, offset+2));
offset += 6;
} else if (alen == 16) {
proto_tree_add_text(xdmcp_tree, tvb, offset, alen+2,
"Client address: %s",
- ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, offset+2, 16)));
+ tvb_ip6_to_str(tvb, offset+2));
offset += 18;
} else {
offset += xdmcp_add_bytes(xdmcp_tree, "Client address", tvb, offset);
@@ -353,9 +353,9 @@ static void dissect_xdmcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
caddrs_offset += 2;
if ((ctype == 0) && (alen == 4)) {
- ip_string = ip_to_str(tvb_get_ptr(tvb, caddrs_offset, 4));
+ ip_string = tvb_ip_to_str(tvb, caddrs_offset);
} else if ((ctype == 6) && (alen == 16)) {
- ip_string = ip6_to_str((const struct e_in6_addr *)tvb_get_ptr(tvb, caddrs_offset, 16));
+ ip_string = tvb_ip6_to_str(tvb, caddrs_offset);
} else {
ip_string = NULL;
}