34#if PPP_SUPPORT && CCP_SUPPORT
51#define CCP_RESETREQ 14
52#define CCP_RESETACK 15
58#define CCP_MAX_OPTION_LENGTH 32
64#define CCP_CODE(dp) ((dp)[0])
65#define CCP_ID(dp) ((dp)[1])
66#define CCP_LENGTH(dp) (((dp)[2] << 8) + (dp)[3])
69#define CCP_OPT_CODE(dp) ((dp)[0])
70#define CCP_OPT_LENGTH(dp) ((dp)[1])
71#define CCP_OPT_MINLEN 2
73#if BSDCOMPRESS_SUPPORT
78#define CI_BSD_COMPRESS 21
79#define CILEN_BSD_COMPRESS 3
82#define BSD_NBITS(x) ((x) & 0x1F)
83#define BSD_VERSION(x) ((x) >> 5)
84#define BSD_CURRENT_VERSION 1
85#define BSD_MAKE_OPT(v, n) (((v) << 5) | (n))
88#define BSD_MAX_BITS 15
97#define CI_DEFLATE_DRAFT 24
98#define CILEN_DEFLATE 4
100#define DEFLATE_MIN_SIZE 9
101#define DEFLATE_MAX_SIZE 15
102#define DEFLATE_METHOD_VAL 8
103#define DEFLATE_SIZE(x) (((x) >> 4) + 8)
104#define DEFLATE_METHOD(x) ((x) & 0x0F)
105#define DEFLATE_MAKE_OPT(w) ((((w) - 8) << 4) + DEFLATE_METHOD_VAL)
106#define DEFLATE_CHK_SEQUENCE 0
123#define CI_PREDICTOR_1 1
124#define CILEN_PREDICTOR_1 2
125#define CI_PREDICTOR_2 2
126#define CILEN_PREDICTOR_2 2
129typedef struct ccp_options {
132 unsigned int deflate_correct :1;
133 unsigned int deflate_draft :1;
135#if BSDCOMPRESS_SUPPORT
136 unsigned int bsd_compress :1;
139 unsigned int predictor_1 :1;
140 unsigned int predictor_2 :1;
146#if BSDCOMPRESS_SUPPORT
155extern const struct protent ccp_protent;
157void ccp_resetrequest(ppp_pcb *pcb);
int deflate(z_streamp strm, int flush) DECLSPEC_HIDDEN