blob: e1117937a798af89dcf4a4a604cb52b2d2ec5224 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#ifndef __MPPE_INCLUDE__
2
3typedef 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
12extern 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
39extern char mppe_master_send_key_40[8];
40extern char mppe_master_send_key_128[16];
41extern char mppe_master_recv_key_40[8];
42extern char mppe_master_recv_key_128[16];
43extern unsigned int mppe_allowed;
44
45void mppe_gen_master_key __P((char *, int, unsigned char *));
46void mppe_gen_master_key_v2 __P((char *, int, unsigned char *, int));
47
48int setmppe_40(char **);
49int setnomppe_40(char **);
50int setmppe_128(char **);
51int setnomppe_128(char **);
52int setmppe_stateless(char **);
53int setnomppe_stateless(char **);
54
55#define __MPPE_INCLUDE__
56#endif /* __MPPE_INCLUDE__ */