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