*/
#ifndef lint
-static char rcsid[] = "$Id: sys-bsd.c,v 1.30 1998/03/25 02:19:26 paulus Exp $";
+static char rcsid[] = "$Id: sys-bsd.c,v 1.34 1998/11/07 06:59:30 paulus Exp $";
/* $NetBSD: sys-bsd.c,v 1.1.1.3 1997/09/26 18:53:04 christos Exp $ */
+#endif
/*
* TODO:
#if defined(NetBSD) && (NetBSD >= 199703)
#include <netinet/if_inarp.h>
#else /* NetBSD 1.2D or later */
+#ifdef __FreeBSD__
+#include <netinet/if_ether.h>
+#else
#include <net/if_ether.h>
#endif
#endif
+#endif
#include "pppd.h"
#include "fsm.h"
/*
* sys_check_options - check the options that the user specified
*/
-void
+int
sys_check_options()
{
+#ifndef CDTRCTS
+ if (crtscts == 2) {
+ syslog(LOG_WARNING, "DTR/CTS flow control is not supported on this system");
+ return 0;
+ }
+#endif
+ return 1;
}
/*
}
tios.c_cflag &= ~(CSIZE | CSTOPB | PARENB | CLOCAL);
- if (crtscts > 0 && !local)
- tios.c_cflag |= CRTSCTS;
- else if (crtscts < 0)
+ if (crtscts > 0 && !local) {
+ if (crtscts == 2) {
+#ifdef CDTRCTS
+ tios.c_cflag |= CDTRCTS;
+#endif
+ } else
+ tios.c_cflag |= CRTSCTS;
+ } else if (crtscts < 0) {
tios.c_cflag &= ~CRTSCTS;
+#ifdef CDTRCTS
+ tios.c_cflag &= ~CDTRCTS;
+#endif
+ }
tios.c_cflag |= CS8 | CREAD | HUPCL;
if (local || !modem)
memset(&rtmsg, 0, sizeof(rtmsg));
rtmsg.hdr.rtm_type = cmd == 's'? RTM_ADD: RTM_DELETE;
- rtmsg.hdr.rtm_flags = RTF_UP | RTF_GATEWAY;
+ rtmsg.hdr.rtm_flags = RTF_UP | RTF_GATEWAY | RTF_STATIC;
rtmsg.hdr.rtm_version = RTM_VERSION;
rtmsg.hdr.rtm_seq = ++rtm_seq;
rtmsg.hdr.rtm_addrs = RTA_DST | RTA_GATEWAY | RTA_NETMASK;