proto.h revision 78189
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: head/usr.sbin/ppp/proto.h 78189 2001-06-13 21:52:19Z brian $ 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 */ 3846686Sbrian#define PROTO_ICOMPD 0x00fb /* Individual link compressed */ 3946686Sbrian#define PROTO_COMPD 0x00fd /* Compressed datagram */ 4046686Sbrian 4146686Sbrian#define PROTO_COMPRESSIBLE(p) (((p) & 0xffe1) == 0x21) 4246686Sbrian 4346686Sbrian#define PROTO_IPCP 0x8021 4446686Sbrian#define PROTO_ICCP 0x80fb 4546686Sbrian#define PROTO_CCP 0x80fd 4646686Sbrian 4746686Sbrian#define PROTO_LCP 0xc021 4846686Sbrian#define PROTO_PAP 0xc023 4946686Sbrian#define PROTO_CBCP 0xc029 5046686Sbrian#define PROTO_LQR 0xc025 5146686Sbrian#define PROTO_CHAP 0xc223 5246686Sbrian 5346686Sbrianstruct lcp; 5446686Sbrian 5546686Sbrianextern int proto_WrapperOctets(struct lcp *, u_short); 5646686Sbrianstruct mbuf *proto_Prepend(struct mbuf *, u_short, unsigned, int); 5746686Sbrian 5846686Sbrianextern struct layer protolayer; 59