Home
last modified time | relevance | path

Searched refs:af (Results 1 – 25 of 57) sorted by relevance

123

/net/netfilter/
Dx_tables.c91 u_int8_t af = target->family; in xt_register_target() local
93 mutex_lock(&xt[af].mutex); in xt_register_target()
94 list_add(&target->list, &xt[af].target); in xt_register_target()
95 mutex_unlock(&xt[af].mutex); in xt_register_target()
103 u_int8_t af = target->family; in xt_unregister_target() local
105 mutex_lock(&xt[af].mutex); in xt_unregister_target()
107 mutex_unlock(&xt[af].mutex); in xt_unregister_target()
141 u_int8_t af = match->family; in xt_register_match() local
143 mutex_lock(&xt[af].mutex); in xt_register_match()
144 list_add(&match->list, &xt[af].match); in xt_register_match()
[all …]
/net/sctp/
Dbind_addr.c222 struct sctp_af *af; in sctp_bind_addrs_to_raw() local
247 af = sctp_get_af_specific(addr->a.v4.sin_family); in sctp_bind_addrs_to_raw()
248 len = af->to_addr_param(&addr->a, &rawaddr); in sctp_bind_addrs_to_raw()
271 struct sctp_af *af; in sctp_raw_to_bind_addrs() local
278 af = sctp_get_af_specific(param_type2af(param->type)); in sctp_raw_to_bind_addrs()
279 if (unlikely(!af) || in sctp_raw_to_bind_addrs()
280 !af->from_addr_param(&addr, rawaddr, htons(port), 0)) { in sctp_raw_to_bind_addrs()
346 if (sp->pf->af->cmp_addr(&laddr->a, &laddr2->a) && in sctp_bind_addrs_check()
404 struct sctp_af *af; in sctp_bind_addr_state() local
406 af = sctp_get_af_specific(addr->sa.sa_family); in sctp_bind_addr_state()
[all …]
Dinput.c97 struct sctp_af *af; in sctp_rcv() local
136 af = sctp_get_af_specific(family); in sctp_rcv()
137 if (unlikely(!af)) in sctp_rcv()
139 SCTP_INPUT_CB(skb)->af = af; in sctp_rcv()
142 af->from_skb(&src, skb, 1); in sctp_rcv()
143 af->from_skb(&dest, skb, 0); in sctp_rcv()
156 if (!af->addr_valid(&src, NULL, skb) || in sctp_rcv()
157 !af->addr_valid(&dest, NULL, skb)) in sctp_rcv()
174 if (bound_dev_if && (bound_dev_if != af->skb_iif(skb))) { in sctp_rcv()
483 struct sctp_af *af; in sctp_err_lookup() local
[all …]
Dproc.c83 struct sctp_af *af; in sctp_seq_dump_local_addrs() local
103 af = sctp_get_af_specific(addr->sa.sa_family); in sctp_seq_dump_local_addrs()
104 if (primary && af->cmp_addr(addr, primary)) { in sctp_seq_dump_local_addrs()
107 af->seq_dump_addr(seq, addr); in sctp_seq_dump_local_addrs()
117 struct sctp_af *af; in sctp_seq_dump_remote_addrs() local
124 af = sctp_get_af_specific(addr->sa.sa_family); in sctp_seq_dump_remote_addrs()
125 if (af->cmp_addr(addr, primary)) { in sctp_seq_dump_remote_addrs()
128 af->seq_dump_addr(seq, addr); in sctp_seq_dump_remote_addrs()
Dsm_make_chunk.c123 return SCTP_INPUT_CB(skb)->af->skb_iif(skb); in sctp_chunk_iif()
1644 SCTP_INPUT_CB(skb)->af->from_skb(&asoc->c.peer_addr, skb, 1); in sctp_make_temp_asoc()
2363 struct sctp_af *af; in sctp_process_init() local
2388 af = sctp_get_af_specific(param_type2af(param.p->type)); in sctp_process_init()
2389 if (!af->from_addr_param(&addr, param.addr, in sctp_process_init()
2551 struct sctp_af *af; in sctp_process_param() local
2571 af = sctp_get_af_specific(param_type2af(param.p->type)); in sctp_process_param()
2572 if (!af->from_addr_param(&addr, param.addr, htons(asoc->peer.port), 0)) in sctp_process_param()
2673 af = sctp_get_af_specific(param_type2af(addr_param->p.type)); in sctp_process_param()
2674 if (!af) in sctp_process_param()
[all …]
Dsocket.c210 struct sctp_af *af; in sctp_verify_addr() local
213 af = sctp_sockaddr_af(sctp_sk(sk), addr, len); in sctp_verify_addr()
214 if (!af) in sctp_verify_addr()
218 if (!af->addr_valid(addr, sctp_sk(sk), NULL)) in sctp_verify_addr()
272 struct sctp_af *af = sctp_get_af_specific(addr->ss_family); in sctp_addr_id2transport() local
276 if (!af || sctp_verify_addr(sk, laddr, af->sockaddr_len)) in sctp_addr_id2transport()
333 struct sctp_af *af; in sctp_sockaddr_af() local
352 af = sctp_get_af_specific(addr->sa.sa_family); in sctp_sockaddr_af()
354 if (len < af->sockaddr_len) in sctp_sockaddr_af()
357 return af; in sctp_sockaddr_af()
[all …]
Dipv6.c973 struct sctp_af *af; in sctp_inet6_bind_verify() local
977 af = sctp_get_af_specific(addr->sa.sa_family); in sctp_inet6_bind_verify()
998 af = opt->pf->af; in sctp_inet6_bind_verify()
1000 return af->available(addr, opt); in sctp_inet6_bind_verify()
1008 struct sctp_af *af = NULL; in sctp_inet6_send_verify() local
1012 af = sctp_get_af_specific(addr->sa.sa_family); in sctp_inet6_send_verify()
1027 af = opt->pf->af; in sctp_inet6_send_verify()
1030 return af != NULL; in sctp_inet6_send_verify()
1158 .af = &sctp_af_inet6,
/net/netfilter/ipvs/
Dip_vs_proto_ah_esp.c40 ah_esp_conn_fill_param_proto(struct netns_ipvs *ipvs, int af, in ah_esp_conn_fill_param_proto() argument
45 ip_vs_conn_fill_param(ipvs, af, IPPROTO_UDP, in ah_esp_conn_fill_param_proto()
49 ip_vs_conn_fill_param(ipvs, af, IPPROTO_UDP, in ah_esp_conn_fill_param_proto()
55 ah_esp_conn_in_get(struct netns_ipvs *ipvs, int af, const struct sk_buff *skb, in ah_esp_conn_in_get() argument
61 ah_esp_conn_fill_param_proto(ipvs, af, iph, &p); in ah_esp_conn_in_get()
72 IP_VS_DBG_ADDR(af, &iph->saddr), in ah_esp_conn_in_get()
73 IP_VS_DBG_ADDR(af, &iph->daddr)); in ah_esp_conn_in_get()
81 ah_esp_conn_out_get(struct netns_ipvs *ipvs, int af, const struct sk_buff *skb, in ah_esp_conn_out_get() argument
87 ah_esp_conn_fill_param_proto(ipvs, af, iph, &p); in ah_esp_conn_out_get()
94 IP_VS_DBG_ADDR(af, &iph->saddr), in ah_esp_conn_out_get()
[all …]
Dip_vs_proto_udp.c28 udp_csum_check(int af, struct sk_buff *skb, struct ip_vs_protocol *pp);
31 udp_conn_schedule(struct netns_ipvs *ipvs, int af, struct sk_buff *skb, in udp_conn_schedule() argument
56 svc = ip_vs_service_find(ipvs, af, skb->mark, iph->protocol, in udp_conn_schedule()
59 svc = ip_vs_service_find(ipvs, af, skb->mark, iph->protocol, in udp_conn_schedule()
93 udp_fast_csum_update(int af, struct udphdr *uhdr, in udp_fast_csum_update() argument
99 if (af == AF_INET6) in udp_fast_csum_update()
115 udp_partial_csum_update(int af, struct udphdr *uhdr, in udp_partial_csum_update() argument
121 if (af == AF_INET6) in udp_partial_csum_update()
145 if (cp->af == AF_INET6 && iph->fragoffs) in udp_snat_handler()
158 if (!udp_csum_check(cp->af, skb, pp)) in udp_snat_handler()
[all …]
Dip_vs_ftp.c100 __u16 af, char **start, char **end) in ip_vs_ftp_get_addrport() argument
190 if (af == AF_INET6 && *s != '2') in ip_vs_ftp_get_addrport()
192 if (af == AF_INET && *s != '1') in ip_vs_ftp_get_addrport()
202 if (af == AF_INET6) { in ip_vs_ftp_get_addrport()
284 &from, &port, cp->af, in ip_vs_ftp_out()
305 &from, &port, cp->af, in ip_vs_ftp_out()
310 IP_VS_DBG_ADDR(cp->af, &from), ntohs(port), in ip_vs_ftp_out()
311 IP_VS_DBG_ADDR(cp->af, &cp->caddr), 0); in ip_vs_ftp_out()
320 ip_vs_conn_fill_param(cp->ipvs, cp->af, in ip_vs_ftp_out()
329 cp->af, ipvsh->protocol, &cp->caddr, in ip_vs_ftp_out()
[all …]
Dip_vs_conn.c107 static unsigned int ip_vs_conn_hashkey(struct netns_ipvs *ipvs, int af, unsigned int proto, in ip_vs_conn_hashkey() argument
112 if (af == AF_INET6) in ip_vs_conn_hashkey()
140 return ip_vs_conn_hashkey(p->ipvs, p->af, p->protocol, addr, port); in ip_vs_conn_hashkey_param()
147 ip_vs_conn_fill_param(cp->ipvs, cp->af, cp->protocol, in ip_vs_conn_hashkey_conn()
274 cp->af == p->af && in __ip_vs_conn_in_get()
275 ip_vs_addr_equal(p->af, p->caddr, &cp->caddr) && in __ip_vs_conn_in_get()
276 ip_vs_addr_equal(p->af, p->vaddr, &cp->vaddr) && in __ip_vs_conn_in_get()
306 IP_VS_DBG_ADDR(p->af, p->caddr), ntohs(p->cport), in ip_vs_conn_in_get()
307 IP_VS_DBG_ADDR(p->af, p->vaddr), ntohs(p->vport), in ip_vs_conn_in_get()
315 int af, const struct sk_buff *skb, in ip_vs_conn_fill_param_proto() argument
[all …]
Dip_vs_core.c236 ip_vs_conn_fill_param(svc->ipvs, svc->af, protocol, caddr, cport, vaddr, in ip_vs_conn_fill_param_persist()
279 if (svc->af == AF_INET6) in ip_vs_sched_persist()
288 IP_VS_DBG_ADDR(svc->af, src_addr), ntohs(src_port), in ip_vs_sched_persist()
289 IP_VS_DBG_ADDR(svc->af, dst_addr), ntohs(dst_port), in ip_vs_sched_persist()
290 IP_VS_DBG_ADDR(svc->af, &snet)); in ip_vs_sched_persist()
371 ct = ip_vs_conn_new(&param, dest->af, &dest->addr, dport, in ip_vs_sched_persist()
397 ip_vs_conn_fill_param(svc->ipvs, svc->af, iph->protocol, src_addr, in ip_vs_sched_persist()
400 cp = ip_vs_conn_new(&param, dest->af, &dest->addr, dport, flags, dest, in ip_vs_sched_persist()
480 IP_VS_DBG_PKT(12, svc->af, pp, skb, iph->off, in ip_vs_schedule()
492 svc->af, skb, iph); in ip_vs_schedule()
[all …]
Dip_vs_proto_tcp.c32 tcp_csum_check(int af, struct sk_buff *skb, struct ip_vs_protocol *pp);
35 tcp_conn_schedule(struct netns_ipvs *ipvs, int af, struct sk_buff *skb, in tcp_conn_schedule() argument
68 svc = ip_vs_service_find(ipvs, af, skb->mark, iph->protocol, in tcp_conn_schedule()
71 svc = ip_vs_service_find(ipvs, af, skb->mark, iph->protocol, in tcp_conn_schedule()
105 tcp_fast_csum_update(int af, struct tcphdr *tcph, in tcp_fast_csum_update() argument
111 if (af == AF_INET6) in tcp_fast_csum_update()
126 tcp_partial_csum_update(int af, struct tcphdr *tcph, in tcp_partial_csum_update() argument
132 if (af == AF_INET6) in tcp_partial_csum_update()
156 if (cp->af == AF_INET6 && iph->fragoffs) in tcp_snat_handler()
169 if (!tcp_csum_check(cp->af, skb, pp)) in tcp_snat_handler()
[all …]
Dip_vs_lblc.c90 int af; /* address family */ member
150 ip_vs_lblc_hashkey(int af, const union nf_inet_addr *addr) in ip_vs_lblc_hashkey() argument
155 if (af == AF_INET6) in ip_vs_lblc_hashkey()
170 unsigned int hash = ip_vs_lblc_hashkey(en->af, &en->addr); in ip_vs_lblc_hash()
179 ip_vs_lblc_get(int af, struct ip_vs_lblc_table *tbl, in ip_vs_lblc_get() argument
182 unsigned int hash = ip_vs_lblc_hashkey(af, addr); in ip_vs_lblc_get()
186 if (ip_vs_addr_equal(af, &en->addr, addr)) in ip_vs_lblc_get()
199 u16 af, struct ip_vs_dest *dest) in ip_vs_lblc_new() argument
203 en = ip_vs_lblc_get(af, tbl, daddr); in ip_vs_lblc_new()
213 en->af = af; in ip_vs_lblc_new()
[all …]
Dip_vs_ctl.c273 ip_vs_svc_hashkey(struct netns_ipvs *ipvs, int af, unsigned int proto, in ip_vs_svc_hashkey() argument
281 if (af == AF_INET6) in ip_vs_svc_hashkey()
319 hash = ip_vs_svc_hashkey(svc->ipvs, svc->af, svc->protocol, in ip_vs_svc_hash()
367 __ip_vs_service_find(struct netns_ipvs *ipvs, int af, __u16 protocol, in __ip_vs_service_find() argument
374 hash = ip_vs_svc_hashkey(ipvs, af, protocol, vaddr, vport); in __ip_vs_service_find()
377 if ((svc->af == af) in __ip_vs_service_find()
378 && ip_vs_addr_equal(af, &svc->addr, vaddr) in __ip_vs_service_find()
395 __ip_vs_svc_fwm_find(struct netns_ipvs *ipvs, int af, __u32 fwmark) in __ip_vs_svc_fwm_find() argument
404 if (svc->fwmark == fwmark && svc->af == af in __ip_vs_svc_fwm_find()
416 ip_vs_service_find(struct netns_ipvs *ipvs, int af, __u32 fwmark, __u16 protocol, in ip_vs_service_find() argument
[all …]
Dip_vs_lblcr.c200 IP_VS_DBG_ADDR(least->af, &least->addr), in ip_vs_dest_set_min()
246 IP_VS_DBG_ADDR(most->af, &most->addr), ntohs(most->port), in ip_vs_dest_set_max()
260 int af; /* address family */ member
313 ip_vs_lblcr_hashkey(int af, const union nf_inet_addr *addr) in ip_vs_lblcr_hashkey() argument
318 if (af == AF_INET6) in ip_vs_lblcr_hashkey()
333 unsigned int hash = ip_vs_lblcr_hashkey(en->af, &en->addr); in ip_vs_lblcr_hash()
342 ip_vs_lblcr_get(int af, struct ip_vs_lblcr_table *tbl, in ip_vs_lblcr_get() argument
345 unsigned int hash = ip_vs_lblcr_hashkey(af, addr); in ip_vs_lblcr_get()
349 if (ip_vs_addr_equal(af, &en->addr, addr)) in ip_vs_lblcr_get()
362 u16 af, struct ip_vs_dest *dest) in ip_vs_lblcr_new() argument
[all …]
Dip_vs_sh.c84 ip_vs_sh_hashkey(int af, const union nf_inet_addr *addr, in ip_vs_sh_hashkey() argument
90 if (af == AF_INET6) in ip_vs_sh_hashkey()
107 unsigned int hash = ip_vs_sh_hashkey(svc->af, addr, port, 0); in ip_vs_sh_get()
129 ihash = ip_vs_sh_hashkey(svc->af, addr, port, 0); in ip_vs_sh_get_fallback()
137 IP_VS_DBG_ADDR(dest->af, &dest->addr), ntohs(dest->port)); in ip_vs_sh_get_fallback()
144 hash = ip_vs_sh_hashkey(svc->af, addr, port, roffset); in ip_vs_sh_get_fallback()
152 IP_VS_DBG_ADDR(dest->af, &dest->addr), in ip_vs_sh_get_fallback()
191 i, IP_VS_DBG_ADDR(dest->af, &dest->addr), in ip_vs_sh_reassign()
337 IP_VS_DBG_ADDR(svc->af, hash_addr), in ip_vs_sh_schedule()
338 IP_VS_DBG_ADDR(dest->af, &dest->addr), in ip_vs_sh_schedule()
Dip_vs_dh.c71 static inline unsigned int ip_vs_dh_hashkey(int af, const union nf_inet_addr *addr) in ip_vs_dh_hashkey() argument
76 if (af == AF_INET6) in ip_vs_dh_hashkey()
88 ip_vs_dh_get(int af, struct ip_vs_dh_state *s, const union nf_inet_addr *addr) in ip_vs_dh_get() argument
90 return rcu_dereference(s->buckets[ip_vs_dh_hashkey(af, addr)].dest); in ip_vs_dh_get()
222 dest = ip_vs_dh_get(svc->af, s, &iph->daddr); in ip_vs_dh_schedule()
232 IP_VS_DBG_ADDR(svc->af, &iph->daddr), in ip_vs_dh_schedule()
233 IP_VS_DBG_ADDR(dest->af, &dest->addr), in ip_vs_dh_schedule()
Dip_vs_mh.c89 ip_vs_mh_hashkey(int af, const union nf_inet_addr *addr, in ip_vs_mh_hashkey() argument
96 if (af == AF_INET6) in ip_vs_mh_hashkey()
143 ds->offset = ip_vs_mh_hashkey(svc->af, &dest->addr, in ip_vs_mh_permutate()
146 ds->skip = ip_vs_mh_hashkey(svc->af, &dest->addr, in ip_vs_mh_permutate()
239 unsigned int hash = ip_vs_mh_hashkey(svc->af, addr, port, &s->hash1, 0) in ip_vs_mh_get()
256 ihash = ip_vs_mh_hashkey(svc->af, addr, port, in ip_vs_mh_get_fallback()
265 IP_VS_DBG_ADDR(dest->af, &dest->addr), ntohs(dest->port)); in ip_vs_mh_get_fallback()
272 hash = ip_vs_mh_hashkey(svc->af, addr, port, &s->hash1, in ip_vs_mh_get_fallback()
281 IP_VS_DBG_ADDR(dest->af, &dest->addr), in ip_vs_mh_get_fallback()
312 IP_VS_DBG_ADDR(svc->af, &svc->addr), in ip_vs_mh_reassign()
[all …]
Dip_vs_proto_sctp.c13 sctp_csum_check(int af, struct sk_buff *skb, struct ip_vs_protocol *pp);
16 sctp_conn_schedule(struct netns_ipvs *ipvs, int af, struct sk_buff *skb, in sctp_conn_schedule() argument
50 svc = ip_vs_service_find(ipvs, af, skb->mark, iph->protocol, in sctp_conn_schedule()
53 svc = ip_vs_service_find(ipvs, af, skb->mark, iph->protocol, in sctp_conn_schedule()
99 if (cp->af == AF_INET6 && iph->fragoffs) in sctp_snat_handler()
111 if (!sctp_csum_check(cp->af, skb, pp)) in sctp_snat_handler()
146 if (cp->af == AF_INET6 && iph->fragoffs) in sctp_dnat_handler()
158 if (!sctp_csum_check(cp->af, skb, pp)) in sctp_dnat_handler()
186 sctp_csum_check(int af, struct sk_buff *skb, struct ip_vs_protocol *pp) in sctp_csum_check() argument
193 if (af == AF_INET6) in sctp_csum_check()
[all …]
Dip_vs_pe_sip.c74 retc = ip_vs_fill_iph_skb(p->af, skb, false, &iph); in ip_vs_sip_fill_param()
113 if (ct->af == p->af && in ip_vs_sip_ct_match()
114 ip_vs_addr_equal(p->af, p->caddr, &ct->caddr) && in ip_vs_sip_ct_match()
117 ip_vs_addr_equal(p->protocol == IPPROTO_IP ? AF_UNSPEC : p->af, in ip_vs_sip_ct_match()
129 IP_VS_DBG_ADDR(p->af, p->vaddr), ntohs(p->vport), in ip_vs_sip_ct_match()
Dip_vs_xmit.c649 !ip_vs_addr_equal(cp->af, &cp->vaddr, &cp->daddr)) in ip_vs_nat_send_or_cont()
711 if (__ip_vs_get_out_rt(cp->ipvs, cp->af, skb, NULL, iph->daddr, in ip_vs_bypass_xmit()
740 if (__ip_vs_get_out_rt_v6(cp->ipvs, cp->af, skb, NULL, in ip_vs_bypass_xmit_v6()
785 local = __ip_vs_get_out_rt(cp->ipvs, cp->af, skb, cp->dest, cp->daddr.ip, in ip_vs_nat_xmit()
871 local = __ip_vs_get_out_rt_v6(cp->ipvs, cp->af, skb, cp->dest, in ip_vs_nat_xmit_v6()
1154 local = __ip_vs_get_out_rt(ipvs, cp->af, skb, cp->dest, cp->daddr.ip, in ip_vs_tunnel_xmit()
1198 skb = ip_vs_prepare_tunneled_skb(skb, cp->af, max_headroom, in ip_vs_tunnel_xmit()
1204 gso_type = __tun_gso_type_mask(AF_INET, cp->af); in ip_vs_tunnel_xmit()
1304 local = __ip_vs_get_out_rt_v6(ipvs, cp->af, skb, cp->dest, in ip_vs_tunnel_xmit_v6()
1347 skb = ip_vs_prepare_tunneled_skb(skb, cp->af, max_headroom, in ip_vs_tunnel_xmit_v6()
[all …]
Dip_vs_sync.c550 if (unlikely(cp->af != AF_INET)) in ip_vs_sync_conn_v0()
672 if (cp->af == AF_INET6) in ip_vs_sync_conn()
722 s->v4.type = (cp->af == AF_INET6 ? STYPE_F_INET6 : 0); in ip_vs_sync_conn()
735 if (cp->af == AF_INET6) { in ip_vs_sync_conn()
789 ip_vs_conn_fill_param_sync(struct netns_ipvs *ipvs, int af, union ip_vs_sync_conn *sc, in ip_vs_conn_fill_param_sync() argument
795 if (af == AF_INET6) in ip_vs_conn_fill_param_sync()
796 ip_vs_conn_fill_param(ipvs, af, sc->v6.protocol, in ip_vs_conn_fill_param_sync()
803 ip_vs_conn_fill_param(ipvs, af, sc->v4.protocol, in ip_vs_conn_fill_param_sync()
1077 unsigned int af, state, pe_data_len=0, pe_name_len=0; in ip_vs_proc_sync_conn() local
1086 af = AF_INET6; in ip_vs_proc_sync_conn()
[all …]
/net/ipv4/netfilter/
Diptable_raw.c23 .af = NFPROTO_IPV4,
31 .af = NFPROTO_IPV4,
/net/ipv6/netfilter/
Dip6table_raw.c22 .af = NFPROTO_IPV6,
30 .af = NFPROTO_IPV6,

123