Lines Matching defs:opt
29 static unsigned int optlen(const u8 *opt, unsigned int offset)
32 if (opt[offset] <= TCPOPT_NOP || opt[offset + 1] == 0)
35 return opt[offset + 1];
86 struct ip_options *opt = (struct ip_options *)optbuf;
102 memset(opt, 0, sizeof(struct ip_options));
106 if (skb_copy_bits(skb, start, opt->__data, optlen))
108 opt->optlen = optlen;
110 if (__ip_options_compile(net, opt, NULL, &info))
116 if (!opt->srr)
118 found = target == IPOPT_SSRR ? opt->is_strictroute :
119 !opt->is_strictroute;
121 *offset = opt->srr + start;
124 if (!opt->rr)
126 *offset = opt->rr + start;
130 if (!opt->router_alert)
132 *offset = opt->router_alert + start;
199 u8 *opt;
205 opt = (u8 *)tcph;
207 optl = optlen(opt, i);
209 if (priv->type != opt[i])
221 memcpy(dest, opt + offset, priv->len);
242 u8 *opt;
252 opt = (u8 *)tcph;
260 optl = optlen(opt, i);
262 if (priv->type != opt[i])
272 old.v16 = (__force __be16)get_unaligned((u16 *)(opt + offset));
287 put_unaligned(new.v16, (__be16*)(opt + offset));
293 old.v32 = (__force __be32)get_unaligned((u32 *)(opt + offset));
298 put_unaligned(new.v32, (__be32*)(opt + offset));
322 u8 *opt;
332 opt = (u8 *)tcph;
337 optl = optlen(opt, i);
338 if (priv->type != opt[i])
346 u16 o = opt[i+j];
355 memset(opt + i, TCPOPT_NOP, optl);