Module Name: src Committed By: yamt Date: Thu Apr 14 15:54:31 UTC 2011
Modified Files: src/sys/netinet: tcp_sack.c Log Message: - comments - whitespace To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/netinet/tcp_sack.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/netinet/tcp_sack.c diff -u src/sys/netinet/tcp_sack.c:1.25 src/sys/netinet/tcp_sack.c:1.26 --- src/sys/netinet/tcp_sack.c:1.25 Wed May 27 17:41:03 2009 +++ src/sys/netinet/tcp_sack.c Thu Apr 14 15:54:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_sack.c,v 1.25 2009/05/27 17:41:03 pooka Exp $ */ +/* $NetBSD: tcp_sack.c,v 1.26 2011/04/14 15:54:31 yamt Exp $ */ /* * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -102,7 +102,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tcp_sack.c,v 1.25 2009/05/27 17:41:03 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcp_sack.c,v 1.26 2011/04/14 15:54:31 yamt Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -226,9 +226,14 @@ return next; } +/* + * tcp_new_dsack: record the reception of a duplicated segment. + */ + void tcp_new_dsack(struct tcpcb *tp, tcp_seq seq, u_int32_t len) { + if (TCP_SACK_ENABLED(tp)) { tp->rcv_dsack_block.left = seq; tp->rcv_dsack_block.right = seq + len; @@ -236,6 +241,10 @@ } } +/* + * tcp_sack_option: parse the given SACK option and update the scoreboard. + */ + void tcp_sack_option(struct tcpcb *tp, const struct tcphdr *th, const u_char *cp, int optlen) @@ -394,6 +403,10 @@ } } +/* + * tcp_del_sackholes: remove holes covered by a cumulative ACK. + */ + void tcp_del_sackholes(struct tcpcb *tp, const struct tcphdr *th) { @@ -415,6 +428,10 @@ } } +/* + * tcp_free_sackholes: clear the scoreboard. + */ + void tcp_free_sackholes(struct tcpcb *tp) { @@ -556,6 +573,10 @@ return; } +/* + * tcp_sack_numblks: return the number of SACK blocks to send. + */ + int tcp_sack_numblks(const struct tcpcb *tp) {