Rename some IPv6 address test functions.

They test where the address is XXX, for various values of XXX, so name
them accordingly.

Change-Id: I437175f02b3f97fecee77e8bb9416bb5b71cd0d0
Reviewed-on: https://code.wireshark.org/review/24075
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2017-10-26 02:23:37 -07:00
parent 458c3c026e
commit b1147a6033
3 changed files with 10 additions and 10 deletions

View File

@ -1437,7 +1437,7 @@ static icmp_transaction_t *transaction_start(packet_info *pinfo, proto_tree *tre
if (icmpv6_trans == NULL) {
if (pinfo->dst.type == AT_IPv6 &&
in6_is_addr_multicast((const ws_in6_addr *)pinfo->dst.data)) {
in6_addr_is_multicast((const ws_in6_addr *)pinfo->dst.data)) {
/* XXX We should support multicast echo requests, but we don't currently */
/* Note the multicast destination and skip transaction tracking */
col_append_str(pinfo->cinfo, COL_INFO, " (multicast)");

View File

@ -905,7 +905,7 @@ dissect_routing6_rt0(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
ti = _proto_tree_add_ipv6_vector_address(tree, hf_ipv6_routing_src_addr, tvb,
offset, IPv6_ADDR_SIZE, addr, idx);
offset += IPv6_ADDR_SIZE;
if (in6_is_addr_multicast(addr)) {
if (in6_addr_is_multicast(addr)) {
expert_add_info(pinfo, ti, &ei_ipv6_src_route_list_multicast_addr);
}
}
@ -942,7 +942,7 @@ dissect_routing6_mipv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
addr = tvb_get_ptr_ipv6(tvb, offset);
ti = _proto_tree_add_ipv6_vector_address(tree, hf_ipv6_routing_mipv6_home_address, tvb,
offset, IPv6_ADDR_SIZE, addr, 1);
if (in6_is_addr_multicast(addr)) {
if (in6_addr_is_multicast(addr)) {
expert_add_info(pinfo, ti, &ei_ipv6_src_route_list_multicast_addr);
}
@ -979,7 +979,7 @@ dissect_routing6_rpl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
ip6_src_addr = (const ws_in6_addr *)pinfo->src.data;
/* from RFC6554: Multicast addresses MUST NOT appear in the IPv6 Destination Address field */
if (in6_is_addr_multicast(ip6_dst_addr)) {
if (in6_addr_is_multicast(ip6_dst_addr)) {
expert_add_info(pinfo, proto_tree_get_parent(tree), &ei_ipv6_dst_addr_not_multicast);
}
@ -1055,7 +1055,7 @@ dissect_routing6_rpl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
}
/* Multicast addresses MUST NOT appear in the in SRH */
if (in6_is_addr_multicast(&rpl_fulladdr)) {
if (in6_addr_is_multicast(&rpl_fulladdr)) {
expert_add_info(pinfo, ti, &ei_ipv6_src_route_list_multicast_addr);
}
@ -1131,7 +1131,7 @@ dissect_routing6_srh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
/* Destination address is the first vector address */
addr = tvb_get_ptr_ipv6(tvb, offset);
if (in6_is_addr_multicast(addr)) {
if (in6_addr_is_multicast(addr)) {
expert_add_info(pinfo, ti, &ei_ipv6_src_route_list_multicast_addr);
}
ti = _proto_tree_add_ipv6_vector_address(tree, hf_ipv6_routing_srh_addr, tvb,
@ -1147,7 +1147,7 @@ dissect_routing6_srh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
offset += IPv6_ADDR_SIZE;
for (idx = 1; offset < offlim; offset += IPv6_ADDR_SIZE, idx++) {
addr = tvb_get_ptr_ipv6(tvb, offset);
if (in6_is_addr_multicast(addr)) {
if (in6_addr_is_multicast(addr)) {
expert_add_info(pinfo, ti, &ei_ipv6_src_route_list_multicast_addr);
}
ti = _proto_tree_add_ipv6_vector_address(tree, hf_ipv6_routing_srh_addr, tvb,

View File

@ -93,12 +93,12 @@ struct ip6_frag {
* Unicast Scope
* Note that we must check topmost 10 bits only, not 16 bits (see RFC2373).
*/
static inline gboolean in6_is_addr_linklocal(const ws_in6_addr *a)
static inline gboolean in6_addr_is_linklocal(const ws_in6_addr *a)
{
return (a->bytes[0] == 0xfe) && ((a->bytes[1] & 0xc0) == 0x80);
}
static inline gboolean in6_is_addr_sitelocal(const ws_in6_addr *a)
static inline gboolean in6_addr_is_sitelocal(const ws_in6_addr *a)
{
return (a->bytes[0] == 0xfe) && ((a->bytes[1] & 0xc0) == 0xc0);
}
@ -106,7 +106,7 @@ static inline gboolean in6_is_addr_sitelocal(const ws_in6_addr *a)
/**
* Multicast
*/
static inline gboolean in6_is_addr_multicast(const ws_in6_addr *a)
static inline gboolean in6_addr_is_multicast(const ws_in6_addr *a)
{
return a->bytes[0] == 0xff;
}