diff options
author | joerg <joerg@FreeBSD.org> | 1997-05-19 22:03:09 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1997-05-19 22:03:09 +0000 |
commit | 27ddec53f718ea168a222ceed081cd1a101b23a1 (patch) | |
tree | dfad88c2b1e9c2e4a0cded65e393e30e7e9ceffc /sys/i386 | |
parent | 13206dfe736ae31106bbaba0db80a492b5b38e67 (diff) | |
download | FreeBSD-src-27ddec53f718ea168a222ceed081cd1a101b23a1.zip FreeBSD-src-27ddec53f718ea168a222ceed081cd1a101b23a1.tar.gz |
Major overhaul of the SyncPPP layer. Basically, this comprises now a
full implementation of the sate machine as described in RFC1661, and
provides support for plugging in various control protocols. I needed
this to provide PPP support for the BISDN project (right now).
Unfortunatley, while the existing API was almost up to the point, i
needed one minor API change in order to decouple the this-layer-
started and this-layer-finished actions from the respective Up and
Down events of the lower layer. This requires two additional lines in
the attach routines of all existing lower layer interface drivers that
are using syncPPP (shortcutting these actions and events). Apart from
this, i believe i didn't change the API of all this, so everything
should plug in without too many hassles. Please report if i broke
something in the existing drivers.
For a list of features (including new ones like dial-on-demand), and
things still to be done, please refer to the man page i'll commit asap.
Encouraged by: Serge Vakulenko <vak@cronyx.ru>
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/isa/if_ar.c | 9 | ||||
-rw-r--r-- | sys/i386/isa/if_cx.c | 8 | ||||
-rw-r--r-- | sys/i386/isa/if_sr.c | 20 |
3 files changed, 34 insertions, 3 deletions
diff --git a/sys/i386/isa/if_ar.c b/sys/i386/isa/if_ar.c index a0fad0f..8e5c384 100644 --- a/sys/i386/isa/if_ar.c +++ b/sys/i386/isa/if_ar.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: if_ar.c,v 1.14 1997/02/22 09:36:15 peter Exp $ */ /* @@ -349,6 +349,13 @@ arattach(struct isa_device *id) sppp_attach((struct ifnet *)&sc->ifsppp); if_attach(ifp); + /* + * Shortcut the sppp tls/tlf actions to up/down events + * since our lower layer is always ready. + */ + sc->ifsppp.pp_tls = sc->ifsppp.pp_up; + sc->ifsppp.pp_tlf = sc->ifsppp.pp_down; + #if NBPFILTER > 0 bpfattach(ifp, DLT_PPP, PPP_HEADER_LEN); #endif diff --git a/sys/i386/isa/if_cx.c b/sys/i386/isa/if_cx.c index d57480b..c7dd4e4 100644 --- a/sys/i386/isa/if_cx.c +++ b/sys/i386/isa/if_cx.c @@ -224,6 +224,7 @@ cxattach (struct isa_device *id) int drq = id->id_drq; cx_board_t *b = cxboard + unit; int i; + struct sppp *sp; /* Initialize the board structure. */ cx_init (b, unit, iobase, ffs(irq)-1, drq); @@ -276,6 +277,13 @@ cxattach (struct isa_device *id) /* Init routine is never called by upper level? */ sppp_attach (c->ifp); if_attach (c->ifp); + /* + * Shortcut the sppp tls/tlf actions to up/down + * events since our lower layer is always ready. + */ + sp = (struct sppp*) c->ifp; + sp->pp_tls = sp->pp_up; + sp->pp_tlf = sp->pp_down; #if NBPFILTER > 0 /* If BPF is in the kernel, call the attach for it. */ bpfattach (c->ifp, DLT_PPP, PPP_HEADER_LEN); diff --git a/sys/i386/isa/if_sr.c b/sys/i386/isa/if_sr.c index 21c0f48..a9abd8f 100644 --- a/sys/i386/isa/if_sr.c +++ b/sys/i386/isa/if_sr.c @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: if_sr.c,v 1.6 1997/02/22 09:36:35 peter Exp $ */ /* @@ -1304,6 +1304,14 @@ srioctl(struct ifnet *ifp, int cmd, caddr_t data) default: sc->ifsppp.pp_flags = PP_KEEPALIVE; sppp_attach(&sc->ifsppp.pp_if); + + /* + * Shortcut the sppp tls/tlf actions to + * up/down events since our lower layer is + * always ready. + */ + sc->ifsppp.pp_tls = sc->ifsppp.pp_up; + sc->ifsppp.pp_tlf = sc->ifsppp.pp_down; } sc->attached = sc->protocol; @@ -1487,7 +1495,15 @@ sr_up(struct sr_softc *sc) default: sc->ifsppp.pp_flags = PP_KEEPALIVE; sppp_attach(&sc->ifsppp.pp_if); - } + + /* + * Shortcut the sppp tls/tlf actions to + * up/down events since our lower layer is + * always ready. + */ + sc->ifsppp.pp_tls = sc->ifsppp.pp_up; + sc->ifsppp.pp_tlf = sc->ifsppp.pp_down; + } sc->attached = sc->protocol; } |