mirror of https://github.com/ARMmbed/mbed-os.git
Moved PPP from lwip directory to under netsocket
Moved PPP and renamed files and constants.pull/10974/head
parent
398515a367
commit
c518319fa3
|
|
@ -82,14 +82,14 @@
|
||||||
#define PPP_FAKED_ON 1
|
#define PPP_FAKED_ON 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#include "netif/ppp/ppp.h"
|
#include "ppp.h"
|
||||||
#include "netif/ppp/pppcrypt.h"
|
#include "pppcrypt.h"
|
||||||
|
|
||||||
#if PPP_FAKED_ON && !LWIP_USE_EXTERNAL_POLARSSL && !LWIP_USE_EXTERNAL_MBEDTLS
|
#if PPP_FAKED_ON && !LWIP_USE_EXTERNAL_POLARSSL && !LWIP_USE_EXTERNAL_MBEDTLS
|
||||||
#undef LWIP_INCLUDED_POLARSSL_MD5
|
#undef LWIP_INCLUDED_POLARSSL_MD5
|
||||||
#define LWIP_INCLUDED_POLARSSL_MD5 1
|
#define LWIP_INCLUDED_POLARSSL_MD5 1
|
||||||
#include "netif/ppp/polarssl/lwip_md5.c"
|
#include "polarssl/lwip_md5.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static u8_t input[64];
|
static u8_t input[64];
|
||||||
|
|
|
||||||
|
|
@ -58,8 +58,8 @@
|
||||||
#include "lwip/mld6.h"
|
#include "lwip/mld6.h"
|
||||||
#include "lwip/api.h"
|
#include "lwip/api.h"
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
|
|
||||||
#ifndef LWIP_SKIP_PACKING_CHECK
|
#ifndef LWIP_SKIP_PACKING_CHECK
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@
|
||||||
#include "lwip/igmp.h"
|
#include "lwip/igmp.h"
|
||||||
#include "lwip/timeouts.h"
|
#include "lwip/timeouts.h"
|
||||||
/* needed by default MEMP_NUM_SYS_TIMEOUT */
|
/* needed by default MEMP_NUM_SYS_TIMEOUT */
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#include "lwip/netdb.h"
|
#include "lwip/netdb.h"
|
||||||
#include "lwip/dns.h"
|
#include "lwip/dns.h"
|
||||||
#include "lwip/priv/nd6_priv.h"
|
#include "lwip/priv/nd6_priv.h"
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#if 0 /* UNUSED */
|
#if 0 /* UNUSED */
|
||||||
|
|
@ -103,28 +103,28 @@
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#endif /* UNUSED */
|
#endif /* UNUSED */
|
||||||
|
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
|
|
||||||
#include "netif/ppp/fsm.h"
|
#include "fsm.h"
|
||||||
#include "netif/ppp/lcp.h"
|
#include "lcp.h"
|
||||||
#if CCP_SUPPORT
|
#if CCP_SUPPORT
|
||||||
#include "netif/ppp/ccp.h"
|
#include "ccp.h"
|
||||||
#endif /* CCP_SUPPORT */
|
#endif /* CCP_SUPPORT */
|
||||||
#if ECP_SUPPORT
|
#if ECP_SUPPORT
|
||||||
#include "netif/ppp/ecp.h"
|
#include "ecp.h"
|
||||||
#endif /* ECP_SUPPORT */
|
#endif /* ECP_SUPPORT */
|
||||||
#include "netif/ppp/ipcp.h"
|
#include "ipcp.h"
|
||||||
#if PAP_SUPPORT
|
#if PAP_SUPPORT
|
||||||
#include "netif/ppp/upap.h"
|
#include "upap.h"
|
||||||
#endif /* PAP_SUPPORT */
|
#endif /* PAP_SUPPORT */
|
||||||
#if CHAP_SUPPORT
|
#if CHAP_SUPPORT
|
||||||
#include "netif/ppp/chap-new.h"
|
#include "chap-new.h"
|
||||||
#endif /* CHAP_SUPPORT */
|
#endif /* CHAP_SUPPORT */
|
||||||
#if EAP_SUPPORT
|
#if EAP_SUPPORT
|
||||||
#include "netif/ppp/eap.h"
|
#include "eap.h"
|
||||||
#endif /* EAP_SUPPORT */
|
#endif /* EAP_SUPPORT */
|
||||||
#if CBCP_SUPPORT
|
#if CBCP_SUPPORT
|
||||||
#include "netif/ppp/cbcp.h"
|
#include "cbcp.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0 /* UNUSED */
|
#if 0 /* UNUSED */
|
||||||
|
|
@ -28,20 +28,20 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && CCP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && CCP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
|
|
||||||
#include "netif/ppp/fsm.h"
|
#include "fsm.h"
|
||||||
#include "netif/ppp/ccp.h"
|
#include "ccp.h"
|
||||||
|
|
||||||
#if MPPE_SUPPORT
|
#if MPPE_SUPPORT
|
||||||
#include "netif/ppp/lcp.h" /* lcp_close(), lcp_fsm */
|
#include "lcp.h" /* lcp_close(), lcp_fsm */
|
||||||
#include "netif/ppp/mppe.h" /* mppe_init() */
|
#include "mppe.h" /* mppe_init() */
|
||||||
#endif /* MPPE_SUPPORT */
|
#endif /* MPPE_SUPPORT */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#if 0 /* UNUSED */
|
#if 0 /* UNUSED */
|
||||||
|
|
@ -36,12 +36,12 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif /* UNUSED */
|
#endif /* UNUSED */
|
||||||
|
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
|
|
||||||
#include "netif/ppp/chap-new.h"
|
#include "chap-new.h"
|
||||||
#include "netif/ppp/chap-md5.h"
|
#include "chap-md5.h"
|
||||||
#include "netif/ppp/magic.h"
|
#include "magic.h"
|
||||||
#include "netif/ppp/pppcrypt.h"
|
#include "pppcrypt.h"
|
||||||
|
|
||||||
#define MD5_HASH_SIZE 16
|
#define MD5_HASH_SIZE 16
|
||||||
#define MD5_MIN_CHALLENGE 17
|
#define MD5_MIN_CHALLENGE 17
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#if 0 /* UNUSED */
|
#if 0 /* UNUSED */
|
||||||
|
|
@ -36,18 +36,18 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif /* UNUSED */
|
#endif /* UNUSED */
|
||||||
|
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
|
|
||||||
#if 0 /* UNUSED */
|
#if 0 /* UNUSED */
|
||||||
#include "session.h"
|
#include "session.h"
|
||||||
#endif /* UNUSED */
|
#endif /* UNUSED */
|
||||||
|
|
||||||
#include "netif/ppp/chap-new.h"
|
#include "chap-new.h"
|
||||||
#include "netif/ppp/chap-md5.h"
|
#include "chap-md5.h"
|
||||||
#if MSCHAP_SUPPORT
|
#if MSCHAP_SUPPORT
|
||||||
#include "netif/ppp/chap_ms.h"
|
#include "chap_ms.h"
|
||||||
#endif
|
#endif
|
||||||
#include "netif/ppp/magic.h"
|
#include "magic.h"
|
||||||
|
|
||||||
#if 0 /* UNUSED */
|
#if 0 /* UNUSED */
|
||||||
/* Hook for a plugin to validate CHAP challenge */
|
/* Hook for a plugin to validate CHAP challenge */
|
||||||
|
|
@ -74,7 +74,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && MSCHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && MSCHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#if 0 /* UNUSED */
|
#if 0 /* UNUSED */
|
||||||
|
|
@ -87,14 +87,14 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif /* UNUSED */
|
#endif /* UNUSED */
|
||||||
|
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
|
|
||||||
#include "netif/ppp/chap-new.h"
|
#include "chap-new.h"
|
||||||
#include "netif/ppp/chap_ms.h"
|
#include "chap_ms.h"
|
||||||
#include "netif/ppp/pppcrypt.h"
|
#include "pppcrypt.h"
|
||||||
#include "netif/ppp/magic.h"
|
#include "magic.h"
|
||||||
#if MPPE_SUPPORT
|
#if MPPE_SUPPORT
|
||||||
#include "netif/ppp/mppe.h" /* For mppe_sha1_pad*, mppe_set_key() */
|
#include "mppe.h" /* For mppe_sha1_pad*, mppe_set_key() */
|
||||||
#endif /* MPPE_SUPPORT */
|
#endif /* MPPE_SUPPORT */
|
||||||
|
|
||||||
#define SHA1_SIGNATURE_SIZE 20
|
#define SHA1_SIGNATURE_SIZE 20
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && DEMAND_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && DEMAND_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
@ -52,11 +52,11 @@
|
||||||
#include <pcap-bpf.h>
|
#include <pcap-bpf.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
|
|
||||||
#include "netif/ppp/fsm.h"
|
#include "fsm.h"
|
||||||
#include "netif/ppp/ipcp.h"
|
#include "ipcp.h"
|
||||||
#include "netif/ppp/lcp.h"
|
#include "lcp.h"
|
||||||
|
|
||||||
char *frame;
|
char *frame;
|
||||||
int framelen;
|
int framelen;
|
||||||
|
|
@ -43,13 +43,13 @@
|
||||||
* Based on draft-ietf-pppext-eap-srp-03.txt.
|
* Based on draft-ietf-pppext-eap-srp-03.txt.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && EAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && EAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
#include "netif/ppp/eap.h"
|
#include "eap.h"
|
||||||
#include "netif/ppp/magic.h"
|
#include "magic.h"
|
||||||
#include "netif/ppp/pppcrypt.h"
|
#include "pppcrypt.h"
|
||||||
|
|
||||||
#ifdef USE_SRP
|
#ifdef USE_SRP
|
||||||
#include <t_pwd.h>
|
#include <t_pwd.h>
|
||||||
|
|
@ -35,11 +35,11 @@
|
||||||
* $Id: eui64.c,v 1.6 2002/12/04 23:03:32 paulus Exp $
|
* $Id: eui64.c,v 1.6 2002/12/04 23:03:32 paulus Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
#include "netif/ppp/eui64.h"
|
#include "eui64.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* eui64_ntoa - Make an ascii representation of an interface identifier
|
* eui64_ntoa - Make an ascii representation of an interface identifier
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -55,9 +55,9 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif /* UNUSED */
|
#endif /* UNUSED */
|
||||||
|
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
|
|
||||||
#include "netif/ppp/fsm.h"
|
#include "fsm.h"
|
||||||
|
|
||||||
static void fsm_timeout (void *);
|
static void fsm_timeout (void *);
|
||||||
static void fsm_rconfreq(fsm *f, u_char id, u_char *inp, int len);
|
static void fsm_rconfreq(fsm *f, u_char id, u_char *inp, int len);
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
* $Id: ccp.h,v 1.12 2004/11/04 10:02:26 paulus Exp $
|
* $Id: ccp.h,v 1.12 2004/11/04 10:02:26 paulus Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && CCP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && CCP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#ifndef CCP_H
|
#ifndef CCP_H
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
extern const struct chap_digest_type md5_digest;
|
extern const struct chap_digest_type md5_digest;
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#ifndef CHAP_H
|
#ifndef CHAP_H
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
* $Id: chap_ms.h,v 1.13 2004/11/15 22:13:26 paulus Exp $
|
* $Id: chap_ms.h,v 1.13 2004/11/15 22:13:26 paulus Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && MSCHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && MSCHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#ifndef CHAPMS_INCLUDE
|
#ifndef CHAPMS_INCLUDE
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
* $Id: eap.h,v 1.2 2003/06/11 23:56:26 paulus Exp $
|
* $Id: eap.h,v 1.2 2003/06/11 23:56:26 paulus Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && EAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && EAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#ifndef PPP_EAP_H
|
#ifndef PPP_EAP_H
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
* $Id: ecp.h,v 1.2 2003/01/10 07:12:36 fcusack Exp $
|
* $Id: ecp.h,v 1.2 2003/01/10 07:12:36 fcusack Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && ECP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && ECP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#ifndef ECP_H
|
#ifndef ECP_H
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
* $Id: eui64.h,v 1.6 2002/12/04 23:03:32 paulus Exp $
|
* $Id: eui64.h,v 1.6 2002/12/04 23:03:32 paulus Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#ifndef EUI64_H
|
#ifndef EUI64_H
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
* $Id: fsm.h,v 1.10 2004/11/13 02:28:15 paulus Exp $
|
* $Id: fsm.h,v 1.10 2004/11/13 02:28:15 paulus Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#ifndef FSM_H
|
#ifndef FSM_H
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
* $Id: ipcp.h,v 1.14 2002/12/04 23:03:32 paulus Exp $
|
* $Id: ipcp.h,v 1.14 2002/12/04 23:03:32 paulus Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && PPP_IPV4_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && PPP_IPV4_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#ifndef IPCP_H
|
#ifndef IPCP_H
|
||||||
|
|
@ -138,7 +138,7 @@
|
||||||
* $Id: ipv6cp.h,v 1.7 2002/12/04 23:03:32 paulus Exp $
|
* $Id: ipv6cp.h,v 1.7 2002/12/04 23:03:32 paulus Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#ifndef IPV6CP_H
|
#ifndef IPV6CP_H
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
* $Id: lcp.h,v 1.20 2004/11/14 22:53:42 carlsonj Exp $
|
* $Id: lcp.h,v 1.20 2004/11/14 22:53:42 carlsonj Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#ifndef LCP_H
|
#ifndef LCP_H
|
||||||
|
|
@ -74,7 +74,7 @@
|
||||||
* Extracted from avos.
|
* Extracted from avos.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#ifndef MAGIC_H
|
#ifndef MAGIC_H
|
||||||
|
|
@ -33,13 +33,13 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && MPPE_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && MPPE_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#ifndef MPPE_H
|
#ifndef MPPE_H
|
||||||
#define MPPE_H
|
#define MPPE_H
|
||||||
|
|
||||||
#include "netif/ppp/pppcrypt.h"
|
#include "pppcrypt.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if LWIP_INCLUDED_POLARSSL_ARC4
|
#if LWIP_INCLUDED_POLARSSL_ARC4
|
||||||
|
|
||||||
#ifndef LWIP_INCLUDED_POLARSSL_ARC4_H
|
#ifndef LWIP_INCLUDED_POLARSSL_ARC4_H
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if LWIP_INCLUDED_POLARSSL_DES
|
#if LWIP_INCLUDED_POLARSSL_DES
|
||||||
|
|
||||||
#ifndef LWIP_INCLUDED_POLARSSL_DES_H
|
#ifndef LWIP_INCLUDED_POLARSSL_DES_H
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if LWIP_INCLUDED_POLARSSL_MD4
|
#if LWIP_INCLUDED_POLARSSL_MD4
|
||||||
|
|
||||||
#ifndef LWIP_INCLUDED_POLARSSL_MD4_H
|
#ifndef LWIP_INCLUDED_POLARSSL_MD4_H
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if LWIP_INCLUDED_POLARSSL_MD5
|
#if LWIP_INCLUDED_POLARSSL_MD5
|
||||||
|
|
||||||
#ifndef LWIP_INCLUDED_POLARSSL_MD5_H
|
#ifndef LWIP_INCLUDED_POLARSSL_MD5_H
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if LWIP_INCLUDED_POLARSSL_SHA1
|
#if LWIP_INCLUDED_POLARSSL_SHA1
|
||||||
|
|
||||||
#ifndef LWIP_INCLUDED_POLARSSL_SHA1_H
|
#ifndef LWIP_INCLUDED_POLARSSL_SHA1_H
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
* Original derived from BSD codes.
|
* Original derived from BSD codes.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#ifndef PPP_H
|
#ifndef PPP_H
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
#ifndef LWIP_HDR_PPP_IMPL_H
|
#ifndef LWIP_HDR_PPP_IMPL_H
|
||||||
#define LWIP_HDR_PPP_IMPL_H
|
#define LWIP_HDR_PPP_IMPL_H
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
|
|
||||||
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
|
|
@ -28,16 +28,16 @@
|
||||||
#ifndef LWIP_PPPAPI_H
|
#ifndef LWIP_PPPAPI_H
|
||||||
#define LWIP_PPPAPI_H
|
#define LWIP_PPPAPI_H
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
|
|
||||||
#if LWIP_PPP_API /* don't build if not configured for use in lwipopts.h */
|
#if LWIP_PPP_API /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#include "lwip/sys.h"
|
#include "lwip/sys.h"
|
||||||
#include "lwip/netif.h"
|
#include "lwip/netif.h"
|
||||||
#include "lwip/priv/tcpip_priv.h"
|
#include "lwip/priv/tcpip_priv.h"
|
||||||
#include "netif/ppp/ppp.h"
|
#include "ppp.h"
|
||||||
#if PPPOS_SUPPORT
|
#if PPPOS_SUPPORT
|
||||||
#include "netif/ppp/pppos.h"
|
#include "pppos.h"
|
||||||
#endif /* PPPOS_SUPPORT */
|
#endif /* PPPOS_SUPPORT */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
/* This header file is included in all PPP modules needing hashes and/or ciphers */
|
/* This header file is included in all PPP modules needing hashes and/or ciphers */
|
||||||
|
|
@ -53,7 +53,7 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
#if !LWIP_USE_EXTERNAL_MBEDTLS
|
#if !LWIP_USE_EXTERNAL_MBEDTLS
|
||||||
|
|
||||||
#include "netif/ppp/polarssl/md4.h"
|
#include "polarssl/md4.h"
|
||||||
#define lwip_md4_context md4_context
|
#define lwip_md4_context md4_context
|
||||||
#define lwip_md4_init(context)
|
#define lwip_md4_init(context)
|
||||||
#define lwip_md4_starts md4_starts
|
#define lwip_md4_starts md4_starts
|
||||||
|
|
@ -61,7 +61,7 @@ extern "C" {
|
||||||
#define lwip_md4_finish md4_finish
|
#define lwip_md4_finish md4_finish
|
||||||
#define lwip_md4_free(context)
|
#define lwip_md4_free(context)
|
||||||
|
|
||||||
#include "netif/ppp/polarssl/md5.h"
|
#include "polarssl/md5.h"
|
||||||
#define lwip_md5_context md5_context
|
#define lwip_md5_context md5_context
|
||||||
#define lwip_md5_init(context)
|
#define lwip_md5_init(context)
|
||||||
#define lwip_md5_starts md5_starts
|
#define lwip_md5_starts md5_starts
|
||||||
|
|
@ -69,7 +69,7 @@ extern "C" {
|
||||||
#define lwip_md5_finish md5_finish
|
#define lwip_md5_finish md5_finish
|
||||||
#define lwip_md5_free(context)
|
#define lwip_md5_free(context)
|
||||||
|
|
||||||
#include "netif/ppp/polarssl/sha1.h"
|
#include "polarssl/sha1.h"
|
||||||
#define lwip_sha1_context sha1_context
|
#define lwip_sha1_context sha1_context
|
||||||
#define lwip_sha1_init(context)
|
#define lwip_sha1_init(context)
|
||||||
#define lwip_sha1_starts sha1_starts
|
#define lwip_sha1_starts sha1_starts
|
||||||
|
|
@ -77,14 +77,14 @@ extern "C" {
|
||||||
#define lwip_sha1_finish sha1_finish
|
#define lwip_sha1_finish sha1_finish
|
||||||
#define lwip_sha1_free(context)
|
#define lwip_sha1_free(context)
|
||||||
|
|
||||||
#include "netif/ppp/polarssl/des.h"
|
#include "polarssl/des.h"
|
||||||
#define lwip_des_context des_context
|
#define lwip_des_context des_context
|
||||||
#define lwip_des_init(context)
|
#define lwip_des_init(context)
|
||||||
#define lwip_des_setkey_enc des_setkey_enc
|
#define lwip_des_setkey_enc des_setkey_enc
|
||||||
#define lwip_des_crypt_ecb des_crypt_ecb
|
#define lwip_des_crypt_ecb des_crypt_ecb
|
||||||
#define lwip_des_free(context)
|
#define lwip_des_free(context)
|
||||||
|
|
||||||
#include "netif/ppp/polarssl/arc4.h"
|
#include "polarssl/arc4.h"
|
||||||
#define lwip_arc4_context arc4_context
|
#define lwip_arc4_context arc4_context
|
||||||
#define lwip_arc4_init(context)
|
#define lwip_arc4_init(context)
|
||||||
#define lwip_arc4_setup arc4_setup
|
#define lwip_arc4_setup arc4_setup
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#ifndef PPPDEBUG_H
|
#ifndef PPPDEBUG_H
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && PPPOE_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && PPPOE_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#ifndef PPP_OE_H
|
#ifndef PPP_OE_H
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && PPPOL2TP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && PPPOL2TP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#ifndef PPPOL2TP_H
|
#ifndef PPPOL2TP_H
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && PPPOS_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && PPPOS_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#ifndef PPPOS_H
|
#ifndef PPPOS_H
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
* $Id: upap.h,v 1.8 2002/12/04 23:03:33 paulus Exp $
|
* $Id: upap.h,v 1.8 2002/12/04 23:03:33 paulus Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && PAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && PAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#ifndef UPAP_H
|
#ifndef UPAP_H
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
* - Initial distribution.
|
* - Initial distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && VJ_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && VJ_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#ifndef VJ_H
|
#ifndef VJ_H
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && PPP_IPV4_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && PPP_IPV4_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -147,7 +147,7 @@
|
||||||
* interface up / set address.
|
* interface up / set address.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#if 0 /* UNUSED */
|
#if 0 /* UNUSED */
|
||||||
|
|
@ -162,11 +162,11 @@
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#endif /* UNUSED */
|
#endif /* UNUSED */
|
||||||
|
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
#include "netif/ppp/fsm.h"
|
#include "fsm.h"
|
||||||
#include "netif/ppp/ipcp.h"
|
#include "ipcp.h"
|
||||||
#include "netif/ppp/ipv6cp.h"
|
#include "ipv6cp.h"
|
||||||
#include "netif/ppp/magic.h"
|
#include "magic.h"
|
||||||
|
|
||||||
/* global vars */
|
/* global vars */
|
||||||
#if 0 /* UNUSED */
|
#if 0 /* UNUSED */
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -53,14 +53,14 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif /* UNUSED */
|
#endif /* UNUSED */
|
||||||
|
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
|
|
||||||
#include "netif/ppp/fsm.h"
|
#include "fsm.h"
|
||||||
#include "netif/ppp/lcp.h"
|
#include "lcp.h"
|
||||||
#if CHAP_SUPPORT
|
#if CHAP_SUPPORT
|
||||||
#include "netif/ppp/chap-new.h"
|
#include "chap-new.h"
|
||||||
#endif /* CHAP_SUPPORT */
|
#endif /* CHAP_SUPPORT */
|
||||||
#include "netif/ppp/magic.h"
|
#include "magic.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When the link comes up we want to be able to wait for a short while,
|
* When the link comes up we want to be able to wait for a short while,
|
||||||
|
|
@ -72,15 +72,15 @@
|
||||||
* Extracted from avos.
|
* Extracted from avos.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
#include "netif/ppp/magic.h"
|
#include "magic.h"
|
||||||
|
|
||||||
#if PPP_MD5_RANDM /* Using MD5 for better randomness if enabled */
|
#if PPP_MD5_RANDM /* Using MD5 for better randomness if enabled */
|
||||||
|
|
||||||
#include "netif/ppp/pppcrypt.h"
|
#include "pppcrypt.h"
|
||||||
|
|
||||||
#define MD5_HASH_SIZE 16
|
#define MD5_HASH_SIZE 16
|
||||||
static char magic_randpool[MD5_HASH_SIZE]; /* Pool of randomness. */
|
static char magic_randpool[MD5_HASH_SIZE]; /* Pool of randomness. */
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
"name": "ppp",
|
||||||
|
"config": {
|
||||||
|
"ppp-enabled": {
|
||||||
|
"help": "Enable support for PPP interfaces",
|
||||||
|
"value": false,
|
||||||
|
"macro_name": "NSAPI_PPP_AVAILABLE"
|
||||||
|
},
|
||||||
|
"ppp-ipv4-enabled": {
|
||||||
|
"help": "Enable support for ipv4 PPP interface",
|
||||||
|
"value": false,
|
||||||
|
"macro_name": "PPP_IPV4_SUPPORT"
|
||||||
|
},
|
||||||
|
"ppp-ipv6-enabled": {
|
||||||
|
"help": "Enable support for ipv6 PPP interface",
|
||||||
|
"value": true,
|
||||||
|
"macro_name": "PPP_IPV6_SUPPORT"
|
||||||
|
},
|
||||||
|
"ppp-thread-stacksize": {
|
||||||
|
"help": "Thread stack size for PPP",
|
||||||
|
"value": 768
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"target_overrides": {
|
||||||
|
"RZ_A1_EMAC": {
|
||||||
|
"ppp-thread-stacksize": 896
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -23,18 +23,18 @@
|
||||||
* deprecated in 2.6
|
* deprecated in 2.6
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && MPPE_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && MPPE_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "lwip/err.h"
|
#include "lwip/err.h"
|
||||||
|
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
#include "netif/ppp/ccp.h"
|
#include "ccp.h"
|
||||||
#include "netif/ppp/mppe.h"
|
#include "mppe.h"
|
||||||
#include "netif/ppp/pppdebug.h"
|
#include "pppdebug.h"
|
||||||
#include "netif/ppp/pppcrypt.h"
|
#include "pppcrypt.h"
|
||||||
|
|
||||||
#define SHA1_SIGNATURE_SIZE 20
|
#define SHA1_SIGNATURE_SIZE 20
|
||||||
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && defined(HAVE_MULTILINK) /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && defined(HAVE_MULTILINK) /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
/* Multilink support
|
/* Multilink support
|
||||||
|
|
@ -49,11 +49,11 @@
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
|
|
||||||
#include "netif/ppp/fsm.h"
|
#include "fsm.h"
|
||||||
#include "netif/ppp/lcp.h"
|
#include "lcp.h"
|
||||||
#include "netif/ppp/tdb.h"
|
#include "tdb.h"
|
||||||
|
|
||||||
bool endpoint_specified; /* user gave explicit endpoint discriminator */
|
bool endpoint_specified; /* user gave explicit endpoint discriminator */
|
||||||
char *bundle_id; /* identifier for our bundle */
|
char *bundle_id; /* identifier for our bundle */
|
||||||
|
|
@ -38,10 +38,10 @@
|
||||||
* http://groups.google.com/group/sci.crypt/msg/10a300c9d21afca0
|
* http://groups.google.com/group/sci.crypt/msg/10a300c9d21afca0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && LWIP_INCLUDED_POLARSSL_ARC4
|
#if PPP_SUPPORT && LWIP_INCLUDED_POLARSSL_ARC4
|
||||||
|
|
||||||
#include "netif/ppp/polarssl/arc4.h"
|
#include "polarssl/arc4.h"
|
||||||
/*
|
/*
|
||||||
* ARC4 key schedule
|
* ARC4 key schedule
|
||||||
*/
|
*/
|
||||||
|
|
@ -39,10 +39,10 @@
|
||||||
* http://csrc.nist.gov/publications/fips/fips46-3/fips46-3.pdf
|
* http://csrc.nist.gov/publications/fips/fips46-3/fips46-3.pdf
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && LWIP_INCLUDED_POLARSSL_DES
|
#if PPP_SUPPORT && LWIP_INCLUDED_POLARSSL_DES
|
||||||
|
|
||||||
#include "netif/ppp/polarssl/des.h"
|
#include "polarssl/des.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 32-bit integer manipulation macros (big endian)
|
* 32-bit integer manipulation macros (big endian)
|
||||||
|
|
@ -39,10 +39,10 @@
|
||||||
* http://www.ietf.org/rfc/rfc1320.txt
|
* http://www.ietf.org/rfc/rfc1320.txt
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && LWIP_INCLUDED_POLARSSL_MD4
|
#if PPP_SUPPORT && LWIP_INCLUDED_POLARSSL_MD4
|
||||||
|
|
||||||
#include "netif/ppp/polarssl/md4.h"
|
#include "polarssl/md4.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
@ -38,10 +38,10 @@
|
||||||
* http://www.ietf.org/rfc/rfc1321.txt
|
* http://www.ietf.org/rfc/rfc1321.txt
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && LWIP_INCLUDED_POLARSSL_MD5
|
#if PPP_SUPPORT && LWIP_INCLUDED_POLARSSL_MD5
|
||||||
|
|
||||||
#include "netif/ppp/polarssl/md5.h"
|
#include "polarssl/md5.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
@ -38,10 +38,10 @@
|
||||||
* http://www.itl.nist.gov/fipspubs/fip180-1.htm
|
* http://www.itl.nist.gov/fipspubs/fip180-1.htm
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && LWIP_INCLUDED_POLARSSL_SHA1
|
#if PPP_SUPPORT && LWIP_INCLUDED_POLARSSL_SHA1
|
||||||
|
|
||||||
#include "netif/ppp/polarssl/sha1.h"
|
#include "polarssl/sha1.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
@ -85,7 +85,7 @@
|
||||||
* @verbinclude "ppp.txt"
|
* @verbinclude "ppp.txt"
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#include "lwip/pbuf.h"
|
#include "lwip/pbuf.h"
|
||||||
|
|
@ -100,39 +100,39 @@
|
||||||
#endif /* PPP_IPV6_SUPPORT */
|
#endif /* PPP_IPV6_SUPPORT */
|
||||||
#include "lwip/dns.h"
|
#include "lwip/dns.h"
|
||||||
|
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
#include "netif/ppp/pppos.h"
|
#include "pppos.h"
|
||||||
|
|
||||||
#include "netif/ppp/fsm.h"
|
#include "fsm.h"
|
||||||
#include "netif/ppp/lcp.h"
|
#include "lcp.h"
|
||||||
#include "netif/ppp/magic.h"
|
#include "magic.h"
|
||||||
|
|
||||||
#if PAP_SUPPORT
|
#if PAP_SUPPORT
|
||||||
#include "netif/ppp/upap.h"
|
#include "upap.h"
|
||||||
#endif /* PAP_SUPPORT */
|
#endif /* PAP_SUPPORT */
|
||||||
#if CHAP_SUPPORT
|
#if CHAP_SUPPORT
|
||||||
#include "netif/ppp/chap-new.h"
|
#include "chap-new.h"
|
||||||
#endif /* CHAP_SUPPORT */
|
#endif /* CHAP_SUPPORT */
|
||||||
#if EAP_SUPPORT
|
#if EAP_SUPPORT
|
||||||
#include "netif/ppp/eap.h"
|
#include "eap.h"
|
||||||
#endif /* EAP_SUPPORT */
|
#endif /* EAP_SUPPORT */
|
||||||
#if CCP_SUPPORT
|
#if CCP_SUPPORT
|
||||||
#include "netif/ppp/ccp.h"
|
#include "ccp.h"
|
||||||
#endif /* CCP_SUPPORT */
|
#endif /* CCP_SUPPORT */
|
||||||
#if MPPE_SUPPORT
|
#if MPPE_SUPPORT
|
||||||
#include "netif/ppp/mppe.h"
|
#include "mppe.h"
|
||||||
#endif /* MPPE_SUPPORT */
|
#endif /* MPPE_SUPPORT */
|
||||||
#if ECP_SUPPORT
|
#if ECP_SUPPORT
|
||||||
#include "netif/ppp/ecp.h"
|
#include "ecp.h"
|
||||||
#endif /* EAP_SUPPORT */
|
#endif /* EAP_SUPPORT */
|
||||||
#if VJ_SUPPORT
|
#if VJ_SUPPORT
|
||||||
#include "netif/ppp/vj.h"
|
#include "vj.h"
|
||||||
#endif /* VJ_SUPPORT */
|
#endif /* VJ_SUPPORT */
|
||||||
#if PPP_IPV4_SUPPORT
|
#if PPP_IPV4_SUPPORT
|
||||||
#include "netif/ppp/ipcp.h"
|
#include "ipcp.h"
|
||||||
#endif /* PPP_IPV4_SUPPORT */
|
#endif /* PPP_IPV4_SUPPORT */
|
||||||
#if PPP_IPV6_SUPPORT
|
#if PPP_IPV6_SUPPORT
|
||||||
#include "netif/ppp/ipv6cp.h"
|
#include "ipv6cp.h"
|
||||||
#endif /* PPP_IPV6_SUPPORT */
|
#endif /* PPP_IPV6_SUPPORT */
|
||||||
|
|
||||||
/*************************/
|
/*************************/
|
||||||
|
|
@ -57,15 +57,15 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && ECP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && ECP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
|
|
||||||
#include "netif/ppp/fsm.h"
|
#include "fsm.h"
|
||||||
#include "netif/ppp/ecp.h"
|
#include "ecp.h"
|
||||||
|
|
||||||
#if PPP_OPTIONS
|
#if PPP_OPTIONS
|
||||||
static option_t ecp_option_list[] = {
|
static option_t ecp_option_list[] = {
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "mbed.h"
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include "platform/FileHandle.h"
|
#include "platform/FileHandle.h"
|
||||||
#include "platform/mbed_poll.h"
|
#include "platform/mbed_poll.h"
|
||||||
|
|
@ -27,7 +28,7 @@
|
||||||
#include "lwip/dns.h"
|
#include "lwip/dns.h"
|
||||||
#include "lwip/pbuf.h"
|
#include "lwip/pbuf.h"
|
||||||
extern "C" { // "pppos.h" is missing extern C
|
extern "C" { // "pppos.h" is missing extern C
|
||||||
#include "netif/ppp/pppapi.h"
|
#include "pppapi.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "nsapi_ppp.h"
|
#include "nsapi_ppp.h"
|
||||||
|
|
@ -39,7 +40,7 @@ namespace mbed {
|
||||||
using rtos::Thread;
|
using rtos::Thread;
|
||||||
using events::EventQueue;
|
using events::EventQueue;
|
||||||
|
|
||||||
#if LWIP_PPP_API
|
#if PPP_SUPPORT
|
||||||
|
|
||||||
static EventQueue *event_queue;
|
static EventQueue *event_queue;
|
||||||
static Thread *event_thread;
|
static Thread *event_thread;
|
||||||
|
|
@ -48,13 +49,13 @@ static nsapi_error_t connect_error_code;
|
||||||
|
|
||||||
// Just one interface for now
|
// Just one interface for now
|
||||||
static FileHandle *my_stream;
|
static FileHandle *my_stream;
|
||||||
static LWIP::Interface *my_interface;
|
static OnboardNetworkStack::Interface *my_interface;
|
||||||
|
static Semaphore ppp_close_sem;
|
||||||
static ppp_pcb *my_ppp_pcb;
|
static ppp_pcb *my_ppp_pcb;
|
||||||
static bool ppp_active = false;
|
static bool ppp_active = false;
|
||||||
static bool blocking_connect = true;
|
static bool blocking_connect = true;
|
||||||
static const char *login;
|
static const char *login;
|
||||||
static const char *pwd;
|
static const char *pwd;
|
||||||
static sys_sem_t ppp_close_sem;
|
|
||||||
static Callback<void(nsapi_event_t, intptr_t)> connection_status_cb;
|
static Callback<void(nsapi_event_t, intptr_t)> connection_status_cb;
|
||||||
|
|
||||||
static EventQueue *prepare_event_queue()
|
static EventQueue *prepare_event_queue()
|
||||||
|
|
@ -68,7 +69,7 @@ static EventQueue *prepare_event_queue()
|
||||||
|
|
||||||
// Only need to queue 2 events. new blows on failure.
|
// Only need to queue 2 events. new blows on failure.
|
||||||
event_queue = new EventQueue(2 * EVENTS_EVENT_SIZE, NULL);
|
event_queue = new EventQueue(2 * EVENTS_EVENT_SIZE, NULL);
|
||||||
event_thread = new Thread(osPriorityNormal, PPP_THREAD_STACK_SIZE, NULL, "ppp_lwip");
|
event_thread = new Thread(osPriorityNormal, 2*PPP_THREAD_STACK_SIZE, NULL, "ppp");
|
||||||
|
|
||||||
if (event_thread->start(callback(event_queue, &EventQueue::dispatch_forever)) != osOK) {
|
if (event_thread->start(callback(event_queue, &EventQueue::dispatch_forever)) != osOK) {
|
||||||
delete event_thread;
|
delete event_thread;
|
||||||
|
|
@ -214,7 +215,7 @@ static void ppp_link_status(ppp_pcb *pcb, int err_code, void *ctx)
|
||||||
if (ppp_active) {
|
if (ppp_active) {
|
||||||
ppp_active = false;
|
ppp_active = false;
|
||||||
connect_error_code = mapped_err_code;
|
connect_error_code = mapped_err_code;
|
||||||
sys_sem_signal(&ppp_close_sem);
|
ppp_close_sem.release();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Alright, PPP interface is down, we need to notify upper layer */
|
/* Alright, PPP interface is down, we need to notify upper layer */
|
||||||
|
|
@ -278,7 +279,7 @@ static void stream_cb()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" err_t ppp_lwip_connect(void *pcb)
|
extern "C" err_t ppp_if_connect(void *pcb)
|
||||||
{
|
{
|
||||||
#if PPP_AUTH_SUPPORT
|
#if PPP_AUTH_SUPPORT
|
||||||
ppp_set_auth(my_ppp_pcb, PPPAUTHTYPE_ANY, login, pwd);
|
ppp_set_auth(my_ppp_pcb, PPPAUTHTYPE_ANY, login, pwd);
|
||||||
|
|
@ -294,21 +295,21 @@ extern "C" err_t ppp_lwip_connect(void *pcb)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" err_t ppp_lwip_disconnect(void *pcb)
|
extern "C" err_t ppp_if_disconnect(void *pcb)
|
||||||
{
|
{
|
||||||
err_t ret = ERR_OK;
|
err_t ret = ERR_OK;
|
||||||
if (ppp_active) {
|
if (ppp_active) {
|
||||||
ret = ppp_close(my_ppp_pcb, 0);
|
ret = ppp_close(my_ppp_pcb, 0);
|
||||||
if (ret == ERR_OK) {
|
if (ret == ERR_OK) {
|
||||||
/* close call made, now let's catch the response in the status callback */
|
/* close call made, now let's catch the response in the status callback */
|
||||||
sys_arch_sem_wait(&ppp_close_sem, 0);
|
ppp_close_sem.wait();
|
||||||
}
|
}
|
||||||
ppp_active = false;
|
ppp_active = false;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" nsapi_error_t ppp_lwip_if_init(void *pcb, struct netif *netif, const nsapi_ip_stack_t stack)
|
extern "C" nsapi_error_t ppp_stack_if_init(void *pcb, struct netif *netif, const nsapi_ip_stack_t stack)
|
||||||
{
|
{
|
||||||
if (!prepare_event_queue()) {
|
if (!prepare_event_queue()) {
|
||||||
return NSAPI_ERROR_NO_MEMORY;
|
return NSAPI_ERROR_NO_MEMORY;
|
||||||
|
|
@ -321,7 +322,6 @@ extern "C" nsapi_error_t ppp_lwip_if_init(void *pcb, struct netif *netif, const
|
||||||
return NSAPI_ERROR_DEVICE_ERROR;
|
return NSAPI_ERROR_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
sys_sem_new(&ppp_close_sem, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if LWIP_IPV4
|
#if LWIP_IPV4
|
||||||
|
|
@ -366,8 +366,8 @@ nsapi_error_t nsapi_ppp_connect(FileHandle *stream, Callback<void(nsapi_event_t,
|
||||||
nsapi_error_t retcode;
|
nsapi_error_t retcode;
|
||||||
|
|
||||||
if (!my_interface) {
|
if (!my_interface) {
|
||||||
LWIP &lwip = LWIP::get_instance();
|
OnboardNetworkStack &_stack = OnboardNetworkStack::get_default_instance();
|
||||||
retcode = lwip._add_ppp_interface(stream, true, stack, &my_interface);
|
retcode = _stack.add_ppp_interface(stream, true, stack, &my_interface);
|
||||||
if (retcode != NSAPI_ERROR_OK) {
|
if (retcode != NSAPI_ERROR_OK) {
|
||||||
my_interface = NULL;
|
my_interface = NULL;
|
||||||
my_stream->set_blocking(true);
|
my_stream->set_blocking(true);
|
||||||
|
|
@ -378,7 +378,7 @@ nsapi_error_t nsapi_ppp_connect(FileHandle *stream, Callback<void(nsapi_event_t,
|
||||||
}
|
}
|
||||||
|
|
||||||
// mustn't start calling input until after connect -
|
// mustn't start calling input until after connect -
|
||||||
// attach deferred until ppp_lwip_connect, called from mbed_lwip_bringup
|
// attach deferred until ppp_connect, called from mbed_lwip_bringup
|
||||||
retcode = my_interface->bringup(false, NULL, NULL, NULL, stack, blocking_connect);
|
retcode = my_interface->bringup(false, NULL, NULL, NULL, stack, blocking_connect);
|
||||||
|
|
||||||
if (retcode != NSAPI_ERROR_OK) {
|
if (retcode != NSAPI_ERROR_OK) {
|
||||||
|
|
@ -414,7 +414,7 @@ nsapi_error_t nsapi_ppp_disconnect(FileHandle *stream)
|
||||||
|
|
||||||
NetworkStack *nsapi_ppp_get_stack()
|
NetworkStack *nsapi_ppp_get_stack()
|
||||||
{
|
{
|
||||||
return &LWIP::get_instance();
|
return &OnboardNetworkStack::get_default_instance();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *nsapi_ppp_get_ip_addr(FileHandle *stream)
|
const char *nsapi_ppp_get_ip_addr(FileHandle *stream)
|
||||||
|
|
@ -461,6 +461,6 @@ const char *nsapi_ppp_get_gw_addr(FileHandle *stream)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* LWIP_PPP_API */
|
#endif /* PPP_SUPPORT */
|
||||||
|
|
||||||
} // namespace mbed
|
} // namespace mbed
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
*/
|
*/
|
||||||
#ifndef PPP_LWIP_H_
|
#ifndef PPP_LWIP_H_
|
||||||
#define PPP_LWIP_H_
|
#define PPP_LWIP_H_
|
||||||
#include "netif/ppp/pppapi.h"
|
#include "pppapi.h"
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -30,7 +30,7 @@ extern "C" {
|
||||||
*
|
*
|
||||||
* @return 0 for success and negative error codes for failure
|
* @return 0 for success and negative error codes for failure
|
||||||
*/
|
*/
|
||||||
nsapi_error_t ppp_lwip_if_init(void *pcb, struct netif *netif, nsapi_ip_stack_t stack);
|
nsapi_error_t ppp_stack_if_init(void *pcb, struct netif *netif, nsapi_ip_stack_t stack);
|
||||||
|
|
||||||
/** Connects to a PPP pipe
|
/** Connects to a PPP pipe
|
||||||
*
|
*
|
||||||
|
|
@ -38,7 +38,7 @@ nsapi_error_t ppp_lwip_if_init(void *pcb, struct netif *netif, nsapi_ip_stack_t
|
||||||
*
|
*
|
||||||
* @return 0 for success and negative error codes for failure
|
* @return 0 for success and negative error codes for failure
|
||||||
*/
|
*/
|
||||||
err_t ppp_lwip_connect(void *pcb);
|
err_t ppp_if_connect(void *pcb);
|
||||||
|
|
||||||
/** Disconnects from a PPP pipe
|
/** Disconnects from a PPP pipe
|
||||||
*
|
*
|
||||||
|
|
@ -48,14 +48,14 @@ err_t ppp_lwip_connect(void *pcb);
|
||||||
*
|
*
|
||||||
* @return 0 for success and negative error codes for failure
|
* @return 0 for success and negative error codes for failure
|
||||||
*/
|
*/
|
||||||
err_t ppp_lwip_disconnect(void *pcb);
|
err_t ppp_if_disconnect(void *pcb);
|
||||||
#else
|
#else
|
||||||
/**
|
/**
|
||||||
* Stubs in case LWIP PPP is not enabled
|
* Stubs in case LWIP PPP is not enabled
|
||||||
*/
|
*/
|
||||||
#define ppp_lwip_if_init(pcb, netif, stack) NSAPI_ERROR_UNSUPPORTED
|
#define ppp_if_init(pcb, netif, stack) NSAPI_ERROR_UNSUPPORTED
|
||||||
#define ppp_lwip_connect(pcb) ERR_IF
|
#define ppp_if_connect(pcb) ERR_IF
|
||||||
#define ppp_lwip_disconnect(pcb) ERR_IF
|
#define ppp_if_disconnect(pcb) ERR_IF
|
||||||
#endif //LWIP_PPP_API
|
#endif //LWIP_PPP_API
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
@ -31,15 +31,15 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
|
|
||||||
#if LWIP_PPP_API /* don't build if not configured for use in lwipopts.h */
|
#if LWIP_PPP_API /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#include "netif/ppp/pppapi.h"
|
#include "pppapi.h"
|
||||||
#include "lwip/priv/tcpip_priv.h"
|
#include "lwip/priv/tcpip_priv.h"
|
||||||
#include "netif/ppp/pppoe.h"
|
#include "pppoe.h"
|
||||||
#include "netif/ppp/pppol2tp.h"
|
#include "pppol2tp.h"
|
||||||
#include "netif/ppp/pppos.h"
|
#include "pppos.h"
|
||||||
|
|
||||||
#if LWIP_MPU_COMPATIBLE
|
#if LWIP_MPU_COMPATIBLE
|
||||||
LWIP_MEMPOOL_DECLARE(PPPAPI_MSG, MEMP_NUM_PPP_API_MSG, sizeof(struct pppapi_msg), "PPPAPI_MSG")
|
LWIP_MEMPOOL_DECLARE(PPPAPI_MSG, MEMP_NUM_PPP_API_MSG, sizeof(struct pppapi_msg), "PPPAPI_MSG")
|
||||||
|
|
@ -30,12 +30,12 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && MSCHAP_SUPPORT /* don't build if not necessary */
|
#if PPP_SUPPORT && MSCHAP_SUPPORT /* don't build if not necessary */
|
||||||
|
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
|
|
||||||
#include "netif/ppp/pppcrypt.h"
|
#include "pppcrypt.h"
|
||||||
|
|
||||||
|
|
||||||
static u_char pppcrypt_get_7bits(u_char *input, int startBit) {
|
static u_char pppcrypt_get_7bits(u_char *input, int startBit) {
|
||||||
|
|
@ -68,7 +68,7 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && PPPOE_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && PPPOE_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#if 0 /* UNUSED */
|
#if 0 /* UNUSED */
|
||||||
|
|
@ -82,10 +82,10 @@
|
||||||
#include "lwip/snmp.h"
|
#include "lwip/snmp.h"
|
||||||
|
|
||||||
#include "netif/ethernet.h"
|
#include "netif/ethernet.h"
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
#include "netif/ppp/lcp.h"
|
#include "lcp.h"
|
||||||
#include "netif/ppp/ipcp.h"
|
#include "ipcp.h"
|
||||||
#include "netif/ppp/pppoe.h"
|
#include "pppoe.h"
|
||||||
|
|
||||||
/* Memory pool */
|
/* Memory pool */
|
||||||
LWIP_MEMPOOL_DECLARE(PPPOE_IF, MEMP_NUM_PPPOE_INTERFACES, sizeof(struct pppoe_softc), "PPPOE_IF")
|
LWIP_MEMPOOL_DECLARE(PPPOE_IF, MEMP_NUM_PPPOE_INTERFACES, sizeof(struct pppoe_softc), "PPPOE_IF")
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
* - Hidden AVPs
|
* - Hidden AVPs
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && PPPOL2TP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && PPPOL2TP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#include "lwip/err.h"
|
#include "lwip/err.h"
|
||||||
|
|
@ -59,12 +59,12 @@
|
||||||
#include "lwip/udp.h"
|
#include "lwip/udp.h"
|
||||||
#include "lwip/snmp.h"
|
#include "lwip/snmp.h"
|
||||||
|
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
#include "netif/ppp/lcp.h"
|
#include "lcp.h"
|
||||||
#include "netif/ppp/ipcp.h"
|
#include "ipcp.h"
|
||||||
#include "netif/ppp/pppol2tp.h"
|
#include "pppol2tp.h"
|
||||||
#include "netif/ppp/pppcrypt.h"
|
#include "pppcrypt.h"
|
||||||
#include "netif/ppp/magic.h"
|
#include "magic.h"
|
||||||
|
|
||||||
/* Memory pool */
|
/* Memory pool */
|
||||||
LWIP_MEMPOOL_DECLARE(PPPOL2TP_PCB, MEMP_NUM_PPPOL2TP_INTERFACES, sizeof(pppol2tp_pcb), "PPPOL2TP_PCB")
|
LWIP_MEMPOOL_DECLARE(PPPOL2TP_PCB, MEMP_NUM_PPPOL2TP_INTERFACES, sizeof(pppol2tp_pcb), "PPPOL2TP_PCB")
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && PPPOS_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && PPPOS_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
@ -47,9 +47,9 @@
|
||||||
#include "lwip/api.h"
|
#include "lwip/api.h"
|
||||||
#include "lwip/ip4.h" /* for ip4_input() */
|
#include "lwip/ip4.h" /* for ip4_input() */
|
||||||
|
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
#include "netif/ppp/pppos.h"
|
#include "pppos.h"
|
||||||
#include "netif/ppp/vj.h"
|
#include "vj.h"
|
||||||
|
|
||||||
/* Memory pool */
|
/* Memory pool */
|
||||||
LWIP_MEMPOOL_DECLARE(PPPOS_PCB, MEMP_NUM_PPPOS_INTERFACES, sizeof(pppos_pcb), "PPPOS_PCB")
|
LWIP_MEMPOOL_DECLARE(PPPOS_PCB, MEMP_NUM_PPPOS_INTERFACES, sizeof(pppos_pcb), "PPPOS_PCB")
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && PAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && PAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -52,9 +52,9 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif /* UNUSED */
|
#endif /* UNUSED */
|
||||||
|
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
|
|
||||||
#include "netif/ppp/upap.h"
|
#include "upap.h"
|
||||||
|
|
||||||
#if PPP_OPTIONS
|
#if PPP_OPTIONS
|
||||||
/*
|
/*
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#if 0 /* UNUSED */
|
#if 0 /* UNUSED */
|
||||||
|
|
@ -58,10 +58,10 @@
|
||||||
#endif
|
#endif
|
||||||
#endif /* UNUSED */
|
#endif /* UNUSED */
|
||||||
|
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
|
|
||||||
#include "netif/ppp/fsm.h"
|
#include "fsm.h"
|
||||||
#include "netif/ppp/lcp.h"
|
#include "lcp.h"
|
||||||
|
|
||||||
#if defined(SUNOS4)
|
#if defined(SUNOS4)
|
||||||
extern char *strerror();
|
extern char *strerror();
|
||||||
|
|
@ -28,13 +28,13 @@
|
||||||
* for a 16 bit processor.
|
* for a 16 bit processor.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "netif/ppp/ppp_opts.h"
|
#include "ppp_opts.h"
|
||||||
#if PPP_SUPPORT && VJ_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
#if PPP_SUPPORT && VJ_SUPPORT /* don't build if not configured for use in lwipopts.h */
|
||||||
|
|
||||||
#include "netif/ppp/ppp_impl.h"
|
#include "ppp_impl.h"
|
||||||
#include "netif/ppp/pppdebug.h"
|
#include "pppdebug.h"
|
||||||
|
|
||||||
#include "netif/ppp/vj.h"
|
#include "vj.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
Loading…
Reference in New Issue