Documentation

Documentation

Includes

netif/ppp/ppp_opts.h

#include "netif/ppp/ppp_opts.h"
#include "netif/ppp/ppp_opts.h"

Macros

Marco CCP_H

#define CCP_H


      

Marco CCP_CONFREQ

#define CCP_CONFREQ 1


      

Marco CCP_CONFACK

#define CCP_CONFACK 2


      

Marco CCP_TERMREQ

#define CCP_TERMREQ 5


      

Marco CCP_TERMACK

#define CCP_TERMACK 6


      

Marco CCP_RESETREQ

#define CCP_RESETREQ 14


      

Marco CCP_RESETACK

#define CCP_RESETACK 15


      

Marco CCP_MAX_OPTION_LENGTH

#define CCP_MAX_OPTION_LENGTH 32


      

Marco CCP_CODE(dp)

#define CCP_CODE(dp)	((dp)[0])


      

Marco CCP_ID(dp)

#define CCP_ID(dp)	((dp)[1])


      

Marco CCP_LENGTH(dp)

#define CCP_LENGTH(dp)	(((dp)[2] << 8) + (dp)[3])


      

Marco CCP_HDRLEN

#define CCP_HDRLEN	4


      

Marco CCP_OPT_CODE(dp)

#define CCP_OPT_CODE(dp) ((dp)[0])


      

Marco CCP_OPT_LENGTH(dp)

#define CCP_OPT_LENGTH(dp) ((dp)[1])


      

Marco CCP_OPT_MINLEN

#define CCP_OPT_MINLEN	2


      

Marco CI_BSD_COMPRESS

#define CI_BSD_COMPRESS	21 /* config. option for BSD-Compress */


      

Marco CILEN_BSD_COMPRESS

#define CILEN_BSD_COMPRESS 3 /* length of config. option */


      

Marco BSD_NBITS(x)

#define BSD_NBITS(x)	((x) & 31) /* number of bits requested */
/* Macros for handling the 3rd byte of the BSD-Compress config option. */

Marco BSD_VERSION(x)

#define BSD_VERSION(x)	((x) >> 5) /* version of option format */


      

Marco BSD_CURRENT_VERSION

#define BSD_CURRENT_VERSION 1	/* current version number */


      

Marco BSD_MAKE_OPT(v, n)

#define BSD_MAKE_OPT(v, n) (((v) << 5) | (n))


      

Marco BSD_MIN_BITS

#define BSD_MIN_BITS	9 /* smallest code size supported */


      

Marco BSD_MAX_BITS

#define BSD_MAX_BITS	15 /* largest code size supported */


      

Marco CI_DEFLATE

#define CI_DEFLATE	26 /* config option for Deflate */


      

Marco CI_DEFLATE_DRAFT

#define CI_DEFLATE_DRAFT 24 /* value used in original draft RFC */


      

Marco CILEN_DEFLATE

#define CILEN_DEFLATE	4 /* length of its config option */


      

Marco DEFLATE_MIN_SIZE

#define DEFLATE_MIN_SIZE 9


      

Marco DEFLATE_MAX_SIZE

#define DEFLATE_MAX_SIZE 15


      

Marco DEFLATE_METHOD_VAL

#define DEFLATE_METHOD_VAL 8


      

Marco DEFLATE_SIZE(x)

#define DEFLATE_SIZE(x)	(((x) >> 4) + 8)


      

Marco DEFLATE_METHOD(x)

#define DEFLATE_METHOD(x) ((x) & 15)


      

Marco DEFLATE_MAKE_OPT(w)

#define DEFLATE_MAKE_OPT(w) ((((w) - 8) << 4) + DEFLATE_METHOD_VAL)


      

Marco DEFLATE_CHK_SEQUENCE

#define DEFLATE_CHK_SEQUENCE 0


      

Marco CI_MPPE

#define CI_MPPE               18     /* config option for MPPE */


      

Marco CILEN_MPPE

#define CILEN_MPPE             6     /* length of config option */


      

Marco CI_PREDICTOR_1

#define CI_PREDICTOR_1	1 /* config option for Predictor-1 */


      

Marco CILEN_PREDICTOR_1

#define CILEN_PREDICTOR_1 2 /* length of its config option */


      

Marco CI_PREDICTOR_2

#define CI_PREDICTOR_2	2 /* config option for Predictor-2 */


      

Marco CILEN_PREDICTOR_2

#define CILEN_PREDICTOR_2 2 /* length of its config option */

      

Functions

Func ccp_resetrequest

void ccp_resetrequest(ppp_pcb *pcb);

      

Vars

Consts

Types

Typedefs

Typedef ccp_options;

typedef struct ccp_options {
#if DEFLATE_SUPPORT
   unsigned int deflate         :1; /* do Deflate? */
   unsigned int deflate_correct :1; /* use correct code for deflate? */
   unsigned int deflate_draft   :1; /* use draft RFC code for deflate? */
#endif /* DEFLATE_SUPPORT */
#if BSDCOMPRESS_SUPPORT
   unsigned int bsd_compress    :1; /* do BSD Compress? */
#endif /* BSDCOMPRESS_SUPPORT */
#if PREDICTOR_SUPPORT
   unsigned int predictor_1     :1; /* do Predictor-1? */
   unsigned int predictor_2     :1; /* do Predictor-2? */
#endif /* PREDICTOR_SUPPORT */

#if MPPE_SUPPORT
   u8_t mppe;		/* MPPE bitfield */
#endif /* MPPE_SUPPORT */
#if BSDCOMPRESS_SUPPORT
   u_short bsd_bits;	/* # bits/code for BSD Compress */
#endif /* BSDCOMPRESS_SUPPORT */
#if DEFLATE_SUPPORT
   u_short deflate_size; /* lg(window size) for Deflate */
#endif /* DEFLATE_SUPPORT */
   u8_t method;	/* code for chosen compression method */
} ccp_options;