Browse Source

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.

STABLE-2_1_x
goldsimon 19 years ago
parent
commit
f3dbd986cb
  1. 5
      CHANGELOG
  2. 6
      src/api/api_lib.c
  3. 7
      src/api/api_msg.c
  4. 1
      src/api/sockets.c
  5. 15
      src/include/lwip/api.h
  6. 9
      src/include/lwip/api_msg.h
  7. 1
      src/include/lwip/tcpip.h

5
CHANGELOG

@ -19,6 +19,11 @@ HISTORY
++ 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
* 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

6
src/api/api_lib.c

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

7
src/api/api_msg.c

@ -41,8 +41,13 @@
#if LWIP_NETCONN /* don't build if not configured for use in lwipopts.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/sys.h"
#include "lwip/tcpip.h"
#include "lwip/igmp.h"

1
src/api/sockets.c

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

15
src/include/lwip/api.h

@ -36,13 +36,9 @@
#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/ip_addr.h"
#include "lwip/err.h"
#ifdef __cplusplus
@ -56,8 +52,8 @@ extern "C" {
/* Flags for netconn_write */
#define NETCONN_NOFLAG 0x00
#define NETCONN_NOCOPY 0x00 /* Only for source code compatibility */
#define NETCONN_COPY TCP_WRITE_FLAG_COPY
#define NETCONN_MORE TCP_WRITE_FLAG_MORE
#define NETCONN_COPY 0x01
#define NETCONN_MORE 0x02
/* Helpers to process several netconn_types by the same code */
#define NETCONNTYPE_GROUP(t) (t&0xF0)
@ -97,6 +93,11 @@ enum netconn_igmp {
};
#endif /* LWIP_IGMP */
struct ip_pcb;
struct tcp_pcb;
struct udp_pcb;
struct raw_pcb;
struct netconn {
enum netconn_type type;
enum netconn_state state;

9
src/include/lwip/api_msg.h

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

1
src/include/lwip/tcpip.h

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

Loading…
Cancel
Save