xref: /illumos-gate/usr/src/uts/common/net/ppp_defs.h (revision a0b85df4)
17c478bd9Sstevel@tonic-gate /*	$Id: ppp_defs.h,v 1.14 1999/08/13 01:55:40 paulus Exp $	*/
27c478bd9Sstevel@tonic-gate 
37c478bd9Sstevel@tonic-gate /*
47c478bd9Sstevel@tonic-gate  * ppp_defs.h - PPP definitions.
57c478bd9Sstevel@tonic-gate  *
6*a0b85df4Sstevel  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
77c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
87c478bd9Sstevel@tonic-gate  *
97c478bd9Sstevel@tonic-gate  * Copyright (c) 1994 The Australian National University.
107c478bd9Sstevel@tonic-gate  * All rights reserved.
117c478bd9Sstevel@tonic-gate  *
127c478bd9Sstevel@tonic-gate  * Permission to use, copy, modify, and distribute this software and its
137c478bd9Sstevel@tonic-gate  * documentation is hereby granted, provided that the above copyright
147c478bd9Sstevel@tonic-gate  * notice appears in all copies.  This software is provided without any
157c478bd9Sstevel@tonic-gate  * warranty, express or implied. The Australian National University
167c478bd9Sstevel@tonic-gate  * makes no representations about the suitability of this software for
177c478bd9Sstevel@tonic-gate  * any purpose.
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * IN NO EVENT SHALL THE AUSTRALIAN NATIONAL UNIVERSITY BE LIABLE TO ANY
207c478bd9Sstevel@tonic-gate  * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
217c478bd9Sstevel@tonic-gate  * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
227c478bd9Sstevel@tonic-gate  * THE AUSTRALIAN NATIONAL UNIVERSITY HAVE BEEN ADVISED OF THE POSSIBILITY
237c478bd9Sstevel@tonic-gate  * OF SUCH DAMAGE.
247c478bd9Sstevel@tonic-gate  *
257c478bd9Sstevel@tonic-gate  * THE AUSTRALIAN NATIONAL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES,
267c478bd9Sstevel@tonic-gate  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
277c478bd9Sstevel@tonic-gate  * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
287c478bd9Sstevel@tonic-gate  * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO
297c478bd9Sstevel@tonic-gate  * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
307c478bd9Sstevel@tonic-gate  * OR MODIFICATIONS.
317c478bd9Sstevel@tonic-gate  */
327c478bd9Sstevel@tonic-gate 
337c478bd9Sstevel@tonic-gate #ifndef _PPP_DEFS_H_
347c478bd9Sstevel@tonic-gate #define	_PPP_DEFS_H_
357c478bd9Sstevel@tonic-gate 
367c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
377c478bd9Sstevel@tonic-gate 
387c478bd9Sstevel@tonic-gate #ifdef __cplusplus
397c478bd9Sstevel@tonic-gate extern "C" {
407c478bd9Sstevel@tonic-gate #endif
417c478bd9Sstevel@tonic-gate 
427c478bd9Sstevel@tonic-gate /*
437c478bd9Sstevel@tonic-gate  * The basic PPP frame.
447c478bd9Sstevel@tonic-gate  */
457c478bd9Sstevel@tonic-gate #define	PPP_HDRLEN	4	/* octets for standard ppp header */
467c478bd9Sstevel@tonic-gate #define	PPP_FCSLEN	2	/* octets for FCS */
477c478bd9Sstevel@tonic-gate #define	PPP_FCS32LEN	4	/* octets for FCS-32 */
487c478bd9Sstevel@tonic-gate #define	PPP_MAX_MUX_LEN	127	/* maximum length of muxed frame */
497c478bd9Sstevel@tonic-gate #define	PFF		0x80	/* protocol field flag */
507c478bd9Sstevel@tonic-gate 
517c478bd9Sstevel@tonic-gate /*
527c478bd9Sstevel@tonic-gate  * Packet sizes
537c478bd9Sstevel@tonic-gate  */
547c478bd9Sstevel@tonic-gate #define	PPP_MTU		1500	/* Default MTU (size of Info field) */
557c478bd9Sstevel@tonic-gate #define	PPP_MAXMTU	65535 - (PPP_HDRLEN + PPP_FCSLEN)
567c478bd9Sstevel@tonic-gate #define	PPP_MINMTU	64
577c478bd9Sstevel@tonic-gate #define	PPP_MRU		1500	/* default MRU = max length of info field */
587c478bd9Sstevel@tonic-gate #define	PPP_MAXMRU	65000	/* Largest MRU we allow */
597c478bd9Sstevel@tonic-gate #define	PPP_MINMRU	128
607c478bd9Sstevel@tonic-gate 
617c478bd9Sstevel@tonic-gate #define	PPP_ADDRESS(p)	(((uchar_t *)(p))[0])
627c478bd9Sstevel@tonic-gate #define	PPP_CONTROL(p)	(((uchar_t *)(p))[1])
637c478bd9Sstevel@tonic-gate #define	PPP_PROTOCOL(p)	((((uchar_t *)(p))[2] << 8) + ((uchar_t *)(p))[3])
647c478bd9Sstevel@tonic-gate 
657c478bd9Sstevel@tonic-gate /*
667c478bd9Sstevel@tonic-gate  * Significant octet values.
677c478bd9Sstevel@tonic-gate  */
687c478bd9Sstevel@tonic-gate #define	PPP_ALLSTATIONS	0xff	/* All-Stations broadcast address */
697c478bd9Sstevel@tonic-gate #define	PPP_UI		0x03	/* Unnumbered Information */
707c478bd9Sstevel@tonic-gate #define	PPP_FLAG	0x7e	/* Flag Sequence */
717c478bd9Sstevel@tonic-gate #define	PPP_ESCAPE	0x7d	/* Asynchronous Control Escape */
727c478bd9Sstevel@tonic-gate #define	PPP_TRANS	0x20	/* Asynchronous transparency modifier */
737c478bd9Sstevel@tonic-gate 
747c478bd9Sstevel@tonic-gate /*
757c478bd9Sstevel@tonic-gate  * Protocol field values.
767c478bd9Sstevel@tonic-gate  */
777c478bd9Sstevel@tonic-gate #define	PPP_IP		0x21	/* Internet Protocol */
787c478bd9Sstevel@tonic-gate #define	PPP_OSI		0x23	/* OSI Network Layer */
797c478bd9Sstevel@tonic-gate #define	PPP_AT		0x29	/* AppleTalk Protocol */
807c478bd9Sstevel@tonic-gate #define	PPP_IPX		0x2b	/* IPX protocol */
817c478bd9Sstevel@tonic-gate #define	PPP_VJC_COMP	0x2d	/* VJ compressed TCP */
827c478bd9Sstevel@tonic-gate #define	PPP_VJC_UNCOMP	0x2f	/* VJ uncompressed TCP */
837c478bd9Sstevel@tonic-gate #define	PPP_BRIDGE	0x31	/* Bridging */
847c478bd9Sstevel@tonic-gate #define	PPP_MP		0x3d	/* Multilink protocol */
857c478bd9Sstevel@tonic-gate #define	PPP_ENCRYPT	0x53	/* Encryption */
867c478bd9Sstevel@tonic-gate #define	PPP_ENCRYPTFRAG	0x55	/* Individual Link Encryption */
877c478bd9Sstevel@tonic-gate #define	PPP_IPV6	0x57	/* Internet Protocol Version 6 */
887c478bd9Sstevel@tonic-gate #define	PPP_MUX		0x59	/* PPP Muxing */
897c478bd9Sstevel@tonic-gate #define	PPP_FULLHDR	0x61	/* IP Compression; full header */
907c478bd9Sstevel@tonic-gate #define	PPP_COMPTCP	0x63	/* IP Compression; compressed TCP */
917c478bd9Sstevel@tonic-gate #define	PPP_COMPNONTCP	0x65	/* IP Compression; non TCP */
927c478bd9Sstevel@tonic-gate #define	PPP_COMPUDP8	0x67	/* IP Compression; UDP, 8 bit CID */
937c478bd9Sstevel@tonic-gate #define	PPP_COMPRTP8	0x69	/* IP Compression; RTP, 8 bit CID */
947c478bd9Sstevel@tonic-gate #define	PPP_COMPFRAG	0xfb	/* fragment compressed below bundle */
957c478bd9Sstevel@tonic-gate #define	PPP_COMP	0xfd	/* compressed packet */
967c478bd9Sstevel@tonic-gate #define	PPP_802HELLO	0x201	/* 802.1d Hello (OBSOLETE) */
977c478bd9Sstevel@tonic-gate #define	PPP_MPLS	0x281	/* MPLS Unicast */
987c478bd9Sstevel@tonic-gate #define	PPP_MPLSMC	0x283	/* MPLS Multicast */
997c478bd9Sstevel@tonic-gate #define	PPP_COMPTCPND	0x2063	/* IP Compression; compressed TCP no delta */
1007c478bd9Sstevel@tonic-gate #define	PPP_COMPSTATE	0x2065	/* IP Compression; state message */
1017c478bd9Sstevel@tonic-gate #define	PPP_COMPUDP16	0x2067	/* IP Compression; UDP, 16 bit CID */
1027c478bd9Sstevel@tonic-gate #define	PPP_COMPRTP16	0x2069	/* IP Compression; RTP, 16 bit CID */
1037c478bd9Sstevel@tonic-gate #define	PPP_IPCP	0x8021	/* IP Control Protocol */
1047c478bd9Sstevel@tonic-gate #define	PPP_OSINLCP	0x8023	/* OSI Network Layer Control Protocol */
1057c478bd9Sstevel@tonic-gate #define	PPP_ATCP	0x8029	/* AppleTalk Control Protocol */
1067c478bd9Sstevel@tonic-gate #define	PPP_IPXCP	0x802b	/* IPX Control Protocol */
1077c478bd9Sstevel@tonic-gate #define	PPP_BCP		0x8031	/* Bridging Control Protocol */
1087c478bd9Sstevel@tonic-gate #define	PPP_ECP		0x8053	/* Encryption Control Protocol */
1097c478bd9Sstevel@tonic-gate #define	PPP_ECPFRAG	0x8055	/* ECP at link level (below MP bundle) */
1107c478bd9Sstevel@tonic-gate #define	PPP_IPV6CP	0x8057	/* IPv6 Control Protocol */
1117c478bd9Sstevel@tonic-gate #define	PPP_MUXCP	0x8059	/* PPP Muxing Control Protocol */
1127c478bd9Sstevel@tonic-gate #define	PPP_CCPFRAG	0x80fb	/* CCP at link level (below MP bundle) */
1137c478bd9Sstevel@tonic-gate #define	PPP_CCP		0x80fd	/* Compression Control Protocol */
1147c478bd9Sstevel@tonic-gate #define	PPP_MPLSCP	0x8281	/* MPLS Control Protocol */
1157c478bd9Sstevel@tonic-gate #define	PPP_LCP		0xc021	/* Link Control Protocol */
1167c478bd9Sstevel@tonic-gate #define	PPP_PAP		0xc023	/* Password Authentication Protocol */
1177c478bd9Sstevel@tonic-gate #define	PPP_LQR		0xc025	/* Link Quality Report protocol */
1187c478bd9Sstevel@tonic-gate #define	PPP_BACP	0xc02b	/* Bandwidth Allocation Control Protocol */
1197c478bd9Sstevel@tonic-gate #define	PPP_BAP		0xc02d	/* Bandwidth Allocation Protocol */
1207c478bd9Sstevel@tonic-gate #define	PPP_CBCP	0xc029	/* Callback Control Protocol */
1217c478bd9Sstevel@tonic-gate #define	PPP_CHAP	0xc223	/* Challenge Handshake Auth. Protocol */
1227c478bd9Sstevel@tonic-gate #define	PPP_EAP		0xc227	/* Extensible Authentication Protocol */
1237c478bd9Sstevel@tonic-gate 
1247c478bd9Sstevel@tonic-gate /*
1257c478bd9Sstevel@tonic-gate  * Values for FCS calculations.
1267c478bd9Sstevel@tonic-gate  */
1277c478bd9Sstevel@tonic-gate #define	PPP_INITFCS	0xffff	/* Initial FCS value */
1287c478bd9Sstevel@tonic-gate #define	PPP_GOODFCS	0xf0b8	/* Good final FCS value */
1297c478bd9Sstevel@tonic-gate #define	PPP_FCS(fcs, c)	(((fcs) >> 8) ^ fcstab[((fcs) ^ (c)) & 0xff])
1307c478bd9Sstevel@tonic-gate 
1317c478bd9Sstevel@tonic-gate #define	PPPINITFCS16	PPP_INITFCS
1327c478bd9Sstevel@tonic-gate #define	PPPGOODFCS16	PPP_GOODFCS
1337c478bd9Sstevel@tonic-gate #define	PPPFCS16(fcs, c)	PPP_FCS((fcs), (c))
1347c478bd9Sstevel@tonic-gate 
1357c478bd9Sstevel@tonic-gate #define	PPPINITFCS32	0xfffffffful
1367c478bd9Sstevel@tonic-gate #define	PPPGOODFCS32	0xdebb20e3ul
1377c478bd9Sstevel@tonic-gate #define	PPPFCS32(fcs, c) (((fcs) >> 8) ^ crc32_table[((fcs) ^ (c)) & 0xff])
1387c478bd9Sstevel@tonic-gate 
1397c478bd9Sstevel@tonic-gate /* Marker values shared between pppdump and pppd. */
1407c478bd9Sstevel@tonic-gate #define	RECMARK_STARTSEND	1
1417c478bd9Sstevel@tonic-gate #define	RECMARK_STARTRECV	2
1427c478bd9Sstevel@tonic-gate #define	RECMARK_ENDSEND		3
1437c478bd9Sstevel@tonic-gate #define	RECMARK_ENDRECV		4
1447c478bd9Sstevel@tonic-gate #define	RECMARK_TIMEDELTA32	5
1457c478bd9Sstevel@tonic-gate #define	RECMARK_TIMEDELTA8	6
1467c478bd9Sstevel@tonic-gate #define	RECMARK_TIMESTART	7
1477c478bd9Sstevel@tonic-gate 
1487c478bd9Sstevel@tonic-gate /*
1497c478bd9Sstevel@tonic-gate  * A 32-bit unsigned integral type.
1507c478bd9Sstevel@tonic-gate  */
1517c478bd9Sstevel@tonic-gate 
1527c478bd9Sstevel@tonic-gate #if !defined(__BIT_TYPES_DEFINED__) && !defined(_BITYPES) && \
1537c478bd9Sstevel@tonic-gate 	!defined(__FreeBSD__) && (NS_TARGET < 40)
1547c478bd9Sstevel@tonic-gate #ifdef	UINT32_T
1557c478bd9Sstevel@tonic-gate typedef UINT32_T	u_int32_t;
1567c478bd9Sstevel@tonic-gate #else
1577c478bd9Sstevel@tonic-gate typedef unsigned int	u_int32_t;
1587c478bd9Sstevel@tonic-gate typedef unsigned short  u_int16_t;
1597c478bd9Sstevel@tonic-gate #endif
1607c478bd9Sstevel@tonic-gate #endif
1617c478bd9Sstevel@tonic-gate 
1627c478bd9Sstevel@tonic-gate #if defined(__sun) && !defined(_SYS_INT_TYPES_H) && !defined(_UINT32_T)
1637c478bd9Sstevel@tonic-gate /* Backward compatibility */
1647c478bd9Sstevel@tonic-gate typedef uint_t uint32_t;
1657c478bd9Sstevel@tonic-gate typedef ushort_t uint16_t;
1667c478bd9Sstevel@tonic-gate typedef uchar_t uint8_t;
1677c478bd9Sstevel@tonic-gate typedef unsigned long uintptr_t;
1687c478bd9Sstevel@tonic-gate #define	_UINT32_T
1697c478bd9Sstevel@tonic-gate #endif
1707c478bd9Sstevel@tonic-gate 
1717c478bd9Sstevel@tonic-gate /*
1727c478bd9Sstevel@tonic-gate  * Extended asyncmap - allows any character to be escaped.
1737c478bd9Sstevel@tonic-gate  */
1747c478bd9Sstevel@tonic-gate typedef u_int32_t	ext_accm[8];
1757c478bd9Sstevel@tonic-gate 
1767c478bd9Sstevel@tonic-gate /*
1777c478bd9Sstevel@tonic-gate  * What to do with network protocol (NP) packets.
1787c478bd9Sstevel@tonic-gate  */
1797c478bd9Sstevel@tonic-gate enum NPmode {
1807c478bd9Sstevel@tonic-gate     NPMODE_PASS,		/* pass the packet through */
1817c478bd9Sstevel@tonic-gate     NPMODE_DROP,		/* silently drop the packet */
1827c478bd9Sstevel@tonic-gate     NPMODE_ERROR,		/* return an error */
1837c478bd9Sstevel@tonic-gate     NPMODE_QUEUE		/* save it up for later. */
1847c478bd9Sstevel@tonic-gate };
1857c478bd9Sstevel@tonic-gate 
1867c478bd9Sstevel@tonic-gate /*
1877c478bd9Sstevel@tonic-gate  * Statistics.
1887c478bd9Sstevel@tonic-gate  */
1897c478bd9Sstevel@tonic-gate struct pppstat	{
1907c478bd9Sstevel@tonic-gate     u_int32_t ppp_ibytes;	/* bytes received */
1917c478bd9Sstevel@tonic-gate     u_int32_t ppp_ipackets;	/* packets received */
1927c478bd9Sstevel@tonic-gate     u_int32_t ppp_ierrors;	/* receive errors */
1937c478bd9Sstevel@tonic-gate     u_int32_t ppp_obytes;	/* bytes sent */
1947c478bd9Sstevel@tonic-gate     u_int32_t ppp_opackets;	/* packets sent */
1957c478bd9Sstevel@tonic-gate     u_int32_t ppp_oerrors;	/* transmit errors */
1967c478bd9Sstevel@tonic-gate };
1977c478bd9Sstevel@tonic-gate 
1987c478bd9Sstevel@tonic-gate struct vjstat {
1997c478bd9Sstevel@tonic-gate     u_int32_t vjs_packets;	/* outbound packets */
2007c478bd9Sstevel@tonic-gate     u_int32_t vjs_compressed; /* outbound compressed packets */
2017c478bd9Sstevel@tonic-gate     u_int32_t vjs_searches;	/* searches for connection state */
2027c478bd9Sstevel@tonic-gate     u_int32_t vjs_misses;	/* times couldn't find conn. state */
2037c478bd9Sstevel@tonic-gate     u_int32_t vjs_uncompressedin; /* inbound uncompressed packets */
2047c478bd9Sstevel@tonic-gate     u_int32_t vjs_compressedin; /* inbound compressed packets */
2057c478bd9Sstevel@tonic-gate     u_int32_t vjs_errorin;	/* inbound unknown type packets */
2067c478bd9Sstevel@tonic-gate     u_int32_t vjs_tossed;	/* inbound packets tossed because of error */
2077c478bd9Sstevel@tonic-gate };
2087c478bd9Sstevel@tonic-gate 
2097c478bd9Sstevel@tonic-gate struct ppp_stats {
2107c478bd9Sstevel@tonic-gate     struct pppstat p;		/* basic PPP statistics */
2117c478bd9Sstevel@tonic-gate     struct vjstat vj;		/* VJ header compression statistics */
2127c478bd9Sstevel@tonic-gate };
2137c478bd9Sstevel@tonic-gate 
2147c478bd9Sstevel@tonic-gate #ifdef SOL2
2157c478bd9Sstevel@tonic-gate #define	PPP_COUNTER_F	"llu"
2167c478bd9Sstevel@tonic-gate typedef uint64_t	ppp_counter_t;
2177c478bd9Sstevel@tonic-gate 
2187c478bd9Sstevel@tonic-gate struct pppstat64 {
2197c478bd9Sstevel@tonic-gate 	ppp_counter_t ppp_ibytes;	/* bytes received */
2207c478bd9Sstevel@tonic-gate 	ppp_counter_t ppp_ipackets;	/* packets received */
2217c478bd9Sstevel@tonic-gate 	ppp_counter_t ppp_ierrors;	/* receive errors */
2227c478bd9Sstevel@tonic-gate 	ppp_counter_t ppp_obytes;	/* bytes sent */
2237c478bd9Sstevel@tonic-gate 	ppp_counter_t ppp_opackets;	/* packets sent */
2247c478bd9Sstevel@tonic-gate 	ppp_counter_t ppp_oerrors;	/* transmit errors */
2257c478bd9Sstevel@tonic-gate };
2267c478bd9Sstevel@tonic-gate 
2277c478bd9Sstevel@tonic-gate struct ppp_stats64 {
2287c478bd9Sstevel@tonic-gate 	struct pppstat64 p;
2297c478bd9Sstevel@tonic-gate 	struct vjstat vj;
2307c478bd9Sstevel@tonic-gate };
2317c478bd9Sstevel@tonic-gate #else
2327c478bd9Sstevel@tonic-gate #define	PPP_COUNTER_F	"u"
2337c478bd9Sstevel@tonic-gate typedef u_int32_t	ppp_counter_t;
2347c478bd9Sstevel@tonic-gate #endif
2357c478bd9Sstevel@tonic-gate 
2367c478bd9Sstevel@tonic-gate struct compstat {
2377c478bd9Sstevel@tonic-gate     u_int32_t unc_bytes;	/* total uncompressed bytes */
2387c478bd9Sstevel@tonic-gate     u_int32_t unc_packets;	/* total uncompressed packets */
2397c478bd9Sstevel@tonic-gate     u_int32_t comp_bytes;	/* compressed bytes */
2407c478bd9Sstevel@tonic-gate     u_int32_t comp_packets;	/* compressed packets */
2417c478bd9Sstevel@tonic-gate     u_int32_t inc_bytes;	/* incompressible bytes */
2427c478bd9Sstevel@tonic-gate     u_int32_t inc_packets;	/* incompressible packets */
2437c478bd9Sstevel@tonic-gate     u_int32_t ratio;		/* recent compression ratio << 8 */
2447c478bd9Sstevel@tonic-gate };
2457c478bd9Sstevel@tonic-gate 
2467c478bd9Sstevel@tonic-gate struct ppp_comp_stats {
2477c478bd9Sstevel@tonic-gate     struct compstat c;		/* packet compression statistics */
2487c478bd9Sstevel@tonic-gate     struct compstat d;		/* packet decompression statistics */
2497c478bd9Sstevel@tonic-gate };
2507c478bd9Sstevel@tonic-gate 
2517c478bd9Sstevel@tonic-gate /*
2527c478bd9Sstevel@tonic-gate  * The following structure records the time in seconds since
2537c478bd9Sstevel@tonic-gate  * the last NP packet was sent or received.
2547c478bd9Sstevel@tonic-gate  */
2557c478bd9Sstevel@tonic-gate struct ppp_idle {
2567c478bd9Sstevel@tonic-gate 	/*
2577c478bd9Sstevel@tonic-gate 	 * Fix the length of these fields to be 32-bit, since
2587c478bd9Sstevel@tonic-gate 	 * otherwise, a time_t (long) is 64-bit in kernel while 32-bit
2597c478bd9Sstevel@tonic-gate 	 * in userland when running on a 64-bit CPU with a 64-bit OS.
2607c478bd9Sstevel@tonic-gate 	 */
2617c478bd9Sstevel@tonic-gate     u_int32_t xmit_idle;	/* time since last NP packet sent */
2627c478bd9Sstevel@tonic-gate     u_int32_t recv_idle;	/* time since last NP packet received */
2637c478bd9Sstevel@tonic-gate };
2647c478bd9Sstevel@tonic-gate 
2657c478bd9Sstevel@tonic-gate enum LSstat {
2667c478bd9Sstevel@tonic-gate     PPP_LINKSTAT_HANGUP = 0xabcd, /* link is hung up */
2677c478bd9Sstevel@tonic-gate     PPP_LINKSTAT_NEEDUP,	/* link is down and needs to be up */
2687c478bd9Sstevel@tonic-gate     PPP_LINKSTAT_IPV4_UNBOUND,	/* DL_UNBIND received on IPv4 stream */
2697c478bd9Sstevel@tonic-gate     PPP_LINKSTAT_IPV6_UNBOUND,	/* DL_UNBIND received on IPv6 stream */
2707c478bd9Sstevel@tonic-gate     PPP_LINKSTAT_IPV4_BOUND,	/* DL_BIND received on IPv4 stream */
2717c478bd9Sstevel@tonic-gate     PPP_LINKSTAT_IPV6_BOUND,	/* DL_BIND received on IPv6 stream */
2727c478bd9Sstevel@tonic-gate     PPP_LINKSTAT_UP		/* Integrated driver; hardware is up */
2737c478bd9Sstevel@tonic-gate };
2747c478bd9Sstevel@tonic-gate 
2757c478bd9Sstevel@tonic-gate #define	PPPLSMAGIC	0x53505050
2767c478bd9Sstevel@tonic-gate 
2777c478bd9Sstevel@tonic-gate struct ppp_ls {
2787c478bd9Sstevel@tonic-gate     u_int32_t magic;		/* magic number identifier (PPPLSMAGIC) */
2797c478bd9Sstevel@tonic-gate     u_int32_t ppp_message;	/* link status message */
2807c478bd9Sstevel@tonic-gate };
2817c478bd9Sstevel@tonic-gate 
2827c478bd9Sstevel@tonic-gate #ifndef __P
2837c478bd9Sstevel@tonic-gate #ifdef __STDC__
2847c478bd9Sstevel@tonic-gate #define	__P(x)	x
2857c478bd9Sstevel@tonic-gate #else
2867c478bd9Sstevel@tonic-gate #define	__P(x)	()
2877c478bd9Sstevel@tonic-gate #endif
2887c478bd9Sstevel@tonic-gate #endif
2897c478bd9Sstevel@tonic-gate 
2907c478bd9Sstevel@tonic-gate #ifdef __cplusplus
2917c478bd9Sstevel@tonic-gate }
2927c478bd9Sstevel@tonic-gate #endif
2937c478bd9Sstevel@tonic-gate 
2947c478bd9Sstevel@tonic-gate #endif /* _PPP_DEFS_H_ */
295