#include <fcntl.h>
#include <ctype.h>
#include <termios.h>
+#include <unistd.h>
/* This is in netdevice.h. However, this compile will fail miserably if
you attempt to include netdevice.h because it has so many references
#endif
#if __GLIBC__ >= 2
-#include <net/ppp_defs.h>
+#include <net/if.h>
#include <net/if_arp.h>
-#include <net/if_ppp.h>
#include <net/route.h>
#include <netinet/if_ether.h>
#else
#include <linux/if.h>
-#include <linux/ppp_defs.h>
#include <linux/if_arp.h>
-#include <linux/if_ppp.h>
#include <linux/route.h>
#include <linux/if_ether.h>
#endif
#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#include <linux/types.h>
+#include <linux/ppp_defs.h>
+#include <linux/if_ppp.h>
#include "pppd.h"
#include "fsm.h"
void sys_cleanup(void)
{
- struct ifreq ifr;
/*
* Take down the device
*/
void disestablish_ppp(int tty_fd)
{
- int x;
- char *s;
-
/*
* Attempt to restore the previous tty settings
*/
void set_up_tty (int tty_fd, int local)
{
- int speed, x;
+ int speed;
struct termios tios;
if (tcgetattr(tty_fd, &tios) < 0)
}
fclose (fp);
}
- return 0;
+
+ /* Default the mount location of /proc */
+ strncpy (route_buffer, "/proc", sizeof (route_buffer)-10);
+ return 1;
}
/********************************************************************
static int read_route_table (struct rtentry *rt)
{
static char delims[] = " \t\n";
- char *dev_ptr, *ptr, *dst_ptr, *gw_ptr, *flag_ptr;
+ char *dev_ptr, *dst_ptr, *gw_ptr, *flag_ptr;
memset (rt, '\0', sizeof (struct rtentry));
struct sockaddr *hwaddr,
char *name)
{
- struct ifreq *ifr, *ifend, *ifp;
- int i;
+ struct ifreq *ifr, *ifend;
u_int32_t ina, mask;
struct ifreq ifreq;
struct ifconf ifc;
{
if (! ok_error (errno))
{
- syslog (LOG_ERR, "ioctl(PPPIOCSFLAGS): %m(%d)", errno);
+ syslog (LOG_ERR, "ioctl(PPPIOCSMAXCID): %m(%d)", errno);
}
vjcomp = 0;
}
#ifdef IPX_CHANGE
int skfd;
- struct sockaddr_ipx ipx_addr;
struct ifreq ifr;
struct sockaddr_ipx *sipx = (struct sockaddr_ipx *) &ifr.ifr_addr;
#ifdef IPX_CHANGE
int skfd;
- struct sockaddr_ipx ipx_addr;
struct ifreq ifr;
struct sockaddr_ipx *sipx = (struct sockaddr_ipx *) &ifr.ifr_addr;
return 0;
}
+/*
+ * Use the hostname as part of the random number seed.
+ */
+int
+get_host_seed()
+{
+ int h;
+ char *p = hostname;
+
+ h = 407;
+ for (p = hostname; *p != 0; ++p)
+ h = h * 37 + *p;
+ return h;
+}
+
/********************************************************************
*
* sys_check_options - check the options that the user specified