tcp_output.c (59458f40e25915a355d8b1d701425fe9f4f9ea23) tcp_output.c (496c98dff8e353880299168d36fa082d6fba5237)
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Implementation of the Transmission Control Protocol(TCP).
7 *
8 * Version: $Id: tcp_output.c,v 1.146 2002/02/01 22:01:04 davem Exp $

--- 259 unchanged lines hidden (view full) ---

268
269 return new_win;
270}
271
272static void tcp_build_and_update_options(__be32 *ptr, struct tcp_sock *tp,
273 __u32 tstamp)
274{
275 if (tp->rx_opt.tstamp_ok) {
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Implementation of the Transmission Control Protocol(TCP).
7 *
8 * Version: $Id: tcp_output.c,v 1.146 2002/02/01 22:01:04 davem Exp $

--- 259 unchanged lines hidden (view full) ---

268
269 return new_win;
270}
271
272static void tcp_build_and_update_options(__be32 *ptr, struct tcp_sock *tp,
273 __u32 tstamp)
274{
275 if (tp->rx_opt.tstamp_ok) {
276 *ptr++ = __constant_htonl((TCPOPT_NOP << 24) |
277 (TCPOPT_NOP << 16) |
278 (TCPOPT_TIMESTAMP << 8) |
279 TCPOLEN_TIMESTAMP);
276 *ptr++ = htonl((TCPOPT_NOP << 24) |
277 (TCPOPT_NOP << 16) |
278 (TCPOPT_TIMESTAMP << 8) |
279 TCPOLEN_TIMESTAMP);
280 *ptr++ = htonl(tstamp);
281 *ptr++ = htonl(tp->rx_opt.ts_recent);
282 }
283 if (tp->rx_opt.eff_sacks) {
284 struct tcp_sack_block *sp = tp->rx_opt.dsack ? tp->duplicate_sack : tp->selective_acks;
285 int this_sack;
286
287 *ptr++ = htonl((TCPOPT_NOP << 24) |

--- 32 unchanged lines hidden (view full) ---

320 * should, and thus we won't abide by the delayed ACK
321 * rules correctly.
322 * SACKs don't matter, we never delay an ACK when we
323 * have any of those going out.
324 */
325 *ptr++ = htonl((TCPOPT_MSS << 24) | (TCPOLEN_MSS << 16) | mss);
326 if (ts) {
327 if(sack)
280 *ptr++ = htonl(tstamp);
281 *ptr++ = htonl(tp->rx_opt.ts_recent);
282 }
283 if (tp->rx_opt.eff_sacks) {
284 struct tcp_sack_block *sp = tp->rx_opt.dsack ? tp->duplicate_sack : tp->selective_acks;
285 int this_sack;
286
287 *ptr++ = htonl((TCPOPT_NOP << 24) |

--- 32 unchanged lines hidden (view full) ---

320 * should, and thus we won't abide by the delayed ACK
321 * rules correctly.
322 * SACKs don't matter, we never delay an ACK when we
323 * have any of those going out.
324 */
325 *ptr++ = htonl((TCPOPT_MSS << 24) | (TCPOLEN_MSS << 16) | mss);
326 if (ts) {
327 if(sack)
328 *ptr++ = __constant_htonl((TCPOPT_SACK_PERM << 24) | (TCPOLEN_SACK_PERM << 16) |
329 (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP);
328 *ptr++ = htonl((TCPOPT_SACK_PERM << 24) |
329 (TCPOLEN_SACK_PERM << 16) |
330 (TCPOPT_TIMESTAMP << 8) |
331 TCPOLEN_TIMESTAMP);
330 else
332 else
331 *ptr++ = __constant_htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
332 (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP);
333 *ptr++ = htonl((TCPOPT_NOP << 24) |
334 (TCPOPT_NOP << 16) |
335 (TCPOPT_TIMESTAMP << 8) |
336 TCPOLEN_TIMESTAMP);
333 *ptr++ = htonl(tstamp); /* TSVAL */
334 *ptr++ = htonl(ts_recent); /* TSECR */
335 } else if(sack)
337 *ptr++ = htonl(tstamp); /* TSVAL */
338 *ptr++ = htonl(ts_recent); /* TSECR */
339 } else if(sack)
336 *ptr++ = __constant_htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
337 (TCPOPT_SACK_PERM << 8) | TCPOLEN_SACK_PERM);
340 *ptr++ = htonl((TCPOPT_NOP << 24) |
341 (TCPOPT_NOP << 16) |
342 (TCPOPT_SACK_PERM << 8) |
343 TCPOLEN_SACK_PERM);
338 if (offer_wscale)
344 if (offer_wscale)
339 *ptr++ = htonl((TCPOPT_NOP << 24) | (TCPOPT_WINDOW << 16) | (TCPOLEN_WINDOW << 8) | (wscale));
345 *ptr++ = htonl((TCPOPT_NOP << 24) |
346 (TCPOPT_WINDOW << 16) |
347 (TCPOLEN_WINDOW << 8) |
348 (wscale));
340}
341
342/* This routine actually transmits TCP packets queued in by
343 * tcp_do_sendmsg(). This is used by both the initial
344 * transmission and possible later retransmissions.
345 * All SKB's seen here are completely headerless. It is our
346 * job to build the TCP header, and pass the packet down to
347 * IP so it can do the same plus pass the packet off to the

--- 2062 unchanged lines hidden ---
349}
350
351/* This routine actually transmits TCP packets queued in by
352 * tcp_do_sendmsg(). This is used by both the initial
353 * transmission and possible later retransmissions.
354 * All SKB's seen here are completely headerless. It is our
355 * job to build the TCP header, and pass the packet down to
356 * IP so it can do the same plus pass the packet off to the

--- 2062 unchanged lines hidden ---