diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-10-21 11:46:49 -0700 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-10-22 11:46:12 +0000 |
commit | d9e530bc177553c07bae7594e9b4f8e6235fc0e0 (patch) | |
tree | 481239fdd3662cae66a4c5110b853563be7ca1cd /ui/cli | |
parent | 86fe2be4dc2f5f5ff09e0d6c00277d7a9bf09ffd (diff) | |
download | wireshark-d9e530bc177553c07bae7594e9b4f8e6235fc0e0.tar.gz |
Use address functions instead of ADDRESS macros in ui.
Replace CMP_ADDRESS, COPY_ADDRESS, et al with their lower-case
equivalents in the ui directory.
Change-Id: I10e95e66c8da5b880133452ebc484c53046e87ba
Reviewed-on: https://code.wireshark.org/review/11199
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui/cli')
-rw-r--r-- | ui/cli/tap-comparestat.c | 4 | ||||
-rw-r--r-- | ui/cli/tap-follow.c | 14 | ||||
-rw-r--r-- | ui/cli/tap-sctpchunkstat.c | 8 |
3 files changed, 13 insertions, 13 deletions
diff --git a/ui/cli/tap-comparestat.c b/ui/cli/tap-comparestat.c index 0a0fc2520f..e29fe79888 100644 --- a/ui/cli/tap-comparestat.c +++ b/ui/cli/tap-comparestat.c @@ -253,7 +253,7 @@ call_foreach_new_order(gpointer key _U_, gpointer value, gpointer arg) fInfoTemp = (frame_info *)g_hash_table_lookup(cs->nr_set, GINT_TO_POINTER((gint)fInfo->id)); if (fInfoTemp == NULL) { if (TTL_method == FALSE) { - if ((ADDRESSES_EQUAL(&cs->eth_dst, &fInfo->dl_dst)) || (ADDRESSES_EQUAL(&cs->eth_src, &fInfo->dl_dst))) { + if ((addresses_equal(&cs->eth_dst, &fInfo->dl_dst)) || (addresses_equal(&cs->eth_src, &fInfo->dl_dst))) { g_hash_table_insert(cs->nr_set, GINT_TO_POINTER((gint)fInfo->id), fInfo); fInfo->zebra_time = cs->zebra_time; cs->zebra_time.nsecs = cs->zebra_time.nsecs + MERGED_FILES; @@ -278,7 +278,7 @@ call_foreach_new_order(gpointer key _U_, gpointer value, gpointer arg) } } else { if (TTL_method == FALSE) { - if (((ADDRESSES_EQUAL(&cs->eth_dst, &fInfo->dl_dst)) || (ADDRESSES_EQUAL(&cs->eth_src, &fInfo->dl_dst))) && (!fmod(fInfoTemp->zebra_time.nsecs, MERGED_FILES))) { + if (((addresses_equal(&cs->eth_dst, &fInfo->dl_dst)) || (addresses_equal(&cs->eth_src, &fInfo->dl_dst))) && (!fmod(fInfoTemp->zebra_time.nsecs, MERGED_FILES))) { fInfo->zebra_time.nsecs = fInfoTemp->zebra_time.nsecs; } else { fInfo->zebra_time.nsecs = fInfoTemp->zebra_time.nsecs+1; diff --git a/ui/cli/tap-follow.c b/ui/cli/tap-follow.c index 4977f5a08a..3d4608a533 100644 --- a/ui/cli/tap-follow.c +++ b/ui/cli/tap-follow.c @@ -302,8 +302,8 @@ followAlloc( fp = (follow_t *)g_malloc0(sizeof *fp); fp->type = type; - SET_ADDRESS(&fp->addr[0], AT_NONE, 0, fp->addrBuf[0]); - SET_ADDRESS(&fp->addr[1], AT_NONE, 0, fp->addrBuf[1]); + set_address(&fp->addr[0], AT_NONE, 0, fp->addrBuf[0]); + set_address(&fp->addr[1], AT_NONE, 0, fp->addrBuf[1]); return fp; } @@ -376,12 +376,12 @@ followSslPacket( if (fp->addr[0].type == AT_NONE) { memcpy(fp->addrBuf[0], pip->net_src.data, pip->net_src.len); - SET_ADDRESS(&fp->addr[0], pip->net_src.type, pip->net_src.len, + set_address(&fp->addr[0], pip->net_src.type, pip->net_src.len, fp->addrBuf[0]); fp->port[0] = pip->srcport; memcpy(fp->addrBuf[1], pip->net_dst.data, pip->net_dst.len); - SET_ADDRESS(&fp->addr[1], pip->net_dst.type, pip->net_dst.len, + set_address(&fp->addr[1], pip->net_dst.type, pip->net_dst.len, fp->addrBuf[1]); fp->port[1] = pip->destport; } @@ -549,7 +549,7 @@ followDraw( for (node = 0; node < 2; node++) { memcpy(fp->addrBuf[node], stats.ip_address[node], len); - SET_ADDRESS(&fp->addr[node], type, len, fp->addrBuf[node]); + set_address(&fp->addr[node], type, len, fp->addrBuf[node]); fp->port[node] = stats.port[node]; } } @@ -815,7 +815,7 @@ followArgFilter( { followExit("Can't get IPv6 address"); } - SET_ADDRESS(&fp->addr[ii], AT_IPv6, 16, fp->addrBuf[ii]); + set_address(&fp->addr[ii], AT_IPv6, 16, fp->addrBuf[ii]); } else { @@ -823,7 +823,7 @@ followArgFilter( { followExit("Can't get IPv4 address"); } - SET_ADDRESS(&fp->addr[ii], AT_IPv4, 4, fp->addrBuf[ii]); + set_address(&fp->addr[ii], AT_IPv4, 4, fp->addrBuf[ii]); } *opt_argp += len; diff --git a/ui/cli/tap-sctpchunkstat.c b/ui/cli/tap-sctpchunkstat.c index 776a88a278..9de9decdf8 100644 --- a/ui/cli/tap-sctpchunkstat.c +++ b/ui/cli/tap-sctpchunkstat.c @@ -110,8 +110,8 @@ alloc_sctp_ep(const struct _sctp_info *si) if (!(ep = g_new(sctp_ep_t, 1))) return NULL; - COPY_ADDRESS(&ep->src, &si->ip_src); - COPY_ADDRESS(&ep->dst, &si->ip_dst); + copy_address(&ep->src, &si->ip_src); + copy_address(&ep->dst, &si->ip_dst); ep->sport = si->sport; ep->dport = si->dport; ep->next = NULL; @@ -144,8 +144,8 @@ sctpstat_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, cons } else { for (tmp = hs->ep_list; tmp; tmp = tmp->next) { - if ((!CMP_ADDRESS(&tmp->src, &si->ip_src)) && - (!CMP_ADDRESS(&tmp->dst, &si->ip_dst)) && + if ((!cmp_address(&tmp->src, &si->ip_src)) && + (!cmp_address(&tmp->dst, &si->ip_dst)) && (tmp->sport == si->sport) && (tmp->dport == si->dport)) { |