forked from osmocom/wireshark
to_str: scope tvb_ip_to_str
parent
4a2b18a9c0
commit
07f5472aa7
|
@ -400,7 +400,7 @@ wrong answer on the PC on which you're doing development, and try
|
|||
"tvb_get_letohl()" instead, as "tvb_get_letohl()" will give the wrong
|
||||
answer on big-endian machines.
|
||||
|
||||
gchar *tvb_ip_to_str(tvbuff_t *tvb, const gint offset)
|
||||
gchar *tvb_ip_to_str(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset)
|
||||
gchar *tvb_ip6_to_str(tvbuff_t *tvb, const gint offset)
|
||||
|
||||
Returns a null-terminated buffer containing a string with IPv4 or IPv6 Address
|
||||
|
|
|
@ -284,7 +284,7 @@ KrbFastArmorTypes PROT_PREFIX UPPER_CASE
|
|||
switch(private_data->addr_type){
|
||||
case KERBEROS_ADDR_TYPE_IPV4:
|
||||
it=proto_tree_add_item(tree, hf_krb_address_ip, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
address_str = tvb_ip_to_str(tvb, offset);
|
||||
address_str = tvb_ip_to_str(actx->pinfo->pool, tvb, offset);
|
||||
break;
|
||||
case KERBEROS_ADDR_TYPE_NETBIOS:
|
||||
{
|
||||
|
|
|
@ -1563,8 +1563,8 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
|
|||
|
||||
registration_request_msg = 1;
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "Reg Request: PDSN=%s PCF=%s",
|
||||
tvb_ip_to_str(tvb, 8),
|
||||
tvb_ip_to_str(tvb, 12));
|
||||
tvb_ip_to_str(pinfo->pool, tvb, 8),
|
||||
tvb_ip_to_str(pinfo->pool, tvb, 12));
|
||||
|
||||
if (tree) {
|
||||
ti = proto_tree_add_item(tree, proto_a11, tvb, offset, -1, ENC_NA);
|
||||
|
@ -1603,7 +1603,7 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
|
|||
break;
|
||||
case REGISTRATION_REPLY:
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "Reg Reply: PDSN=%s, Code=%u",
|
||||
tvb_ip_to_str(tvb, 8), tvb_get_guint8(tvb,1));
|
||||
tvb_ip_to_str(pinfo->pool, tvb, 8), tvb_get_guint8(tvb,1));
|
||||
|
||||
if (tree) {
|
||||
/* Add Subtree */
|
||||
|
@ -1638,7 +1638,7 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
|
|||
break;
|
||||
case REGISTRATION_UPDATE:
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO,"Reg Update: PDSN=%s",
|
||||
tvb_ip_to_str(tvb, 8));
|
||||
tvb_ip_to_str(pinfo->pool, tvb, 8));
|
||||
if (tree) {
|
||||
/* Add Subtree */
|
||||
ti = proto_tree_add_item(tree, proto_a11, tvb, offset, -1, ENC_NA);
|
||||
|
@ -1667,7 +1667,7 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
|
|||
break;
|
||||
case REGISTRATION_ACK:
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "Reg Ack: PCF=%s Status=%u",
|
||||
tvb_ip_to_str(tvb, 8),
|
||||
tvb_ip_to_str(pinfo->pool, tvb, 8),
|
||||
tvb_get_guint8(tvb,3));
|
||||
if (tree) {
|
||||
/* Add Subtree */
|
||||
|
@ -1701,7 +1701,7 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
|
|||
break;
|
||||
case SESSION_UPDATE: /* IOS4.3 */
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO,"Ses Update: PDSN=%s",
|
||||
tvb_ip_to_str(tvb, 8));
|
||||
tvb_ip_to_str(pinfo->pool, tvb, 8));
|
||||
if (tree) {
|
||||
/* Add Subtree */
|
||||
ti = proto_tree_add_item(tree, proto_a11, tvb, offset, -1, ENC_NA);
|
||||
|
@ -1730,7 +1730,7 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
|
|||
break;
|
||||
case SESSION_ACK: /* IOS4.3 */
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "Ses Upd Ack: PCF=%s, Status=%u",
|
||||
tvb_ip_to_str(tvb, 8),
|
||||
tvb_ip_to_str(pinfo->pool, tvb, 8),
|
||||
tvb_get_guint8(tvb,3));
|
||||
if (tree) {
|
||||
/* Add Subtree */
|
||||
|
@ -1764,8 +1764,8 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
|
|||
break;
|
||||
case CAPABILITIES_INFO: /* IOS5.1 */
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "Cap Info: PDSN=%s, PCF=%s",
|
||||
tvb_ip_to_str(tvb, 8),
|
||||
tvb_ip_to_str(tvb, 12));
|
||||
tvb_ip_to_str(pinfo->pool, tvb, 8),
|
||||
tvb_ip_to_str(pinfo->pool, tvb, 12));
|
||||
if (tree) {
|
||||
/* Add Subtree */
|
||||
ti = proto_tree_add_item(tree, proto_a11, tvb, offset, -1, ENC_NA);
|
||||
|
@ -1798,7 +1798,7 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
|
|||
break;
|
||||
case CAPABILITIES_INFO_ACK: /* IOS5.1 */
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "Cap Info Ack: PCF=%s",
|
||||
tvb_ip_to_str(tvb, 8));
|
||||
tvb_ip_to_str(pinfo->pool, tvb, 8));
|
||||
if (tree) {
|
||||
/* Add Subtree */
|
||||
ti = proto_tree_add_item(tree, proto_a11, tvb, offset, -1, ENC_NA);
|
||||
|
@ -1827,7 +1827,7 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
|
|||
break;
|
||||
case BC_SERVICE_REQUEST:
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "Service Request: PCF=%s ",
|
||||
tvb_ip_to_str(tvb, offset + 8));
|
||||
tvb_ip_to_str(pinfo->pool, tvb, offset + 8));
|
||||
|
||||
if (tree) {
|
||||
ti = proto_tree_add_item(tree, proto_a11, tvb, offset, -1, ENC_NA);
|
||||
|
@ -1854,7 +1854,7 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
|
|||
|
||||
case BC_SERVICE_REPLY:
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "Service Response: BSN=%s ",
|
||||
tvb_ip_to_str(tvb, offset + 8));
|
||||
tvb_ip_to_str(pinfo->pool, tvb, offset + 8));
|
||||
|
||||
if (tree) {
|
||||
ti = proto_tree_add_item(tree, proto_a11, tvb, offset, -1, ENC_NA);
|
||||
|
@ -1884,7 +1884,7 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
|
|||
break;
|
||||
case BC_REGISTRATION_REQUEST:
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "BC Reg Request: BSN=%s ",
|
||||
tvb_ip_to_str(tvb, offset + 8));
|
||||
tvb_ip_to_str(pinfo->pool, tvb, offset + 8));
|
||||
|
||||
if (tree) {
|
||||
ti = proto_tree_add_item(tree, proto_a11, tvb, offset, -1, ENC_NA);
|
||||
|
@ -1926,7 +1926,7 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
|
|||
|
||||
case BC_REGISTRATION_REPLY:
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "BC Reg Reply: BSN=%s, Code=%u",
|
||||
tvb_ip_to_str(tvb, offset + 8),
|
||||
tvb_ip_to_str(pinfo->pool, tvb, offset + 8),
|
||||
tvb_get_guint8(tvb, offset + 1));
|
||||
|
||||
if (tree) {
|
||||
|
@ -1963,7 +1963,7 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
|
|||
break;
|
||||
case BC_REGISTRATION_UPDATE:
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO,"BC Reg Update: BSN=%s",
|
||||
tvb_ip_to_str(tvb, offset + 8));
|
||||
tvb_ip_to_str(pinfo->pool, tvb, offset + 8));
|
||||
if (tree) {
|
||||
/* Add Subtree */
|
||||
ti = proto_tree_add_item(tree, proto_a11, tvb, offset, -1, ENC_NA);
|
||||
|
@ -1992,7 +1992,7 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
|
|||
break;
|
||||
case BC_REGISTRATION_ACK:
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "BC Reg Acknowledge: PCF=%s Status=%u",
|
||||
tvb_ip_to_str(tvb, offset + 8),
|
||||
tvb_ip_to_str(pinfo->pool, tvb, offset + 8),
|
||||
tvb_get_guint8(tvb, offset + 3));
|
||||
if (tree) {
|
||||
/* Add Subtree */
|
||||
|
|
|
@ -4984,13 +4984,13 @@ dissect_afp_server_status(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
|
|||
type = tvb_get_guint8(tvb, offset +1);
|
||||
switch (type) {
|
||||
case 1: /* IP */
|
||||
sub_tree = proto_tree_add_subtree_format(adr_tree, tvb, offset, len, ett_afp_server_addr_line, NULL, "IP: %s", tvb_ip_to_str(tvb, offset+2));
|
||||
sub_tree = proto_tree_add_subtree_format(adr_tree, tvb, offset, len, ett_afp_server_addr_line, NULL, "IP: %s", tvb_ip_to_str(pinfo->pool, tvb, offset+2));
|
||||
break;
|
||||
case 2: /* IP + port */
|
||||
port = tvb_get_ntohs(tvb, offset+6);
|
||||
sub_tree = proto_tree_add_subtree_format(adr_tree, tvb, offset, len,
|
||||
ett_afp_server_addr_line, NULL,
|
||||
"IP: %s:%d", tvb_ip_to_str(tvb, offset+2), port);
|
||||
"IP: %s:%d", tvb_ip_to_str(pinfo->pool, tvb, offset+2), port);
|
||||
break;
|
||||
case 3: /* DDP, atalk_addr_to_str want host order not network */
|
||||
net = tvb_get_ntohs(tvb, offset+2);
|
||||
|
|
|
@ -1235,7 +1235,7 @@ dissect_aim_tlv_value_uint16 (proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb
|
|||
static int
|
||||
dissect_aim_tlv_value_ipv4 (proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb, packet_info *pinfo _U_)
|
||||
{
|
||||
proto_item_set_text(ti, "Value: %s", tvb_ip_to_str(tvb, 0));
|
||||
proto_item_set_text(ti, "Value: %s", tvb_ip_to_str(pinfo->pool, tvb, 0));
|
||||
return 4;
|
||||
}
|
||||
|
||||
|
|
|
@ -221,7 +221,7 @@ dissect_aodv_rreq(tvbuff_t *tvb, packet_info *pinfo, proto_tree *aodv_tree,
|
|||
col_append_fstr(pinfo->cinfo, COL_INFO, ", D: %s", dest_addr_v6);
|
||||
offset += INET6_ADDRLEN;
|
||||
} else {
|
||||
dest_addr_v4 = tvb_ip_to_str(tvb, offset);
|
||||
dest_addr_v4 = tvb_ip_to_str(pinfo->pool, tvb, offset);
|
||||
if (aodv_tree) {
|
||||
proto_tree_add_item(aodv_tree, hf_aodv_dest_ip, tvb, offset, 4,
|
||||
ENC_BIG_ENDIAN);
|
||||
|
@ -246,7 +246,7 @@ dissect_aodv_rreq(tvbuff_t *tvb, packet_info *pinfo, proto_tree *aodv_tree,
|
|||
col_append_fstr(pinfo->cinfo, COL_INFO, ", O: %s", orig_addr_v6);
|
||||
offset += INET6_ADDRLEN;
|
||||
} else {
|
||||
orig_addr_v4 = tvb_ip_to_str(tvb, offset);
|
||||
orig_addr_v4 = tvb_ip_to_str(pinfo->pool, tvb, offset);
|
||||
if (aodv_tree) {
|
||||
proto_tree_add_item(aodv_tree, hf_aodv_orig_ip, tvb, offset, 4,
|
||||
ENC_BIG_ENDIAN);
|
||||
|
@ -320,7 +320,7 @@ dissect_aodv_rrep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *aodv_tree,
|
|||
col_append_fstr(pinfo->cinfo, COL_INFO, ", D: %s", dest_addr_v6);
|
||||
offset += INET6_ADDRLEN;
|
||||
} else {
|
||||
dest_addr_v4 = tvb_ip_to_str(tvb, offset);
|
||||
dest_addr_v4 = tvb_ip_to_str(pinfo->pool, tvb, offset);
|
||||
if (aodv_tree) {
|
||||
proto_tree_add_item(aodv_tree, hf_aodv_dest_ip, tvb, offset, 4,
|
||||
ENC_BIG_ENDIAN);
|
||||
|
@ -346,7 +346,7 @@ dissect_aodv_rrep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *aodv_tree,
|
|||
col_append_fstr(pinfo->cinfo, COL_INFO, ", O: %s", orig_addr_v6);
|
||||
offset += INET6_ADDRLEN;
|
||||
} else {
|
||||
orig_addr_v4 = tvb_ip_to_str(tvb, offset);
|
||||
orig_addr_v4 = tvb_ip_to_str(pinfo->pool, tvb, offset);
|
||||
if (aodv_tree) {
|
||||
proto_tree_add_item(aodv_tree, hf_aodv_orig_ip, tvb, offset, 4,
|
||||
ENC_BIG_ENDIAN);
|
||||
|
|
|
@ -79,7 +79,7 @@ dissect_aruba_adp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
|
|||
case ADP_RESPONSE:
|
||||
|
||||
proto_tree_add_item(aruba_adp_tree, hf_adp_switchip, tvb, 6, 4, ENC_BIG_ENDIAN);
|
||||
switchip = tvb_ip_to_str(tvb, 6);
|
||||
switchip = tvb_ip_to_str(pinfo->pool, tvb, 6);
|
||||
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "ADP Response Switch IP: %s", switchip);
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ dissect_aruba_iap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
|
|||
offset += 4;
|
||||
|
||||
proto_tree_add_item(aruba_iap_tree, hf_iap_vc_ip, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, " VC IP: %s", tvb_ip_to_str(tvb, offset));
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, " VC IP: %s", tvb_ip_to_str(pinfo->pool, tvb, offset));
|
||||
offset += 4;
|
||||
|
||||
proto_tree_add_item(aruba_iap_tree, hf_iap_model, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
|
|
|
@ -446,7 +446,7 @@ dissect_papi_license_manager(tvbuff_t *tvb, packet_info *pinfo, guint offset, pr
|
|||
switch (type) {
|
||||
case 1: /* IP Address */
|
||||
proto_tree_add_item(licmgr_subtree, hf_papi_licmgr_ip, tvb, offset, 4, ENC_NA);
|
||||
proto_item_append_text(tlv_item, ": %s", tvb_ip_to_str(tvb, offset));
|
||||
proto_item_append_text(tlv_item, ": %s", tvb_ip_to_str(pinfo->pool, tvb, offset));
|
||||
break;
|
||||
case 2: /* Serial Number */
|
||||
proto_tree_add_item(licmgr_subtree, hf_papi_licmgr_serial_number, tvb, offset, 32, ENC_ASCII|ENC_NA);
|
||||
|
|
|
@ -201,7 +201,7 @@ static void
|
|||
dissect_ipv4_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
|
||||
{
|
||||
proto_tree_add_item(parameter_tree, hf_parameter_ipv4_address, parameter_tvb, IPV4_ADDRESS_OFFSET, IPV4_ADDRESS_LENGTH, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(parameter_item, " (%s)", tvb_ip_to_str(parameter_tvb, IPV4_ADDRESS_OFFSET));
|
||||
proto_item_append_text(parameter_item, " (%s)", tvb_ip_to_str(wmem_packet_scope(), parameter_tvb, IPV4_ADDRESS_OFFSET));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -141,7 +141,7 @@ dissect_ath(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
|||
*/
|
||||
if (hlen == 4) {
|
||||
proto_tree_add_item(ath_tree, hf_ath_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
info_srcaddr = tvb_ip_to_str(tvb, offset);
|
||||
info_srcaddr = tvb_ip_to_str(pinfo->pool, tvb, offset);
|
||||
} else if (hlen == 6) {
|
||||
proto_tree_add_item(ath_tree, hf_ath_ipv6, tvb, offset, 6, ENC_NA);
|
||||
info_srcaddr = tvb_ip6_to_str(tvb, offset);
|
||||
|
@ -241,7 +241,7 @@ dissect_ath(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
|||
*/
|
||||
if (hlen == 4) {
|
||||
proto_tree_add_item(ath_tree, hf_ath_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
info_srcaddr = tvb_ip_to_str(tvb, offset);
|
||||
info_srcaddr = tvb_ip_to_str(pinfo->pool, tvb, offset);
|
||||
} else if (hlen == 6) {
|
||||
proto_tree_add_item(ath_tree, hf_ath_ipv6, tvb, offset, 6, ENC_NA);
|
||||
info_srcaddr = tvb_ip6_to_str(tvb, offset);
|
||||
|
|
|
@ -168,7 +168,7 @@ static int do_auto_rp_map(tvbuff_t *tvb, int offset, proto_tree *auto_rp_tree)
|
|||
/* sizeof map header + n * sizeof encoded group addresses */
|
||||
map_tree = proto_tree_add_subtree_format(auto_rp_tree, tvb, offset, 6 + group_count * 6,
|
||||
ett_auto_rp_map, NULL,
|
||||
"RP %s: %u group%s", tvb_ip_to_str(tvb, offset),
|
||||
"RP %s: %u group%s", tvb_ip_to_str(wmem_packet_scope(), tvb, offset),
|
||||
group_count, plurality(group_count, "", "s"));
|
||||
|
||||
proto_tree_add_item(map_tree, hf_auto_rp_rp_addr, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
|
@ -186,7 +186,7 @@ static int do_auto_rp_map(tvbuff_t *tvb, int offset, proto_tree *auto_rp_tree)
|
|||
mask_len = tvb_get_guint8(tvb, offset + 1);
|
||||
grp_tree = proto_tree_add_subtree_format(map_tree, tvb, offset, 6,
|
||||
ett_auto_rp_group, NULL, "Group %s/%u (%s)",
|
||||
tvb_ip_to_str(tvb, offset + 2), mask_len,
|
||||
tvb_ip_to_str(wmem_packet_scope(), tvb, offset + 2), mask_len,
|
||||
val_to_str_const(sign&AUTO_RP_SIGN_MASK, auto_rp_mask_sign_vals, ""));
|
||||
|
||||
proto_tree_add_uint(grp_tree, hf_auto_rp_prefix_sgn, tvb, offset, 1, sign);
|
||||
|
|
|
@ -315,7 +315,7 @@ static void dissect_bat_hna(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t
|
|||
if (PTREE_DATA(tree)->visible) {
|
||||
ti = proto_tree_add_protocol_format(tree, proto_bat_plugin, tvb, 0, 5,
|
||||
"B.A.T.M.A.N. HNA: %s/%d",
|
||||
tvb_ip_to_str(tvb, 0), hna_netmask);
|
||||
tvb_ip_to_str(pinfo->pool, tvb, 0), hna_netmask);
|
||||
} else {
|
||||
ti = proto_tree_add_item(tree, proto_bat_plugin, tvb, 0, 5, ENC_NA);
|
||||
}
|
||||
|
|
|
@ -3297,7 +3297,7 @@ decode_bgp_rd(wmem_allocator_t *pool, tvbuff_t *tvb, gint offset)
|
|||
tvb_get_ntohl(tvb, offset + 4));
|
||||
break;
|
||||
case FORMAT_IP_LOC:
|
||||
wmem_strbuf_append_printf(strbuf, "%s:%u", tvb_ip_to_str(tvb, offset + 2),
|
||||
wmem_strbuf_append_printf(strbuf, "%s:%u", tvb_ip_to_str(pool, tvb, offset + 2),
|
||||
tvb_get_ntohs(tvb, offset + 6));
|
||||
break ;
|
||||
case FORMAT_AS4_LOC:
|
||||
|
@ -4125,7 +4125,7 @@ decode_mp_next_hop_ipv4(tvbuff_t *tvb, proto_tree *tree, gint offset, packet_inf
|
|||
switch (nhlen) {
|
||||
case (FT_IPv4_LEN):
|
||||
proto_tree_add_item(tree, hf_bgp_update_path_attribute_mp_reach_nlri_next_hop_ipv4, tvb, offset, FT_IPv4_LEN, ENC_BIG_ENDIAN);
|
||||
wmem_strbuf_append(strbuf, tvb_ip_to_str(tvb, offset));
|
||||
wmem_strbuf_append(strbuf, tvb_ip_to_str(pinfo->pool, tvb, offset));
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
|
@ -4156,7 +4156,7 @@ decode_mp_next_hop_vpn_ipv4(tvbuff_t *tvb, proto_tree *tree, gint offset, packet
|
|||
wmem_strbuf_append_printf(strbuf, " RD=%s", rd_string);
|
||||
offset += BGP_ROUTE_DISTINGUISHER_SIZE;
|
||||
proto_tree_add_item(tree, hf_bgp_update_path_attribute_mp_reach_nlri_next_hop_ipv4, tvb, offset, FT_IPv4_LEN, ENC_BIG_ENDIAN);
|
||||
wmem_strbuf_append_printf(strbuf, " IPv4=%s", tvb_ip_to_str(tvb, offset));
|
||||
wmem_strbuf_append_printf(strbuf, " IPv4=%s", tvb_ip_to_str(pinfo->pool, tvb, offset));
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
|
@ -6639,7 +6639,7 @@ decode_prefix_MP(proto_tree *tree, int hf_path_id, int hf_addr4, int hf_addr6,
|
|||
break;
|
||||
case BGP_EXT_COM_RT_IP4:
|
||||
wmem_strbuf_append_printf(comm_strbuf, "%s:%u",
|
||||
tvb_ip_to_str(tvb, offset + 1 + 6),
|
||||
tvb_ip_to_str(pinfo->pool, tvb, offset + 1 + 6),
|
||||
tvb_get_ntohs(tvb, offset + 1 + 10));
|
||||
break;
|
||||
case BGP_EXT_COM_RT_AS4:
|
||||
|
@ -6967,7 +6967,7 @@ decode_prefix_MP(proto_tree *tree, int hf_path_id, int hf_addr4, int hf_addr6,
|
|||
(offset + 8 + length) - start_offset,
|
||||
wmem_strbuf_get_str(stack_strbuf), "Label Stack=%s RD=%s:%u, IPv6=%s/%u",
|
||||
wmem_strbuf_get_str(stack_strbuf),
|
||||
tvb_ip_to_str(tvb, offset + 2),
|
||||
tvb_ip_to_str(pinfo->pool, tvb, offset + 2),
|
||||
tvb_get_ntohs(tvb, offset + 6),
|
||||
address_to_str(pinfo->pool, &addr), plen);
|
||||
total_length = (1 + labnum * 3 + 8) + length;
|
||||
|
@ -7878,7 +7878,7 @@ dissect_bgp_update_ext_com(proto_tree *parent_tree, tvbuff_t *tvb, guint16 tlen,
|
|||
|
||||
proto_item_set_text(community_item, "%s: %s:%u",
|
||||
val_to_str(com_stype_low_byte, bgpext_com_stype_tr_IP4, "Unknown subtype 0x%02x"),
|
||||
tvb_ip_to_str(tvb, offset+2), tvb_get_ntohs(tvb,offset+6));
|
||||
tvb_ip_to_str(pinfo->pool, tvb, offset+2), tvb_get_ntohs(tvb,offset+6));
|
||||
|
||||
switch(com_stype_low_byte) {
|
||||
case BGP_EXT_COM_STYPE_IP4_OSPF_RID:
|
||||
|
@ -7899,7 +7899,7 @@ dissect_bgp_update_ext_com(proto_tree *parent_tree, tvbuff_t *tvb, guint16 tlen,
|
|||
|
||||
proto_item_set_text(community_item, "%s: %s:%u",
|
||||
val_to_str(com_stype_low_byte, bgpext_com_stype_ntr_IP4, "Unknown subtype 0x%02x"),
|
||||
tvb_ip_to_str(tvb, offset+2), tvb_get_ntohs(tvb,offset+6));
|
||||
tvb_ip_to_str(pinfo->pool, tvb, offset+2), tvb_get_ntohs(tvb,offset+6));
|
||||
break;
|
||||
|
||||
case BGP_EXT_COM_TYPE_HIGH_TR_AS4: /* Transitive Four-Octet AS-Specific Extended Community */
|
||||
|
@ -7968,7 +7968,7 @@ dissect_bgp_update_ext_com(proto_tree *parent_tree, tvbuff_t *tvb, guint16 tlen,
|
|||
tfs_get_string(tvb_get_guint8(tvb,offset+7) & BGP_OSPF_RTYPE_METRIC_TYPE, &tfs_ospf_rt_mt));
|
||||
|
||||
proto_item_append_text(community_item, " Area: %s, Type: %s",
|
||||
tvb_ip_to_str(tvb,offset+2),
|
||||
tvb_ip_to_str(pinfo->pool, tvb,offset+2),
|
||||
val_to_str_const(tvb_get_guint8(tvb,offset+6), bgpext_com_ospf_rtype, "Unknown"));
|
||||
}
|
||||
break;
|
||||
|
@ -8224,7 +8224,7 @@ dissect_bgp_update_ext_com(proto_tree *parent_tree, tvbuff_t *tvb, guint16 tlen,
|
|||
tfs_get_string(tvb_get_guint8(tvb,offset+7) & BGP_OSPF_RTYPE_METRIC_TYPE, &tfs_ospf_rt_mt));
|
||||
|
||||
proto_item_append_text(community_item, " Area: %s, Type: %s",
|
||||
tvb_ip_to_str(tvb,offset+2),
|
||||
tvb_ip_to_str(pinfo->pool, tvb,offset+2),
|
||||
val_to_str_const(tvb_get_guint8(tvb,offset+6), bgpext_com_ospf_rtype, "Unknown"));
|
||||
}
|
||||
break;
|
||||
|
@ -8232,7 +8232,7 @@ dissect_bgp_update_ext_com(proto_tree *parent_tree, tvbuff_t *tvb, guint16 tlen,
|
|||
case BGP_EXT_COM_STYPE_EXP_OSPF_RID:
|
||||
proto_tree_add_item(community_tree, hf_bgp_ext_com_value_ospf_rid, tvb, offset+2, 4, ENC_BIG_ENDIAN);
|
||||
|
||||
proto_item_append_text(community_item, " %s", tvb_ip_to_str(tvb, offset+2));
|
||||
proto_item_append_text(community_item, " %s", tvb_ip_to_str(pinfo->pool, tvb, offset+2));
|
||||
break;
|
||||
|
||||
case BGP_EXT_COM_STYPE_EXP_OSPF_DID:
|
||||
|
@ -8473,7 +8473,7 @@ dissect_bgp_update_ext_com(proto_tree *parent_tree, tvbuff_t *tvb, guint16 tlen,
|
|||
proto_tree_add_item(community_tree, hf_bgp_ext_com_eigrp_e_rid, tvb, offset+4, 4, ENC_BIG_ENDIAN);
|
||||
|
||||
proto_item_append_text(community_tree, " ASN: %u, RID: %s",
|
||||
tvb_get_ntohs(tvb, offset+2), tvb_ip_to_str(tvb, offset+4));
|
||||
tvb_get_ntohs(tvb, offset+2), tvb_ip_to_str(pinfo->pool, tvb, offset+4));
|
||||
break;
|
||||
|
||||
case BGP_EXT_COM_STYPE_EXP_EIGRP_EPM:
|
||||
|
@ -8487,7 +8487,7 @@ dissect_bgp_update_ext_com(proto_tree *parent_tree, tvbuff_t *tvb, guint16 tlen,
|
|||
|
||||
case BGP_EXT_COM_STYPE_EXP_EIGRP_RID:
|
||||
proto_tree_add_item(community_tree, hf_bgp_ext_com_eigrp_rid, tvb, offset+4, 4, ENC_NA);
|
||||
proto_item_append_text(community_tree, " %s", tvb_ip_to_str(tvb, offset+4));
|
||||
proto_item_append_text(community_tree, " %s", tvb_ip_to_str(pinfo->pool, tvb, offset+4));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@ -8559,7 +8559,7 @@ dissect_bgp_update_pmsi_attr(packet_info *pinfo, proto_tree *parent_tree, tvbuff
|
|||
proto_tree_add_item(tunnel_id_tree, hf_bgp_pmsi_tunnel_rsvp_p2mp_tunnel_id, tvb, offset+11, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(tunnel_id_tree, hf_bgp_pmsi_tunnel_rsvp_p2mp_ext_tunnel_idv4, tvb, offset+13, 4, ENC_NA);
|
||||
proto_item_append_text(tunnel_id_item, ": Id %u, Ext Id %s",
|
||||
tvb_get_ntohs(tvb, offset+11), tvb_ip_to_str(tvb, offset+13));
|
||||
tvb_get_ntohs(tvb, offset+11), tvb_ip_to_str(pinfo->pool, tvb, offset+13));
|
||||
break;
|
||||
case PMSI_TUNNEL_MLDP_P2MP:
|
||||
case PMSI_TUNNEL_MLDP_MP2MP:
|
||||
|
@ -8581,7 +8581,7 @@ dissect_bgp_update_pmsi_attr(packet_info *pinfo, proto_tree *parent_tree, tvbuff
|
|||
proto_tree_add_item(tunnel_id_tree, hf_bgp_pmsi_tunnel_mldp_fec_el_opa_value_rn, tvb, offset+14+rn_addr_length, 4, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(tunnel_id_item, ": Type: %s root node: %s Id: %u",
|
||||
val_to_str_const(tvb_get_guint8(tvb, offset+5), fec_types_vals, "Unknown"),
|
||||
tvb_ip_to_str(tvb, offset+9),
|
||||
tvb_ip_to_str(pinfo->pool, tvb, offset+9),
|
||||
tvb_get_ntohl(tvb, offset+14+rn_addr_length));
|
||||
} else if (opaque_value_type == PMSI_MLDP_FEC_TYPE_EXT_TYPE) {
|
||||
proto_tree_add_item(tunnel_id_tree, hf_bgp_pmsi_tunnel_mldp_fec_el_opa_val_ext_type, tvb, offset+12+rn_addr_length, 2, ENC_BIG_ENDIAN);
|
||||
|
@ -8600,27 +8600,27 @@ dissect_bgp_update_pmsi_attr(packet_info *pinfo, proto_tree *parent_tree, tvbuff
|
|||
proto_tree_add_item(tunnel_id_tree, hf_bgp_pmsi_tunnel_pimssm_root_node, tvb, offset+5, 4, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(tunnel_id_tree, hf_bgp_pmsi_tunnel_pimssm_pmc_group, tvb, offset+9, 4, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(tunnel_id_item, ": < %s, %s >",
|
||||
tvb_ip_to_str(tvb, offset+5),
|
||||
tvb_ip_to_str(tvb, offset+9));
|
||||
tvb_ip_to_str(pinfo->pool, tvb, offset+5),
|
||||
tvb_ip_to_str(pinfo->pool, tvb, offset+9));
|
||||
break;
|
||||
case PMSI_TUNNEL_PIMSM:
|
||||
proto_tree_add_item(tunnel_id_tree, hf_bgp_pmsi_tunnel_pimsm_sender, tvb, offset+5, 4, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(tunnel_id_tree, hf_bgp_pmsi_tunnel_pimsm_pmc_group, tvb, offset+9, 4, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(tunnel_id_item, ": < %s, %s >",
|
||||
tvb_ip_to_str(tvb, offset+5),
|
||||
tvb_ip_to_str(tvb, offset+9));
|
||||
tvb_ip_to_str(pinfo->pool, tvb, offset+5),
|
||||
tvb_ip_to_str(pinfo->pool, tvb, offset+9));
|
||||
break;
|
||||
case PMSI_TUNNEL_BIDIR_PIM:
|
||||
proto_tree_add_item(tunnel_id_tree, hf_bgp_pmsi_tunnel_pimbidir_sender, tvb, offset+5, 4, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(tunnel_id_tree, hf_bgp_pmsi_tunnel_pimbidir_pmc_group, tvb, offset+9, 4, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(tunnel_id_item, ": < %s, %s >",
|
||||
tvb_ip_to_str(tvb, offset+5),
|
||||
tvb_ip_to_str(tvb, offset+9));
|
||||
tvb_ip_to_str(pinfo->pool, tvb, offset+5),
|
||||
tvb_ip_to_str(pinfo->pool, tvb, offset+9));
|
||||
break;
|
||||
case PMSI_TUNNEL_INGRESS:
|
||||
proto_tree_add_item(tunnel_id_tree, hf_bgp_pmsi_tunnel_ingress_rep_addr, tvb, offset+5, 4, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(tunnel_id_item, ": tunnel end point -> %s",
|
||||
tvb_ip_to_str(tvb, offset+5));
|
||||
tvb_ip_to_str(pinfo->pool, tvb, offset+5));
|
||||
break;
|
||||
default:
|
||||
expert_add_info_format(pinfo, pmsi_tunnel_type_item, &ei_bgp_attr_pmsi_tunnel_type,
|
||||
|
@ -8874,7 +8874,7 @@ dissect_bgp_path_attr(proto_tree *subtree, tvbuff_t *tvb, guint16 path_attr_len,
|
|||
} else {
|
||||
proto_tree_add_item(subtree2, hf_bgp_update_path_attribute_next_hop, tvb,
|
||||
o + i + aoff, 4, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(ti_pa, ": %s ", tvb_ip_to_str(tvb, o + i + aoff));
|
||||
proto_item_append_text(ti_pa, ": %s ", tvb_ip_to_str(pinfo->pool, tvb, o + i + aoff));
|
||||
}
|
||||
break;
|
||||
case BGPTYPE_MULTI_EXIT_DISC:
|
||||
|
@ -8930,7 +8930,7 @@ dissect_bgp_path_attr(proto_tree *subtree, tvbuff_t *tvb, guint16 path_attr_len,
|
|||
o + i + aoff + asn_len, 4, ENC_BIG_ENDIAN);
|
||||
|
||||
proto_item_append_text(ti_pa, ": AS: %u origin: %s", aggregator_as,
|
||||
tvb_ip_to_str(tvb, o + i + aoff + asn_len));
|
||||
tvb_ip_to_str(pinfo->pool, tvb, o + i + aoff + asn_len));
|
||||
}
|
||||
break;
|
||||
case BGPTYPE_COMMUNITIES:
|
||||
|
@ -8995,7 +8995,7 @@ dissect_bgp_path_attr(proto_tree *subtree, tvbuff_t *tvb, guint16 path_attr_len,
|
|||
} else {
|
||||
proto_tree_add_item(subtree2, hf_bgp_update_path_attribute_originator_id, tvb,
|
||||
o + i + aoff, tlen, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(ti_pa, ": %s ", tvb_ip_to_str(tvb, o + i + aoff));
|
||||
proto_item_append_text(ti_pa, ": %s ", tvb_ip_to_str(pinfo->pool, tvb, o + i + aoff));
|
||||
}
|
||||
break;
|
||||
case BGPTYPE_MP_REACH_NLRI:
|
||||
|
@ -9117,8 +9117,8 @@ dissect_bgp_path_attr(proto_tree *subtree, tvbuff_t *tvb, guint16 path_attr_len,
|
|||
while (q < end) {
|
||||
proto_tree_add_item(cluster_list_tree, hf_bgp_update_path_attribute_cluster_id,
|
||||
tvb, q - 3 + aoff, 4, ENC_NA);
|
||||
proto_item_append_text(ti, " %s", tvb_ip_to_str(tvb, q-3+aoff));
|
||||
proto_item_append_text(ti_pa, " %s", tvb_ip_to_str(tvb, q-3+aoff));
|
||||
proto_item_append_text(ti, " %s", tvb_ip_to_str(pinfo->pool, tvb, q-3+aoff));
|
||||
proto_item_append_text(ti_pa, " %s", tvb_ip_to_str(pinfo->pool, tvb, q-3+aoff));
|
||||
q += 4;
|
||||
}
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ dissect_bcp_connect_data(proto_tree *bcp_tree, tvbuff_t *tvb, gint flags)
|
|||
bcp_subtree = proto_tree_add_subtree_format(bcp_tree, tvb, offset, len, ett_bcp_data, NULL,
|
||||
"BCP Connect Request: Name=%s IpAddr=%s",
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 16, BCP_NAME_LEN, ENC_ASCII),
|
||||
tvb_ip_to_str(tvb, offset + 12));
|
||||
tvb_ip_to_str(wmem_packet_scope(), tvb, offset + 12));
|
||||
|
||||
proto_tree_add_item(bcp_subtree, hf_bcp_connectreq_lenin, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
offset += 2;
|
||||
|
@ -231,8 +231,8 @@ dissect_bcp_search_data(proto_tree *bcp_tree, tvbuff_t *tvb, gint flags)
|
|||
case BCP_SEARCH_IPADDR:
|
||||
bcp_subtree = proto_tree_add_subtree_format(bcp_tree, tvb, offset, len, ett_bcp_data, NULL,
|
||||
"BCP Search Request: IpAddrFirst=%s, IpAddrLast=%s",
|
||||
tvb_ip_to_str(tvb, offset + 8),
|
||||
tvb_ip_to_str(tvb, offset + 12)
|
||||
tvb_ip_to_str(wmem_packet_scope(), tvb, offset + 8),
|
||||
tvb_ip_to_str(wmem_packet_scope(), tvb, offset + 12)
|
||||
);
|
||||
break;
|
||||
|
||||
|
@ -278,7 +278,7 @@ dissect_bcp_search_data(proto_tree *bcp_tree, tvbuff_t *tvb, gint flags)
|
|||
bcp_subtree = proto_tree_add_subtree_format(bcp_tree, tvb, offset, len, ett_bcp_data, NULL,
|
||||
"BCP Search Response: Name=%s, IpAddr=%s Error=%d",
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 16, BCP_NAME_LEN, ENC_ASCII),
|
||||
tvb_ip_to_str(tvb, offset + 12),
|
||||
tvb_ip_to_str(wmem_packet_scope(), tvb, offset + 12),
|
||||
tvb_get_letohl(tvb, offset)
|
||||
);
|
||||
|
||||
|
@ -320,7 +320,7 @@ dissect_bcp_identify_data(proto_tree *bcp_tree, tvbuff_t *tvb)
|
|||
bcp_subtree = proto_tree_add_subtree_format(bcp_tree, tvb, offset, len, ett_bcp_data, NULL,
|
||||
"BCP Identify Request: Name=%s, IpAddr=%s",
|
||||
tvb_get_string_enc(wmem_packet_scope(), tvb, offset + 12, BCP_NAME_LEN, ENC_ASCII),
|
||||
tvb_ip_to_str(tvb, offset + 8)
|
||||
tvb_ip_to_str(wmem_packet_scope(), tvb, offset + 8)
|
||||
);
|
||||
|
||||
proto_tree_add_item(bcp_subtree, hf_bcp_identify_error, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
|
|
|
@ -274,7 +274,7 @@ dissect_bt_dht_values(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
|
|||
value_tree = proto_item_add_subtree( value_ti, ett_bt_dht_peers);
|
||||
|
||||
proto_tree_add_item( value_tree, hf_ip, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(value_ti, " (IP/Port: %s", tvb_ip_to_str(tvb, offset));
|
||||
proto_item_append_text(value_ti, " (IP/Port: %s", tvb_ip_to_str(pinfo->pool, tvb, offset));
|
||||
proto_tree_add_item( value_tree, hf_port, tvb, offset+4, 2, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(value_ti, ":%u)", tvb_get_ntohs( tvb, offset+4 ));
|
||||
}
|
||||
|
@ -362,7 +362,7 @@ dissect_bt_dht_nodes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
|
|||
else
|
||||
{
|
||||
proto_tree_add_item( node_tree, hf_ip, tvb, offset+20, 4, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(node_ti, ", IPv4/Port: %s", tvb_ip_to_str(tvb, offset+20));
|
||||
proto_item_append_text(node_ti, ", IPv4/Port: %s", tvb_ip_to_str(pinfo->pool, tvb, offset+20));
|
||||
|
||||
proto_tree_add_item( node_tree, hf_port, tvb, offset+24, 2, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(node_ti, ":%u)", tvb_get_ntohs( tvb, offset+24 ));
|
||||
|
@ -451,7 +451,7 @@ dissect_bencoded_dict_entry(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
|
||||
if(len == 4) {
|
||||
proto_tree_add_item(sub_tree, hf_ip, tvb, offset, len, ENC_BIG_ENDIAN);
|
||||
val = tvb_ip_to_str(tvb, offset);
|
||||
val = tvb_ip_to_str(pinfo->pool, tvb, offset);
|
||||
offset += len;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -2551,7 +2551,7 @@ dissect_sdp_type(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
|
|||
switch (attribute) {
|
||||
case 0x306:
|
||||
proto_tree_add_item(next_tree, hf_wap_network_address, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
wmem_strbuf_append(info_buf, tvb_ip_to_str(tvb, offset));
|
||||
wmem_strbuf_append(info_buf, tvb_ip_to_str(pinfo->pool, tvb, offset));
|
||||
break;
|
||||
case 0x307:
|
||||
proto_tree_add_item(next_tree, hf_wap_gateway, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
|
|
|
@ -475,7 +475,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
|||
if (tree) {
|
||||
tlv_tree = proto_tree_add_subtree_format(cdp_tree, tvb, offset,
|
||||
length, ett_cdp_tlv, NULL, "ODR Default gateway: %s",
|
||||
tvb_ip_to_str(tvb, offset+4));
|
||||
tvb_ip_to_str(pinfo->pool, tvb, offset+4));
|
||||
proto_tree_add_item(tlv_tree, hf_cdp_tlvtype, tvb, offset + TLV_TYPE, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(tlv_tree, hf_cdp_tlvlength, tvb, offset + TLV_LENGTH, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(tlv_tree, hf_cdp_odr_default_gateway, tvb, offset+4, 4, ENC_BIG_ENDIAN);
|
||||
|
@ -497,7 +497,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
|
|||
length -= 4;
|
||||
while (length > 0) {
|
||||
proto_tree_add_ipv4_format_value(tlv_tree, hf_cdp_ip_prefix, tvb, offset, 5, tvb_get_ntohl(tvb, offset),
|
||||
"%s/%u", tvb_ip_to_str(tvb, offset), tvb_get_guint8(tvb,offset+4));
|
||||
"%s/%u", tvb_ip_to_str(pinfo->pool, tvb, offset), tvb_get_guint8(tvb,offset+4));
|
||||
offset += 5;
|
||||
length -= 5;
|
||||
}
|
||||
|
@ -1118,7 +1118,7 @@ dissect_address_tlv(tvbuff_t *tvb, packet_info* pinfo, int offset, int length, p
|
|||
case NLPID_IP:
|
||||
if (address_length == 4) {
|
||||
/* The address is an IP address. */
|
||||
proto_item_set_text(ti, "IP address: %s", tvb_ip_to_str(tvb, offset));
|
||||
proto_item_set_text(ti, "IP address: %s", tvb_ip_to_str(pinfo->pool, tvb, offset));
|
||||
hf_addr = hf_cdp_nrgyz_ip_address;
|
||||
proto_tree_add_item(address_tree, hf_cdp_nrgyz_ip_address, tvb, offset, address_length, ENC_BIG_ENDIAN);
|
||||
}
|
||||
|
@ -1214,7 +1214,7 @@ dissect_nrgyz_tlv(tvbuff_t *tvb, packet_info* pinfo, int offset, guint16 length,
|
|||
etree = proto_tree_add_subtree_format(tree, tvb, offset,
|
||||
tlvl, ett_cdp_nrgyz_tlv, NULL, "EnergyWise %s: %s port %u",
|
||||
ttext,
|
||||
tvb_ip_to_str(tvb, offset + 12),
|
||||
tvb_ip_to_str(pinfo->pool, tvb, offset + 12),
|
||||
tvb_get_ntohs(tvb, offset + 10)
|
||||
);
|
||||
break;
|
||||
|
|
|
@ -1906,7 +1906,7 @@ guint c_dissect_sockaddr(proto_tree *root, c_sockaddr *out,
|
|||
switch (d.af) {
|
||||
case C_IPv4:
|
||||
d.port = tvb_get_ntohs(tvb, off+2);
|
||||
d.addr_str = tvb_ip_to_str(tvb, off+4);
|
||||
d.addr_str = tvb_ip_to_str(wmem_packet_scope(), tvb, off+4);
|
||||
|
||||
proto_tree_add_item(tree, hf_port, tvb, off+2, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(tree, hf_addr_ipv4, tvb, off+4, 4, ENC_BIG_ENDIAN);
|
||||
|
|
|
@ -302,7 +302,7 @@ dissect_slarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
|
|||
addr = tvb_get_ipv4(tvb, 4);
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "%s, from %s, mask %s",
|
||||
val_to_str(code, slarp_ptype_vals, "Unknown (%d)"),
|
||||
get_hostname(addr), tvb_ip_to_str(tvb, 8));
|
||||
get_hostname(addr), tvb_ip_to_str(pinfo->pool, tvb, 8));
|
||||
if (tree) {
|
||||
proto_tree_add_uint(slarp_tree, hf_slarp_ptype, tvb, 0, 4, code);
|
||||
proto_tree_add_item(slarp_tree, hf_slarp_address, tvb, 4, 4, ENC_BIG_ENDIAN);
|
||||
|
|
|
@ -1349,7 +1349,7 @@ static void dissect_cops_object_data(tvbuff_t *tvb, packet_info *pinfo, guint32
|
|||
ifindex = tvb_get_ntohl(tvb, offset + 4);
|
||||
itf_tree = proto_tree_add_subtree_format(tree, tvb, offset, 8, ett_cops_itf, NULL,
|
||||
"Contents: IPv4 address %s, ifIndex: %u",
|
||||
tvb_ip_to_str(tvb, offset), ifindex);
|
||||
tvb_ip_to_str(pinfo->pool, tvb, offset), ifindex);
|
||||
proto_tree_add_item(itf_tree,
|
||||
(c_num == COPS_OBJ_IN_INT) ? hf_cops_in_int_ipv4 : hf_cops_out_int_ipv4,
|
||||
tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
|
@ -1484,7 +1484,7 @@ static void dissect_cops_object_data(tvbuff_t *tvb, packet_info *pinfo, guint32
|
|||
tcp_port = tvb_get_ntohs(tvb, offset + 4 + 2);
|
||||
pdp_tree = proto_tree_add_subtree_format(tree, tvb, offset, 8, ett_cops_pdp, NULL,
|
||||
"Contents: IPv4 address %s, TCP Port Number: %u",
|
||||
tvb_ip_to_str(tvb, offset), tcp_port);
|
||||
tvb_ip_to_str(pinfo->pool, tvb, offset), tcp_port);
|
||||
proto_tree_add_item(pdp_tree,
|
||||
(c_num == COPS_OBJ_PDPREDIRADDR) ? hf_cops_pdprediraddr_ipv4 : hf_cops_lastpdpaddr_ipv4,
|
||||
tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
|
|
|
@ -399,7 +399,7 @@ epm_dissect_tower_data (tvbuff_t *tvb, int offset,
|
|||
|
||||
case PROTO_ID_IP: /* this one is always big endian */
|
||||
proto_tree_add_item(tr, hf_epm_proto_ip, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(tr, "IP:%s", tvb_ip_to_str(tvb, offset));
|
||||
proto_item_append_text(tr, "IP:%s", tvb_ip_to_str(pinfo->pool, tvb, offset));
|
||||
break;
|
||||
|
||||
case PROTO_ID_RPC_CO:
|
||||
|
|
|
@ -362,7 +362,7 @@ PIDL_dissect_ipv4address(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr
|
|||
}
|
||||
proto_tree_add_item(tree, hfindex, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
if (param & PIDL_SET_COL_INFO) {
|
||||
const char *ip = tvb_ip_to_str(tvb, offset);
|
||||
const char *ip = tvb_ip_to_str(pinfo->pool, tvb, offset);
|
||||
header_field_info *hf_info = proto_registrar_get_nth(hfindex);
|
||||
proto_item_append_text(proto_tree_get_parent(tree), " %s:%s", hf_info->name, ip);
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO," %s:%s", hf_info->name, ip);
|
||||
|
|
|
@ -458,7 +458,7 @@ dissect_dhcpfo_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da
|
|||
expert_add_info_format(pinfo, oi, &ei_dhcpfo_bad_length, "assigned ip address is not 4 bytes long");
|
||||
break;
|
||||
}
|
||||
proto_item_append_text(oi, ", %s ", tvb_ip_to_str(tvb, offset));
|
||||
proto_item_append_text(oi, ", %s ", tvb_ip_to_str(pinfo->pool, tvb, offset));
|
||||
|
||||
proto_tree_add_item(option_tree,
|
||||
hf_dhcpfo_assigned_ip_address, tvb, offset,
|
||||
|
|
|
@ -1744,7 +1744,7 @@ dhcp_handle_basic_types(packet_info *pinfo, proto_tree *tree, proto_item *item,
|
|||
proto_tree_add_item(tree, *hf_default->ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
|
||||
/* Show IP address in root of option */
|
||||
proto_item_append_text(tree, " (%s)", tvb_ip_to_str(tvb, offset));
|
||||
proto_item_append_text(tree, " (%s)", tvb_ip_to_str(pinfo->pool, tvb, offset));
|
||||
consumed = 4;
|
||||
break;
|
||||
|
||||
|
@ -2991,7 +2991,7 @@ dissect_dhcpopt_classless_static_route(tvbuff_t *tvb, packet_info *pinfo, proto_
|
|||
proto_item_append_text(route_item, ".0");
|
||||
proto_item_append_text(route_item, "/%d", mask_width);
|
||||
}
|
||||
proto_item_append_text(route_item, "-%s", tvb_ip_to_str(tvb, offset));
|
||||
proto_item_append_text(route_item, "-%s", tvb_ip_to_str(pinfo->pool, tvb, offset));
|
||||
offset += 4;
|
||||
}
|
||||
|
||||
|
@ -6771,7 +6771,7 @@ dissect_packetcable_ietf_ccc(packet_info *pinfo, proto_item *v_ti, proto_tree *v
|
|||
return (optend);
|
||||
}
|
||||
proto_item_append_text(vti, "%s (%u byte%s%s)",
|
||||
tvb_ip_to_str(tvb, suboptoff),
|
||||
tvb_ip_to_str(pinfo->pool, tvb, suboptoff),
|
||||
subopt_len,
|
||||
plurality(subopt_len, "", "s"),
|
||||
subopt_len != 4 ? " [Invalid]" : "");
|
||||
|
@ -6799,7 +6799,7 @@ dissect_packetcable_ietf_ccc(packet_info *pinfo, proto_item *v_ti, proto_tree *v
|
|||
return (optend);
|
||||
}
|
||||
proto_item_append_text(vti, "%s (%u byte%s%s)",
|
||||
tvb_ip_to_str(tvb, suboptoff),
|
||||
tvb_ip_to_str(pinfo->pool, tvb, suboptoff),
|
||||
subopt_len,
|
||||
plurality(subopt_len, "", "s"),
|
||||
subopt_len != 5 ? " [Invalid]" : "");
|
||||
|
|
|
@ -417,7 +417,7 @@ decode_dataitem_v4conn(tvbuff_t *tvb, int offset, proto_item *pi, proto_tree *pt
|
|||
offset+=DLEP_DIT_V4CONN_FLAGS_LEN;
|
||||
|
||||
proto_tree_add_item(pt, hf_dlep_dataitem_v4conn_addr, tvb, offset, FT_IPv4_LEN, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(pi, ", Addr: %s", tvb_ip_to_str(tvb, offset));
|
||||
proto_item_append_text(pi, ", Addr: %s", tvb_ip_to_str(pinfo->pool, tvb, offset));
|
||||
offset+=FT_IPv4_LEN;
|
||||
|
||||
if (len == DLEP_DIT_V4CONN_WPORT_LEN) {
|
||||
|
@ -567,7 +567,7 @@ decode_dataitem_v4addr(tvbuff_t *tvb, int offset, proto_item *pi, proto_tree *pt
|
|||
offset+=DLEP_DIT_V4ADDR_FLAGS_LEN;
|
||||
|
||||
proto_tree_add_item(pt, hf_dlep_dataitem_v4addr_addr, tvb, offset, FT_IPv4_LEN, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(pi, " %s", tvb_ip_to_str(tvb, offset));
|
||||
proto_item_append_text(pi, " %s", tvb_ip_to_str(pinfo->pool, tvb, offset));
|
||||
offset+=FT_IPv4_LEN;
|
||||
|
||||
if (len != DLEP_DIT_V4ADDR_LEN)
|
||||
|
@ -620,7 +620,7 @@ decode_dataitem_v4subnet(tvbuff_t *tvb, int offset, proto_item *pi, proto_tree *
|
|||
offset+=DLEP_DIT_V4SUBNET_FLAGS_LEN;
|
||||
|
||||
proto_tree_add_item(pt, hf_dlep_dataitem_v4subnet_subnet, tvb, offset, FT_IPv4_LEN, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(pi, " %s", tvb_ip_to_str(tvb, offset));
|
||||
proto_item_append_text(pi, " %s", tvb_ip_to_str(pinfo->pool, tvb, offset));
|
||||
offset+=FT_IPv4_LEN;
|
||||
|
||||
proto_tree_add_item_ret_uint(pt, hf_dlep_dataitem_v4subnet_prefixlen, tvb, offset, 1, ENC_BIG_ENDIAN, &prefixlen);
|
||||
|
|
|
@ -2089,7 +2089,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset,
|
|||
{
|
||||
const char *addr;
|
||||
|
||||
addr = tvb_ip_to_str(tvb, cur_offset);
|
||||
addr = tvb_ip_to_str(pinfo->pool, tvb, cur_offset);
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, " %s", addr);
|
||||
|
||||
proto_item_append_text(trr, ", addr %s", addr);
|
||||
|
@ -2256,7 +2256,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset,
|
|||
proto_item *ti_wks;
|
||||
wmem_strbuf_t *bitnames = wmem_strbuf_new_label(wmem_packet_scope());
|
||||
|
||||
wks_addr = tvb_ip_to_str(tvb, cur_offset);
|
||||
wks_addr = tvb_ip_to_str(pinfo->pool, tvb, cur_offset);
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, " %s", wks_addr);
|
||||
proto_item_append_text(trr, ", addr %s", wks_addr);
|
||||
proto_tree_add_item(rr_tree, hf_dns_wks_address, tvb, cur_offset, 4, ENC_BIG_ENDIAN);
|
||||
|
@ -3565,7 +3565,7 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset,
|
|||
case DNS_SVCB_KEY_IPV4HINT:
|
||||
for (svc_param_offset = 0; svc_param_offset < svc_param_length; svc_param_offset += 4) {
|
||||
proto_tree_add_item(svcb_param_tree, hf_dns_svcb_param_ipv4hint_ip, tvb, cur_offset, 4, ENC_NA);
|
||||
proto_item_append_text(svcb_param_ti, "%c%s", (svc_param_offset == 0 ? '=' : ','), tvb_ip_to_str(tvb, cur_offset));
|
||||
proto_item_append_text(svcb_param_ti, "%c%s", (svc_param_offset == 0 ? '=' : ','), tvb_ip_to_str(pinfo->pool, tvb, cur_offset));
|
||||
cur_offset += 4;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -223,7 +223,7 @@ dissect_dsr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
proto_item_append_text(ti_hoplist, " :");
|
||||
for(i=0;i<(opt_len-4)/4;i++) {
|
||||
proto_tree_add_item(opt_hoplist_tree, hf_dsr_opt_rreq_address, tvb, offset_in_option, 4, ENC_NA); /* Opt rreq address */
|
||||
proto_item_append_text(ti_hoplist, " %s", tvb_ip_to_str(tvb, offset_in_option));
|
||||
proto_item_append_text(ti_hoplist, " %s", tvb_ip_to_str(pinfo->pool, tvb, offset_in_option));
|
||||
offset_in_option += 4;
|
||||
}
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ dissect_dsr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
proto_item_append_text(ti_hoplist, " :");
|
||||
for(i=0;i<(opt_len-1)/4;i++) {
|
||||
proto_tree_add_item(opt_hoplist_tree, hf_dsr_opt_rrep_address, tvb, offset_in_option, 4, ENC_NA); /*Opt rrep address */
|
||||
proto_item_append_text(ti_hoplist, " %s", tvb_ip_to_str(tvb, offset_in_option));
|
||||
proto_item_append_text(ti_hoplist, " %s", tvb_ip_to_str(pinfo->pool, tvb, offset_in_option));
|
||||
offset_in_option += 4;
|
||||
}
|
||||
}
|
||||
|
@ -376,7 +376,7 @@ dissect_dsr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
proto_item_append_text(ti_hoplist, " :");
|
||||
for(i=0;i<(opt_len-2)/4;i++) {
|
||||
proto_tree_add_item(opt_hoplist_tree, hf_dsr_opt_srcrt_address, tvb, offset_in_option , 4, ENC_NA); /* Opt srcrt addresses */
|
||||
proto_item_append_text(ti_hoplist, " %s", tvb_ip_to_str(tvb, offset_in_option));
|
||||
proto_item_append_text(ti_hoplist, " %s", tvb_ip_to_str(pinfo->pool, tvb, offset_in_option));
|
||||
offset_in_option += 4;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -350,7 +350,7 @@ dissect_dtpt_sockaddr(tvbuff_t *tvb, guint offset, proto_tree *tree, int hfindex
|
|||
proto_tree_add_item(sockaddr_tree, hf_dtpt_sockaddr_address,
|
||||
tvb, offset+4,4,ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(sockaddr_tree, hf_dtpt_padding, tvb, offset+8, 8, ENC_NA);
|
||||
proto_item_append_text(sockaddr_item, ": %s:%d", tvb_ip_to_str(tvb,offset+4), port);
|
||||
proto_item_append_text(sockaddr_item, ": %s:%d", tvb_ip_to_str(wmem_packet_scope(), tvb,offset+4), port);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -373,7 +373,7 @@ dissect_dtpt_sockaddr(tvbuff_t *tvb, guint offset, proto_tree *tree, int hfindex
|
|||
proto_tree_add_item(sockaddr_tree, hf_dtpt_sockaddr_address,
|
||||
tvb, offset+10,4,ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(sockaddr_tree, hf_dtpt_padding, tvb, offset+14, 16, ENC_NA);
|
||||
proto_item_append_text(sockaddr_item, ": %s:%d", tvb_ip_to_str(tvb,offset+10), port);
|
||||
proto_item_append_text(sockaddr_item, ": %s:%d", tvb_ip_to_str(wmem_packet_scope(), tvb,offset+10), port);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -207,7 +207,7 @@ static void
|
|||
dissect_ipv4_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
|
||||
{
|
||||
proto_tree_add_item(parameter_tree, hf_parameter_ipv4_address, parameter_tvb, IPV4_ADDRESS_OFFSET, IPV4_ADDRESS_LENGTH, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(parameter_item, " (%s)", tvb_ip_to_str(parameter_tvb, IPV4_ADDRESS_OFFSET));
|
||||
proto_item_append_text(parameter_item, " (%s)", tvb_ip_to_str(wmem_packet_scope(), parameter_tvb, IPV4_ADDRESS_OFFSET));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -4897,7 +4897,7 @@ decode_gtp_user_addr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_
|
|||
switch (pdp_typ) {
|
||||
case 0x21:
|
||||
proto_tree_add_item(ext_tree_user, hf_gtp_user_ipv4, tvb, offset + 5, 4, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(te, " : %s", tvb_ip_to_str(tvb, offset + 5));
|
||||
proto_item_append_text(te, " : %s", tvb_ip_to_str(pinfo->pool, tvb, offset + 5));
|
||||
break;
|
||||
case 0x57:
|
||||
proto_tree_add_item(ext_tree_user, hf_gtp_user_ipv6, tvb, offset + 5, 16, ENC_NA);
|
||||
|
@ -4909,7 +4909,7 @@ decode_gtp_user_addr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_
|
|||
memset(&ipv6, 0, sizeof(ws_in6_addr));
|
||||
proto_tree_add_item(ext_tree_user, hf_gtp_user_ipv4, tvb, offset + 5, 4, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_ipv6_format_value(ext_tree_user, hf_gtp_user_ipv6, tvb, offset + 9, 0, &ipv6, "dynamic");
|
||||
proto_item_append_text(te, " : %s / dynamic", tvb_ip_to_str(tvb, offset + 5));
|
||||
proto_item_append_text(te, " : %s / dynamic", tvb_ip_to_str(pinfo->pool, tvb, offset + 5));
|
||||
} else if (length == 18) {
|
||||
proto_tree_add_ipv4_format_value(ext_tree_user, hf_gtp_user_ipv6, tvb, offset + 5, 0, 0, "dynamic");
|
||||
proto_tree_add_item(ext_tree_user, hf_gtp_user_ipv6, tvb, offset + 5, 16, ENC_NA);
|
||||
|
@ -4917,7 +4917,7 @@ decode_gtp_user_addr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_
|
|||
} else if (length == 22) {
|
||||
proto_tree_add_item(ext_tree_user, hf_gtp_user_ipv4, tvb, offset + 5, 4, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(ext_tree_user, hf_gtp_user_ipv6, tvb, offset + 9, 16, ENC_NA);
|
||||
proto_item_append_text(te, " : %s / %s", tvb_ip_to_str(tvb, offset + 5),
|
||||
proto_item_append_text(te, " : %s / %s", tvb_ip_to_str(pinfo->pool, tvb, offset + 5),
|
||||
tvb_ip6_to_str(tvb, offset + 9));
|
||||
} else {
|
||||
proto_tree_add_expert_format(ext_tree_user, pinfo, &ei_gtp_ext_length_mal, tvb, offset + 3, length, "Wrong length indicated. Expected 6, 18 or 22, got %u", length);
|
||||
|
@ -6026,7 +6026,7 @@ decode_gtp_gsn_addr_common(tvbuff_t * tvb, int offset, packet_info * pinfo _U_,
|
|||
proto_tree_add_item(ext_tree_gsn_addr, hf_ipv4, tvb, offset + 3, 4, ENC_BIG_ENDIAN);
|
||||
if (hf_ipv4 != hf_gtp_gsn_ipv4)
|
||||
proto_item_set_hidden(proto_tree_add_item(ext_tree_gsn_addr, hf_gtp_gsn_ipv4, tvb, offset + 3, 4, ENC_BIG_ENDIAN));
|
||||
proto_item_append_text(te, "%s", tvb_ip_to_str(tvb, offset + 3));
|
||||
proto_item_append_text(te, "%s", tvb_ip_to_str(pinfo->pool, tvb, offset + 3));
|
||||
set_address_tvb(gsn_address, AT_IPv4, 4, tvb, offset + 3);
|
||||
break;
|
||||
case 5:
|
||||
|
@ -6038,7 +6038,7 @@ decode_gtp_gsn_addr_common(tvbuff_t * tvb, int offset, packet_info * pinfo _U_,
|
|||
proto_tree_add_item(ext_tree_gsn_addr, hf_ipv4, tvb, offset + 4, 4, ENC_BIG_ENDIAN);
|
||||
if (hf_ipv4 != hf_gtp_gsn_ipv4)
|
||||
proto_item_set_hidden(proto_tree_add_item(ext_tree_gsn_addr, hf_gtp_gsn_ipv4, tvb, offset + 4, 4, ENC_BIG_ENDIAN));
|
||||
proto_item_append_text(te, "%s", tvb_ip_to_str(tvb, offset + 4));
|
||||
proto_item_append_text(te, "%s", tvb_ip_to_str(pinfo->pool, tvb, offset + 4));
|
||||
set_address_tvb(gsn_address, AT_IPv6, 16, tvb, offset + 4);
|
||||
break;
|
||||
case 16:
|
||||
|
@ -6447,7 +6447,7 @@ decode_gtp_chrg_addr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_
|
|||
switch (length) {
|
||||
case 4:
|
||||
proto_tree_add_item(ext_tree_chrg_addr, hf_gtp_chrg_ipv4, tvb, offset + 3, 4, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(te, "%s", tvb_ip_to_str(tvb, offset + 3));
|
||||
proto_item_append_text(te, "%s", tvb_ip_to_str(pinfo->pool, tvb, offset + 3));
|
||||
break;
|
||||
case 16:
|
||||
proto_tree_add_item(ext_tree_chrg_addr, hf_gtp_chrg_ipv6, tvb, offset + 3, 16, ENC_NA);
|
||||
|
@ -8945,7 +8945,7 @@ decode_gtp_node_addr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_
|
|||
switch (length) {
|
||||
case 4:
|
||||
proto_tree_add_item(ext_tree_node_addr, hf_gtp_node_ipv4, tvb, offset + 3, 4, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(te, "%s", tvb_ip_to_str(tvb, offset + 3));
|
||||
proto_item_append_text(te, "%s", tvb_ip_to_str(pinfo->pool, tvb, offset + 3));
|
||||
break;
|
||||
case 16:
|
||||
proto_tree_add_item(ext_tree_node_addr, hf_gtp_node_ipv6, tvb, offset + 3, 16, ENC_NA);
|
||||
|
|
|
@ -2276,7 +2276,7 @@ dissect_gtpv2_ip_address(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
|
|||
if (length == 4)
|
||||
{
|
||||
proto_tree_add_item(tree, hf_gtpv2_ip_address_ipv4, tvb, offset, length, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(item, "IPv4 %s", tvb_ip_to_str(tvb, offset));
|
||||
proto_item_append_text(item, "IPv4 %s", tvb_ip_to_str(pinfo->pool, tvb, offset));
|
||||
}
|
||||
else if (length == 16)
|
||||
{
|
||||
|
@ -2596,7 +2596,7 @@ dissect_gtpv2_paa(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto
|
|||
return;
|
||||
}
|
||||
proto_tree_add_item(tree, hf_gtpv2_pdn_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(item, "IPv4 %s", tvb_ip_to_str(tvb, offset));
|
||||
proto_item_append_text(item, "IPv4 %s", tvb_ip_to_str(pinfo->pool, tvb, offset));
|
||||
break;
|
||||
case 2:
|
||||
/* IPv6*/
|
||||
|
@ -2636,7 +2636,7 @@ dissect_gtpv2_paa(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, proto
|
|||
proto_item_append_text(item, "IPv6 %s, ", tvb_ip6_to_str(tvb, offset));
|
||||
offset += 16;
|
||||
proto_tree_add_item(tree, hf_gtpv2_pdn_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(item, "IPv4 %s", tvb_ip_to_str(tvb, offset));
|
||||
proto_item_append_text(item, "IPv4 %s", tvb_ip_to_str(pinfo->pool, tvb, offset));
|
||||
break;
|
||||
case 4: /* Non IP */
|
||||
case 5: /* Ethernet */
|
||||
|
@ -3348,7 +3348,7 @@ dissect_gtpv2_f_teid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_
|
|||
{
|
||||
ipv4 = wmem_new0(pinfo->pool, address);
|
||||
proto_tree_add_item(tree, hf_gtpv2_f_teid_ipv4, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(item, ", IPv4 %s", tvb_ip_to_str(tvb, offset));
|
||||
proto_item_append_text(item, ", IPv4 %s", tvb_ip_to_str(pinfo->pool, tvb, offset));
|
||||
set_address_tvb(ipv4, AT_IPv4, 4, tvb, offset);
|
||||
offset += 4;
|
||||
}
|
||||
|
@ -6233,7 +6233,7 @@ dissect_gtpv2_mbms_ip_mc_dist(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
|
|||
if ((tvb_get_guint8(tvb, offset) & 0x3f) == 4) {
|
||||
offset += 1;
|
||||
proto_tree_add_item(tree, hf_gtpv2_mbms_ip_mc_dist_addrv4, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(item, " IPv4 Dist %s", tvb_ip_to_str(tvb, offset));
|
||||
proto_item_append_text(item, " IPv4 Dist %s", tvb_ip_to_str(pinfo->pool, tvb |