/*
PPP for Linux
- $Id: ppp.c,v 1.1 1994/05/27 00:55:25 paulus Exp $
+ $Id: ppp.c,v 1.2 1994/05/30 02:42:55 paulus Exp $
*/
/*
PRINTKN (2,(KERN_INFO "ppp: channel %s mtu = %d, mru = %d\n",
dev->name, new_mtu, new_mru));
- new_xbuff = (unsigned char *) kmalloc(mtu + 4, GFP_KERNEL);
- new_rbuff = (unsigned char *) kmalloc(mru + 4, GFP_KERNEL);
- new_cbuff = (unsigned char *) kmalloc(mru + 4, GFP_KERNEL);
+ new_xbuff = (unsigned char *) kmalloc(mtu + 4, GFP_ATOMIC);
+ new_rbuff = (unsigned char *) kmalloc(mru + 4, GFP_ATOMIC);
+ new_cbuff = (unsigned char *) kmalloc(mru + 4, GFP_ATOMIC);
/*
* If the buffers failed to allocate then complain.
*/
PRINTKN (2,(KERN_INFO "ppp: channel %s open\n", ppp->dev->name));
-#ifdef NEW_TTY_DRIVERS
- return (0);
-#else
return (ppp->line);
-#endif
}
/* called when ppp interface goes "up". here this just means we start
#include <linux/route.h>
#include <linux/if_ether.h>
#include <netinet/in.h>
-#include <net/if_ppp.h>
+#include <signal.h>
#include "pppd.h"
#include "ppp.h"
void establish_ppp (void)
{
int pppdisc = N_PPP;
- int sig = SIGIO;
+ int sig = SIGIO;
+
+ if (ioctl(fd, PPPIOCSINPSIG, &sig) == -1) {
+ syslog(LOG_ERR, "ioctl(PPPIOCSINPSIG): %m");
+ die(1);
+ }
if (ioctl(fd, TIOCEXCL, 0) < 0) {
syslog (LOG_WARNING, "ioctl(TIOCEXCL): %m");
}
set_kdebugflag (kdebugflag);
-
- /*
- * Set the device to give us a SIGIO when data is available.
- */
- if (ioctl(fd, PPPIOCSINPSIG, &sig) == -1) {
- syslog(LOG_ERR, "ioctl(PPPIOCSINPSIG): %m");
- die(1);
- }
}
/*