+static int pushed_ppp;
+
+extern int hungup; /* has the physical layer been disconnected? */
+extern int kdebugflag;
+
+#define PAI_FLAGS_B7_0 0x100
+#define PAI_FLAGS_B7_1 0x200
+#define PAI_FLAGS_PAR_EVEN 0x400
+#define PAI_FLAGS_PAR_ODD 0x800
+#define PAI_FLAGS_HIBITS 0xF00
+
+/*
+ * ppp_available - check if this kernel supports PPP.
+ */
+int
+ppp_available()
+{
+ int fd, ret;
+
+ fd = open("/dev/tty", O_RDONLY, 0);
+ if (fd < 0)
+ return 1; /* can't find out - assume we have ppp */
+ ret = ioctl(fd, I_FIND, "pppasync") >= 0;
+ close(fd);
+ return ret;
+}