summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1994-10-05 21:22:45 +0000
committerwollman <wollman@FreeBSD.org>1994-10-05 21:22:45 +0000
commitcd21bb7ff009bec08f6129ba1272cfabb92f283c (patch)
treeb5bdeeb359a726209ca41a6a4e6f8cf6adcaa981
parent6fa06f29108f95d36ee569f4f109551a09f9dfac (diff)
downloadFreeBSD-src-cd21bb7ff009bec08f6129ba1272cfabb92f283c.zip
FreeBSD-src-cd21bb7ff009bec08f6129ba1272cfabb92f283c.tar.gz
Install line discipline the new way.
-rw-r--r--sys/net/if_ppp.c21
-rw-r--r--sys/net/if_sl.c13
2 files changed, 19 insertions, 15 deletions
diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c
index 52af32c..4bd517d 100644
--- a/sys/net/if_ppp.c
+++ b/sys/net/if_ppp.c
@@ -143,6 +143,11 @@ void pppinput __P((int c, struct tty *tp));
int pppioctl __P((struct ifnet *ifp, int cmd, caddr_t data));
void pppstart __P((struct tty *tp));
+static struct linesw pppdisc = {
+ pppopen, pppclose, pppread, pppwrite, ppptioctl,
+ pppinput, pppstart, nullmodem
+};
+
static int pppasyncstart __P((struct ppp_softc *));
static u_short pppfcs __P((u_short fcs, u_char *cp, int len));
static int pppgetm __P((struct ppp_softc *sc));
@@ -188,11 +193,13 @@ pppattach()
register struct ppp_softc *sc;
register int i = 0;
+ linesw[PPPDISC] = pppdisc;
+
for (sc = ppp_softc; i < NPPP; sc++) {
sc->sc_if.if_name = "ppp";
sc->sc_if.if_unit = i++;
sc->sc_if.if_mtu = PPP_MTU;
- sc->sc_if.if_flags = IFF_POINTOPOINT | IFF_MULTICAST;
+ sc->sc_if.if_flags = IFF_POINTOPOINT;
sc->sc_if.if_type = IFT_PPP;
sc->sc_if.if_hdrlen = PPP_HDRLEN;
sc->sc_if.if_ioctl = pppioctl;
@@ -1489,18 +1496,6 @@ pppioctl(ifp, cmd, data)
case SIOCGIFMTU:
ifr->ifr_mtu = sc->sc_if.if_mtu;
break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- switch(ifr->ifr_addr.sa_family) {
-#ifdef INET
- case AF_INET:
- break;
-#endif
- default:
- error = EAFNOSUPPORT;
- break;
- }
- break;
default:
error = EINVAL;
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c
index c0180e8..f7e2968 100644
--- a/sys/net/if_sl.c
+++ b/sys/net/if_sl.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_sl.c 8.6 (Berkeley) 2/1/94
- * $Id: if_sl.c,v 1.6 1994/09/12 11:49:49 davidg Exp $
+ * $Id: if_sl.c,v 1.7 1994/09/13 16:05:50 davidg Exp $
*/
/*
@@ -184,6 +184,13 @@ struct sl_softc sl_softc[NSL];
static int slinit __P((struct sl_softc *));
static struct mbuf *sl_btom __P((struct sl_softc *, int));
+
+#define ttyerrio ((int (*) __P((struct tty *, struct uio *, int)))enodev)
+
+static struct linesw slipdisc =
+ { slopen, slclose, ttyerrio, ttyerrio, sltioctl,
+ slinput, slstart, nullmodem };
+
/*
* Called from boot code to establish sl interfaces.
*/
@@ -193,6 +200,8 @@ slattach()
register struct sl_softc *sc;
register int i = 0;
+ linesw[SLIPDISC] = slipdisc;
+
for (sc = sl_softc; i < NSL; sc++) {
sc->sc_if.if_name = "sl";
sc->sc_if.if_next = NULL;
@@ -212,7 +221,7 @@ slattach()
}
}
-TEXT_SET(pseudo_set, slattach);
+PSEUDO_SET(slattach);
static int
slinit(sc)
OpenPOWER on IntegriCloud