mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-30 03:32:50 +00:00
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:
parent
255d5a748f
commit
84fc489e0c
@ -22,7 +22,14 @@ HISTORY
|
||||
* [Enter new changes just after this line - do not remove this line]
|
||||
|
||||
++ New features:
|
||||
2007-05-08 Simon Goldschmidt
|
||||
2007-05-10 Simon Goldschmidt
|
||||
* *.h (except netif/ppp/*.h): 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.
|
||||
|
||||
2007-05-09 Simon Goldschmidt
|
||||
* opt.h, *.c/*.h: Included patch #5920: Create define to override C-library
|
||||
memcpy. 2 Defines are created: MEMCPY() for normal memcpy, SMEMCPY() for
|
||||
situations where some compilers might inline the copy and save a function
|
||||
|
@ -40,6 +40,10 @@
|
||||
#include "lwip/ip_addr.h"
|
||||
#include "lwip/netif.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ICMP_ER 0 /* echo reply */
|
||||
#define ICMP_DUR 3 /* destination unreachable */
|
||||
#define ICMP_SQ 4 /* source quench */
|
||||
@ -108,5 +112,9 @@ PACK_STRUCT_END
|
||||
#define ICMPH_TYPE_SET(hdr, type) ((hdr)->_type_code = htons(ICMPH_CODE(hdr) | ((type) << 8)))
|
||||
#define ICMPH_CODE_SET(hdr, code) ((hdr)->_type_code = htons((code) | (ICMPH_TYPE(hdr) << 8)))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LWIP_ICMP_H__ */
|
||||
|
||||
|
@ -38,6 +38,10 @@
|
||||
/* IGMP support available? */
|
||||
#if defined(LWIP_IGMP) && (LWIP_IGMP > 0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Some routers are not happy with ROUTER ALERT make it defineable, 1 to enable */
|
||||
#define USE_ROUTER_ALERT 0
|
||||
|
||||
@ -143,6 +147,10 @@ err_t igmp_ip_output_if( struct pbuf *p, struct ip_addr *src, struct ip_addr *d
|
||||
|
||||
void igmp_send( struct igmp_group *group, u8_t type);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LWIP_IGMP */
|
||||
|
||||
#endif /* IGMPH */
|
||||
|
@ -38,6 +38,10 @@
|
||||
#include "lwip/pbuf.h"
|
||||
#include "lwip/ip_addr.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
u16_t inet_chksum(void *dataptr, u16_t len);
|
||||
#if 0 /* optimized routine */
|
||||
u16_t inet_chksum4(u8_t *dataptr, u16_t len);
|
||||
@ -80,19 +84,23 @@ char *inet_ntoa(struct in_addr addr); /* returns ptr to static buffer; not reent
|
||||
#define ntohs lwip_ntohs
|
||||
#define htonl lwip_htonl
|
||||
#define ntohl lwip_ntohl
|
||||
#endif
|
||||
#endif /* LWIP_PREFIX_BYTEORDER_FUNCS */
|
||||
#if LWIP_PLATFORM_BYTESWAP
|
||||
#define htons(x) LWIP_PLATFORM_HTONS(x)
|
||||
#define ntohs(x) LWIP_PLATFORM_HTONS(x)
|
||||
#define htonl(x) LWIP_PLATFORM_HTONL(x)
|
||||
#define ntohl(x) LWIP_PLATFORM_HTONL(x)
|
||||
#else
|
||||
#else /* LWIP_PLATFORM_BYTESWAP */
|
||||
u16_t htons(u16_t x);
|
||||
u16_t ntohs(u16_t x);
|
||||
u32_t htonl(u32_t x);
|
||||
u32_t ntohl(u32_t x);
|
||||
#endif
|
||||
#endif /* LWIP_PLATFORM_BYTESWAP */
|
||||
|
||||
#endif /* BYTE_ORDER == BIG_ENDIAN */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LWIP_INET_H__ */
|
||||
|
@ -41,6 +41,10 @@
|
||||
#include "lwip/err.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void ip_init(void);
|
||||
struct netif *ip_route(struct ip_addr *dest);
|
||||
err_t ip_input(struct pbuf *p, struct netif *inp);
|
||||
@ -149,6 +153,10 @@ void ip_debug_print(struct pbuf *p);
|
||||
#define ip_debug_print(p)
|
||||
#endif /* IP_DEBUG */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LWIP_IP_H__ */
|
||||
|
||||
|
||||
|
@ -34,6 +34,10 @@
|
||||
|
||||
#include "lwip/arch.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef PACK_STRUCT_USE_INCLUDES
|
||||
# include "arch/bpstruct.h"
|
||||
#endif
|
||||
@ -157,4 +161,8 @@ u8_t ip_addr_isbroadcast(struct ip_addr *, struct netif *);
|
||||
#define ip4_addr3(ipaddr) ((u16_t)(ntohl((ipaddr)->addr) >> 8) & 0xff)
|
||||
#define ip4_addr4(ipaddr) ((u16_t)(ntohl((ipaddr)->addr)) & 0xff)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LWIP_IP_ADDR_H__ */
|
||||
|
@ -41,6 +41,10 @@
|
||||
|
||||
#if (IP_FRAG || IP_REASSEMBLY)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* The IP timer interval in milliseconds. */
|
||||
#define IP_TMR_INTERVAL 1000
|
||||
|
||||
@ -49,6 +53,10 @@ void ip_reass_tmr(void);
|
||||
struct pbuf * ip_reass(struct pbuf *p);
|
||||
err_t ip_frag(struct pbuf *p, struct netif *netif, struct ip_addr *dest);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* IP_FRAG || IP_REASSEMBLY */
|
||||
|
||||
#endif /* __LWIP_IP_FRAG_H__ */
|
||||
|
@ -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__ */
|
||||
|
||||
|
@ -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__ */
|
||||
|
||||
|
@ -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__ */
|
||||
|
||||
|
||||
|
@ -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__ */
|
||||
|
@ -44,6 +44,10 @@
|
||||
|
||||
#include "lwip/err.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define NETCONN_NOCOPY 0x00
|
||||
#define NETCONN_COPY 0x01
|
||||
|
||||
@ -173,6 +177,8 @@ err_t netconn_join_leave_group (struct netconn *conn,
|
||||
|
||||
err_t netconn_err (struct netconn *conn);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LWIP_API_H__ */
|
||||
|
||||
|
||||
|
@ -43,6 +43,10 @@
|
||||
|
||||
#include "lwip/api.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum api_msg_type {
|
||||
API_MSG_NEWCONN,
|
||||
API_MSG_DELCONN,
|
||||
@ -94,5 +98,8 @@ struct api_msg {
|
||||
void api_msg_input(struct api_msg *msg);
|
||||
err_t api_msg_post(struct api_msg *msg);
|
||||
|
||||
#endif /* __LWIP_API_MSG_H__ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LWIP_API_MSG_H__ */
|
||||
|
@ -42,6 +42,10 @@
|
||||
|
||||
#include "arch/cc.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef PACK_STRUCT_BEGIN
|
||||
#define PACK_STRUCT_BEGIN
|
||||
#endif /* PACK_STRUCT_BEGIN */
|
||||
@ -217,4 +221,8 @@ extern int errno;
|
||||
|
||||
#endif /* LWIP_PROVIDE_ERRNO */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LWIP_ARCH_H__ */
|
||||
|
@ -8,6 +8,10 @@
|
||||
#include "lwip/netif.h"
|
||||
#include "lwip/udp.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** period (in seconds) of the application calling dhcp_coarse_tmr() */
|
||||
#define DHCP_COARSE_TIMER_SECS 60
|
||||
/** period (in milliseconds) of the application calling dhcp_fine_tmr() */
|
||||
@ -221,4 +225,8 @@ void dhcp_fine_tmr(void);
|
||||
#define DHCP_OVERLOAD_SNAME 2
|
||||
#define DHCP_OVERLOAD_SNAME_FILE 3
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*__LWIP_DHCP_H__*/
|
||||
|
@ -36,6 +36,10 @@
|
||||
|
||||
#include "arch/cc.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef s8_t err_t;
|
||||
|
||||
/* Definitions for error constants. */
|
||||
@ -69,4 +73,9 @@ extern const char *lwip_strerr(err_t err);
|
||||
#else
|
||||
#define lwip_strerr(x) ""
|
||||
#endif /* LWIP_DEBUG */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LWIP_ERR_H__ */
|
||||
|
@ -35,6 +35,10 @@
|
||||
#include "lwip/opt.h"
|
||||
#include "lwip/arch.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if MEM_SIZE > 64000l
|
||||
typedef u32_t mem_size_t;
|
||||
#define MEM_SIZE_F U32_F
|
||||
@ -74,5 +78,8 @@ void *mem_realloc(void *mem, mem_size_t size);
|
||||
#define MEM_ALIGN(addr) ((void *)(((mem_ptr_t)(addr) + MEM_ALIGNMENT - 1) & ~(mem_ptr_t)(MEM_ALIGNMENT-1)))
|
||||
#endif
|
||||
|
||||
#endif /* __LWIP_MEM_H__ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LWIP_MEM_H__ */
|
||||
|
@ -35,6 +35,10 @@
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* If you change this enum, think to update memp_names in stats_display (stats.c) */
|
||||
typedef enum {
|
||||
MEMP_PBUF,
|
||||
@ -60,5 +64,8 @@ void memp_init(void);
|
||||
void *memp_malloc(memp_t type);
|
||||
void memp_free(memp_t type, void *mem);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LWIP_MEMP_H__ */
|
||||
|
||||
|
@ -44,6 +44,10 @@
|
||||
# include "lwip/dhcp.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** must be the maximum of all used hardware address lengths
|
||||
across all types of interfaces in use */
|
||||
#define NETIF_MAX_HWADDR_LEN 6U
|
||||
@ -183,4 +187,8 @@ u8_t netif_is_up(struct netif *netif);
|
||||
void netif_set_status_callback( struct netif *netif, void (* status_callback)(struct netif *netif ));
|
||||
#endif /* LWIP_NETIF_CALLBACK */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LWIP_NETIF_H__ */
|
||||
|
@ -35,6 +35,10 @@
|
||||
|
||||
#if LWIP_NETIF_API
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum netifapi_msg_type {
|
||||
NETIFAPI_MSG_NETIF_ADD,
|
||||
NETIFAPI_MSG_NETIF_REMOVE,
|
||||
@ -82,6 +86,10 @@ err_t netifapi_dhcp_stop ( struct netif *netif);
|
||||
void netifapi_msg_input(struct netifapi_msg *msg);
|
||||
err_t netifapi_msg_post (struct netifapi_msg *msg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LWIP_NETIF_API */
|
||||
|
||||
#endif /* __LWIP_NETIFAPI_H__ */
|
||||
|
@ -36,6 +36,10 @@
|
||||
#include "arch/cc.h"
|
||||
#include "lwip/err.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define PBUF_TRANSPORT_HLEN 20
|
||||
#define PBUF_IP_HLEN 20
|
||||
|
||||
@ -110,4 +114,8 @@ struct pbuf *pbuf_dechain(struct pbuf *p);
|
||||
err_t pbuf_copy(struct pbuf *p_to, struct pbuf *p_from);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LWIP_PBUF_H__ */
|
||||
|
@ -38,6 +38,10 @@
|
||||
#include "lwip/inet.h"
|
||||
#include "lwip/ip.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct raw_pcb {
|
||||
/* Common members of all PCB types */
|
||||
IP_PCB;
|
||||
@ -70,5 +74,8 @@ err_t raw_send (struct raw_pcb *pcb, struct pbuf *p);
|
||||
u8_t raw_input (struct pbuf *p, struct netif *inp);
|
||||
void raw_init (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LWIP_RAW_H__ */
|
||||
|
@ -34,6 +34,10 @@
|
||||
|
||||
#include "arch/cc.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __sio_fd_t_defined
|
||||
typedef void * sio_fd_t;
|
||||
#endif
|
||||
@ -61,3 +65,7 @@ u32_t sio_write(sio_fd_t, u8_t *, u32_t);
|
||||
#ifndef sio_read_abort
|
||||
void sio_read_abort(sio_fd_t);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -37,6 +37,10 @@
|
||||
#include "lwip/netif.h"
|
||||
#include "lwip/udp.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* SNMP support available? */
|
||||
#if defined(LWIP_SNMP) && (LWIP_SNMP > 0)
|
||||
|
||||
@ -310,4 +314,8 @@ void snmp_get_snmpenableauthentraps(u8_t *value);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LWIP_SNMP_H__ */
|
||||
|
@ -41,6 +41,10 @@
|
||||
#include "lwip/pbuf.h"
|
||||
#include "lwip/snmp.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SNMP_ASN1_UNIV (!0x80 | !0x40)
|
||||
#define SNMP_ASN1_APPLIC (!0x80 | 0x40)
|
||||
#define SNMP_ASN1_CONTXT ( 0x80 | !0x40)
|
||||
@ -87,4 +91,8 @@ err_t snmp_asn1_enc_s32t(struct pbuf *p, u16_t ofs, u8_t octets_needed, s32_t va
|
||||
err_t snmp_asn1_enc_oid(struct pbuf *p, u16_t ofs, u8_t ident_len, s32_t *ident);
|
||||
err_t snmp_asn1_enc_raw(struct pbuf *p, u16_t ofs, u8_t raw_len, u8_t *raw);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -44,6 +44,10 @@
|
||||
#include "private_mib.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* The listen port of the SNMP agent. Clients have to make their requests to
|
||||
this port. Most standard clients won't work if you change this! */
|
||||
#ifndef SNMP_IN_PORT
|
||||
@ -297,4 +301,8 @@ err_t snmp_send_trap(s8_t generic_trap, struct snmp_obj_id *eoid, s32_t specific
|
||||
void snmp_coldstart_trap(void);
|
||||
void snmp_authfail_trap(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -47,6 +47,10 @@
|
||||
#include "private_mib.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* MIB object instance */
|
||||
#define MIB_OBJECT_NONE 0
|
||||
#define MIB_OBJECT_SCALAR 1
|
||||
@ -249,5 +253,9 @@ struct mib_node* snmp_expand_tree(struct mib_node *node, u8_t ident_len, s32_t *
|
||||
u8_t snmp_iso_prefix_tst(u8_t ident_len, s32_t *ident);
|
||||
u8_t snmp_iso_prefix_expand(u8_t ident_len, s32_t *ident, struct snmp_obj_id *oidret);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LWIP_SNMP */
|
||||
#endif
|
||||
|
@ -33,10 +33,15 @@
|
||||
|
||||
#ifndef __LWIP_SOCKETS_H__
|
||||
#define __LWIP_SOCKETS_H__
|
||||
|
||||
#include "lwip/ip_addr.h"
|
||||
#include "opt.h"
|
||||
#include "tcp.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct sockaddr_in {
|
||||
u8_t sin_len;
|
||||
u8_t sin_family;
|
||||
@ -293,5 +298,8 @@ int lwip_ioctl(int s, long cmd, void *argp);
|
||||
|
||||
#endif /* LWIP_COMPAT_SOCKETS */
|
||||
|
||||
#endif /* __LWIP_SOCKETS_H__ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LWIP_SOCKETS_H__ */
|
||||
|
@ -38,6 +38,10 @@
|
||||
#include "lwip/mem.h"
|
||||
#include "lwip/memp.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if LWIP_STATS
|
||||
|
||||
#ifndef LWIP_STATS_LARGE
|
||||
@ -179,4 +183,8 @@ void stats_display(void);
|
||||
#define stats_display()
|
||||
#endif /* LWIP_STATS_DISPLAY */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LWIP_STATS_H__ */
|
||||
|
@ -36,6 +36,9 @@
|
||||
|
||||
#include "lwip/opt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if NO_SYS
|
||||
|
||||
@ -195,4 +198,8 @@ void sys_arch_unprotect(sys_prot_t pval);
|
||||
|
||||
#endif /* SYS_ARCH_PROTECT */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LWIP_SYS_H__ */
|
||||
|
@ -42,6 +42,10 @@
|
||||
|
||||
#include "lwip/err.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct tcp_pcb;
|
||||
|
||||
/* Functions for interfacing with TCP: */
|
||||
@ -538,7 +542,9 @@ extern struct tcp_pcb *tcp_tmp_pcb; /* Only used for temporary storage. */
|
||||
npcb->next = NULL; \
|
||||
} while(0)
|
||||
#endif /* LWIP_DEBUG */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LWIP_TCP_H__ */
|
||||
|
||||
|
||||
|
||||
|
@ -36,6 +36,10 @@
|
||||
#include "lwip/netifapi.h"
|
||||
#include "lwip/pbuf.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void tcpip_init(void (* tcpip_init_done)(void *), void *arg);
|
||||
err_t tcpip_apimsg(struct api_msg *apimsg);
|
||||
#if ETHARP_TCPIP_INPUT
|
||||
@ -82,5 +86,8 @@ struct tcpip_msg {
|
||||
} msg;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LWIP_TCPIP_H__ */
|
||||
|
@ -38,6 +38,10 @@
|
||||
#include "lwip/inet.h"
|
||||
#include "lwip/ip.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define UDP_HLEN 8
|
||||
|
||||
struct udp_hdr {
|
||||
@ -101,6 +105,9 @@ void udp_debug_print(struct udp_hdr *udphdr);
|
||||
#else
|
||||
#define udp_debug_print(udphdr)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LWIP_UDP_H__ */
|
||||
|
||||
|
||||
|
@ -41,6 +41,10 @@
|
||||
#include "lwip/netif.h"
|
||||
#include "lwip/ip.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef ETH_PAD_SIZE
|
||||
#define ETH_PAD_SIZE 0
|
||||
#endif
|
||||
@ -136,4 +140,8 @@ err_t etharp_output(struct netif *netif, struct ip_addr *ipaddr,
|
||||
err_t etharp_query(struct netif *netif, struct ip_addr *ipaddr, struct pbuf *q);
|
||||
err_t etharp_request(struct netif *netif, struct ip_addr *ipaddr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NETIF_ARP_H__ */
|
||||
|
@ -35,10 +35,18 @@
|
||||
#include "lwip/netif.h"
|
||||
#include "lwip/err.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if !LWIP_LOOPIF_MULTITHREADING
|
||||
void loopif_poll(struct netif *netif);
|
||||
#endif
|
||||
|
||||
err_t loopif_init(struct netif *netif);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __NETIF_LOOPIF_H__ */
|
||||
|
@ -36,7 +36,15 @@
|
||||
|
||||
#include "lwip/netif.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
err_t slipif_init(struct netif * netif);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user