Home
last modified time | relevance | path

Searched refs:cidr (Results 1 – 16 of 16) sorted by relevance

/Linux-v5.4/net/netfilter/ipset/
Dip_set_hash_netnet.c48 u8 cidr[2]; member
90 hash_netnet4_data_netmask(struct hash_netnet4_elem *elem, u8 cidr, bool inner) in hash_netnet4_data_netmask() argument
93 elem->ip[1] &= ip_set_netmask(cidr); in hash_netnet4_data_netmask()
94 elem->cidr[1] = cidr; in hash_netnet4_data_netmask()
96 elem->ip[0] &= ip_set_netmask(cidr); in hash_netnet4_data_netmask()
97 elem->cidr[0] = cidr; in hash_netnet4_data_netmask()
109 nla_put_u8(skb, IPSET_ATTR_CIDR, data->cidr[0]) || in hash_netnet4_data_list()
110 nla_put_u8(skb, IPSET_ATTR_CIDR2, data->cidr[1]) || in hash_netnet4_data_list()
134 e->cidr[0] = HOST_MASK; in hash_netnet4_init()
135 e->cidr[1] = HOST_MASK; in hash_netnet4_init()
[all …]
Dip_set_hash_net.c45 u8 cidr; member
56 ip1->cidr == ip2->cidr; in hash_net4_data_equal()
78 hash_net4_data_netmask(struct hash_net4_elem *elem, u8 cidr) in hash_net4_data_netmask() argument
80 elem->ip &= ip_set_netmask(cidr); in hash_net4_data_netmask()
81 elem->cidr = cidr; in hash_net4_data_netmask()
90 nla_put_u8(skb, IPSET_ATTR_CIDR, data->cidr) || in hash_net4_data_list()
119 .cidr = INIT_CIDR(h->nets[0].cidr[0], HOST_MASK), in hash_net4_kadt()
123 if (e.cidr == 0) in hash_net4_kadt()
126 e.cidr = HOST_MASK; in hash_net4_kadt()
129 e.ip &= ip_set_netmask(e.cidr); in hash_net4_kadt()
[all …]
Dip_set_hash_ipportnet.c55 u8 cidr:7; member
69 ip1->cidr == ip2->cidr && in hash_ipportnet4_data_equal()
93 hash_ipportnet4_data_netmask(struct hash_ipportnet4_elem *elem, u8 cidr) in hash_ipportnet4_data_netmask() argument
95 elem->ip2 &= ip_set_netmask(cidr); in hash_ipportnet4_data_netmask()
96 elem->cidr = cidr - 1; in hash_ipportnet4_data_netmask()
108 nla_put_u8(skb, IPSET_ATTR_CIDR2, data->cidr + 1) || in hash_ipportnet4_data_list()
140 .cidr = INIT_CIDR(h->nets[0].cidr[0], HOST_MASK), in hash_ipportnet4_kadt()
145 e.cidr = HOST_MASK - 1; in hash_ipportnet4_kadt()
153 e.ip2 &= ip_set_netmask(e.cidr + 1); in hash_ipportnet4_kadt()
164 struct hash_ipportnet4_elem e = { .cidr = HOST_MASK - 1 }; in hash_ipportnet4_uadt()
[all …]
Dip_set_hash_netport.c54 u8 cidr:7; member
68 ip1->cidr == ip2->cidr; in hash_netport4_data_equal()
90 hash_netport4_data_netmask(struct hash_netport4_elem *elem, u8 cidr) in hash_netport4_data_netmask() argument
92 elem->ip &= ip_set_netmask(cidr); in hash_netport4_data_netmask()
93 elem->cidr = cidr - 1; in hash_netport4_data_netmask()
104 nla_put_u8(skb, IPSET_ATTR_CIDR, data->cidr + 1) || in hash_netport4_data_list()
135 .cidr = INIT_CIDR(h->nets[0].cidr[0], HOST_MASK), in hash_netport4_kadt()
140 e.cidr = HOST_MASK - 1; in hash_netport4_kadt()
147 e.ip &= ip_set_netmask(e.cidr + 1); in hash_netport4_kadt()
158 struct hash_netport4_elem e = { .cidr = HOST_MASK - 1 }; in hash_netport4_uadt()
[all …]
Dip_set_hash_netportnet.c49 u8 cidr[2]; member
97 u8 cidr, bool inner) in hash_netportnet4_data_netmask() argument
100 elem->ip[1] &= ip_set_netmask(cidr); in hash_netportnet4_data_netmask()
101 elem->cidr[1] = cidr; in hash_netportnet4_data_netmask()
103 elem->ip[0] &= ip_set_netmask(cidr); in hash_netportnet4_data_netmask()
104 elem->cidr[0] = cidr; in hash_netportnet4_data_netmask()
117 nla_put_u8(skb, IPSET_ATTR_CIDR, data->cidr[0]) || in hash_netportnet4_data_list()
118 nla_put_u8(skb, IPSET_ATTR_CIDR2, data->cidr[1]) || in hash_netportnet4_data_list()
144 e->cidr[0] = HOST_MASK; in hash_netportnet4_init()
145 e->cidr[1] = HOST_MASK; in hash_netportnet4_init()
[all …]
Dip_set_hash_netiface.c48 u8 cidr; member
57 u8 cidr; member
71 ip1->cidr == ip2->cidr && in hash_netiface4_data_equal()
96 hash_netiface4_data_netmask(struct hash_netiface4_elem *elem, u8 cidr) in hash_netiface4_data_netmask() argument
98 elem->ip &= ip_set_netmask(cidr); in hash_netiface4_data_netmask()
99 elem->cidr = cidr; in hash_netiface4_data_netmask()
111 nla_put_u8(skb, IPSET_ATTR_CIDR, data->cidr) || in hash_netiface4_data_list()
158 .cidr = INIT_CIDR(h->nets[0].cidr[0], HOST_MASK), in hash_netiface4_kadt()
164 e.cidr = HOST_MASK; in hash_netiface4_kadt()
167 e.ip &= ip_set_netmask(e.cidr); in hash_netiface4_kadt()
[all …]
Dip_set_hash_gen.h94 u8 cidr[IPSET_NET_COUNT]; /* the cidr value */ member
130 #define __CIDR(cidr, i) (cidr[i]) argument
132 #define __CIDR(cidr, i) (cidr) argument
136 #define NCIDR_PUT(cidr) ((cidr) + 1) argument
137 #define NCIDR_GET(cidr) ((cidr) - 1) argument
141 #define DCIDR_PUT(cidr) ((cidr) - 1) argument
142 #define DCIDR_GET(cidr, i) (__CIDR(cidr, i) + 1) argument
144 #define DCIDR_PUT(cidr) (cidr) argument
145 #define DCIDR_GET(cidr, i) __CIDR(cidr, i) argument
148 #define INIT_CIDR(cidr, host_mask) \ argument
[all …]
Dip_set_hash_ip.c137 u8 cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]); in hash_ip4_uadt() local
139 if (!cidr || cidr > HOST_MASK) in hash_ip4_uadt()
141 ip_set_mask_from_to(ip, ip_to, cidr); in hash_ip4_uadt()
249 u8 cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]); in hash_ip6_uadt() local
251 if (cidr != HOST_MASK) in hash_ip6_uadt()
Dip_set_hash_ipmark.c138 u8 cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]); in hash_ipmark4_uadt() local
140 if (!cidr || cidr > HOST_MASK) in hash_ipmark4_uadt()
142 ip_set_mask_from_to(ip, ip_to, cidr); in hash_ipmark4_uadt()
240 u8 cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]); in hash_ipmark6_uadt() local
242 if (cidr != HOST_MASK) in hash_ipmark6_uadt()
Dip_set_bitmap_ip.c172 u8 cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]); in bitmap_ip_uadt() local
174 if (!cidr || cidr > HOST_MASK) in bitmap_ip_uadt()
176 ip_set_mask_from_to(ip, ip_to, cidr); in bitmap_ip_uadt()
266 u8 cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]); in bitmap_ip_create() local
268 if (cidr >= HOST_MASK) in bitmap_ip_create()
270 ip_set_mask_from_to(first_ip, last_ip, cidr); in bitmap_ip_create()
Dpfxlen.c172 ip_set_range_to_cidr(u32 from, u32 to, u8 *cidr) in ip_set_range_to_cidr() argument
182 *cidr = i; in ip_set_range_to_cidr()
186 *cidr = 32; in ip_set_range_to_cidr()
Dip_set_hash_ipport.c161 u8 cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]); in hash_ipport4_uadt() local
163 if (!cidr || cidr > HOST_MASK) in hash_ipport4_uadt()
165 ip_set_mask_from_to(ip, ip_to, cidr); in hash_ipport4_uadt()
283 u8 cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]); in hash_ipport6_uadt() local
285 if (cidr != HOST_MASK) in hash_ipport6_uadt()
Dip_set_hash_ipportip.c168 u8 cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]); in hash_ipportip4_uadt() local
170 if (!cidr || cidr > HOST_MASK) in hash_ipportip4_uadt()
172 ip_set_mask_from_to(ip, ip_to, cidr); in hash_ipportip4_uadt()
294 u8 cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]); in hash_ipportip6_uadt() local
296 if (cidr != HOST_MASK) in hash_ipportip6_uadt()
Dip_set_bitmap_ipmac.c342 u8 cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]); in bitmap_ipmac_create() local
344 if (cidr >= HOST_MASK) in bitmap_ipmac_create()
346 ip_set_mask_from_to(first_ip, last_ip, cidr); in bitmap_ipmac_create()
/Linux-v5.4/drivers/soc/atmel/
Dsoc.c155 static int __init at91_get_cidr_exid_from_dbgu(u32 *cidr, u32 *exid) in at91_get_cidr_exid_from_dbgu() argument
175 *cidr = readl(regs + AT91_DBGU_CIDR); in at91_get_cidr_exid_from_dbgu()
183 static int __init at91_get_cidr_exid_from_chipid(u32 *cidr, u32 *exid) in at91_get_cidr_exid_from_chipid() argument
200 *cidr = readl(regs + AT91_CHIPID_CIDR); in at91_get_cidr_exid_from_chipid()
213 u32 cidr, exid; in at91_soc_init() local
221 ret = at91_get_cidr_exid_from_dbgu(&cidr, &exid); in at91_soc_init()
223 ret = at91_get_cidr_exid_from_chipid(&cidr, &exid); in at91_soc_init()
231 if (soc->cidr_match != (cidr & AT91_CIDR_MATCH_MASK)) in at91_soc_init()
234 if (!(cidr & AT91_CIDR_EXT) || soc->exid_match == exid) in at91_soc_init()
250 AT91_CIDR_VERSION(cidr)); in at91_soc_init()
[all …]
/Linux-v5.4/include/linux/netfilter/ipset/
Dpfxlen.h37 extern u32 ip_set_range_to_cidr(u32 from, u32 to, u8 *cidr);
39 #define ip_set_mask_from_to(from, to, cidr) \ argument
41 from &= ip_set_hostmask(cidr); \
42 to = from | ~ip_set_hostmask(cidr); \