mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-02-04 21:39:49 +00:00
add 'extern "C" {}' for cplusplus in ppp headers
This commit is contained in:
parent
b5b31d86b2
commit
c3d8b1ca80
@ -36,6 +36,10 @@
|
||||
#ifndef CCP_H
|
||||
#define CCP_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* CCP codes.
|
||||
*/
|
||||
@ -152,5 +156,9 @@ extern const struct protent ccp_protent;
|
||||
|
||||
void ccp_resetrequest(ppp_pcb *pcb); /* Issue a reset-request. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CCP_H */
|
||||
#endif /* PPP_SUPPORT && CCP_SUPPORT */
|
||||
|
@ -36,6 +36,10 @@
|
||||
|
||||
#include "ppp.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* CHAP packets begin with a standard header with code, id, len (2 bytes).
|
||||
*/
|
||||
@ -188,5 +192,9 @@ extern void chap_auth_with_peer(ppp_pcb *pcb, const char *our_name, int digest_c
|
||||
/* Represents the CHAP protocol to the main pppd code */
|
||||
extern const struct protent chap_protent;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CHAP_H */
|
||||
#endif /* PPP_SUPPORT && CHAP_SUPPORT */
|
||||
|
@ -34,6 +34,13 @@
|
||||
#include "netif/ppp/ppp_opts.h"
|
||||
#if PPP_SUPPORT && ECP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||
|
||||
#ifndef ECP_H
|
||||
#define ECP_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct ecp_options {
|
||||
bool required; /* Is ECP required? */
|
||||
unsigned enctype; /* Encryption type */
|
||||
@ -47,4 +54,9 @@ extern ecp_options ecp_hisoptions[];
|
||||
|
||||
extern const struct protent ecp_protent;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ECP_H */
|
||||
#endif /* PPP_SUPPORT && ECP_SUPPORT */
|
||||
|
@ -41,6 +41,10 @@
|
||||
#ifndef EUI64_H
|
||||
#define EUI64_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* @todo:
|
||||
*
|
||||
@ -90,5 +94,9 @@ typedef union
|
||||
|
||||
char *eui64_ntoa(eui64_t); /* Returns ascii representation of id */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EUI64_H */
|
||||
#endif /* PPP_SUPPORT && PPP_IPV6_SUPPORT */
|
||||
|
@ -50,6 +50,10 @@
|
||||
|
||||
#include "ppp.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Packet header = Code, id, length.
|
||||
*/
|
||||
@ -170,6 +174,9 @@ void fsm_input(fsm *f, u_char *inpacket, int l);
|
||||
void fsm_protreject(fsm *f);
|
||||
void fsm_sdata(fsm *f, u_char code, u_char id, const u_char *data, int datalen);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FSM_H */
|
||||
#endif /* PPP_SUPPORT */
|
||||
|
@ -48,6 +48,10 @@
|
||||
#ifndef IPCP_H
|
||||
#define IPCP_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Options.
|
||||
*/
|
||||
@ -122,5 +126,9 @@ char *ip_ntoa (u32_t);
|
||||
|
||||
extern const struct protent ipcp_protent;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* IPCP_H */
|
||||
#endif /* PPP_SUPPORT && PPP_IPV4_SUPPORT */
|
||||
|
@ -146,6 +146,10 @@
|
||||
|
||||
#include "eui64.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Options.
|
||||
*/
|
||||
@ -179,5 +183,9 @@ typedef struct ipv6cp_options {
|
||||
|
||||
extern const struct protent ipv6cp_protent;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* IPV6CP_H */
|
||||
#endif /* PPP_SUPPORT && PPP_IPV6_SUPPORT */
|
||||
|
@ -50,6 +50,10 @@
|
||||
|
||||
#include "ppp.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Options.
|
||||
*/
|
||||
@ -167,5 +171,9 @@ extern const struct protent lcp_protent;
|
||||
#define DEFLOOPBACKFAIL 10
|
||||
#endif /* moved to ppp_opts.h */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LCP_H */
|
||||
#endif /* PPP_SUPPORT */
|
||||
|
@ -80,6 +80,10 @@
|
||||
#ifndef MAGIC_H
|
||||
#define MAGIC_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***********************
|
||||
*** PUBLIC FUNCTIONS ***
|
||||
***********************/
|
||||
@ -117,6 +121,10 @@ void magic_random_bytes(unsigned char *buf, u32_t buf_len);
|
||||
*/
|
||||
u32_t magic_pow(u8_t pow);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MAGIC_H */
|
||||
|
||||
#endif /* PPP_SUPPORT */
|
||||
|
@ -41,6 +41,10 @@
|
||||
|
||||
#include "netif/ppp/pppcrypt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MPPE_PAD 4 /* MPPE growth per frame */
|
||||
#define MPPE_MAX_KEY_LEN 16 /* largest key length (128-bit) */
|
||||
|
||||
@ -169,5 +173,9 @@ err_t mppe_compress(ppp_pcb *pcb, ppp_mppe_state *state, struct pbuf **pb, u16_t
|
||||
void mppe_decomp_reset(ppp_pcb *pcb, ppp_mppe_state *state);
|
||||
err_t mppe_decompress(ppp_pcb *pcb, ppp_mppe_state *state, struct pbuf **pb);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MPPE_H */
|
||||
#endif /* PPP_SUPPORT && MPPE_SUPPORT */
|
||||
|
@ -47,6 +47,10 @@
|
||||
#include "lwip/ip6_addr.h"
|
||||
#endif /* PPP_IPV6_SUPPORT */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Disable non-working or rarely used PPP feature, so rarely that we don't want to bloat ppp_opts.h with them */
|
||||
#ifndef PPP_OPTIONS
|
||||
#define PPP_OPTIONS 0
|
||||
@ -685,6 +689,10 @@ err_t ppp_ioctl(ppp_pcb *pcb, u8_t cmd, void *arg);
|
||||
#define ppp_set_netif_linkcallback(ppp, link_cb) \
|
||||
netif_set_link_callback(ppp->netif, link_cb);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* PPP_H */
|
||||
|
||||
#endif /* PPP_SUPPORT */
|
||||
|
@ -53,6 +53,10 @@
|
||||
#include "ppp.h"
|
||||
#include "pppdebug.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Memory used for control packets.
|
||||
*
|
||||
@ -710,5 +714,9 @@ void ppp_dump_packet(ppp_pcb *pcb, const char *tag, unsigned char *p, int len);
|
||||
* 1 + PPP_IPV4_SUPPORT + PPP_IPV6_SUPPORT + CCP_SUPPORT
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* PPP_SUPPORT */
|
||||
#endif /* LWIP_HDR_PPP_IMPL_H */
|
||||
|
@ -44,6 +44,10 @@
|
||||
*/
|
||||
#include "lwip/arch.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Map hashes and ciphers functions to PolarSSL
|
||||
*/
|
||||
@ -131,6 +135,10 @@
|
||||
|
||||
void pppcrypt_56_to_64_bit_key(u_char *key, u_char *des_key);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* PPPCRYPT_H */
|
||||
|
||||
#endif /* PPP_SUPPORT */
|
||||
|
@ -40,6 +40,10 @@
|
||||
#ifndef PPPDEBUG_H
|
||||
#define PPPDEBUG_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Trace levels. */
|
||||
#define LOG_CRITICAL (PPP_DEBUG | LWIP_DBG_LEVEL_SEVERE)
|
||||
#define LOG_ERR (PPP_DEBUG | LWIP_DBG_LEVEL_SEVERE)
|
||||
@ -75,6 +79,10 @@
|
||||
|
||||
#endif /* PPP_DEBUG */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* PPPDEBUG_H */
|
||||
|
||||
#endif /* PPP_SUPPORT */
|
||||
|
@ -76,6 +76,10 @@
|
||||
#include "ppp.h"
|
||||
#include "lwip/etharp.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef PACK_STRUCT_USE_INCLUDES
|
||||
# include "arch/bpstruct.h"
|
||||
#endif
|
||||
@ -174,6 +178,10 @@ ppp_pcb *pppoe_create(struct netif *pppif,
|
||||
void pppoe_disc_input(struct netif *netif, struct pbuf *p);
|
||||
void pppoe_data_input(struct netif *netif, struct pbuf *p);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* PPP_OE_H */
|
||||
|
||||
#endif /* PPP_SUPPORT && PPPOE_SUPPORT */
|
||||
|
@ -39,6 +39,10 @@
|
||||
|
||||
#include "ppp.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Timeout */
|
||||
#define PPPOL2TP_CONTROL_TIMEOUT (5*1000) /* base for quick timeout calculation */
|
||||
#define PPPOL2TP_SLOW_RETRY (60*1000) /* persistent retry interval */
|
||||
@ -197,5 +201,9 @@ ppp_pcb *pppol2tp_create(struct netif *pppif,
|
||||
const u8_t *secret, u8_t secret_len,
|
||||
ppp_link_status_cb_fn link_status_cb, void *ctx_cb);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* PPPOL2TP_H */
|
||||
#endif /* PPP_SUPPORT && PPPOL2TP_SUPPORT */
|
||||
|
@ -42,6 +42,10 @@
|
||||
#include "ppp.h"
|
||||
#include "vj.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* PPP packet parser states. Current state indicates operation yet to be
|
||||
* completed. */
|
||||
enum {
|
||||
@ -114,5 +118,9 @@ void pppos_input(ppp_pcb *ppp, u8_t* data, int len);
|
||||
err_t pppos_input_sys(struct pbuf *p, struct netif *inp);
|
||||
#endif /* !NO_SYS && !PPP_INPROC_IRQ_SAFE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* PPPOS_H */
|
||||
#endif /* PPP_SUPPORT && PPPOL2TP_SUPPORT */
|
||||
|
@ -50,6 +50,10 @@
|
||||
|
||||
#include "ppp.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Packet header = Code, id, length.
|
||||
*/
|
||||
@ -119,5 +123,9 @@ void upap_authpeer(ppp_pcb *pcb);
|
||||
|
||||
extern const struct protent pap_protent;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* UPAP_H */
|
||||
#endif /* PPP_SUPPORT && PAP_SUPPORT */
|
||||
|
@ -31,6 +31,10 @@
|
||||
#include "lwip/ip.h"
|
||||
#include "lwip/priv/tcp_priv.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MAX_SLOTS 16 /* must be > 2 and < 256 */
|
||||
#define MAX_HDR 128
|
||||
|
||||
@ -156,6 +160,10 @@ extern void vj_uncompress_err (struct vjcompress *comp);
|
||||
extern int vj_uncompress_uncomp(struct pbuf *nb, struct vjcompress *comp);
|
||||
extern int vj_uncompress_tcp (struct pbuf **nb, struct vjcompress *comp);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* VJ_H */
|
||||
|
||||
#endif /* PPP_SUPPORT && VJ_SUPPORT */
|
||||
|
Loading…
x
Reference in New Issue
Block a user