summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKip Macy <kmacy@FreeBSD.org>2008-07-31 06:10:25 +0000
committerKip Macy <kmacy@FreeBSD.org>2008-07-31 06:10:25 +0000
commitc9315d890eccf68a8c315fd15caef839170db1c0 (patch)
tree015d7506c77296639099c843b9c6378b9186bcdf
parentfff2bef1618ce74fef9ee14ffa45979e41520365 (diff)
Notes
-rw-r--r--sys/netinet/tcp.h11
-rw-r--r--sys/netinet/tcp_usrreq.c6
2 files changed, 15 insertions, 2 deletions
diff --git a/sys/netinet/tcp.h b/sys/netinet/tcp.h
index 04f4302d44d0..03b8bf637087 100644
--- a/sys/netinet/tcp.h
+++ b/sys/netinet/tcp.h
@@ -149,11 +149,15 @@ struct tcphdr {
#define TCP_NOOPT 0x08 /* don't use TCP options */
#define TCP_MD5SIG 0x10 /* use MD5 digests (RFC2385) */
#define TCP_INFO 0x20 /* retrieve tcp_info structure */
+#define TCP_CONGESTION 0x40 /* get/set congestion control algorithm */
+
+#define TCP_CA_NAME_MAX 16 /* max congestion control name length */
#define TCPI_OPT_TIMESTAMPS 0x01
#define TCPI_OPT_SACK 0x02
#define TCPI_OPT_WSCALE 0x04
#define TCPI_OPT_ECN 0x08
+#define TCPI_OPT_TOE 0x10
/*
* The TCP_INFO socket option comes from the Linux 2.6 TCP API, and permits
@@ -210,9 +214,12 @@ struct tcp_info {
/* FreeBSD extensions to tcp_info. */
u_int32_t tcpi_snd_wnd; /* Advertised send window. */
u_int32_t tcpi_snd_bwnd; /* Bandwidth send window. */
-
+ u_int32_t tcpi_snd_nxt; /* Next egress seqno */
+ u_int32_t tcpi_rcv_nxt; /* Next ingress seqno */
+ u_int32_t tcpi_toe_tid; /* HWTID for TOE endpoints */
+
/* Padding to grow without breaking ABI. */
- u_int32_t __tcpi_pad[32]; /* Padding. */
+ u_int32_t __tcpi_pad[29]; /* Padding. */
};
#endif
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index c19bc0ca0137..d8a5f2f4235a 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -1229,8 +1229,14 @@ tcp_fill_info(struct tcpcb *tp, struct tcp_info *ti)
* FreeBSD-specific extension fields for tcp_info.
*/
ti->tcpi_rcv_space = tp->rcv_wnd;
+ ti->tcpi_rcv_nxt = tp->rcv_nxt;
ti->tcpi_snd_wnd = tp->snd_wnd;
ti->tcpi_snd_bwnd = tp->snd_bwnd;
+ ti->tcpi_snd_nxt = tp->snd_nxt;
+ ti->__tcpi_snd_mss = tp->t_maxseg;
+ ti->__tcpi_rcv_mss = tp->t_maxseg;
+ if (tp->t_flags & TF_TOE)
+ ti->tcpi_options |= TCPI_OPT_TOE;
}
/*