? core/ipv4/ip_frag.c.detabbed_and_static
? include/lwip/api_internal.h
Index: api/api_lib.c
===================================================================
RCS file: /sources/lwip/lwip/src/api/api_lib.c,v
retrieving revision 1.71
diff -u -r1.71 api_lib.c
--- api/api_lib.c	24 Oct 2007 12:09:18 -0000	1.71
+++ api/api_lib.c	28 Oct 2007 13:57:21 -0000
@@ -50,6 +50,8 @@
 
 #include <string.h>
 
+#include "lwip/api_internal.h"
+
 /**
  * Create a new netconn (of a specific type) that has a callback function.
  * The corresponding pcb is also created.
@@ -620,4 +622,10 @@
 }
 #endif /* LWIP_IGMP */
 
+err_t
+netconn_err(struct netconn *conn)
+{
+  return NETCONN_ERR(conn);
+}
+
 #endif /* LWIP_NETCONN */
Index: api/api_msg.c
===================================================================
RCS file: /sources/lwip/lwip/src/api/api_msg.c,v
retrieving revision 1.73
diff -u -r1.73 api_msg.c
--- api/api_msg.c	24 Oct 2007 12:09:19 -0000	1.73
+++ api/api_msg.c	28 Oct 2007 13:35:58 -0000
@@ -46,6 +46,8 @@
 #include "lwip/tcpip.h"
 #include "lwip/igmp.h"
 
+#include "lwip/api_internal.h"
+
 /* forward declarations */
 #if LWIP_TCP
 static err_t do_writemore(struct netconn *conn);
Index: api/netbuf.c
===================================================================
RCS file: /sources/lwip/lwip/src/api/netbuf.c,v
retrieving revision 1.2
diff -u -r1.2 netbuf.c
--- api/netbuf.c	7 Sep 2007 23:01:59 -0000	1.2
+++ api/netbuf.c	28 Oct 2007 14:01:45 -0000
@@ -41,6 +41,7 @@
 #if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */
 
 #include "lwip/netbuf.h"
+#include "lwip/api_internal.h"
 #include "lwip/memp.h"
 
 #include <string.h>
@@ -232,4 +233,34 @@
   buf->ptr = buf->p;
 }
 
+u16_t
+netbuf_copy_partial(struct netbuf *buf, void *dataptr, u16_t len, u16_t offset)
+{
+  return NETBUF_COPY_PARTIAL(buf, dataptr, len, offset);
+}
+
+u16_t
+netbuf_copy(struct netbuf *buf, void *dataptr, u16_t len)
+{
+  return NETBUF_COPY(buf, dataptr, len);
+}
+
+u16_t
+netbuf_len(struct netbuf *buf)
+{
+  return NETBUF_LEN(buf);
+}
+
+struct ip_addr*
+netbuf_fromaddr(struct netbuf *buf)
+{
+  return NETBUF_FROMADDR(buf);
+}
+
+u16_t
+netbuf_fromport(struct netbuf *buf)
+{
+  return NETBUF_FROMPORT(buf);
+}
+
 #endif /* LWIP_NETCONN */
Index: api/sockets.c
===================================================================
RCS file: /sources/lwip/lwip/src/api/sockets.c,v
retrieving revision 1.93
diff -u -r1.93 sockets.c
--- api/sockets.c	10 Oct 2007 08:13:58 -0000	1.93
+++ api/sockets.c	28 Oct 2007 13:36:13 -0000
@@ -44,6 +44,7 @@
 
 #include "lwip/sockets.h"
 #include "lwip/api.h"
+#include "lwip/api_internal.h"
 #include "lwip/sys.h"
 #include "lwip/igmp.h"
 #include "lwip/inet.h"
Index: api/tcpip.c
===================================================================
RCS file: /sources/lwip/lwip/src/api/tcpip.c,v
retrieving revision 1.64
diff -u -r1.64 tcpip.c
--- api/tcpip.c	15 Oct 2007 21:31:42 -0000	1.64
+++ api/tcpip.c	28 Oct 2007 13:38:45 -0000
@@ -52,6 +52,7 @@
 #include "lwip/init.h"
 #include "netif/etharp.h"
 #include "netif/ppp_oe.h"
+#include "lwip/api_internal.h"
 
 /* global variables */
 static void (* tcpip_init_done)(void *arg);
Index: core/memp.c
===================================================================
RCS file: /sources/lwip/lwip/src/core/memp.c,v
retrieving revision 1.54
diff -u -r1.54 memp.c
--- core/memp.c	6 Oct 2007 15:24:44 -0000	1.54
+++ core/memp.c	28 Oct 2007 13:39:17 -0000
@@ -44,7 +44,7 @@
 #include "lwip/raw.h"
 #include "lwip/tcp.h"
 #include "lwip/igmp.h"
-#include "lwip/api.h"
+#include "lwip/api_internal.h"
 #include "lwip/api_msg.h"
 #include "lwip/tcpip.h"
 #include "lwip/sys.h"
Index: include/lwip/api.h
===================================================================
RCS file: /sources/lwip/lwip/src/include/lwip/api.h,v
retrieving revision 1.32
diff -u -r1.32 api.h
--- include/lwip/api.h	24 Oct 2007 12:09:19 -0000	1.32
+++ include/lwip/api.h	28 Oct 2007 13:15:40 -0000
@@ -36,13 +36,7 @@
 
 #if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */
 
-#include "lwip/pbuf.h"
 #include "lwip/netbuf.h"
-#include "lwip/sys.h"
-#include "lwip/ip.h"
-#include "lwip/raw.h"
-#include "lwip/udp.h"
-#include "lwip/tcp.h"
 #include "lwip/err.h"
 
 #ifdef __cplusplus
@@ -95,44 +89,7 @@
 };
 #endif /* LWIP_IGMP */
 
-struct netconn {
-  enum netconn_type type;
-  enum netconn_state state;
-  union {
-    struct ip_pcb  *ip;
-    struct tcp_pcb *tcp;
-    struct udp_pcb *udp;
-    struct raw_pcb *raw;
-  } pcb;
-  err_t err;
-  sys_mbox_t mbox;
-  sys_mbox_t recvmbox;
-  sys_mbox_t acceptmbox;
-  int socket;
-#if LWIP_SO_RCVTIMEO
-  int recv_timeout;
-#endif /* LWIP_SO_RCVTIMEO */
-  u16_t recv_avail;
-  /** TCP: when data passed to netconn_write doesn't fit into the send buffer,
-      this temporarily stores the message. */
-  struct api_msg_msg *write_msg;
-  /** TCP: when data passed to netconn_write doesn't fit into the send buffer,
-      this temporarily stores how much is already sent. */
-  int write_offset;
-#if LWIP_TCPIP_CORE_LOCKING
-  /** TCP: when data passed to netconn_write doesn't fit into the send buffer,
-      this temporarily stores whether to wake up the original application task
-      if data couldn't be sent in the first try. */
-  u8_t write_delayed;
-#endif /* LWIP_TCPIP_CORE_LOCKING */
-
-  void (* callback)(struct netconn *, enum netconn_evt, u16_t len);
-};
-
-/* Register an Network connection event */
-#define API_EVENT(c,e,l) if (c->callback) {         \
-                           (*c->callback)(c, e, l); \
-                         }
+struct netconn;
 
 /* Network connection functions: */
 #define netconn_new(t)                  netconn_new_with_proto_and_callback(t, 0, NULL)
@@ -174,7 +131,7 @@
                                             enum netconn_igmp join_or_leave);
 #endif /* LWIP_IGMP */
 
-#define netconn_err(conn)         ((conn)->err)
+err_t netconn_err(struct netconn *conn);
 
 #ifdef __cplusplus
 }
Index: include/lwip/netbuf.h
===================================================================
RCS file: /sources/lwip/lwip/src/include/lwip/netbuf.h,v
retrieving revision 1.1
diff -u -r1.1 netbuf.h
--- include/lwip/netbuf.h	30 Aug 2007 16:55:11 -0000	1.1
+++ include/lwip/netbuf.h	28 Oct 2007 13:33:57 -0000
@@ -39,11 +39,7 @@
 extern "C" {
 #endif
 
-struct netbuf {
-  struct pbuf *p, *ptr;
-  struct ip_addr *addr;
-  u16_t port;
-};
+struct netbuf;
 
 /* Network buffer functions: */
 struct netbuf *   netbuf_new      (void);
@@ -62,12 +58,11 @@
 void              netbuf_first    (struct netbuf *buf);
 
 
-#define netbuf_copy_partial(buf, dataptr, len, offset) \
-  pbuf_copy_partial((buf)->p, (dataptr), (len), (offset))
-#define netbuf_copy(buf,dataptr,len) netbuf_copy_partial(buf, dataptr, len, 0)
-#define netbuf_len(buf)              ((buf)->p->tot_len)
-#define netbuf_fromaddr(buf)         ((buf)->addr)
-#define netbuf_fromport(buf)         ((buf)->port)
+u16_t netbuf_copy_partial(struct netbuf *buf, void *dataptr, u16_t len, u16_t offset);
+u16_t netbuf_copy(struct netbuf *buf, void *dataptr, u16_t len);
+u16_t netbuf_len(struct netbuf *buf);
+struct ip_addr *netbuf_fromaddr(struct netbuf *buf);
+u16_t netbuf_fromport(struct netbuf *buf);
 
 #ifdef __cplusplus
 }
