Lines Matching defs:addrp
1096 const char *xtables_ipaddr_to_numeric(const struct in_addr *addrp)
1099 const unsigned char *bytep = (const void *)&addrp->s_addr;
1165 unsigned char *addrp;
1173 addrp = (void *)&addr.s_addr;
1185 addrp[i] = onebyte;
1187 addrp[++i] = 0;
1196 addrp[i] = onebyte;
1204 addrp[3] = onebyte;
1260 struct in_addr *addrptmp, *addrp;
1264 addrp = xtables_malloc(sizeof(struct in_addr));
1265 memcpy(addrp, addrptmp, sizeof(*addrp));
1267 return addrp;
1278 struct in_addr *addrp;
1286 if ((addrp = xtables_numeric_to_ipmask(mask)) != NULL)
1288 return addrp;
1304 struct in_addr *addrp;
1335 addrp = parse_ipmask(p + 1);
1337 addrp = parse_ipmask(NULL);
1339 memcpy(*maskpp + i, addrp, sizeof(*addrp));
1349 addrp = ipparse_hostnetwork(buf, &n);
1358 memcpy(*addrpp + i + j, addrp + j,
1359 sizeof(*addrp));
1363 sizeof(*addrp));
1366 memcpy(*addrpp + i, addrp, sizeof(*addrp));
1369 free(addrp);
1391 struct in_addr *addrp;
1398 addrp = parse_ipmask(p + 1);
1400 addrp = parse_ipmask(NULL);
1402 memcpy(maskp, addrp, sizeof(*maskp));
1408 addrp = *addrpp = ipparse_hostnetwork(buf, naddrs);
1411 addrp[j++].s_addr &= maskp->s_addr;
1413 if (addrp[k].s_addr == addrp[j-1].s_addr) {
1419 memcpy(&addrp[--j], &addrp[--*naddrs],
1426 const char *xtables_ip6addr_to_numeric(const struct in6_addr *addrp)
1431 return inet_ntop(AF_INET6, addrp, buf, sizeof(buf));
1493 const char *xtables_ip6mask_to_numeric(const struct in6_addr *addrp)
1496 int l = ip6addr_prefix_length(addrp);
1500 strcat(buf, xtables_ip6addr_to_numeric(addrp));
1572 struct in6_addr *addrp, *addrptmp;
1576 addrp = xtables_malloc(sizeof(struct in6_addr));
1577 memcpy(addrp, addrptmp, sizeof(*addrp));
1579 return addrp;
1581 if ((addrp = host_to_ip6addr(name, naddrs)) != NULL)
1582 return addrp;
1590 struct in6_addr *addrp;
1598 if ((addrp = xtables_numeric_to_ip6addr(mask)) != NULL)
1599 return addrp;
1620 struct in6_addr *addrp;
1651 addrp = parse_ip6mask(p + 1);
1653 addrp = parse_ip6mask(NULL);
1655 memcpy(*maskpp + i, addrp, sizeof(*addrp));
1661 addrp = ip6parse_hostnetwork(buf, &n);
1670 memcpy(*addrpp + i + j, addrp + j,
1671 sizeof(*addrp));
1675 sizeof(*addrp));
1678 memcpy(*addrpp + i, addrp, sizeof(*addrp));
1681 free(addrp);
1696 struct in6_addr *addrp;
1704 addrp = parse_ip6mask(p + 1);
1706 addrp = parse_ip6mask(NULL);
1708 memcpy(maskp, addrp, sizeof(*maskp));
1714 addrp = *addrpp = ip6parse_hostnetwork(buf, naddrs);
1718 addrp[j].s6_addr32[k] &= maskp->s6_addr32[k];
1721 if (IN6_ARE_ADDR_EQUAL(&addrp[k], &addrp[j - 1])) {
1727 memcpy(&addrp[--j], &addrp[--*naddrs],