lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame^] | 1 | #ifndef __MPPE_INCLUDE__ |
| 2 | |
| 3 | typedef struct mppe_state { |
| 4 | int us_unit; /* Interface unit number */ |
| 5 | u_char us_id; /* Current id */ |
| 6 | u_char us_allowed; |
| 7 | int us_type; |
| 8 | char *us_number; /* Telefone Number */ |
| 9 | } mppe_state; |
| 10 | |
| 11 | |
| 12 | extern struct protent mppe_protent; |
| 13 | |
| 14 | #define MPPE_CONFOPTION 18 /* p[0] */ |
| 15 | #define MPPE_STATELESS 0x01 /* p[2] */ |
| 16 | #define MPPE_40BIT 0x20 /* p[5] */ |
| 17 | #define MPPE_128BIT 0x40 /* p[5] */ |
| 18 | |
| 19 | #define PPP_MPPE 0x00FD |
| 20 | |
| 21 | #define MPPE_BIT_A 0x80 |
| 22 | #define MPPE_BIT_B 0x40 |
| 23 | #define MPPE_BIT_C 0x20 |
| 24 | #define MPPE_BIT_D 0x10 |
| 25 | #define MPPE_BIT_FLUSHED MPPE_BIT_A |
| 26 | #define MPPE_BIT_ENCRYPTED MPPE_BIT_D |
| 27 | #define MPPE_CCOUNT 0x0FFF |
| 28 | |
| 29 | #define MPPE_40_SALT0 0xD1 |
| 30 | #define MPPE_40_SALT1 0x26 |
| 31 | #define MPPE_40_SALT2 0x9E |
| 32 | |
| 33 | #define MPPE_MINLEN 4 |
| 34 | |
| 35 | #define MPPE_REQ 1 |
| 36 | #define MPPE_RESP 2 |
| 37 | #define MPPE_ACK 3 |
| 38 | |
| 39 | extern char mppe_master_send_key_40[8]; |
| 40 | extern char mppe_master_send_key_128[16]; |
| 41 | extern char mppe_master_recv_key_40[8]; |
| 42 | extern char mppe_master_recv_key_128[16]; |
| 43 | extern unsigned int mppe_allowed; |
| 44 | |
| 45 | void mppe_gen_master_key __P((char *, int, unsigned char *)); |
| 46 | void mppe_gen_master_key_v2 __P((char *, int, unsigned char *, int)); |
| 47 | |
| 48 | int setmppe_40(char **); |
| 49 | int setnomppe_40(char **); |
| 50 | int setmppe_128(char **); |
| 51 | int setnomppe_128(char **); |
| 52 | int setmppe_stateless(char **); |
| 53 | int setnomppe_stateless(char **); |
| 54 | |
| 55 | #define __MPPE_INCLUDE__ |
| 56 | #endif /* __MPPE_INCLUDE__ */ |