mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-27 06:14:09 +00:00
Minor if_api.h cleanups
This commit makes the following minor cleanups: 1) Add C++ support 2) Guard header with #if LWIP_SOCKET
This commit is contained in:
parent
3a7e03aaff
commit
2cab253b34
@ -40,8 +40,15 @@
|
|||||||
#define LWIP_HDR_IF_H
|
#define LWIP_HDR_IF_H
|
||||||
|
|
||||||
#include "lwip/opt.h"
|
#include "lwip/opt.h"
|
||||||
|
|
||||||
|
#if LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#include "lwip/netif.h"
|
#include "lwip/netif.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#define IF_NAMESIZE NETIF_NAMESIZE
|
#define IF_NAMESIZE NETIF_NAMESIZE
|
||||||
|
|
||||||
char * lwip_if_indextoname(unsigned int ifindex, char *ifname);
|
char * lwip_if_indextoname(unsigned int ifindex, char *ifname);
|
||||||
@ -52,4 +59,10 @@ unsigned int lwip_if_nametoindex(const char *ifname);
|
|||||||
#define if_nametoindex(ifname) lwip_if_nametoindex(ifname)
|
#define if_nametoindex(ifname) lwip_if_nametoindex(ifname)
|
||||||
#endif /* LWIP_COMPAT_SOCKETS */
|
#endif /* LWIP_COMPAT_SOCKETS */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* LWIP_SOCKET */
|
||||||
|
|
||||||
#endif /* LWIP_HDR_IF_H */
|
#endif /* LWIP_HDR_IF_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user