diff options
Diffstat (limited to 'include/linux/ppp-comp.h')
-rw-r--r-- | include/linux/ppp-comp.h | 86 |
1 files changed, 2 insertions, 84 deletions
diff --git a/include/linux/ppp-comp.h b/include/linux/ppp-comp.h index b7dc06f7f1d1..4ea1d377e1ad 100644 --- a/include/linux/ppp-comp.h +++ b/include/linux/ppp-comp.h | |||
@@ -10,7 +10,8 @@ | |||
10 | #ifndef _NET_PPP_COMP_H | 10 | #ifndef _NET_PPP_COMP_H |
11 | #define _NET_PPP_COMP_H | 11 | #define _NET_PPP_COMP_H |
12 | 12 | ||
13 | #ifdef __KERNEL__ | 13 | #include <uapi/linux/ppp-comp.h> |
14 | |||
14 | 15 | ||
15 | struct module; | 16 | struct module; |
16 | 17 | ||
@@ -100,89 +101,6 @@ struct compressor { | |||
100 | #define DECOMP_ERROR -1 /* error detected before decomp. */ | 101 | #define DECOMP_ERROR -1 /* error detected before decomp. */ |
101 | #define DECOMP_FATALERROR -2 /* error detected after decomp. */ | 102 | #define DECOMP_FATALERROR -2 /* error detected after decomp. */ |
102 | 103 | ||
103 | #endif /* __KERNEL__ */ | ||
104 | |||
105 | /* | ||
106 | * CCP codes. | ||
107 | */ | ||
108 | |||
109 | #define CCP_CONFREQ 1 | ||
110 | #define CCP_CONFACK 2 | ||
111 | #define CCP_TERMREQ 5 | ||
112 | #define CCP_TERMACK 6 | ||
113 | #define CCP_RESETREQ 14 | ||
114 | #define CCP_RESETACK 15 | ||
115 | |||
116 | /* | ||
117 | * Max # bytes for a CCP option | ||
118 | */ | ||
119 | |||
120 | #define CCP_MAX_OPTION_LENGTH 32 | ||
121 | |||
122 | /* | ||
123 | * Parts of a CCP packet. | ||
124 | */ | ||
125 | |||
126 | #define CCP_CODE(dp) ((dp)[0]) | ||
127 | #define CCP_ID(dp) ((dp)[1]) | ||
128 | #define CCP_LENGTH(dp) (((dp)[2] << 8) + (dp)[3]) | ||
129 | #define CCP_HDRLEN 4 | ||
130 | |||
131 | #define CCP_OPT_CODE(dp) ((dp)[0]) | ||
132 | #define CCP_OPT_LENGTH(dp) ((dp)[1]) | ||
133 | #define CCP_OPT_MINLEN 2 | ||
134 | |||
135 | /* | ||
136 | * Definitions for BSD-Compress. | ||
137 | */ | ||
138 | |||
139 | #define CI_BSD_COMPRESS 21 /* config. option for BSD-Compress */ | ||
140 | #define CILEN_BSD_COMPRESS 3 /* length of config. option */ | ||
141 | |||
142 | /* Macros for handling the 3rd byte of the BSD-Compress config option. */ | ||
143 | #define BSD_NBITS(x) ((x) & 0x1F) /* number of bits requested */ | ||
144 | #define BSD_VERSION(x) ((x) >> 5) /* version of option format */ | ||
145 | #define BSD_CURRENT_VERSION 1 /* current version number */ | ||
146 | #define BSD_MAKE_OPT(v, n) (((v) << 5) | (n)) | ||
147 | |||
148 | #define BSD_MIN_BITS 9 /* smallest code size supported */ | ||
149 | #define BSD_MAX_BITS 15 /* largest code size supported */ | ||
150 | |||
151 | /* | ||
152 | * Definitions for Deflate. | ||
153 | */ | ||
154 | |||
155 | #define CI_DEFLATE 26 /* config option for Deflate */ | ||
156 | #define CI_DEFLATE_DRAFT 24 /* value used in original draft RFC */ | ||
157 | #define CILEN_DEFLATE 4 /* length of its config option */ | ||
158 | |||
159 | #define DEFLATE_MIN_SIZE 9 | ||
160 | #define DEFLATE_MAX_SIZE 15 | ||
161 | #define DEFLATE_METHOD_VAL 8 | ||
162 | #define DEFLATE_SIZE(x) (((x) >> 4) + 8) | ||
163 | #define DEFLATE_METHOD(x) ((x) & 0x0F) | ||
164 | #define DEFLATE_MAKE_OPT(w) ((((w) - 8) << 4) + DEFLATE_METHOD_VAL) | ||
165 | #define DEFLATE_CHK_SEQUENCE 0 | ||
166 | |||
167 | /* | ||
168 | * Definitions for MPPE. | ||
169 | */ | ||
170 | |||
171 | #define CI_MPPE 18 /* config option for MPPE */ | ||
172 | #define CILEN_MPPE 6 /* length of config option */ | ||
173 | |||
174 | /* | ||
175 | * Definitions for other, as yet unsupported, compression methods. | ||
176 | */ | ||
177 | |||
178 | #define CI_PREDICTOR_1 1 /* config option for Predictor-1 */ | ||
179 | #define CILEN_PREDICTOR_1 2 /* length of its config option */ | ||
180 | #define CI_PREDICTOR_2 2 /* config option for Predictor-2 */ | ||
181 | #define CILEN_PREDICTOR_2 2 /* length of its config option */ | ||
182 | |||
183 | #ifdef __KERNEL__ | ||
184 | extern int ppp_register_compressor(struct compressor *); | 104 | extern int ppp_register_compressor(struct compressor *); |
185 | extern void ppp_unregister_compressor(struct compressor *); | 105 | extern void ppp_unregister_compressor(struct compressor *); |
186 | #endif /* __KERNEL__ */ | ||
187 | |||
188 | #endif /* _NET_PPP_COMP_H */ | 106 | #endif /* _NET_PPP_COMP_H */ |