ng_vjc.4 revision 52441
Copyright (c) 1996-1999 Whistle Communications, Inc.
All rights reserved.

Subject to the following obligations and disclaimer of warranty, use and
redistribution of this software, in source or object code forms, with or
without modifications are expressly permitted by Whistle Communications;
provided, however, that:
1. Any and all reproductions of the source or object code must include the
copyright notice above and the following disclaimer of warranties; and
2. No rights are granted, in any manner or form, to use Whistle
Communications, Inc. trademarks, including the mark "WHISTLE
COMMUNICATIONS" on advertising, endorsements, or otherwise except as
such appears in the above copyright notice or in the software.

THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND
TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO
REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE,
INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY
REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS
SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES
RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING
WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.

Author: Archie Cobbs <archie@whistle.com>

$FreeBSD: head/share/man/man4/ng_vjc.4 52441 1999-10-23 04:28:11Z julian $
$Whistle: ng_vjc.8,v 1.4 1999/01/25 23:46:28 archie Exp $

.Dd January 19, 1999 .Dt NG_VJC 8 .Os FreeBSD 3 .Sh NAME .Nm ng_vjc .Nd Van Jacobsen compression netgraph node type .Sh SYNOPSIS .Fd #include <net/slcompress.h> .Fd #include <netgraph/ng_vjc.h> .Sh DESCRIPTION The .Nm vjc node type performs Van Jacobsen compresion, which is used over PPP, SLIP, and other point-to-point IP connections to compress TCP packet headers. The .Dv ip hook represents the uncompressed side of the node, while the .Dv vjcomp , .Dv vjuncomp , and .Dv vjip nodes represent the compressed side of the node. Packets received on the .Dv ip will be compressed or passed through as appropriate. Packets received on the other three hooks will be uncompressed as appropriate.

p Van Jacobsen compression only applies to TCP packets. Only ``normal'' (i.e., common case) TCP packets are actually compressed. These are output on the .Dv vjcomp hook. Other TCP packets are run through the state machine but not compressed; these appear on the .Dv vjuncomp hook. Other non-TCP IP packets are forwarded unchanged to .Dv vjip .

p When connecting to a .Xr ng_ppp 8 node, the .Dv vjuncomp , .Dv vjcomp , and .Dv vjip nodes should be connected to the .Xr ng_ppp 8 node's .Dv vjcomp , .Dv vjuncomp , and .Dv ip nodes, respectively. .Sh HOOKS This node type supports the following hooks:

p l -tag -width foobarbazi t Dv ip Upstream (uncompressed) IP packets. t Dv vjcomp Downstream compressed TCP packets. t Dv vjuncomp Downstream uncompressed TCP packets. t Dv vjip Downstream uncompressed IP packets. .Sh CONTROL MESSAGES This node type supports the generic control messages, plus the following: l -tag -width foo t Dv NGM_VJC_CONFIG This command resets the compression state and configures it according to the supplied .Dv "struct ngm_vjc_config" argument. This structure contains the following fields: d -literal -offset 4n struct ngm_vjc_config { u_char enabled; /* Enable compression/decompression */ u_char numChannels; /* Number of outgoing channels */ u_char compressCID; /* OK to compress outgoing CID's */ }; .Ed

p When .Dv enabled is set to zero, the node operates in ``pass through'' mode, only accepting packets on the .Dv ip and .Dv vjip hooks. .Dv numChannels should be set to the number of compression channels, and is a value between 3 and 16, inclusive.

p The .Dv compressCID field indicates whether it is OK to compress the CID field for outgoing compressed TCP packets. This value should be zero unless either (a) it not possible for an incoming frame to be lost, or (b) lost frames can be reliably detected and a .Dv NGM_VJC_RECV_ERROR mesages is immediately sent whenever this occurs. t Dv NGM_VJC_GET_STATE This command returns the node's current state described by the .Dv "struct slcompress" structure, which is defined in .Dv "net/slcompress.h" . t Dv NGM_VJC_CLR_STATS Clears the node statistics counters. Statistics are also cleared whenever the .Dv enabled field is changed from zero to one by a .Dv NGM_VJC_CONFIG control message. t Dv NGM_VJC_RECV_ERROR When the .Dv compressCID is set to one, this message must be sent to the node immediately after detecting that a recieved frame has been lost, due to a bad checksum or for any other reason. Failing to do this can result in corrupted TCP stream data. .Sh SHUTDOWN This node shuts down upon receipt of a .Dv NGM_SHUTDOWN control message, or when all hooks have been disconnected. .Sh BUGS When used as a loadable kernel module, this node type requires that the file .Dv "net/slcompress.c" was compiled into the kernel. Currently the only way to insure this is to include the .Dv slip , .Dv ppp , or .Dv i4bipr pseudo-devices in your kernel compilation. In the future there should be a kernel option that causes inclusion of this file without requiring one of these drivers. .Sh SEE ALSO .Xr netgraph 4 , .Xr ng_ppp 8 , .Xr ng_iface 8 , .Xr ngctl 8 . .Rs .%A V. Jacobsen .%T "Compressing TCP/IP Headers" .%O RFC 1144 .Re .Rs .%A G. McGregor .%T "The PPP Internet Control Protocol (IPCP)" .%O RFC 1332 .Re .Sh AUTHOR Archie Cobbs <archie@whistle.com>