NG_PRED1(4) | Device Drivers Manual | NG_PRED1(4) |
ng_pred1
—
Predictor-1 PPP compression (RFC 1978) netgraph node
type
#include
<sys/types.h>
#include
<netgraph/ng_pred1.h>
The pred1
node type implements the
Predictor-1 sub-protocols of the Compression Control Protocol (CCP).
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.
This node type supports the following hooks:
Only one hook can be connected at the same time, specifying node's operation mode.
This node type supports the generic control messages, plus the following:
NGM_PRED1_CONFIG
(config
)struct ng_pred1_config { u_char enable; /* node enabled */ };
NGM_PRED1_RESETREQ
(resetreq
)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
)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
)NGM_PRED1_GETCLR_STATS
(getclrstats
)This node shuts down upon receipt of a
NGM_SHUTDOWN
control message, or when hook have been
disconnected.
netgraph(4), ng_ppp(4), ngctl(8)
D. Rand, PPP Predictor Compression Protocol, RFC 1978.
W. Simpson, The Point-to-Point Protocol (PPP), RFC 1661.
Alexander Motin <mav@alkar.net>
Due to nature of netgraph PPP implementation there are possible race conditions between data packet and ResetAck CCP packet in case of packet loss. As result, packet loss can produce bigger performance degradation than supposed by protocol.
December 24, 2006 | Debian |