178189Sbrian/*-
278189Sbrian * Copyright (c) 1996 - 2001 Brian Somers <brian@Awfulhak.org>
378189Sbrian *          based on work by Toshiharu OHNO <tony-o@iij.ad.jp>
478189Sbrian *                           Internet Initiative Japan, Inc (IIJ)
578189Sbrian * All rights reserved.
646686Sbrian *
778189Sbrian * Redistribution and use in source and binary forms, with or without
878189Sbrian * modification, are permitted provided that the following conditions
978189Sbrian * are met:
1078189Sbrian * 1. Redistributions of source code must retain the above copyright
1178189Sbrian *    notice, this list of conditions and the following disclaimer.
1278189Sbrian * 2. Redistributions in binary form must reproduce the above copyright
1378189Sbrian *    notice, this list of conditions and the following disclaimer in the
1478189Sbrian *    documentation and/or other materials provided with the distribution.
1546686Sbrian *
1678189Sbrian * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1778189Sbrian * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1878189Sbrian * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1978189Sbrian * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2078189Sbrian * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2178189Sbrian * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2278189Sbrian * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2378189Sbrian * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2478189Sbrian * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2578189Sbrian * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2678189Sbrian * SUCH DAMAGE.
2746686Sbrian *
2850479Speter * $FreeBSD$
2946686Sbrian */
3046686Sbrian
3146686Sbrian/*
3246686Sbrian *  Definition of protocol numbers
3346686Sbrian */
3446686Sbrian#define	PROTO_IP	0x0021	/* IP */
3546686Sbrian#define	PROTO_VJUNCOMP	0x002f	/* VJ Uncompressed */
3646686Sbrian#define	PROTO_VJCOMP	0x002d	/* VJ Compressed */
3746686Sbrian#define	PROTO_MP	0x003d	/* Multilink fragment */
3881634Sbrian#ifndef NOINET6
3981634Sbrian#define	PROTO_IPV6	0x0057	/* IPv6 */
4081634Sbrian#endif
4146686Sbrian#define	PROTO_ICOMPD	0x00fb	/* Individual link compressed */
4246686Sbrian#define	PROTO_COMPD	0x00fd	/* Compressed datagram */
4346686Sbrian
4487544Sbrian#define PROTO_COMPRESSIBLE(p) (((p) & 0xff81) == 0x01)
4546686Sbrian
4646686Sbrian#define	PROTO_IPCP	0x8021
4781634Sbrian#ifndef NOINET6
4881634Sbrian#define	PROTO_IPV6CP	0x8057
4981634Sbrian#endif
5046686Sbrian#define	PROTO_ICCP	0x80fb
5146686Sbrian#define	PROTO_CCP	0x80fd
5246686Sbrian
5346686Sbrian#define	PROTO_LCP	0xc021
5446686Sbrian#define	PROTO_PAP	0xc023
5546686Sbrian#define	PROTO_CBCP	0xc029
5646686Sbrian#define	PROTO_LQR	0xc025
5746686Sbrian#define	PROTO_CHAP	0xc223
5846686Sbrian
5946686Sbrianstruct lcp;
6046686Sbrian
6146686Sbrianextern int proto_WrapperOctets(struct lcp *, u_short);
6246686Sbrianstruct mbuf *proto_Prepend(struct mbuf *, u_short, unsigned, int);
6346686Sbrian
6446686Sbrianextern struct layer protolayer;
65