- comments

- whitespace
This commit is contained in:
yamt 2011-04-14 15:54:31 +00:00
parent 3695fc890a
commit c9cf49ace7

View File

@ -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. * Copyright (c) 2005 The NetBSD Foundation, Inc.
@ -102,7 +102,7 @@
*/ */
#include <sys/cdefs.h> #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_inet.h"
#include "opt_ipsec.h" #include "opt_ipsec.h"
@ -226,9 +226,14 @@ sack_removehole(struct tcpcb *tp, struct sackhole *hole)
return next; return next;
} }
/*
* tcp_new_dsack: record the reception of a duplicated segment.
*/
void void
tcp_new_dsack(struct tcpcb *tp, tcp_seq seq, u_int32_t len) tcp_new_dsack(struct tcpcb *tp, tcp_seq seq, u_int32_t len)
{ {
if (TCP_SACK_ENABLED(tp)) { if (TCP_SACK_ENABLED(tp)) {
tp->rcv_dsack_block.left = seq; tp->rcv_dsack_block.left = seq;
tp->rcv_dsack_block.right = seq + len; tp->rcv_dsack_block.right = seq + len;
@ -236,6 +241,10 @@ tcp_new_dsack(struct tcpcb *tp, tcp_seq seq, u_int32_t len)
} }
} }
/*
* tcp_sack_option: parse the given SACK option and update the scoreboard.
*/
void void
tcp_sack_option(struct tcpcb *tp, const struct tcphdr *th, const u_char *cp, tcp_sack_option(struct tcpcb *tp, const struct tcphdr *th, const u_char *cp,
int optlen) int optlen)
@ -394,6 +403,10 @@ tcp_sack_option(struct tcpcb *tp, const struct tcphdr *th, const u_char *cp,
} }
} }
/*
* tcp_del_sackholes: remove holes covered by a cumulative ACK.
*/
void void
tcp_del_sackholes(struct tcpcb *tp, const struct tcphdr *th) tcp_del_sackholes(struct tcpcb *tp, const struct tcphdr *th)
{ {
@ -415,6 +428,10 @@ tcp_del_sackholes(struct tcpcb *tp, const struct tcphdr *th)
} }
} }
/*
* tcp_free_sackholes: clear the scoreboard.
*/
void void
tcp_free_sackholes(struct tcpcb *tp) tcp_free_sackholes(struct tcpcb *tp)
{ {
@ -556,6 +573,10 @@ tcp_sack_adjust(struct tcpcb *tp)
return; return;
} }
/*
* tcp_sack_numblks: return the number of SACK blocks to send.
*/
int int
tcp_sack_numblks(const struct tcpcb *tp) tcp_sack_numblks(const struct tcpcb *tp)
{ {