PPP, MPPE, moved struct ppp_mppe_state from mppe.c to mppe.h

In order to be able to use struct ppp_mppe_state statically allocated,
export struct ppp_mppe_state.
This commit is contained in:
Sylvain Rochet
2015-04-18 00:15:52 +02:00
parent 3618432107
commit 6235e1ae57
2 changed files with 26 additions and 20 deletions

View File

@@ -50,26 +50,6 @@
#define SHA1_SIGNATURE_SIZE 20
#define SHA1_PAD_SIZE 40
/*
* State for an MPPE (de)compressor.
*/
struct ppp_mppe_state {
arc4_context arc4;
unsigned char master_key[MPPE_MAX_KEY_LEN];
unsigned char session_key[MPPE_MAX_KEY_LEN];
unsigned keylen; /* key length in bytes */
/* NB: 128-bit == 16, 40-bit == 8! */
/* If we want to support 56-bit, */
/* the unit has to change to bits */
unsigned char bits; /* MPPE control bits */
unsigned ccount; /* 12-bit coherency count (seqno) */
unsigned stateful; /* stateful mode flag */
int discard; /* stateful mode packet loss flag */
int sanity_errors; /* take down LCP if too many */
int unit;
int debug;
};
/* struct ppp_mppe_state.bits definitions */
#define MPPE_BIT_A 0x80 /* Encryption table were (re)inititalized */
#define MPPE_BIT_B 0x40 /* MPPC only (not implemented) */