6b13f685e
김민수
BSP 최초 추가
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
#ifndef _NET_PPP_COMP_H
#define _NET_PPP_COMP_H
#include <uapi/linux/ppp-comp.h>
struct module;
#ifndef DO_BSD_COMPRESS
#define DO_BSD_COMPRESS 1 /* by default, include BSD-Compress */
#endif
#ifndef DO_DEFLATE
#define DO_DEFLATE 1 /* by default, include Deflate */
#endif
#define DO_PREDICTOR_1 0
#define DO_PREDICTOR_2 0
struct compressor {
int compress_proto;
void *(*comp_alloc) (unsigned char *options, int opt_len);
void (*comp_free) (void *state);
int (*comp_init) (void *state, unsigned char *options,
int opt_len, int unit, int opthdr, int debug);
void (*comp_reset) (void *state);
int (*compress) (void *state, unsigned char *rptr,
unsigned char *obuf, int isize, int osize);
void (*comp_stat) (void *state, struct compstat *stats);
void *(*decomp_alloc) (unsigned char *options, int opt_len);
void (*decomp_free) (void *state);
int (*decomp_init) (void *state, unsigned char *options,
int opt_len, int unit, int opthdr, int mru,
int debug);
void (*decomp_reset) (void *state);
int (*decompress) (void *state, unsigned char *ibuf, int isize,
unsigned char *obuf, int osize);
void (*incomp) (void *state, unsigned char *ibuf, int icnt);
void (*decomp_stat) (void *state, struct compstat *stats);
struct module *owner;
unsigned int comp_extra;
};
#define DECOMP_ERROR -1 /* error detected before decomp. */
#define DECOMP_FATALERROR -2 /* error detected after decomp. */
extern int ppp_register_compressor(struct compressor *);
extern void ppp_unregister_compressor(struct compressor *);
#endif /* _NET_PPP_COMP_H */
|