Home
last modified time | relevance | path

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

12345678

/net/ipv4/
A Dip_options.c49 memcpy(&(IPCB(skb)->opt), opt, sizeof(struct ip_options)); 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()
64 memcpy(iph + opt->ts + iph[opt->ts + 2] - 5, &midtime, 4); in ip_options_build()
198 struct ip_options *opt = &(IPCB(skb)->opt); in ip_options_fragment() local
519 if (!opt) in ip_options_get()
527 opt->opt.__data[optlen++] = IPOPT_END; in ip_options_get()
528 opt->opt.optlen = optlen; in ip_options_get()
540 struct ip_options *opt = &(IPCB(skb)->opt); in ip_forward_options() local
[all …]
A Dcipso_ipv4.c1897 opt->opt.optlen = opt_len; in cipso_v4_sock_setattr()
2006 if (!opt || opt->opt.cipso == 0) in cipso_v4_delopt()
2008 if (opt->opt.srr || opt->opt.rr || opt->opt.ts || opt->opt.router_alert) { in cipso_v4_delopt()
2018 if (opt->opt.srr > opt->opt.cipso) in cipso_v4_delopt()
2020 if (opt->opt.rr > opt->opt.cipso) in cipso_v4_delopt()
2022 if (opt->opt.ts > opt->opt.cipso) in cipso_v4_delopt()
2024 if (opt->opt.router_alert > opt->opt.cipso) in cipso_v4_delopt()
2026 opt->opt.cipso = 0; in cipso_v4_delopt()
2032 opt->opt.optlen); in cipso_v4_delopt()
2152 if (opt && opt->opt.cipso) in cipso_v4_sock_getattr()
[all …]
A Dip_output.c159 skb_push(skb, sizeof(struct iphdr) + (opt ? opt->opt.optlen : 0)); in ip_build_and_send_pkt()
166 iph->daddr = (opt && opt->opt.srr ? opt->opt.faddr : daddr); in ip_build_and_send_pkt()
184 if (opt && opt->opt.optlen) { in ip_build_and_send_pkt()
185 iph->ihl += opt->opt.optlen>>2; in ip_build_and_send_pkt()
961 struct ip_options *opt = cork->opt; in __ip_append_data() local
1309 opt = ipc->opt; in ip_setup_cork()
1317 memcpy(cork->opt, &opt->opt, sizeof(struct ip_options) + opt->opt.optlen); in ip_setup_cork()
1445 opt = cork->opt; in __ip_make_skb()
1623 if (replyopts.opt.opt.optlen) { in ip_send_unicast_reply()
1624 ipc.opt = &replyopts.opt; in ip_send_unicast_reply()
[all …]
A Dip_forward.c67 struct ip_options *opt = &(IPCB(skb)->opt); in ip_forward_finish() local
76 if (unlikely(opt->optlen)) in ip_forward_finish()
88 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()
128 if (opt->is_strictroute && rt->rt_uses_gateway) in ip_forward()
155 if (IPCB(skb)->flags & IPSKB_DOREDIRECT && !opt->srr && in ip_forward()
/net/ceph/
A Dceph_common.c312 opt = kzalloc(sizeof(*opt), GFP_KERNEL); in ceph_alloc_options()
313 if (!opt) in ceph_alloc_options()
317 opt->mon_addr = kcalloc(CEPH_MAX_MON, sizeof(*opt->mon_addr), in ceph_alloc_options()
320 kfree(opt); in ceph_alloc_options()
332 return opt; in ceph_alloc_options()
339 if (!opt) in ceph_destroy_options()
344 if (opt->key) { in ceph_destroy_options()
349 kfree(opt); in ceph_destroy_options()
459 opt->key = kzalloc(sizeof(*opt->key), GFP_KERNEL); in ceph_parse_param()
472 opt->key = kzalloc(sizeof(*opt->key), GFP_KERNEL); in ceph_parse_param()
[all …]
/net/ipv6/
A Dexthdrs.c243 opt->dsthao = opt->dst1; in ipv6_dest_hao()
331 opt->nhoff = opt->dst1; in ipv6_destopt_rcv()
420 opt->lastopt = opt->srcrt; in ipv6_srh_rcv()
530 opt->lastopt = opt->srcrt; in ipv6_rpl_srh_rcv()
715 opt->dst0 = opt->dst1; in ipv6_rthdr_rcv()
1173 memcpy(h, opt, ipv6_optlen(opt)); in ipv6_push_exthdr()
1297 (opt ? opt->hopopt : NULL), in ipv6_renew_options()
1300 (opt ? opt->dst0opt : NULL), in ipv6_renew_options()
1307 (opt ? opt->dst1opt : NULL), in ipv6_renew_options()
1325 if (opt->dst0opt && !opt->srcrt) { in __ipv6_fixup_options()
[all …]
A Dipv6_sockglue.c106 if (opt && in ipv6_update_options()
114 opt = unrcu_pointer(xchg(&inet6_sk(sk)->opt, RCU_INITIALIZER(opt))); in ipv6_update_options()
117 return opt; in ipv6_update_options()
333 opt = ipv6_renew_options(sk, opt, optname, new); in ipv6_set_opt_hdr()
340 if (optname == IPV6_RTHDR && opt && opt->srcrt) { in ipv6_set_opt_hdr()
364 opt = ipv6_update_options(sk, opt); in ipv6_set_opt_hdr()
836 memset(opt, 0, sizeof(*opt)); in do_ipv6_setsockopt()
838 opt->tot_len = sizeof(*opt) + optlen; in do_ipv6_setsockopt()
846 ipc6.opt = opt; in do_ipv6_setsockopt()
853 opt = ipv6_update_options(sk, opt); in do_ipv6_setsockopt()
[all …]
A Ddatagram.c92 opt = flowlabel ? flowlabel->opt : rcu_dereference(np->opt); in ip6_datagram_dst_update()
649 if (opt->lastopt && in ip6_datagram_recv_specific_ctl()
739 opt->iif); in ip6_datagram_recv_specific_ctl()
767 struct ipv6_txoptions *opt = ipc6->opt; in ip6_datagram_send_ctl() local
881 opt->hopopt = hdr; in ip6_datagram_send_ctl()
900 if (opt->dst1opt) { in ip6_datagram_send_ctl()
905 opt->dst1opt = hdr; in ip6_datagram_send_ctl()
927 opt->dst1opt = hdr; in ip6_datagram_send_ctl()
930 opt->dst0opt = hdr; in ip6_datagram_send_ctl()
972 opt->srcrt = rthdr; in ip6_datagram_send_ctl()
[all …]
A Dip6_output.c287 if (opt) in ip6_xmit()
288 head_room += opt->opt_nflen + opt->opt_flen; in ip6_xmit()
303 seg_len += opt->opt_nflen + opt->opt_flen; in ip6_xmit()
1445 struct ipv6_txoptions *opt = v6_cork->opt; in __ip6_append_data() local
1452 exthdrlen = opt ? opt->opt_flen : 0; in __ip6_append_data()
1463 (opt ? opt->opt_nflen : 0); in __ip6_append_data()
1466 (opt ? opt->opt_flen + opt->opt_nflen : 0) + in __ip6_append_data()
1878 struct ipv6_txoptions *opt = v6_cork->opt; in ip6_cork_release() local
1904 struct ipv6_txoptions *opt = v6_cork->opt; in __ip6_make_skb() local
1933 if (opt && opt->opt_flen) in __ip6_make_skb()
[all …]
A Dip6_flowlabel.c110 kfree(fl->opt); in fl_free_rcu()
137 struct ipv6_txoptions *opt = fl->opt; in fl_release() local
138 fl->opt = NULL; in fl_release()
139 kfree(opt); in fl_release()
400 fl->opt = kmalloc(sizeof(*fl->opt) + olen, GFP_KERNEL); in fl_create()
401 if (!fl->opt) in fl_create()
404 memset(fl->opt, 0, sizeof(*fl->opt)); in fl_create()
405 fl->opt->tot_len = sizeof(*fl->opt) + olen; in fl_create()
415 ipc6.opt = fl->opt; in fl_create()
464 kfree(fl->opt); in fl_create()
[all …]
/net/sched/
A Dsch_gred.c315 struct tc_gred_qopt_offload *opt = table->opt; in gred_offload() local
320 memset(opt, 0, sizeof(*opt)); in gred_offload()
739 if (!opt) in gred_init()
760 table->opt = kzalloc(sizeof(*table->opt), GFP_KERNEL); in gred_init()
761 if (!table->opt) in gred_init()
811 memset(&opt, 0, sizeof(opt)); in gred_dump()
823 opt.DP = q->DP; in gred_dump()
825 opt.prio = q->prio; in gred_dump()
845 if (nla_append(skb, sizeof(opt), &opt) < 0) in gred_dump()
916 if (table->opt) in gred_destroy()
[all …]
A Dsch_prio.c143 struct tc_prio_qopt_offload opt = { in prio_offload() local
152 opt.command = TC_PRIO_REPLACE; in prio_offload()
153 opt.replace_params.bands = qopt->bands; in prio_offload()
158 opt.command = TC_PRIO_DESTROY; in prio_offload()
184 if (nla_len(opt) < sizeof(*qopt)) in prio_tune()
186 qopt = nla_data(opt); in prio_tune()
235 if (!opt) in prio_init()
242 return prio_tune(sch, opt, extack); in prio_init()
266 struct tc_prio_qopt opt; in prio_dump() local
269 opt.bands = q->bands; in prio_dump()
[all …]
A Dsch_cbs.c277 const struct tc_cbs_qopt *opt, in cbs_enable_offload() argument
292 cbs.hicredit = opt->hicredit; in cbs_enable_offload()
293 cbs.locredit = opt->locredit; in cbs_enable_offload()
294 cbs.idleslope = opt->idleslope; in cbs_enable_offload()
295 cbs.sendslope = opt->sendslope; in cbs_enable_offload()
407 if (!opt) { in cbs_init()
430 return cbs_change(sch, opt, extack); in cbs_init()
455 struct tc_cbs_qopt opt = { }; in cbs_dump() local
462 opt.hicredit = READ_ONCE(q->hicredit); in cbs_dump()
466 opt.offload = READ_ONCE(q->offload); in cbs_dump()
[all …]
A Dsch_red.c190 struct tc_red_qopt_offload opt = { in red_offload() local
199 opt.command = TC_RED_REPLACE; in red_offload()
202 opt.set.probability = q->parms.max_P; in red_offload()
203 opt.set.limit = q->limit; in red_offload()
204 opt.set.is_ecn = red_use_ecn(q); in red_offload()
206 opt.set.is_nodrop = red_use_nodrop(q); in red_offload()
207 opt.set.qstats = &sch->qstats; in red_offload()
209 opt.command = TC_RED_DESTROY; in red_offload()
348 if (!opt) in red_init()
415 struct tc_red_qopt opt = { in red_dump() local
[all …]
A Dsch_sfq.c650 ctl_v1 = nla_data(opt); in sfq_change()
803 if (opt) { in sfq_init()
837 memset(&opt, 0, sizeof(opt)); in sfq_dump()
840 opt.v0.limit = q->limit; in sfq_dump()
843 opt.depth = q->maxdepth; in sfq_dump()
849 opt.Wlog = p->Wlog; in sfq_dump()
850 opt.Plog = p->Plog; in sfq_dump()
852 opt.max_P = p->max_P; in sfq_dump()
854 memcpy(&opt.stats, &q->stats, sizeof(opt.stats)); in sfq_dump()
855 opt.flags = q->flags; in sfq_dump()
[all …]
A Dsch_fifo.c100 static int __fifo_init(struct Qdisc *sch, struct nlattr *opt, in __fifo_init() argument
106 if (opt == NULL) { in __fifo_init()
114 struct tc_fifo_qopt *ctl = nla_data(opt); in __fifo_init()
116 if (nla_len(opt) < sizeof(*ctl)) in __fifo_init()
135 static int fifo_init(struct Qdisc *sch, struct nlattr *opt, in fifo_init() argument
140 err = __fifo_init(sch, opt, extack); in fifo_init()
148 static int fifo_hd_init(struct Qdisc *sch, struct nlattr *opt, in fifo_hd_init() argument
151 return __fifo_init(sch, opt, extack); in fifo_hd_init()
161 struct tc_fifo_qopt opt = { .limit = READ_ONCE(sch->limit) }; in __fifo_dump() local
163 if (nla_put(skb, TCA_OPTIONS, sizeof(opt), &opt)) in __fifo_dump()
A Dem_ipset.c53 struct ip_set_adt_opt opt; in em_ipset_match() local
80 opt.family = state.pf; in em_ipset_match()
81 opt.dim = set->dim; in em_ipset_match()
82 opt.flags = set->flags; in em_ipset_match()
83 opt.cmdflags = 0; in em_ipset_match()
84 opt.ext.timeout = ~0u; in em_ipset_match()
100 ret = ip_set_test(set->index, skb, &acpar, &opt); in em_ipset_match()
A Dsch_mqprio.c170 struct nlattr *opt, in mqprio_parse_tc_entry() argument
243 struct nlattr *opt, in mqprio_parse_nlattr() argument
370 if (!opt || nla_len(opt) < sizeof(*qopt)) in mqprio_init()
379 qopt = nla_data(opt); in mqprio_init()
497 for (i = 0; i < opt->num_tc; i++) { in dump_rates()
511 for (i = 0; i < opt->num_tc; i++) { in dump_rates()
558 struct tc_mqprio_qopt opt = { 0 }; in mqprio_dump() local
584 mqprio_qopt_reconstruct(dev, &opt); in mqprio_dump()
585 opt.hw = priv->hw_offload; in mqprio_dump()
587 if (nla_put(skb, TCA_OPTIONS, sizeof(opt), &opt)) in mqprio_dump()
[all …]
/net/dns_resolver/
A Ddns_key.c144 opt = memchr(data, '#', datalen); in dns_resolver_preparse()
145 if (!opt) { in dns_resolver_preparse()
152 result_len = opt - data; in dns_resolver_preparse()
153 opt++; in dns_resolver_preparse()
154 kdebug("options: '%s'", opt); in dns_resolver_preparse()
160 next_opt = memchr(opt, '#', end - opt) ?: end; in dns_resolver_preparse()
161 opt_len = next_opt - opt; in dns_resolver_preparse()
168 eq = memchr(opt, '=', opt_len); in dns_resolver_preparse()
170 opt_nlen = eq - opt; in dns_resolver_preparse()
202 opt_nlen, opt_nlen, opt); in dns_resolver_preparse()
[all …]
/net/netfilter/
A Dnft_exthdr.c32 if (opt[offset] <= TCPOPT_NOP || opt[offset + 1] == 0) in optlen()
106 opt->optlen = optlen; in ipv4_find_option()
114 if (!opt->srr) in ipv4_find_option()
122 if (!opt->rr) in ipv4_find_option()
124 *offset = opt->rr; in ipv4_find_option()
197 u8 *opt; in nft_exthdr_tcp_eval() local
203 opt = (u8 *)tcph; in nft_exthdr_tcp_eval()
240 u8 *opt; in nft_exthdr_tcp_set_eval() local
250 opt = (u8 *)tcph; in nft_exthdr_tcp_set_eval()
320 u8 *opt; in nft_exthdr_tcp_strip_eval() local
[all …]
A 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/can/
A Disotp.c159 struct can_isotp_options opt; member
183 return so->opt.flags & ISOTP_ALL_BC_FLAGS; in isotp_bc_flags()
243 if (so->opt.flags & CAN_ISOTP_TX_PADDING) { in isotp_send_fc()
255 ncf->data[0] = so->opt.ext_address; in isotp_send_fc()
543 if (so->opt.flags & CAN_ISOTP_LISTEN_MODE) in isotp_rcv_ff()
759 cf->data[0] = so->opt.ext_address; in isotp_fill_dataframe()
828 cf->data[0] = so->opt.ext_address; in isotp_create_fframe()
1395 so->opt.rx_ext_address = so->opt.ext_address; in isotp_setsockopt_locked()
1407 if (so->opt.frame_txtime) { in isotp_setsockopt_locked()
1507 val = &so->opt; in isotp_getsockopt()
[all …]
/net/nfc/nci/
A Dcore.c100 const void *opt, __u32 timeout) in __nci_request()
108 req(ndev, opt); in __nci_request()
143 const void *opt), in nci_request() argument
174 if (opt) in nci_init_req()
337 cmd.type = (unsigned long)opt; in nci_rf_deactivate_req()
516 const void *opt = NULL; in nci_open_device() local
519 opt = &nci_init_v2_cmd; in nci_open_device()
661 __u8 action = (unsigned long)opt; in nci_nfcee_discover_req()
670 unsigned long opt = action; in nci_nfcee_discover() local
745 __u8 conn_id = (unsigned long)opt; in nci_core_conn_close_req()
[all …]
/net/netfilter/ipset/
A Dip_set_hash_ipmac.c86 enum ipset_adt adt, struct ip_set_adt_opt *opt) in hash_ipmac4_kadt() argument
90 struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); in hash_ipmac4_kadt()
96 if (opt->flags & IPSET_DIM_TWO_SRC) in hash_ipmac4_kadt()
104 ip4addrptr(skb, opt->flags & IPSET_DIM_ONE_SRC, &e.ip); in hash_ipmac4_kadt()
106 return adtfn(set, &e, &ext, &opt->ext, opt->cmdflags); in hash_ipmac4_kadt()
199 enum ipset_adt adt, struct ip_set_adt_opt *opt) in hash_ipmac6_kadt() argument
206 struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); in hash_ipmac6_kadt()
212 if (opt->flags & IPSET_DIM_TWO_SRC) in hash_ipmac6_kadt()
220 ip6addrptr(skb, opt->flags & IPSET_DIM_ONE_SRC, &e.ip.in6); in hash_ipmac6_kadt()
222 return adtfn(set, &e, &ext, &opt->ext, opt->cmdflags); in hash_ipmac6_kadt()
/net/sctp/
A Dipv6.c498 opt = rcu_dereference(np->opt); in sctp_v6_copy_ip_options()
499 if (opt) { in sctp_v6_copy_ip_options()
500 opt = ipv6_dup_options(newsk, opt); in sctp_v6_copy_ip_options()
501 if (!opt) in sctp_v6_copy_ip_options()
504 RCU_INIT_POINTER(newnp->opt, opt); in sctp_v6_copy_ip_options()
516 opt = rcu_dereference(np->opt); in sctp_v6_ip_options_len()
517 if (opt) in sctp_v6_ip_options_len()
518 len = opt->opt_flen + opt->opt_nflen; in sctp_v6_ip_options_len()
1016 af = opt->pf->af; in sctp_inet6_bind_verify()
1045 af = opt->pf->af; in sctp_inet6_send_verify()
[all …]

Completed in 62 milliseconds

12345678