The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/modules/netgraph/vjc/ng_vjc.4

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 .\" Copyright (c) 1996-1999 Whistle Communications, Inc.
    2 .\" All rights reserved.
    3 .\" 
    4 .\" Subject to the following obligations and disclaimer of warranty, use and
    5 .\" redistribution of this software, in source or object code forms, with or
    6 .\" without modifications are expressly permitted by Whistle Communications;
    7 .\" provided, however, that:
    8 .\" 1. Any and all reproductions of the source or object code must include the
    9 .\"    copyright notice above and the following disclaimer of warranties; and
   10 .\" 2. No rights are granted, in any manner or form, to use Whistle
   11 .\"    Communications, Inc. trademarks, including the mark "WHISTLE
   12 .\"    COMMUNICATIONS" on advertising, endorsements, or otherwise except as
   13 .\"    such appears in the above copyright notice or in the software.
   14 .\" 
   15 .\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
   16 .\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
   17 .\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
   18 .\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
   19 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
   20 .\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
   21 .\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
   22 .\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
   23 .\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
   24 .\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
   25 .\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
   26 .\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
   27 .\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
   28 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   29 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   30 .\" THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
   31 .\" OF SUCH DAMAGE.
   32 .\" 
   33 .\" Author: Archie Cobbs <archie@freebsd.org>
   34 .\"
   35 .\" $FreeBSD$
   36 .\" $Whistle: ng_vjc.8,v 1.4 1999/01/25 23:46:28 archie Exp $
   37 .\"
   38 .Dd January 19, 1999
   39 .Dt NG_VJC 4
   40 .Os FreeBSD
   41 .Sh NAME
   42 .Nm ng_vjc
   43 .Nd Van Jacobsen compression netgraph node type
   44 .Sh SYNOPSIS
   45 .Fd #include <net/slcompress.h>
   46 .Fd #include <netgraph/ng_vjc.h>
   47 .Sh DESCRIPTION
   48 The
   49 .Nm vjc
   50 node type performs Van Jacobsen compression, which is used
   51 over PPP, SLIP, and other point-to-point IP connections to
   52 compress TCP packet headers.  The
   53 .Dv ip
   54 hook represents the uncompressed side of the node, while the
   55 .Dv vjcomp ,
   56 .Dv vjuncomp ,
   57 and
   58 .Dv vjip
   59 hooks represent the compressed side of the node.  Packets received on the
   60 .Dv ip
   61 will be compressed or passed through as appropriate.  Packets received
   62 on the other three hooks will be uncompressed as appropriate.
   63 This node also supports
   64 .Dq always pass through
   65 mode in either direction.
   66 .Pp
   67 Van Jacobsen compression only applies to TCP packets.
   68 Only
   69 .Dq normal
   70 (i.e., common case) TCP packets are actually compressed.
   71 These are output on the
   72 .Dv vjcomp
   73 hook.  Other TCP packets are run through the state machine but not
   74 compressed; these appear on the
   75 .Dv vjuncomp
   76 hook.
   77 Other non-TCP IP packets are forwarded unchanged to
   78 .Dv vjip .
   79 .Pp
   80 When connecting to a
   81 .Xr ng_ppp 4
   82 node, the
   83 .Dv ip ,
   84 .Dv vjuncomp ,
   85 .Dv vjcomp , 
   86 and
   87 .Dv vjip
   88 hooks should be connected to the
   89 .Xr ng_ppp 4
   90 node's
   91 .Dv vjc_ip ,
   92 .Dv vjc_vjcomp ,
   93 .Dv vjc_vjuncomp ,
   94 and
   95 .Dv vjc_ip
   96 hooks, respectively.
   97 .Sh HOOKS
   98 This node type supports the following hooks:
   99 .Pp
  100 .Bl -tag -width foobarbazi
  101 .It Dv ip
  102 Upstream (uncompressed) IP packets.
  103 .It Dv vjcomp
  104 Downstream compressed TCP packets.
  105 .It Dv vjuncomp
  106 Downstream uncompressed TCP packets.
  107 .It Dv vjip
  108 Downstream uncompressed IP packets.
  109 .Sh CONTROL MESSAGES
  110 This node type supports the generic control messages, plus the following:
  111 .Bl -tag -width foo
  112 .It Dv NGM_VJC_SET_CONFIG
  113 This command resets the compression state and configures it according
  114 to the supplied
  115 .Dv "struct ngm_vjc_config"
  116 argument.  This structure contains the following fields:
  117 .Bd -literal -offset 4n
  118 struct ngm_vjc_config {
  119   u_char   enableComp;    /* Enable compression */
  120   u_char   enableDecomp;  /* Enable decompression */
  121   u_char   maxChannel;    /* Number of outgoing channels - 1 */
  122   u_char   compressCID;   /* OK to compress outgoing CID's */
  123 };
  124 .Ed
  125 .Pp
  126 When
  127 .Dv enableComp
  128 is set to zero, all packets received on the
  129 .Dv ip
  130 hook are forwarded unchanged out the
  131 .Dv vjip
  132 hook.  Similarly, when
  133 .Dv enableDecomp
  134 is set to zero, all packets received on the
  135 .Dv vjip
  136 hook are forwarded unchanged out the
  137 .Dv ip
  138 hook, and packets are not accepted on the
  139 .Dv vjcomp
  140 and
  141 .Dv vjuncomp
  142 hooks.
  143 When a node is first created,
  144 both compression and decompression are disabled and the node is
  145 therefore operating in bi-directional
  146 .Dq pass through
  147 mode.
  148 .Pp
  149 When enabling compression,
  150 .Dv maxChannel
  151 should be set to the number of outgoing compression channels minus one,
  152 and is a value between 3 and 15, inclusive.  The
  153 .Dv compressCID
  154 field indicates whether it is OK to compress the CID header field for
  155 outgoing compressed TCP packets.  This value should be zero unless
  156 either (a) it is not possible for an outgoing frame to be lost, or
  157 (b) lost frames can be reliably detected and immediately
  158 reported to the peer's decompression engine (see
  159 .Dv NGM_VJC_RECV_ERROR
  160 below).
  161 .It Dv NGM_VJC_GET_STATE
  162 This command returns the node's current state described by the
  163 .Dv "struct slcompress"
  164 structure, which is defined in
  165 .Pa net/slcompress.h .
  166 .It Dv NGM_VJC_CLR_STATS
  167 Clears the node statistics counters.  Statistics are also cleared whenever the
  168 .Dv enableComp
  169 or
  170 .Dv enableDecomp
  171 fields are changed from zero to one by a
  172 .Dv NGM_VJC_SET_CONFIG
  173 control message.
  174 .It Dv NGM_VJC_RECV_ERROR
  175 When the peer has CID header field compression enabled,
  176 this message must be sent to the local
  177 .Nm vjc
  178 node immediately
  179 after detecting that a received frame has been lost, due to a bad
  180 checksum or for any other reason.  Failing to do this can result
  181 in corrupted TCP stream data.
  182 .Sh SHUTDOWN
  183 This node shuts down upon receipt of a
  184 .Dv NGM_SHUTDOWN
  185 control message, or when all hooks have been disconnected.
  186 .Sh BUGS
  187 Because the initialization routine in the kernel implementation of
  188 Van Jacobsen compression initializes both compression and decompression
  189 at once, this node does not allow compression and decompression to
  190 be enabled in separate operations.  In order to enable one when
  191 the other is already enabled, first both must be disabled, then
  192 both enabled.  This of course resets the node state.  This restriction
  193 may be lifted in a later version.
  194 .Pp
  195 When built as a loadable kernel module, this module includes the file
  196 .Pa net/slcompress.c .
  197 Although loading the module should fail if
  198 .Pa net/slcompress.c
  199 already exists in the kernel, currently it does not, and the duplicate
  200 copies of the file do not interfere.
  201 However, this may change in the future.
  202 .Sh SEE ALSO
  203 .Xr netgraph 4 ,
  204 .Xr ng_ppp 4 ,
  205 .Xr ng_iface 4 ,
  206 .Xr ngctl 8
  207 .Rs
  208 .%A V. Jacobsen
  209 .%T "Compressing TCP/IP Headers"
  210 .%O RFC 1144
  211 .Re
  212 .Rs
  213 .%A G. McGregor
  214 .%T "The PPP Internet Control Protocol (IPCP)"
  215 .%O RFC 1332
  216 .Re
  217 .Sh HISTORY
  218 The
  219 .Nm
  220 node type was implemented in
  221 .Fx 4.0 .
  222 .Sh AUTHORS
  223 .An Archie Cobbs Aq archie@freebsd.org

Cache object: f82903aa81d2862a2e426bbbcb6d9cc3


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.