mirror of
https://github.com/ep00ch/lwip-contrib-mac.git
synced 2024-10-12 08:23:42 +00:00
make PAP and CHAP optional
This commit is contained in:
parent
53969f830f
commit
48ec31d02c
@ -481,8 +481,6 @@ cdl_package CYGPKG_NET_LWIP {
|
|||||||
description "The Point-to-Point Protocol"
|
description "The Point-to-Point Protocol"
|
||||||
compile netif/ppp/ppp.c \
|
compile netif/ppp/ppp.c \
|
||||||
netif/ppp/auth.c \
|
netif/ppp/auth.c \
|
||||||
netif/ppp/pap.c \
|
|
||||||
netif/ppp/chap.c \
|
|
||||||
netif/ppp/chpms.c \
|
netif/ppp/chpms.c \
|
||||||
netif/ppp/fsm.c \
|
netif/ppp/fsm.c \
|
||||||
netif/ppp/ipcp.c \
|
netif/ppp/ipcp.c \
|
||||||
@ -494,6 +492,20 @@ cdl_package CYGPKG_NET_LWIP {
|
|||||||
ecos/sio.c
|
ecos/sio.c
|
||||||
|
|
||||||
|
|
||||||
|
cdl_option CYGPKG_LWIP_PPP_PAP_AUTH {
|
||||||
|
display "Support PAP authentication"
|
||||||
|
flavor bool
|
||||||
|
default_value 1
|
||||||
|
compile netif/ppp/pap.c
|
||||||
|
}
|
||||||
|
|
||||||
|
cdl_option CYGPKG_LWIP_PPP_CHAP_AUTH {
|
||||||
|
display "Support CHAP authentication"
|
||||||
|
flavor bool
|
||||||
|
default_value 1
|
||||||
|
compile netif/ppp/chap.c
|
||||||
|
}
|
||||||
|
|
||||||
cdl_option CYGPKG_LWIP_PPP_DEV {
|
cdl_option CYGPKG_LWIP_PPP_DEV {
|
||||||
display "Serial device for PPP"
|
display "Serial device for PPP"
|
||||||
flavor data
|
flavor data
|
||||||
|
@ -196,7 +196,18 @@ a lot of data that needs to be copied, this should be set high. */
|
|||||||
#define PPP_SUPPORT defined(CYGPKG_LWIP_PPP)
|
#define PPP_SUPPORT defined(CYGPKG_LWIP_PPP)
|
||||||
#define PPP_DEV CYGPKG_LWIP_PPP_DEV
|
#define PPP_DEV CYGPKG_LWIP_PPP_DEV
|
||||||
#define MD5_SUPPORT 1
|
#define MD5_SUPPORT 1
|
||||||
|
|
||||||
|
#if defined(CYGPKG_LWIP_PPP_PAP_AUTH)
|
||||||
#define PAP_SUPPORT 1
|
#define PAP_SUPPORT 1
|
||||||
|
#else
|
||||||
|
#define PAP_SUPPORT 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(CYGPKG_LWIP_PPP_CHAP_AUTH)
|
||||||
|
#define CHAP_SUPPORT 1
|
||||||
|
#else
|
||||||
|
#define CHAP_SUPPORT 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ------- Thread priorities ---------------*/
|
/* ------- Thread priorities ---------------*/
|
||||||
#define TCPIP_THREAD_PRIO CYGPKG_LWIP_TCPIP_THREAD_PRIORITY
|
#define TCPIP_THREAD_PRIO CYGPKG_LWIP_TCPIP_THREAD_PRIORITY
|
||||||
|
@ -83,6 +83,8 @@ struct netif mynetif, loopif;
|
|||||||
static void ecosglue_init(void);
|
static void ecosglue_init(void);
|
||||||
void lwip_set_addr(struct netif *netif);
|
void lwip_set_addr(struct netif *netif);
|
||||||
#if PPP_SUPPORT
|
#if PPP_SUPPORT
|
||||||
|
#define PPP_USER "pppuser"
|
||||||
|
#define PPP_PASS "ppppass"
|
||||||
void
|
void
|
||||||
pppMyCallback(void *a , int e)
|
pppMyCallback(void *a , int e)
|
||||||
{
|
{
|
||||||
@ -140,7 +142,7 @@ int lwip_init(void)
|
|||||||
#elif PPP_SUPPORT
|
#elif PPP_SUPPORT
|
||||||
pppInit();
|
pppInit();
|
||||||
#if PAP_SUPPORT || CHAP_SUPPORT
|
#if PAP_SUPPORT || CHAP_SUPPORT
|
||||||
pppSetAuth(PPPAUTHTYPE_PAP, "ecos", "picula");
|
pppSetAuth(PPPAUTHTYPE_PAP, PPP_USER, PPP_PASS);
|
||||||
#endif
|
#endif
|
||||||
pppOpen(sio_open(2), pppMyCallback, NULL);
|
pppOpen(sio_open(2), pppMyCallback, NULL);
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user