*/
#ifndef lint
-static char rcsid[] = "$Id: sys-NeXT.c,v 1.13 1999/03/16 02:57:05 paulus Exp $";
+static char rcsid[] = "$Id: sys-NeXT.c,v 1.14 1999/03/16 22:53:46 paulus Exp $";
#endif
#include <stdio.h>
/*
* establish_ppp - Turn the serial port into a ppp interface.
*/
-void
+int
establish_ppp(fd)
int fd;
{
warn("Couldn't set device to non-blocking mode: %m");
}
+ return fd;
}
* packets in demand mode, and connect it to a ppp interface.
* Here we use a pty.
*/
-void
+int
open_ppp_loopback()
{
}
}
+ return loop_master;
#endif
}
*/
#ifndef lint
-static char rcsid[] = "$Id: sys-aix4.c,v 1.16 1999/03/16 02:57:05 paulus Exp $";
+static char rcsid[] = "$Id: sys-aix4.c,v 1.17 1999/03/16 22:53:46 paulus Exp $";
#endif
/*
/*
* establish_ppp - Turn the serial port into a ppp interface.
*/
-void
+int
establish_ppp(fd)
int fd;
{
|| fcntl(fd, F_SETFL, initfdflags | O_NONBLOCK) == -1) {
warn("Couldn't set device to non-blocking mode: %m");
}
+
+ return fd;
}
/*
*/
#ifndef lint
-static char rcsid[] = "$Id: sys-bsd.c,v 1.37 1999/03/16 02:57:06 paulus Exp $";
+static char rcsid[] = "$Id: sys-bsd.c,v 1.38 1999/03/16 22:53:47 paulus Exp $";
/* $NetBSD: sys-bsd.c,v 1.1.1.3 1997/09/26 18:53:04 christos Exp $ */
#endif
/*
* establish_ppp - Turn the serial port into a ppp interface.
*/
-void
+int
establish_ppp(fd)
int fd;
{
|| fcntl(fd, F_SETFL, initfdflags | O_NONBLOCK) == -1) {
warn("Couldn't set device to non-blocking mode: %m");
}
+
+ return fd;
}
/*
* packets in demand mode, and connect it to a ppp interface.
* Here we use a pty.
*/
-void
+int
open_ppp_loopback()
{
int flags;
}
}
+ return loop_master;
}
/********************************************************************
*
* open_loopback - open the device we use for getting packets
- * in demand mode. Under Linux, we use our existing fd
- * to the ppp driver.
+ * in demand mode. Under Linux, we use a pty master/slave pair.
*/
int
open_ppp_loopback(void)
*/
set_kdebugflag (kdebugflag);
- return ppp_fd;
+ return master_fd;
}
/********************************************************************
*/
#ifndef lint
-static char rcsid[] = "$Id: sys-osf.c,v 1.19 1999/03/16 02:57:06 paulus Exp $";
+static char rcsid[] = "$Id: sys-osf.c,v 1.20 1999/03/16 22:53:48 paulus Exp $";
#endif
#include <stdio.h>
/*
* establish_ppp - Turn the serial port into a ppp interface.
*/
-void
+int
establish_ppp(fd)
int fd;
{
/*
* Set device for non-blocking reads.
+ * XXX why do we need to do this? don't we use pppfd not fd?
*/
if ((initfdflags = fcntl(fd, F_GETFL)) == -1
|| fcntl(fd, F_SETFL, initfdflags | O_NONBLOCK) == -1) {
warn("Couldn't set device to non-blocking mode: %m");
}
+
+ return pppfd;
}
/*
/*
* open_loopback - open the device we use for getting packets
- * in demand mode. Under Solaris 2, we use our existing fd
+ * in demand mode. Under Digital Unix, we use our existing fd
* to the ppp driver.
*/
-void
+int
open_ppp_loopback()
{
+ return pppfd;
}
/*
*/
#ifndef lint
-static char rcsid[] = "$Id: sys-sunos4.c,v 1.14 1999/03/16 02:57:07 paulus Exp $";
+static char rcsid[] = "$Id: sys-sunos4.c,v 1.15 1999/03/16 22:53:48 paulus Exp $";
#endif
#include <stdio.h>
/*
* establish_ppp - Turn the serial port into a ppp interface.
*/
-void
+int
establish_ppp(fd)
int fd;
{
/* Link the serial port under the PPP multiplexor. */
if ((fdmuxid = ioctl(pppfd, I_LINK, fd)) < 0)
fatal("Can't link tty to PPP mux: %m");
+
+ return pppfd;
}
/*
/*
* open_loopback - open the device we use for getting packets
- * in demand mode. Under Solaris 2, we use our existing fd
+ * in demand mode. Under SunOS, we use our existing fd
* to the ppp driver.
*/
-void
+int
open_ppp_loopback()
{
+ return pppfd;
}
/*
*/
#ifndef lint
-static char rcsid[] = "$Id: sys-svr4.c,v 1.25 1999/03/16 02:57:07 paulus Exp $";
+static char rcsid[] = "$Id: sys-svr4.c,v 1.26 1999/03/16 22:53:48 paulus Exp $";
#endif
#include <limits.h>
/*
* establish_ppp - Turn the serial port into a ppp interface.
*/
-void
+int
establish_ppp(fd)
int fd;
{
/* Link the serial port under the PPP multiplexor. */
if ((fdmuxid = ioctl(pppfd, I_LINK, fd)) < 0)
fatal("Can't link tty to PPP mux: %m");
+
+ return pppfd;
}
/*
* in demand mode. Under Solaris 2, we use our existing fd
* to the ppp driver.
*/
-void
+int
open_ppp_loopback()
{
+ return pppfd;
}
/*
*/
#ifndef lint
-static char rcsid[] = "$Id: sys-ultrix.c,v 1.26 1999/03/16 02:57:08 paulus Exp $";
+static char rcsid[] = "$Id: sys-ultrix.c,v 1.27 1999/03/16 22:53:49 paulus Exp $";
#endif
/*
/*
* establish_ppp - Turn the serial port into a ppp interface.
*/
-void
+int
establish_ppp(fd)
int fd;
{
|| fcntl(fd, F_SETFL, initfdflags | O_NONBLOCK) == -1) {
warn("Couldn't set device to non-blocking mode: %m");
}
+
+ return fd;
}
/*
* packets in demand mode, and connect it to a ppp interface.
* Here we use would use a pty, except that Ultrix ptys are brain-dead.
*/
-void
+int
open_ppp_loopback()
{
- error("open_ppp_loopback called!");
- die(1);
+ fatal("open_ppp_loopback called!");
+ /* return loop_master; */
}