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/async/ng_async.4

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
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: stable/3/sys/modules/netgraph/async/ng_async.4 67528 2000-10-24 22:35:27Z julian $
   36 .\" $Whistle: ng_async.8,v 1.6 1999/01/25 23:46:25 archie Exp $
   37 .\"
   38 .Dd January 19, 1999
   39 .Dt NG_ASYNC 4
   40 .Os FreeBSD
   41 .Sh NAME
   42 .Nm ng_async
   43 .Nd asynchronous framing netgraph node type
   44 .Sh SYNOPSIS
   45 .Fd #include <netgraph/ng_async.h>
   46 .Sh DESCRIPTION
   47 The
   48 .Nm async
   49 node type performs conversion between synchronous frames and
   50 asynchronous frames, as defined for the PPP protocol in RFC 1662.
   51 Asynchronous framing uses flag bytes and octet-stuffing
   52 to simulate a frame oriented connection over an octet-oriented
   53 asynchronous serial line.
   54 .Pp
   55 The node transmits and receives asynchronous data on the
   56 .Dv async
   57 hook.  Mbuf boundaries of incoming data are ignored.
   58 Once a complete packet has been received, it is decoded and
   59 stripped of all framing bytes, and transmitted out the
   60 .Dv sync
   61 hook as a single frame.
   62 .Pp
   63 Synchronous frames are transmitted and received on the
   64 .Dv sync
   65 hook.
   66 Packets received on this hook are encoded as asynchronous frames
   67 and sent out on
   68 .Dv async .
   69 Received packets should start with the address and control fields,
   70 or the PPP protocol field if address and control field compression
   71 is employed, and contain no checksum field.  If the first four bytes are
   72 .Dv "0xff 0x03 0xc0 0x21"
   73 (an LCP protocol frame) then complete control character escaping
   74 is enabled for that frame (in PPP, LCP packets are always sent with
   75 no address and control field compression and all control characters
   76 escaped).
   77 .Pp
   78 This node supports
   79 .Dq flag sharing
   80 for packets transmitted on
   81 .Dv async .
   82 This is an optimization where the trailing flag byte
   83 of one frame is shared with the opening flag byte of the next.
   84 Flag sharing between frames is disabled after one second of transmit
   85 idle time.
   86 .Sh HOOKS
   87 This node type supports the following hooks:
   88 .Pp
   89 .Bl -tag -width foobar
   90 .It Dv async
   91 Asynchronous connection.
   92 Typically this hook would be connected to a
   93 .Xr ng_tty 4
   94 node, which handles transmission of serial data over a tty device.
   95 .It Dv sync
   96 Synchronous connection.  This hook sends and receives synchronous frames.
   97 For PPP, these frames should contain address, control, and protocol fields,
   98 but no checksum field.
   99 Typically this hook would be connected to an individual link hook of a
  100 .Xr ng_ppp 4
  101 type node.
  102 .El
  103 .Sh CONTROL MESSAGES
  104 This node type supports the generic control messages, plus the following:
  105 .Bl -tag -width foo
  106 .It Dv NGM_ASYNC_CMD_GET_STATS
  107 This command returns a
  108 .Dv "struct ng_async_stat"
  109 containing node statistics for packet, octet, and error counts.
  110 .It Dv NGM_ASYNC_CMD_CLR_STATS
  111 Clears the node statistics.
  112 .It Dv NGM_ASYNC_CMD_SET_CONFIG
  113 Sets the node configuration, which is described by a
  114 .Dv "struct ng_async_cfg" :
  115 .Bd -literal -offset 4n
  116 struct ng_async_cfg {
  117   u_char    enabled;  /* Turn encoding on/off */
  118   u_int16_t amru;     /* Max receive async frame len */
  119   u_int16_t smru;     /* Max receive sync frame len */
  120   u_int32_t accm;     /* ACCM encoding */
  121 };
  122 .Ed
  123 .Pp
  124 The
  125 .Dv enabled
  126 field enables or disables all encoding/decoding functions (default disabled).
  127 When disabled, the node operates in simple
  128 .Dq pass through
  129 mode.
  130 The
  131 .Dv amru
  132 and
  133 .Dv smru
  134 fields are the asynchronous and synchronous MRU (maximum receive unit) values,
  135 respectively.  These both default to 1600; note that the async MRU
  136 applies to the incoming frame length after asynchronous decoding.
  137 The
  138 .Dv accm
  139 field is the asynchronous character control map, which controls the escaping
  140 of characters 0x00 thorough 0x1f (default 0xffffffff).
  141 .It Dv NGM_ASYNC_CMD_GET_CONFIG
  142 This command returns the current configuration structure.
  143 .El
  144 .Sh SHUTDOWN
  145 This node shuts down upon receipt of a
  146 .Dv NGM_SHUTDOWN
  147 control message, or when all hooks have been disconnected.
  148 .Sh SEE ALSO
  149 .Xr netgraph 4 ,
  150 .Xr ng_ppp 4 ,
  151 .Xr ng_tty 4 ,
  152 .Xr ngctl 8
  153 .Rs
  154 .%A W. Simpson
  155 .%T "PPP in HDLC-link Framing"
  156 .%O RFC 1662
  157 .Re
  158 .Rs
  159 .%A W. Simpson
  160 .%T "The Point-to-Point Protocol (PPP)"
  161 .%O RFC 1661
  162 .Re
  163 .Sh HISTORY
  164 The
  165 .Nm
  166 node type was implemented in
  167 .Fx 4.0 .
  168 .Sh AUTHORS
  169 .An Archie Cobbs Aq archie@freebsd.org

Cache object: 4a2db8766676fd2a83463d094019f870


[ 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.