Clean-up packet socket naming
diff --git a/arch/arm/src/stm32/stm32_eth.c b/arch/arm/src/stm32/stm32_eth.c
index b890863..2197665 100644
--- a/arch/arm/src/stm32/stm32_eth.c
+++ b/arch/arm/src/stm32/stm32_eth.c
@@ -1595,7 +1595,7 @@
 #ifdef CONFIG_NET_PKT
       /* When packet sockets are enabled, feed the frame into the packet tap */
 
-      uip_pktinput(&priv->dev);
+      pkt_input(&priv->dev);
 #endif
 
       /* Check if the packet is a valid size for the uIP buffer configuration
diff --git a/include/nuttx/net/pkt.h b/include/nuttx/net/pkt.h
index 8db02e9..2dfd85d 100644
--- a/include/nuttx/net/pkt.h
+++ b/include/nuttx/net/pkt.h
@@ -55,7 +55,7 @@
 
 /* Representation of a uIP packet socket connection */
 
-struct uip_pkt_conn
+struct pkt_conn_s
 {
   dq_entry_t node;     /* Supports a double linked list */
   uint8_t    lmac[6];  /* The local Ethernet address in network byte order */
@@ -86,21 +86,19 @@
  * normally something done by the implementation of the socket() API
  */
 
-struct uip_pkt_conn *uip_pktalloc(void);
+FAR struct pkt_conn_s *pkt_alloc(void);
 
 /* Allocate a new packet socket data callback */
 
-#define uip_pktcallbackalloc(conn)   uip_callbackalloc(&conn->list)
-#define uip_pktcallbackfree(conn,cb) uip_callbackfree(cb, &conn->list)
+#define pkt_callbackalloc(conn)   uip_callbackalloc(&conn->list)
+#define pkt_callbackfree(conn,cb) uip_callbackfree(cb, &conn->list)
 
 /* Free a connection structure that is no longer in use. This should
  * be done by the implementation of close()
  */
 
-void uip_pktfree(struct uip_pkt_conn *conn);
-
-void uip_pktpoll(struct uip_driver_s *dev, struct uip_pkt_conn *conn);
-
-int uip_pktinput(struct uip_driver_s *dev);
+void pkt_free(FAR struct pkt_conn_s *conn);
+void pkt_poll(FAR struct uip_driver_s *dev, FAR struct pkt_conn_s *conn);
+int pkt_input(FAR struct uip_driver_s *dev);
 
 #endif /* __INCLUDE_NUTTX_NET_PKT_H */
diff --git a/include/nuttx/net/uip.h b/include/nuttx/net/uip.h
index 00dffb1..b9bad39 100644
--- a/include/nuttx/net/uip.h
+++ b/include/nuttx/net/uip.h
@@ -370,41 +370,6 @@
  * data, etc.
  */
 
-/* Send data on the current connection.
- *
- * This function is used to send out a single segment of TCP
- * data. Only applications that have been invoked by uIP for event
- * processing can send data.
- *
- * The amount of data that actually is sent out after a call to this
- * funcion is determined by the maximum amount of data TCP allows. uIP
- * will automatically crop the data so that only the appropriate
- * amount of data is sent. The function uip_mss() can be used to query
- * uIP for the amount of data that actually will be sent.
- *
- * Note: This function does not guarantee that the sent data will
- * arrive at the destination. If the data is lost in the network, the
- * application will be invoked with the UIP_REXMIT flag set.  The
- * application will then have to resend the data using this function.
- *
- * data A pointer to the data which is to be sent.
- *
- * len The maximum amount of data bytes to be sent.
- */
-
-void uip_send(FAR struct uip_driver_s *dev, FAR const void *buf, int len);
-
-#ifdef CONFIG_NET_IOB
-struct iob_s;
-void uip_iobsend(FAR struct uip_driver_s *dev, FAR struct iob_s *buf,
-                 unsigned int len, unsigned int offset);
-#endif
-
-#ifdef CONFIG_NET_PKT
-void uip_pktsend(FAR struct uip_driver_s *dev, FAR const void *buf,
-                 unsigned int len);
-#endif
-
 /* uIP convenience and converting functions.
  *
  * These functions can be used for converting between different data
diff --git a/net/bind.c b/net/bind.c
index 337254e..a7d7121 100644
--- a/net/bind.c
+++ b/net/bind.c
@@ -73,7 +73,7 @@
  ****************************************************************************/
 
 #ifdef CONFIG_NET_PKT
-static int pkt_bind(FAR struct uip_pkt_conn *conn,
+static int pkt_bind(FAR struct pkt_conn_s *conn,
                     FAR const struct sockaddr_ll *addr)
 {
   int ifindex;
diff --git a/net/net_close.c b/net/net_close.c
index f8f733a..6b5fde4 100644
--- a/net/net_close.c
+++ b/net/net_close.c
@@ -56,6 +56,7 @@
 
 #include "net.h"
 #include "uip/uip.h"
+#include "pkt/pkt.h"
 
 /****************************************************************************
  * Pre-processor Definitions
@@ -436,7 +437,7 @@
 #ifdef CONFIG_NET_PKT
           case SOCK_RAW:
             {
-              struct uip_pkt_conn *conn = psock->s_conn;
+              FAR struct pkt_conn_s *conn = psock->s_conn;
 
               /* Is this the last reference to the connection structure (there
                * could be more if the socket was dup'ed).
@@ -446,8 +447,8 @@
                 {
                   /* Yes... free the connection structure */
 
-                  conn->crefs = 0;             /* No more references on the connection */
-                  uip_pktfree(psock->s_conn);  /* Free uIP resources */
+                  conn->crefs = 0;          /* No more references on the connection */
+                  pkt_free(psock->s_conn);  /* Free uIP resources */
                 }
               else
                 {
diff --git a/net/pkt/pkt.h b/net/pkt/pkt.h
index e2fa884..bc51fc1 100644
--- a/net/pkt/pkt.h
+++ b/net/pkt/pkt.h
@@ -69,6 +69,26 @@
 /****************************************************************************
  * Public Function Prototypes
  ****************************************************************************/
+struct eth_hdr_s; /* Forward reference */
+
+/* Defined in pkt_conn.c ****************************************************/
+
+void pkt_initialize(void);
+struct pkt_conn_s *pkt_alloc(void);
+void pkt_free(FAR struct pkt_conn_s *conn);
+struct pkt_conn_s *pkt_active(FAR struct eth_hdr_s *buf);
+struct pkt_conn_s *uip_nextpktconn(FAR struct pkt_conn_s *conn);
+
+/* Defined in pkt_callback.c ************************************************/
+
+uint16_t pkt_callback(FAR struct uip_driver_s *dev,
+                      FAR struct pkt_conn_s *conn, uint16_t flags);
+
+/* Defined in pkt_input.c ***************************************************/
+
+/* Defined in pkt_poll.c ****************************************************/
+
+void pkt_poll(FAR struct uip_driver_s *dev, FAR struct pkt_conn_s *conn);
 
 /****************************************************************************
  * Function: psock_pkt_send
diff --git a/net/pkt/pkt_callback.c b/net/pkt/pkt_callback.c
index a00360f..7f91152 100644
--- a/net/pkt/pkt_callback.c
+++ b/net/pkt/pkt_callback.c
@@ -48,6 +48,7 @@
 #include <nuttx/net/netdev.h>
 
 #include "uip/uip.h"
+#include "pkt/pkt.h"
 
 /****************************************************************************
  * Private Data
@@ -62,7 +63,7 @@
  ****************************************************************************/
 
 /****************************************************************************
- * Function: uip_pktcallback
+ * Function: pkt_callback
  *
  * Description:
  *   Inform the application holding the packet socket of a change in state.
@@ -75,8 +76,8 @@
  *
  ****************************************************************************/
 
-uint16_t uip_pktcallback(FAR struct uip_driver_s *dev,
-                         FAR struct uip_pkt_conn *conn, uint16_t flags)
+uint16_t pkt_callback(FAR struct uip_driver_s *dev,
+                      FAR struct pkt_conn_s *conn, uint16_t flags)
 {
   nllvdbg("flags: %04x\n", flags);
 
diff --git a/net/pkt/pkt_conn.c b/net/pkt/pkt_conn.c
index 5b8ab87e..4d0a142 100644
--- a/net/pkt/pkt_conn.c
+++ b/net/pkt/pkt_conn.c
@@ -56,6 +56,7 @@
 #include <nuttx/net/arp.h>
 
 #include "uip/uip.h"
+#include "pkt/pkt.h"
 
 /****************************************************************************
  * Private Data
@@ -63,7 +64,7 @@
 
 /* The array containing all packet socket connections */
 
-static struct uip_pkt_conn g_pkt_connections[CONFIG_NET_PKT_CONNS];
+static struct pkt_conn_s g_pkt_connections[CONFIG_NET_PKT_CONNS];
 
 /* A list of all free packet socket connections */
 
@@ -107,7 +108,7 @@
  ****************************************************************************/
 
 /****************************************************************************
- * Name: uip_pktinit()
+ * Name: pkt_initialize()
  *
  * Description:
  *   Initialize the packet socket connection structures.  Called once and
@@ -115,7 +116,7 @@
  *
  ****************************************************************************/
 
-void uip_pktinit(void)
+void pkt_initialize(void)
 {
   int i;
 
@@ -134,23 +135,23 @@
 }
 
 /****************************************************************************
- * Name: uip_pktpalloc()
+ * Name: pkt_palloc()
  *
  * Description:
  *   Alloc a new, uninitialized packet socket connection structure.
  *
  ****************************************************************************/
 
-struct uip_pkt_conn *uip_pktalloc(void)
+FAR struct pkt_conn_s *pkt_alloc(void)
 {
-  struct uip_pkt_conn *conn;
+  FAR struct pkt_conn_s *conn;
 
   /* The free list is only accessed from user, non-interrupt level and
    * is protected by a semaphore (that behaves like a mutex).
    */
 
   _uip_semtake(&g_free_sem);
-  conn = (struct uip_pkt_conn *)dq_remfirst(&g_free_pkt_connections);
+  conn = (FAR struct pkt_conn_s *)dq_remfirst(&g_free_pkt_connections);
   if (conn)
     {
       /* Make sure that the connection is marked as uninitialized */
@@ -167,7 +168,7 @@
 }
 
 /****************************************************************************
- * Name: uip_pktfree()
+ * Name: pkt_free()
  *
  * Description:
  *   Free a packet socket connection structure that is no longer in use.
@@ -175,7 +176,7 @@
  *
  ****************************************************************************/
 
-void uip_pktfree(struct uip_pkt_conn *conn)
+void pkt_free(FAR struct pkt_conn_s *conn)
 {
   /* The free list is only accessed from user, non-interrupt level and
    * is protected by a semaphore (that behaves like a mutex).
@@ -196,7 +197,7 @@
 }
 
 /****************************************************************************
- * Name: uip_pktactive()
+ * Name: pkt_active()
  *
  * Description:
  *   Find a connection structure that is the appropriate
@@ -207,15 +208,15 @@
  *
  ****************************************************************************/
 
-struct uip_pkt_conn *uip_pktactive(struct eth_hdr_s *buf)
+FAR struct pkt_conn_s *pkt_active(struct eth_hdr_s *buf)
 {
   #define uip_ethaddr_cmp(addr1, addr2) \
   ((addr1[0] == addr2[0]) && (addr1[1] == addr2[1]) && \
    (addr1[2] == addr2[2]) && (addr1[3] == addr2[3]) && \
    (addr1[4] == addr2[4]) && (addr1[5] == addr2[5]))
 
-  FAR struct uip_pkt_conn *conn =
-    (struct uip_pkt_conn *)g_active_pkt_connections.head;
+  FAR struct pkt_conn_s *conn =
+    (FAR struct pkt_conn_s *)g_active_pkt_connections.head;
 
   while (conn)
     {
@@ -230,7 +231,7 @@
 
       /* Look at the next active connection */
 
-      conn = (struct uip_pkt_conn *)conn->node.flink;
+      conn = (FAR struct pkt_conn_s *)conn->node.flink;
     }
 
   return conn;
@@ -248,15 +249,15 @@
  *
  ****************************************************************************/
 
-struct uip_pkt_conn *uip_nextpktconn(struct uip_pkt_conn *conn)
+FAR struct pkt_conn_s *uip_nextpktconn(FAR struct pkt_conn_s *conn)
 {
   if (!conn)
     {
-      return (struct uip_pkt_conn *)g_active_pkt_connections.head;
+      return (FAR struct pkt_conn_s *)g_active_pkt_connections.head;
     }
   else
     {
-      return (struct uip_pkt_conn *)conn->node.flink;
+      return (FAR struct pkt_conn_s *)conn->node.flink;
     }
 }
 
diff --git a/net/pkt/pkt_input.c b/net/pkt/pkt_input.c
index 6b803cb..dd9bc07 100644
--- a/net/pkt/pkt_input.c
+++ b/net/pkt/pkt_input.c
@@ -53,6 +53,7 @@
 #include <nuttx/net/arp.h>
 
 #include "uip/uip.h"
+#include "pkt/pkt.h"
 
 /****************************************************************************
  * Pre-processor Definitions
@@ -77,7 +78,7 @@
  ****************************************************************************/
 
 /****************************************************************************
- * Name: uip_pktinput
+ * Name: pkt_input
  *
  * Description:
  *   Handle incoming packet input
@@ -95,13 +96,13 @@
  *
  ****************************************************************************/
 
-int uip_pktinput(struct uip_driver_s *dev)
+int pkt_input(struct uip_driver_s *dev)
 {
-  struct uip_pkt_conn *conn;
-  struct eth_hdr_s  *pbuf = (struct eth_hdr_s *)dev->d_buf;
+  FAR struct pkt_conn_s *conn;
+  FAR struct eth_hdr_s  *pbuf = (struct eth_hdr_s *)dev->d_buf;
   int ret = OK;
 
-  conn = uip_pktactive(pbuf);
+  conn = pkt_active(pbuf);
   if (conn)
     {
       uint16_t flags;
@@ -114,7 +115,7 @@
 
       /* Perform the application callback */
 
-      flags = uip_pktcallback(dev, conn, UIP_NEWDATA);
+      flags = pkt_callback(dev, conn, UIP_NEWDATA);
 
       /* If the operation was successful, the UIP_NEWDATA flag is removed
        * and thus the packet can be deleted (OK will be returned).
diff --git a/net/pkt/pkt_poll.c b/net/pkt/pkt_poll.c
index 36ee03c..5828261 100644
--- a/net/pkt/pkt_poll.c
+++ b/net/pkt/pkt_poll.c
@@ -53,6 +53,7 @@
 #include <nuttx/net/pkt.h>
 
 #include "uip/uip.h"
+#include "pkt/pkt.h"
 
 /****************************************************************************
  * Pre-processor Definitions
@@ -75,7 +76,7 @@
  ****************************************************************************/
 
 /****************************************************************************
- * Name: uip_pktpoll
+ * Name: pkt_poll
  *
  * Description:
  *   Poll a packet "connection" structure for availability of TX data
@@ -92,7 +93,7 @@
  *
  ****************************************************************************/
 
-void uip_pktpoll(struct uip_driver_s *dev, struct uip_pkt_conn *conn)
+void pkt_poll(FAR struct uip_driver_s *dev, FAR struct pkt_conn_s *conn)
 {
   nlldbg("IN\n");
 
@@ -110,7 +111,7 @@
 
       /* Perform the application callback */
 
-      (void)uip_pktcallback(dev, conn, UIP_POLL);
+      (void)pkt_callback(dev, conn, UIP_POLL);
 
       /* If the application has data to send, setup the UDP/IP header */
 
diff --git a/net/pkt/pkt_send.c b/net/pkt/pkt_send.c
index 6775b31..768bd40 100644
--- a/net/pkt/pkt_send.c
+++ b/net/pkt/pkt_send.c
@@ -57,6 +57,7 @@
 
 #include "net.h"
 #include "uip/uip.h"
+#include "pkt/pkt.h"
 
 /****************************************************************************
  * Pre-processor Definitions
@@ -237,11 +238,11 @@
 
   if (len > 0)
     {
-      struct uip_pkt_conn *conn = (struct uip_pkt_conn*)psock->s_conn;
+      FAR struct pkt_conn_s *conn = (FAR struct pkt_conn_s *)psock->s_conn;
 
       /* Allocate resource to receive a callback */
 
-      state.snd_cb = uip_pktcallbackalloc(conn);
+      state.snd_cb = pkt_callbackalloc(conn);
       if (state.snd_cb)
         {
           FAR struct uip_driver_s *dev;
@@ -279,7 +280,7 @@
 
           /* Make sure that no further interrupts are processed */
 
-          uip_pktcallbackfree(conn, state.snd_cb);
+          pkt_callbackfree(conn, state.snd_cb);
 
           /* Clear the no-ARP bit in the device flags */
 
diff --git a/net/recvfrom.c b/net/recvfrom.c
index c894b20..a382b38 100644
--- a/net/recvfrom.c
+++ b/net/recvfrom.c
@@ -60,6 +60,7 @@
 #include "uip/uip.h"
 #include "tcp/tcp.h"
 #include "udp/udp.h"
+#include "pkt/pkt.h"
 
 /****************************************************************************
  * Definitions
@@ -1038,9 +1039,9 @@
 
 #ifdef CONFIG_NET_PKT
 static ssize_t pkt_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len,
-                           FAR struct sockaddr_ll *from)
+                            FAR struct sockaddr_ll *from)
 {
-  struct uip_pkt_conn *conn = (struct uip_pkt_conn *)psock->s_conn;
+  FAR struct pkt_conn_s *conn = (FAR struct pkt_conn_s *)psock->s_conn;
   struct recvfrom_s state;
   uip_lock_t save;
   int ret;
@@ -1060,7 +1061,7 @@
    */
 
 #if 0
-  ret = uip_pktconnect(conn, NULL);
+  ret = pkt_connect(conn, NULL);
   if (ret < 0)
     {
       goto errout_with_state;
@@ -1069,7 +1070,7 @@
 
   /* Set up the callback in the connection */
 
-  state.rf_cb = uip_pktcallbackalloc(conn);
+  state.rf_cb = pkt_callbackalloc(conn);
   if (state.rf_cb)
     {
       state.rf_cb->flags  = UIP_NEWDATA|UIP_POLL;
@@ -1090,7 +1091,7 @@
 
       /* Make sure that no further interrupts are processed */
 
-      uip_pktcallbackfree(conn, state.rf_cb);
+      pkt_callbackfree(conn, state.rf_cb);
       ret = recvfrom_result(ret, &state);
     }
   else
diff --git a/net/socket.c b/net/socket.c
index 61224f8..0fbf51a 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -48,6 +48,7 @@
 #include "net.h"
 #include "tcp/tcp.h"
 #include "udp/udp.h"
+#include "pkt/pkt.h"
 
 /****************************************************************************
  * Global Functions
@@ -170,7 +171,7 @@
            * in the new socket instance.
            */
 
-          struct uip_pkt_conn *conn = uip_pktalloc();
+          FAR struct pkt_conn_s *conn = pkt_alloc();
           if (!conn)
             {
               /* Failed to reserve a connection structure */
diff --git a/net/tcp/Kconfig b/net/tcp/Kconfig
index b46b1ab..da996ce 100644
--- a/net/tcp/Kconfig
+++ b/net/tcp/Kconfig
@@ -58,7 +58,6 @@
 	bool "Enable TCP/IP write buffering"
 	default n
 	select NET_IOB
-	depends on !NET_PKT
 	---help---
 		Write buffers allows buffering of ongoing TCP/IP packets, providing
 		for higher performance, streamed output.
diff --git a/net/tcp/tcp.h b/net/tcp/tcp.h
index 61089c9..4481774 100644
--- a/net/tcp/tcp.h
+++ b/net/tcp/tcp.h
@@ -70,7 +70,6 @@
  * Public Function Prototypes
  ****************************************************************************/
 
-#ifdef CONFIG_NET_TCP
 /* Defined in tcp_conn.c ****************************************************/
 
 void tcp_initialize(void);
@@ -130,7 +129,6 @@
 uint16_t tcp_datahandler(FAR struct tcp_conn_s *conn,
                          FAR uint8_t *buffer, uint16_t nbytes);
 #endif
-#endif /* CONFIG_NET_TCP */
 
 /****************************************************************************
  * Function: psock_tcp_send
diff --git a/net/tcp/tcp_send_buffered.c b/net/tcp/tcp_send_buffered.c
index 1a2e53a..7e08787 100644
--- a/net/tcp/tcp_send_buffered.c
+++ b/net/tcp/tcp_send_buffered.c
@@ -662,7 +662,7 @@
  * Function: psock_tcp_send
  *
  * Description:
- *   The psock_tcp_send() call may be used only when the TCP socket is in a
+ *   psock_tcp_send() call may be used only when the TCP socket is in a
  *   connected state (so that the intended recipient is known).
  *
  * Parameters:
diff --git a/net/tcp/tcp_send_unbuffered.c b/net/tcp/tcp_send_unbuffered.c
index c0c9568..9feee3b 100644
--- a/net/tcp/tcp_send_unbuffered.c
+++ b/net/tcp/tcp_send_unbuffered.c
@@ -57,6 +57,7 @@
 
 #include "net.h"
 #include "uip/uip.h"
+#include "tcp/tcp.h"
 
 /****************************************************************************
  * Pre-processor Definitions
@@ -443,10 +444,10 @@
  ****************************************************************************/
 
 /****************************************************************************
- * Function: tcp_send
+ * Function: psock_tcp_send
  *
  * Description:
- *   The tcp_send() call may be used only when the TCP socket is in a
+ *   psock_tcp_send() call may be used only when the TCP socket is in a
  *   connected state (so that the intended recipient is known).
  *
  * Parameters:
@@ -499,7 +500,8 @@
  *
  ****************************************************************************/
 
-ssize_t tcp_send(FAR struct socket *psock, FAR const void *buf, size_t len)
+ssize_t psock_tcp_send(FAR struct socket *psock,
+                       FAR const void *buf, size_t len)
 {
   struct send_s state;
   uip_lock_t save;
diff --git a/net/uip/uip.h b/net/uip/uip.h
index ad612d1..7a11dab 100644
--- a/net/uip/uip.h
+++ b/net/uip/uip.h
@@ -96,35 +96,104 @@
 #define EXTERN extern
 #endif
 
-/* Defined in uip_callback.c ************************************************/
+/****************************************************************************
+ * Function: uip_callbackinit
+ *
+ * Description:
+ *   Configure the pre-allocated callback structures into a free list.
+ *   This is called internally as part of uIP initialization and should not
+ *   be accessed from the application or socket layer.
+ *
+ * Assumptions:
+ *   This function is called with interrupts disabled.
+ *
+ ****************************************************************************/
 
 void uip_callbackinit(void);
-FAR struct uip_callback_s *uip_callbackalloc(struct uip_callback_s **list);
-void uip_callbackfree(FAR struct uip_callback_s *cb, struct uip_callback_s **list);
-uint16_t uip_callbackexecute(FAR struct uip_driver_s *dev, void *pvconn,
+
+/****************************************************************************
+ * Function: uip_callbackalloc
+ *
+ * Description:
+ *   Allocate a callback container from the free list.
+ *   This is called internally as part of uIP initialization and should not
+ *   be accessed from the application or socket layer.
+ *
+ * Assumptions:
+ *   This function is called with interrupts disabled.
+ *
+ ****************************************************************************/
+
+FAR struct uip_callback_s *uip_callbackalloc(FAR struct uip_callback_s **list);
+
+/****************************************************************************
+ * Function: uip_callbackfree
+ *
+ * Description:
+ *   Return a callback container to the free list.
+ *   This is called internally as part of uIP initialization and should not
+ *   be accessed from the application or socket layer.
+ *
+ * Assumptions:
+ *   This function is called with interrupts disabled.
+ *
+ ****************************************************************************/
+
+void uip_callbackfree(FAR struct uip_callback_s *cb,
+                      FAR struct uip_callback_s **list);
+
+/****************************************************************************
+ * Function: uip_callbackexecute
+ *
+ * Description:
+ *   Execute a list of callbacks.
+ *   This is called internally as part of uIP initialization and should not
+ *   be accessed from the application or socket layer.
+ *
+ * Assumptions:
+ *   This function is called with interrupts disabled.
+ *
+ ****************************************************************************/
+
+uint16_t uip_callbackexecute(FAR struct uip_driver_s *dev, FAR void *pvconn,
                              uint16_t flags, FAR struct uip_callback_s *list);
 
+/****************************************************************************
+ * Send data on the current connection.
+ *
+ * This function is used to send out a single segment of TCP
+ * data. Only applications that have been invoked by uIP for event
+ * processing can send data.
+ *
+ * The amount of data that actually is sent out after a call to this
+ * function is determined by the maximum amount of data TCP allows. uIP
+ * will automatically crop the data so that only the appropriate
+ * amount of data is sent. The function uip_mss() can be used to query
+ * uIP for the amount of data that actually will be sent.
+ *
+ * Note: This function does not guarantee that the sent data will
+ * arrive at the destination. If the data is lost in the network, the
+ * application will be invoked with the UIP_REXMIT flag set.  The
+ * application will then have to resend the data using this function.
+ *
+ * data A pointer to the data which is to be sent.
+ *
+ * len The maximum amount of data bytes to be sent.
+ *
+ ****************************************************************************/
+
+void uip_send(FAR struct uip_driver_s *dev, FAR const void *buf, int len);
+
+#ifdef CONFIG_NET_IOB
+struct iob_s;
+void uip_iobsend(FAR struct uip_driver_s *dev, FAR struct iob_s *buf,
+                 unsigned int len, unsigned int offset);
+#endif
+
 #ifdef CONFIG_NET_PKT
-/* Defined in uip_pktconn.c *************************************************/
-
-void uip_pktinit(void);
-struct uip_pkt_conn *uip_pktalloc(void);
-void uip_pktfree(struct uip_pkt_conn *conn);
-struct uip_pkt_conn *uip_pktactive(struct eth_hdr_s *buf);
-struct uip_pkt_conn *uip_nextpktconn(struct uip_pkt_conn *conn);
-
-/* Defined in uip_pktcallback.c *********************************************/
-
-uint16_t uip_pktcallback(struct uip_driver_s *dev, struct uip_pkt_conn *conn,
-                         uint16_t flags);
-
-/* Defined in uip_pktinput.c ************************************************/
-
-/* Defined in uip_pktpoll.c *************************************************/
-
-void uip_pktpoll(struct uip_driver_s *dev, struct uip_pkt_conn *conn);
-
-#endif /* CONFIG_NET_PKT */
+void uip_pktsend(FAR struct uip_driver_s *dev, FAR const void *buf,
+                 unsigned int len);
+#endif
 
 #undef EXTERN
 #ifdef __cplusplus
diff --git a/net/uip/uip_initialize.c b/net/uip/uip_initialize.c
index f71c3ab..93e4170 100644
--- a/net/uip/uip_initialize.c
+++ b/net/uip/uip_initialize.c
@@ -50,6 +50,7 @@
 #include "uip/uip.h"
 #include "tcp/tcp.h"
 #include "udp/udp.h"
+#include "pkt/pkt.h"
 #include "igmp/igmp.h"
 
 /****************************************************************************
@@ -129,7 +130,7 @@
   /* Initialize packet socket suport */
 
 #ifdef CONFIG_NET_PKT
-  uip_pktinit();
+  pkt_initialize();
 #endif
 
   /* Initialize the listening port structures */
diff --git a/net/uip/uip_input.c b/net/uip/uip_input.c
index c43a22f..cb51caf 100644
--- a/net/uip/uip_input.c
+++ b/net/uip/uip_input.c
@@ -96,6 +96,7 @@
 #include "uip/uip.h"
 #include "tcp/tcp.h"
 #include "udp/udp.h"
+#include "pkt/pkt.h"
 #include "icmp/icmp.h"
 #include "igmp/igmp.h"
 
diff --git a/net/uip/uip_poll.c b/net/uip/uip_poll.c
index 614ee1d..f7c212f 100644
--- a/net/uip/uip_poll.c
+++ b/net/uip/uip_poll.c
@@ -49,6 +49,7 @@
 #include "uip/uip.h"
 #include "tcp/tcp.h"
 #include "udp/udp.h"
+#include "pkt/pkt.h"
 #include "icmp/icmp.h"
 #include "igmp/igmp.h"
 
@@ -76,7 +77,7 @@
 static int uip_pollpktconnections(struct uip_driver_s *dev,
                                   uip_poll_callback_t callback)
 {
-  struct uip_pkt_conn *pkt_conn = NULL;
+  FAR struct pkt_conn_s *pkt_conn = NULL;
   int bstop = 0;
 
   /* Traverse all of the allocated packet connections and perform the poll action */
@@ -85,7 +86,7 @@
     {
       /* Perform the packet TX poll */
 
-      uip_pktpoll(dev, pkt_conn);
+      pkt_poll(dev, pkt_conn);
 
       /* Call back into the driver */