Mercurial > ecos
changeset 1941:b48f2a94ca99
2004-12-01 Murali Parvathaneni <murkrisp@yahoo.com>
* include/ppp.h: Add options to negotiate ACCM in
cyg_ppp_options_t structure.
* include/pppd.h: Make ACCM negotiation fields externally
available.
* include/names.h: Redefine neg_accm and conf_accm with cyg_ppp_
prefix.
* src/pppd.c: Define storage for ACCM and a flag for ACCM
negotiation.
* src/sys-ecos.c: Initialize and set parameters to negotiate ACCM
based on the configuration option.
* src/lcp.c: Set WantOptions (wo) to negotiate ACCM.
| author | nickg |
|---|---|
| date | Thu, 07 Apr 2005 16:06:58 +0000 |
| parents | f8eb05ed2de5 |
| children | c38f4a6c7abf |
| files | packages/net/ppp/current/ChangeLog packages/net/ppp/current/include/names.h packages/net/ppp/current/include/ppp.h packages/net/ppp/current/include/pppd.h packages/net/ppp/current/src/lcp.c packages/net/ppp/current/src/pppd.c packages/net/ppp/current/src/sys-ecos.c |
| diffstat | 7 files changed, 33 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/net/ppp/current/ChangeLog +++ b/packages/net/ppp/current/ChangeLog @@ -13,6 +13,20 @@ 2005-01-16 Matt Jerdonek <maj1224@yahoo required according to RFC 1662, but found to be necessary to interwork with some broken implementations. +2004-12-01 Murali Parvathaneni <murkrisp@yahoo.com> + + * include/ppp.h: Add options to negotiate ACCM in + cyg_ppp_options_t structure. + * include/pppd.h: Make ACCM negotiation fields externally + available. + * include/names.h: Redefine neg_accm and conf_accm with cyg_ppp_ + prefix. + * src/pppd.c: Define storage for ACCM and a flag for ACCM + negotiation. + * src/sys-ecos.c: Initialize and set parameters to negotiate ACCM + based on the configuration option. + * src/lcp.c: Set WantOptions (wo) to negotiate ACCM. + 2004-08-19 Oyvind Harboe <oyvind.harboe@zylin.com> 2004-09-08 Andrew Lunn <andrew.lunn@ascom.ch>
--- a/packages/net/ppp/current/include/names.h +++ b/packages/net/ppp/current/include/names.h @@ -207,6 +207,8 @@ #define quit cyg_ppp_quit #define refuse_chap cyg_ppp_refuse_chap #define refuse_pap cyg_ppp_refuse_pap +#define neg_accm cyg_ppp_neg_accm +#define conf_accm cyg_ppp_conf_accm #define remote_name cyg_ppp_remote_name #define s_env_nalloc cyg_ppp_s_env_nalloc #define script cyg_ppp_script
--- a/packages/net/ppp/current/include/ppp.h +++ b/packages/net/ppp/current/include/ppp.h @@ -95,11 +95,13 @@ typedef struct modem : 1, /* Use modem control lines */ flowctl : 2, /* Flow control, see below */ refuse_pap : 1, /* Don't wanna auth. ourselves with PAP */ - refuse_chap : 1 /* Don't wanna auth. ourselves with CHAP */ + refuse_chap : 1, /* Don't wanna auth. ourselves with CHAP */ + neg_accm : 1 /* Flag to enable ACCM negotiation */ ; cyg_serial_baud_rate_t baud; /* serial line baud rate */ + int conf_accm; /* Configurable value of ACCM */ int idle_time_limit; /* Shut down link if idle for this long */ int maxconnect; /* Maximum connect time (seconds) */
--- a/packages/net/ppp/current/include/pppd.h +++ b/packages/net/ppp/current/include/pppd.h @@ -148,6 +148,8 @@ extern int maxconnect; /* Maximum connec extern char user[]; /* Our name for authenticating ourselves */ extern char passwd[]; /* Password for PAP */ extern int auth_required; /* Peer is required to authenticate */ +extern int neg_accm; /* Flag to enable ACCM negotiation */ +extern int conf_accm; /* Configurable value of ACCM */ extern int proxyarp; /* Set up proxy ARP entry for peer */ extern int persist; /* Reopen link after it goes down */ extern int uselogin; /* Use /etc/passwd for checking PAP */
--- a/packages/net/ppp/current/src/lcp.c +++ b/packages/net/ppp/current/src/lcp.c @@ -220,8 +220,10 @@ lcp_init(unit) implementations */ wo->neg_mru = 1; wo->mru = DEFMRU; - wo->neg_asyncmap = 0; - wo->asyncmap = 0; + + wo->neg_asyncmap = cyg_ppp_neg_accm; /* Set flag to enable ACCM negotiation */ + wo->asyncmap = cyg_ppp_conf_accm; /* Set ACCM based on configured value */ + wo->neg_chap = 0; /* Set to 1 on server */ wo->neg_upap = 0; /* Set to 1 on server */ wo->chap_mdtype = CHAP_DIGEST_MD5;
--- a/packages/net/ppp/current/src/pppd.c +++ b/packages/net/ppp/current/src/pppd.c @@ -162,6 +162,8 @@ int idle_time_limit = 60; /* Shut down int holdoff = 0; /* Dead time before restarting */ int refuse_pap = 0; /* Don't wanna auth. ourselves with PAP */ int refuse_chap = 0; /* Don't wanna auth. ourselves with CHAP */ +int neg_accm = 0; /* Flag to enable ACCM negotiation */ +int conf_accm = 0; /* Confgurable value of ACCM */ const char **script; /* Chat connection script */ @@ -256,11 +258,11 @@ cyg_pppd_main(CYG_ADDRWORD arg) phase = PHASE_INITIALIZE; + cyg_ppp_options_install( ((struct tty *)arg)->options ); + for (i = 0; (protp = protocols[i]) != NULL; ++i) (*protp->init)(0); - cyg_ppp_options_install( ((struct tty *)arg)->options ); - if (!ppp_available()) { option_error(no_ppp_msg); exit(1);
--- a/packages/net/ppp/current/src/sys-ecos.c +++ b/packages/net/ppp/current/src/sys-ecos.c @@ -1654,6 +1654,8 @@ externC cyg_int32 cyg_ppp_options_init( options->flowctl = CYG_PPP_FLOWCTL_HARDWARE; options->refuse_pap = 0; options->refuse_chap = 0; + options->neg_accm = 0; + options->conf_accm = 0; options->baud = CYGNUM_SERIAL_BAUD_115200; @@ -1747,6 +1749,8 @@ externC void cyg_ppp_options_install( co flowctl = options->flowctl; refuse_pap = options->refuse_pap; refuse_chap = options->refuse_chap; + neg_accm = options->neg_accm; + conf_accm = options->conf_accm; inspeed = options->baud;
