1f06ca4afSHartmut Brandt.\" 2165c5d31SHartmut Brandt.\" Copyright (c) 2004-2005 3165c5d31SHartmut Brandt.\" Hartmut Brandt 4165c5d31SHartmut Brandt.\" All rights reserved. 5f06ca4afSHartmut Brandt.\" Copyright (c) 2001-2003 6f06ca4afSHartmut Brandt.\" Fraunhofer Institute for Open Communication Systems (FhG Fokus). 7f06ca4afSHartmut Brandt.\" All rights reserved. 8f06ca4afSHartmut Brandt.\" 94f13bbb6SUlrich Spörlein.\" Author: Harti Brandt <harti@FreeBSD.org> 10f06ca4afSHartmut Brandt.\" 11896052c1SHartmut Brandt.\" Redistribution and use in source and binary forms, with or without 12896052c1SHartmut Brandt.\" modification, are permitted provided that the following conditions 13896052c1SHartmut Brandt.\" are met: 14896052c1SHartmut Brandt.\" 1. Redistributions of source code must retain the above copyright 15896052c1SHartmut Brandt.\" notice, this list of conditions and the following disclaimer. 16f06ca4afSHartmut Brandt.\" 2. Redistributions in binary form must reproduce the above copyright 17f06ca4afSHartmut Brandt.\" notice, this list of conditions and the following disclaimer in the 18f06ca4afSHartmut Brandt.\" documentation and/or other materials provided with the distribution. 19f06ca4afSHartmut Brandt.\" 20896052c1SHartmut Brandt.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND 21896052c1SHartmut Brandt.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22896052c1SHartmut Brandt.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23896052c1SHartmut Brandt.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE 24896052c1SHartmut Brandt.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25896052c1SHartmut Brandt.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26896052c1SHartmut Brandt.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27896052c1SHartmut Brandt.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28896052c1SHartmut Brandt.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29896052c1SHartmut Brandt.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30896052c1SHartmut Brandt.\" SUCH DAMAGE. 31f06ca4afSHartmut Brandt.\" 32165c5d31SHartmut Brandt.\" $Begemot: bsnmp/snmp_mibII/snmp_mibII.3,v 1.10 2005/10/04 08:46:52 brandt_h Exp $ 33f06ca4afSHartmut Brandt.\" 34*ccd0cf8fSEnji Cooper.Dd January 4, 2017 3594caccb3SHartmut Brandt.Dt SNMP_MIBII 3 36f06ca4afSHartmut Brandt.Os 37f06ca4afSHartmut Brandt.Sh NAME 388eecd77aSHartmut Brandt.Nm mibII , 39f06ca4afSHartmut Brandt.Nm mibif_notify_f , 40f06ca4afSHartmut Brandt.Nm mib_netsock , 41f06ca4afSHartmut Brandt.Nm mib_if_set_dyn , 42f06ca4afSHartmut Brandt.Nm mib_refresh_iflist , 43f06ca4afSHartmut Brandt.Nm mib_find_if , 44f06ca4afSHartmut Brandt.Nm mib_find_if_sys , 45f06ca4afSHartmut Brandt.Nm mib_find_if_name , 46f06ca4afSHartmut Brandt.Nm mib_first_if , 47f06ca4afSHartmut Brandt.Nm mib_next_if , 48f06ca4afSHartmut Brandt.Nm mib_register_newif , 49f06ca4afSHartmut Brandt.Nm mib_unregister_newif , 50f06ca4afSHartmut Brandt.Nm mib_fetch_ifmib , 51f06ca4afSHartmut Brandt.Nm mib_if_admin , 52f06ca4afSHartmut Brandt.Nm mib_find_ifa , 53f06ca4afSHartmut Brandt.Nm mib_first_ififa , 54f06ca4afSHartmut Brandt.Nm mib_next_ififa , 55f06ca4afSHartmut Brandt.Nm mib_ifstack_create , 56f06ca4afSHartmut Brandt.Nm mib_ifstack_delete , 57f06ca4afSHartmut Brandt.Nm mib_find_rcvaddr , 58f06ca4afSHartmut Brandt.Nm mib_rcvaddr_create , 59f06ca4afSHartmut Brandt.Nm mib_rcvaddr_delete , 60f06ca4afSHartmut Brandt.Nm mibif_notify , 61f06ca4afSHartmut Brandt.Nm mibif_unnotify 62165c5d31SHartmut Brandt.Nd "mib-2 module for bsnmpd." 63f06ca4afSHartmut Brandt.Sh LIBRARY 648eecd77aSHartmut Brandt.Pq begemotSnmpdModulePath."mibII" = "@MODPATH@snmp_mibII.so" 65f06ca4afSHartmut Brandt.Sh SYNOPSIS 66*ccd0cf8fSEnji Cooper.In net/if.h 67*ccd0cf8fSEnji Cooper.In net/if_mib.h 68f06ca4afSHartmut Brandt.In bsnmp/snmpmod.h 69f06ca4afSHartmut Brandt.In bsnmp/snmp_mibII.h 70f06ca4afSHartmut Brandt.Ft typedef void 71f06ca4afSHartmut Brandt.Fn (*mibif_notify_f) "struct mibif *ifp" "enum mibif_notify event" "void *uarg" 72f06ca4afSHartmut Brandt.Vt extern int mib_netsock ; 73f06ca4afSHartmut Brandt.Ft void 74f06ca4afSHartmut Brandt.Fn mib_if_set_dyn "const char *ifname" 75f06ca4afSHartmut Brandt.Ft void 76f06ca4afSHartmut Brandt.Fn mib_refresh_iflist "void" 77f06ca4afSHartmut Brandt.Ft struct mibif * 78f06ca4afSHartmut Brandt.Fn mib_find_if "u_int ifindex" 79f06ca4afSHartmut Brandt.Ft struct mibif * 80f06ca4afSHartmut Brandt.Fn mib_find_if_sys "u_int sysindex" 81f06ca4afSHartmut Brandt.Ft struct mibif * 82f06ca4afSHartmut Brandt.Fn mib_find_if_name "const char *ifname" 83f06ca4afSHartmut Brandt.Ft struct mibif * 84f06ca4afSHartmut Brandt.Fn mib_first_if "void" 85f06ca4afSHartmut Brandt.Ft struct mibif * 86f06ca4afSHartmut Brandt.Fn mib_next_if "const struct mibif *ifp" 87f06ca4afSHartmut Brandt.Ft int 88f06ca4afSHartmut Brandt.Fn mib_register_newif "int (*func)(struct mibif *)" "const struct lmodule *mod" 89f06ca4afSHartmut Brandt.Ft void 90f06ca4afSHartmut Brandt.Fn mib_unregister_newif "const struct lmodule *mod" 91f06ca4afSHartmut Brandt.Ft int 92f06ca4afSHartmut Brandt.Fn mib_fetch_ifmib "struct mibif *ifp" 93f06ca4afSHartmut Brandt.Ft int 94f06ca4afSHartmut Brandt.Fn mib_if_admin "struct mibif *ifp" "int up" 95f06ca4afSHartmut Brandt.Ft struct mibifa * 96f06ca4afSHartmut Brandt.Fn mib_find_ifa "struct in_addr ipa" 97f06ca4afSHartmut Brandt.Ft struct mibifa * 98f06ca4afSHartmut Brandt.Fn mib_first_ififa "const struct mibif *ifp" 99f06ca4afSHartmut Brandt.Ft struct mibifa * 100f06ca4afSHartmut Brandt.Fn mib_next_ififa "struct mibifa *ifa" 101f06ca4afSHartmut Brandt.Ft int 102f06ca4afSHartmut Brandt.Fn mib_ifstack_create "const struct mibif *lower" "const struct mibif *upper" 103f06ca4afSHartmut Brandt.Ft void 104f06ca4afSHartmut Brandt.Fn mib_ifstack_delete "const struct mibif *lower" "const struct mibif *upper" 105f06ca4afSHartmut Brandt.Ft struct mibrcvaddr * 106f06ca4afSHartmut Brandt.Fn mib_find_rcvaddr "u_int ifindex" "const u_char *addr" "size_t addrlen" 107f06ca4afSHartmut Brandt.Ft struct mibrcvaddr * 108f06ca4afSHartmut Brandt.Fn mib_rcvaddr_create "struct mibif *ifp" "const u_char *addr" "size_t addrlen" 109f06ca4afSHartmut Brandt.Ft void 110f06ca4afSHartmut Brandt.Fn mib_rcvaddr_delete "struct mibrcvaddr *addr" 111f06ca4afSHartmut Brandt.Ft void * 112f06ca4afSHartmut Brandt.Fn mibif_notify "struct mibif *ifp" "const struct lmodule *mod" "mibif_notify_f func" "void *uarg" 113f06ca4afSHartmut Brandt.Ft void 114f06ca4afSHartmut Brandt.Fn mibif_unnotify "void *reg" 115f06ca4afSHartmut Brandt.Sh DESCRIPTION 116f06ca4afSHartmut BrandtThe 117f06ca4afSHartmut Brandt.Nm snmp_mibII 118165c5d31SHartmut Brandtmodule implements parts of the internet standard MIB-2. 119165c5d31SHartmut BrandtMost of the relevant MIBs are implemented. 120165c5d31SHartmut BrandtSome of the tables are restricted to be read-only instead of read-write. 121165c5d31SHartmut BrandtThe exact current implementation can be found in 1228eecd77aSHartmut Brandt.Pa @DEFPATH@mibII_tree.def . 123f06ca4afSHartmut BrandtThe module also exports a number of functions and global variables for use 124165c5d31SHartmut Brandtby other modules, that need to handle network interfaces. 125165c5d31SHartmut BrandtThis man page describes these functions. 126f06ca4afSHartmut Brandt.Ss DIRECT NETWORK ACCESS 127f06ca4afSHartmut BrandtThe 128f06ca4afSHartmut Brandt.Nm 129f06ca4afSHartmut Brandtmodule opens a socket that is used to execute all network related 130f06ca4afSHartmut Brandt.Xr ioctl 2 131165c5d31SHartmut Brandtfunctions. 132165c5d31SHartmut BrandtThis socket is globally available under the name 133f06ca4afSHartmut Brandt.Va mib_netsock . 134f06ca4afSHartmut Brandt.Ss NETWORK INTERFACES 135f06ca4afSHartmut BrandtThe 136f06ca4afSHartmut Brandt.Nm 137165c5d31SHartmut Brandtmodule handles a list of all currently existing network interfaces. 138165c5d31SHartmut BrandtIt allows 139f06ca4afSHartmut Brandtother modules to handle their own interface lists with special information 140f06ca4afSHartmut Brandtby providing a mechanism to register to events that change the interface list 141165c5d31SHartmut Brandt(see below). 142165c5d31SHartmut BrandtThe basic data structure is the interface structure: 143f06ca4afSHartmut Brandt.Bd -literal -offset indent 144f06ca4afSHartmut Brandtstruct mibif { 145f06ca4afSHartmut Brandt TAILQ_ENTRY(mibif) link; 146f06ca4afSHartmut Brandt u_int flags; 147f06ca4afSHartmut Brandt u_int index; /* logical ifindex */ 148f06ca4afSHartmut Brandt u_int sysindex; 149f06ca4afSHartmut Brandt char name[IFNAMSIZ]; 150f06ca4afSHartmut Brandt char descr[256]; 151f06ca4afSHartmut Brandt struct ifmibdata mib; 15269292cedSHartmut Brandt uint64_t mibtick; 153f06ca4afSHartmut Brandt void *specmib; 154f06ca4afSHartmut Brandt size_t specmiblen; 155f06ca4afSHartmut Brandt u_char *physaddr; 156f06ca4afSHartmut Brandt u_int physaddrlen; 157f06ca4afSHartmut Brandt int has_connector; 158f06ca4afSHartmut Brandt int trap_enable; 15969292cedSHartmut Brandt uint64_t counter_disc; 160f06ca4afSHartmut Brandt mibif_notify_f xnotify; 161f06ca4afSHartmut Brandt void *xnotify_data; 162f06ca4afSHartmut Brandt const struct lmodule *xnotify_mod; 16394caccb3SHartmut Brandt struct asn_oid spec_oid; 164f06ca4afSHartmut Brandt}; 165f06ca4afSHartmut Brandt.Ed 166f06ca4afSHartmut Brandt.Pp 167f06ca4afSHartmut BrandtThe 168f06ca4afSHartmut Brandt.Nm 169f06ca4afSHartmut Brandtmodule tries to implement the semantic if 170f06ca4afSHartmut Brandt.Va ifIndex 171165c5d31SHartmut Brandtas described in RFC-2863. 172165c5d31SHartmut BrandtThis RFC states, that an interface indexes may not be reused. 173165c5d31SHartmut BrandtThat means, for example, if 174f06ca4afSHartmut Brandt.Pa tun 175f06ca4afSHartmut Brandtis a synthetic interface type and the system creates the interface 176f06ca4afSHartmut Brandt.Pa tun0 , 177f06ca4afSHartmut Brandtdestroys this interfaces and again creates a 178f06ca4afSHartmut Brandt.Pa tun 0 , 179f06ca4afSHartmut Brandtthen these interfaces must have different interface indexes, because in fact 180165c5d31SHartmut Brandtthey are different interfaces. 181165c5d31SHartmut BrandtIf, on the other hand, there is a hardware interface 182f06ca4afSHartmut Brandt.Pa xl0 183f06ca4afSHartmut Brandtand this interface disappears, because its driver is unloaded and appears 184f06ca4afSHartmut Brandtagain, because the driver is loaded again, the interface index must stay 185f06ca4afSHartmut Brandtthe same. 186f06ca4afSHartmut Brandt.Nm 187f06ca4afSHartmut Brandtimplements this by differentiating between real and synthetic (dynamic) 188165c5d31SHartmut Brandtinterfaces. 189165c5d31SHartmut BrandtAn interface type can be declared dynamic by calling the function 190f06ca4afSHartmut Brandt.Fn mib_if_set_dyn 191f06ca4afSHartmut Brandtwith the name if the interface type (for example 192f06ca4afSHartmut Brandt.Qq tun ). 193f06ca4afSHartmut BrandtFor real interfaces, the module keeps the mapping between the interface name 194f06ca4afSHartmut Brandtand its 195f06ca4afSHartmut Brandt.Va ifIndex 196165c5d31SHartmut Brandtin a special list, if the interface is unloaded. 197165c5d31SHartmut BrandtFor dynamic interfaces 198f06ca4afSHartmut Brandta new 199f06ca4afSHartmut Brandt.Va ifIndex 200165c5d31SHartmut Brandtis generated each time the interface comes into existence. 201165c5d31SHartmut BrandtThis means, that the interface index as seen by SNMP is not the same index 202165c5d31SHartmut Brandtas used by the system. 203165c5d31SHartmut BrandtThe SNMP 204f06ca4afSHartmut Brandt.Va ifIndex 205f06ca4afSHartmut Brandtis held in field 206f06ca4afSHartmut Brandt.Va index , 207f06ca4afSHartmut Brandtthe system's interface index is 208f06ca4afSHartmut Brandt.Va sysindex . 209f06ca4afSHartmut Brandt.Pp 210f06ca4afSHartmut BrandtA call to 211f06ca4afSHartmut Brandt.Nm mib_refresh_iflist 212f06ca4afSHartmut Brandtcauses the entire interface list to be re-created. 213f06ca4afSHartmut Brandt.Pp 214f06ca4afSHartmut BrandtThe interface list can be traversed with the functions 215f06ca4afSHartmut Brandt.Fn mib_first_if 216f06ca4afSHartmut Brandtand 217f06ca4afSHartmut Brandt.Fn mib_next_if . 218f06ca4afSHartmut BrandtBe sure not to change the interface list while traversing the list with 219f06ca4afSHartmut Brandtthese two calls. 220f06ca4afSHartmut Brandt.Pp 221f06ca4afSHartmut BrandtThere are three functions to find an interface by name or index. 222f06ca4afSHartmut Brandt.Fn mib_find_if 223f06ca4afSHartmut Brandtfinds an interface by searching for an SNMP 224f06ca4afSHartmut Brandt.Va ifIndex , 225f06ca4afSHartmut Brandt.Fn mib_find_if_sys 226f06ca4afSHartmut Brandtfinds an interface by searching for a system interface index and 227f06ca4afSHartmut Brandt.Fn mib_find_if_name 228165c5d31SHartmut Brandtfinds an interface by looking for an interface name. 229165c5d31SHartmut BrandtEach of the function returns 230f06ca4afSHartmut Brandt.Li NULL 231f06ca4afSHartmut Brandtif the interface cannot be found. 232f06ca4afSHartmut Brandt.Pp 233f06ca4afSHartmut BrandtThe function 234f06ca4afSHartmut Brandt.Fn mib_fetch_ifmib 235f06ca4afSHartmut Brandtcauses the interface MIB to be refreshed from the kernel. 236f06ca4afSHartmut Brandt.Pp 237f06ca4afSHartmut BrandtThe function 238f06ca4afSHartmut Brandt.Fn mib_if_admin 239f06ca4afSHartmut Brandtcan be used to change the interface administrative state to up 240f06ca4afSHartmut Brandt(argument is 1) or down (argument is 0). 241f06ca4afSHartmut Brandt.Ss INTERFACE EVENTS 242f06ca4afSHartmut BrandtA module can register itself to receive a notification when a new entry is 243165c5d31SHartmut Brandtcreated in the interface list. 244165c5d31SHartmut BrandtThis is done by calling 245f06ca4afSHartmut Brandt.Fn mib_register_newif . 246f06ca4afSHartmut BrandtA module can register only one function, a second call to 247f06ca4afSHartmut Brandt.Fn mib_register_newif 248165c5d31SHartmut Brandtcauses the registration to be overwritten. 249165c5d31SHartmut BrandtThe registration can be removed with a call to 250f06ca4afSHartmut Brandt.Fn mib_unregister_newif . 251165c5d31SHartmut BrandtIt is unregistered automatically, when the registering module is unloaded. 252f06ca4afSHartmut Brandt.Pp 253165c5d31SHartmut BrandtA module can also register to events on a specific interface. 254165c5d31SHartmut BrandtThis is done by calling 255f06ca4afSHartmut Brandt.Fn mibif_notify . 256f06ca4afSHartmut BrandtThis causes the given callback 257f06ca4afSHartmut Brandt.Fa func 258f06ca4afSHartmut Brandtto be called with the interface pointer, a notification code and 259f06ca4afSHartmut Brandtthe user argument 260f06ca4afSHartmut Brandt.Fa uarg 261f06ca4afSHartmut Brandtwhen any of the following events occur: 262f06ca4afSHartmut Brandt.Bl -tag -width "XXXXX" 263f06ca4afSHartmut Brandt.It Li MIBIF_NOTIFY_DESTROY 264f06ca4afSHartmut BrandtThe interface is destroyed. 265f06ca4afSHartmut Brandt.El 266f06ca4afSHartmut Brandt.Pp 267f06ca4afSHartmut BrandtThis mechanism can be used to implement interface type specific MIB parts 268165c5d31SHartmut Brandtin other modules. 269165c5d31SHartmut BrandtThe registration can be removed with 270f06ca4afSHartmut Brandt.Fn mib_unnotify 271f06ca4afSHartmut Brandtwhich the return value from 272f06ca4afSHartmut Brandt.Fa mib_notify . 273f06ca4afSHartmut BrandtAny notification registration is removed automatically when the interface 274f06ca4afSHartmut Brandtis destroyed or the registering module is unloaded. 275f06ca4afSHartmut Brandt.Em Note that only one module can register to any given interface . 276f06ca4afSHartmut Brandt.Ss INTERFACE ADDRESSES 277f06ca4afSHartmut BrandtThe 278f06ca4afSHartmut Brandt.Nm 279165c5d31SHartmut Brandtmodule handles a table of interface IP-addresses. 280165c5d31SHartmut BrandtThese addresses are held in a 281f06ca4afSHartmut Brandt.Bd -literal -offset indent 282f06ca4afSHartmut Brandtstruct mibifa { 283f06ca4afSHartmut Brandt TAILQ_ENTRY(mibifa) link; 284f06ca4afSHartmut Brandt struct in_addr inaddr; 285f06ca4afSHartmut Brandt struct in_addr inmask; 286f06ca4afSHartmut Brandt struct in_addr inbcast; 287f06ca4afSHartmut Brandt struct asn_oid index; 288f06ca4afSHartmut Brandt u_int ifindex; 289f06ca4afSHartmut Brandt u_int flags; 290f06ca4afSHartmut Brandt}; 291f06ca4afSHartmut Brandt.Ed 292f06ca4afSHartmut Brandt.Pp 293f06ca4afSHartmut BrandtThe (ordered) list of IP-addresses on a given interface can be traversed by 294f06ca4afSHartmut Brandtcalling 295f06ca4afSHartmut Brandt.Fn mib_first_ififa 296f06ca4afSHartmut Brandtand 297f06ca4afSHartmut Brandt.Fn mib_next_ififa . 298f06ca4afSHartmut BrandtThe list should not be considered read-only. 299f06ca4afSHartmut Brandt.Ss INTERFACE RECEIVE ADDRESSES 300165c5d31SHartmut BrandtThe internet MIB-2 contains a table of interface receive addresses. 301165c5d31SHartmut BrandtThese addresses are handled in: 302f06ca4afSHartmut Brandt.Bd -literal -offset indent 303f06ca4afSHartmut Brandtstruct mibrcvaddr { 304f06ca4afSHartmut Brandt TAILQ_ENTRY(mibrcvaddr) link; 305f06ca4afSHartmut Brandt struct asn_oid index; 306f06ca4afSHartmut Brandt u_int ifindex; 307f06ca4afSHartmut Brandt u_char addr[ASN_MAXOIDLEN]; 308f06ca4afSHartmut Brandt size_t addrlen; 309f06ca4afSHartmut Brandt u_int flags; 310f06ca4afSHartmut Brandt}; 311f06ca4afSHartmut Brandtenum { 312f06ca4afSHartmut Brandt MIBRCVADDR_VOLATILE = 0x00000001, 313f06ca4afSHartmut Brandt MIBRCVADDR_BCAST = 0x00000002, 314f06ca4afSHartmut Brandt MIBRCVADDR_HW = 0x00000004, 315f06ca4afSHartmut Brandt}; 316f06ca4afSHartmut Brandt.Ed 317f06ca4afSHartmut Brandt.Pp 318f06ca4afSHartmut BrandtNote, that the assignment of 319f06ca4afSHartmut Brandt.Li MIBRCVADDR_BCAST 320165c5d31SHartmut Brandtis based on a list of known interface types. 321165c5d31SHartmut BrandtThe flags should be handled 322165c5d31SHartmut Brandtby modules implementing interface type specific MIBs. 323f06ca4afSHartmut Brandt.Pp 324f06ca4afSHartmut BrandtA receive address can be created with 325f06ca4afSHartmut Brandt.Fn mib_rcvaddr_create 326f06ca4afSHartmut Brandtand deleted with 327f06ca4afSHartmut Brandt.Fn mib_rcvaddr_delete . 328f06ca4afSHartmut BrandtThis needs to be done only for addresses that are not automatically handled 329f06ca4afSHartmut Brandtby the system. 330f06ca4afSHartmut Brandt.Pp 331f06ca4afSHartmut BrandtA receive address can be found with 332f06ca4afSHartmut Brandt.Fn mib_find_rcvaddr . 333f06ca4afSHartmut Brandt.Ss INTERFACE STACK TABLE 334f06ca4afSHartmut BrandtThe 335f06ca4afSHartmut Brandt.Nm 336165c5d31SHartmut Brandtmodule maintains also the interface stack table. 337165c5d31SHartmut BrandtBecause for complex stacks, 338f06ca4afSHartmut Brandtthere is no system supported generic way of getting this information, interface 339165c5d31SHartmut Brandttype specific modules need to help setting up stack entries. 340165c5d31SHartmut BrandtThe 341f06ca4afSHartmut Brandt.Nm 342f06ca4afSHartmut Brandtmodule handles only the top and bottom entries. 343f06ca4afSHartmut Brandt.Pp 344f06ca4afSHartmut BrandtA table entry is created with 345f06ca4afSHartmut Brandt.Fn mib_ifstack_create 346f06ca4afSHartmut Brandtand deleted with 347f06ca4afSHartmut Brandt.Fn mib_ifstack_delete . 348165c5d31SHartmut BrandtBoth functions need the pointers to the interfaces. 349165c5d31SHartmut BrandtEntries are automatically 350165c5d31SHartmut Brandtdeleted if any of the interfaces of the entry is destroyed. 351165c5d31SHartmut BrandtThe functions handle 352f06ca4afSHartmut Brandtboth the stack table and the reverse stack table. 353f06ca4afSHartmut Brandt.Sh FILES 3548eecd77aSHartmut Brandt.Bl -tag -width ".It Pa @DEFPATH@mibII_tree.def" -compact 3558eecd77aSHartmut Brandt.It Pa @DEFPATH@mibII_tree.def 356f06ca4afSHartmut BrandtThe description of the MIB tree implemented by 357f06ca4afSHartmut Brandt.Nm . 358f06ca4afSHartmut Brandt.It Pa /usr/local/share/snmp/mibs 3598eecd77aSHartmut Brandt.It Pa @MIBSPATH@ 360f06ca4afSHartmut BrandtThe various internet MIBs. 36194caccb3SHartmut Brandt.El 362f06ca4afSHartmut Brandt.Sh SEE ALSO 36394caccb3SHartmut Brandt.Xr gensnmptree 1 , 36494caccb3SHartmut Brandt.Xr snmpmod 3 365f06ca4afSHartmut Brandt.Sh STANDARDS 366f06ca4afSHartmut BrandtThis implementation conforms to the applicable IETF RFCs. 367f06ca4afSHartmut Brandt.Sh AUTHORS 3684f13bbb6SUlrich Spörlein.An Hartmut Brandt Aq harti@FreeBSD.org 369