Lines Matching refs:tb

108 hash_ipportip4_uadt(struct ip_set *set, struct nlattr *tb[],  in hash_ipportip4_uadt()  argument
119 if (tb[IPSET_ATTR_LINENO]) in hash_ipportip4_uadt()
120 *lineno = nla_get_u32(tb[IPSET_ATTR_LINENO]); in hash_ipportip4_uadt()
122 if (unlikely(!tb[IPSET_ATTR_IP] || !tb[IPSET_ATTR_IP2] || in hash_ipportip4_uadt()
123 !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || in hash_ipportip4_uadt()
124 !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO))) in hash_ipportip4_uadt()
127 ret = ip_set_get_ipaddr4(tb[IPSET_ATTR_IP], &e.ip); in hash_ipportip4_uadt()
131 ret = ip_set_get_extensions(set, tb, &ext); in hash_ipportip4_uadt()
135 ret = ip_set_get_ipaddr4(tb[IPSET_ATTR_IP2], &e.ip2); in hash_ipportip4_uadt()
139 e.port = nla_get_be16(tb[IPSET_ATTR_PORT]); in hash_ipportip4_uadt()
141 if (tb[IPSET_ATTR_PROTO]) { in hash_ipportip4_uadt()
142 e.proto = nla_get_u8(tb[IPSET_ATTR_PROTO]); in hash_ipportip4_uadt()
155 !(tb[IPSET_ATTR_IP_TO] || tb[IPSET_ATTR_CIDR] || in hash_ipportip4_uadt()
156 tb[IPSET_ATTR_PORT_TO])) { in hash_ipportip4_uadt()
162 if (tb[IPSET_ATTR_IP_TO]) { in hash_ipportip4_uadt()
163 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); in hash_ipportip4_uadt()
168 } else if (tb[IPSET_ATTR_CIDR]) { in hash_ipportip4_uadt()
169 u8 cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]); in hash_ipportip4_uadt()
177 if (with_ports && tb[IPSET_ATTR_PORT_TO]) { in hash_ipportip4_uadt()
178 port_to = ip_set_get_h16(tb[IPSET_ATTR_PORT_TO]); in hash_ipportip4_uadt()
278 hash_ipportip6_uadt(struct ip_set *set, struct nlattr *tb[], in hash_ipportip6_uadt() argument
289 if (tb[IPSET_ATTR_LINENO]) in hash_ipportip6_uadt()
290 *lineno = nla_get_u32(tb[IPSET_ATTR_LINENO]); in hash_ipportip6_uadt()
292 if (unlikely(!tb[IPSET_ATTR_IP] || !tb[IPSET_ATTR_IP2] || in hash_ipportip6_uadt()
293 !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || in hash_ipportip6_uadt()
294 !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO))) in hash_ipportip6_uadt()
296 if (unlikely(tb[IPSET_ATTR_IP_TO])) in hash_ipportip6_uadt()
298 if (unlikely(tb[IPSET_ATTR_CIDR])) { in hash_ipportip6_uadt()
299 u8 cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]); in hash_ipportip6_uadt()
305 ret = ip_set_get_ipaddr6(tb[IPSET_ATTR_IP], &e.ip); in hash_ipportip6_uadt()
309 ret = ip_set_get_extensions(set, tb, &ext); in hash_ipportip6_uadt()
313 ret = ip_set_get_ipaddr6(tb[IPSET_ATTR_IP2], &e.ip2); in hash_ipportip6_uadt()
317 e.port = nla_get_be16(tb[IPSET_ATTR_PORT]); in hash_ipportip6_uadt()
319 if (tb[IPSET_ATTR_PROTO]) { in hash_ipportip6_uadt()
320 e.proto = nla_get_u8(tb[IPSET_ATTR_PROTO]); in hash_ipportip6_uadt()
332 if (adt == IPSET_TEST || !with_ports || !tb[IPSET_ATTR_PORT_TO]) { in hash_ipportip6_uadt()
338 port_to = ip_set_get_h16(tb[IPSET_ATTR_PORT_TO]); in hash_ipportip6_uadt()