From c518319fa356317d7ee11134a1a0e55a0a6e4699 Mon Sep 17 00:00:00 2001 From: Kari Haapalehto Date: Tue, 7 May 2019 15:16:22 +0300 Subject: [PATCH] Moved PPP from lwip directory to under netsocket Moved PPP and renamed files and constants. --- features/lwipstack/lwip-sys/lwip_tcp_isn.c | 8 ++--- features/lwipstack/lwip/src/core/lwip_init.c | 4 +-- features/lwipstack/lwip/src/core/lwip_memp.c | 2 +- .../src/netif => netsocket}/ppp/PPPD_FOLLOWUP | 0 .../ppp/lwip_auth.c => netsocket/ppp/auth.c} | 22 ++++++------- .../ppp/lwip_ccp.c => netsocket/ppp/ccp.c} | 12 +++---- .../ppp/chap-md5.c} | 12 +++---- .../ppp/chap-new.c} | 12 +++---- .../ppp/chap_ms.c} | 14 ++++---- .../lwip_demand.c => netsocket/ppp/demand.c} | 10 +++--- .../ppp/lwip_eap.c => netsocket/ppp/eap.c} | 10 +++--- .../lwip_eui64.c => netsocket/ppp/eui64.c} | 6 ++-- .../ppp/lwip_fsm.c => netsocket/ppp/fsm.c} | 6 ++-- .../netif/ppp => netsocket/ppp/include}/ccp.h | 2 +- .../ppp => netsocket/ppp/include}/chap-md5.h | 2 +- .../ppp => netsocket/ppp/include}/chap-new.h | 2 +- .../ppp => netsocket/ppp/include}/chap_ms.h | 2 +- .../netif/ppp => netsocket/ppp/include}/eap.h | 2 +- .../netif/ppp => netsocket/ppp/include}/ecp.h | 2 +- .../ppp => netsocket/ppp/include}/eui64.h | 2 +- .../netif/ppp => netsocket/ppp/include}/fsm.h | 2 +- .../ppp => netsocket/ppp/include}/ipcp.h | 2 +- .../ppp => netsocket/ppp/include}/ipv6cp.h | 2 +- .../netif/ppp => netsocket/ppp/include}/lcp.h | 2 +- .../ppp => netsocket/ppp/include}/magic.h | 2 +- .../ppp => netsocket/ppp/include}/mppe.h | 4 +-- .../ppp/include}/polarssl/arc4.h | 2 +- .../ppp/include}/polarssl/des.h | 2 +- .../ppp/include}/polarssl/md4.h | 2 +- .../ppp/include}/polarssl/md5.h | 2 +- .../ppp/include}/polarssl/sha1.h | 2 +- .../netif/ppp => netsocket/ppp/include}/ppp.h | 2 +- .../ppp => netsocket/ppp/include}/ppp_impl.h | 2 +- .../ppp => netsocket/ppp/include}/ppp_opts.h | 0 .../ppp => netsocket/ppp/include}/pppapi.h | 6 ++-- .../ppp => netsocket/ppp/include}/pppcrypt.h | 12 +++---- .../ppp => netsocket/ppp/include}/pppdebug.h | 2 +- .../ppp => netsocket/ppp/include}/pppoe.h | 2 +- .../ppp => netsocket/ppp/include}/pppol2tp.h | 2 +- .../ppp => netsocket/ppp/include}/pppos.h | 2 +- .../ppp => netsocket/ppp/include}/upap.h | 2 +- .../netif/ppp => netsocket/ppp/include}/vj.h | 2 +- .../ppp/lwip_ipcp.c => netsocket/ppp/ipcp.c} | 2 +- .../lwip_ipv6cp.c => netsocket/ppp/ipv6cp.c} | 12 +++---- .../ppp/lwip_lcp.c => netsocket/ppp/lcp.c} | 12 +++---- .../lwip_magic.c => netsocket/ppp/magic.c} | 8 ++--- features/netsocket/ppp/mbed_lib.json | 29 +++++++++++++++++ .../ppp/lwip_mppe.c => netsocket/ppp/mppe.c} | 12 +++---- .../ppp/multilink.c} | 10 +++--- .../netif => netsocket}/ppp/polarssl/README | 0 .../ppp/polarssl/lwip_arc4.c | 4 +-- .../ppp/polarssl/lwip_des.c | 4 +-- .../ppp/polarssl/lwip_md4.c | 4 +-- .../ppp/polarssl/lwip_md5.c | 4 +-- .../ppp/polarssl/lwip_sha1.c | 4 +-- .../ppp/lwip_ppp.c => netsocket/ppp/ppp.c} | 30 ++++++++--------- .../lwip_ecp.c => netsocket/ppp/ppp_ecp.c} | 8 ++--- .../{lwipstack => netsocket/ppp}/ppp_lwip.cpp | 32 +++++++++---------- .../{lwipstack => netsocket/ppp}/ppp_lwip.h | 14 ++++---- .../lwip_pppapi.c => netsocket/ppp/pppapi.c} | 10 +++--- .../ppp/pppcrypt.c} | 6 ++-- .../lwip_pppoe.c => netsocket/ppp/pppoe.c} | 10 +++--- .../ppp/pppol2tp.c} | 14 ++++---- .../lwip_pppos.c => netsocket/ppp/pppos.c} | 8 ++--- .../ppp/lwip_upap.c => netsocket/ppp/upap.c} | 6 ++-- .../lwip_utils.c => netsocket/ppp/utils.c} | 8 ++--- .../ppp/lwip_vj.c => netsocket/ppp/vj.c} | 8 ++--- 67 files changed, 239 insertions(+), 210 deletions(-) rename features/{lwipstack/lwip/src/netif => netsocket}/ppp/PPPD_FOLLOWUP (100%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_auth.c => netsocket/ppp/auth.c} (99%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_ccp.c => netsocket/ppp/ccp.c} (99%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_chap-md5.c => netsocket/ppp/chap-md5.c} (95%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_chap-new.c => netsocket/ppp/chap-new.c} (99%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_chap_ms.c => netsocket/ppp/chap_ms.c} (99%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_demand.c => netsocket/ppp/demand.c} (98%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_eap.c => netsocket/ppp/eap.c} (99%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_eui64.c => netsocket/ppp/eui64.c} (95%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_fsm.c => netsocket/ppp/fsm.c} (99%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/ccp.h (99%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/chap-md5.h (97%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/chap-new.h (99%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/chap_ms.h (98%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/eap.h (99%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/ecp.h (98%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/eui64.h (98%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/fsm.h (99%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/ipcp.h (99%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/ipv6cp.h (99%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/lcp.h (99%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/magic.h (99%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/mppe.h (98%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/polarssl/arc4.h (98%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/polarssl/des.h (98%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/polarssl/md4.h (98%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/polarssl/md5.h (98%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/polarssl/sha1.h (98%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/ppp.h (99%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/ppp_impl.h (99%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/ppp_opts.h (100%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/pppapi.h (98%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/pppcrypt.h (95%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/pppdebug.h (99%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/pppoe.h (99%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/pppol2tp.h (99%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/pppos.h (99%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/upap.h (99%) rename features/{lwipstack/lwip/src/include/netif/ppp => netsocket/ppp/include}/vj.h (99%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_ipcp.c => netsocket/ppp/ipcp.c} (99%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_ipv6cp.c => netsocket/ppp/ipv6cp.c} (99%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_lcp.c => netsocket/ppp/lcp.c} (99%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_magic.c => netsocket/ppp/magic.c} (98%) create mode 100644 features/netsocket/ppp/mbed_lib.json rename features/{lwipstack/lwip/src/netif/ppp/lwip_mppe.c => netsocket/ppp/mppe.c} (98%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_multilink.c => netsocket/ppp/multilink.c} (98%) rename features/{lwipstack/lwip/src/netif => netsocket}/ppp/polarssl/README (100%) rename features/{lwipstack/lwip/src/netif => netsocket}/ppp/polarssl/lwip_arc4.c (97%) rename features/{lwipstack/lwip/src/netif => netsocket}/ppp/polarssl/lwip_des.c (99%) rename features/{lwipstack/lwip/src/netif => netsocket}/ppp/polarssl/lwip_md4.c (99%) rename features/{lwipstack/lwip/src/netif => netsocket}/ppp/polarssl/lwip_md5.c (99%) rename features/{lwipstack/lwip/src/netif => netsocket}/ppp/polarssl/lwip_sha1.c (99%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_ppp.c => netsocket/ppp/ppp.c} (99%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_ecp.c => netsocket/ppp/ppp_ecp.c} (97%) rename features/{lwipstack => netsocket/ppp}/ppp_lwip.cpp (93%) rename features/{lwipstack => netsocket/ppp}/ppp_lwip.h (80%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_pppapi.c => netsocket/ppp/pppapi.c} (98%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_pppcrypt.c => netsocket/ppp/pppcrypt.c} (95%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_pppoe.c => netsocket/ppp/pppoe.c} (99%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_pppol2tp.c => netsocket/ppp/pppol2tp.c} (99%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_pppos.c => netsocket/ppp/pppos.c} (99%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_upap.c => netsocket/ppp/upap.c} (99%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_utils.c => netsocket/ppp/utils.c} (99%) rename features/{lwipstack/lwip/src/netif/ppp/lwip_vj.c => netsocket/ppp/vj.c} (99%) diff --git a/features/lwipstack/lwip-sys/lwip_tcp_isn.c b/features/lwipstack/lwip-sys/lwip_tcp_isn.c index 166c172db9..5cc2c7dd41 100644 --- a/features/lwipstack/lwip-sys/lwip_tcp_isn.c +++ b/features/lwipstack/lwip-sys/lwip_tcp_isn.c @@ -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]; diff --git a/features/lwipstack/lwip/src/core/lwip_init.c b/features/lwipstack/lwip/src/core/lwip_init.c index b3737a356d..005dd03ad4 100644 --- a/features/lwipstack/lwip/src/core/lwip_init.c +++ b/features/lwipstack/lwip/src/core/lwip_init.c @@ -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 diff --git a/features/lwipstack/lwip/src/core/lwip_memp.c b/features/lwipstack/lwip/src/core/lwip_memp.c index 352ce5a551..4ae2797aee 100644 --- a/features/lwipstack/lwip/src/core/lwip_memp.c +++ b/features/lwipstack/lwip/src/core/lwip_memp.c @@ -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" diff --git a/features/lwipstack/lwip/src/netif/ppp/PPPD_FOLLOWUP b/features/netsocket/ppp/PPPD_FOLLOWUP similarity index 100% rename from features/lwipstack/lwip/src/netif/ppp/PPPD_FOLLOWUP rename to features/netsocket/ppp/PPPD_FOLLOWUP diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_auth.c b/features/netsocket/ppp/auth.c similarity index 99% rename from features/lwipstack/lwip/src/netif/ppp/lwip_auth.c rename to features/netsocket/ppp/auth.c index c8673ad0fb..e836bd73ee 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_auth.c +++ b/features/netsocket/ppp/auth.c @@ -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 #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 */ diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_ccp.c b/features/netsocket/ppp/ccp.c similarity index 99% rename from features/lwipstack/lwip/src/netif/ppp/lwip_ccp.c rename to features/netsocket/ppp/ccp.c index f8519ebece..adf0493c41 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_ccp.c +++ b/features/netsocket/ppp/ccp.c @@ -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 #include -#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 */ /* diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_chap-md5.c b/features/netsocket/ppp/chap-md5.c similarity index 95% rename from features/lwipstack/lwip/src/netif/ppp/lwip_chap-md5.c rename to features/netsocket/ppp/chap-md5.c index 88f069f032..4f330495aa 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_chap-md5.c +++ b/features/netsocket/ppp/chap-md5.c @@ -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 #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 diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_chap-new.c b/features/netsocket/ppp/chap-new.c similarity index 99% rename from features/lwipstack/lwip/src/netif/ppp/lwip_chap-new.c rename to features/netsocket/ppp/chap-new.c index 485122d272..49119b27ba 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_chap-new.c +++ b/features/netsocket/ppp/chap-new.c @@ -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 #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 */ diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_chap_ms.c b/features/netsocket/ppp/chap_ms.c similarity index 99% rename from features/lwipstack/lwip/src/netif/ppp/lwip_chap_ms.c rename to features/netsocket/ppp/chap_ms.c index 5a989c9b7e..e06e1f2e40 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_chap_ms.c +++ b/features/netsocket/ppp/chap_ms.c @@ -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 #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 diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_demand.c b/features/netsocket/ppp/demand.c similarity index 98% rename from features/lwipstack/lwip/src/netif/ppp/lwip_demand.c rename to features/netsocket/ppp/demand.c index 26c6c30db1..374c1dcdc2 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_demand.c +++ b/features/netsocket/ppp/demand.c @@ -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 @@ -52,11 +52,11 @@ #include #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; diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_eap.c b/features/netsocket/ppp/eap.c similarity index 99% rename from features/lwipstack/lwip/src/netif/ppp/lwip_eap.c rename to features/netsocket/ppp/eap.c index 8fb56368e7..95f1dace23 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_eap.c +++ b/features/netsocket/ppp/eap.c @@ -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 diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_eui64.c b/features/netsocket/ppp/eui64.c similarity index 95% rename from features/lwipstack/lwip/src/netif/ppp/lwip_eui64.c rename to features/netsocket/ppp/eui64.c index 01493bc1f8..05036c6863 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_eui64.c +++ b/features/netsocket/ppp/eui64.c @@ -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 diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_fsm.c b/features/netsocket/ppp/fsm.c similarity index 99% rename from features/lwipstack/lwip/src/netif/ppp/lwip_fsm.c rename to features/netsocket/ppp/fsm.c index b1f08affff..84caf656d4 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_fsm.c +++ b/features/netsocket/ppp/fsm.c @@ -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 #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); diff --git a/features/lwipstack/lwip/src/include/netif/ppp/ccp.h b/features/netsocket/ppp/include/ccp.h similarity index 99% rename from features/lwipstack/lwip/src/include/netif/ppp/ccp.h rename to features/netsocket/ppp/include/ccp.h index b2285228b8..12bff58cef 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/ccp.h +++ b/features/netsocket/ppp/include/ccp.h @@ -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 diff --git a/features/lwipstack/lwip/src/include/netif/ppp/chap-md5.h b/features/netsocket/ppp/include/chap-md5.h similarity index 97% rename from features/lwipstack/lwip/src/include/netif/ppp/chap-md5.h rename to features/netsocket/ppp/include/chap-md5.h index eb0269fe50..645864ed41 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/chap-md5.h +++ b/features/netsocket/ppp/include/chap-md5.h @@ -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; diff --git a/features/lwipstack/lwip/src/include/netif/ppp/chap-new.h b/features/netsocket/ppp/include/chap-new.h similarity index 99% rename from features/lwipstack/lwip/src/include/netif/ppp/chap-new.h rename to features/netsocket/ppp/include/chap-new.h index 2d8cd9ca99..fc837dffc8 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/chap-new.h +++ b/features/netsocket/ppp/include/chap-new.h @@ -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 diff --git a/features/lwipstack/lwip/src/include/netif/ppp/chap_ms.h b/features/netsocket/ppp/include/chap_ms.h similarity index 98% rename from features/lwipstack/lwip/src/include/netif/ppp/chap_ms.h rename to features/netsocket/ppp/include/chap_ms.h index 0795291158..4a754744a0 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/chap_ms.h +++ b/features/netsocket/ppp/include/chap_ms.h @@ -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 diff --git a/features/lwipstack/lwip/src/include/netif/ppp/eap.h b/features/netsocket/ppp/include/eap.h similarity index 99% rename from features/lwipstack/lwip/src/include/netif/ppp/eap.h rename to features/netsocket/ppp/include/eap.h index 3ee9aaf81a..4adca9c9ce 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/eap.h +++ b/features/netsocket/ppp/include/eap.h @@ -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 diff --git a/features/lwipstack/lwip/src/include/netif/ppp/ecp.h b/features/netsocket/ppp/include/ecp.h similarity index 98% rename from features/lwipstack/lwip/src/include/netif/ppp/ecp.h rename to features/netsocket/ppp/include/ecp.h index d8808c3ab2..38a844b798 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/ecp.h +++ b/features/netsocket/ppp/include/ecp.h @@ -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 diff --git a/features/lwipstack/lwip/src/include/netif/ppp/eui64.h b/features/netsocket/ppp/include/eui64.h similarity index 98% rename from features/lwipstack/lwip/src/include/netif/ppp/eui64.h rename to features/netsocket/ppp/include/eui64.h index 5adeb482a8..b7bb1dfddd 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/eui64.h +++ b/features/netsocket/ppp/include/eui64.h @@ -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 diff --git a/features/lwipstack/lwip/src/include/netif/ppp/fsm.h b/features/netsocket/ppp/include/fsm.h similarity index 99% rename from features/lwipstack/lwip/src/include/netif/ppp/fsm.h rename to features/netsocket/ppp/include/fsm.h index 8dec700e07..be2fa82cbc 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/fsm.h +++ b/features/netsocket/ppp/include/fsm.h @@ -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 diff --git a/features/lwipstack/lwip/src/include/netif/ppp/ipcp.h b/features/netsocket/ppp/include/ipcp.h similarity index 99% rename from features/lwipstack/lwip/src/include/netif/ppp/ipcp.h rename to features/netsocket/ppp/include/ipcp.h index 32fdd1c641..1aef48bbcb 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/ipcp.h +++ b/features/netsocket/ppp/include/ipcp.h @@ -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 diff --git a/features/lwipstack/lwip/src/include/netif/ppp/ipv6cp.h b/features/netsocket/ppp/include/ipv6cp.h similarity index 99% rename from features/lwipstack/lwip/src/include/netif/ppp/ipv6cp.h rename to features/netsocket/ppp/include/ipv6cp.h index 9099973869..17d31d31cd 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/ipv6cp.h +++ b/features/netsocket/ppp/include/ipv6cp.h @@ -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 diff --git a/features/lwipstack/lwip/src/include/netif/ppp/lcp.h b/features/netsocket/ppp/include/lcp.h similarity index 99% rename from features/lwipstack/lwip/src/include/netif/ppp/lcp.h rename to features/netsocket/ppp/include/lcp.h index 18ad1cb23b..2d36431269 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/lcp.h +++ b/features/netsocket/ppp/include/lcp.h @@ -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 diff --git a/features/lwipstack/lwip/src/include/netif/ppp/magic.h b/features/netsocket/ppp/include/magic.h similarity index 99% rename from features/lwipstack/lwip/src/include/netif/ppp/magic.h rename to features/netsocket/ppp/include/magic.h index a165e18fa6..a397fd27be 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/magic.h +++ b/features/netsocket/ppp/include/magic.h @@ -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 diff --git a/features/lwipstack/lwip/src/include/netif/ppp/mppe.h b/features/netsocket/ppp/include/mppe.h similarity index 98% rename from features/lwipstack/lwip/src/include/netif/ppp/mppe.h rename to features/netsocket/ppp/include/mppe.h index 5de1128479..dc2422cf83 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/mppe.h +++ b/features/netsocket/ppp/include/mppe.h @@ -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" { diff --git a/features/lwipstack/lwip/src/include/netif/ppp/polarssl/arc4.h b/features/netsocket/ppp/include/polarssl/arc4.h similarity index 98% rename from features/lwipstack/lwip/src/include/netif/ppp/polarssl/arc4.h rename to features/netsocket/ppp/include/polarssl/arc4.h index 4af724cd90..417e239bd8 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/polarssl/arc4.h +++ b/features/netsocket/ppp/include/polarssl/arc4.h @@ -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 diff --git a/features/lwipstack/lwip/src/include/netif/ppp/polarssl/des.h b/features/netsocket/ppp/include/polarssl/des.h similarity index 98% rename from features/lwipstack/lwip/src/include/netif/ppp/polarssl/des.h rename to features/netsocket/ppp/include/polarssl/des.h index e893890ed7..aaf25c16a1 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/polarssl/des.h +++ b/features/netsocket/ppp/include/polarssl/des.h @@ -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 diff --git a/features/lwipstack/lwip/src/include/netif/ppp/polarssl/md4.h b/features/netsocket/ppp/include/polarssl/md4.h similarity index 98% rename from features/lwipstack/lwip/src/include/netif/ppp/polarssl/md4.h rename to features/netsocket/ppp/include/polarssl/md4.h index 570445687e..1719e336a3 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/polarssl/md4.h +++ b/features/netsocket/ppp/include/polarssl/md4.h @@ -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 diff --git a/features/lwipstack/lwip/src/include/netif/ppp/polarssl/md5.h b/features/netsocket/ppp/include/polarssl/md5.h similarity index 98% rename from features/lwipstack/lwip/src/include/netif/ppp/polarssl/md5.h rename to features/netsocket/ppp/include/polarssl/md5.h index 1244011890..2dd7a3540c 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/polarssl/md5.h +++ b/features/netsocket/ppp/include/polarssl/md5.h @@ -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 diff --git a/features/lwipstack/lwip/src/include/netif/ppp/polarssl/sha1.h b/features/netsocket/ppp/include/polarssl/sha1.h similarity index 98% rename from features/lwipstack/lwip/src/include/netif/ppp/polarssl/sha1.h rename to features/netsocket/ppp/include/polarssl/sha1.h index a4c53e07c5..409776ffb3 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/polarssl/sha1.h +++ b/features/netsocket/ppp/include/polarssl/sha1.h @@ -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 diff --git a/features/lwipstack/lwip/src/include/netif/ppp/ppp.h b/features/netsocket/ppp/include/ppp.h similarity index 99% rename from features/lwipstack/lwip/src/include/netif/ppp/ppp.h rename to features/netsocket/ppp/include/ppp.h index 73c6d53178..c9be4ad3ea 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/ppp.h +++ b/features/netsocket/ppp/include/ppp.h @@ -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 diff --git a/features/lwipstack/lwip/src/include/netif/ppp/ppp_impl.h b/features/netsocket/ppp/include/ppp_impl.h similarity index 99% rename from features/lwipstack/lwip/src/include/netif/ppp/ppp_impl.h rename to features/netsocket/ppp/include/ppp_impl.h index 40843d5a0a..9433bc0f95 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/ppp_impl.h +++ b/features/netsocket/ppp/include/ppp_impl.h @@ -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 */ diff --git a/features/lwipstack/lwip/src/include/netif/ppp/ppp_opts.h b/features/netsocket/ppp/include/ppp_opts.h similarity index 100% rename from features/lwipstack/lwip/src/include/netif/ppp/ppp_opts.h rename to features/netsocket/ppp/include/ppp_opts.h diff --git a/features/lwipstack/lwip/src/include/netif/ppp/pppapi.h b/features/netsocket/ppp/include/pppapi.h similarity index 98% rename from features/lwipstack/lwip/src/include/netif/ppp/pppapi.h rename to features/netsocket/ppp/include/pppapi.h index 913d93f749..f9c0b22550 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/pppapi.h +++ b/features/netsocket/ppp/include/pppapi.h @@ -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 diff --git a/features/lwipstack/lwip/src/include/netif/ppp/pppcrypt.h b/features/netsocket/ppp/include/pppcrypt.h similarity index 95% rename from features/lwipstack/lwip/src/include/netif/ppp/pppcrypt.h rename to features/netsocket/ppp/include/pppcrypt.h index c0230bbcb7..a7444489c9 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/pppcrypt.h +++ b/features/netsocket/ppp/include/pppcrypt.h @@ -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 diff --git a/features/lwipstack/lwip/src/include/netif/ppp/pppdebug.h b/features/netsocket/ppp/include/pppdebug.h similarity index 99% rename from features/lwipstack/lwip/src/include/netif/ppp/pppdebug.h rename to features/netsocket/ppp/include/pppdebug.h index 36ee4f9bf9..9f82b68637 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/pppdebug.h +++ b/features/netsocket/ppp/include/pppdebug.h @@ -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 diff --git a/features/lwipstack/lwip/src/include/netif/ppp/pppoe.h b/features/netsocket/ppp/include/pppoe.h similarity index 99% rename from features/lwipstack/lwip/src/include/netif/ppp/pppoe.h rename to features/netsocket/ppp/include/pppoe.h index 08ab7ab54e..c7603094e3 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/pppoe.h +++ b/features/netsocket/ppp/include/pppoe.h @@ -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 diff --git a/features/lwipstack/lwip/src/include/netif/ppp/pppol2tp.h b/features/netsocket/ppp/include/pppol2tp.h similarity index 99% rename from features/lwipstack/lwip/src/include/netif/ppp/pppol2tp.h rename to features/netsocket/ppp/include/pppol2tp.h index 1221ca15b7..6460cc30e1 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/pppol2tp.h +++ b/features/netsocket/ppp/include/pppol2tp.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 */ #ifndef PPPOL2TP_H diff --git a/features/lwipstack/lwip/src/include/netif/ppp/pppos.h b/features/netsocket/ppp/include/pppos.h similarity index 99% rename from features/lwipstack/lwip/src/include/netif/ppp/pppos.h rename to features/netsocket/ppp/include/pppos.h index 380a965ce6..eb4aa4f69b 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/pppos.h +++ b/features/netsocket/ppp/include/pppos.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 */ #ifndef PPPOS_H diff --git a/features/lwipstack/lwip/src/include/netif/ppp/upap.h b/features/netsocket/ppp/include/upap.h similarity index 99% rename from features/lwipstack/lwip/src/include/netif/ppp/upap.h rename to features/netsocket/ppp/include/upap.h index 540d981492..19e8606581 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/upap.h +++ b/features/netsocket/ppp/include/upap.h @@ -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 diff --git a/features/lwipstack/lwip/src/include/netif/ppp/vj.h b/features/netsocket/ppp/include/vj.h similarity index 99% rename from features/lwipstack/lwip/src/include/netif/ppp/vj.h rename to features/netsocket/ppp/include/vj.h index 77d9976c52..b802b32dd1 100644 --- a/features/lwipstack/lwip/src/include/netif/ppp/vj.h +++ b/features/netsocket/ppp/include/vj.h @@ -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 diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_ipcp.c b/features/netsocket/ppp/ipcp.c similarity index 99% rename from features/lwipstack/lwip/src/netif/ppp/lwip_ipcp.c rename to features/netsocket/ppp/ipcp.c index 05108a0628..540029121c 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_ipcp.c +++ b/features/netsocket/ppp/ipcp.c @@ -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 */ /* diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_ipv6cp.c b/features/netsocket/ppp/ipv6cp.c similarity index 99% rename from features/lwipstack/lwip/src/netif/ppp/lwip_ipv6cp.c rename to features/netsocket/ppp/ipv6cp.c index f1592c6faf..fca2861585 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_ipv6cp.c +++ b/features/netsocket/ppp/ipv6cp.c @@ -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 #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 */ diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_lcp.c b/features/netsocket/ppp/lcp.c similarity index 99% rename from features/lwipstack/lwip/src/netif/ppp/lwip_lcp.c rename to features/netsocket/ppp/lcp.c index 90ed183b75..1c15839e30 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_lcp.c +++ b/features/netsocket/ppp/lcp.c @@ -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 #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, diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_magic.c b/features/netsocket/ppp/magic.c similarity index 98% rename from features/lwipstack/lwip/src/netif/ppp/lwip_magic.c rename to features/netsocket/ppp/magic.c index d0d87c5e55..c4578ea3de 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_magic.c +++ b/features/netsocket/ppp/magic.c @@ -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. */ diff --git a/features/netsocket/ppp/mbed_lib.json b/features/netsocket/ppp/mbed_lib.json new file mode 100644 index 0000000000..6d1033ad65 --- /dev/null +++ b/features/netsocket/ppp/mbed_lib.json @@ -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 + } + } +} diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_mppe.c b/features/netsocket/ppp/mppe.c similarity index 98% rename from features/lwipstack/lwip/src/netif/ppp/lwip_mppe.c rename to features/netsocket/ppp/mppe.c index 4cca89dec1..3cfea2ce32 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_mppe.c +++ b/features/netsocket/ppp/mppe.c @@ -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 #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 diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_multilink.c b/features/netsocket/ppp/multilink.c similarity index 98% rename from features/lwipstack/lwip/src/netif/ppp/lwip_multilink.c rename to features/netsocket/ppp/multilink.c index 62014e8c87..eb0087105f 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_multilink.c +++ b/features/netsocket/ppp/multilink.c @@ -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 #include -#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 */ diff --git a/features/lwipstack/lwip/src/netif/ppp/polarssl/README b/features/netsocket/ppp/polarssl/README similarity index 100% rename from features/lwipstack/lwip/src/netif/ppp/polarssl/README rename to features/netsocket/ppp/polarssl/README diff --git a/features/lwipstack/lwip/src/netif/ppp/polarssl/lwip_arc4.c b/features/netsocket/ppp/polarssl/lwip_arc4.c similarity index 97% rename from features/lwipstack/lwip/src/netif/ppp/polarssl/lwip_arc4.c rename to features/netsocket/ppp/polarssl/lwip_arc4.c index 6e17ec421b..22edc4c21f 100644 --- a/features/lwipstack/lwip/src/netif/ppp/polarssl/lwip_arc4.c +++ b/features/netsocket/ppp/polarssl/lwip_arc4.c @@ -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 */ diff --git a/features/lwipstack/lwip/src/netif/ppp/polarssl/lwip_des.c b/features/netsocket/ppp/polarssl/lwip_des.c similarity index 99% rename from features/lwipstack/lwip/src/netif/ppp/polarssl/lwip_des.c rename to features/netsocket/ppp/polarssl/lwip_des.c index 9a89d007bd..1ad7f4ca75 100644 --- a/features/lwipstack/lwip/src/netif/ppp/polarssl/lwip_des.c +++ b/features/netsocket/ppp/polarssl/lwip_des.c @@ -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) diff --git a/features/lwipstack/lwip/src/netif/ppp/polarssl/lwip_md4.c b/features/netsocket/ppp/polarssl/lwip_md4.c similarity index 99% rename from features/lwipstack/lwip/src/netif/ppp/polarssl/lwip_md4.c rename to features/netsocket/ppp/polarssl/lwip_md4.c index b1701a07b9..c1f2676430 100644 --- a/features/lwipstack/lwip/src/netif/ppp/polarssl/lwip_md4.c +++ b/features/netsocket/ppp/polarssl/lwip_md4.c @@ -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 diff --git a/features/lwipstack/lwip/src/netif/ppp/polarssl/lwip_md5.c b/features/netsocket/ppp/polarssl/lwip_md5.c similarity index 99% rename from features/lwipstack/lwip/src/netif/ppp/polarssl/lwip_md5.c rename to features/netsocket/ppp/polarssl/lwip_md5.c index 1ec4d81a69..d956c7b19b 100644 --- a/features/lwipstack/lwip/src/netif/ppp/polarssl/lwip_md5.c +++ b/features/netsocket/ppp/polarssl/lwip_md5.c @@ -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 diff --git a/features/lwipstack/lwip/src/netif/ppp/polarssl/lwip_sha1.c b/features/netsocket/ppp/polarssl/lwip_sha1.c similarity index 99% rename from features/lwipstack/lwip/src/netif/ppp/polarssl/lwip_sha1.c rename to features/netsocket/ppp/polarssl/lwip_sha1.c index c2192eac54..dbd708d0d7 100644 --- a/features/lwipstack/lwip/src/netif/ppp/polarssl/lwip_sha1.c +++ b/features/netsocket/ppp/polarssl/lwip_sha1.c @@ -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 diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_ppp.c b/features/netsocket/ppp/ppp.c similarity index 99% rename from features/lwipstack/lwip/src/netif/ppp/lwip_ppp.c rename to features/netsocket/ppp/ppp.c index 0d5fd8df67..2f1be85631 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_ppp.c +++ b/features/netsocket/ppp/ppp.c @@ -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 */ /*************************/ diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_ecp.c b/features/netsocket/ppp/ppp_ecp.c similarity index 97% rename from features/lwipstack/lwip/src/netif/ppp/lwip_ecp.c rename to features/netsocket/ppp/ppp_ecp.c index 4d84f60931..a777c63bed 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_ecp.c +++ b/features/netsocket/ppp/ppp_ecp.c @@ -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 -#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[] = { diff --git a/features/lwipstack/ppp_lwip.cpp b/features/netsocket/ppp/ppp_lwip.cpp similarity index 93% rename from features/lwipstack/ppp_lwip.cpp rename to features/netsocket/ppp/ppp_lwip.cpp index 683d02631c..ba74248b6e 100644 --- a/features/lwipstack/ppp_lwip.cpp +++ b/features/netsocket/ppp/ppp_lwip.cpp @@ -14,6 +14,7 @@ * limitations under the License. */ +#include "mbed.h" #include #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 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, Callbackset_blocking(true); @@ -378,7 +378,7 @@ nsapi_error_t nsapi_ppp_connect(FileHandle *stream, Callbackbringup(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 diff --git a/features/lwipstack/ppp_lwip.h b/features/netsocket/ppp/ppp_lwip.h similarity index 80% rename from features/lwipstack/ppp_lwip.h rename to features/netsocket/ppp/ppp_lwip.h index a568737c56..81f00bb08d 100644 --- a/features/lwipstack/ppp_lwip.h +++ b/features/netsocket/ppp/ppp_lwip.h @@ -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 } diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_pppapi.c b/features/netsocket/ppp/pppapi.c similarity index 98% rename from features/lwipstack/lwip/src/netif/ppp/lwip_pppapi.c rename to features/netsocket/ppp/pppapi.c index 947f7ba8c1..2edf8f9787 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_pppapi.c +++ b/features/netsocket/ppp/pppapi.c @@ -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") diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_pppcrypt.c b/features/netsocket/ppp/pppcrypt.c similarity index 95% rename from features/lwipstack/lwip/src/netif/ppp/lwip_pppcrypt.c rename to features/netsocket/ppp/pppcrypt.c index 82d78c13ac..76d861524e 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_pppcrypt.c +++ b/features/netsocket/ppp/pppcrypt.c @@ -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) { diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_pppoe.c b/features/netsocket/ppp/pppoe.c similarity index 99% rename from features/lwipstack/lwip/src/netif/ppp/lwip_pppoe.c rename to features/netsocket/ppp/pppoe.c index 8ed2d638fd..5a596ca3ea 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_pppoe.c +++ b/features/netsocket/ppp/pppoe.c @@ -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") diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_pppol2tp.c b/features/netsocket/ppp/pppol2tp.c similarity index 99% rename from features/lwipstack/lwip/src/netif/ppp/lwip_pppol2tp.c rename to features/netsocket/ppp/pppol2tp.c index 4c4557fca1..0fd528bb77 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_pppol2tp.c +++ b/features/netsocket/ppp/pppol2tp.c @@ -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") diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_pppos.c b/features/netsocket/ppp/pppos.c similarity index 99% rename from features/lwipstack/lwip/src/netif/ppp/lwip_pppos.c rename to features/netsocket/ppp/pppos.c index dff0255449..55d07db595 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_pppos.c +++ b/features/netsocket/ppp/pppos.c @@ -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 @@ -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") diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_upap.c b/features/netsocket/ppp/upap.c similarity index 99% rename from features/lwipstack/lwip/src/netif/ppp/lwip_upap.c rename to features/netsocket/ppp/upap.c index 3b2399dc23..e2185f55d9 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_upap.c +++ b/features/netsocket/ppp/upap.c @@ -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 #endif /* UNUSED */ -#include "netif/ppp/ppp_impl.h" +#include "ppp_impl.h" -#include "netif/ppp/upap.h" +#include "upap.h" #if PPP_OPTIONS /* diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_utils.c b/features/netsocket/ppp/utils.c similarity index 99% rename from features/lwipstack/lwip/src/netif/ppp/lwip_utils.c rename to features/netsocket/ppp/utils.c index dd18ac779d..546a86b23b 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_utils.c +++ b/features/netsocket/ppp/utils.c @@ -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(); diff --git a/features/lwipstack/lwip/src/netif/ppp/lwip_vj.c b/features/netsocket/ppp/vj.c similarity index 99% rename from features/lwipstack/lwip/src/netif/ppp/lwip_vj.c rename to features/netsocket/ppp/vj.c index 3fecba6995..d8adde9e1b 100644 --- a/features/lwipstack/lwip/src/netif/ppp/lwip_vj.c +++ b/features/netsocket/ppp/vj.c @@ -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