lcp.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* lcp.h - Link Control Protocol definitions.
*
* Copyright (c) 2000 by Sun Microsystems, Inc.
* All rights reserved.
*
* Copyright (c) 1989 Carnegie Mellon University.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by Carnegie Mellon University. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: lcp.h,v 1.15 2000/04/04 07:06:51 paulus Exp $
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#ifndef __LCP_H_
#define __LCP_H_
#ifdef __cplusplus
extern "C" {
#endif
/*
* Options.
*/
/*
* LCP-specific packet types.
*/
/*
* Callback operation field values
*/
#define CBOP_AUTH 0 /* Location determined by user auth */
/* FCS-Alternatives bits (RFC 1570) */
/* An endpoint discriminator, used with multilink. */
struct epdisc {
unsigned char class;
unsigned char length;
unsigned char value[MAX_ENDP_LEN];
};
/* values for epdisc.class */
#define EPD_NULL 0 /* null discriminator, no data */
#define EPD_LOCAL 1
#define EPD_IP 2
#define EPD_MAC 3
#define EPD_MAGIC 4
#define EPD_PHONENUM 5
/*
* The state of options is described by an lcp_options structure.
*
* so that we can represent the choices of requiring or refusing each
* separately. The chap_mdtype value can't do that.
*/
typedef struct lcp_options {
bool passive; /* Don't die if we don't get a response */
bool silent; /* Wait for the other end to start first */
bool restart; /* Restart vs. exit after close */
bool neg_mru; /* Negotiate the MRU? */
bool neg_asyncmap; /* Negotiate the async map? */
bool neg_upap; /* Ask for UPAP authentication? */
bool neg_chap; /* Ask for CHAP authentication? */
bool neg_mschap; /* Ask for MS-CHAPv1 authentication? */
bool neg_mschapv2; /* Ask for MS-CHAPv2 authentication? */
bool neg_magicnumber; /* Ask for magic number? */
bool neg_pcompression; /* HDLC Protocol Field Compression? */
bool neg_accompression; /* HDLC Address/Control Field Compression? */
bool neg_lqr; /* Negotiate use of Link Quality Reports */
bool neg_cbcp; /* Negotiate use of CBCP */
bool neg_mrru; /* negotiate multilink MRRU */
#ifdef MUX_FRAME
#endif
bool neg_ssnhf; /* negotiate short sequence numbers */
bool neg_endpoint; /* negotiate endpoint discriminator */
bool neg_fcs; /* negotiate FCS alternatives */
int mru; /* Value of MRU */
int mrru; /* Value of MRRU, and multilink enable */
int numloops; /* Number of loops during magic number neg. */
} lcp_options;
/*
* The structure passed to lcp_settimeremaining(), holds the unit
* number of the link being timed, and the time remaining for that
* connection.
*/
struct lcp_timer {
int unit;
};
extern lcp_options lcp_wantoptions[];
extern lcp_options lcp_gotoptions[];
extern lcp_options lcp_allowoptions[];
extern lcp_options lcp_hisoptions[];
void lcp_lowerup __P((int));
void lcp_lowerdown __P((int));
/*
* Procedures exported from multilink.c
*/
/* string from endpoint discriminator */
/* endpt discriminator from str */
extern struct protent lcp_protent;
/* Default number of times we receive our magic number from the peer
before deciding the link is looped-back. */
#define DEFLOOPBACKFAIL 10
#ifdef __cplusplus
}
#endif
#endif /* __LCP_H_ */