Moved PPP from lwip directory to under netsocket

Moved PPP and renamed files and constants.
pull/10974/head
Kari Haapalehto 2019-05-07 15:16:22 +03:00 committed by Mika Leppänen
parent 398515a367
commit c518319fa3
67 changed files with 239 additions and 210 deletions

View File

@ -82,14 +82,14 @@
#define PPP_FAKED_ON 1
#endif
#include "netif/ppp/ppp_opts.h"
#include "netif/ppp/ppp.h"
#include "netif/ppp/pppcrypt.h"
#include "ppp_opts.h"
#include "ppp.h"
#include "pppcrypt.h"
#if PPP_FAKED_ON && !LWIP_USE_EXTERNAL_POLARSSL && !LWIP_USE_EXTERNAL_MBEDTLS
#undef LWIP_INCLUDED_POLARSSL_MD5
#define LWIP_INCLUDED_POLARSSL_MD5 1
#include "netif/ppp/polarssl/lwip_md5.c"
#include "polarssl/lwip_md5.c"
#endif
static u8_t input[64];

View File

@ -58,8 +58,8 @@
#include "lwip/mld6.h"
#include "lwip/api.h"
#include "netif/ppp/ppp_opts.h"
#include "netif/ppp/ppp_impl.h"
#include "ppp_opts.h"
#include "ppp_impl.h"
#ifndef LWIP_SKIP_PACKING_CHECK

View File

@ -68,7 +68,7 @@
#include "lwip/igmp.h"
#include "lwip/timeouts.h"
/* needed by default MEMP_NUM_SYS_TIMEOUT */
#include "netif/ppp/ppp_opts.h"
#include "ppp_opts.h"
#include "lwip/netdb.h"
#include "lwip/dns.h"
#include "lwip/priv/nd6_priv.h"

View File

@ -68,7 +68,7 @@
* 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 0 /* UNUSED */
@ -103,28 +103,28 @@
#include <time.h>
#endif /* UNUSED */
#include "netif/ppp/ppp_impl.h"
#include "ppp_impl.h"
#include "netif/ppp/fsm.h"
#include "netif/ppp/lcp.h"
#include "fsm.h"
#include "lcp.h"
#if CCP_SUPPORT
#include "netif/ppp/ccp.h"
#include "ccp.h"
#endif /* CCP_SUPPORT */
#if ECP_SUPPORT
#include "netif/ppp/ecp.h"
#include "ecp.h"
#endif /* ECP_SUPPORT */
#include "netif/ppp/ipcp.h"
#include "ipcp.h"
#if PAP_SUPPORT
#include "netif/ppp/upap.h"
#include "upap.h"
#endif /* PAP_SUPPORT */
#if CHAP_SUPPORT
#include "netif/ppp/chap-new.h"
#include "chap-new.h"
#endif /* CHAP_SUPPORT */
#if EAP_SUPPORT
#include "netif/ppp/eap.h"
#include "eap.h"
#endif /* EAP_SUPPORT */
#if CBCP_SUPPORT
#include "netif/ppp/cbcp.h"
#include "cbcp.h"
#endif
#if 0 /* UNUSED */

View File

@ -28,20 +28,20 @@
* 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 */
#include <stdlib.h>
#include <string.h>
#include "netif/ppp/ppp_impl.h"
#include "ppp_impl.h"
#include "netif/ppp/fsm.h"
#include "netif/ppp/ccp.h"
#include "fsm.h"
#include "ccp.h"
#if MPPE_SUPPORT
#include "netif/ppp/lcp.h" /* lcp_close(), lcp_fsm */
#include "netif/ppp/mppe.h" /* mppe_init() */
#include "lcp.h" /* lcp_close(), lcp_fsm */
#include "mppe.h" /* mppe_init() */
#endif /* MPPE_SUPPORT */
/*

View File

@ -28,7 +28,7 @@
* 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 0 /* UNUSED */
@ -36,12 +36,12 @@
#include <string.h>
#endif /* UNUSED */
#include "netif/ppp/ppp_impl.h"
#include "ppp_impl.h"
#include "netif/ppp/chap-new.h"
#include "netif/ppp/chap-md5.h"
#include "netif/ppp/magic.h"
#include "netif/ppp/pppcrypt.h"
#include "chap-new.h"
#include "chap-md5.h"
#include "magic.h"
#include "pppcrypt.h"
#define MD5_HASH_SIZE 16
#define MD5_MIN_CHALLENGE 17

View File

@ -28,7 +28,7 @@
* 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 0 /* UNUSED */
@ -36,18 +36,18 @@
#include <string.h>
#endif /* UNUSED */
#include "netif/ppp/ppp_impl.h"
#include "ppp_impl.h"
#if 0 /* UNUSED */
#include "session.h"
#endif /* UNUSED */
#include "netif/ppp/chap-new.h"
#include "netif/ppp/chap-md5.h"
#include "chap-new.h"
#include "chap-md5.h"
#if MSCHAP_SUPPORT
#include "netif/ppp/chap_ms.h"
#include "chap_ms.h"
#endif
#include "netif/ppp/magic.h"
#include "magic.h"
#if 0 /* UNUSED */
/* Hook for a plugin to validate CHAP challenge */

View File

@ -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 0 /* UNUSED */
@ -87,14 +87,14 @@
#include <unistd.h>
#endif /* UNUSED */
#include "netif/ppp/ppp_impl.h"
#include "ppp_impl.h"
#include "netif/ppp/chap-new.h"
#include "netif/ppp/chap_ms.h"
#include "netif/ppp/pppcrypt.h"
#include "netif/ppp/magic.h"
#include "chap-new.h"
#include "chap_ms.h"
#include "pppcrypt.h"
#include "magic.h"
#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 */
#define SHA1_SIGNATURE_SIZE 20

View File

@ -28,7 +28,7 @@
* 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 */
#include <stdio.h>
@ -52,11 +52,11 @@
#include <pcap-bpf.h>
#endif
#include "netif/ppp/ppp_impl.h"
#include "ppp_impl.h"
#include "netif/ppp/fsm.h"
#include "netif/ppp/ipcp.h"
#include "netif/ppp/lcp.h"
#include "fsm.h"
#include "ipcp.h"
#include "lcp.h"
char *frame;
int framelen;

View File

@ -43,13 +43,13 @@
* 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 */
#include "netif/ppp/ppp_impl.h"
#include "netif/ppp/eap.h"
#include "netif/ppp/magic.h"
#include "netif/ppp/pppcrypt.h"
#include "ppp_impl.h"
#include "eap.h"
#include "magic.h"
#include "pppcrypt.h"
#ifdef USE_SRP
#include <t_pwd.h>

View File

@ -35,11 +35,11 @@
* $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 */
#include "netif/ppp/ppp_impl.h"
#include "netif/ppp/eui64.h"
#include "ppp_impl.h"
#include "eui64.h"
/*
* eui64_ntoa - Make an ascii representation of an interface identifier

View File

@ -40,7 +40,7 @@
* 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 */
/*
@ -55,9 +55,9 @@
#include <sys/types.h>
#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_rconfreq(fsm *f, u_char id, u_char *inp, int len);

View File

@ -30,7 +30,7 @@
* $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 */
#ifndef CCP_H

View File

@ -28,7 +28,7 @@
* 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 */
extern const struct chap_digest_type md5_digest;

View File

@ -28,7 +28,7 @@
* 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 */
#ifndef CHAP_H

View File

@ -30,7 +30,7 @@
* $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 */
#ifndef CHAPMS_INCLUDE

View File

@ -20,7 +20,7 @@
* $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 */
#ifndef PPP_EAP_H

View File

@ -31,7 +31,7 @@
* $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 */
#ifndef ECP_H

View File

@ -35,7 +35,7 @@
* $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 */
#ifndef EUI64_H

View File

@ -42,7 +42,7 @@
* $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 */
#ifndef FSM_H

View File

@ -42,7 +42,7 @@
* $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 */
#ifndef IPCP_H

View File

@ -138,7 +138,7 @@
* $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 */
#ifndef IPV6CP_H

View File

@ -42,7 +42,7 @@
* $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 */
#ifndef LCP_H

View File

@ -74,7 +74,7 @@
* 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 */
#ifndef MAGIC_H

View File

@ -33,13 +33,13 @@
* 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 */
#ifndef MPPE_H
#define MPPE_H
#include "netif/ppp/pppcrypt.h"
#include "pppcrypt.h"
#ifdef __cplusplus
extern "C" {

View File

@ -33,7 +33,7 @@
* 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
#ifndef LWIP_INCLUDED_POLARSSL_ARC4_H

View File

@ -33,7 +33,7 @@
* 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
#ifndef LWIP_INCLUDED_POLARSSL_DES_H

View File

@ -33,7 +33,7 @@
* 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
#ifndef LWIP_INCLUDED_POLARSSL_MD4_H

View File

@ -33,7 +33,7 @@
* 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
#ifndef LWIP_INCLUDED_POLARSSL_MD5_H

View File

@ -33,7 +33,7 @@
* 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
#ifndef LWIP_INCLUDED_POLARSSL_SHA1_H

View File

@ -31,7 +31,7 @@
* 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 */
#ifndef PPP_H

View File

@ -33,7 +33,7 @@
#ifndef 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 */

View File

@ -28,16 +28,16 @@
#ifndef 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 */
#include "lwip/sys.h"
#include "lwip/netif.h"
#include "lwip/priv/tcpip_priv.h"
#include "netif/ppp/ppp.h"
#include "ppp.h"
#if PPPOS_SUPPORT
#include "netif/ppp/pppos.h"
#include "pppos.h"
#endif /* PPPOS_SUPPORT */
#ifdef __cplusplus

View File

@ -30,7 +30,7 @@
* 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 */
/* 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
#include "netif/ppp/polarssl/md4.h"
#include "polarssl/md4.h"
#define lwip_md4_context md4_context
#define lwip_md4_init(context)
#define lwip_md4_starts md4_starts
@ -61,7 +61,7 @@ extern "C" {
#define lwip_md4_finish md4_finish
#define lwip_md4_free(context)
#include "netif/ppp/polarssl/md5.h"
#include "polarssl/md5.h"
#define lwip_md5_context md5_context
#define lwip_md5_init(context)
#define lwip_md5_starts md5_starts
@ -69,7 +69,7 @@ extern "C" {
#define lwip_md5_finish md5_finish
#define lwip_md5_free(context)
#include "netif/ppp/polarssl/sha1.h"
#include "polarssl/sha1.h"
#define lwip_sha1_context sha1_context
#define lwip_sha1_init(context)
#define lwip_sha1_starts sha1_starts
@ -77,14 +77,14 @@ extern "C" {
#define lwip_sha1_finish sha1_finish
#define lwip_sha1_free(context)
#include "netif/ppp/polarssl/des.h"
#include "polarssl/des.h"
#define lwip_des_context des_context
#define lwip_des_init(context)
#define lwip_des_setkey_enc des_setkey_enc
#define lwip_des_crypt_ecb des_crypt_ecb
#define lwip_des_free(context)
#include "netif/ppp/polarssl/arc4.h"
#include "polarssl/arc4.h"
#define lwip_arc4_context arc4_context
#define lwip_arc4_init(context)
#define lwip_arc4_setup arc4_setup

View File

@ -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 */
#ifndef PPPDEBUG_H

View File

@ -67,7 +67,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* 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 */
#ifndef PPP_OE_H

View File

@ -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 */
#ifndef PPPOL2TP_H

View File

@ -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 */
#ifndef PPPOS_H

View File

@ -42,7 +42,7 @@
* $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 */
#ifndef UPAP_H

View File

@ -22,7 +22,7 @@
* - 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 */
#ifndef VJ_H

View File

@ -40,7 +40,7 @@
* 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 */
/*

View File

@ -147,7 +147,7 @@
* 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 0 /* UNUSED */
@ -162,11 +162,11 @@
#include <arpa/inet.h>
#endif /* UNUSED */
#include "netif/ppp/ppp_impl.h"
#include "netif/ppp/fsm.h"
#include "netif/ppp/ipcp.h"
#include "netif/ppp/ipv6cp.h"
#include "netif/ppp/magic.h"
#include "ppp_impl.h"
#include "fsm.h"
#include "ipcp.h"
#include "ipv6cp.h"
#include "magic.h"
/* global vars */
#if 0 /* UNUSED */

View File

@ -40,7 +40,7 @@
* 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 */
/*
@ -53,14 +53,14 @@
#include <stdlib.h>
#endif /* UNUSED */
#include "netif/ppp/ppp_impl.h"
#include "ppp_impl.h"
#include "netif/ppp/fsm.h"
#include "netif/ppp/lcp.h"
#include "fsm.h"
#include "lcp.h"
#if CHAP_SUPPORT
#include "netif/ppp/chap-new.h"
#include "chap-new.h"
#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,

View File

@ -72,15 +72,15 @@
* 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 */
#include "netif/ppp/ppp_impl.h"
#include "netif/ppp/magic.h"
#include "ppp_impl.h"
#include "magic.h"
#if PPP_MD5_RANDM /* Using MD5 for better randomness if enabled */
#include "netif/ppp/pppcrypt.h"
#include "pppcrypt.h"
#define MD5_HASH_SIZE 16
static char magic_randpool[MD5_HASH_SIZE]; /* Pool of randomness. */

View File

@ -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
}
}
}

View File

@ -23,18 +23,18 @@
* 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 */
#include <string.h>
#include "lwip/err.h"
#include "netif/ppp/ppp_impl.h"
#include "netif/ppp/ccp.h"
#include "netif/ppp/mppe.h"
#include "netif/ppp/pppdebug.h"
#include "netif/ppp/pppcrypt.h"
#include "ppp_impl.h"
#include "ccp.h"
#include "mppe.h"
#include "pppdebug.h"
#include "pppcrypt.h"
#define SHA1_SIGNATURE_SIZE 20

View File

@ -28,7 +28,7 @@
* 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 */
/* Multilink support
@ -49,11 +49,11 @@
#include <netinet/in.h>
#include <unistd.h>
#include "netif/ppp/ppp_impl.h"
#include "ppp_impl.h"
#include "netif/ppp/fsm.h"
#include "netif/ppp/lcp.h"
#include "netif/ppp/tdb.h"
#include "fsm.h"
#include "lcp.h"
#include "tdb.h"
bool endpoint_specified; /* user gave explicit endpoint discriminator */
char *bundle_id; /* identifier for our bundle */

View File

@ -38,10 +38,10 @@
* 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
#include "netif/ppp/polarssl/arc4.h"
#include "polarssl/arc4.h"
/*
* ARC4 key schedule
*/

View File

@ -39,10 +39,10 @@
* 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
#include "netif/ppp/polarssl/des.h"
#include "polarssl/des.h"
/*
* 32-bit integer manipulation macros (big endian)

View File

@ -39,10 +39,10 @@
* http://www.ietf.org/rfc/rfc1320.txt
*/
#include "netif/ppp/ppp_opts.h"
#include "ppp_opts.h"
#if PPP_SUPPORT && LWIP_INCLUDED_POLARSSL_MD4
#include "netif/ppp/polarssl/md4.h"
#include "polarssl/md4.h"
#include <string.h>

View File

@ -38,10 +38,10 @@
* http://www.ietf.org/rfc/rfc1321.txt
*/
#include "netif/ppp/ppp_opts.h"
#include "ppp_opts.h"
#if PPP_SUPPORT && LWIP_INCLUDED_POLARSSL_MD5
#include "netif/ppp/polarssl/md5.h"
#include "polarssl/md5.h"
#include <string.h>

View File

@ -38,10 +38,10 @@
* 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
#include "netif/ppp/polarssl/sha1.h"
#include "polarssl/sha1.h"
#include <string.h>

View File

@ -85,7 +85,7 @@
* @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 */
#include "lwip/pbuf.h"
@ -100,39 +100,39 @@
#endif /* PPP_IPV6_SUPPORT */
#include "lwip/dns.h"
#include "netif/ppp/ppp_impl.h"
#include "netif/ppp/pppos.h"
#include "ppp_impl.h"
#include "pppos.h"
#include "netif/ppp/fsm.h"
#include "netif/ppp/lcp.h"
#include "netif/ppp/magic.h"
#include "fsm.h"
#include "lcp.h"
#include "magic.h"
#if PAP_SUPPORT
#include "netif/ppp/upap.h"
#include "upap.h"
#endif /* PAP_SUPPORT */
#if CHAP_SUPPORT
#include "netif/ppp/chap-new.h"
#include "chap-new.h"
#endif /* CHAP_SUPPORT */
#if EAP_SUPPORT
#include "netif/ppp/eap.h"
#include "eap.h"
#endif /* EAP_SUPPORT */
#if CCP_SUPPORT
#include "netif/ppp/ccp.h"
#include "ccp.h"
#endif /* CCP_SUPPORT */
#if MPPE_SUPPORT
#include "netif/ppp/mppe.h"
#include "mppe.h"
#endif /* MPPE_SUPPORT */
#if ECP_SUPPORT
#include "netif/ppp/ecp.h"
#include "ecp.h"
#endif /* EAP_SUPPORT */
#if VJ_SUPPORT
#include "netif/ppp/vj.h"
#include "vj.h"
#endif /* VJ_SUPPORT */
#if PPP_IPV4_SUPPORT
#include "netif/ppp/ipcp.h"
#include "ipcp.h"
#endif /* PPP_IPV4_SUPPORT */
#if PPP_IPV6_SUPPORT
#include "netif/ppp/ipv6cp.h"
#include "ipv6cp.h"
#endif /* PPP_IPV6_SUPPORT */
/*************************/

View File

@ -57,15 +57,15 @@
* 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 */
#include <string.h>
#include "netif/ppp/ppp_impl.h"
#include "ppp_impl.h"
#include "netif/ppp/fsm.h"
#include "netif/ppp/ecp.h"
#include "fsm.h"
#include "ecp.h"
#if PPP_OPTIONS
static option_t ecp_option_list[] = {

View File

@ -14,6 +14,7 @@
* limitations under the License.
*/
#include "mbed.h"
#include <errno.h>
#include "platform/FileHandle.h"
#include "platform/mbed_poll.h"
@ -27,7 +28,7 @@
#include "lwip/dns.h"
#include "lwip/pbuf.h"
extern "C" { // "pppos.h" is missing extern C
#include "netif/ppp/pppapi.h"
#include "pppapi.h"
}
#include "nsapi_ppp.h"
@ -39,7 +40,7 @@ namespace mbed {
using rtos::Thread;
using events::EventQueue;
#if LWIP_PPP_API
#if PPP_SUPPORT
static EventQueue *event_queue;
static Thread *event_thread;
@ -48,13 +49,13 @@ static nsapi_error_t connect_error_code;
// Just one interface for now
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 bool ppp_active = false;
static bool blocking_connect = true;
static const char *login;
static const char *pwd;
static sys_sem_t ppp_close_sem;
static Callback<void(nsapi_event_t, intptr_t)> connection_status_cb;
static EventQueue *prepare_event_queue()
@ -68,7 +69,7 @@ static EventQueue *prepare_event_queue()
// Only need to queue 2 events. new blows on failure.
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) {
delete event_thread;
@ -214,7 +215,7 @@ static void ppp_link_status(ppp_pcb *pcb, int err_code, void *ctx)
if (ppp_active) {
ppp_active = false;
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 */
@ -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
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;
}
extern "C" err_t ppp_lwip_disconnect(void *pcb)
extern "C" err_t ppp_if_disconnect(void *pcb)
{
err_t ret = ERR_OK;
if (ppp_active) {
ret = ppp_close(my_ppp_pcb, 0);
if (ret == ERR_OK) {
/* 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;
}
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()) {
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;
}
sys_sem_new(&ppp_close_sem, 0);
}
#if LWIP_IPV4
@ -366,8 +366,8 @@ nsapi_error_t nsapi_ppp_connect(FileHandle *stream, Callback<void(nsapi_event_t,
nsapi_error_t retcode;
if (!my_interface) {
LWIP &lwip = LWIP::get_instance();
retcode = lwip._add_ppp_interface(stream, true, stack, &my_interface);
OnboardNetworkStack &_stack = OnboardNetworkStack::get_default_instance();
retcode = _stack.add_ppp_interface(stream, true, stack, &my_interface);
if (retcode != NSAPI_ERROR_OK) {
my_interface = NULL;
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 -
// 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);
if (retcode != NSAPI_ERROR_OK) {
@ -414,7 +414,7 @@ nsapi_error_t nsapi_ppp_disconnect(FileHandle *stream)
NetworkStack *nsapi_ppp_get_stack()
{
return &LWIP::get_instance();
return &OnboardNetworkStack::get_default_instance();
}
const char *nsapi_ppp_get_ip_addr(FileHandle *stream)
@ -461,6 +461,6 @@ const char *nsapi_ppp_get_gw_addr(FileHandle *stream)
return NULL;
}
#endif /* LWIP_PPP_API */
#endif /* PPP_SUPPORT */
} // namespace mbed

View File

@ -15,7 +15,7 @@
*/
#ifndef PPP_LWIP_H_
#define PPP_LWIP_H_
#include "netif/ppp/pppapi.h"
#include "pppapi.h"
#ifdef __cplusplus
extern "C" {
#endif
@ -30,7 +30,7 @@ extern "C" {
*
* @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
*
@ -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
*/
err_t ppp_lwip_connect(void *pcb);
err_t ppp_if_connect(void *pcb);
/** 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
*/
err_t ppp_lwip_disconnect(void *pcb);
err_t ppp_if_disconnect(void *pcb);
#else
/**
* Stubs in case LWIP PPP is not enabled
*/
#define ppp_lwip_if_init(pcb, netif, stack) NSAPI_ERROR_UNSUPPORTED
#define ppp_lwip_connect(pcb) ERR_IF
#define ppp_lwip_disconnect(pcb) ERR_IF
#define ppp_if_init(pcb, netif, stack) NSAPI_ERROR_UNSUPPORTED
#define ppp_if_connect(pcb) ERR_IF
#define ppp_if_disconnect(pcb) ERR_IF
#endif //LWIP_PPP_API
#ifdef __cplusplus
}

View File

@ -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 */
#include "netif/ppp/pppapi.h"
#include "pppapi.h"
#include "lwip/priv/tcpip_priv.h"
#include "netif/ppp/pppoe.h"
#include "netif/ppp/pppol2tp.h"
#include "netif/ppp/pppos.h"
#include "pppoe.h"
#include "pppol2tp.h"
#include "pppos.h"
#if LWIP_MPU_COMPATIBLE
LWIP_MEMPOOL_DECLARE(PPPAPI_MSG, MEMP_NUM_PPP_API_MSG, sizeof(struct pppapi_msg), "PPPAPI_MSG")

View File

@ -30,12 +30,12 @@
* 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 */
#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) {

View File

@ -68,7 +68,7 @@
* 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 0 /* UNUSED */
@ -82,10 +82,10 @@
#include "lwip/snmp.h"
#include "netif/ethernet.h"
#include "netif/ppp/ppp_impl.h"
#include "netif/ppp/lcp.h"
#include "netif/ppp/ipcp.h"
#include "netif/ppp/pppoe.h"
#include "ppp_impl.h"
#include "lcp.h"
#include "ipcp.h"
#include "pppoe.h"
/* Memory pool */
LWIP_MEMPOOL_DECLARE(PPPOE_IF, MEMP_NUM_PPPOE_INTERFACES, sizeof(struct pppoe_softc), "PPPOE_IF")

View File

@ -50,7 +50,7 @@
* - 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 */
#include "lwip/err.h"
@ -59,12 +59,12 @@
#include "lwip/udp.h"
#include "lwip/snmp.h"
#include "netif/ppp/ppp_impl.h"
#include "netif/ppp/lcp.h"
#include "netif/ppp/ipcp.h"
#include "netif/ppp/pppol2tp.h"
#include "netif/ppp/pppcrypt.h"
#include "netif/ppp/magic.h"
#include "ppp_impl.h"
#include "lcp.h"
#include "ipcp.h"
#include "pppol2tp.h"
#include "pppcrypt.h"
#include "magic.h"
/* Memory pool */
LWIP_MEMPOOL_DECLARE(PPPOL2TP_PCB, MEMP_NUM_PPPOL2TP_INTERFACES, sizeof(pppol2tp_pcb), "PPPOL2TP_PCB")

View File

@ -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 */
#include <string.h>
@ -47,9 +47,9 @@
#include "lwip/api.h"
#include "lwip/ip4.h" /* for ip4_input() */
#include "netif/ppp/ppp_impl.h"
#include "netif/ppp/pppos.h"
#include "netif/ppp/vj.h"
#include "ppp_impl.h"
#include "pppos.h"
#include "vj.h"
/* Memory pool */
LWIP_MEMPOOL_DECLARE(PPPOS_PCB, MEMP_NUM_PPPOS_INTERFACES, sizeof(pppos_pcb), "PPPOS_PCB")

View File

@ -40,7 +40,7 @@
* 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 */
/*
@ -52,9 +52,9 @@
#include <string.h>
#endif /* UNUSED */
#include "netif/ppp/ppp_impl.h"
#include "ppp_impl.h"
#include "netif/ppp/upap.h"
#include "upap.h"
#if PPP_OPTIONS
/*

View File

@ -28,7 +28,7 @@
* 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 0 /* UNUSED */
@ -58,10 +58,10 @@
#endif
#endif /* UNUSED */
#include "netif/ppp/ppp_impl.h"
#include "ppp_impl.h"
#include "netif/ppp/fsm.h"
#include "netif/ppp/lcp.h"
#include "fsm.h"
#include "lcp.h"
#if defined(SUNOS4)
extern char *strerror();

View File

@ -28,13 +28,13 @@
* 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 */
#include "netif/ppp/ppp_impl.h"
#include "netif/ppp/pppdebug.h"
#include "ppp_impl.h"
#include "pppdebug.h"
#include "netif/ppp/vj.h"
#include "vj.h"
#include <string.h>