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.\" 9f06ca4afSHartmut Brandt.\" 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.\" 34165c5d31SHartmut Brandt.Dd October 4, 2005 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 66f06ca4afSHartmut Brandt.In bsnmp/snmpmod.h 67f06ca4afSHartmut Brandt.In bsnmp/snmp_mibII.h 68f06ca4afSHartmut Brandt.Ft typedef void 69f06ca4afSHartmut Brandt.Fn (*mibif_notify_f) "struct mibif *ifp" "enum mibif_notify event" "void *uarg" 70f06ca4afSHartmut Brandt.Vt extern int mib_netsock ; 71f06ca4afSHartmut Brandt.Ft void 72f06ca4afSHartmut Brandt.Fn mib_if_set_dyn "const char *ifname" 73f06ca4afSHartmut Brandt.Ft void 74f06ca4afSHartmut Brandt.Fn mib_refresh_iflist "void" 75f06ca4afSHartmut Brandt.Ft struct mibif * 76f06ca4afSHartmut Brandt.Fn mib_find_if "u_int ifindex" 77f06ca4afSHartmut Brandt.Ft struct mibif * 78f06ca4afSHartmut Brandt.Fn mib_find_if_sys "u_int sysindex" 79f06ca4afSHartmut Brandt.Ft struct mibif * 80f06ca4afSHartmut Brandt.Fn mib_find_if_name "const char *ifname" 81f06ca4afSHartmut Brandt.Ft struct mibif * 82f06ca4afSHartmut Brandt.Fn mib_first_if "void" 83f06ca4afSHartmut Brandt.Ft struct mibif * 84f06ca4afSHartmut Brandt.Fn mib_next_if "const struct mibif *ifp" 85f06ca4afSHartmut Brandt.Ft int 86f06ca4afSHartmut Brandt.Fn mib_register_newif "int (*func)(struct mibif *)" "const struct lmodule *mod" 87f06ca4afSHartmut Brandt.Ft void 88f06ca4afSHartmut Brandt.Fn mib_unregister_newif "const struct lmodule *mod" 89f06ca4afSHartmut Brandt.Ft int 90f06ca4afSHartmut Brandt.Fn mib_fetch_ifmib "struct mibif *ifp" 91f06ca4afSHartmut Brandt.Ft int 92f06ca4afSHartmut Brandt.Fn mib_if_admin "struct mibif *ifp" "int up" 93f06ca4afSHartmut Brandt.Ft struct mibifa * 94f06ca4afSHartmut Brandt.Fn mib_find_ifa "struct in_addr ipa" 95f06ca4afSHartmut Brandt.Ft struct mibifa * 96f06ca4afSHartmut Brandt.Fn mib_first_ififa "const struct mibif *ifp" 97f06ca4afSHartmut Brandt.Ft struct mibifa * 98f06ca4afSHartmut Brandt.Fn mib_next_ififa "struct mibifa *ifa" 99f06ca4afSHartmut Brandt.Ft int 100f06ca4afSHartmut Brandt.Fn mib_ifstack_create "const struct mibif *lower" "const struct mibif *upper" 101f06ca4afSHartmut Brandt.Ft void 102f06ca4afSHartmut Brandt.Fn mib_ifstack_delete "const struct mibif *lower" "const struct mibif *upper" 103f06ca4afSHartmut Brandt.Ft struct mibrcvaddr * 104f06ca4afSHartmut Brandt.Fn mib_find_rcvaddr "u_int ifindex" "const u_char *addr" "size_t addrlen" 105f06ca4afSHartmut Brandt.Ft struct mibrcvaddr * 106f06ca4afSHartmut Brandt.Fn mib_rcvaddr_create "struct mibif *ifp" "const u_char *addr" "size_t addrlen" 107f06ca4afSHartmut Brandt.Ft void 108f06ca4afSHartmut Brandt.Fn mib_rcvaddr_delete "struct mibrcvaddr *addr" 109f06ca4afSHartmut Brandt.Ft void * 110f06ca4afSHartmut Brandt.Fn mibif_notify "struct mibif *ifp" "const struct lmodule *mod" "mibif_notify_f func" "void *uarg" 111f06ca4afSHartmut Brandt.Ft void 112f06ca4afSHartmut Brandt.Fn mibif_unnotify "void *reg" 113f06ca4afSHartmut Brandt.Sh DESCRIPTION 114f06ca4afSHartmut BrandtThe 115f06ca4afSHartmut Brandt.Nm snmp_mibII 116165c5d31SHartmut Brandtmodule implements parts of the internet standard MIB-2. 117165c5d31SHartmut BrandtMost of the relevant MIBs are implemented. 118165c5d31SHartmut BrandtSome of the tables are restricted to be read-only instead of read-write. 119165c5d31SHartmut BrandtThe exact current implementation can be found in 1208eecd77aSHartmut Brandt.Pa @DEFPATH@mibII_tree.def . 121f06ca4afSHartmut BrandtThe module also exports a number of functions and global variables for use 122165c5d31SHartmut Brandtby other modules, that need to handle network interfaces. 123165c5d31SHartmut BrandtThis man page describes these functions. 124f06ca4afSHartmut Brandt.Ss DIRECT NETWORK ACCESS 125f06ca4afSHartmut BrandtThe 126f06ca4afSHartmut Brandt.Nm 127f06ca4afSHartmut Brandtmodule opens a socket that is used to execute all network related 128f06ca4afSHartmut Brandt.Xr ioctl 2 129165c5d31SHartmut Brandtfunctions. 130165c5d31SHartmut BrandtThis socket is globally available under the name 131f06ca4afSHartmut Brandt.Va mib_netsock . 132f06ca4afSHartmut Brandt.Ss NETWORK INTERFACES 133f06ca4afSHartmut BrandtThe 134f06ca4afSHartmut Brandt.Nm 135165c5d31SHartmut Brandtmodule handles a list of all currently existing network interfaces. 136165c5d31SHartmut BrandtIt allows 137f06ca4afSHartmut Brandtother modules to handle their own interface lists with special information 138f06ca4afSHartmut Brandtby providing a mechanism to register to events that change the interface list 139165c5d31SHartmut Brandt(see below). 140165c5d31SHartmut BrandtThe basic data structure is the interface structure: 141f06ca4afSHartmut Brandt.Bd -literal -offset indent 142f06ca4afSHartmut Brandtstruct mibif { 143f06ca4afSHartmut Brandt TAILQ_ENTRY(mibif) link; 144f06ca4afSHartmut Brandt u_int flags; 145f06ca4afSHartmut Brandt u_int index; /* logical ifindex */ 146f06ca4afSHartmut Brandt u_int sysindex; 147f06ca4afSHartmut Brandt char name[IFNAMSIZ]; 148f06ca4afSHartmut Brandt char descr[256]; 149f06ca4afSHartmut Brandt struct ifmibdata mib; 15069292cedSHartmut Brandt uint64_t mibtick; 151f06ca4afSHartmut Brandt void *specmib; 152f06ca4afSHartmut Brandt size_t specmiblen; 153f06ca4afSHartmut Brandt u_char *physaddr; 154f06ca4afSHartmut Brandt u_int physaddrlen; 155f06ca4afSHartmut Brandt int has_connector; 156f06ca4afSHartmut Brandt int trap_enable; 15769292cedSHartmut Brandt uint64_t counter_disc; 158f06ca4afSHartmut Brandt mibif_notify_f xnotify; 159f06ca4afSHartmut Brandt void *xnotify_data; 160f06ca4afSHartmut Brandt const struct lmodule *xnotify_mod; 16194caccb3SHartmut Brandt struct asn_oid spec_oid; 162f06ca4afSHartmut Brandt}; 163f06ca4afSHartmut Brandt.Ed 164f06ca4afSHartmut Brandt.Pp 165f06ca4afSHartmut BrandtThe 166f06ca4afSHartmut Brandt.Nm 167f06ca4afSHartmut Brandtmodule tries to implement the semantic if 168f06ca4afSHartmut Brandt.Va ifIndex 169165c5d31SHartmut Brandtas described in RFC-2863. 170165c5d31SHartmut BrandtThis RFC states, that an interface indexes may not be reused. 171165c5d31SHartmut BrandtThat means, for example, if 172f06ca4afSHartmut Brandt.Pa tun 173f06ca4afSHartmut Brandtis a synthetic interface type and the system creates the interface 174f06ca4afSHartmut Brandt.Pa tun0 , 175f06ca4afSHartmut Brandtdestroys this interfaces and again creates a 176f06ca4afSHartmut Brandt.Pa tun 0 , 177f06ca4afSHartmut Brandtthen these interfaces must have different interface indexes, because in fact 178165c5d31SHartmut Brandtthey are different interfaces. 179165c5d31SHartmut BrandtIf, on the other hand, there is a hardware interface 180f06ca4afSHartmut Brandt.Pa xl0 181f06ca4afSHartmut Brandtand this interface disappears, because its driver is unloaded and appears 182f06ca4afSHartmut Brandtagain, because the driver is loaded again, the interface index must stay 183f06ca4afSHartmut Brandtthe same. 184f06ca4afSHartmut Brandt.Nm 185f06ca4afSHartmut Brandtimplements this by differentiating between real and synthetic (dynamic) 186165c5d31SHartmut Brandtinterfaces. 187165c5d31SHartmut BrandtAn interface type can be declared dynamic by calling the function 188f06ca4afSHartmut Brandt.Fn mib_if_set_dyn 189f06ca4afSHartmut Brandtwith the name if the interface type (for example 190f06ca4afSHartmut Brandt.Qq tun ). 191f06ca4afSHartmut BrandtFor real interfaces, the module keeps the mapping between the interface name 192f06ca4afSHartmut Brandtand its 193f06ca4afSHartmut Brandt.Va ifIndex 194165c5d31SHartmut Brandtin a special list, if the interface is unloaded. 195165c5d31SHartmut BrandtFor dynamic interfaces 196f06ca4afSHartmut Brandta new 197f06ca4afSHartmut Brandt.Va ifIndex 198165c5d31SHartmut Brandtis generated each time the interface comes into existence. 199165c5d31SHartmut BrandtThis means, that the interface index as seen by SNMP is not the same index 200165c5d31SHartmut Brandtas used by the system. 201165c5d31SHartmut BrandtThe SNMP 202f06ca4afSHartmut Brandt.Va ifIndex 203f06ca4afSHartmut Brandtis held in field 204f06ca4afSHartmut Brandt.Va index , 205f06ca4afSHartmut Brandtthe system's interface index is 206f06ca4afSHartmut Brandt.Va sysindex . 207f06ca4afSHartmut Brandt.Pp 208f06ca4afSHartmut BrandtA call to 209f06ca4afSHartmut Brandt.Nm mib_refresh_iflist 210f06ca4afSHartmut Brandtcauses the entire interface list to be re-created. 211f06ca4afSHartmut Brandt.Pp 212f06ca4afSHartmut BrandtThe interface list can be traversed with the functions 213f06ca4afSHartmut Brandt.Fn mib_first_if 214f06ca4afSHartmut Brandtand 215f06ca4afSHartmut Brandt.Fn mib_next_if . 216f06ca4afSHartmut BrandtBe sure not to change the interface list while traversing the list with 217f06ca4afSHartmut Brandtthese two calls. 218f06ca4afSHartmut Brandt.Pp 219f06ca4afSHartmut BrandtThere are three functions to find an interface by name or index. 220f06ca4afSHartmut Brandt.Fn mib_find_if 221f06ca4afSHartmut Brandtfinds an interface by searching for an SNMP 222f06ca4afSHartmut Brandt.Va ifIndex , 223f06ca4afSHartmut Brandt.Fn mib_find_if_sys 224f06ca4afSHartmut Brandtfinds an interface by searching for a system interface index and 225f06ca4afSHartmut Brandt.Fn mib_find_if_name 226165c5d31SHartmut Brandtfinds an interface by looking for an interface name. 227165c5d31SHartmut BrandtEach of the function returns 228f06ca4afSHartmut Brandt.Li NULL 229f06ca4afSHartmut Brandtif the interface cannot be found. 230f06ca4afSHartmut Brandt.Pp 231f06ca4afSHartmut BrandtThe function 232f06ca4afSHartmut Brandt.Fn mib_fetch_ifmib 233f06ca4afSHartmut Brandtcauses the interface MIB to be refreshed from the kernel. 234f06ca4afSHartmut Brandt.Pp 235f06ca4afSHartmut BrandtThe function 236f06ca4afSHartmut Brandt.Fn mib_if_admin 237f06ca4afSHartmut Brandtcan be used to change the interface administrative state to up 238f06ca4afSHartmut Brandt(argument is 1) or down (argument is 0). 239f06ca4afSHartmut Brandt.Ss INTERFACE EVENTS 240f06ca4afSHartmut BrandtA module can register itself to receive a notification when a new entry is 241165c5d31SHartmut Brandtcreated in the interface list. 242165c5d31SHartmut BrandtThis is done by calling 243f06ca4afSHartmut Brandt.Fn mib_register_newif . 244f06ca4afSHartmut BrandtA module can register only one function, a second call to 245f06ca4afSHartmut Brandt.Fn mib_register_newif 246165c5d31SHartmut Brandtcauses the registration to be overwritten. 247165c5d31SHartmut BrandtThe registration can be removed with a call to 248f06ca4afSHartmut Brandt.Fn mib_unregister_newif . 249165c5d31SHartmut BrandtIt is unregistered automatically, when the registering module is unloaded. 250f06ca4afSHartmut Brandt.Pp 251165c5d31SHartmut BrandtA module can also register to events on a specific interface. 252165c5d31SHartmut BrandtThis is done by calling 253f06ca4afSHartmut Brandt.Fn mibif_notify . 254f06ca4afSHartmut BrandtThis causes the given callback 255f06ca4afSHartmut Brandt.Fa func 256f06ca4afSHartmut Brandtto be called with the interface pointer, a notification code and 257f06ca4afSHartmut Brandtthe user argument 258f06ca4afSHartmut Brandt.Fa uarg 259f06ca4afSHartmut Brandtwhen any of the following events occur: 260f06ca4afSHartmut Brandt.Bl -tag -width "XXXXX" 261f06ca4afSHartmut Brandt.It Li MIBIF_NOTIFY_DESTROY 262f06ca4afSHartmut BrandtThe interface is destroyed. 263f06ca4afSHartmut Brandt.El 264f06ca4afSHartmut Brandt.Pp 265f06ca4afSHartmut BrandtThis mechanism can be used to implement interface type specific MIB parts 266165c5d31SHartmut Brandtin other modules. 267165c5d31SHartmut BrandtThe registration can be removed with 268f06ca4afSHartmut Brandt.Fn mib_unnotify 269f06ca4afSHartmut Brandtwhich the return value from 270f06ca4afSHartmut Brandt.Fa mib_notify . 271f06ca4afSHartmut BrandtAny notification registration is removed automatically when the interface 272f06ca4afSHartmut Brandtis destroyed or the registering module is unloaded. 273f06ca4afSHartmut Brandt.Em Note that only one module can register to any given interface . 274f06ca4afSHartmut Brandt.Ss INTERFACE ADDRESSES 275f06ca4afSHartmut BrandtThe 276f06ca4afSHartmut Brandt.Nm 277165c5d31SHartmut Brandtmodule handles a table of interface IP-addresses. 278165c5d31SHartmut BrandtThese addresses are held in a 279f06ca4afSHartmut Brandt.Bd -literal -offset indent 280f06ca4afSHartmut Brandtstruct mibifa { 281f06ca4afSHartmut Brandt TAILQ_ENTRY(mibifa) link; 282f06ca4afSHartmut Brandt struct in_addr inaddr; 283f06ca4afSHartmut Brandt struct in_addr inmask; 284f06ca4afSHartmut Brandt struct in_addr inbcast; 285f06ca4afSHartmut Brandt struct asn_oid index; 286f06ca4afSHartmut Brandt u_int ifindex; 287f06ca4afSHartmut Brandt u_int flags; 288f06ca4afSHartmut Brandt}; 289f06ca4afSHartmut Brandt.Ed 290f06ca4afSHartmut Brandt.Pp 291f06ca4afSHartmut BrandtThe (ordered) list of IP-addresses on a given interface can be traversed by 292f06ca4afSHartmut Brandtcalling 293f06ca4afSHartmut Brandt.Fn mib_first_ififa 294f06ca4afSHartmut Brandtand 295f06ca4afSHartmut Brandt.Fn mib_next_ififa . 296f06ca4afSHartmut BrandtThe list should not be considered read-only. 297f06ca4afSHartmut Brandt.Ss INTERFACE RECEIVE ADDRESSES 298165c5d31SHartmut BrandtThe internet MIB-2 contains a table of interface receive addresses. 299165c5d31SHartmut BrandtThese addresses are handled in: 300f06ca4afSHartmut Brandt.Bd -literal -offset indent 301f06ca4afSHartmut Brandtstruct mibrcvaddr { 302f06ca4afSHartmut Brandt TAILQ_ENTRY(mibrcvaddr) link; 303f06ca4afSHartmut Brandt struct asn_oid index; 304f06ca4afSHartmut Brandt u_int ifindex; 305f06ca4afSHartmut Brandt u_char addr[ASN_MAXOIDLEN]; 306f06ca4afSHartmut Brandt size_t addrlen; 307f06ca4afSHartmut Brandt u_int flags; 308f06ca4afSHartmut Brandt}; 309f06ca4afSHartmut Brandtenum { 310f06ca4afSHartmut Brandt MIBRCVADDR_VOLATILE = 0x00000001, 311f06ca4afSHartmut Brandt MIBRCVADDR_BCAST = 0x00000002, 312f06ca4afSHartmut Brandt MIBRCVADDR_HW = 0x00000004, 313f06ca4afSHartmut Brandt}; 314f06ca4afSHartmut Brandt.Ed 315f06ca4afSHartmut Brandt.Pp 316f06ca4afSHartmut BrandtNote, that the assignment of 317f06ca4afSHartmut Brandt.Li MIBRCVADDR_BCAST 318165c5d31SHartmut Brandtis based on a list of known interface types. 319165c5d31SHartmut BrandtThe flags should be handled 320165c5d31SHartmut Brandtby modules implementing interface type specific MIBs. 321f06ca4afSHartmut Brandt.Pp 322f06ca4afSHartmut BrandtA receive address can be created with 323f06ca4afSHartmut Brandt.Fn mib_rcvaddr_create 324f06ca4afSHartmut Brandtand deleted with 325f06ca4afSHartmut Brandt.Fn mib_rcvaddr_delete . 326f06ca4afSHartmut BrandtThis needs to be done only for addresses that are not automatically handled 327f06ca4afSHartmut Brandtby the system. 328f06ca4afSHartmut Brandt.Pp 329f06ca4afSHartmut BrandtA receive address can be found with 330f06ca4afSHartmut Brandt.Fn mib_find_rcvaddr . 331f06ca4afSHartmut Brandt.Ss INTERFACE STACK TABLE 332f06ca4afSHartmut BrandtThe 333f06ca4afSHartmut Brandt.Nm 334165c5d31SHartmut Brandtmodule maintains also the interface stack table. 335165c5d31SHartmut BrandtBecause for complex stacks, 336f06ca4afSHartmut Brandtthere is no system supported generic way of getting this information, interface 337165c5d31SHartmut Brandttype specific modules need to help setting up stack entries. 338165c5d31SHartmut BrandtThe 339f06ca4afSHartmut Brandt.Nm 340f06ca4afSHartmut Brandtmodule handles only the top and bottom entries. 341f06ca4afSHartmut Brandt.Pp 342f06ca4afSHartmut BrandtA table entry is created with 343f06ca4afSHartmut Brandt.Fn mib_ifstack_create 344f06ca4afSHartmut Brandtand deleted with 345f06ca4afSHartmut Brandt.Fn mib_ifstack_delete . 346165c5d31SHartmut BrandtBoth functions need the pointers to the interfaces. 347165c5d31SHartmut BrandtEntries are automatically 348165c5d31SHartmut Brandtdeleted if any of the interfaces of the entry is destroyed. 349165c5d31SHartmut BrandtThe functions handle 350f06ca4afSHartmut Brandtboth the stack table and the reverse stack table. 351f06ca4afSHartmut Brandt.Sh FILES 3528eecd77aSHartmut Brandt.Bl -tag -width ".It Pa @DEFPATH@mibII_tree.def" -compact 3538eecd77aSHartmut Brandt.It Pa @DEFPATH@mibII_tree.def 354f06ca4afSHartmut BrandtThe description of the MIB tree implemented by 355f06ca4afSHartmut Brandt.Nm . 356f06ca4afSHartmut Brandt.It Pa /usr/local/share/snmp/mibs 3578eecd77aSHartmut Brandt.It Pa @MIBSPATH@ 358f06ca4afSHartmut BrandtThe various internet MIBs. 35994caccb3SHartmut Brandt.El 360f06ca4afSHartmut Brandt.Sh SEE ALSO 36194caccb3SHartmut Brandt.Xr gensnmptree 1 , 36294caccb3SHartmut Brandt.Xr snmpmod 3 363f06ca4afSHartmut Brandt.Sh STANDARDS 364f06ca4afSHartmut BrandtThis implementation conforms to the applicable IETF RFCs. 365f06ca4afSHartmut Brandt.Sh AUTHORS 3668eecd77aSHartmut Brandt.An Hartmut Brandt Aq harti@freebsd.org 367