Lines Matching refs:opt

234 	struct inet6_skb_parm *opt = IP6CB(skb);
239 if (opt->dsthao) {
243 opt->dsthao = opt->dst1;
244 opt->dst1 = 0;
298 struct inet6_skb_parm *opt = IP6CB(skb);
320 opt->lastopt = opt->dst1 = skb_network_header_len(skb);
322 dstbuf = opt->dst1;
327 opt = IP6CB(skb);
329 opt->nhoff = dstbuf;
331 opt->nhoff = opt->dst1;
371 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);
713 opt->lastopt = opt->srcrt = skb_network_header_len(skb);
715 opt->dst0 = opt->dst1;
716 opt->dst1 = 0;
717 opt->nhoff = (&hdr->nexthdr) - skb_network_header(skb);
977 net_dbg_ratelimited("ipv6_hop_jumbo: wrong jumbo opt length/alignment %d\n",
1035 struct inet6_skb_parm *opt = IP6CB(skb);
1057 opt->flags |= IP6SKB_HOPBYHOP;
1060 opt = IP6CB(skb);
1061 opt->nhoff = sizeof(struct ipv6hdr);
1078 struct ipv6_rt_hdr *opt,
1084 ihdr = (struct rt0_hdr *) opt;
1103 struct ipv6_rt_hdr *opt,
1109 sr_ihdr = (struct ipv6_sr_hdr *)opt;
1152 struct ipv6_rt_hdr *opt,
1155 switch (opt->type) {
1159 ipv6_push_rthdr0(skb, proto, opt, addr_p, saddr);
1162 ipv6_push_rthdr4(skb, proto, opt, addr_p, saddr);
1169 static void ipv6_push_exthdr(struct sk_buff *skb, u8 *proto, u8 type, struct ipv6_opt_hdr *opt)
1171 struct ipv6_opt_hdr *h = skb_push(skb, ipv6_optlen(opt));
1173 memcpy(h, opt, ipv6_optlen(opt));
1178 void ipv6_push_nfrag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt,
1182 if (opt->srcrt) {
1183 ipv6_push_rthdr(skb, proto, opt->srcrt, daddr, saddr);
1188 if (opt->dst0opt)
1189 ipv6_push_exthdr(skb, proto, NEXTHDR_DEST, opt->dst0opt);
1191 if (opt->hopopt)
1192 ipv6_push_exthdr(skb, proto, NEXTHDR_HOP, opt->hopopt);
1195 void ipv6_push_frag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt, u8 *proto)
1197 if (opt->dst1opt)
1198 ipv6_push_exthdr(skb, proto, NEXTHDR_DEST, opt->dst1opt);
1203 ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt)
1207 opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC);
1209 long dif = (char *)opt2 - (char *)opt;
1210 memcpy(opt2, opt, opt->tot_len);
1246 * @opt: original options
1247 * @newtype: option type to replace in @opt
1250 * Returns a new set of options which is a copy of @opt with the
1253 * @opt may be NULL, in which case a new set of options is returned
1263 ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt,
1270 if (opt) {
1271 if (newtype != IPV6_HOPOPTS && opt->hopopt)
1272 tot_len += CMSG_ALIGN(ipv6_optlen(opt->hopopt));
1273 if (newtype != IPV6_RTHDRDSTOPTS && opt->dst0opt)
1274 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst0opt));
1275 if (newtype != IPV6_RTHDR && opt->srcrt)
1276 tot_len += CMSG_ALIGN(ipv6_optlen(opt->srcrt));
1277 if (newtype != IPV6_DSTOPTS && opt->dst1opt)
1278 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst1opt));
1298 (opt ? opt->hopopt : NULL),
1301 (opt ? opt->dst0opt : NULL),
1305 (opt ? (struct ipv6_opt_hdr *)opt->srcrt : NULL),
1308 (opt ? opt->dst1opt : NULL),
1320 struct ipv6_txoptions *opt)
1326 if (opt->dst0opt && !opt->srcrt) {
1327 if (opt_space != opt) {
1328 memcpy(opt_space, opt, sizeof(*opt_space));
1329 opt = opt_space;
1331 opt->opt_nflen -= ipv6_optlen(opt->dst0opt);
1332 opt->dst0opt = NULL;
1335 return opt;
1344 * @opt: struct ipv6_txoptions in which to look for srcrt opt
1351 const struct ipv6_txoptions *opt,
1354 if (!opt || !opt->srcrt)
1359 switch (opt->srcrt->type) {
1363 fl6->daddr = *((struct rt0_hdr *)opt->srcrt)->addr;
1367 struct ipv6_sr_hdr *srh = (struct ipv6_sr_hdr *)opt->srcrt;