Home
last modified time | relevance | path

Searched refs:opt (Results 1 – 25 of 193) sorted by relevance

12345678

/net/ipv4/
Dip_options.c44 void ip_options_build(struct sk_buff *skb, struct ip_options *opt, in ip_options_build() argument
49 memcpy(&(IPCB(skb)->opt), opt, sizeof(struct ip_options)); in ip_options_build()
50 memcpy(iph+sizeof(struct iphdr), opt->__data, opt->optlen); in ip_options_build()
51 opt = &(IPCB(skb)->opt); in ip_options_build()
53 if (opt->srr) in ip_options_build()
54 memcpy(iph+opt->srr+iph[opt->srr+1]-4, &daddr, 4); in ip_options_build()
57 if (opt->rr_needaddr) in ip_options_build()
58 ip_rt_get_source(iph+opt->rr+iph[opt->rr+2]-5, skb, rt); in ip_options_build()
59 if (opt->ts_needaddr) in ip_options_build()
60 ip_rt_get_source(iph+opt->ts+iph[opt->ts+2]-9, skb, rt); in ip_options_build()
[all …]
Dcipso_ipv4.c1555 unsigned char *opt = *option; in cipso_v4_validate() local
1565 opt_len = opt[1]; in cipso_v4_validate()
1572 doi_def = cipso_v4_doi_search(get_unaligned_be32(&opt[2])); in cipso_v4_validate()
1579 tag = opt + opt_iter; in cipso_v4_validate()
1692 *option = opt + err_offset; in cipso_v4_validate()
1726 struct ip_options *opt = (struct ip_options *)optbuf; in cipso_v4_error() local
1736 memset(opt, 0, sizeof(struct ip_options)); in cipso_v4_error()
1737 opt->optlen = ip_hdr(skb)->ihl*4 - sizeof(struct iphdr); in cipso_v4_error()
1738 if (__ip_options_compile(dev_net(skb->dev), opt, skb, NULL)) in cipso_v4_error()
1742 __icmp_send(skb, ICMP_DEST_UNREACH, ICMP_NET_ANO, 0, opt); in cipso_v4_error()
[all …]
Dip_output.c145 __be32 saddr, __be32 daddr, struct ip_options_rcu *opt) in ip_build_and_send_pkt() argument
153 skb_push(skb, sizeof(struct iphdr) + (opt ? opt->opt.optlen : 0)); in ip_build_and_send_pkt()
160 iph->daddr = (opt && opt->opt.srr ? opt->opt.faddr : daddr); in ip_build_and_send_pkt()
171 if (opt && opt->opt.optlen) { in ip_build_and_send_pkt()
172 iph->ihl += opt->opt.optlen>>2; in ip_build_and_send_pkt()
173 ip_options_build(skb, &opt->opt, daddr, rt, 0); in ip_build_and_send_pkt()
481 if (inet_opt && inet_opt->opt.srr) in __ip_queue_xmit()
482 daddr = inet_opt->opt.faddr; in __ip_queue_xmit()
502 if (inet_opt && inet_opt->opt.is_strictroute && rt->rt_uses_gateway) in __ip_queue_xmit()
506 skb_push(skb, sizeof(struct iphdr) + (inet_opt ? inet_opt->opt.optlen : 0)); in __ip_queue_xmit()
[all …]
Dip_forward.c67 struct ip_options *opt = &(IPCB(skb)->opt); in ip_forward_finish() local
79 if (unlikely(opt->optlen)) in ip_forward_finish()
91 struct ip_options *opt = &(IPCB(skb)->opt); in ip_forward() local
107 if (IPCB(skb)->opt.router_alert && ip_call_ra_chain(skb)) in ip_forward()
126 if (opt->is_strictroute && rt->rt_uses_gateway) in ip_forward()
150 if (IPCB(skb)->flags & IPSKB_DOREDIRECT && !opt->srr && in ip_forward()
/net/ceph/
Dceph_common.c306 void ceph_destroy_options(struct ceph_options *opt) in ceph_destroy_options() argument
308 dout("destroy_options %p\n", opt); in ceph_destroy_options()
309 kfree(opt->name); in ceph_destroy_options()
310 if (opt->key) { in ceph_destroy_options()
311 ceph_crypto_key_destroy(opt->key); in ceph_destroy_options()
312 kfree(opt->key); in ceph_destroy_options()
314 kfree(opt->mon_addr); in ceph_destroy_options()
315 kfree(opt); in ceph_destroy_options()
370 struct ceph_options *opt; in ceph_parse_options() local
375 opt = kzalloc(sizeof(*opt), GFP_KERNEL); in ceph_parse_options()
[all …]
/net/ipv6/
Dexthdrs.c211 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_dest_hao() local
215 if (opt->dsthao) { in ipv6_dest_hao()
219 opt->dsthao = opt->dst1; in ipv6_dest_hao()
220 opt->dst1 = 0; in ipv6_dest_hao()
280 struct inet6_skb_parm *opt = IP6CB(skb); in ipv6_destopt_rcv() local
302 opt->lastopt = opt->dst1 = skb_network_header_len(skb); in ipv6_destopt_rcv()
304 dstbuf = opt->dst1; in ipv6_destopt_rcv()
310 opt = IP6CB(skb); in ipv6_destopt_rcv()
312 opt->nhoff = dstbuf; in ipv6_destopt_rcv()
314 opt->nhoff = opt->dst1; in ipv6_destopt_rcv()
[all …]
Dipv6_sockglue.c101 struct ipv6_txoptions *opt) in ipv6_update_options() argument
104 if (opt && in ipv6_update_options()
108 icsk->icsk_ext_hdr_len = opt->opt_flen + opt->opt_nflen; in ipv6_update_options()
112 opt = xchg((__force struct ipv6_txoptions **)&inet6_sk(sk)->opt, in ipv6_update_options()
113 opt); in ipv6_update_options()
116 return opt; in ipv6_update_options()
173 struct ipv6_txoptions *opt; in do_ipv6_setsockopt() local
234 opt = xchg((__force struct ipv6_txoptions **)&np->opt, in do_ipv6_setsockopt()
236 if (opt) { in do_ipv6_setsockopt()
237 atomic_sub(opt->tot_len, &sk->sk_omem_alloc); in do_ipv6_setsockopt()
[all …]
Dip6_output.c196 __u32 mark, struct ipv6_txoptions *opt, int tclass, u32 priority) in ip6_xmit() argument
210 if (opt) in ip6_xmit()
211 head_room += opt->opt_nflen + opt->opt_flen; in ip6_xmit()
227 if (opt) { in ip6_xmit()
228 seg_len += opt->opt_nflen + opt->opt_flen; in ip6_xmit()
230 if (opt->opt_flen) in ip6_xmit()
231 ipv6_push_frag_opts(skb, opt, &proto); in ip6_xmit()
233 if (opt->opt_nflen) in ip6_xmit()
234 ipv6_push_nfrag_opts(skb, opt, &proto, &first_hop, in ip6_xmit()
425 struct inet6_skb_parm *opt = IP6CB(skb); in ip6_forward() local
[all …]
Ddatagram.c69 struct ipv6_txoptions *opt; in ip6_datagram_dst_update() local
84 opt = flowlabel ? flowlabel->opt : rcu_dereference(np->opt); in ip6_datagram_dst_update()
85 final_p = fl6_update_dst(&fl6, opt, &final); in ip6_datagram_dst_update()
602 struct inet6_skb_parm *opt = IP6CB(skb); in ip6_datagram_recv_specific_ctl() local
622 if (np->rxopt.bits.hopopts && (opt->flags & IP6SKB_HOPBYHOP)) { in ip6_datagram_recv_specific_ctl()
627 if (opt->lastopt && in ip6_datagram_recv_specific_ctl()
641 while (off <= opt->lastopt) { in ip6_datagram_recv_specific_ctl()
676 src_info.ipi6_ifindex = opt->iif; in ip6_datagram_recv_specific_ctl()
684 if (np->rxopt.bits.ohopopts && (opt->flags & IP6SKB_HOPBYHOP)) { in ip6_datagram_recv_specific_ctl()
688 if (np->rxopt.bits.odstopts && opt->dst0) { in ip6_datagram_recv_specific_ctl()
[all …]
Dip6_flowlabel.c110 kfree(fl->opt); in fl_free_rcu()
120 if (fl_shared_exclusive(fl) || fl->opt) in fl_free()
136 if (fl->opt && fl->share == IPV6_FL_S_EXCL) { in fl_release()
137 struct ipv6_txoptions *opt = fl->opt; in fl_release() local
138 fl->opt = NULL; in fl_release()
139 kfree(opt); in fl_release()
316 struct ipv6_txoptions *fl_opt = fl->opt; in fl6_merge_options()
397 fl->opt = kmalloc(sizeof(*fl->opt) + olen, GFP_KERNEL); in fl_create()
398 if (!fl->opt) in fl_create()
401 memset(fl->opt, 0, sizeof(*fl->opt)); in fl_create()
[all …]
/net/netfilter/
Dnf_sockopt.c94 char __user *opt, int *len, int get) in nf_sockopt() argument
104 ret = ops->get(sk, val, opt, len); in nf_sockopt()
106 ret = ops->set(sk, val, opt, *len); in nf_sockopt()
112 int nf_setsockopt(struct sock *sk, u_int8_t pf, int val, char __user *opt, in nf_setsockopt() argument
115 return nf_sockopt(sk, pf, val, opt, &len, 0); in nf_setsockopt()
119 int nf_getsockopt(struct sock *sk, u_int8_t pf, int val, char __user *opt, in nf_getsockopt() argument
122 return nf_sockopt(sk, pf, val, opt, len, 1); in nf_getsockopt()
128 char __user *opt, int *len, int get) in compat_nf_sockopt() argument
139 ret = ops->compat_get(sk, val, opt, len); in compat_nf_sockopt()
141 ret = ops->get(sk, val, opt, len); in compat_nf_sockopt()
[all …]
Dxt_TCPMSS.c34 optlen(const u_int8_t *opt, unsigned int offset) in optlen() argument
37 if (opt[offset] <= TCPOPT_NOP || opt[offset+1] == 0) in optlen()
40 return opt[offset+1]; in optlen()
83 u8 *opt; in tcpmss_mangle_packet() local
116 opt = (u_int8_t *)tcph; in tcpmss_mangle_packet()
117 for (i = sizeof(struct tcphdr); i <= tcp_hdrlen - TCPOLEN_MSS; i += optlen(opt, i)) { in tcpmss_mangle_packet()
118 if (opt[i] == TCPOPT_MSS && opt[i+1] == TCPOLEN_MSS) { in tcpmss_mangle_packet()
121 oldmss = (opt[i+2] << 8) | opt[i+3]; in tcpmss_mangle_packet()
130 opt[i+2] = (newmss & 0xff00) >> 8; in tcpmss_mangle_packet()
131 opt[i+3] = newmss & 0x00ff; in tcpmss_mangle_packet()
[all …]
Dnft_exthdr.c27 static unsigned int optlen(const u8 *opt, unsigned int offset) in optlen() argument
30 if (opt[offset] <= TCPOPT_NOP || opt[offset + 1] == 0) in optlen()
33 return opt[offset + 1]; in optlen()
74 struct ip_options *opt = (struct ip_options *)optbuf; in ipv4_find_option() local
90 memset(opt, 0, sizeof(struct ip_options)); in ipv4_find_option()
94 if (skb_copy_bits(skb, start, opt->__data, optlen)) in ipv4_find_option()
96 opt->optlen = optlen; in ipv4_find_option()
98 if (__ip_options_compile(net, opt, NULL, &info)) in ipv4_find_option()
104 if (!opt->srr) in ipv4_find_option()
106 found = target == IPOPT_SSRR ? opt->is_strictroute : in ipv4_find_option()
[all …]
Dxt_TCPOPTSTRIP.c19 static inline unsigned int optlen(const u_int8_t *opt, unsigned int offset) in optlen() argument
22 if (opt[offset] <= TCPOPT_NOP || opt[offset+1] == 0) in optlen()
25 return opt[offset+1]; in optlen()
37 u_int8_t *opt; in tcpoptstrip_mangle_packet() local
57 opt = (u8 *)tcph; in tcpoptstrip_mangle_packet()
64 optl = optlen(opt, i); in tcpoptstrip_mangle_packet()
69 if (!tcpoptstrip_test_bit(info->strip_bmap, opt[i])) in tcpoptstrip_mangle_packet()
73 o = opt[i+j]; in tcpoptstrip_mangle_packet()
82 memset(opt + i, TCPOPT_NOP, optl); in tcpoptstrip_mangle_packet()
/net/dns_resolver/
Ddns_key.c99 const char *data = prep->data, *end, *opt; in dns_resolver_preparse() local
137 opt = memchr(data, '#', datalen); in dns_resolver_preparse()
138 if (!opt) { in dns_resolver_preparse()
145 result_len = opt - data; in dns_resolver_preparse()
146 opt++; in dns_resolver_preparse()
147 kdebug("options: '%s'", opt); in dns_resolver_preparse()
153 next_opt = memchr(opt, '#', end - opt) ?: end; in dns_resolver_preparse()
154 opt_len = next_opt - opt; in dns_resolver_preparse()
161 eq = memchr(opt, '=', opt_len); in dns_resolver_preparse()
163 opt_nlen = eq - opt; in dns_resolver_preparse()
[all …]
/net/sched/
Dsch_gred.c314 struct tc_gred_qopt_offload opt = { in gred_offload() local
326 opt.set.grio_on = gred_rio_mode(table); in gred_offload()
327 opt.set.wred_on = gred_wred_mode(table); in gred_offload()
328 opt.set.dp_cnt = table->DPs; in gred_offload()
329 opt.set.dp_def = table->def; in gred_offload()
336 opt.set.tab[i].present = true; in gred_offload()
337 opt.set.tab[i].limit = q->limit; in gred_offload()
338 opt.set.tab[i].prio = q->prio; in gred_offload()
339 opt.set.tab[i].min = q->parms.qth_min >> q->parms.Wlog; in gred_offload()
340 opt.set.tab[i].max = q->parms.qth_max >> q->parms.Wlog; in gred_offload()
[all …]
Dsch_prio.c145 struct tc_prio_qopt_offload opt = { in prio_offload() local
154 opt.command = TC_PRIO_REPLACE; in prio_offload()
155 opt.replace_params.bands = qopt->bands; in prio_offload()
156 memcpy(&opt.replace_params.priomap, qopt->priomap, in prio_offload()
158 opt.replace_params.qstats = &sch->qstats; in prio_offload()
160 opt.command = TC_PRIO_DESTROY; in prio_offload()
163 return dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_QDISC_PRIO, &opt); in prio_offload()
178 static int prio_tune(struct Qdisc *sch, struct nlattr *opt, in prio_tune() argument
186 if (nla_len(opt) < sizeof(*qopt)) in prio_tune()
188 qopt = nla_data(opt); in prio_tune()
[all …]
Dsch_red.c152 struct tc_red_qopt_offload opt = { in red_offload() local
161 opt.command = TC_RED_REPLACE; in red_offload()
162 opt.set.min = q->parms.qth_min >> q->parms.Wlog; in red_offload()
163 opt.set.max = q->parms.qth_max >> q->parms.Wlog; in red_offload()
164 opt.set.probability = q->parms.max_P; in red_offload()
165 opt.set.limit = q->limit; in red_offload()
166 opt.set.is_ecn = red_use_ecn(q); in red_offload()
167 opt.set.is_harddrop = red_use_harddrop(q); in red_offload()
168 opt.set.qstats = &sch->qstats; in red_offload()
170 opt.command = TC_RED_DESTROY; in red_offload()
[all …]
Dsch_sfq.c623 static int sfq_change(struct Qdisc *sch, struct nlattr *opt) in sfq_change() argument
626 struct tc_sfq_qopt *ctl = nla_data(opt); in sfq_change()
633 if (opt->nla_len < nla_attr_size(sizeof(*ctl))) in sfq_change()
635 if (opt->nla_len >= nla_attr_size(sizeof(*ctl_v1))) in sfq_change()
636 ctl_v1 = nla_data(opt); in sfq_change()
722 static int sfq_init(struct Qdisc *sch, struct nlattr *opt, in sfq_init() argument
752 if (opt) { in sfq_init()
753 int err = sfq_change(sch, opt); in sfq_init()
783 struct tc_sfq_qopt_v1 opt; in sfq_dump() local
786 memset(&opt, 0, sizeof(opt)); in sfq_dump()
[all …]
Dsch_plug.c122 static int plug_init(struct Qdisc *sch, struct nlattr *opt, in plug_init() argument
132 if (opt == NULL) { in plug_init()
136 struct tc_plug_qopt *ctl = nla_data(opt); in plug_init()
138 if (nla_len(opt) < sizeof(*ctl)) in plug_init()
158 static int plug_change(struct Qdisc *sch, struct nlattr *opt, in plug_change() argument
164 if (opt == NULL) in plug_change()
167 msg = nla_data(opt); in plug_change()
168 if (nla_len(opt) < sizeof(*msg)) in plug_change()
Dsch_cbs.c266 const struct tc_cbs_qopt *opt, in cbs_enable_offload() argument
281 cbs.hicredit = opt->hicredit; in cbs_enable_offload()
282 cbs.locredit = opt->locredit; in cbs_enable_offload()
283 cbs.idleslope = opt->idleslope; in cbs_enable_offload()
284 cbs.sendslope = opt->sendslope; in cbs_enable_offload()
350 static int cbs_change(struct Qdisc *sch, struct nlattr *opt, in cbs_change() argument
359 err = nla_parse_nested_deprecated(tb, TCA_CBS_MAX, opt, cbs_policy, in cbs_change()
390 static int cbs_init(struct Qdisc *sch, struct nlattr *opt, in cbs_init() argument
396 if (!opt) { in cbs_init()
419 return cbs_change(sch, opt, extack); in cbs_init()
[all …]
Dact_tunnel_key.c101 struct geneve_opt *opt = dst; in tunnel_key_copy_geneve_opt() local
105 opt->opt_class = in tunnel_key_copy_geneve_opt()
107 opt->type = nla_get_u8(tb[TCA_TUNNEL_KEY_ENC_OPT_GENEVE_TYPE]); in tunnel_key_copy_geneve_opt()
108 opt->length = data_len / 4; /* length is in units of 4 bytes */ in tunnel_key_copy_geneve_opt()
109 opt->r1 = 0; in tunnel_key_copy_geneve_opt()
110 opt->r2 = 0; in tunnel_key_copy_geneve_opt()
111 opt->r3 = 0; in tunnel_key_copy_geneve_opt()
113 memcpy(opt + 1, data, data_len); in tunnel_key_copy_geneve_opt()
437 struct geneve_opt *opt = (struct geneve_opt *)src; in tunnel_key_geneve_opts_dump() local
440 opt->opt_class) || in tunnel_key_geneve_opts_dump()
[all …]
/net/rxrpc/
Dlocal_object.c110 int ret, opt; in rxrpc_open_socket() local
160 opt = 1; in rxrpc_open_socket()
162 (char *) &opt, sizeof(opt)); in rxrpc_open_socket()
169 opt = IPV6_PMTUDISC_DO; in rxrpc_open_socket()
171 (char *) &opt, sizeof(opt)); in rxrpc_open_socket()
183 opt = 1; in rxrpc_open_socket()
185 (char *) &opt, sizeof(opt)); in rxrpc_open_socket()
192 opt = IP_PMTUDISC_DO; in rxrpc_open_socket()
194 (char *) &opt, sizeof(opt)); in rxrpc_open_socket()
201 opt = 1; in rxrpc_open_socket()
[all …]
/net/sctp/
Dipv6.c125 static int sctp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, in sctp_v6_err() argument
217 res = ip6_xmit(sk, skb, fl6, sk->sk_mark, rcu_dereference(np->opt), in sctp_v6_xmit()
275 final_p = fl6_update_dst(fl6, rcu_dereference(np->opt), &final); in sctp_v6_get_dst()
330 final_p = fl6_update_dst(fl6, rcu_dereference(np->opt), &final); in sctp_v6_get_dst()
437 struct ipv6_txoptions *opt; in sctp_v6_copy_ip_options() local
442 opt = rcu_dereference(np->opt); in sctp_v6_copy_ip_options()
443 if (opt) { in sctp_v6_copy_ip_options()
444 opt = ipv6_dup_options(newsk, opt); in sctp_v6_copy_ip_options()
445 if (!opt) in sctp_v6_copy_ip_options()
448 RCU_INIT_POINTER(newnp->opt, opt); in sctp_v6_copy_ip_options()
[all …]
/net/dccp/
Dipv6.c67 static int dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, in dccp_v6_err() argument
210 final_p = fl6_update_dst(&fl6, rcu_dereference(np->opt), &final); in dccp_v6_send_response()
223 struct ipv6_txoptions *opt; in dccp_v6_send_response() local
230 opt = ireq->ipv6_opt; in dccp_v6_send_response()
231 if (!opt) in dccp_v6_send_response()
232 opt = rcu_dereference(np->opt); in dccp_v6_send_response()
233 err = ip6_xmit(sk, skb, &fl6, sk->sk_mark, opt, np->tclass, in dccp_v6_send_response()
406 struct ipv6_txoptions *opt; in dccp_v6_request_recv_sock() local
432 newnp->opt = NULL; in dccp_v6_request_recv_sock()
504 newnp->opt = NULL; in dccp_v6_request_recv_sock()
[all …]

12345678