Main index | Section 4 | Options |
#include <sys/types.h>
#include <netgraph/ng_pred1.h>
The node has two hooks, comp for compression and decomp for decompression. Only one of them can be connected at the same time, specifying node's operation mode. Typically that hooks would be connected to the ng_ppp(4) node type hook of the same name.
comp | Connection to ng_ppp(4) compress hook. Incoming frames are compressed and sent back out the same hook. |
decomp | Connection to ng_ppp(4) decompress hook. Incoming frames are decompressed and sent back out the same hook. |
Only one hook can be connected at the same time, specifying node's operation mode.
NGM_PRED1_CONFIG ( config) | |
This command resets and configures the node for a session
(i.e., for compression or decompression).
This command takes a
struct ng_pred1_config
as an argument:
struct ng_pred1_config { u_char enable; /* node enabled */ };The enable field enables traffic flow through the node. | |
NGM_PRED1_RESETREQ ( resetreq) | |
This message contains no arguments, and is bi-directional.
If an error is detected during decompression, this message is sent by the
node to the originator of the
NGM_PRED1_CONFIG
message that initiated the session.
The receiver should respond by sending a PPP CCP Reset-Request to the peer.
This message may also be received by this node type when a CCP Reset-Request or Reset-Ack is received by the local PPP entity. The node will respond by flushing its compression state so the sides can resynchronize. | |
NGM_PRED1_GET_STATS ( getstats) | |
This control message obtains statistics for a given hook.
The statistics are returned in
struct ng_pred1_stats:
struct ng_pred1_stats { uint64_t FramesPlain; uint64_t FramesComp; uint64_t FramesUncomp; uint64_t InOctets; uint64_t OutOctets; uint64_t Errors; }; | |
NGM_PRED1_CLR_STATS ( clrstats) | |
This control message clears statistics for a given hook. | |
NGM_PRED1_GETCLR_STATS ( getclrstats) | |
This control message obtains and clears statistics for a given hook. | |
RFC 1978, PPP Predictor Compression Protocol,
,RFC 1661, The Point-to-Point Protocol (PPP),
,NG_PRED1 (4) | December 24, 2006 |
Main index | Section 4 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | Never write it in C if you can do it in `awk'; Never do it in `awk' if `sed' can handle it; Never use `sed' when `tr' can do the job; Never invoke `tr' when `cat' is sufficient; Avoid using `cat' whenever possible. |
” |
— Taylor's Laws of Programming |