]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/ng_atmpif.4
This commit was generated by cvs2svn to compensate for changes in r171829,
[FreeBSD/FreeBSD.git] / share / man / man4 / ng_atmpif.4
1 .\"
2 .\" Copyright (c) 2001-2003
3 .\"     Harti Brandt.
4 .\"     Vincent Jardin.
5 .\"     All rights reserved.
6 .\"
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
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.
15 .\"
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
26 .\" SUCH DAMAGE.
27 .\"
28 .\" Author: Hartmut Brandt <harti@FreeBSD.org>
29 .\" Author: Vincent Jardin <vjardin@free.fr>
30 .\"
31 .\" $FreeBSD$
32 .\"
33 .\" ng_atmpif(4) man page
34 .\"
35 .Dd August 7, 2003
36 .Dt NG_ATMPIF 4
37 .Os
38 .Sh NAME
39 .Nm ng_atmpif
40 .Nd netgraph HARP/ATM Virtual Physical Interface
41 .Sh SYNOPSIS
42 .In sys/types.h
43 .In netatm/atm_if.h
44 .In netgraph/atm/ng_atmpif.h
45 .Sh DESCRIPTION
46 The
47 .Nm atmpif
48 netgraph node type allows the emulation of
49 .Xr atm 8
50 (netatm/HARP) Physical devices (PIF) to be connected to the
51 .Xr netgraph 4
52 networking subsystem.
53 Moreover, it includes protection of the PDU against duplication and
54 desequencement.
55 It supports up to 65535 VCs and up to 255 VPs.
56 AAL0, AAL3/4 and AAL5
57 emulation are provided.
58 In order to optimize CPU, this node does not emulate the SAR layer.
59 .Pp
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
62 have enough features.
63 .Pp
64 When a node
65 is created, a PIF is created automatically.
66 It is named
67 .Li hvaX .
68 It has the same features as any other HARP devices.
69 The PIF is removed when the node is removed.
70 .Sh HOOKS
71 There is only one hook:
72 .Va link .
73 This hook can be connected to any other
74 Netgraph node.
75 For example, in order
76 to test the HARP stack over UDP, it can be connected on a
77 .Xr ng_ksocket 4
78 node.
79 .Sh CONTROL MESSAGES
80 This node type supports the generic messages plus the following:
81 .Pp
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
85 Peak Cell Rate (PCR).
86 It uses the same structure as
87 .Dv NGM_ATMPIF_GET_CONFIG .
88 .Pp
89 .It Dv NGM_ATMPIF_GET_CONFIG Pq Li getconfig
90 Returns a structure defining the configuration of the interface:
91 .Bd -literal
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 */
96 };
97 .Ed
98 Note that the following debugging flags can be used:
99 .Pp
100 .Bl -tag -width ".Dv VATMPIF_DEBUG_PACKET" -offset indent -compact
101 .It Dv VATMPIF_DEBUG_NONE
102 disable debugging
103 .It Dv VATMPIF_DEBUG_PACKET
104 enable debugging
105 .El
106 .Pp
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
110 of the interface.
111 .Bd -literal
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 */
116 };
117 .Ed
118 .Pp
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
123 their values to 0.
124 The following stats are provided.
125 .Bd -literal
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 */
136 };
137 struct hva_stats_atm {
138      uint64_t     atm_xmit;       /* Cells transmitted */
139      uint64_t     atm_rcvd;       /* Cells received */
140 };
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 */
151 };
152 .Ed
153 .El
154 .Sh SEE ALSO
155 .Xr natm 4 ,
156 .Xr netgraph 4 ,
157 .Xr ng_ksocket 4 ,
158 .Xr ngctl 8
159 .Sh AUTHORS
160 .An Harti Brandt Aq harti@FreeBSD.org
161 .An Vincent Jardin Aq vjardin@wanadoo.fr