Skip to content

Commit a1e3a5d

Browse files
author
Mika Leppänen
committed
Created PPP service class
Created PPP service class that encapsulates the PPP protocol. Class is similar to EMAC and L3IP classes with additional methods to read IP and DNS server addresses negotiation using PPP and to set PPP specific parameters (file handle for modem access etc.). PPP service can use on its own thread or in run in mbed os event Queue thread. Added ppp_nsapi.cpp module that implements the nsapi_ppp.h services. Added ppp_nsapi.cpp module that implements the nsapi_ppp.h services.
1 parent c518319 commit a1e3a5d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+3248
-1629
lines changed

features/netsocket/ppp/include/ccp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*/
3232

3333
#include "ppp_opts.h"
34-
#if PPP_SUPPORT && CCP_SUPPORT /* don't build if not configured for use in lwipopts.h */
34+
#if PPP_SUPPORT && CCP_SUPPORT /* don't build if not configured for use in ppp_opts.h */
3535

3636
#ifndef CCP_H
3737
#define CCP_H

features/netsocket/ppp/include/chap-md5.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*/
3030

3131
#include "ppp_opts.h"
32-
#if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
32+
#if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in ppp_opts.h */
3333

3434
extern const struct chap_digest_type md5_digest;
3535

features/netsocket/ppp/include/chap-new.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*/
3030

3131
#include "ppp_opts.h"
32-
#if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
32+
#if PPP_SUPPORT && CHAP_SUPPORT /* don't build if not configured for use in ppp_opts.h */
3333

3434
#ifndef CHAP_H
3535
#define CHAP_H

features/netsocket/ppp/include/chap_ms.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*/
3232

3333
#include "ppp_opts.h"
34-
#if PPP_SUPPORT && MSCHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
34+
#if PPP_SUPPORT && MSCHAP_SUPPORT /* don't build if not configured for use in ppp_opts.h */
3535

3636
#ifndef CHAPMS_INCLUDE
3737
#define CHAPMS_INCLUDE

features/netsocket/ppp/include/eap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222

2323
#include "ppp_opts.h"
24-
#if PPP_SUPPORT && EAP_SUPPORT /* don't build if not configured for use in lwipopts.h */
24+
#if PPP_SUPPORT && EAP_SUPPORT /* don't build if not configured for use in ppp_opts.h */
2525

2626
#ifndef PPP_EAP_H
2727
#define PPP_EAP_H

features/netsocket/ppp/include/ecp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
*/
3333

3434
#include "ppp_opts.h"
35-
#if PPP_SUPPORT && ECP_SUPPORT /* don't build if not configured for use in lwipopts.h */
35+
#if PPP_SUPPORT && ECP_SUPPORT /* don't build if not configured for use in ppp_opts.h */
3636

3737
#ifndef ECP_H
3838
#define ECP_H

features/netsocket/ppp/include/eui64.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
*/
3737

3838
#include "ppp_opts.h"
39-
#if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in lwipopts.h */
39+
#if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in ppp_opts.h */
4040

4141
#ifndef EUI64_H
4242
#define EUI64_H
@@ -88,7 +88,7 @@ typedef union
8888

8989
#define eui64_set32(e, l) do { \
9090
(e).e32[0] = 0; \
91-
(e).e32[1] = lwip_htonl(l); \
91+
(e).e32[1] = ppp_htonl(l); \
9292
} while (0)
9393
#define eui64_setlo32(e, l) eui64_set32(e, l)
9494

features/netsocket/ppp/include/fsm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
*/
4444

4545
#include "ppp_opts.h"
46-
#if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */
46+
#if PPP_SUPPORT /* don't build if not configured for use in ppp_opts.h */
4747

4848
#ifndef FSM_H
4949
#define FSM_H

features/netsocket/ppp/include/ipcp.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
*/
4444

4545
#include "ppp_opts.h"
46-
#if PPP_SUPPORT && PPP_IPV4_SUPPORT /* don't build if not configured for use in lwipopts.h */
46+
#if PPP_SUPPORT && PPP_IPV4_SUPPORT /* don't build if not configured for use in ppp_opts.h */
4747

4848
#ifndef IPCP_H
4949
#define IPCP_H
@@ -61,10 +61,10 @@ extern "C" {
6161
#endif /* VJ_SUPPORT */
6262
#define CI_ADDR 3
6363

64-
#if LWIP_DNS
64+
#if PPP_DNS
6565
#define CI_MS_DNS1 129 /* Primary DNS value */
6666
#define CI_MS_DNS2 131 /* Secondary DNS value */
67-
#endif /* LWIP_DNS */
67+
#endif /* PPP_DNS */
6868
#if 0 /* UNUSED - WINS */
6969
#define CI_MS_WINS1 130 /* Primary WINS value */
7070
#define CI_MS_WINS2 132 /* Secondary WINS value */
@@ -101,15 +101,15 @@ typedef struct ipcp_options {
101101
#endif /* VJ_SUPPORT */
102102
unsigned int accept_local :1; /* accept peer's value for ouraddr */
103103
unsigned int accept_remote :1; /* accept peer's value for hisaddr */
104-
#if LWIP_DNS
104+
#if PPP_DNS
105105
unsigned int req_dns1 :1; /* Ask peer to send primary DNS address? */
106106
unsigned int req_dns2 :1; /* Ask peer to send secondary DNS address? */
107-
#endif /* LWIP_DNS */
107+
#endif /* PPP_DNS */
108108

109109
u32_t ouraddr, hisaddr; /* Addresses in NETWORK BYTE ORDER */
110-
#if LWIP_DNS
110+
#if PPP_DNS
111111
u32_t dnsaddr[2]; /* Primary and secondary MS DNS entries */
112-
#endif /* LWIP_DNS */
112+
#endif /* PPP_DNS */
113113
#if 0 /* UNUSED - WINS */
114114
u32_t winsaddr[2]; /* Primary and secondary MS WINS entries */
115115
#endif /* UNUSED - WINS */
@@ -120,9 +120,9 @@ typedef struct ipcp_options {
120120
#endif /* VJ_SUPPORT */
121121
} ipcp_options;
122122

123-
#if 0 /* UNUSED, already defined by lwIP */
123+
#if 0 /* UNUSED, already defined */
124124
char *ip_ntoa (u32_t);
125-
#endif /* UNUSED, already defined by lwIP */
125+
#endif /* UNUSED, already defined */
126126

127127
extern const struct protent ipcp_protent;
128128

features/netsocket/ppp/include/ipv6cp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
*/
140140

141141
#include "ppp_opts.h"
142-
#if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in lwipopts.h */
142+
#if PPP_SUPPORT && PPP_IPV6_SUPPORT /* don't build if not configured for use in ppp_opts.h */
143143

144144
#ifndef IPV6CP_H
145145
#define IPV6CP_H

0 commit comments

Comments
 (0)