aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ppp-comp.h
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2012-10-19 15:19:19 -0400
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2012-10-19 15:19:19 -0400
commite05dacd71db0a5da7c1a44bcaab2a8a240b9c233 (patch)
tree31382cf1c7d62c03126448affb2fc86e8c4aaa8b /include/linux/ppp-comp.h
parent3ab0b83bf6a1e834f4b884150d8012990c75d25d (diff)
parentddffeb8c4d0331609ef2581d84de4d763607bd37 (diff)
Merge commit 'v3.7-rc1' into stable/for-linus-3.7
* commit 'v3.7-rc1': (10892 commits) Linux 3.7-rc1 x86, boot: Explicitly include autoconf.h for hostprogs perf: Fix UAPI fallout ARM: config: make sure that platforms are ordered by option string ARM: config: sort select statements alphanumerically UAPI: (Scripted) Disintegrate include/linux/byteorder UAPI: (Scripted) Disintegrate include/linux UAPI: Unexport linux/blk_types.h UAPI: Unexport part of linux/ppp-comp.h perf: Handle new rbtree implementation procfs: don't need a PATH_MAX allocation to hold a string representation of an int vfs: embed struct filename inside of names_cache allocation if possible audit: make audit_inode take struct filename vfs: make path_openat take a struct filename pointer vfs: turn do_path_lookup into wrapper around struct filename variant audit: allow audit code to satisfy getname requests from its names_list vfs: define struct filename and have getname() return it btrfs: Fix compilation with user namespace support enabled userns: Fix posix_acl_file_xattr_userns gid conversion userns: Properly print bluetooth socket uids ...
Diffstat (limited to 'include/linux/ppp-comp.h')
-rw-r--r--include/linux/ppp-comp.h84
1 files changed, 3 insertions, 81 deletions
diff --git a/include/linux/ppp-comp.h b/include/linux/ppp-comp.h
index e53ff65935dd..4ea1d377e1ad 100644
--- a/include/linux/ppp-comp.h
+++ b/include/linux/ppp-comp.h
@@ -10,6 +10,9 @@
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#include <uapi/linux/ppp-comp.h>
14
15
13struct module; 16struct module;
14 17
15/* 18/*
@@ -98,87 +101,6 @@ struct compressor {
98#define DECOMP_ERROR -1 /* error detected before decomp. */ 101#define DECOMP_ERROR -1 /* error detected before decomp. */
99#define DECOMP_FATALERROR -2 /* error detected after decomp. */ 102#define DECOMP_FATALERROR -2 /* error detected after decomp. */
100 103
101/*
102 * CCP codes.
103 */
104
105#define CCP_CONFREQ 1
106#define CCP_CONFACK 2
107#define CCP_TERMREQ 5
108#define CCP_TERMACK 6
109#define CCP_RESETREQ 14
110#define CCP_RESETACK 15
111
112/*
113 * Max # bytes for a CCP option
114 */
115
116#define CCP_MAX_OPTION_LENGTH 32
117
118/*
119 * Parts of a CCP packet.
120 */
121
122#define CCP_CODE(dp) ((dp)[0])
123#define CCP_ID(dp) ((dp)[1])
124#define CCP_LENGTH(dp) (((dp)[2] << 8) + (dp)[3])
125#define CCP_HDRLEN 4
126
127#define CCP_OPT_CODE(dp) ((dp)[0])
128#define CCP_OPT_LENGTH(dp) ((dp)[1])
129#define CCP_OPT_MINLEN 2
130
131/*
132 * Definitions for BSD-Compress.
133 */
134
135#define CI_BSD_COMPRESS 21 /* config. option for BSD-Compress */
136#define CILEN_BSD_COMPRESS 3 /* length of config. option */
137
138/* Macros for handling the 3rd byte of the BSD-Compress config option. */
139#define BSD_NBITS(x) ((x) & 0x1F) /* number of bits requested */
140#define BSD_VERSION(x) ((x) >> 5) /* version of option format */
141#define BSD_CURRENT_VERSION 1 /* current version number */
142#define BSD_MAKE_OPT(v, n) (((v) << 5) | (n))
143
144#define BSD_MIN_BITS 9 /* smallest code size supported */
145#define BSD_MAX_BITS 15 /* largest code size supported */
146
147/*
148 * Definitions for Deflate.
149 */
150
151#define CI_DEFLATE 26 /* config option for Deflate */
152#define CI_DEFLATE_DRAFT 24 /* value used in original draft RFC */
153#define CILEN_DEFLATE 4 /* length of its config option */
154
155#define DEFLATE_MIN_SIZE 9
156#define DEFLATE_MAX_SIZE 15
157#define DEFLATE_METHOD_VAL 8
158#define DEFLATE_SIZE(x) (((x) >> 4) + 8)
159#define DEFLATE_METHOD(x) ((x) & 0x0F)
160#define DEFLATE_MAKE_OPT(w) ((((w) - 8) << 4) + DEFLATE_METHOD_VAL)
161#define DEFLATE_CHK_SEQUENCE 0
162
163/*
164 * Definitions for MPPE.
165 */
166
167#define CI_MPPE 18 /* config option for MPPE */
168#define CILEN_MPPE 6 /* length of config option */
169
170/*
171 * Definitions for other, as yet unsupported, compression methods.
172 */
173
174#define CI_PREDICTOR_1 1 /* config option for Predictor-1 */
175#define CILEN_PREDICTOR_1 2 /* length of its config option */
176#define CI_PREDICTOR_2 2 /* config option for Predictor-2 */
177#define CILEN_PREDICTOR_2 2 /* length of its config option */
178
179#ifdef __KERNEL__
180extern int ppp_register_compressor(struct compressor *); 104extern int ppp_register_compressor(struct compressor *);
181extern void ppp_unregister_compressor(struct compressor *); 105extern void ppp_unregister_compressor(struct compressor *);
182#endif /* __KERNEL__ */
183
184#endif /* _NET_PPP_COMP_H */ 106#endif /* _NET_PPP_COMP_H */