Lines Matching defs:opt

233 	struct inet6_skb_parm *opt = IP6CB(skb);
238 if (opt->dsthao) {
242 opt->dsthao = opt->dst1;
243 opt->dst1 = 0;
297 struct inet6_skb_parm *opt = IP6CB(skb);
319 opt->lastopt = opt->dst1 = skb_network_header_len(skb);
321 dstbuf = opt->dst1;
326 opt = IP6CB(skb);
328 opt->nhoff = dstbuf;
330 opt->nhoff = opt->dst1;
370 struct inet6_skb_parm *opt = IP6CB(skb);
419 opt->srcrt = skb_network_header_len(skb);
420 opt->lastopt = opt->srcrt;
422 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb);
485 struct inet6_skb_parm *opt = IP6CB(skb);
529 opt->srcrt = skb_network_header_len(skb);
530 opt->lastopt = opt->srcrt;
532 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb);
651 struct inet6_skb_parm *opt = IP6CB(skb);
710 opt->lastopt = opt->srcrt = skb_network_header_len(skb);
712 opt->dst0 = opt->dst1;
713 opt->dst1 = 0;
714 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb);
979 net_dbg_ratelimited("ipv6_hop_jumbo: wrong jumbo opt length/alignment %d\n",
1037 struct inet6_skb_parm *opt = IP6CB(skb);
1059 opt->flags |= IP6SKB_HOPBYHOP;
1062 opt = IP6CB(skb);
1063 opt->nhoff = sizeof(struct ipv6hdr);
1080 struct ipv6_rt_hdr *opt,
1086 ihdr = (struct rt0_hdr *) opt;
1105 struct ipv6_rt_hdr *opt,
1111 sr_ihdr = (struct ipv6_sr_hdr *)opt;
1154 struct ipv6_rt_hdr *opt,
1157 switch (opt->type) {
1161 ipv6_push_rthdr0(skb, proto, opt, addr_p, saddr);
1164 ipv6_push_rthdr4(skb, proto, opt, addr_p, saddr);
1171 static void ipv6_push_exthdr(struct sk_buff *skb, u8 *proto, u8 type, struct ipv6_opt_hdr *opt)
1173 struct ipv6_opt_hdr *h = skb_push(skb, ipv6_optlen(opt));
1175 memcpy(h, opt, ipv6_optlen(opt));
1180 void ipv6_push_nfrag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt,
1184 if (opt->srcrt) {
1185 ipv6_push_rthdr(skb, proto, opt->srcrt, daddr, saddr);
1190 if (opt->dst0opt)
1191 ipv6_push_exthdr(skb, proto, NEXTHDR_DEST, opt->dst0opt);
1193 if (opt->hopopt)
1194 ipv6_push_exthdr(skb, proto, NEXTHDR_HOP, opt->hopopt);
1197 void ipv6_push_frag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt, u8 *proto)
1199 if (opt->dst1opt)
1200 ipv6_push_exthdr(skb, proto, NEXTHDR_DEST, opt->dst1opt);
1205 ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt)
1209 opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC);
1211 long dif = (char *)opt2 - (char *)opt;
1212 memcpy(opt2, opt, opt->tot_len);
1248 * @opt: original options
1249 * @newtype: option type to replace in @opt
1252 * Returns a new set of options which is a copy of @opt with the
1255 * @opt may be NULL, in which case a new set of options is returned
1265 ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt,
1272 if (opt) {
1273 if (newtype != IPV6_HOPOPTS && opt->hopopt)
1274 tot_len += CMSG_ALIGN(ipv6_optlen(opt->hopopt));
1275 if (newtype != IPV6_RTHDRDSTOPTS && opt->dst0opt)
1276 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst0opt));
1277 if (newtype != IPV6_RTHDR && opt->srcrt)
1278 tot_len += CMSG_ALIGN(ipv6_optlen(opt->srcrt));
1279 if (newtype != IPV6_DSTOPTS && opt->dst1opt)
1280 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst1opt));
1300 (opt ? opt->hopopt : NULL),
1303 (opt ? opt->dst0opt : NULL),
1307 (opt ? (struct ipv6_opt_hdr *)opt->srcrt : NULL),
1310 (opt ? opt->dst1opt : NULL),
1322 struct ipv6_txoptions *opt)
1328 if (opt->dst0opt && !opt->srcrt) {
1329 if (opt_space != opt) {
1330 memcpy(opt_space, opt, sizeof(*opt_space));
1331 opt = opt_space;
1333 opt->opt_nflen -= ipv6_optlen(opt->dst0opt);
1334 opt->dst0opt = NULL;
1337 return opt;
1346 * @opt: struct ipv6_txoptions in which to look for srcrt opt
1353 const struct ipv6_txoptions *opt,
1356 if (!opt || !opt->srcrt)
1361 switch (opt->srcrt->type) {
1365 fl6->daddr = *((struct rt0_hdr *)opt->srcrt)->addr;
1369 struct ipv6_sr_hdr *srh = (struct ipv6_sr_hdr *)opt->srcrt;