summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_ppp.h
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2006-12-28 13:21:54 +0000
committerglebius <glebius@FreeBSD.org>2006-12-28 13:21:54 +0000
commite0c41002efad9fd572a4a983d84fa45636a84f55 (patch)
tree19c5d560c3540d74c7800dc65218533847f54893 /sys/netgraph/ng_ppp.h
parent637e022f2eacf7cd04999d746d5ece4a9de99095 (diff)
downloadFreeBSD-src-e0c41002efad9fd572a4a983d84fa45636a84f55.zip
FreeBSD-src-e0c41002efad9fd572a4a983d84fa45636a84f55.tar.gz
Before this commit, if the compression is enabled the, ng_ppp(4)
node would send every outgoing frame to the "compress" hook. Packets received on the "compress" hook were expected to be compressed and PROT_COMPD tag was put on them unconditionally. After this commit an alternative compression mode can be set. In this mode the node doesn't put the PROT_COMPD, the compressor should put it itself. This is important for such kind of compressors, that can submit uncompressed frames. Before this commit, if the decompression is enabled, the ng_ppp(4) node would send and incoming frame to the "decompress" hook only if it has the PROT_COMPD proto tag on it. After this commit an alternative decompression mode can be set. In this mode the node sends all the incoming packets to the decompression hook. This is important for such kind of compressors that need uncompressed packets too, to keep their library in sync. These new features will be used in new version of mpd4, and in new compressor nodes. Submitted by: Alexander Motin <mav alkar.net>
Diffstat (limited to 'sys/netgraph/ng_ppp.h')
-rw-r--r--sys/netgraph/ng_ppp.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/netgraph/ng_ppp.h b/sys/netgraph/ng_ppp.h
index eb43cfb..c1a3c68 100644
--- a/sys/netgraph/ng_ppp.h
+++ b/sys/netgraph/ng_ppp.h
@@ -75,6 +75,20 @@
#define NG_PPP_HOOK_LINK_PREFIX "link" /* append decimal link number */
+/* Compress hook operation modes */
+enum {
+ NG_PPP_COMPRESS_NONE = 0, /* compression disabled */
+ NG_PPP_COMPRESS_SIMPLE, /* original operation mode */
+ NG_PPP_COMPRESS_FULL, /* compressor returns proto */
+};
+
+/* Decompress hook operation modes */
+enum {
+ NG_PPP_DECOMPRESS_NONE = 0, /* decompression disabled */
+ NG_PPP_DECOMPRESS_SIMPLE, /* original operation mode */
+ NG_PPP_DECOMPRESS_FULL, /* forward any packet to decompressor */
+};
+
/* Netgraph commands */
enum {
NGM_PPP_SET_CONFIG = 1, /* takes struct ng_ppp_node_conf */
OpenPOWER on IntegriCloud