Included patch #5448: include '#ifdef __cplusplus \ extern "C" {' in all header files. Now you can write your application using the lwIP stack in C++ and simply #include the core files. Note I have left out the netif/ppp/*h header files for now, since I don't know which files are included by applications and which are for internal use only.

This commit is contained in:
goldsimon
2007-05-10 10:59:20 +00:00
parent 255d5a748f
commit 84fc489e0c
36 changed files with 292 additions and 15 deletions

View File

@@ -39,6 +39,10 @@
#include "lwip/netif.h"
#ifdef __cplusplus
extern "C" {
#endif
#define ICMP6_DUR 1
#define ICMP6_TE 3
#define ICMP6_ECHO 128 /* echo */
@@ -86,5 +90,9 @@ struct icmp_te_hdr {
u32_t unused;
};
#ifdef __cplusplus
}
#endif
#endif /* __LWIP_ICMP_H__ */

View File

@@ -38,6 +38,10 @@
#include "lwip/pbuf.h"
#include "lwip/ip_addr.h"
#ifdef __cplusplus
extern "C" {
#endif
u16_t inet_chksum(void *data, u16_t len);
u16_t inet_chksum_pbuf(struct pbuf *p);
u16_t inet_chksum_pseudo(struct pbuf *p,
@@ -58,5 +62,9 @@ u32_t ntohl(u32_t n);
#endif /* _NETINET_IN_H */
#endif /* _MACHINE_ENDIAN_H_ */
#ifdef __cplusplus
}
#endif
#endif /* __LWIP_INET_H__ */

View File

@@ -39,6 +39,10 @@
#include "lwip/err.h"
#ifdef __cplusplus
extern "C" {
#endif
#define IP_HLEN 40
#define IP_PROTO_ICMP 58
@@ -104,6 +108,10 @@ err_t ip_output_if(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
void ip_debug_print(struct pbuf *p);
#endif /* IP_DEBUG */
#ifdef __cplusplus
}
#endif
#endif /* __LWIP_IP_H__ */

View File

@@ -34,6 +34,10 @@
#include "lwip/arch.h"
#ifdef __cplusplus
extern "C" {
#endif
#define IP_ADDR_ANY 0
#ifdef PACK_STRUCT_USE_INCLUDES
@@ -86,4 +90,8 @@ u8_t ip_addr_isany(struct ip_addr *addr);
(ntohl(ipaddr->addr[3]) >> 16) & 0xffff, \
ntohl(ipaddr->addr[3]) & 0xffff));
#ifdef __cplusplus
}
#endif
#endif /* __LWIP_IP_ADDR_H__ */