lcp.h revision 6756
1/*
2 *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
3 *
4 *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
5 *
6 * Redistribution and use in source and binary forms are permitted
7 * provided that the above copyright notice and this paragraph are
8 * duplicated in all such forms and that any documentation,
9 * advertising materials, and other materials related to such
10 * distribution and use acknowledge that the software was developed
11 * by the Internet Initiative Japan.  The name of the
12 * IIJ may not be used to endorse or promote products derived
13 * from this software without specific prior written permission.
14 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
15 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
16 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 *
18 * $Id: lcp.h,v 1.2 1995/02/26 12:17:36 amurai Exp $
19 *
20 *	TODO:
21 */
22
23#ifndef _LCP_H_
24#define _LPC_H_
25#include "cdefs.h"
26
27struct lcpstate {
28  u_long  his_mru;
29  u_long  his_accmap;
30  u_long  his_magic;
31  u_long  his_lqrperiod;
32  u_char  his_protocomp;
33  u_char  his_acfcomp;
34  u_short his_auth;
35
36  u_long  want_mru;
37  u_long  want_accmap;
38  u_long  want_magic;
39  u_long  want_lqrperiod;
40  u_char  want_protocomp;
41  u_char  want_acfcomp;
42  u_short want_auth;
43
44  u_long  his_reject;		/* Request codes rejected by peer */
45  u_long  my_reject;		/* Request codes I have rejected */
46
47  u_short auth_iwait;
48  u_short auth_ineed;
49};
50
51#define	LCP_MAXCODE	CODE_DISCREQ
52
53#define	TY_MRU		1	/* Maximum-Receive-Unit */
54#define	TY_ACCMAP	2	/* Async-Control-Character-Map */
55#define	TY_AUTHPROTO	3	/* Authentication-Protocol */
56#define	TY_QUALPROTO	4	/* Quality-Protocol */
57#define	TY_MAGICNUM	5	/* Magic-Number */
58#define	TY_RESERVED	6	/* RESERVED */
59#define	TY_PROTOCOMP	7	/* Protocol-Field-Compression */
60#define	TY_ACFCOMP	8	/* Address-and-Control-Field-Compression */
61#define	TY_FCSALT	9	/* FCS-Alternatives */
62#define	TY_SDP		10	/* Self-Dscribing-Padding */
63#define	TY_NUMMODE	11	/* Numbered-Mode */
64#define	TY_XXXXXX	12
65#define	TY_CALLBACK	13	/* Callback */
66#define	TY_YYYYYY	14
67#define	TY_COMPFRAME	15	/* Compound-Frames */
68
69struct lqrreq {
70  u_char  type;
71  u_char  length;
72  u_short proto;		/* Quality protocol */
73  u_long  period;		/* Reporting interval */
74};
75
76extern struct lcpstate LcpInfo;
77
78extern void LcpInit __P((void));
79extern void LcpUp __P((void));
80extern void LcpSendProtoRej __P((u_char *, int));
81extern void LcpOpen __P((int mode));
82extern void LcpClose __P((void));
83extern void LcpDown __P((void));
84#endif
85