diff --git a/src/include/lwip/apps/altcp_proxyconnect.h b/src/include/lwip/apps/altcp_proxyconnect.h index 2dd1d919..65d31279 100644 --- a/src/include/lwip/apps/altcp_proxyconnect.h +++ b/src/include/lwip/apps/altcp_proxyconnect.h @@ -47,6 +47,10 @@ #include "lwip/ip_addr.h" +#ifdef __cplusplus +extern "C" { +#endif + struct altcp_proxyconnect_config { ip_addr_t proxy_addr; u16_t proxy_port; @@ -67,5 +71,9 @@ struct altcp_proxyconnect_tls_config { struct altcp_pcb *altcp_proxyconnect_tls_alloc(void *arg, u8_t ip_type); #endif /* LWIP_ALTCP_TLS */ +#ifdef __cplusplus +} +#endif + #endif /* LWIP_ALTCP */ #endif /* LWIP_HDR_APPS_ALTCP_PROXYCONNECT_H */ diff --git a/src/include/lwip/apps/mdns.h b/src/include/lwip/apps/mdns.h index 32df511a..20d7ee2a 100644 --- a/src/include/lwip/apps/mdns.h +++ b/src/include/lwip/apps/mdns.h @@ -41,6 +41,10 @@ #include "lwip/apps/mdns_opts.h" #include "lwip/netif.h" +#ifdef __cplusplus +extern "C" { +#endif + #if LWIP_MDNS_RESPONDER enum mdns_sd_proto { @@ -94,4 +98,8 @@ void mdns_resp_announce(struct netif *netif); #endif /* LWIP_MDNS_RESPONDER */ +#ifdef __cplusplus +} +#endif + #endif /* LWIP_HDR_APPS_MDNS_H */ diff --git a/src/include/lwip/apps/mdns_priv.h b/src/include/lwip/apps/mdns_priv.h index 8ee6db86..9635b5b1 100644 --- a/src/include/lwip/apps/mdns_priv.h +++ b/src/include/lwip/apps/mdns_priv.h @@ -40,6 +40,10 @@ #include "lwip/apps/mdns_opts.h" #include "lwip/pbuf.h" +#ifdef __cplusplus +extern "C" { +#endif + #if LWIP_MDNS_RESPONDER /* Domain struct and methods - visible for unit tests */ @@ -63,4 +67,8 @@ u16_t mdns_compress_domain(struct pbuf *pbuf, u16_t *offset, struct mdns_domain #endif /* LWIP_MDNS_RESPONDER */ +#ifdef __cplusplus +} +#endif + #endif /* LWIP_HDR_MDNS_PRIV_H */ diff --git a/src/include/lwip/apps/netbiosns.h b/src/include/lwip/apps/netbiosns.h index c9f68d8d..a326d33b 100644 --- a/src/include/lwip/apps/netbiosns.h +++ b/src/include/lwip/apps/netbiosns.h @@ -34,10 +34,18 @@ #include "lwip/apps/netbiosns_opts.h" +#ifdef __cplusplus +extern "C" { +#endif + void netbiosns_init(void); #ifndef NETBIOS_LWIP_NAME void netbiosns_set_name(const char* hostname); #endif void netbiosns_stop(void); +#ifdef __cplusplus +} +#endif + #endif /* LWIP_HDR_APPS_NETBIOS_H */ diff --git a/src/include/lwip/apps/smtp.h b/src/include/lwip/apps/smtp.h index 456b226b..fb4a4a7c 100644 --- a/src/include/lwip/apps/smtp.h +++ b/src/include/lwip/apps/smtp.h @@ -1,6 +1,10 @@ #ifndef LWIP_HDR_APPS_SMTP_H #define LWIP_HDR_APPS_SMTP_H +#ifdef __cplusplus +extern "C" { +#endif + #include "lwip/apps/smtp_opts.h" #include "lwip/err.h" #include "lwip/prot/iana.h" @@ -117,4 +121,8 @@ void smtp_send_mail_int(void *arg); const char* smtp_result_str(u8_t smtp_result); #endif +#ifdef __cplusplus +} +#endif + #endif /* LWIP_HDR_APPS_SMTP_H */ diff --git a/src/include/lwip/apps/smtp_opts.h b/src/include/lwip/apps/smtp_opts.h index 0c56a9f0..bc743f67 100644 --- a/src/include/lwip/apps/smtp_opts.h +++ b/src/include/lwip/apps/smtp_opts.h @@ -72,7 +72,7 @@ extern "C" { /** * @} */ - + #ifdef __cplusplus } #endif diff --git a/src/include/lwip/apps/snmpv3.h b/src/include/lwip/apps/snmpv3.h index ef92724d..e0dda649 100644 --- a/src/include/lwip/apps/snmpv3.h +++ b/src/include/lwip/apps/snmpv3.h @@ -38,23 +38,27 @@ #include "lwip/apps/snmp_opts.h" #include "lwip/err.h" +#ifdef __cplusplus +extern "C" { +#endif + #if LWIP_SNMP && LWIP_SNMP_V3 -typedef enum +typedef enum { SNMP_V3_AUTH_ALGO_INVAL = 0, SNMP_V3_AUTH_ALGO_MD5 = 1, SNMP_V3_AUTH_ALGO_SHA = 2 } snmpv3_auth_algo_t; -typedef enum +typedef enum { SNMP_V3_PRIV_ALGO_INVAL = 0, SNMP_V3_PRIV_ALGO_DES = 1, SNMP_V3_PRIV_ALGO_AES = 2 } snmpv3_priv_algo_t; -typedef enum +typedef enum { SNMP_V3_USER_STORAGETYPE_OTHER = 1, SNMP_V3_USER_STORAGETYPE_VOLATILE = 2, @@ -103,4 +107,8 @@ void snmpv3_password_to_key_sha( #endif +#ifdef __cplusplus +} +#endif + #endif /* LWIP_HDR_APPS_SNMP_V3_H */ diff --git a/src/include/lwip/dhcp6.h b/src/include/lwip/dhcp6.h index a262db85..5cc4a015 100644 --- a/src/include/lwip/dhcp6.h +++ b/src/include/lwip/dhcp6.h @@ -47,6 +47,10 @@ #include "lwip/err.h" #include "lwip/netif.h" +#ifdef __cplusplus +extern "C" { +#endif + /** period (in milliseconds) of the application calling dhcp6_tmr() */ #define DHCP6_TIMER_MSECS 500 @@ -91,6 +95,10 @@ extern void dhcp6_set_ntp_servers(u8_t num_ntp_servers, const ip_addr_t* ntp_ser #define netif_dhcp6_data(netif) ((struct dhcp6*)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP6)) +#ifdef __cplusplus +} +#endif + #endif /* LWIP_IPV6_DHCP6 */ #endif /* LWIP_HDR_IP6_DHCP6_H */ diff --git a/src/include/lwip/ip6_zone.h b/src/include/lwip/ip6_zone.h index 92074a24..525790e6 100644 --- a/src/include/lwip/ip6_zone.h +++ b/src/include/lwip/ip6_zone.h @@ -85,6 +85,10 @@ #ifndef LWIP_HDR_IP6_ZONE_H #define LWIP_HDR_IP6_ZONE_H +#ifdef __cplusplus +extern "C" { +#endif + /** * @defgroup ip6_zones IPv6 Zones * @ingroup ip6 @@ -293,4 +297,8 @@ enum lwip_ipv6_scope_type #endif /* LWIP_IPV6 */ +#ifdef __cplusplus +} +#endif + #endif /* LWIP_HDR_IP6_ZONE_H */ diff --git a/src/include/lwip/prot/iana.h b/src/include/lwip/prot/iana.h index b1b7f42b..32890ccc 100644 --- a/src/include/lwip/prot/iana.h +++ b/src/include/lwip/prot/iana.h @@ -41,6 +41,10 @@ #ifndef LWIP_HDR_PROT_IANA_H #define LWIP_HDR_PROT_IANA_H +#ifdef __cplusplus +extern "C" { +#endif + /** * @ingroup iana * Hardware types @@ -86,4 +90,8 @@ enum lwip_iana_port_number { LWIP_IANA_PORT_SECURE_MQTT = 8883 }; +#ifdef __cplusplus +} +#endif + #endif /* LWIP_HDR_PROT_IANA_H */ diff --git a/src/include/lwip/prot/ieee.h b/src/include/lwip/prot/ieee.h index 9ccbc9d4..abbb9e31 100644 --- a/src/include/lwip/prot/ieee.h +++ b/src/include/lwip/prot/ieee.h @@ -41,6 +41,10 @@ #ifndef LWIP_HDR_PROT_IEEE_H #define LWIP_HDR_PROT_IEEE_H +#ifdef __cplusplus +extern "C" { +#endif + /** * @ingroup ieee * A list of often ethtypes (although lwIP does not use all of them). @@ -80,4 +84,8 @@ enum lwip_ieee_eth_type { ETHTYPE_QINQ = 0x9100U }; +#ifdef __cplusplus +} +#endif + #endif /* LWIP_HDR_PROT_IEEE_H */ diff --git a/src/include/lwip/prot/ip.h b/src/include/lwip/prot/ip.h index bbfae367..223158f5 100644 --- a/src/include/lwip/prot/ip.h +++ b/src/include/lwip/prot/ip.h @@ -39,6 +39,10 @@ #include "lwip/arch.h" +#ifdef __cplusplus +extern "C" { +#endif + #define IP_PROTO_ICMP 1 #define IP_PROTO_IGMP 2 #define IP_PROTO_UDP 17 @@ -48,4 +52,8 @@ /** This operates on a void* by loading the first byte */ #define IP_HDR_GET_VERSION(ptr) ((*(u8_t*)(ptr)) >> 4) +#ifdef __cplusplus +} +#endif + #endif /* LWIP_HDR_PROT_IP_H */ diff --git a/src/include/lwip/prot/ip6.h b/src/include/lwip/prot/ip6.h index 996bcca3..0f6de455 100644 --- a/src/include/lwip/prot/ip6.h +++ b/src/include/lwip/prot/ip6.h @@ -43,7 +43,7 @@ #ifdef __cplusplus extern "C" { #endif - + /** This is the packed version of ip6_addr_t, used in network headers that are itself packed */ #ifdef PACK_STRUCT_USE_INCLUDES diff --git a/src/include/netif/bridgeif.h b/src/include/netif/bridgeif.h index 2240dded..f4f8cf14 100644 --- a/src/include/netif/bridgeif.h +++ b/src/include/netif/bridgeif.h @@ -42,6 +42,10 @@ #include "lwip/err.h" #include "lwip/prot/ethernet.h" +#ifdef __cplusplus +extern "C" { +#endif + struct netif; #if (BRIDGEIF_MAX_PORTS < 0) || (BRIDGEIF_MAX_PORTS >= 64) @@ -116,4 +120,8 @@ void* bridgeif_fdb_init(u16_t max_fdb_entries); #define BRIDGEIF_WRITE_UNPROTECT(lev) #endif /* BRIDGEIF_PORT_NETIFS_OUTPUT_DIRECT */ +#ifdef __cplusplus +} +#endif + #endif /* LWIP_HDR_NETIF_BRIDGEIF_H */ diff --git a/src/include/netif/ieee802154.h b/src/include/netif/ieee802154.h index bd129a0b..54e019fd 100644 --- a/src/include/netif/ieee802154.h +++ b/src/include/netif/ieee802154.h @@ -39,6 +39,10 @@ #include "lwip/opt.h" +#ifdef __cplusplus +extern "C" { +#endif + #ifdef PACK_STRUCT_USE_INCLUDES # include "arch/bpstruct.h" #endif @@ -101,5 +105,8 @@ PACK_STRUCT_END #define IEEE_802154_FC_SRC_ADDR_MODE_SHORT (IEEE_802154_ADDR_MODE_SHORT << 14) #define IEEE_802154_FC_SRC_ADDR_MODE_EXT (IEEE_802154_ADDR_MODE_EXT << 14) +#ifdef __cplusplus +} +#endif #endif /* LWIP_HDR_NETIF_IEEE802154_H */