More name changes.
Add ep_ to routines that may return ephemeral strings. Change "get_XXX" to "XXX_to_display" if the routine returns a formatted string if it can't get a name. Change-Id: Ia0e82784349752cf4285bf82788316c9588fdd88 Reviewed-on: https://code.wireshark.org/review/1217 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
c8f7e16b57
commit
97869f2dec
|
@ -2940,7 +2940,7 @@ manually_resolve_cleanup(void)
|
|||
}
|
||||
|
||||
gchar *
|
||||
get_udp_port(guint port)
|
||||
ep_udp_port_to_display(guint port)
|
||||
{
|
||||
|
||||
if (!gbl_resolv_flags.transport_name) {
|
||||
|
@ -2949,10 +2949,10 @@ get_udp_port(guint port)
|
|||
|
||||
return serv_name_lookup(port, PT_UDP);
|
||||
|
||||
} /* get_udp_port */
|
||||
} /* ep_udp_port_to_display */
|
||||
|
||||
gchar *
|
||||
get_dccp_port(guint port)
|
||||
ep_dccp_port_to_display(guint port)
|
||||
{
|
||||
|
||||
if (!gbl_resolv_flags.transport_name) {
|
||||
|
@ -2961,10 +2961,10 @@ get_dccp_port(guint port)
|
|||
|
||||
return serv_name_lookup(port, PT_DCCP);
|
||||
|
||||
} /* get_dccp_port */
|
||||
} /* ep_dccp_port_to_display */
|
||||
|
||||
gchar *
|
||||
get_tcp_port(guint port)
|
||||
ep_tcp_port_to_display(guint port)
|
||||
{
|
||||
|
||||
if (!gbl_resolv_flags.transport_name) {
|
||||
|
@ -2973,10 +2973,10 @@ get_tcp_port(guint port)
|
|||
|
||||
return serv_name_lookup(port, PT_TCP);
|
||||
|
||||
} /* get_tcp_port */
|
||||
} /* ep_tcp_port_to_display */
|
||||
|
||||
gchar *
|
||||
get_sctp_port(guint port)
|
||||
ep_sctp_port_to_display(guint port)
|
||||
{
|
||||
|
||||
if (!gbl_resolv_flags.transport_name) {
|
||||
|
@ -2985,7 +2985,7 @@ get_sctp_port(guint port)
|
|||
|
||||
return serv_name_lookup(port, PT_SCTP);
|
||||
|
||||
} /* get_sctp_port */
|
||||
} /* ep_sctp_port_to_display */
|
||||
|
||||
const gchar *
|
||||
ep_address_to_display(const address *addr)
|
||||
|
@ -3225,7 +3225,7 @@ tvb_get_manuf_name_if_known(tvbuff_t *tvb, gint offset)
|
|||
}
|
||||
|
||||
const gchar *
|
||||
get_eui64_name(const guint64 addr_eui64)
|
||||
ep_eui64_to_display(const guint64 addr_eui64)
|
||||
{
|
||||
gchar *cur, *name;
|
||||
guint8 *addr = (guint8 *)ep_alloc(8);
|
||||
|
@ -3240,11 +3240,11 @@ get_eui64_name(const guint64 addr_eui64)
|
|||
cur=ep_strdup_printf("%s_%02x:%02x:%02x:%02x:%02x", name, addr[3], addr[4], addr[5], addr[6], addr[7]);
|
||||
return cur;
|
||||
|
||||
} /* get_eui64_name */
|
||||
} /* ep_eui64_to_display */
|
||||
|
||||
|
||||
const gchar *
|
||||
get_eui64_name_if_known(const guint64 addr_eui64)
|
||||
ep_eui64_to_display_if_known(const guint64 addr_eui64)
|
||||
{
|
||||
gchar *cur, *name;
|
||||
guint8 *addr = (guint8 *)ep_alloc(8);
|
||||
|
@ -3259,7 +3259,7 @@ get_eui64_name_if_known(const guint64 addr_eui64)
|
|||
cur=ep_strdup_printf("%s_%02x:%02x:%02x:%02x:%02x", name, addr[3], addr[4], addr[5], addr[6], addr[7]);
|
||||
return cur;
|
||||
|
||||
} /* get_eui64_name_if_known */
|
||||
} /* ep_eui64_to_display_if_known */
|
||||
|
||||
#ifdef HAVE_C_ARES
|
||||
#define GHI_TIMEOUT (250 * 1000)
|
||||
|
|
|
@ -109,28 +109,28 @@ extern gchar *g_pipxnets_path;
|
|||
/* Functions in addr_resolv.c */
|
||||
|
||||
/*
|
||||
* get_udp_port() returns the port name corresponding to that UDP port,
|
||||
* ep_udp_port_to_display() returns the port name corresponding to that UDP port,
|
||||
* or the port number as a string if not found.
|
||||
*/
|
||||
WS_DLL_PUBLIC gchar *get_udp_port(guint port);
|
||||
WS_DLL_PUBLIC gchar *ep_udp_port_to_display(guint port);
|
||||
|
||||
/*
|
||||
* get_tcp_port() returns the port name corresponding to that TCP port,
|
||||
* ep_tcp_port_to_display() returns the port name corresponding to that TCP port,
|
||||
* or the port number as a string if not found.
|
||||
*/
|
||||
WS_DLL_PUBLIC gchar *get_tcp_port(guint port);
|
||||
WS_DLL_PUBLIC gchar *ep_tcp_port_to_display(guint port);
|
||||
|
||||
/*
|
||||
* get_dccp_port() returns the port name corresponding to that DCCP port,
|
||||
* ep_dccp_port_to_display() returns the port name corresponding to that DCCP port,
|
||||
* or the port number as a string if not found.
|
||||
*/
|
||||
extern gchar *get_dccp_port(guint port);
|
||||
extern gchar *ep_dccp_port_to_display(guint port);
|
||||
|
||||
/*
|
||||
* get_sctp_port() returns the port name corresponding to that SCTP port,
|
||||
* ep_sctp_port_to_display() returns the port name corresponding to that SCTP port,
|
||||
* or the port number as a string if not found.
|
||||
*/
|
||||
WS_DLL_PUBLIC gchar *get_sctp_port(guint port);
|
||||
WS_DLL_PUBLIC gchar *ep_sctp_port_to_display(guint port);
|
||||
|
||||
/* ep_address_to_display takes as input an "address", as defined in address.h */
|
||||
/* it returns a string that contains: */
|
||||
|
@ -223,12 +223,12 @@ WS_DLL_PUBLIC const gchar *tvb_get_manuf_name(tvbuff_t *tvb, gint offset);
|
|||
*/
|
||||
WS_DLL_PUBLIC const gchar *tvb_get_manuf_name_if_known(tvbuff_t *tvb, gint offset);
|
||||
|
||||
/* get_eui64_name returns "<vendor>_%02x:%02x:%02x:%02x:%02x:%02x" if the vendor code is known
|
||||
/* ep_eui64_to_display returns "<vendor>_%02x:%02x:%02x:%02x:%02x:%02x" if the vendor code is known
|
||||
"%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x" */
|
||||
extern const gchar *get_eui64_name(const guint64 addr);
|
||||
extern const gchar *ep_eui64_to_display(const guint64 addr);
|
||||
|
||||
/* get_eui64_name_if_known returns "<vendor>_%02x:%02x:%02x:%02x:%02x:%02x" if the vendor code is known else NULL */
|
||||
extern const gchar *get_eui64_name_if_known(const guint64 addr);
|
||||
/* ep_eui64_to_display_if_known returns "<vendor>_%02x:%02x:%02x:%02x:%02x:%02x" if the vendor code is known else NULL */
|
||||
extern const gchar *ep_eui64_to_display_if_known(const guint64 addr);
|
||||
|
||||
|
||||
/* get_ipxnet_name returns the logical name if found in an ipxnets file,
|
||||
|
|
|
@ -1696,7 +1696,7 @@ col_set_port(packet_info *pinfo, const int col, const gboolean is_res, const gbo
|
|||
switch (pinfo->ptype) {
|
||||
case PT_SCTP:
|
||||
if (is_res)
|
||||
g_strlcpy(pinfo->cinfo->col_buf[col], get_sctp_port(port), COL_MAX_LEN);
|
||||
g_strlcpy(pinfo->cinfo->col_buf[col], ep_sctp_port_to_display(port), COL_MAX_LEN);
|
||||
else
|
||||
guint32_to_str_buf(port, pinfo->cinfo->col_buf[col], COL_MAX_LEN);
|
||||
break;
|
||||
|
@ -1704,7 +1704,7 @@ col_set_port(packet_info *pinfo, const int col, const gboolean is_res, const gbo
|
|||
case PT_TCP:
|
||||
guint32_to_str_buf(port, pinfo->cinfo->col_expr.col_expr_val[col], COL_MAX_LEN);
|
||||
if (is_res)
|
||||
g_strlcpy(pinfo->cinfo->col_buf[col], get_tcp_port(port), COL_MAX_LEN);
|
||||
g_strlcpy(pinfo->cinfo->col_buf[col], ep_tcp_port_to_display(port), COL_MAX_LEN);
|
||||
else
|
||||
g_strlcpy(pinfo->cinfo->col_buf[col], pinfo->cinfo->col_expr.col_expr_val[col], COL_MAX_LEN);
|
||||
if (is_src)
|
||||
|
@ -1716,7 +1716,7 @@ col_set_port(packet_info *pinfo, const int col, const gboolean is_res, const gbo
|
|||
case PT_UDP:
|
||||
guint32_to_str_buf(port, pinfo->cinfo->col_expr.col_expr_val[col], COL_MAX_LEN);
|
||||
if (is_res)
|
||||
g_strlcpy(pinfo->cinfo->col_buf[col], get_udp_port(port), COL_MAX_LEN);
|
||||
g_strlcpy(pinfo->cinfo->col_buf[col], ep_udp_port_to_display(port), COL_MAX_LEN);
|
||||
else
|
||||
g_strlcpy(pinfo->cinfo->col_buf[col], pinfo->cinfo->col_expr.col_expr_val[col], COL_MAX_LEN);
|
||||
if (is_src)
|
||||
|
|
|
@ -652,14 +652,14 @@ dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
|
|||
proto_tree_add_uint_format_value(dccp_tree, hf_dccp_srcport, tvb,
|
||||
offset, 2, dccph->sport,
|
||||
"%s (%u)",
|
||||
get_dccp_port(dccph->sport),
|
||||
ep_dccp_port_to_display(dccph->sport),
|
||||
dccph->sport);
|
||||
if (dccp_summary_in_tree) {
|
||||
proto_item_append_text(dccp_item, ", Src Port: %s (%u)",
|
||||
get_dccp_port(dccph->sport), dccph->sport);
|
||||
ep_dccp_port_to_display(dccph->sport), dccph->sport);
|
||||
}
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO,
|
||||
"%s ", get_dccp_port(dccph->sport));
|
||||
"%s ", ep_dccp_port_to_display(dccph->sport));
|
||||
hidden_item =
|
||||
proto_tree_add_uint(dccp_tree, hf_dccp_port, tvb, offset, 2,
|
||||
dccph->sport);
|
||||
|
@ -670,14 +670,14 @@ dissect_dccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
|
|||
proto_tree_add_uint_format_value(dccp_tree, hf_dccp_dstport, tvb,
|
||||
offset, 2, dccph->dport,
|
||||
"%s (%u)",
|
||||
get_dccp_port(dccph->dport),
|
||||
ep_dccp_port_to_display(dccph->dport),
|
||||
dccph->dport);
|
||||
if (dccp_summary_in_tree) {
|
||||
proto_item_append_text(dccp_item, ", Dst Port: %s (%u)",
|
||||
get_dccp_port(dccph->dport), dccph->dport);
|
||||
ep_dccp_port_to_display(dccph->dport), dccph->dport);
|
||||
}
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, " > %s",
|
||||
get_dccp_port(dccph->dport));
|
||||
ep_dccp_port_to_display(dccph->dport));
|
||||
hidden_item =
|
||||
proto_tree_add_uint(dccp_tree, hf_dccp_port, tvb, offset, 2,
|
||||
dccph->dport);
|
||||
|
|
|
@ -1905,11 +1905,11 @@ dissect_dns_answer(tvbuff_t *tvb, int offsetx, int dns_data_offset,
|
|||
switch (protocol) {
|
||||
|
||||
case IP_PROTO_TCP:
|
||||
wmem_strbuf_append(bitnames, get_tcp_port(port_num));
|
||||
wmem_strbuf_append(bitnames, ep_tcp_port_to_display(port_num));
|
||||
break;
|
||||
|
||||
case IP_PROTO_UDP:
|
||||
wmem_strbuf_append(bitnames, get_udp_port(port_num));
|
||||
wmem_strbuf_append(bitnames, ep_udp_port_to_display(port_num));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -1889,13 +1889,13 @@ dissect_conn_desc(tvbuff_t *tvb, gint offset, circuit_t *circuit,
|
|||
tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
offset ++;
|
||||
if (port_item) {
|
||||
if (ip_proto==LSC_TCP && get_tcp_port(port)) {
|
||||
if (ip_proto==LSC_TCP && ep_tcp_port_to_display(port)) {
|
||||
proto_item_append_text(port_item, " (%s)",
|
||||
get_tcp_port(port));
|
||||
ep_tcp_port_to_display(port));
|
||||
}
|
||||
else if (ip_proto==LSC_UDP && get_udp_port(port)) {
|
||||
else if (ip_proto==LSC_UDP && ep_udp_port_to_display(port)) {
|
||||
proto_item_append_text(port_item, " (%s)",
|
||||
get_udp_port(port));
|
||||
ep_udp_port_to_display(port));
|
||||
}
|
||||
}
|
||||
store_lsc_msg_dissector(circuit, ip_proto, port);
|
||||
|
@ -1916,13 +1916,13 @@ dissect_conn_desc(tvbuff_t *tvb, gint offset, circuit_t *circuit,
|
|||
hf_dvbci_lsc_dst_port, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
offset +=2;
|
||||
if (port_item) {
|
||||
if (ip_proto==LSC_TCP && get_tcp_port(port)) {
|
||||
if (ip_proto==LSC_TCP && ep_tcp_port_to_display(port)) {
|
||||
proto_item_append_text(port_item, " (%s)",
|
||||
get_tcp_port(port));
|
||||
ep_tcp_port_to_display(port));
|
||||
}
|
||||
else if (ip_proto==LSC_UDP && get_udp_port(port)) {
|
||||
else if (ip_proto==LSC_UDP && ep_udp_port_to_display(port)) {
|
||||
proto_item_append_text(port_item, " (%s)",
|
||||
get_udp_port(port));
|
||||
ep_udp_port_to_display(port));
|
||||
}
|
||||
}
|
||||
store_lsc_msg_dissector(circuit, ip_proto, port);
|
||||
|
|
|
@ -742,9 +742,9 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
|
|||
SET_ADDRESS(&pinfo->dst, AT_EUI64, 8, &addr);
|
||||
if (tree) {
|
||||
proto_tree_add_item(ieee802154_tree, hf_ieee802154_dst64, tvb, offset, 8, ENC_LITTLE_ENDIAN);
|
||||
proto_item_append_text(proto_root, ", Dst: %s", get_eui64_name(packet->dst64));
|
||||
proto_item_append_text(proto_root, ", Dst: %s", ep_eui64_to_display(packet->dst64));
|
||||
}
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, ", Dst: %s", get_eui64_name(packet->dst64));
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, ", Dst: %s", ep_eui64_to_display(packet->dst64));
|
||||
offset += 8;
|
||||
}
|
||||
else if (packet->dst_addr_mode != IEEE802154_FCF_ADDR_NONE) {
|
||||
|
@ -850,10 +850,10 @@ dissect_ieee802154_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
|
|||
SET_ADDRESS(&pinfo->src, AT_EUI64, 8, &addr);
|
||||
if (tree) {
|
||||
proto_tree_add_item(ieee802154_tree, hf_ieee802154_src64, tvb, offset, 8, ENC_LITTLE_ENDIAN);
|
||||
proto_item_append_text(proto_root, ", Src: %s", get_eui64_name(packet->src64));
|
||||
proto_item_append_text(proto_root, ", Src: %s", ep_eui64_to_display(packet->src64));
|
||||
}
|
||||
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, ", Src: %s", get_eui64_name(packet->src64));
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, ", Src: %s", ep_eui64_to_display(packet->src64));
|
||||
offset += 8;
|
||||
}
|
||||
else if (packet->src_addr_mode != IEEE802154_FCF_ADDR_NONE) {
|
||||
|
|
|
@ -990,7 +990,7 @@ ipmi_fmt_channel(gchar *s, guint32 v)
|
|||
void
|
||||
ipmi_fmt_udpport(gchar *s, guint32 v)
|
||||
{
|
||||
g_snprintf(s, ITEM_LABEL_LENGTH, "%s (%d)", get_udp_port(v), v);
|
||||
g_snprintf(s, ITEM_LABEL_LENGTH, "%s (%d)", ep_udp_port_to_display(v), v);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <glib.h>
|
||||
|
||||
#include <epan/packet.h>
|
||||
#include <epan/addr_resolv.h> /* this is for get_hostname and get_udp_port */
|
||||
#include <epan/addr_resolv.h> /* this is for get_hostname and ep_udp_port_to_display */
|
||||
|
||||
void proto_register_tpcp(void);
|
||||
void proto_reg_handoff_tpcp(void);
|
||||
|
@ -134,7 +134,7 @@ dissect_tpcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
col_add_fstr(pinfo->cinfo, COL_INFO,"%s id %d CPort %s CIP %s SIP %s",
|
||||
val_to_str_const(tpcph.type, type_vals, "Unknown"),
|
||||
tpcph.id,
|
||||
get_udp_port(tpcph.cport),
|
||||
ep_udp_port_to_display(tpcph.cport),
|
||||
ip_to_str((guint8 *)&tpcph.caddr),
|
||||
ip_to_str((guint8 *)&tpcph.saddr));
|
||||
|
||||
|
@ -159,7 +159,7 @@ dissect_tpcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_tree_add_uint(tpcp_tree, hf_tpcp_id, tvb, 4, 2, tpcph.id);
|
||||
|
||||
proto_tree_add_uint_format_value(tpcp_tree, hf_tpcp_cport, tvb, 6, 2, tpcph.cport,
|
||||
"%s", get_udp_port(tpcph.cport));
|
||||
"%s", ep_udp_port_to_display(tpcph.cport));
|
||||
|
||||
proto_tree_add_ipv4(tpcp_tree, hf_tpcp_caddr, tvb, 8, 4, tpcph.caddr);
|
||||
|
||||
|
|
|
@ -204,8 +204,8 @@ dissect_rx_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
|
|||
"Destination Port: %s ",
|
||||
(unsigned long)seq,
|
||||
(unsigned long)callnumber,
|
||||
get_udp_port(pinfo->srcport),
|
||||
get_udp_port(pinfo->destport)
|
||||
ep_udp_port_to_display(pinfo->srcport),
|
||||
ep_udp_port_to_display(pinfo->destport)
|
||||
);
|
||||
|
||||
item = proto_tree_add_item(parent_tree, hf_rx_response, tvb, offset, -1, ENC_NA);
|
||||
|
@ -257,8 +257,8 @@ dissect_rx_abort(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int
|
|||
"Destination Port: %s ",
|
||||
(unsigned long)seq,
|
||||
(unsigned long)callnumber,
|
||||
get_udp_port(pinfo->srcport),
|
||||
get_udp_port(pinfo->destport)
|
||||
ep_udp_port_to_display(pinfo->srcport),
|
||||
ep_udp_port_to_display(pinfo->destport)
|
||||
);
|
||||
|
||||
item = proto_tree_add_item(parent_tree, hf_rx_abort, tvb, offset, -1, ENC_NA);
|
||||
|
@ -289,8 +289,8 @@ dissect_rx_challenge(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
|
|||
"Destination Port: %s ",
|
||||
(unsigned long)seq,
|
||||
(unsigned long)callnumber,
|
||||
get_udp_port(pinfo->srcport),
|
||||
get_udp_port(pinfo->destport)
|
||||
ep_udp_port_to_display(pinfo->srcport),
|
||||
ep_udp_port_to_display(pinfo->destport)
|
||||
);
|
||||
|
||||
item = proto_tree_add_item(parent_tree, hf_rx_challenge, tvb, offset, -1, ENC_NA);
|
||||
|
@ -329,8 +329,8 @@ dissect_rx_acks(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int
|
|||
"Destination Port: %s ",
|
||||
(unsigned long)seq,
|
||||
(unsigned long)callnumber,
|
||||
get_udp_port(pinfo->srcport),
|
||||
get_udp_port(pinfo->destport)
|
||||
ep_udp_port_to_display(pinfo->srcport),
|
||||
ep_udp_port_to_display(pinfo->destport)
|
||||
);
|
||||
|
||||
item = proto_tree_add_item(parent_tree, hf_rx_ack, tvb, offset, -1, ENC_NA);
|
||||
|
@ -550,8 +550,8 @@ dissect_rx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *dat
|
|||
"Destination Port: %s ",
|
||||
(unsigned long)seq,
|
||||
(unsigned long)callnumber,
|
||||
get_udp_port(pinfo->srcport),
|
||||
get_udp_port(pinfo->destport)
|
||||
ep_udp_port_to_display(pinfo->srcport),
|
||||
ep_udp_port_to_display(pinfo->destport)
|
||||
);
|
||||
break;
|
||||
case RX_PACKET_TYPE_CHALLENGE:
|
||||
|
|
|
@ -4376,8 +4376,8 @@ dissect_sctp_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolea
|
|||
if (show_port_numbers)
|
||||
sctp_item = proto_tree_add_protocol_format(tree, proto_sctp, tvb, 0, -1,
|
||||
"Stream Control Transmission Protocol, Src Port: %s (%u), Dst Port: %s (%u)",
|
||||
get_sctp_port(source_port), source_port,
|
||||
get_sctp_port(destination_port), destination_port);
|
||||
ep_sctp_port_to_display(source_port), source_port,
|
||||
ep_sctp_port_to_display(destination_port), destination_port);
|
||||
else
|
||||
sctp_item = proto_tree_add_item(tree, proto_sctp, tvb, 0, -1, ENC_NA);
|
||||
|
||||
|
|
|
@ -4113,13 +4113,13 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
tcph->th_sport = tvb_get_ntohs(tvb, offset);
|
||||
tcph->th_dport = tvb_get_ntohs(tvb, offset + 2);
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "%s \xe2\x86\x92 %s", /* UTF8_RIGHTWARDS_ARROW */
|
||||
get_tcp_port(tcph->th_sport), get_tcp_port(tcph->th_dport));
|
||||
ep_tcp_port_to_display(tcph->th_sport), ep_tcp_port_to_display(tcph->th_dport));
|
||||
if (tree) {
|
||||
if (tcp_summary_in_tree) {
|
||||
ti = proto_tree_add_protocol_format(tree, proto_tcp, tvb, 0, -1,
|
||||
"Transmission Control Protocol, Src Port: %s (%u), Dst Port: %s (%u)",
|
||||
get_tcp_port(tcph->th_sport), tcph->th_sport,
|
||||
get_tcp_port(tcph->th_dport), tcph->th_dport);
|
||||
ep_tcp_port_to_display(tcph->th_sport), tcph->th_sport,
|
||||
ep_tcp_port_to_display(tcph->th_dport), tcph->th_dport);
|
||||
}
|
||||
else {
|
||||
ti = proto_tree_add_item(tree, proto_tcp, tvb, 0, -1, ENC_NA);
|
||||
|
@ -4127,9 +4127,9 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
tcp_tree = proto_item_add_subtree(ti, ett_tcp);
|
||||
|
||||
proto_tree_add_uint_format_value(tcp_tree, hf_tcp_srcport, tvb, offset, 2, tcph->th_sport,
|
||||
"%s (%u)", get_tcp_port(tcph->th_sport), tcph->th_sport);
|
||||
"%s (%u)", ep_tcp_port_to_display(tcph->th_sport), tcph->th_sport);
|
||||
proto_tree_add_uint_format_value(tcp_tree, hf_tcp_dstport, tvb, offset + 2, 2, tcph->th_dport,
|
||||
"%s (%u)", get_tcp_port(tcph->th_dport), tcph->th_dport);
|
||||
"%s (%u)", ep_tcp_port_to_display(tcph->th_dport), tcph->th_dport);
|
||||
hidden_item = proto_tree_add_uint(tcp_tree, hf_tcp_port, tvb, offset, 2, tcph->th_sport);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
hidden_item = proto_tree_add_uint(tcp_tree, hf_tcp_port, tvb, offset + 2, 2, tcph->th_dport);
|
||||
|
@ -4432,13 +4432,13 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
if(tcph->th_flags & TH_SYN) {
|
||||
if(tcph->th_flags & TH_ACK) {
|
||||
expert_add_info_format(pinfo, tf_syn, &ei_tcp_connection_sack, "Connection establish acknowledge (SYN+ACK): server port %s", get_tcp_port(tcph->th_sport));
|
||||
expert_add_info_format(pinfo, tf_syn, &ei_tcp_connection_sack, "Connection establish acknowledge (SYN+ACK): server port %s", ep_tcp_port_to_display(tcph->th_sport));
|
||||
/* Save the server port to help determine dissector used */
|
||||
tcpd->server_port = tcph->th_sport;
|
||||
}
|
||||
else {
|
||||
expert_add_info_format(pinfo, tf_syn, &ei_tcp_connection_syn, "Connection establish request (SYN): server port %s",
|
||||
get_tcp_port(tcph->th_dport));
|
||||
ep_tcp_port_to_display(tcph->th_dport));
|
||||
/* Save the server port to help determine dissector used */
|
||||
tcpd->server_port = tcph->th_dport;
|
||||
}
|
||||
|
|
|
@ -461,18 +461,18 @@ dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 ip_proto)
|
|||
udph->uh_dport=tvb_get_ntohs(tvb, offset+2);
|
||||
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO, "Source port: %s Destination port: %s",
|
||||
get_udp_port(udph->uh_sport), get_udp_port(udph->uh_dport));
|
||||
ep_udp_port_to_display(udph->uh_sport), ep_udp_port_to_display(udph->uh_dport));
|
||||
|
||||
if (tree) {
|
||||
if (udp_summary_in_tree) {
|
||||
if (ip_proto == IP_PROTO_UDP) {
|
||||
ti = proto_tree_add_protocol_format(tree, hfi_udp->id, tvb, offset, 8,
|
||||
"User Datagram Protocol, Src Port: %s (%u), Dst Port: %s (%u)",
|
||||
get_udp_port(udph->uh_sport), udph->uh_sport, get_udp_port(udph->uh_dport), udph->uh_dport);
|
||||
ep_udp_port_to_display(udph->uh_sport), udph->uh_sport, ep_udp_port_to_display(udph->uh_dport), udph->uh_dport);
|
||||
} else {
|
||||
ti = proto_tree_add_protocol_format(tree, hfi_udplite->id, tvb, offset, 8,
|
||||
"Lightweight User Datagram Protocol, Src Port: %s (%u), Dst Port: %s (%u)",
|
||||
get_udp_port(udph->uh_sport), udph->uh_sport, get_udp_port(udph->uh_dport), udph->uh_dport);
|
||||
ep_udp_port_to_display(udph->uh_sport), udph->uh_sport, ep_udp_port_to_display(udph->uh_dport), udph->uh_dport);
|
||||
}
|
||||
} else {
|
||||
ti = proto_tree_add_item(tree, (ip_proto == IP_PROTO_UDP) ? hfi_udp : hfi_udplite, tvb, offset, 8, ENC_NA);
|
||||
|
@ -480,7 +480,7 @@ dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 ip_proto)
|
|||
udp_tree = proto_item_add_subtree(ti, ett_udp);
|
||||
|
||||
port_item = proto_tree_add_uint_format_value(udp_tree, hfi_udp_srcport.id, tvb, offset, 2, udph->uh_sport,
|
||||
"%s (%u)", get_udp_port(udph->uh_sport), udph->uh_sport);
|
||||
"%s (%u)", ep_udp_port_to_display(udph->uh_sport), udph->uh_sport);
|
||||
/* The beginning port number, 32768 + 666 (33434), is from LBL's traceroute.c source code and this code
|
||||
* further assumes that 3 attempts are made per hop */
|
||||
if ((udph->uh_sport > (32768 + 666)) && (udph->uh_sport <= (32768 + 666 + 30)))
|
||||
|
@ -490,7 +490,7 @@ dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 ip_proto)
|
|||
);
|
||||
|
||||
port_item = proto_tree_add_uint_format_value(udp_tree, hfi_udp_dstport.id, tvb, offset + 2, 2, udph->uh_dport,
|
||||
"%s (%u)", get_udp_port(udph->uh_dport), udph->uh_dport);
|
||||
"%s (%u)", ep_udp_port_to_display(udph->uh_dport), udph->uh_dport);
|
||||
if ((udph->uh_dport > (32768 + 666)) && (udph->uh_dport <= (32768 + 666 + 30)))
|
||||
expert_add_info_format(pinfo, port_item, &ei_udp_possible_traceroute, "Possible traceroute: hop #%u, attempt #%u",
|
||||
((udph->uh_dport - 32768 - 666 - 1) / 3) + 1,
|
||||
|
|
|
@ -408,19 +408,19 @@ add_xmcp_port_name (void)
|
|||
switch(xmcp_service_protocol) {
|
||||
case IP_PROTO_TCP:
|
||||
proto_item_append_text(xmcp_it_service_port, " (TCP: %s)",
|
||||
get_tcp_port(xmcp_service_port));
|
||||
ep_tcp_port_to_display(xmcp_service_port));
|
||||
break;
|
||||
case IP_PROTO_UDP:
|
||||
proto_item_append_text(xmcp_it_service_port, " (UDP: %s)",
|
||||
get_udp_port(xmcp_service_port));
|
||||
ep_udp_port_to_display(xmcp_service_port));
|
||||
break;
|
||||
case IP_PROTO_DCCP:
|
||||
proto_item_append_text(xmcp_it_service_port, " (DCCP: %s)",
|
||||
get_dccp_port(xmcp_service_port));
|
||||
ep_dccp_port_to_display(xmcp_service_port));
|
||||
break;
|
||||
case IP_PROTO_SCTP:
|
||||
proto_item_append_text(xmcp_it_service_port, " (SCTP: %s)",
|
||||
get_sctp_port(xmcp_service_port));
|
||||
ep_sctp_port_to_display(xmcp_service_port));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -1470,7 +1470,7 @@ static int dissect_zbee_beacon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
|
|||
offset += 8;
|
||||
|
||||
/* Update the Info Column with the EPID. */
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, ", EPID: %s", get_eui64_name(epid));
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, ", EPID: %s", ep_eui64_to_display(epid));
|
||||
|
||||
/*
|
||||
* In ZigBee 2006 the Tx-Offset is optional, while in the 2007 and
|
||||
|
|
|
@ -67,7 +67,7 @@ zdp_parse_bind_table_entry(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint
|
|||
|
||||
/* Add the source address. */
|
||||
src64 = tvb_get_letoh64(tvb, *offset + len);
|
||||
if (tree) ti = proto_tree_add_text(tree, tvb, *offset, 0, "Bind {Src: %s", get_eui64_name(src64));
|
||||
if (tree) ti = proto_tree_add_text(tree, tvb, *offset, 0, "Bind {Src: %s", ep_eui64_to_display(src64));
|
||||
len += (int)sizeof(guint64);
|
||||
|
||||
/* Add the source endpoint. */
|
||||
|
@ -104,7 +104,7 @@ zdp_parse_bind_table_entry(proto_tree *tree, tvbuff_t *tvb, guint *offset, guint
|
|||
}
|
||||
else if (mode == ZBEE_ZDP_ADDR_MODE_UNICAST) {
|
||||
dst64 = tvb_get_letoh64(tvb, *offset + len);
|
||||
if (tree) proto_item_append_text(ti, ", Dst: %s", get_eui64_name(dst64));
|
||||
if (tree) proto_item_append_text(ti, ", Dst: %s", ep_eui64_to_display(dst64));
|
||||
len += (int)sizeof(guint64);
|
||||
|
||||
dst_ep = tvb_get_guint8(tvb, *offset + len);
|
||||
|
@ -178,7 +178,7 @@ dissect_zbee_zdp_req_end_device_bind(tvbuff_t *tvb, packet_info *pinfo, proto_tr
|
|||
for (i=0; i<out_count; i++) zbee_parse_uint(field_tree, hf_zbee_zdp_out_cluster, tvb, &offset, sizeof_cluster, NULL);
|
||||
|
||||
if (version >= ZBEE_VERSION_2007) {
|
||||
zbee_append_info(tree, pinfo, " Src: %s", get_eui64_name(ext_addr));
|
||||
zbee_append_info(tree, pinfo, " Src: %s", ep_eui64_to_display(ext_addr));
|
||||
}
|
||||
zbee_append_info(tree, pinfo, ", Target: 0x%04x", target);
|
||||
|
||||
|
@ -239,7 +239,7 @@ dissect_zbee_zdp_req_bind(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
|
|||
}
|
||||
|
||||
if (version >= ZBEE_VERSION_2007) {
|
||||
zbee_append_info(tree, pinfo, " Src: %s", get_eui64_name(src64));
|
||||
zbee_append_info(tree, pinfo, " Src: %s", ep_eui64_to_display(src64));
|
||||
}
|
||||
if (dst_mode == ZBEE_ZDP_ADDR_MODE_GROUP) {
|
||||
zbee_append_info(tree, pinfo, ", Dst: 0x%04x", dst);
|
||||
|
@ -305,7 +305,7 @@ dissect_zbee_zdp_req_unbind(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
}
|
||||
|
||||
if (version >= ZBEE_VERSION_2007) {
|
||||
zbee_append_info(tree, pinfo, " Src: %s", get_eui64_name(src64));
|
||||
zbee_append_info(tree, pinfo, " Src: %s", ep_eui64_to_display(src64));
|
||||
}
|
||||
if (dst_mode == ZBEE_ZDP_ADDR_MODE_GROUP) {
|
||||
zbee_append_info(tree, pinfo, ", Dst: 0x%04x", dst);
|
||||
|
@ -340,7 +340,7 @@ dissect_zbee_zdp_req_bind_register(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
|
||||
ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL);
|
||||
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", get_eui64_name(ext_addr));
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", ep_eui64_to_display(ext_addr));
|
||||
|
||||
/* Dump any leftover bytes. */
|
||||
zdp_dump_excess(tvb, offset, pinfo, tree);
|
||||
|
@ -374,8 +374,8 @@ dissect_zbee_zdp_req_replace_device(tvbuff_t *tvb, packet_info *pinfo, proto_tre
|
|||
new_addr = zbee_parse_eui64(tree, hf_zbee_zdp_replacement, tvb, &offset, (int)sizeof(guint64), NULL);
|
||||
/*new_ep =*/ zbee_parse_uint(tree, hf_zbee_zdp_replacement_ep, tvb, &offset, (int)sizeof(guint8), NULL);
|
||||
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", get_eui64_name(ext_addr));
|
||||
zbee_append_info(tree, pinfo, ", Replacement: %s", get_eui64_name(new_addr));
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", ep_eui64_to_display(ext_addr));
|
||||
zbee_append_info(tree, pinfo, ", Replacement: %s", ep_eui64_to_display(new_addr));
|
||||
|
||||
/* Dump any leftover bytes. */
|
||||
zdp_dump_excess(tvb, offset, pinfo, tree);
|
||||
|
@ -425,7 +425,7 @@ dissect_zbee_zdp_req_store_bak_bind_entry(tvbuff_t *tvb, packet_info *pinfo, pro
|
|||
}
|
||||
else if (tree) proto_item_append_text(ti, " (Reserved)");
|
||||
|
||||
zbee_append_info(tree, pinfo, ", Src: %s", get_eui64_name(src64));
|
||||
zbee_append_info(tree, pinfo, ", Src: %s", ep_eui64_to_display(src64));
|
||||
zbee_append_info(tree, pinfo, ", Src Endpoint: %d", src_ep);
|
||||
zbee_append_info(tree, pinfo, ", Cluster: %d", cluster);
|
||||
|
||||
|
@ -477,7 +477,7 @@ dissect_zbee_zdp_req_remove_bak_bind_entry(tvbuff_t *tvb, packet_info *pinfo, pr
|
|||
}
|
||||
else if (tree) proto_item_append_text(ti, " (Reserved)");
|
||||
|
||||
zbee_append_info(tree, pinfo, ", Src: %s", get_eui64_name(src64));
|
||||
zbee_append_info(tree, pinfo, ", Src: %s", ep_eui64_to_display(src64));
|
||||
zbee_append_info(tree, pinfo, ", Src Endpoint: %d", src_ep);
|
||||
zbee_append_info(tree, pinfo, ", Cluster: %d", cluster);
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ dissect_zbee_zdp_req_nwk_addr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
|
|||
/*req_type =*/ zbee_parse_uint(tree, hf_zbee_zdp_req_type, tvb, &offset, sizeof(guint8), NULL);
|
||||
/*idx =*/ zbee_parse_uint(tree, hf_zbee_zdp_index, tvb, &offset, sizeof(guint8), NULL);
|
||||
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", get_eui64_name(ext_addr));
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", ep_eui64_to_display(ext_addr));
|
||||
|
||||
/* Dump any leftover bytes. */
|
||||
zdp_dump_excess(tvb, offset, pinfo, tree);
|
||||
|
@ -349,7 +349,7 @@ dissect_zbee_zdp_req_discovery_cache(tvbuff_t *tvb, packet_info *pinfo, proto_tr
|
|||
/*device =*/ zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL);
|
||||
ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL);
|
||||
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", get_eui64_name(ext_addr));
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", ep_eui64_to_display(ext_addr));
|
||||
|
||||
/* Dump any leftover bytes. */
|
||||
zdp_dump_excess(tvb, offset, pinfo, tree);
|
||||
|
@ -381,7 +381,7 @@ dissect_zbee_zdp_device_annce(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
|
|||
ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL);
|
||||
/*capability =*/ zdp_parse_cinfo(tree, ett_zbee_zdp_cinfo, tvb, &offset);
|
||||
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", get_eui64_name(ext_addr));
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", ep_eui64_to_display(ext_addr));
|
||||
|
||||
/* Dump any leftover bytes. */
|
||||
zdp_dump_excess(tvb, offset, pinfo, tree);
|
||||
|
@ -501,7 +501,7 @@ dissect_zbee_zdp_req_store_discovery(tvbuff_t *tvb, packet_info *pinfo, proto_tr
|
|||
zbee_parse_uint(field_tree, hf_zbee_zdp_disc_simple_size, tvb, &offset, (int)sizeof(guint8), NULL);
|
||||
}
|
||||
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", get_eui64_name(ext_addr));
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", ep_eui64_to_display(ext_addr));
|
||||
|
||||
/* Dump any leftover bytes. */
|
||||
zdp_dump_excess(tvb, offset, pinfo, tree);
|
||||
|
@ -532,7 +532,7 @@ dissect_zbee_zdp_req_store_node_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tr
|
|||
ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL);
|
||||
zdp_parse_node_desc(tree, ett_zbee_zdp_node, tvb, &offset, version);
|
||||
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", get_eui64_name(ext_addr));
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", ep_eui64_to_display(ext_addr));
|
||||
|
||||
/* Dump any leftover bytes. */
|
||||
zdp_dump_excess(tvb, offset, pinfo, tree);
|
||||
|
@ -563,7 +563,7 @@ dissect_zbee_zdp_req_store_power_desc(tvbuff_t *tvb, packet_info *pinfo, proto_t
|
|||
ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL);
|
||||
zdp_parse_power_desc(tree, ett_zbee_zdp_power, tvb, &offset);
|
||||
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", get_eui64_name(ext_addr));
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", ep_eui64_to_display(ext_addr));
|
||||
|
||||
/* Dump any leftover bytes. */
|
||||
zdp_dump_excess(tvb, offset, pinfo, tree);
|
||||
|
@ -607,7 +607,7 @@ dissect_zbee_zdp_req_store_active_ep(tvbuff_t *tvb, packet_info *pinfo, proto_tr
|
|||
(void)zbee_parse_uint(field_tree, hf_zbee_zdp_endpoint, tvb, &offset, (int)sizeof(guint8), NULL);
|
||||
}
|
||||
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", get_eui64_name(ext_addr));
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", ep_eui64_to_display(ext_addr));
|
||||
|
||||
/* Dump any leftover bytes. */
|
||||
zdp_dump_excess(tvb, offset, pinfo, tree);
|
||||
|
@ -640,7 +640,7 @@ dissect_zbee_zdp_req_store_simple_desc(tvbuff_t *tvb, packet_info *pinfo, proto_
|
|||
/*simple_len =*/ zbee_parse_uint(tree, hf_zbee_zdp_simple_length, tvb, &offset, (int)sizeof(guint8), NULL);
|
||||
zdp_parse_simple_desc(tree, ett_zbee_zdp_simple, tvb, &offset, version);
|
||||
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", get_eui64_name(ext_addr));
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", ep_eui64_to_display(ext_addr));
|
||||
|
||||
/* Dump any leftover bytes. */
|
||||
zdp_dump_excess(tvb, offset, pinfo, tree);
|
||||
|
@ -670,7 +670,7 @@ dissect_zbee_zdp_req_remove_node_cache(tvbuff_t *tvb, packet_info *pinfo, proto_
|
|||
/*device =*/ zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL);
|
||||
ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL);
|
||||
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", get_eui64_name(ext_addr));
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", ep_eui64_to_display(ext_addr));
|
||||
|
||||
/* Dump any leftover bytes. */
|
||||
zdp_dump_excess(tvb, offset, pinfo, tree);
|
||||
|
@ -700,7 +700,7 @@ dissect_zbee_zdp_req_find_node_cache(tvbuff_t *tvb, packet_info *pinfo, proto_tr
|
|||
/*device =*/ zbee_parse_uint(tree, hf_zbee_zdp_device, tvb, &offset, (int)sizeof(guint16), NULL);
|
||||
ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, (int)sizeof(guint64), NULL);
|
||||
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", get_eui64_name(ext_addr));
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", ep_eui64_to_display(ext_addr));
|
||||
|
||||
/* Dump any leftover bytes. */
|
||||
zdp_dump_excess(tvb, offset, pinfo, tree);
|
||||
|
@ -820,7 +820,7 @@ dissect_zbee_zdp_rsp_nwk_addr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
|
|||
|
||||
zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status));
|
||||
if (status == ZBEE_ZDP_STATUS_SUCCESS) {
|
||||
zbee_append_info(tree, pinfo, ", Device: %s = 0x%04x", get_eui64_name(ext_addr), device);
|
||||
zbee_append_info(tree, pinfo, ", Device: %s = 0x%04x", ep_eui64_to_display(ext_addr), device);
|
||||
}
|
||||
|
||||
/* Dump any leftover bytes. */
|
||||
|
@ -875,7 +875,7 @@ dissect_zbee_zdp_rsp_ext_addr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
|
|||
|
||||
zbee_append_info(tree, pinfo, ", Status: %s", zdp_status_name(status));
|
||||
if (status == ZBEE_ZDP_STATUS_SUCCESS) {
|
||||
zbee_append_info(tree, pinfo, ", Device: 0x%04x = %s", device, get_eui64_name(ext_addr));
|
||||
zbee_append_info(tree, pinfo, ", Device: 0x%04x = %s", device, ep_eui64_to_display(ext_addr));
|
||||
}
|
||||
|
||||
/* Dump any leftover bytes. */
|
||||
|
|
|
@ -149,7 +149,7 @@ zdp_parse_neighbor_table_entry(proto_tree *tree, tvbuff_t *tvb, guint *offset, g
|
|||
}
|
||||
|
||||
ext_addr = tvb_get_letoh64(tvb, *offset + len);
|
||||
if (tree) proto_item_append_text(ti, ", Extended Addr: %s", get_eui64_name(ext_addr));
|
||||
if (tree) proto_item_append_text(ti, ", Extended Addr: %s", ep_eui64_to_display(ext_addr));
|
||||
len += 8;
|
||||
|
||||
device = tvb_get_letohs(tvb, *offset + len);
|
||||
|
@ -425,7 +425,7 @@ dissect_zbee_zdp_req_mgmt_leave(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
|
|||
offset += 1;
|
||||
}
|
||||
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", get_eui64_name(ext_addr));
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", ep_eui64_to_display(ext_addr));
|
||||
|
||||
/* Dump any leftover bytes. */
|
||||
zdp_dump_excess(tvb, offset, pinfo, tree);
|
||||
|
@ -455,7 +455,7 @@ dissect_zbee_zdp_req_mgmt_direct_join(tvbuff_t *tvb, packet_info *pinfo, proto_t
|
|||
ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, 8, NULL);
|
||||
/*cinfo =*/ zdp_parse_cinfo(tree, ett_zbee_zdp_cinfo, tvb, &offset);
|
||||
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", get_eui64_name(ext_addr));
|
||||
zbee_append_info(tree, pinfo, ", Device: %s", ep_eui64_to_display(ext_addr));
|
||||
|
||||
/* Dump any leftover bytes. */
|
||||
zdp_dump_excess(tvb, offset, pinfo, tree);
|
||||
|
@ -871,7 +871,7 @@ dissect_zbee_zdp_rsp_mgmt_cache(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
|
|||
guint16 addr16 = tvb_get_letohs(tvb, offset+8);
|
||||
|
||||
if (field_tree) {
|
||||
proto_tree_add_text(field_tree, tvb, offset, 2+8, "{%s = 0x%04x}", get_eui64_name(addr64), addr16);
|
||||
proto_tree_add_text(field_tree, tvb, offset, 2+8, "{%s = 0x%04x}", ep_eui64_to_display(addr64), addr16);
|
||||
}
|
||||
offset += 2+8;
|
||||
} /* for */
|
||||
|
|
|
@ -5910,7 +5910,7 @@ proto_item_fill_label(field_info *fi, gchar *label_str)
|
|||
case FT_EUI64:
|
||||
integer64 = fvalue_get_integer64(&fi->value);
|
||||
label_fill_descr(label_str, 0, hfinfo,
|
||||
get_eui64_name(integer64),
|
||||
ep_eui64_to_display(integer64),
|
||||
eui64_to_str(integer64));
|
||||
break;
|
||||
case FT_STRING:
|
||||
|
|
|
@ -190,20 +190,20 @@ iousers_udpip_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, con
|
|||
|
||||
if(udph->uh_sport>udph->uh_dport){
|
||||
direction=0;
|
||||
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&udph->ip_src),get_udp_port(udph->uh_sport));
|
||||
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&udph->ip_dst),get_udp_port(udph->uh_dport));
|
||||
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&udph->ip_src),ep_udp_port_to_display(udph->uh_sport));
|
||||
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&udph->ip_dst),ep_udp_port_to_display(udph->uh_dport));
|
||||
} else if(udph->uh_sport<udph->uh_dport){
|
||||
direction=1;
|
||||
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&udph->ip_src),get_udp_port(udph->uh_sport));
|
||||
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&udph->ip_dst),get_udp_port(udph->uh_dport));
|
||||
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&udph->ip_src),ep_udp_port_to_display(udph->uh_sport));
|
||||
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&udph->ip_dst),ep_udp_port_to_display(udph->uh_dport));
|
||||
} else if(CMP_ADDRESS(&udph->ip_src, &udph->ip_dst)>0){
|
||||
direction=0;
|
||||
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&udph->ip_src),get_udp_port(udph->uh_sport));
|
||||
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&udph->ip_dst),get_udp_port(udph->uh_dport));
|
||||
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&udph->ip_src),ep_udp_port_to_display(udph->uh_sport));
|
||||
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&udph->ip_dst),ep_udp_port_to_display(udph->uh_dport));
|
||||
} else {
|
||||
direction=1;
|
||||
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&udph->ip_src),get_udp_port(udph->uh_sport));
|
||||
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&udph->ip_dst),get_udp_port(udph->uh_dport));
|
||||
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&udph->ip_src),ep_udp_port_to_display(udph->uh_sport));
|
||||
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&udph->ip_dst),ep_udp_port_to_display(udph->uh_dport));
|
||||
}
|
||||
|
||||
iousers_process_name_packet(iu, name1, name2, direction, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->fd->abs_ts);
|
||||
|
@ -253,20 +253,20 @@ iousers_tcpip_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, con
|
|||
|
||||
if(tcph->th_sport>tcph->th_dport){
|
||||
direction=0;
|
||||
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&tcph->ip_src),get_tcp_port(tcph->th_sport));
|
||||
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&tcph->ip_dst),get_tcp_port(tcph->th_dport));
|
||||
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&tcph->ip_src),ep_tcp_port_to_display(tcph->th_sport));
|
||||
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&tcph->ip_dst),ep_tcp_port_to_display(tcph->th_dport));
|
||||
} else if(tcph->th_sport<tcph->th_dport){
|
||||
direction=1;
|
||||
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&tcph->ip_src),get_tcp_port(tcph->th_sport));
|
||||
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&tcph->ip_dst),get_tcp_port(tcph->th_dport));
|
||||
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&tcph->ip_src),ep_tcp_port_to_display(tcph->th_sport));
|
||||
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&tcph->ip_dst),ep_tcp_port_to_display(tcph->th_dport));
|
||||
} else if(CMP_ADDRESS(&tcph->ip_src, &tcph->ip_dst)>0){
|
||||
direction=0;
|
||||
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&tcph->ip_src),get_tcp_port(tcph->th_sport));
|
||||
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&tcph->ip_dst),get_tcp_port(tcph->th_dport));
|
||||
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&tcph->ip_src),ep_tcp_port_to_display(tcph->th_sport));
|
||||
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&tcph->ip_dst),ep_tcp_port_to_display(tcph->th_dport));
|
||||
} else {
|
||||
direction=1;
|
||||
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&tcph->ip_src),get_tcp_port(tcph->th_sport));
|
||||
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&tcph->ip_dst),get_tcp_port(tcph->th_dport));
|
||||
g_snprintf(name2,256,"%s:%s",ep_address_to_str(&tcph->ip_src),ep_tcp_port_to_display(tcph->th_sport));
|
||||
g_snprintf(name1,256,"%s:%s",ep_address_to_str(&tcph->ip_dst),ep_tcp_port_to_display(tcph->th_dport));
|
||||
}
|
||||
|
||||
iousers_process_name_packet_with_conv_id(iu, name1, name2, tcph->th_stream, direction, pinfo->fd->pkt_len, &pinfo->rel_ts, &pinfo->fd->abs_ts);
|
||||
|
|
|
@ -1977,13 +1977,13 @@ get_ct_table_address(conversations_table *ct, conv_t *conv, const char **entries
|
|||
if(!ct->resolve_names) pt = PT_NONE;
|
||||
switch(pt) {
|
||||
case(PT_TCP):
|
||||
entries[1] = get_tcp_port(conv->src_port);
|
||||
entries[1] = ep_tcp_port_to_display(conv->src_port);
|
||||
break;
|
||||
case(PT_UDP):
|
||||
entries[1] = get_udp_port(conv->src_port);
|
||||
entries[1] = ep_udp_port_to_display(conv->src_port);
|
||||
break;
|
||||
case(PT_SCTP):
|
||||
entries[1] = get_sctp_port(conv->src_port);
|
||||
entries[1] = ep_sctp_port_to_display(conv->src_port);
|
||||
break;
|
||||
default:
|
||||
port=ct_port_to_str(conv->port_type, conv->src_port);
|
||||
|
@ -1998,13 +1998,13 @@ get_ct_table_address(conversations_table *ct, conv_t *conv, const char **entries
|
|||
|
||||
switch(pt) {
|
||||
case(PT_TCP):
|
||||
entries[3]=get_tcp_port(conv->dst_port);
|
||||
entries[3]=ep_tcp_port_to_display(conv->dst_port);
|
||||
break;
|
||||
case(PT_UDP):
|
||||
entries[3]=get_udp_port(conv->dst_port);
|
||||
entries[3]=ep_udp_port_to_display(conv->dst_port);
|
||||
break;
|
||||
case(PT_SCTP):
|
||||
entries[3]=get_sctp_port(conv->dst_port);
|
||||
entries[3]=ep_sctp_port_to_display(conv->dst_port);
|
||||
break;
|
||||
default:
|
||||
port=ct_port_to_str(conv->port_type, conv->dst_port);
|
||||
|
|
|
@ -241,8 +241,8 @@ follow_ssl_stream_cb(GtkWidget * w _U_, gpointer data _U_)
|
|||
hostname1 = get_hostname(ipaddr);
|
||||
}
|
||||
|
||||
port0 = get_tcp_port(stats.port[0]);
|
||||
port1 = get_tcp_port(stats.port[1]);
|
||||
port0 = ep_tcp_port_to_display(stats.port[0]);
|
||||
port1 = ep_tcp_port_to_display(stats.port[1]);
|
||||
|
||||
follow_info->is_ipv6 = stats.is_ipv6;
|
||||
|
||||
|
|
|
@ -261,8 +261,8 @@ follow_tcp_stream_cb(GtkWidget * w _U_, gpointer data _U_)
|
|||
|
||||
follow_info->is_ipv6 = stats.is_ipv6;
|
||||
|
||||
port0 = get_tcp_port(stats.port[0]);
|
||||
port1 = get_tcp_port(stats.port[1]);
|
||||
port0 = ep_tcp_port_to_display(stats.port[0]);
|
||||
port1 = ep_tcp_port_to_display(stats.port[1]);
|
||||
|
||||
/* Host 0 --> Host 1 */
|
||||
if(sc.src_port == stats.port[0]) {
|
||||
|
|
|
@ -185,8 +185,8 @@ follow_udp_stream_cb(GtkWidget *w _U_, gpointer data _U_)
|
|||
hostname1 = get_hostname(ipaddr);
|
||||
}
|
||||
|
||||
port0 = get_udp_port(stats.port[0]);
|
||||
port1 = get_udp_port(stats.port[1]);
|
||||
port0 = ep_udp_port_to_display(stats.port[0]);
|
||||
port1 = ep_udp_port_to_display(stats.port[1]);
|
||||
|
||||
follow_info->is_ipv6 = stats.is_ipv6;
|
||||
|
||||
|
|
|
@ -631,13 +631,13 @@ get_hostlist_table_address(hostlist_table *hl, hostlist_talker_t *host, const ch
|
|||
if(!hl->resolve_names) pt = PT_NONE;
|
||||
switch(pt) {
|
||||
case(PT_TCP):
|
||||
entries[1] = get_tcp_port(host->port);
|
||||
entries[1] = ep_tcp_port_to_display(host->port);
|
||||
break;
|
||||
case(PT_UDP):
|
||||
entries[1] = get_udp_port(host->port);
|
||||
entries[1] = ep_udp_port_to_display(host->port);
|
||||
break;
|
||||
case(PT_SCTP):
|
||||
entries[1] = get_sctp_port(host->port);
|
||||
entries[1] = ep_sctp_port_to_display(host->port);
|
||||
break;
|
||||
default:
|
||||
port=hostlist_port_to_str(host->port_type, host->port);
|
||||
|
|
|
@ -1039,16 +1039,16 @@ bool FollowStreamDialog::follow(QString previous_filter, bool use_tcp_index)
|
|||
switch (follow_type_)
|
||||
{
|
||||
case FOLLOW_TCP:
|
||||
port0 = get_tcp_port(stats.port[0]);
|
||||
port1 = get_tcp_port(stats.port[1]);
|
||||
port0 = ep_tcp_port_to_display(stats.port[0]);
|
||||
port1 = ep_tcp_port_to_display(stats.port[1]);
|
||||
break;
|
||||
case FOLLOW_UDP:
|
||||
port0 = get_udp_port(stats.port[0]);
|
||||
port1 = get_udp_port(stats.port[1]);
|
||||
port0 = ep_udp_port_to_display(stats.port[0]);
|
||||
port1 = ep_udp_port_to_display(stats.port[1]);
|
||||
break;
|
||||
case FOLLOW_SSL:
|
||||
port0 = get_tcp_port(stats.port[0]);
|
||||
port1 = get_tcp_port(stats.port[1]);
|
||||
port0 = ep_tcp_port_to_display(stats.port[0]);
|
||||
port1 = ep_tcp_port_to_display(stats.port[1]);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue