/*
* NET3: A (fairly minimal) implementation of synchronous PPP for Linux
* as well as a CISCO HDLC implementation. See the copyright
* message below for the original source.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the license, or (at your option) any later version.
*
* Note however. This code is also used in a different form by FreeBSD.
* Therefore when making any non OS specific change please consider
* contributing it back to the original author under the terms
* below in addition.
* -- Alan
*
* Port for Linux-2.1 by Jan "Yenya" Kasprzak <kas@fi.muni.cz>
*/
/*
* Synchronous PPP/Cisco link level subroutines.
* Keepalive protocol implemented in both Cisco and PPP modes.
*
* Copyright (C) 1994 Cronyx Ltd.
* Author: Serge Vakulenko, <vak@zebub.msk.su>
*
* This software is distributed with NO WARRANTIES, not even the implied
* warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* Authors grant any other persons or organisations permission to use
* or modify this software as long as this message is kept with the software,
* all derivative works or modified versions.
*
* Version 1.9, Wed Oct 4 18:58:15 MSK 1995
*
* $Id: syncppp.c,v 1.18 2000/04/11 05:25:31 asj Exp $
*/
#undef DEBUG
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/if_arp.h>
#include <linux/skbuff.h>
#include <linux/route.h>
#include <linux/netdevice.h>
#include <linux/inetdevice.h>
#include <linux/random.h>
#include <linux/pkt_sched.h>
#include <linux/spinlock.h>
#include <linux/rcupdate.h>
#include <net/net_namespace.h>
#include <net/syncppp.h>
#include <asm/byteorder.h>
#include <asm/uaccess.h>
#define MAXALIVECNT 6 /* max. alive packets */
#define PPP_ALLSTATIONS 0xff /* All-Stations broadcast address */
#define PPP_UI 0x03 /* Unnumbered Information */
#define PPP_IP 0x0021 /* Internet Protocol */
#define PPP_ISO 0x0023 /* ISO OSI Protocol */
#define PPP_XNS 0x0025 /* Xerox NS Protocol */
#define PPP_IPX 0x002b /* Novell IPX Protocol */
#define PPP_LCP 0xc021 /* Link Control Protocol */
#define PPP_IPCP 0x8021 /* Internet Protocol Control Protocol */
#define LCP_CONF_REQ 1 /* PPP LCP configure request */
#define LCP_CONF_ACK 2