Mercurial > ecos
changeset 1868:3df9bc847a78
* cdl/ppp.cdl
* src/ppp_io.c (pppasyncstart): Conditionally allow the PPP daemon
to send a start flag at the beginning of very packet. This is not
required according to RFC 1662, but found to be necessary to
interwork with some broken implementations
| author | asl |
|---|---|
| date | Sun, 16 Jan 2005 13:00:45 +0000 |
| parents | a0d4c606e72d |
| children | 17d9a15eab14 |
| files | packages/net/ppp/current/ChangeLog packages/net/ppp/current/cdl/ppp.cdl packages/net/ppp/current/src/ppp_io.c |
| diffstat | 3 files changed, 30 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/net/ppp/current/ChangeLog +++ b/packages/net/ppp/current/ChangeLog @@ -1,3 +1,12 @@ +2005-01-16 Matt Jerdonek <maj1224@yahoo.com> + Andrew Lunn <andrew.lunn@ascom.ch> + + * cdl/ppp.cdl + * src/ppp_io.c (pppasyncstart): Conditionally allow the PPP daemon + to send a start flag at the beginning of very packet. This is not + required according to RFC 1662, but found to be necessary to + interwork with some broken implementations. + 2004-08-19 Oyvind Harboe <oyvind.harboe@zylin.com> 2004-09-08 Andrew Lunn <andrew.lunn@ascom.ch>
--- a/packages/net/ppp/current/cdl/ppp.cdl +++ b/packages/net/ppp/current/cdl/ppp.cdl @@ -234,6 +234,19 @@ cdl_package CYGPKG_PPP { } + cdl_component CYGPKG_PPP_WORKAROUNDS { + display "PPP workarounds for bugs in other implementations" + flavor none + no_define + + cdl_option CYGPKT_PPP_WORKAROUNDS_START_FLAG { + flavor bool + default_value false + description "This option enables a workaround to add a start + flag to every packet. The RFC does not require this, + but some broken PPP implementations seems to need it." + } + } cdl_component CYGPKG_PPP_OPTIONS { display "PPP build options"
--- a/packages/net/ppp/current/src/ppp_io.c +++ b/packages/net/ppp/current/src/ppp_io.c @@ -602,8 +602,11 @@ pppasyncstart(sc) int n, ndone, done, idle; struct mbuf *m2; int s; - idle = 0; +#ifdef CYGPKT_PPP_WORKAROUNDS_START_FLAG + char start_flag = PPP_FLAG; + int start_flag_len = sizeof(start_flag); +#endif while (1) { /* @@ -623,7 +626,10 @@ pppasyncstart(sc) /* Calculate the FCS for the first mbuf's worth. */ sc->sc_outfcs = pppfcs(PPP_INITFCS, mtod(m, u_char *), m->m_len); - getmicrotime(&sc->sc_if.if_lastchange); + getmicrotime(&sc->sc_if.if_lastchange); +#ifdef CYGPKT_PPP_WORKAROUNDS_START_FLAG + cyg_io_write(tp->t_handle, &start_flag, &start_flag_len); +#endif } for (;;) {
