1 .\" Copyright 1996 Massachusetts Institute of Technology
3 .\" Permission to use, copy, modify, and distribute this software and
4 .\" its documentation for any purpose and without fee is hereby
5 .\" granted, provided that both the above copyright notice and this
6 .\" permission notice appear in all copies, that both the above
7 .\" copyright notice and this permission notice appear in all
8 .\" supporting documentation, and that the name of M.I.T. not be used
9 .\" in advertising or publicity pertaining to distribution of the
10 .\" software without specific, written prior permission. M.I.T. makes
11 .\" no representations about the suitability of this software for any
12 .\" purpose. It is provided "as is" without express or implied
15 .\" THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
16 .\" ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
17 .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
19 .\" SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21 .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
22 .\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 .\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" $FreeBSD: /repoman/r/ncvs/src/share/man/man4/ifmib.4,v 1.20 2004/07/03 18:29:20 ru Exp $
35 .Nd Management Information Base for network interfaces
46 facility is an application of the
48 interface to provide management information about network interfaces
49 to client applications such as
55 This information is structured as a table, where
56 each row in the table represents a logical network interface (either a
57 hardware device or a software pseudo-device like
59 There are two columns in the table, each containing a single
60 structure: one column contains generic information relevant to all
61 interfaces, and the other contains information specific to the
62 particular class of interface.
63 (Generally the latter will implement
67 defined for that particular interface class, if one exists and can be
68 implemented in the kernel.)
72 facility is accessed via the
73 .Dq Li net.link.generic
77 The manifest constants for each level in the
82 The index of the last row in the table is given by
83 .Dq Li net.link.generic.system.ifcount
84 (or, using the manifest constants,
90 A management application searching for a particular interface should
91 start with row 1 and continue through the table row-by-row until the
92 desired interface is found, or the interface count is reached.
93 Note that the table may be sparse, i.e., a given row may not exist,
98 Such an error should be ignored, and the next row should be checked.
100 The generic interface information, common to all interfaces,
101 can be accessed via the following procedure:
102 .Bd -literal -offset indent
104 get_ifmib_general(int row, struct ifmibdata *ifmd)
111 name[2] = NETLINK_GENERIC;
112 name[3] = IFMIB_IFDATA;
114 name[5] = IFDATA_GENERAL;
118 return sysctl(name, 6, ifmd, &len, (void *)0, 0);
125 .Bl -tag -width "ifmd_snd_drops"
128 the name of the interface, including the unit number
131 the number of promiscuous listeners
134 the interface's flags (defined in
138 the current instantaneous length of the send queue
139 .It Li ifmd_snd_drops
141 the number of packets dropped at this interface because the send queue
144 .Pq Li struct if_data
145 more information from a structure defined in
151 Class-specific information can be retrieved by examining the
152 .Dv IFDATA_LINKSPECIFIC
154 Note that the form and length of the structure will
155 depend on the class of interface.
161 interfaces, the structure is called
162 .Dq Li struct ifmib_iso_8802_3
165 and implements a superset of the
167 MIB for Ethernet-like networks.
168 .\" This will eventually be defined in an ethermib(4) page.
172 .Dq Li struct sl_softc
173 .Pq In net/if_slvar.h .
180 .%T "Definitions of Managed Objects for the Ethernet-like Interface Types Using SMIv2"
186 Many Ethernet-like interfaces do not yet support the Ethernet MIB;
187 the interfaces known to support it include
191 Regardless, all interfaces automatically support the generic MIB.
195 interface first appeared in