Lines Matching defs:opt
34 optlen(const u_int8_t *opt, unsigned int offset)
37 if (opt[offset] <= TCPOPT_NOP || opt[offset+1] == 0)
40 return opt[offset+1];
83 u8 *opt;
116 opt = (u_int8_t *)tcph;
117 for (i = sizeof(struct tcphdr); i <= tcp_hdrlen - TCPOLEN_MSS; i += optlen(opt, i)) {
118 if (opt[i] == TCPOPT_MSS && opt[i+1] == TCPOLEN_MSS) {
121 oldmss = (opt[i+2] << 8) | opt[i+3];
130 opt[i+2] = (newmss & 0xff00) >> 8;
131 opt[i+3] = newmss & 0x00ff;
176 opt = (u_int8_t *)tcph + sizeof(struct tcphdr);
177 memmove(opt + TCPOLEN_MSS, opt, len - sizeof(struct tcphdr));
181 opt[0] = TCPOPT_MSS;
182 opt[1] = TCPOLEN_MSS;
183 opt[2] = (newmss & 0xff00) >> 8;
184 opt[3] = newmss & 0x00ff;
186 inet_proto_csum_replace4(&tcph->check, skb, 0, *((__be32 *)opt), false);