Home
last modified time | relevance | path

Searched refs:ip (Results 1 – 25 of 117) sorted by relevance

12345

/net/netfilter/ipset/
A Dip_set_hash_ip.c45 __be32 ip; member
55 return e1->ip == e2->ip; in hash_ip4_data_equal()
72 next->ip = e->ip; in hash_ip4_data_next()
88 __be32 ip; in hash_ip4_kadt() local
91 ip &= h->bitmask.ip; in hash_ip4_kadt()
95 e.ip = ip; in hash_ip4_kadt()
124 ip &= ntohl(h->bitmask.ip); in hash_ip4_uadt()
125 e.ip = htonl(ip); in hash_ip4_uadt()
153 ip = ntohl(h->next.ip); in hash_ip4_uadt()
155 e.ip = htonl(ip); in hash_ip4_uadt()
[all …]
A Dip_set_hash_netnet.c46 __be32 ip[2]; member
90 elem->ip[1] = orig->ip[1]; in hash_netnet4_data_reset_elem()
159 e.ip[0] &= (ip_set_netmask(e.cidr[0]) & h->bitmask.ip); in hash_netnet4_kadt()
160 e.ip[1] &= (ip_set_netmask(e.cidr[1]) & h->bitmask.ip); in hash_netnet4_kadt()
218 e.ip[0] = htonl(ip & ntohl(h->bitmask.ip) & ip_set_hostmask(e.cidr[0])); in hash_netnet4_uadt()
225 ip_to = ip; in hash_netnet4_uadt()
252 ip = ntohl(h->next.ip[0]); in hash_netnet4_uadt()
259 e.ip[0] = htonl(ip); in hash_netnet4_uadt()
260 ip = ip_set_range_to_cidr(ip, ip_to, &e.cidr[0]); in hash_netnet4_uadt()
299 return ipv6_addr_equal(&ip1->ip[0].in6, &ip2->ip[0].in6) && in hash_netnet6_data_equal()
[all …]
A Dip_set_hash_ipport.c46 __be32 ip; member
59 return ip1->ip == ip2->ip && in hash_ipport4_data_equal()
82 next->ip = d->ip; in hash_ipport4_data_next()
105 e.ip &= h->bitmask.ip; in hash_ipport4_kadt()
106 if (e.ip == 0) in hash_ipport4_kadt()
139 e.ip &= h->bitmask.ip; in hash_ipport4_uadt()
165 ip_to = ip = ntohl(e.ip); in hash_ipport4_uadt()
188 ip = ntohl(h->next.ip); in hash_ipport4_uadt()
189 for (; ip <= ip_to; ip++) { in hash_ipport4_uadt()
193 e.ip = htonl(ip); in hash_ipport4_uadt()
[all …]
A Dip_set_hash_net.c43 __be32 ip; member
56 return ip1->ip == ip2->ip && in hash_net4_data_equal()
105 next->ip = d->ip; in hash_net4_data_next()
175 e.ip = htonl(ip & ip_set_hostmask(e.cidr)); in hash_net4_uadt()
181 ip_to = ip; in hash_net4_uadt()
186 if (ip_to < ip) in hash_net4_uadt()
187 swap(ip, ip_to); in hash_net4_uadt()
193 ip = ntohl(h->next.ip); in hash_net4_uadt()
196 e.ip = htonl(ip); in hash_net4_uadt()
201 ip = ip_set_range_to_cidr(ip, ip_to, &e.cidr); in hash_net4_uadt()
[all …]
A Dip_set_hash_netportnet.c46 __be32 ip[2]; member
94 elem->ip[1] = orig->ip[1]; in hash_netportnet4_data_reset_elem()
259 e.ip[0] = htonl(ip & ip_set_hostmask(e.cidr[0])); in hash_netportnet4_uadt()
266 ip_to = ip; in hash_netportnet4_uadt()
271 if (ip > ip_to) in hash_netportnet4_uadt()
300 ip = ntohl(h->next.ip[0]); in hash_netportnet4_uadt()
309 e.ip[0] = htonl(ip); in hash_netportnet4_uadt()
310 ip = hash_netportnet4_range_to_cidr(ip, ip_to, &e.cidr[0]); in hash_netportnet4_uadt()
357 return ipv6_addr_equal(&ip1->ip[0].in6, &ip2->ip[0].in6) && in hash_netportnet6_data_equal()
358 ipv6_addr_equal(&ip1->ip[1].in6, &ip2->ip[1].in6) && in hash_netportnet6_data_equal()
[all …]
A Dip_set_hash_ipmark.c40 __be32 ip; member
51 return ip1->ip == ip2->ip && in hash_ipmark4_data_equal()
72 next->ip = d->ip; in hash_ipmark4_data_next()
133 ip_to = ip = ntohl(e.ip); in hash_ipmark4_uadt()
138 if (ip > ip_to) { in hash_ipmark4_uadt()
141 swap(ip, ip_to); in hash_ipmark4_uadt()
152 ip = ntohl(h->next.ip); in hash_ipmark4_uadt()
153 for (; ip <= ip_to; ip++, i++) { in hash_ipmark4_uadt()
154 e.ip = htonl(ip); in hash_ipmark4_uadt()
172 union nf_inet_addr ip; member
[all …]
A Dip_set_hash_ipportip.c43 __be32 ip; member
55 return ip1->ip == ip2->ip && in hash_ipportip4_data_equal()
80 next->ip = d->ip; in hash_ipportip4_data_next()
161 ip_to = ip = ntohl(e.ip); in hash_ipportip4_uadt()
166 if (ip > ip_to) in hash_ipportip4_uadt()
167 swap(ip, ip_to); in hash_ipportip4_uadt()
184 ip = ntohl(h->next.ip); in hash_ipportip4_uadt()
185 for (; ip <= ip_to; ip++) { in hash_ipportip4_uadt()
186 p = retried && ip == ntohl(h->next.ip) ? ntohs(h->next.port) in hash_ipportip4_uadt()
189 e.ip = htonl(ip); in hash_ipportip4_uadt()
[all …]
A Dip_set_hash_netiface.c48 __be32 ip; member
57 __be32 ip; member
73 return ip1->ip == ip2->ip && in hash_netiface4_data_equal()
132 next->ip = d->ip; in hash_netiface4_data_next()
242 e.ip = htonl(ip & ip_set_hostmask(e.cidr)); in hash_netiface4_uadt()
252 if (ip_to < ip) in hash_netiface4_uadt()
253 swap(ip, ip_to); in hash_netiface4_uadt()
261 ip = ntohl(h->next.ip); in hash_netiface4_uadt()
264 e.ip = htonl(ip); in hash_netiface4_uadt()
269 ip = ip_set_range_to_cidr(ip, ip_to, &e.cidr); in hash_netiface4_uadt()
[all …]
A Dip_set_hash_netport.c52 __be32 ip; member
66 return ip1->ip == ip2->ip && in hash_netport4_data_equal()
120 next->ip = d->ip; in hash_netport4_data_next()
215 e.ip = htonl(ip & ip_set_hostmask(e.cidr + 1)); in hash_netport4_uadt()
231 if (ip_to < ip) in hash_netport4_uadt()
232 swap(ip, ip_to); in hash_netport4_uadt()
240 ip = ntohl(h->next.ip); in hash_netport4_uadt()
246 e.ip = htonl(ip); in hash_netport4_uadt()
247 ip = ip_set_range_to_cidr(ip, ip_to, &cidr); in hash_netport4_uadt()
269 union nf_inet_addr ip; member
[all …]
A Dip_set_bitmap_ip.c118 u32 ip; in bitmap_ip_kadt() local
121 if (ip < map->first_ip || ip > map->last_ip) in bitmap_ip_kadt()
124 e.id = ip_to_id(map, ip); in bitmap_ip_kadt()
135 u32 ip = 0, ip_to = 0; in bitmap_ip_uadt() local
154 if (ip < map->first_ip || ip > map->last_ip) in bitmap_ip_uadt()
158 e.id = ip_to_id(map, ip); in bitmap_ip_uadt()
166 if (ip > ip_to) in bitmap_ip_uadt()
167 swap(ip, ip_to); in bitmap_ip_uadt()
175 ip_to = ip; in bitmap_ip_uadt()
181 for (; !before(ip_to, ip); ip += map->hosts) { in bitmap_ip_uadt()
[all …]
A Dip_set_hash_ipportnet.c53 __be32 ip; member
68 return ip1->ip == ip2->ip && in hash_ipportnet4_data_equal()
124 next->ip = d->ip; in hash_ipportnet4_data_next()
227 e.ip = htonl(ip); in hash_ipportnet4_uadt()
234 ip_to = ip; in hash_ipportnet4_uadt()
239 if (ip > ip_to) in hash_ipportnet4_uadt()
240 swap(ip, ip_to); in hash_ipportnet4_uadt()
270 ip = ntohl(h->next.ip); in hash_ipportnet4_uadt()
277 for (; ip <= ip_to; ip++) { in hash_ipportnet4_uadt()
278 e.ip = htonl(ip); in hash_ipportnet4_uadt()
[all …]
A Dip_set_hash_ipmac.c41 __be32 ip; member
55 return e1->ip == e2->ip && ether_addr_equal(e1->ether, e2->ether); in hash_ipmac4_data_equal()
61 if (nla_put_ipaddr4(skb, IPSET_ATTR_IP, e->ip) || in hash_ipmac4_data_list()
74 next->ip = e->ip; in hash_ipmac4_data_next()
104 ip4addrptr(skb, opt->flags & IPSET_DIM_ONE_SRC, &e.ip); in hash_ipmac4_kadt()
132 ret = ip_set_get_ipaddr4(tb[IPSET_ATTR_IP], &e.ip) || in hash_ipmac4_uadt()
148 union nf_inet_addr ip; member
162 return ipv6_addr_equal(&e1->ip.in6, &e2->ip.in6) && in hash_ipmac6_data_equal()
169 if (nla_put_ipaddr6(skb, IPSET_ATTR_IP, &e->ip.in6) || in hash_ipmac6_data_list()
220 ip6addrptr(skb, opt->flags & IPSET_DIM_ONE_SRC, &e.ip.in6); in hash_ipmac6_kadt()
[all …]
A DKconfig29 tristate "bitmap:ip set support"
32 This option adds the bitmap:ip set type support, by which one
38 tristate "bitmap:ip,mac set support"
56 tristate "hash:ip set support"
59 This option adds the hash:ip set type support, by which one
66 tristate "hash:ip,mark set support"
75 tristate "hash:ip,port set support"
84 tristate "hash:ip,port,ip set support"
87 This option adds the hash:ip,port,ip set type support, by which
94 tristate "hash:ip,port,net set support"
[all …]
A Dip_set_bitmap_ipmac.c69 ip_to_id(const struct bitmap_ipmac *m, u32 ip) in ip_to_id() argument
71 return ip - m->first_ip; in ip_to_id()
216 u32 ip; in bitmap_ipmac_kadt() local
218 ip = ntohl(ip4addr(skb, opt->flags & IPSET_DIM_ONE_SRC)); in bitmap_ipmac_kadt()
219 if (ip < map->first_ip || ip > map->last_ip) in bitmap_ipmac_kadt()
227 e.id = ip_to_id(map, ip); in bitmap_ipmac_kadt()
248 u32 ip = 0; in bitmap_ipmac_uadt() local
257 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP], &ip); in bitmap_ipmac_uadt()
265 if (ip < map->first_ip || ip > map->last_ip) in bitmap_ipmac_uadt()
268 e.id = ip_to_id(map, ip); in bitmap_ipmac_uadt()
/net/ipv4/netfilter/
A Dnf_nat_h323.c30 __be32 ip; in set_addr() member
36 buf.ip = ip; in set_addr()
77 addr->ip, port); in set_h225_addr()
88 addr->ip, port); in set_h245_addr()
105 if (addr.ip == ct->tuplehash[dir].tuple.src.u3.ip && in set_sig_addr()
117 &addr.ip, port, in set_sig_addr()
125 } else if (addr.ip == ct->tuplehash[dir].tuple.dst.u3.ip && in set_sig_addr()
129 &addr.ip, port, in set_sig_addr()
157 addr.ip == ct->tuplehash[dir].tuple.src.u3.ip && in set_ras_addr()
309 &exp->tuple.src.u3.ip, in nat_t120()
[all …]
/net/atm/
A Dmpoa_proc.c247 unsigned char ip[4]; in parse_qos() local
255 ip, ip+1, ip+2, ip+3) == 4) { in parse_qos()
256 ipaddr = *(__be32 *)ip; in parse_qos()
261 ip, ip+1, ip+2, ip+3, &tx_pcr, &tx_sdu) == 6) { in parse_qos()
265 ip, ip+1, ip+2, ip+3, &tx_pcr, &tx_sdu, &rx_pcr, &rx_sdu) != 8) in parse_qos()
268 ipaddr = *(__be32 *)ip; in parse_qos()
/net/netfilter/
A Dnfnetlink_osf.c35 const struct iphdr *ip = ip_hdr(skb); in nf_osf_ttl() local
40 return ip->ttl == f_ttl; in nf_osf_ttl()
43 else if (ip->ttl <= f_ttl) in nf_osf_ttl()
47 if (inet_ifa_match(ip->saddr, ifa)) { in nf_osf_ttl()
48 ret = (ip->ttl == f_ttl); in nf_osf_ttl()
167 const struct iphdr *ip, in nf_osf_hdr_ctx_init() argument
180 ctx->totlen = ntohs(ip->tot_len); in nf_osf_hdr_ctx_init()
181 ctx->df = ntohs(ip->frag_off) & IP_DF; in nf_osf_hdr_ctx_init()
202 const struct iphdr *ip = ip_hdr(skb); in nf_osf_match() local
241 f->ttl - ip->ttl); in nf_osf_match()
[all …]
A Dxt_iprange.c24 m = ntohl(iph->saddr) < ntohl(info->src_min.ip); in iprange_mt4()
25 m |= ntohl(iph->saddr) > ntohl(info->src_max.ip); in iprange_mt4()
31 &info->src_min.ip, in iprange_mt4()
32 &info->src_max.ip); in iprange_mt4()
37 m = ntohl(iph->daddr) < ntohl(info->dst_min.ip); in iprange_mt4()
38 m |= ntohl(iph->daddr) > ntohl(info->dst_max.ip); in iprange_mt4()
44 &info->dst_min.ip, in iprange_mt4()
45 &info->dst_max.ip); in iprange_mt4()
A Dxt_HMARK.c253 struct iphdr *ip, _ip; in hmark_pkt_set_htuple_ipv4() local
256 ip = (struct iphdr *) (skb->data + nhoff); in hmark_pkt_set_htuple_ipv4()
257 if (ip->protocol == IPPROTO_ICMP) { in hmark_pkt_set_htuple_ipv4()
259 if (get_inner_hdr(skb, ip->ihl * 4, &nhoff)) { in hmark_pkt_set_htuple_ipv4()
260 ip = skb_header_pointer(skb, nhoff, sizeof(_ip), &_ip); in hmark_pkt_set_htuple_ipv4()
261 if (ip == NULL) in hmark_pkt_set_htuple_ipv4()
266 t->src = ip->saddr & info->src_mask.ip; in hmark_pkt_set_htuple_ipv4()
267 t->dst = ip->daddr & info->dst_mask.ip; in hmark_pkt_set_htuple_ipv4()
272 t->proto = ip->protocol; in hmark_pkt_set_htuple_ipv4()
279 if (ip_is_fragment(ip)) in hmark_pkt_set_htuple_ipv4()
[all …]
A Dxt_l2tp.c263 const struct ipt_ip *ip = &e->ip; in l2tp_mt_check4() local
270 if ((ip->proto != IPPROTO_UDP) && in l2tp_mt_check4()
271 (ip->proto != IPPROTO_L2TP)) { in l2tp_mt_check4()
276 if ((ip->proto == IPPROTO_L2TP) && in l2tp_mt_check4()
290 const struct ip6t_ip6 *ip = &e->ipv6; in l2tp_mt_check6() local
297 if ((ip->proto != IPPROTO_UDP) && in l2tp_mt_check6()
298 (ip->proto != IPPROTO_L2TP)) { in l2tp_mt_check6()
303 if ((ip->proto == IPPROTO_L2TP) && in l2tp_mt_check6()
A Dxt_ecn.c87 const struct ipt_ip *ip = par->entryinfo; in ecn_mt_check4() local
96 (ip->proto != IPPROTO_TCP || ip->invflags & IPT_INV_PROTO)) { in ecn_mt_check4()
129 const struct ip6t_ip6 *ip = par->entryinfo; in ecn_mt_check6() local
138 (ip->proto != IPPROTO_TCP || ip->invflags & IP6T_INV_PROTO)) { in ecn_mt_check6()
A Dxt_multiport.c127 const struct ipt_ip *ip = par->entryinfo; in multiport_mt_check() local
130 return check(ip->proto, ip->invflags, multiinfo->flags, in multiport_mt_check()
136 const struct ip6t_ip6 *ip = par->entryinfo; in multiport_mt6_check() local
139 return check(ip->proto, ip->invflags, multiinfo->flags, in multiport_mt6_check()
/net/openvswitch/
A Dflow.c402 key->ip.proto = NEXTHDR_NONE; in parse_ipv6hdr()
403 key->ip.tos = ipv6_get_dsfield(nh); in parse_ipv6hdr()
404 key->ip.ttl = nh->hop_limit; in parse_ipv6hdr()
430 key->ip.proto = nexthdr; in parse_ipv6hdr()
694 memset(&key->ip, 0, sizeof(key->ip)); in key_extract_l3l4()
707 key->ip.proto = nh->protocol; in key_extract_l3l4()
708 key->ip.tos = nh->tos; in key_extract_l3l4()
709 key->ip.ttl = nh->ttl; in key_extract_l3l4()
780 key->ip.proto = 0; in key_extract_l3l4()
787 memset(&key->ip, 0, sizeof(key->ip)); in key_extract_l3l4()
[all …]
/net/ipv6/ila/
A Dila_xlat.c13 struct ila_params ip; member
101 xp->ip.locator.v64 = (__force __be64)nla_get_u64( in parse_nl_config()
105 xp->ip.locator_match.v64 = (__force __be64)nla_get_u64( in parse_nl_config()
145 &xp->ip.locator_match, in ila_lookup_by_params()
227 ila_init_saved_csum(&xp->ip); in ila_add_mapping()
236 &xp->ip.locator_match, in ila_add_mapping()
293 &xp->ip.locator_match, rht_params); in ila_del_mapping()
376 return ila_get_lock(ilan, ila->xp.ip.locator_match); in lock_from_ila_map()
427 (__force u64)ila->xp.ip.locator.v64, in ila_fill_info()
430 (__force u64)ila->xp.ip.locator_match.v64, in ila_fill_info()
[all …]
/net/netfilter/ipvs/
A Dip_vs_ftp.c162 addr->ip = get_unaligned((__be32 *) p); in ip_vs_ftp_get_addrport()
289 &from.ip, ntohs(port), &cp->caddr.ip, 0); in ip_vs_ftp_out()
344 from.ip = n_cp->vaddr.ip; in ip_vs_ftp_out()
347 ((unsigned char *)&from.ip)[0], in ip_vs_ftp_out()
348 ((unsigned char *)&from.ip)[1], in ip_vs_ftp_out()
349 ((unsigned char *)&from.ip)[2], in ip_vs_ftp_out()
350 ((unsigned char *)&from.ip)[3], in ip_vs_ftp_out()
499 IP_VS_DBG(7, "PORT %pI4:%u detected\n", &to.ip, ntohs(port)); in ip_vs_ftp_in()
504 &to.ip, ntohs(port), &cp->vaddr.ip, in ip_vs_ftp_in()

Completed in 44 milliseconds

12345