2 * Copyright (c) 2009-2010
3 * Swinburne University of Technology, Melbourne, Australia
4 * Copyright (c) 2010 Lawrence Stewart <lstewart@freebsd.org>
7 * This software was developed at the Centre for Advanced Internet
8 * Architectures, Swinburne University of Technology, by David Hayes, made
9 * possible in part by a grant from the Cisco University Research Program Fund
10 * at Community Foundation Silicon Valley.
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in the
19 * documentation and/or other materials provided with the distribution.
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * The ERTT (Enhanced Round Trip Time) Khelp module calculates an estimate of
38 * the instantaneous TCP RTT which, for example, is used by delay-based
39 * congestion control schemes. When the module is loaded, ERTT data is
40 * calculated for each active TCP connection and encapsulated within a
43 * This software was first released in 2010 by David Hayes and Lawrence Stewart
44 * whilst working on the NewTCP research project at Swinburne University of
45 * Technology's Centre for Advanced Internet Architectures, Melbourne,
46 * Australia, which was made possible in part by a grant from the Cisco
47 * University Research Program Fund at Community Foundation Silicon Valley.
48 * Testing and development was further assisted by a grant from the FreeBSD
49 * Foundation. More details are available at:
50 * http://caia.swin.edu.au/urp/newtcp/
53 #ifndef _NETINET_KHELP_H_ERTT_
54 #define _NETINET_KHELP_H_ERTT_
58 /* Structure used as the ertt data block. */
60 /* Information about transmitted segments to aid in RTT calculation. */
61 TAILQ_HEAD(txseginfo_head, txseginfo) txsegi_q;
62 /* Bytes TX so far in marked RTT. */
64 /* Final version of above. */
65 long bytes_tx_in_marked_rtt;
66 /* cwnd for marked RTT. */
67 unsigned long marked_snd_cwnd;
68 /* Per-packet measured RTT. */
70 /* Maximum RTT measured. */
72 /* Minimum RTT measured. */
74 /* Guess if the receiver is using delayed ack. */
76 /* Keep track of inconsistencies in packet timestamps. */
78 /* RTT for a marked packet. */
80 /* Flags to signal conditions between hook function calls. */
84 /* Flags for struct ertt. */
85 #define ERTT_NEW_MEASUREMENT 0x01
86 #define ERTT_MEASUREMENT_IN_PROGRESS 0x02
87 #define ERTT_TSO_DISABLED 0x04
89 #endif /* _NETINET_KHELP_H_ERTT_ */