Task #7410: Removed the need to include core header files in api.h (ip/tcp/udp/raw.h) to hide the internal implementation from netconn api applications.

This commit is contained in:
goldsimon 2007-11-06 20:31:28 +00:00
parent ecce865cfe
commit f3dbd986cb
7 changed files with 29 additions and 15 deletions

View File

@ -19,6 +19,11 @@ HISTORY
++ New features: ++ New features:
2007-11-06 Simon Goldschmidt
* api.h, api_msg.h and dependent files: Task #7410: Removed the need to include
core header files in api.h (ip/tcp/udp/raw.h) to hide the internal
implementation from netconn api applications.
2007-11-03 Frédéric Bernon 2007-11-03 Frédéric Bernon
* api.h, api_lib.c, api_msg.c, sockets.c, opt.h: add SO_RCVBUF option for UDP & * api.h, api_lib.c, api_msg.c, sockets.c, opt.h: add SO_RCVBUF option for UDP &
RAW netconn. You need to set LWIP_SO_RCVBUF=1 in your lwipopts.h (it's disabled RAW netconn. You need to set LWIP_SO_RCVBUF=1 in your lwipopts.h (it's disabled

View File

@ -44,10 +44,14 @@
#if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */ #if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */
#include "lwip/api.h" #include "lwip/api.h"
#include "lwip/api_msg.h"
#include "lwip/tcpip.h" #include "lwip/tcpip.h"
#include "lwip/memp.h" #include "lwip/memp.h"
#include "lwip/ip.h"
#include "lwip/raw.h"
#include "lwip/udp.h"
#include "lwip/tcp.h"
#include <string.h> #include <string.h>
/** /**

View File

@ -41,8 +41,13 @@
#if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */ #if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */
#include "lwip/api_msg.h" #include "lwip/api_msg.h"
#include "lwip/ip.h"
#include "lwip/udp.h"
#include "lwip/tcp.h"
#include "lwip/raw.h"
#include "lwip/memp.h" #include "lwip/memp.h"
#include "lwip/sys.h"
#include "lwip/tcpip.h" #include "lwip/tcpip.h"
#include "lwip/igmp.h" #include "lwip/igmp.h"

View File

@ -48,6 +48,7 @@
#include "lwip/igmp.h" #include "lwip/igmp.h"
#include "lwip/inet.h" #include "lwip/inet.h"
#include "lwip/tcp.h" #include "lwip/tcp.h"
#include "lwip/udp.h"
#include "lwip/tcpip.h" #include "lwip/tcpip.h"
#include <string.h> #include <string.h>

View File

@ -36,13 +36,9 @@
#if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */ #if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */
#include "lwip/pbuf.h"
#include "lwip/netbuf.h" #include "lwip/netbuf.h"
#include "lwip/sys.h" #include "lwip/sys.h"
#include "lwip/ip.h" #include "lwip/ip_addr.h"
#include "lwip/raw.h"
#include "lwip/udp.h"
#include "lwip/tcp.h"
#include "lwip/err.h" #include "lwip/err.h"
#ifdef __cplusplus #ifdef __cplusplus
@ -56,8 +52,8 @@ extern "C" {
/* Flags for netconn_write */ /* Flags for netconn_write */
#define NETCONN_NOFLAG 0x00 #define NETCONN_NOFLAG 0x00
#define NETCONN_NOCOPY 0x00 /* Only for source code compatibility */ #define NETCONN_NOCOPY 0x00 /* Only for source code compatibility */
#define NETCONN_COPY TCP_WRITE_FLAG_COPY #define NETCONN_COPY 0x01
#define NETCONN_MORE TCP_WRITE_FLAG_MORE #define NETCONN_MORE 0x02
/* Helpers to process several netconn_types by the same code */ /* Helpers to process several netconn_types by the same code */
#define NETCONNTYPE_GROUP(t) (t&0xF0) #define NETCONNTYPE_GROUP(t) (t&0xF0)
@ -97,6 +93,11 @@ enum netconn_igmp {
}; };
#endif /* LWIP_IGMP */ #endif /* LWIP_IGMP */
struct ip_pcb;
struct tcp_pcb;
struct udp_pcb;
struct raw_pcb;
struct netconn { struct netconn {
enum netconn_type type; enum netconn_type type;
enum netconn_state state; enum netconn_state state;

View File

@ -36,17 +36,14 @@
#if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */ #if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */
#include "lwip/pbuf.h" #include "lwip/ip_addr.h"
#include "lwip/sys.h"
#include "lwip/ip.h"
#include "lwip/udp.h"
#include "lwip/tcp.h"
#include "lwip/api.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
enum netconn_igmp;
/* IP addresses and port numbers are expected to be in /* IP addresses and port numbers are expected to be in
* the same byte order as in the corresponding pcb. * the same byte order as in the corresponding pcb.
*/ */

View File

@ -39,6 +39,7 @@
#include "lwip/api_msg.h" #include "lwip/api_msg.h"
#include "lwip/netifapi.h" #include "lwip/netifapi.h"
#include "lwip/pbuf.h" #include "lwip/pbuf.h"
#include "lwip/api.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {