This command resets and configures the node for a session in the outgoing traffic direction (i.e., for compression and/or encryption). This command takes a "struct ng_mppc_config" as an argument:
/* Length of MPPE key */
#define MPPE_KEY_LEN 16
/* MPPC/MPPE PPP negotiation bits */
#define MPPC_BIT0x00000001 /* mppc compression bits */
#define MPPE_40 0x00000020 /* use 40 bit key */
#define MPPE_56 0x00000080 /* use 56 bit key */
#define MPPE_1280x00000040 /* use 128 bit key */
#define MPPE_BITS 0x000000e0 /* mppe encryption bits */
#define MPPE_STATELESS 0x01000000 /* use stateless mode */
#define MPPC_VALID_BITS 0x010000e1 /* possibly valid bits */
/* Configuration for a session */
struct ng_mppc_config {
u_char enable; /* enable */
u_int32_t bits; /* config bits */
u_char startkey[MPPE_KEY_LEN]; /* start key */
};
The enabled field enables traffic flow through the node. The bits field contains the bits as negotiated by the Compression Control Protocol (CCP) in PPP. The startkey is only necessary if MPPE was negotiated, and must be equal to the session start key as defined for MPPE. This key is based on the MS-CHAP credentials used at link authentication time.
|