Lines Matching defs:ip1
52 bool net_ip_compare(const struct ip_addr *ip1, const struct ip_addr *ip2)
54 return net_ip_cmp(ip1, ip2) == 0;
57 int net_ip_cmp(const struct ip_addr *ip1, const struct ip_addr *ip2)
59 if (ip1->family != ip2->family)
60 return ip1->family - ip2->family;
62 if (ip1->family == AF_INET6)
63 return memcmp(&ip1->u.ip6, &ip2->u.ip6, sizeof(ip1->u.ip6));
65 return memcmp(&ip1->u.ip4, &ip2->u.ip4, sizeof(ip1->u.ip4));
1133 const uint32_t *ip1, *ip2;
1154 ip1 = &ip->u.ip4.s_addr;
1157 ip1 = (const void *)&ip->u.ip6;
1163 if (ip1[i] != ip2[i])
1166 i1 = htonl(ip1[i]);