diff options
| author | Bill Fenner <fenner@FreeBSD.org> | 1999-01-20 17:32:01 +0000 |
|---|---|---|
| committer | Bill Fenner <fenner@FreeBSD.org> | 1999-01-20 17:32:01 +0000 |
| commit | b0acefa8d40ad2c3ae548a35b6266c79d2ab0ef2 (patch) | |
| tree | 59f15a90c7c15e6267b938bfe99fe1cceef44ce5 | |
| parent | 50d5db08d06df731f7f34eefe6684b2f50d2f737 (diff) | |
Notes
| -rw-r--r-- | sys/kern/uipc_socket.c | 6 | ||||
| -rw-r--r-- | sys/netinet/tcp_output.c | 5 | ||||
| -rw-r--r-- | sys/netinet/tcp_usrreq.c | 9 | ||||
| -rw-r--r-- | sys/netinet/tcp_var.h | 35 | ||||
| -rw-r--r-- | sys/sys/protosw.h | 3 |
5 files changed, 34 insertions, 24 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 5ce603bd6634..6b1cb0a04b75 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)uipc_socket.c 8.3 (Berkeley) 4/15/94 - * $Id: uipc_socket.c,v 1.48 1999/01/08 17:31:13 eivind Exp $ + * $Id: uipc_socket.c,v 1.49 1999/01/10 01:58:25 eivind Exp $ */ #include <sys/param.h> @@ -529,7 +529,9 @@ nopages: ((flags & MSG_EOF) && (so->so_proto->pr_flags & PR_IMPLOPCL) && (resid <= 0)) ? - PRUS_EOF : 0, + PRUS_EOF : + /* If there is more to send set PRUS_MORETOCOME */ + (resid > 0) ? PRUS_MORETOCOME : 0, top, addr, control, p); splx(s); if (dontroute) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index a0ae43af0b4b..36f431ac6182 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tcp_output.c 8.4 (Berkeley) 5/24/95 - * $Id: tcp_output.c,v 1.30 1998/05/24 18:41:04 fenner Exp $ + * $Id: tcp_output.c,v 1.31 1998/07/13 11:53:59 bde Exp $ */ #include "opt_tcpdebug.h" @@ -223,7 +223,8 @@ again: if (len) { if (len == tp->t_maxseg) goto send; - if ((idle || tp->t_flags & TF_NODELAY) && + if (!(tp->t_flags & TF_MORETOCOME) && + (idle || tp->t_flags & TF_NODELAY) && (tp->t_flags & TF_NOPUSH) == 0 && len + off >= so->so_snd.sb_cc) goto send; diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 9c002085a083..66519cef45f8 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * From: @(#)tcp_usrreq.c 8.2 (Berkeley) 1/3/94 - * $Id: tcp_usrreq.c,v 1.38 1998/08/23 03:07:15 wollman Exp $ + * $Id: tcp_usrreq.c,v 1.39 1998/12/07 21:58:42 archie Exp $ */ #include "opt_tcpdebug.h" @@ -368,8 +368,13 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf *m, socantsendmore(so); tp = tcp_usrclosed(tp); } - if (tp != NULL) + if (tp != NULL) { + if (flags & PRUS_MORETOCOME) + tp->t_flags |= TF_MORETOCOME; error = tcp_output(tp); + if (flags & PRUS_MORETOCOME) + tp->t_flags &= ~TF_MORETOCOME; + } } else { if (sbspace(&so->so_snd) < -512) { m_freem(m); diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 4e8d88c086fd..db4f401a060d 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tcp_var.h 8.4 (Berkeley) 5/24/95 - * $Id: tcp_var.h,v 1.47 1998/08/23 03:07:15 wollman Exp $ + * $Id: tcp_var.h,v 1.48 1998/08/24 07:47:39 dfr Exp $ */ #ifndef _NETINET_TCP_VAR_H_ @@ -54,22 +54,23 @@ struct tcpcb { struct inpcb *t_inpcb; /* back pointer to internet pcb */ int t_state; /* state of this connection */ u_int t_flags; -#define TF_ACKNOW 0x0001 /* ack peer immediately */ -#define TF_DELACK 0x0002 /* ack, but try to delay it */ -#define TF_NODELAY 0x0004 /* don't delay packets to coalesce */ -#define TF_NOOPT 0x0008 /* don't use tcp options */ -#define TF_SENTFIN 0x0010 /* have sent FIN */ -#define TF_REQ_SCALE 0x0020 /* have/will request window scaling */ -#define TF_RCVD_SCALE 0x0040 /* other side has requested scaling */ -#define TF_REQ_TSTMP 0x0080 /* have/will request timestamps */ -#define TF_RCVD_TSTMP 0x0100 /* a timestamp was received in SYN */ -#define TF_SACK_PERMIT 0x0200 /* other side said I could SACK */ -#define TF_NEEDSYN 0x0400 /* send SYN (implicit state) */ -#define TF_NEEDFIN 0x0800 /* send FIN (implicit state) */ -#define TF_NOPUSH 0x1000 /* don't push */ -#define TF_REQ_CC 0x2000 /* have/will request CC */ -#define TF_RCVD_CC 0x4000 /* a CC was received in SYN */ -#define TF_SENDCCNEW 0x8000 /* send CCnew instead of CC in SYN */ +#define TF_ACKNOW 0x00001 /* ack peer immediately */ +#define TF_DELACK 0x00002 /* ack, but try to delay it */ +#define TF_NODELAY 0x00004 /* don't delay packets to coalesce */ +#define TF_NOOPT 0x00008 /* don't use tcp options */ +#define TF_SENTFIN 0x00010 /* have sent FIN */ +#define TF_REQ_SCALE 0x00020 /* have/will request window scaling */ +#define TF_RCVD_SCALE 0x00040 /* other side has requested scaling */ +#define TF_REQ_TSTMP 0x00080 /* have/will request timestamps */ +#define TF_RCVD_TSTMP 0x00100 /* a timestamp was received in SYN */ +#define TF_SACK_PERMIT 0x00200 /* other side said I could SACK */ +#define TF_NEEDSYN 0x00400 /* send SYN (implicit state) */ +#define TF_NEEDFIN 0x00800 /* send FIN (implicit state) */ +#define TF_NOPUSH 0x01000 /* don't push */ +#define TF_REQ_CC 0x02000 /* have/will request CC */ +#define TF_RCVD_CC 0x04000 /* a CC was received in SYN */ +#define TF_SENDCCNEW 0x08000 /* send CCnew instead of CC in SYN */ +#define TF_MORETOCOME 0x10000 /* More data to be appended to sock */ int t_force; /* 1 if forcing out a byte */ tcp_seq snd_una; /* send unacknowledged */ diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h index f016fc0f1cf3..99a1d92dd731 100644 --- a/sys/sys/protosw.h +++ b/sys/sys/protosw.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)protosw.h 8.1 (Berkeley) 6/2/93 - * $Id: protosw.h,v 1.24 1998/06/07 17:13:03 dfr Exp $ + * $Id: protosw.h,v 1.25 1998/08/23 03:07:17 wollman Exp $ */ #ifndef _SYS_PROTOSW_H_ @@ -203,6 +203,7 @@ struct pr_usrreqs { struct proc *p)); #define PRUS_OOB 0x1 #define PRUS_EOF 0x2 +#define PRUS_MORETOCOME 0x4 int (*pru_sense) __P((struct socket *so, struct stat *sb)); int (*pru_shutdown) __P((struct socket *so)); int (*pru_sockaddr) __P((struct socket *so, |
