#include "netif/ppp/ppp_opts.h"
#if PPP_SUPPORT
#ifndef LCP_H
#define LCP_H
#include "ppp.h"
#ifdef __cplusplus
extern "C" {
#endif
#define CI_VENDOR 0
#define CI_MRU 1
#define CI_ASYNCMAP 2
#define CI_AUTHTYPE 3
#define CI_QUALITY 4
#define CI_MAGICNUMBER 5
#define CI_PCOMPRESSION 7
#define CI_ACCOMPRESSION 8
#define CI_FCSALTERN 9
#define CI_SDP 10
#define CI_NUMBERED 11
#define CI_CALLBACK 13
#define CI_MRRU 17
#define CI_SSNHF 18
#define CI_EPDISC 19
#define CI_MPPLUS 22
#define CI_LDISC 23
#define CI_LCPAUTH 24
#define CI_COBS 25
#define CI_PREFELIS 26
#define CI_MPHDRFMT 27
#define CI_I18N 28
#define CI_SDL 29
#define PROTREJ 8
#define ECHOREQ 9
#define ECHOREP 10
#define DISCREQ 11
#define IDENTIF 12
#define TIMEREM 13
#define CBCP_OPT 6
#if 0
#define DEFMRU 1500
#define MINMRU 128
#define MAXMRU 16384
#endif
#define MAX_ENDP_LEN 20
struct epdisc {
unsigned char class_;
unsigned char length;
unsigned char value[MAX_ENDP_LEN];
};
typedef struct lcp_options {
unsigned int passive :1;
unsigned int silent :1;
#if 0#endif
unsigned int neg_mru :1;
unsigned int neg_asyncmap :1;
#if PAP_SUPPORT
unsigned int neg_upap :1;
#endif
#if CHAP_SUPPORT
unsigned int neg_chap :1;
#endif
#if EAP_SUPPORT
unsigned int neg_eap :1;
#endif
unsigned int neg_magicnumber :1;
unsigned int neg_pcompression :1;
unsigned int neg_accompression :1;
#if LQR_SUPPORT
unsigned int neg_lqr :1;
#endif
unsigned int neg_cbcp :1;
#ifdef HAVE_MULTILINK
unsigned int neg_mrru :1;
#endif
unsigned int neg_ssnhf :1;
unsigned int neg_endpoint :1;
u16_t mru;
#ifdef HAVE_MULTILINK
u16_t mrru;
#endif
#if CHAP_SUPPORT
u8_t chap_mdtype;
#endif
u32_t asyncmap;
u32_t magicnumber;
u8_t numloops;
#if LQR_SUPPORT
u32_t lqr_period;
#endif
struct epdisc endpoint;
} lcp_options;
void lcp_open(ppp_pcb *pcb);
void lcp_close(ppp_pcb *pcb, const char *reason);
void lcp_lowerup(ppp_pcb *pcb);
void lcp_lowerdown(ppp_pcb *pcb);
void lcp_sprotrej(ppp_pcb *pcb, u_char *p, int len);
extern const struct protent lcp_protent;
#if 0#endif
#ifdef __cplusplus
}
#endif
#endif
#endif