Home
last modified time | relevance | path

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

12345

/net/netfilter/ipset/
Dip_set_hash_ip.c42 __be32 ip; member
52 return e1->ip == e2->ip; in hash_ip4_data_equal()
58 if (nla_put_ipaddr4(skb, IPSET_ATTR_IP, e->ip)) in hash_ip4_data_list()
69 next->ip = e->ip; in hash_ip4_data_next()
85 __be32 ip; in hash_ip4_kadt() local
87 ip4addrptr(skb, opt->flags & IPSET_DIM_ONE_SRC, &ip); in hash_ip4_kadt()
88 ip &= ip_set_netmask(h->netmask); in hash_ip4_kadt()
89 if (ip == 0) in hash_ip4_kadt()
92 e.ip = ip; in hash_ip4_kadt()
104 u32 ip = 0, ip_to = 0, hosts; in hash_ip4_uadt() local
[all …]
Dip_set_hash_netnet.c42 __be32 ip[2]; member
86 elem->ip[1] = orig->ip[1]; in hash_netnet4_data_reset_elem()
93 elem->ip[1] &= ip_set_netmask(cidr); in hash_netnet4_data_netmask()
96 elem->ip[0] &= ip_set_netmask(cidr); in hash_netnet4_data_netmask()
107 if (nla_put_ipaddr4(skb, IPSET_ATTR_IP, data->ip[0]) || in hash_netnet4_data_list()
108 nla_put_ipaddr4(skb, IPSET_ATTR_IP2, data->ip[1]) || in hash_netnet4_data_list()
153 ip4addrptr(skb, opt->flags & IPSET_DIM_ONE_SRC, &e.ip[0]); in hash_netnet4_kadt()
154 ip4addrptr(skb, opt->flags & IPSET_DIM_TWO_SRC, &e.ip[1]); in hash_netnet4_kadt()
155 e.ip[0] &= ip_set_netmask(e.cidr[0]); in hash_netnet4_kadt()
156 e.ip[1] &= ip_set_netmask(e.cidr[1]); in hash_netnet4_kadt()
[all …]
Dip_set_hash_net.c42 __be32 ip; member
55 return ip1->ip == ip2->ip && in hash_net4_data_equal()
80 elem->ip &= ip_set_netmask(cidr); in hash_net4_data_netmask()
89 if (nla_put_ipaddr4(skb, IPSET_ATTR_IP, data->ip) || in hash_net4_data_list()
104 next->ip = d->ip; in hash_net4_data_next()
128 ip4addrptr(skb, opt->flags & IPSET_DIM_ONE_SRC, &e.ip); in hash_net4_kadt()
129 e.ip &= ip_set_netmask(e.cidr); in hash_net4_kadt()
142 u32 ip = 0, ip_to = 0; in hash_net4_uadt() local
152 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP], &ip); in hash_net4_uadt()
174 e.ip = htonl(ip & ip_set_hostmask(e.cidr)); in hash_net4_uadt()
[all …]
Dip_set_hash_netportnet.c44 __be32 ip[2]; member
92 elem->ip[1] = orig->ip[1]; in hash_netportnet4_data_reset_elem()
100 elem->ip[1] &= ip_set_netmask(cidr); in hash_netportnet4_data_netmask()
103 elem->ip[0] &= ip_set_netmask(cidr); in hash_netportnet4_data_netmask()
114 if (nla_put_ipaddr4(skb, IPSET_ATTR_IP, data->ip[0]) || in hash_netportnet4_data_list()
115 nla_put_ipaddr4(skb, IPSET_ATTR_IP2, data->ip[1]) || in hash_netportnet4_data_list()
167 ip4addrptr(skb, opt->flags & IPSET_DIM_ONE_SRC, &e.ip[0]); in hash_netportnet4_kadt()
168 ip4addrptr(skb, opt->flags & IPSET_DIM_THREE_SRC, &e.ip[1]); in hash_netportnet4_kadt()
169 e.ip[0] &= ip_set_netmask(e.cidr[0]); in hash_netportnet4_kadt()
170 e.ip[1] &= ip_set_netmask(e.cidr[1]); in hash_netportnet4_kadt()
[all …]
Dip_set_hash_ipport.c42 __be32 ip; member
55 return ip1->ip == ip2->ip && in hash_ipport4_data_equal()
64 if (nla_put_ipaddr4(skb, IPSET_ATTR_IP, data->ip) || in hash_ipport4_data_list()
78 next->ip = d->ip; in hash_ipport4_data_next()
92 struct hash_ipport4_elem e = { .ip = 0 }; in hash_ipport4_kadt()
99 ip4addrptr(skb, opt->flags & IPSET_DIM_ONE_SRC, &e.ip); in hash_ipport4_kadt()
109 struct hash_ipport4_elem e = { .ip = 0 }; in hash_ipport4_uadt()
111 u32 ip, ip_to = 0, p = 0, port, port_to; in hash_ipport4_uadt() local
123 ret = ip_set_get_ipaddr4(tb[IPSET_ATTR_IP], &e.ip); in hash_ipport4_uadt()
153 ip_to = ip = ntohl(e.ip); in hash_ipport4_uadt()
[all …]
Dip_set_hash_ipportip.c42 __be32 ip; member
54 return ip1->ip == ip2->ip && in hash_ipportip4_data_equal()
64 if (nla_put_ipaddr4(skb, IPSET_ATTR_IP, data->ip) || in hash_ipportip4_data_list()
79 next->ip = d->ip; in hash_ipportip4_data_next()
94 struct hash_ipportip4_elem e = { .ip = 0 }; in hash_ipportip4_kadt()
101 ip4addrptr(skb, opt->flags & IPSET_DIM_ONE_SRC, &e.ip); in hash_ipportip4_kadt()
112 struct hash_ipportip4_elem e = { .ip = 0 }; in hash_ipportip4_uadt()
114 u32 ip, ip_to = 0, p = 0, port, port_to; in hash_ipportip4_uadt() local
126 ret = ip_set_get_ipaddr4(tb[IPSET_ATTR_IP], &e.ip); in hash_ipportip4_uadt()
160 ip_to = ip = ntohl(e.ip); in hash_ipportip4_uadt()
[all …]
Dip_set_hash_ipmark.c39 __be32 ip; member
50 return ip1->ip == ip2->ip && in hash_ipmark4_data_equal()
58 if (nla_put_ipaddr4(skb, IPSET_ATTR_IP, data->ip) || in hash_ipmark4_data_list()
71 next->ip = d->ip; in hash_ipmark4_data_next()
91 ip4addrptr(skb, opt->flags & IPSET_DIM_ONE_SRC, &e.ip); in hash_ipmark4_kadt()
103 u32 ip, ip_to = 0; in hash_ipmark4_uadt() local
113 ret = ip_set_get_ipaddr4(tb[IPSET_ATTR_IP], &e.ip); in hash_ipmark4_uadt()
130 ip_to = ip = ntohl(e.ip); in hash_ipmark4_uadt()
135 if (ip > ip_to) in hash_ipmark4_uadt()
136 swap(ip, ip_to); in hash_ipmark4_uadt()
[all …]
Dip_set_hash_netiface.c46 __be32 ip; member
55 __be32 ip; member
70 return ip1->ip == ip2->ip && in hash_netiface4_data_equal()
98 elem->ip &= ip_set_netmask(cidr); in hash_netiface4_data_netmask()
110 if (nla_put_ipaddr4(skb, IPSET_ATTR_IP, data->ip) || in hash_netiface4_data_list()
126 next->ip = d->ip; in hash_netiface4_data_next()
166 ip4addrptr(skb, opt->flags & IPSET_DIM_ONE_SRC, &e.ip); in hash_netiface4_kadt()
167 e.ip &= ip_set_netmask(e.cidr); in hash_netiface4_kadt()
199 u32 ip = 0, ip_to = 0; in hash_netiface4_uadt() local
210 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP], &ip); in hash_netiface4_uadt()
[all …]
Dip_set_hash_netport.c51 __be32 ip; member
65 return ip1->ip == ip2->ip && in hash_netport4_data_equal()
92 elem->ip &= ip_set_netmask(cidr); in hash_netport4_data_netmask()
102 if (nla_put_ipaddr4(skb, IPSET_ATTR_IP, data->ip) || in hash_netport4_data_list()
119 next->ip = d->ip; in hash_netport4_data_next()
146 ip4addrptr(skb, opt->flags & IPSET_DIM_ONE_SRC, &e.ip); in hash_netport4_kadt()
147 e.ip &= ip_set_netmask(e.cidr + 1); in hash_netport4_kadt()
160 u32 port, port_to, p = 0, ip = 0, ip_to = 0; in hash_netport4_uadt() local
174 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP], &ip); in hash_netport4_uadt()
214 e.ip = htonl(ip & ip_set_hostmask(e.cidr + 1)); in hash_netport4_uadt()
[all …]
Dip_set_bitmap_ip.c59 ip_to_id(const struct bitmap_ip *m, u32 ip) in ip_to_id() argument
61 return ((ip & ip_set_hostmask(m->netmask)) - m->first_ip) / m->hosts; in ip_to_id()
118 u32 ip; in bitmap_ip_kadt() local
120 ip = ntohl(ip4addr(skb, opt->flags & IPSET_DIM_ONE_SRC)); in bitmap_ip_kadt()
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
146 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP], &ip); in bitmap_ip_uadt()
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()
[all …]
Dip_set_hash_ipportnet.c52 __be32 ip; member
67 return ip1->ip == ip2->ip && in hash_ipportnet4_data_equal()
105 if (nla_put_ipaddr4(skb, IPSET_ATTR_IP, data->ip) || in hash_ipportnet4_data_list()
123 next->ip = d->ip; in hash_ipportnet4_data_next()
151 ip4addrptr(skb, opt->flags & IPSET_DIM_ONE_SRC, &e.ip); in hash_ipportnet4_kadt()
166 u32 ip = 0, ip_to = 0, p = 0, port, port_to; in hash_ipportnet4_uadt() local
181 ret = ip_set_get_hostipaddr4(tb[IPSET_ATTR_IP], &ip); in hash_ipportnet4_uadt()
226 e.ip = htonl(ip); in hash_ipportnet4_uadt()
233 ip_to = ip; in hash_ipportnet4_uadt()
238 if (ip > ip_to) in hash_ipportnet4_uadt()
[all …]
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()
89 struct hash_ipmac4_elem e = { .ip = 0, { .foo[0] = 0, .foo[1] = 0 } }; in hash_ipmac4_kadt()
104 ip4addrptr(skb, opt->flags & IPSET_DIM_ONE_SRC, &e.ip); in hash_ipmac4_kadt()
114 struct hash_ipmac4_elem e = { .ip = 0, { .foo[0] = 0, .foo[1] = 0 } }; in hash_ipmac4_uadt()
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()
[all …]
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"
41 This option adds the bitmap:ip,mac set type support, by which one
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"
69 This option adds the hash:ip,mark set type support, by which one
75 tristate "hash:ip,port set support"
78 This option adds the hash:ip,port set type support, by which one
[all …]
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/
Dnf_nat_h323.c25 unsigned int addroff, __be32 ip, __be16 port) in set_addr() argument
30 __be32 ip; in set_addr() member
36 buf.ip = ip; in set_addr()
76 return set_addr(skb, protoff, data, dataoff, taddr->ipAddress.ip, in set_h225_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()
113 (ntohl(addr.ip) & 0xff000000) == 0x7f000000) in set_sig_addr()
117 &addr.ip, port, in set_sig_addr()
118 &ct->tuplehash[!dir].tuple.dst.u3.ip, in set_sig_addr()
[all …]
/net/atm/
Dmpoa_proc.c249 unsigned char ip[4]; in parse_qos() local
257 ip, ip+1, ip+2, ip+3) == 4) { in parse_qos()
258 ipaddr = *(__be32 *)ip; in parse_qos()
263 ip, ip+1, ip+2, ip+3, &tx_pcr, &tx_sdu) == 6) { in parse_qos()
267 ip, ip+1, ip+2, ip+3, &tx_pcr, &tx_sdu, &rx_pcr, &rx_sdu) != 8) in parse_qos()
270 ipaddr = *(__be32 *)ip; in parse_qos()
/net/netfilter/
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()
200 const struct iphdr *ip = ip_hdr(skb); in nf_osf_match() local
211 tcp = nf_osf_hdr_ctx_init(&ctx, skb, ip, opts); in nf_osf_match()
[all …]
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()
Dxt_HMARK.c257 struct iphdr *ip, _ip; in hmark_pkt_set_htuple_ipv4() local
260 ip = (struct iphdr *) (skb->data + nhoff); in hmark_pkt_set_htuple_ipv4()
261 if (ip->protocol == IPPROTO_ICMP) { in hmark_pkt_set_htuple_ipv4()
263 if (get_inner_hdr(skb, ip->ihl * 4, &nhoff)) { in hmark_pkt_set_htuple_ipv4()
264 ip = skb_header_pointer(skb, nhoff, sizeof(_ip), &_ip); in hmark_pkt_set_htuple_ipv4()
265 if (ip == NULL) in hmark_pkt_set_htuple_ipv4()
270 t->src = ip->saddr & info->src_mask.ip; in hmark_pkt_set_htuple_ipv4()
271 t->dst = ip->daddr & info->dst_mask.ip; in hmark_pkt_set_htuple_ipv4()
276 t->proto = ip->protocol; in hmark_pkt_set_htuple_ipv4()
283 if (ip->frag_off & htons(IP_MF | IP_OFFSET)) in hmark_pkt_set_htuple_ipv4()
[all …]
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()
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()
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/
Dflow.c257 key->ip.proto = NEXTHDR_NONE; in parse_ipv6hdr()
258 key->ip.tos = ipv6_get_dsfield(nh); in parse_ipv6hdr()
259 key->ip.ttl = nh->hop_limit; in parse_ipv6hdr()
267 key->ip.frag = OVS_FRAG_TYPE_LATER; in parse_ipv6hdr()
268 key->ip.proto = nexthdr; in parse_ipv6hdr()
271 key->ip.frag = OVS_FRAG_TYPE_FIRST; in parse_ipv6hdr()
273 key->ip.frag = OVS_FRAG_TYPE_NONE; in parse_ipv6hdr()
285 key->ip.proto = nexthdr; in parse_ipv6hdr()
543 memset(&key->ip, 0, sizeof(key->ip)); in key_extract_l3l4()
556 key->ip.proto = nh->protocol; in key_extract_l3l4()
[all …]
/net/ipv6/ila/
Dila_xlat.c14 struct ila_params ip; member
72 return (ila->xp.ip.locator_match.v64 != *(__be64 *)arg->key); in ila_cmpfn()
88 .key_offset = offsetof(struct ila_map, xp.ip.locator_match),
102 xp->ip.locator.v64 = (__force __be64)nla_get_u64( in parse_nl_config()
106 xp->ip.locator_match.v64 = (__force __be64)nla_get_u64( in parse_nl_config()
110 xp->ip.csum_mode = nla_get_u8(info->attrs[ILA_ATTR_CSUM_MODE]); in parse_nl_config()
112 xp->ip.csum_mode = ILA_CSUM_NO_ACTION; in parse_nl_config()
115 xp->ip.ident_type = nla_get_u8( in parse_nl_config()
118 xp->ip.ident_type = ILA_ATYPE_USE_FORMAT; in parse_nl_config()
151 &xp->ip.locator_match, in ila_lookup_by_params()
[all …]
/net/netfilter/ipvs/
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()

12345