*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> ng_async (4)              
Title
Content
Arch
Section
 

NG_ASYNC(4)

Contents


NAME    [Toc]    [Back]

     ng_async -- asynchronous framing netgraph node type

SYNOPSIS    [Toc]    [Back]

     #include <netgraph/ng_async.h>

DESCRIPTION    [Toc]    [Back]

     The async node type performs conversion between synchronous frames and
     asynchronous frames, as defined for the PPP protocol in RFC 1662.	Asynchronous
 framing uses flag bytes and octet-stuffing to simulate a frame
     oriented connection over an octet-oriented asynchronous serial line.

     The node transmits and receives asynchronous data on the async hook.
     Mbuf boundaries of incoming data are ignored.  Once a complete packet has
     been received, it is decoded and stripped of all framing bytes, and
     transmitted out the sync hook as a single frame.

     Synchronous frames are transmitted and received on the sync hook.	Packets
 received on this hook are encoded as asynchronous frames and sent out
     on async.	Received packets should start with the address and control
     fields, or the PPP protocol field if address and control field compression
 is employed, and contain no checksum field.  If the first four bytes
     are 0xff 0x03 0xc0 0x21 (an LCP protocol frame) then complete control
     character escaping is enabled for that frame (in PPP, LCP packets are
     always sent with no address and control field compression and all control
     characters escaped).

     This node supports ``flag sharing'' for packets transmitted on async.
     This is an optimization where the trailing flag byte of one frame is
     shared with the opening flag byte of the next.  Flag sharing between
     frames is disabled after one second of transmit idle time.

HOOKS    [Toc]    [Back]

     This node type supports the following hooks:

     async   Asynchronous connection.  Typically this hook would be connected
	     to a ng_tty(4) node, which handles transmission of serial data
	     over a tty device.

     sync    Synchronous connection.  This hook sends and receives synchronous
	     frames.  For PPP, these frames should contain address, control,
	     and protocol fields, but no checksum field.  Typically this hook
	     would be connected to an individual link hook of a ng_ppp(4) type
	     node.

CONTROL MESSAGES    [Toc]    [Back]

     This node type supports the generic control messages, plus the following:

     NGM_ASYNC_CMD_GET_STATS
	  This command returns a struct ng_async_stat containing node statistics
 for packet, octet, and error counts.

     NGM_ASYNC_CMD_CLR_STATS
	  Clears the node statistics.

     NGM_ASYNC_CMD_SET_CONFIG
	  Sets the node configuration, which is described by a struct
	  ng_async_cfg:

	      struct ng_async_cfg {
		u_char	  enabled;  /* Turn encoding on/off */
		u_int16_t amru;     /* Max receive async frame len */
		u_int16_t smru;     /* Max receive sync frame len */
		u_int32_t accm;     /* ACCM encoding */
	      };

	  The enabled field enables or disables all encoding/decoding functions
 (default disabled).  When disabled, the node operates in simple
 ``pass through'' mode.  The amru and smru fields are the asynchronous
 and synchronous MRU (maximum receive unit) values, respectively.
  These both default to 1600; note that the async MRU applies
	  to the incoming frame length after asynchronous decoding.  The accm
	  field is the asynchronous character control map, which controls the
	  escaping of characters 0x00 thorough 0x1f (default 0xffffffff).

     NGM_ASYNC_CMD_GET_CONFIG
	  This command returns the current configuration structure.

SHUTDOWN    [Toc]    [Back]

     This node shuts down upon receipt of a NGM_SHUTDOWN control message, or
     when all hooks have been disconnected.

SEE ALSO    [Toc]    [Back]

      
      
     netgraph(4), ng_ppp(4), ng_tty(4), ngctl(8)

     W. Simpson, PPP in HDLC-link Framing, RFC 1662.

     W. Simpson, The Point-to-Point Protocol (PPP), RFC 1661.

HISTORY    [Toc]    [Back]

     The ng_async node type was implemented in FreeBSD 4.0.

AUTHORS    [Toc]    [Back]

     Archie Cobbs <[email protected]>


FreeBSD 5.2.1		       January 19, 1999 		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
ng_atm FreeBSD netgraph ATM node type
ng_UI FreeBSD UI netgraph node type
ng_uni FreeBSD netgraph UNI node type
ng_ip_input FreeBSD netgraph IP input node type
ng_rfc1490 FreeBSD RFC 1490 netgraph node type
ng_tee FreeBSD netgraph ``tee'' node type
ng_sscop FreeBSD netgraph SSCOP node type
ng_sscfu FreeBSD netgraph SSCF at the UNI node type
ng_socket FreeBSD netgraph socket node type
ng_iface FreeBSD interface netgraph node type
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service