summaryrefslogtreecommitdiff
path: root/static/freebsd/man4/ng_async.4 3.html
diff options
context:
space:
mode:
Diffstat (limited to 'static/freebsd/man4/ng_async.4 3.html')
-rw-r--r--static/freebsd/man4/ng_async.4 3.html139
1 files changed, 139 insertions, 0 deletions
diff --git a/static/freebsd/man4/ng_async.4 3.html b/static/freebsd/man4/ng_async.4 3.html
new file mode 100644
index 00000000..f2f373fe
--- /dev/null
+++ b/static/freebsd/man4/ng_async.4 3.html
@@ -0,0 +1,139 @@
+<table class="head">
+ <tr>
+ <td class="head-ltitle">NG_ASYNC(4)</td>
+ <td class="head-vol">Device Drivers Manual</td>
+ <td class="head-rtitle">NG_ASYNC(4)</td>
+ </tr>
+</table>
+<div class="manual-text">
+<section class="Sh">
+<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
+<p class="Pp"><code class="Nm">ng_async</code> &#x2014;
+ <span class="Nd">asynchronous framing netgraph node type</span></p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
+<p class="Pp"><code class="In">#include
+ &lt;<a class="In">sys/types.h</a>&gt;</code>
+ <br/>
+ <code class="In">#include
+ &lt;<a class="In">netgraph/ng_async.h</a>&gt;</code></p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
+<p class="Pp">The <code class="Nm">async</code> 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.</p>
+<p class="Pp">The node transmits and receives asynchronous data on the
+ <code class="Dv">async</code> 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
+ <code class="Dv">sync</code> hook as a single frame.</p>
+<p class="Pp">Synchronous frames are transmitted and received on the
+ <code class="Dv">sync</code> hook. Packets received on this hook are encoded
+ as asynchronous frames and sent out on <code class="Dv">async</code>.
+ 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 <code class="Dv">0xff
+ 0x03 0xc0 0x21</code> (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).</p>
+<p class="Pp">This node supports &#x201C;flag sharing&#x201D; for packets
+ transmitted on <code class="Dv">async</code>. 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.</p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="HOOKS"><a class="permalink" href="#HOOKS">HOOKS</a></h1>
+<p class="Pp">This node type supports the following hooks:</p>
+<dl class="Bl-tag">
+ <dt id="async"><var class="Va">async</var></dt>
+ <dd>Asynchronous connection. Typically this hook would be connected to a
+ <a class="Xr">ng_tty(4)</a> node, which handles transmission of serial
+ data over a tty device.</dd>
+ <dt id="sync"><var class="Va">sync</var></dt>
+ <dd>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 <a class="Xr">ng_ppp(4)</a> type node.</dd>
+</dl>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="CONTROL_MESSAGES"><a class="permalink" href="#CONTROL_MESSAGES">CONTROL
+ MESSAGES</a></h1>
+<p class="Pp">This node type supports the generic control messages, plus the
+ following:</p>
+<dl class="Bl-tag">
+ <dt id="NGM_ASYNC_CMD_SET_CONFIG"><a class="permalink" href="#NGM_ASYNC_CMD_SET_CONFIG"><code class="Dv">NGM_ASYNC_CMD_SET_CONFIG</code></a>
+ (<code class="Ic">setconfig</code>)</dt>
+ <dd>Sets the node configuration, which is described by a
+ <code class="Dv">struct ng_async_cfg</code>:
+ <div class="Bd Pp Bd-indent Li">
+ <pre>struct ng_async_cfg {
+ u_char enabled; /* Turn encoding on/off */
+ uint16_t amru; /* Max receive async frame length */
+ uint16_t smru; /* Max receive sync frame length */
+ uint32_t accm; /* ACCM encoding */
+};</pre>
+ </div>
+ The <code class="Dv">enabled</code> field enables or disables all
+ encoding/decoding functions (default disabled). When disabled, the node
+ operates in simple &#x201C;pass through&#x201D; mode. The
+ <code class="Dv">amru</code> and <code class="Dv">smru</code> 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
+ <code class="Dv">accm</code> field is the asynchronous character control
+ map, which controls the escaping of characters 0x00 thorough 0x1f (default
+ 0xffffffff).</dd>
+ <dt id="NGM_ASYNC_CMD_GET_CONFIG"><a class="permalink" href="#NGM_ASYNC_CMD_GET_CONFIG"><code class="Dv">NGM_ASYNC_CMD_GET_CONFIG</code></a>
+ (<code class="Ic">getconfig</code>)</dt>
+ <dd>This command returns the current configuration structure.</dd>
+ <dt id="NGM_ASYNC_CMD_GET_STATS"><a class="permalink" href="#NGM_ASYNC_CMD_GET_STATS"><code class="Dv">NGM_ASYNC_CMD_GET_STATS</code></a>
+ (<code class="Ic">getstats</code>)</dt>
+ <dd>This command returns a <code class="Dv">struct ng_async_stat</code>
+ containing node statistics for packet, octet, and error counts.</dd>
+ <dt id="NGM_ASYNC_CMD_CLR_STATS"><a class="permalink" href="#NGM_ASYNC_CMD_CLR_STATS"><code class="Dv">NGM_ASYNC_CMD_CLR_STATS</code></a>
+ (<code class="Ic">clrstats</code>)</dt>
+ <dd>Clears the node statistics.</dd>
+</dl>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="SHUTDOWN"><a class="permalink" href="#SHUTDOWN">SHUTDOWN</a></h1>
+<p class="Pp">This node shuts down upon receipt of a
+ <code class="Dv">NGM_SHUTDOWN</code> control message, or when all hooks have
+ been disconnected.</p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
+ ALSO</a></h1>
+<p class="Pp"><a class="Xr">netgraph(4)</a>, <a class="Xr">ng_ppp(4)</a>,
+ <a class="Xr">ng_tty(4)</a>, <a class="Xr">ngctl(8)</a></p>
+<p class="Pp"><cite class="Rs"><span class="RsA">W. Simpson</span>,
+ <span class="RsT">PPP in HDLC-link Framing</span>, <span class="RsO">RFC
+ 1662</span>.</cite></p>
+<p class="Pp"><cite class="Rs"><span class="RsA">W. Simpson</span>,
+ <span class="RsT">The Point-to-Point Protocol (PPP)</span>,
+ <span class="RsO">RFC 1661</span>.</cite></p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
+<p class="Pp">The <code class="Nm">ng_async</code> node type was implemented in
+ <span class="Ux">FreeBSD 4.0</span>.</p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
+<p class="Pp"><span class="An">Archie Cobbs</span>
+ &lt;<a class="Mt" href="mailto:archie@FreeBSD.org">archie@FreeBSD.org</a>&gt;</p>
+</section>
+</div>
+<table class="foot">
+ <tr>
+ <td class="foot-date">November 13, 2012</td>
+ <td class="foot-os">FreeBSD 15.0</td>
+ </tr>
+</table>