From 8dfe4c168749ea81bfd3b988d806e2af50344610 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Wed, 17 Nov 1999 03:51:14 +0000 Subject: [PATCH] sync ppp update for new driver --- README.linux | 3 +++ pppd/sys-linux.c | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/README.linux b/README.linux index 0869011..d82a397 100644 --- a/README.linux +++ b/README.linux @@ -98,6 +98,8 @@ The new driver is divided into two files: ppp_generic.c and ppp_async.c. The old ppp.c is still present in the kernel sources but is not used. If you compile PPP as a module, you will get two separate modules, called ppp_generic and ppp_async. +Another module ppp_synctty is used for synchronous tty devices +such as high-speed WAN adapters for leased T1/E1 lines. To talk to the new driver, pppd needs to be able to open /dev/ppp, character device (108,0). If the special file node /dev/ppp is not @@ -110,6 +112,7 @@ If you use module autoloading and have PPP as a module, you will need to add the following to your /etc/modules.conf or /etc/conf.modules: alias tty-ldisc-3 ppp_async +alias tty-ldisc-14 ppp_synctty alias char-major-108 ppp_generic diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c index a43fc0a..b68cb04 100644 --- a/pppd/sys-linux.c +++ b/pppd/sys-linux.c @@ -377,6 +377,13 @@ int establish_ppp (int tty_fd) /* * Set the current tty to the PPP discpline */ + +#ifndef N_SYNC_PPP +#define N_SYNC_PPP 14 +#endif + if (new_style_driver) + ppp_disc = sync_serial ? N_SYNC_PPP:N_PPP; + if (ioctl(tty_fd, TIOCSETD, &ppp_disc) < 0) { if ( ! ok_error (errno) ) fatal("ioctl(TIOCSETD): %m(%d)", errno); -- 2.39.2