2 .\" Copyright (c) 2001-2003
5 .\" All rights reserved.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
16 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" Author: Hartmut Brandt <harti@FreeBSD.org>
29 .\" Author: Vincent Jardin <vjardin@free.fr>
33 .\" ng_atmpif(4) man page
40 .Nd netgraph HARP/ATM Virtual Physical Interface
44 .In netgraph/atm/ng_atmpif.h
48 netgraph node type allows the emulation of
50 (netatm/HARP) Physical devices (PIF) to be connected to the
53 Moreover, it includes protection of the PDU against duplication and
55 It supports up to 65535 VCs and up to 255 VPs.
57 emulation are provided.
58 In order to optimize CPU, this node does not emulate the SAR layer.
60 The purpose of this node is to help in debugging and testing the HARP
61 stack when one does not have an ATM board or when the available boards do not
65 is created, a PIF is created automatically.
68 It has the same features as any other HARP devices.
69 The PIF is removed when the node is removed.
71 There is only one hook:
73 This hook can be connected to any other
76 to test the HARP stack over UDP, it can be connected on a
80 This node type supports the generic messages plus the following:
82 .Bl -tag -width indent -compact
83 .It Dv NGM_ATMPIF_SET_CONFIG Pq Li setconfig
84 Configures the debugging features of the node and a virtual
86 It uses the same structure as
87 .Dv NGM_ATMPIF_GET_CONFIG .
89 .It Dv NGM_ATMPIF_GET_CONFIG Pq Li getconfig
90 Returns a structure defining the configuration of the interface:
92 struct ng_vatmpif_config {
93 uint8_t debug; /* debug bit field (see below) */
94 uint32_t pcr; /* peak cell rate */
95 Mac_addr macaddr; /* Mac Address */
98 Note that the following debugging flags can be used:
100 .Bl -tag -width ".Dv VATMPIF_DEBUG_PACKET" -offset indent -compact
101 .It Dv VATMPIF_DEBUG_NONE
103 .It Dv VATMPIF_DEBUG_PACKET
107 .It Dv NGM_ATMPIF_GET_LINK_STATUS Pq Li getlinkstatus
108 Returns the last received sequence number, the last sent sequence
109 number and the current total PCR that is reserved among all the VCCs
112 struct ng_atmpif_link_status {
113 uint32_t InSeq; /* last received sequence number + 1 */
114 uint32_t OutSeq; /* last sent sequence number */
115 uint32_t cur_pcr; /* slot's reserved PCR */
119 .It Dv NGM_ATMPIF_GET_STATS Pq Li getstats
120 .It Dv NGM_ATMPIF_CLR_STATS Pq Li clrstats
121 .It Dv NGM_ATMPIF_GETCLR_STATS Pq Li getclrstats
122 It returns the node's statistics, it clears them or it returns and resets
124 The following stats are provided.
126 struct hva_stats_ng {
127 uint32_t ng_errseq; /* Duplicate or out of order */
128 uint32_t ng_lostpdu; /* PDU lost detected */
129 uint32_t ng_badpdu; /* Unknown PDU type */
130 uint32_t ng_rx_novcc; /* Draining PDU on closed VCC */
131 uint32_t ng_rx_iqfull; /* PDU drops no room in atm_intrq */
132 uint32_t ng_tx_rawcell; /* PDU raw cells transmitted */
133 uint32_t ng_rx_rawcell; /* PDU raw cells received */
134 uint64_t ng_tx_pdu; /* PDU transmitted */
135 uint64_t ng_rx_pdu; /* PDU received */
137 struct hva_stats_atm {
138 uint64_t atm_xmit; /* Cells transmitted */
139 uint64_t atm_rcvd; /* Cells received */
141 struct hva_stats_aal5 {
142 uint64_t aal5_xmit; /* Cells transmitted */
143 uint64_t aal5_rcvd; /* Cells received */
144 uint32_t aal5_crc_len; /* Cells with CRC/length errors */
145 uint32_t aal5_drops; /* Cell drops */
146 uint64_t aal5_pdu_xmit; /* CS PDUs transmitted */
147 uint64_t aal5_pdu_rcvd; /* CS PDUs received */
148 uint32_t aal5_pdu_crc; /* CS PDUs with CRC errors */
149 uint32_t aal5_pdu_errs; /* CS layer protocol errors */
150 uint32_t aal5_pdu_drops; /* CS PDUs dropped */
160 .An Harti Brandt Aq harti@FreeBSD.org
161 .An Vincent Jardin Aq vjardin@wanadoo.fr