Only in lwip: TAGS
diff -ru --exclude '*~*~' lwip.ori/src/api/api_lib.c lwip/src/api/api_lib.c
--- lwip.ori/src/api/api_lib.c	2007-10-24 12:09:18.000000000 +0000
+++ lwip/src/api/api_lib.c	2007-10-26 11:37:29.000000000 +0000
@@ -540,6 +540,11 @@
   return conn->err;
 }
 
+err_t
+netconn_write(struct netconn *conn, const void *dataptr, int size, u8_t copy)
+{
+    return netconn_write_more(conn, dataptr, size, copy, NETCONN_NOMORE);
+}
 /**
  * Send data over a TCP netconn.
  *
@@ -550,7 +555,7 @@
  * @return ERR_OK if data was sent, any other err_t on error
  */
 err_t
-netconn_write(struct netconn *conn, const void *dataptr, int size, u8_t copy)
+netconn_write_more(struct netconn *conn, const void *dataptr, int size, u8_t copy, u8_t more)
 {
   struct api_msg msg;
 
@@ -561,6 +566,7 @@
   msg.msg.conn = conn;
   msg.msg.msg.w.dataptr = dataptr;
   msg.msg.msg.w.copy = copy;
+  msg.msg.msg.w.more = more;
   msg.msg.msg.w.len = size;
   /* For locking the core: this _can_ be delayed on low memory/low send buffer,
      but if it is, this is done inside api_msg.c:do_write(), so we can use the
diff -ru --exclude '*~*~' lwip.ori/src/api/api_msg.c lwip/src/api/api_msg.c
--- lwip.ori/src/api/api_msg.c	2007-10-24 12:09:19.000000000 +0000
+++ lwip/src/api/api_msg.c	2007-10-26 11:40:13.000000000 +0000
@@ -784,8 +784,11 @@
 #endif
   }
 
-  err = tcp_write(conn->pcb.tcp, dataptr, len, conn->write_msg->msg.w.copy);
-  LWIP_ASSERT("do_writemore: invalid length!", ((conn->write_offset + len) <= conn->write_msg->msg.w.len));
+  err = tcp_write_more(conn->pcb.tcp, dataptr, len,
+                       conn->write_msg->msg.w.copy,
+                       conn->write_msg->msg.w.more);
+  LWIP_ASSERT("do_writemore: invalid length!",
+              ((conn->write_offset + len) <= conn->write_msg->msg.w.len));
   if (err == ERR_OK) {
     conn->write_offset += len;
     if (conn->write_offset == conn->write_msg->msg.w.len) {
diff -ru --exclude '*~*~' lwip.ori/src/api/sockets.c lwip/src/api/sockets.c
--- lwip.ori/src/api/sockets.c	2007-10-10 08:13:58.000000000 +0000
+++ lwip/src/api/sockets.c	2007-10-26 11:24:17.000000000 +0000
@@ -538,7 +538,8 @@
 #endif /* (LWIP_UDP || LWIP_RAW) */
   }
 
-  err = netconn_write(sock->conn, data, size, NETCONN_COPY);
+  err = netconn_write_more(sock->conn, data, size, NETCONN_COPY,
+                           (flags & MSG_MORE) ? NETCONN_MORE : NETCONN_NOMORE);
 
   LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_send(%d) err=%d size=%d\n", s, err, size));
   sock_set_errno(sock, err_to_errno(err));
diff -ru --exclude '*~*~' lwip.ori/src/core/tcp_out.c lwip/src/core/tcp_out.c
--- lwip.ori/src/core/tcp_out.c	2007-09-07 23:02:00.000000000 +0000
+++ lwip/src/core/tcp_out.c	2007-10-26 11:01:21.000000000 +0000
@@ -92,6 +92,12 @@
 err_t
 tcp_write(struct tcp_pcb *pcb, const void *data, u16_t len, u8_t copy)
 {
+    return tcp_write_more(pcb, data, len, copy, 0);
+}
+
+err_t
+tcp_write_more(struct tcp_pcb *pcb, const void *data, u16_t len, u8_t copy, u8_t more)
+{
   LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_write(pcb=%p, data=%p, len=%"U16_F", copy=%"U16_F")\n", (void *)pcb,
     data, len, (u16_t)copy));
   /* connection is in valid state for data transmission? */
@@ -100,7 +106,7 @@
      pcb->state == SYN_SENT ||
      pcb->state == SYN_RCVD) {
     if (len > 0) {
-      return tcp_enqueue(pcb, (void *)data, len, 0, copy, NULL, 0);
+      return tcp_enqueue_more(pcb, (void *)data, len, 0, copy, more, NULL, 0);
     }
     return ERR_OK;
   } else {
@@ -128,6 +134,14 @@
   u8_t flags, u8_t copy,
   u8_t *optdata, u8_t optlen)
 {
+    return tcp_enqueue_more(pcb, arg, len, flags, copy, 0, optdata, optlen);
+}
+
+err_t
+tcp_enqueue_more(struct tcp_pcb *pcb, void *arg, u16_t len,
+                 u8_t flags, u8_t copy, u8_t more,
+                 u8_t *optdata, u8_t optlen)
+{
   struct pbuf *p;
   struct tcp_seg *seg, *useg, *queue;
   u32_t seqno;
@@ -372,7 +386,7 @@
 
   /* Set the PSH flag in the last segment that we enqueued, but only
   if the segment has data (indicated by seglen > 0). */
-  if (seg != NULL && seglen > 0 && seg->tcphdr != NULL) {
+  if (seg != NULL && seglen > 0 && seg->tcphdr != NULL && !more) {
     TCPH_SET_FLAG(seg->tcphdr, TCP_PSH);
   }
 
diff -ru --exclude '*~*~' lwip.ori/src/include/lwip/api.h lwip/src/include/lwip/api.h
--- lwip.ori/src/include/lwip/api.h	2007-10-24 12:09:19.000000000 +0000
+++ lwip/src/include/lwip/api.h	2007-10-26 11:27:24.000000000 +0000
@@ -56,6 +56,8 @@
 /* Flags for netconn_write */
 #define NETCONN_NOCOPY 0x00
 #define NETCONN_COPY   0x01
+#define NETCONN_NOMORE 0x00
+#define NETCONN_MORE   0x01
 
 /* Helpers to process several netconn_types by the same code */
 #define NETCONNTYPE_GROUP(t)    (t&0xF0)
@@ -165,6 +167,9 @@
 err_t             netconn_write   (struct netconn *conn,
            const void *dataptr, int size,
            u8_t copy);
+err_t             netconn_write_more (struct netconn *conn,
+           const void *dataptr, int size,
+           u8_t copy, u8_t more);
 err_t             netconn_close   (struct netconn *conn);
 
 #if LWIP_IGMP
diff -ru --exclude '*~*~' lwip.ori/src/include/lwip/api_msg.h lwip/src/include/lwip/api_msg.h
--- lwip.ori/src/include/lwip/api_msg.h	2007-09-07 23:02:03.000000000 +0000
+++ lwip/src/include/lwip/api_msg.h	2007-10-26 11:13:13.000000000 +0000
@@ -65,6 +65,7 @@
       const void *dataptr;
       int len;
       u8_t copy;
+      u8_t more;
     } w; /* do_write */
     struct {
       u16_t len;
diff -ru --exclude '*~*~' lwip.ori/src/include/lwip/sockets.h lwip/src/include/lwip/sockets.h
--- lwip.ori/src/include/lwip/sockets.h	2007-09-07 23:02:03.000000000 +0000
+++ lwip/src/include/lwip/sockets.h	2007-10-26 11:20:14.000000000 +0000
@@ -128,10 +128,15 @@
 #define INADDR_BROADCAST 0xffffffff
 
 /* Flags we can use with send and recv. */
-#define MSG_PEEK       0x01    /* Peeks at an incoming message */
-#define MSG_WAITALL    0x02    /* Requests that the function block until the full amount of data requested can be returned */
-#define MSG_OOB        0x04    /* Requests out-of-band data. The significance and semantics of out-of-band data are protocol-specific */
-#define MSG_DONTWAIT   0x08    /* Nonblocking i/o for this operation only */
+#define MSG_OOB        0x0001  /* Requests out-of-band data. The significance
+                                  and semantics of out-of-band data are
+                                  protocol-specific */
+#define MSG_PEEK       0x0002  /* Peeks at an incoming message */
+#define MSG_DONTWAIT   0x0080  /* Nonblocking i/o for this operation only */
+#define MSG_WAITALL    0x0100  /* Requests that the function block until the
+                                  full amount of data requested can be
+                                  returned */
+#define MSG_MORE       0x8000  /* Sender will send more. */
 
 
 /*
diff -ru --exclude '*~*~' lwip.ori/src/include/lwip/tcp.h lwip/src/include/lwip/tcp.h
--- lwip.ori/src/include/lwip/tcp.h	2007-10-09 19:59:59.000000000 +0000
+++ lwip/src/include/lwip/tcp.h	2007-10-26 11:08:56.000000000 +0000
@@ -90,7 +90,9 @@
 void             tcp_abort   (struct tcp_pcb *pcb);
 err_t            tcp_close   (struct tcp_pcb *pcb);
 err_t            tcp_write   (struct tcp_pcb *pcb, const void *dataptr, u16_t len,
-                              u8_t copy);
+            u8_t copy);
+err_t            tcp_write_more (struct tcp_pcb *pcb, const void *dataptr, u16_t len,
+            u8_t copy, u8_t more);
 
 void             tcp_setprio (struct tcp_pcb *pcb, u8_t prio);
 
@@ -481,6 +483,9 @@
 err_t tcp_enqueue(struct tcp_pcb *pcb, void *dataptr, u16_t len,
     u8_t flags, u8_t copy,
                 u8_t *optdata, u8_t optlen);
+err_t tcp_enqueue_more(struct tcp_pcb *pcb, void *dataptr, u16_t len,
+                       u8_t flags, u8_t copy, u8_t more,
+                       u8_t *optdata, u8_t optlen);
 
 void tcp_rexmit_seg(struct tcp_pcb *pcb, struct tcp_seg *seg);
 
