Lines Matching refs:tb

112 hash_ipport4_uadt(struct ip_set *set, struct nlattr *tb[],  in hash_ipport4_uadt()  argument
123 if (tb[IPSET_ATTR_LINENO]) in hash_ipport4_uadt()
124 *lineno = nla_get_u32(tb[IPSET_ATTR_LINENO]); in hash_ipport4_uadt()
126 if (unlikely(!tb[IPSET_ATTR_IP] || in hash_ipport4_uadt()
127 !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || in hash_ipport4_uadt()
128 !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO))) in hash_ipport4_uadt()
131 ret = ip_set_get_ipaddr4(tb[IPSET_ATTR_IP], &e.ip); in hash_ipport4_uadt()
135 ret = ip_set_get_extensions(set, tb, &ext); in hash_ipport4_uadt()
143 e.port = nla_get_be16(tb[IPSET_ATTR_PORT]); in hash_ipport4_uadt()
145 if (tb[IPSET_ATTR_PROTO]) { in hash_ipport4_uadt()
146 e.proto = nla_get_u8(tb[IPSET_ATTR_PROTO]); in hash_ipport4_uadt()
159 !(tb[IPSET_ATTR_IP_TO] || tb[IPSET_ATTR_CIDR] || in hash_ipport4_uadt()
160 tb[IPSET_ATTR_PORT_TO])) { in hash_ipport4_uadt()
166 if (tb[IPSET_ATTR_IP_TO]) { in hash_ipport4_uadt()
167 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP_TO], &ip_to); in hash_ipport4_uadt()
172 } else if (tb[IPSET_ATTR_CIDR]) { in hash_ipport4_uadt()
173 u8 cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]); in hash_ipport4_uadt()
181 if (with_ports && tb[IPSET_ATTR_PORT_TO]) { in hash_ipport4_uadt()
182 port_to = ip_set_get_h16(tb[IPSET_ATTR_PORT_TO]); in hash_ipport4_uadt()
283 hash_ipport6_uadt(struct ip_set *set, struct nlattr *tb[], in hash_ipport6_uadt() argument
294 if (tb[IPSET_ATTR_LINENO]) in hash_ipport6_uadt()
295 *lineno = nla_get_u32(tb[IPSET_ATTR_LINENO]); in hash_ipport6_uadt()
297 if (unlikely(!tb[IPSET_ATTR_IP] || in hash_ipport6_uadt()
298 !ip_set_attr_netorder(tb, IPSET_ATTR_PORT) || in hash_ipport6_uadt()
299 !ip_set_optattr_netorder(tb, IPSET_ATTR_PORT_TO))) in hash_ipport6_uadt()
301 if (unlikely(tb[IPSET_ATTR_IP_TO])) in hash_ipport6_uadt()
303 if (unlikely(tb[IPSET_ATTR_CIDR])) { in hash_ipport6_uadt()
304 u8 cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]); in hash_ipport6_uadt()
310 ret = ip_set_get_ipaddr6(tb[IPSET_ATTR_IP], &e.ip); in hash_ipport6_uadt()
314 ret = ip_set_get_extensions(set, tb, &ext); in hash_ipport6_uadt()
322 e.port = nla_get_be16(tb[IPSET_ATTR_PORT]); in hash_ipport6_uadt()
324 if (tb[IPSET_ATTR_PROTO]) { in hash_ipport6_uadt()
325 e.proto = nla_get_u8(tb[IPSET_ATTR_PROTO]); in hash_ipport6_uadt()
337 if (adt == IPSET_TEST || !with_ports || !tb[IPSET_ATTR_PORT_TO]) { in hash_ipport6_uadt()
343 port_to = ip_set_get_h16(tb[IPSET_ATTR_PORT_TO]); in hash_ipport6_uadt()