summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHartmut Brandt <harti@FreeBSD.org>2004-01-23 16:22:49 +0000
committerHartmut Brandt <harti@FreeBSD.org>2004-01-23 16:22:49 +0000
commitb6a6dd1872dacca58f52be00781ccb3af7f8824d (patch)
tree65a1aa99775b9ea5784447cd9891cbd7d34bf1f2
parent12b8b80e456e7138e3bbe87f021e7c38e1184da0 (diff)
Notes
-rw-r--r--Makefile.inc15
-rw-r--r--lib/libbsnmp/modules/Makefile.inc12
-rw-r--r--lib/libbsnmp/modules/snmp_mibII/Makefile2
-rw-r--r--lib/libbsnmp/modules/snmp_mibII/genfiles20
-rw-r--r--lib/libbsnmp/modules/snmp_mibII/mibII_oid.h35
-rw-r--r--lib/libbsnmp/modules/snmp_mibII/mibII_tree.c154
-rw-r--r--lib/libbsnmp/modules/snmp_mibII/mibII_tree.h163
-rw-r--r--lib/libbsnmp/modules/snmp_netgraph/Makefile1
-rw-r--r--lib/libbsnmp/modules/snmp_netgraph/genfiles17
-rw-r--r--lib/libbsnmp/modules/snmp_netgraph/netgraph_oid.h5
-rw-r--r--lib/libbsnmp/modules/snmp_netgraph/netgraph_tree.c30
-rw-r--r--lib/libbsnmp/modules/snmp_netgraph/netgraph_tree.h27
-rw-r--r--usr.sbin/bsnmpd/bsnmpd/Makefile31
-rw-r--r--usr.sbin/bsnmpd/bsnmpd/genfiles21
-rw-r--r--usr.sbin/bsnmpd/bsnmpd/oid.h35
-rw-r--r--usr.sbin/bsnmpd/bsnmpd/tree.c56
-rw-r--r--usr.sbin/bsnmpd/bsnmpd/tree.h61
-rw-r--r--usr.sbin/bsnmpd/modules/Makefile.inc12
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_mibII/Makefile2
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile1
20 files changed, 50 insertions, 640 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 64412aa8b33f8..a32a89ec5d7e3 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -647,6 +647,10 @@ _yacc= usr.bin/yacc
_crunchgen= usr.sbin/crunch/crunchgen
.endif
+.if ${BOOTSTRAPPING} < 501114
+_gensnmptree= usr.sbin/bsnmpd/gensnmptree
+.endif
+
.if ${BOOTSTRAPPING} < 500019
_kbdcontrol= usr.sbin/kbdcontrol
.endif
@@ -667,6 +671,7 @@ bootstrap-tools:
${_yacc} \
usr.sbin/config \
${_crunchgen} \
+ ${_gensnmptree} \
${_kbdcontrol}
@${ECHODIR} "===> ${_tool}"; \
cd ${.CURDIR}/${_tool}; \
diff --git a/lib/libbsnmp/modules/Makefile.inc b/lib/libbsnmp/modules/Makefile.inc
index aa49857c65e12..ebeb521bcb3ee 100644
--- a/lib/libbsnmp/modules/Makefile.inc
+++ b/lib/libbsnmp/modules/Makefile.inc
@@ -1,8 +1,16 @@
# $FreeBSD$
SHLIB_NAME= snmp_${MOD}.so.${SHLIB_MAJOR}
-SRCS+= ${MOD}_tree.c
-CFLAGS+= -I${CONTRIB}/lib -I${CONTRIB}/snmpd -I${.CURDIR}
+SRCS+= ${MOD}_oid.h ${MOD}_tree.c ${MOD}_tree.h
+CLEANFILES+= ${MOD}_oid.h ${MOD}_tree.c ${MOD}_tree.h
+CFLAGS+= -I${CONTRIB}/lib -I${CONTRIB}/snmpd -I.
+
+${MOD}_oid.h: ${MOD}_tree.def
+ gensnmptree -e ${XSYM} < ${.ALLSRC} > ${.TARGET}
+
+.ORDER: ${MOD}_tree.c ${MOD}_tree.h
+${MOD}_tree.c ${MOD}_tree.h: ${MOD}_tree.def
+ gensnmptree -l -p ${MOD}_ < ${.ALLSRC}
.if defined(DEFS)
FILESGROUPS+= DEFS
diff --git a/lib/libbsnmp/modules/snmp_mibII/Makefile b/lib/libbsnmp/modules/snmp_mibII/Makefile
index 7215880d1ab17..c677c533ef356 100644
--- a/lib/libbsnmp/modules/snmp_mibII/Makefile
+++ b/lib/libbsnmp/modules/snmp_mibII/Makefile
@@ -9,6 +9,8 @@ MOD= mibII
SRCS= mibII.c mibII_ifmib.c mibII_ip.c mibII_interfaces.c \
mibII_ipaddr.c mibII_ifstack.c mibII_rcvaddr.c \
mibII_nettomedia.c mibII_tcp.c mibII_udp.c mibII_route.c
+XSYM= ipAddrTable ifTable ifRcvAddressEntry ifMIB ipMIB tcpMIB udpMIB \
+ ipForward ifIndex linkDown linkUp
MAN= snmp_mibII.3
DEFS= ${MOD}_tree.def
diff --git a/lib/libbsnmp/modules/snmp_mibII/genfiles b/lib/libbsnmp/modules/snmp_mibII/genfiles
deleted file mode 100644
index b797670a407ae..0000000000000
--- a/lib/libbsnmp/modules/snmp_mibII/genfiles
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-# $FreeBSD$
-
-CONTRIB="../../../../contrib/bsnmp/snmp_mibII"
-
-XSYM="ipAddrTable ifTable ifRcvAddressEntry ifMIB ipMIB tcpMIB udpMIB \
- ipForward ifIndex linkDown linkUp"
-
-gensnmptree <${CONTRIB}/mibII_tree.def -e ${XSYM} >mibII_oid.h
-gensnmptree <${CONTRIB}/mibII_tree.def -l -p mibII_
-
-for i in mibII_tree.h mibII_tree.c mibII_oid.h ; do
- ex $i <<'EOF'
-0a
-/* $FreeBSD$ */
-/* generated file, don't edit - use ./genfiles */
-.
-wq
-EOF
-done
diff --git a/lib/libbsnmp/modules/snmp_mibII/mibII_oid.h b/lib/libbsnmp/modules/snmp_mibII/mibII_oid.h
deleted file mode 100644
index 301f900ef1674..0000000000000
--- a/lib/libbsnmp/modules/snmp_mibII/mibII_oid.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* $FreeBSD$ */
-/* generated file, don't edit - use ./genfiles */
-#define OID_ipAddrTable 20
-#define OIDLEN_ipAddrTable 8
-#define OIDX_ipAddrTable { 8, { 1, 3, 6, 1, 2, 1, 4, 20, } }
-#define OID_ifTable 2
-#define OIDLEN_ifTable 8
-#define OIDX_ifTable { 8, { 1, 3, 6, 1, 2, 1, 2, 2, } }
-#define OID_ifRcvAddressEntry 1
-#define OIDLEN_ifRcvAddressEntry 10
-#define OIDX_ifRcvAddressEntry { 10, { 1, 3, 6, 1, 2, 1, 31, 1, 4, 1, } }
-#define OID_ifMIB 31
-#define OIDLEN_ifMIB 7
-#define OIDX_ifMIB { 7, { 1, 3, 6, 1, 2, 1, 31, } }
-#define OID_ipMIB 48
-#define OIDLEN_ipMIB 7
-#define OIDX_ipMIB { 7, { 1, 3, 6, 1, 2, 1, 48, } }
-#define OID_tcpMIB 49
-#define OIDLEN_tcpMIB 7
-#define OIDX_tcpMIB { 7, { 1, 3, 6, 1, 2, 1, 49, } }
-#define OID_udpMIB 50
-#define OIDLEN_udpMIB 7
-#define OIDX_udpMIB { 7, { 1, 3, 6, 1, 2, 1, 50, } }
-#define OID_ipForward 24
-#define OIDLEN_ipForward 8
-#define OIDX_ipForward { 8, { 1, 3, 6, 1, 2, 1, 4, 24, } }
-#define OID_ifIndex 1
-#define OIDLEN_ifIndex 10
-#define OIDX_ifIndex { 10, { 1, 3, 6, 1, 2, 1, 2, 2, 1, 1, } }
-#define OID_linkDown 3
-#define OIDLEN_linkDown 10
-#define OIDX_linkDown { 10, { 1, 3, 6, 1, 6, 3, 1, 1, 5, 3, } }
-#define OID_linkUp 4
-#define OIDLEN_linkUp 10
-#define OIDX_linkUp { 10, { 1, 3, 6, 1, 6, 3, 1, 1, 5, 4, } }
diff --git a/lib/libbsnmp/modules/snmp_mibII/mibII_tree.c b/lib/libbsnmp/modules/snmp_mibII/mibII_tree.c
deleted file mode 100644
index 3d8ecc8e65f02..0000000000000
--- a/lib/libbsnmp/modules/snmp_mibII/mibII_tree.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/* $FreeBSD$ */
-/* generated file, don't edit - use ./genfiles */
-#include <sys/types.h>
-#include <stdio.h>
-#include "asn1.h"
-#include "snmp.h"
-#include "snmpagent.h"
-#include "mibII_tree.h"
-
-const struct snmp_node mibII_ctree[] = {
- {{ 8, { 1, 3, 6, 1, 2, 1, 2, 1, }}, "ifNumber", SNMP_NODE_LEAF, SNMP_SYNTAX_INTEGER, op_interfaces, 0, 0, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 2, 2, 1, 1, }}, "ifIndex", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_ifentry, 0, 0x11, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 2, 2, 1, 2, }}, "ifDescr", SNMP_NODE_COLUMN, SNMP_SYNTAX_OCTETSTRING, op_ifentry, 0, 0x11, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 2, 2, 1, 3, }}, "ifType", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_ifentry, 0, 0x11, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 2, 2, 1, 4, }}, "ifMtu", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_ifentry, 0, 0x11, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 2, 2, 1, 5, }}, "ifSpeed", SNMP_NODE_COLUMN, SNMP_SYNTAX_GAUGE, op_ifentry, 0, 0x11, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 2, 2, 1, 6, }}, "ifPhysAddress", SNMP_NODE_COLUMN, SNMP_SYNTAX_OCTETSTRING, op_ifentry, 0, 0x11, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 2, 2, 1, 7, }}, "ifAdminStatus", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_ifentry, 0|SNMP_NODE_CANSET, 0x11, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 2, 2, 1, 8, }}, "ifOperStatus", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_ifentry, 0, 0x11, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 2, 2, 1, 9, }}, "ifLastChange", SNMP_NODE_COLUMN, SNMP_SYNTAX_TIMETICKS, op_ifentry, 0, 0x11, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 2, 2, 1, 10, }}, "ifInOctets", SNMP_NODE_COLUMN, SNMP_SYNTAX_COUNTER, op_ifentry, 0, 0x11, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 2, 2, 1, 11, }}, "ifInUcastPkts", SNMP_NODE_COLUMN, SNMP_SYNTAX_COUNTER, op_ifentry, 0, 0x11, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 2, 2, 1, 12, }}, "ifInNUcastPkts", SNMP_NODE_COLUMN, SNMP_SYNTAX_COUNTER, op_ifentry, 0, 0x11, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 2, 2, 1, 13, }}, "ifInDiscards", SNMP_NODE_COLUMN, SNMP_SYNTAX_COUNTER, op_ifentry, 0, 0x11, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 2, 2, 1, 14, }}, "ifInErrors", SNMP_NODE_COLUMN, SNMP_SYNTAX_COUNTER, op_ifentry, 0, 0x11, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 2, 2, 1, 15, }}, "ifInUnknownProtos", SNMP_NODE_COLUMN, SNMP_SYNTAX_COUNTER, op_ifentry, 0, 0x11, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 2, 2, 1, 16, }}, "ifOutOctets", SNMP_NODE_COLUMN, SNMP_SYNTAX_COUNTER, op_ifentry, 0, 0x11, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 2, 2, 1, 17, }}, "ifOutUcastPkts", SNMP_NODE_COLUMN, SNMP_SYNTAX_COUNTER, op_ifentry, 0, 0x11, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 2, 2, 1, 18, }}, "ifOutNUcastPkts", SNMP_NODE_COLUMN, SNMP_SYNTAX_COUNTER, op_ifentry, 0, 0x11, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 2, 2, 1, 19, }}, "ifOutDiscards", SNMP_NODE_COLUMN, SNMP_SYNTAX_COUNTER, op_ifentry, 0, 0x11, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 2, 2, 1, 20, }}, "ifOutErrors", SNMP_NODE_COLUMN, SNMP_SYNTAX_COUNTER, op_ifentry, 0, 0x11, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 2, 2, 1, 21, }}, "ifOutQLen", SNMP_NODE_COLUMN, SNMP_SYNTAX_GAUGE, op_ifentry, 0, 0x11, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 2, 2, 1, 22, }}, "ifSpecific", SNMP_NODE_COLUMN, SNMP_SYNTAX_OID, op_ifentry, 0, 0x11, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 4, 1, }}, "ipForwarding", SNMP_NODE_LEAF, SNMP_SYNTAX_INTEGER, op_ip, 0|SNMP_NODE_CANSET, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 4, 2, }}, "ipDefaultTTL", SNMP_NODE_LEAF, SNMP_SYNTAX_INTEGER, op_ip, 0|SNMP_NODE_CANSET, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 4, 3, }}, "ipInReceives", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_ipstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 4, 4, }}, "ipInHdrErrors", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_ipstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 4, 5, }}, "ipInAddrErrors", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_ipstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 4, 6, }}, "ipForwDatagrams", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_ipstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 4, 7, }}, "ipInUnknownProtos", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_ipstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 4, 8, }}, "ipInDiscards", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_ipstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 4, 9, }}, "ipInDelivers", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_ipstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 4, 10, }}, "ipOutRequests", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_ipstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 4, 11, }}, "ipOutDiscards", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_ipstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 4, 12, }}, "ipOutNoRoutes", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_ipstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 4, 13, }}, "ipReasmTimeout", SNMP_NODE_LEAF, SNMP_SYNTAX_INTEGER, op_ipstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 4, 14, }}, "ipReasmReqds", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_ipstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 4, 15, }}, "ipReasmOKs", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_ipstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 4, 16, }}, "ipReasmFails", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_ipstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 4, 17, }}, "ipFragOKs", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_ipstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 4, 18, }}, "ipFragFails", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_ipstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 4, 19, }}, "ipFragCreates", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_ipstat, 0, 0, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 4, 20, 1, 1, }}, "ipAdEntAddr", SNMP_NODE_COLUMN, SNMP_SYNTAX_IPADDRESS, op_ipaddr, 0, 0x41, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 4, 20, 1, 2, }}, "ipAdEntIfIndex", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_ipaddr, 0|SNMP_NODE_CANSET, 0x41, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 4, 20, 1, 3, }}, "ipAdEntNetMask", SNMP_NODE_COLUMN, SNMP_SYNTAX_IPADDRESS, op_ipaddr, 0|SNMP_NODE_CANSET, 0x41, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 4, 20, 1, 4, }}, "ipAdEntBcastAddr", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_ipaddr, 0|SNMP_NODE_CANSET, 0x41, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 4, 20, 1, 5, }}, "ipAdEntReasmMaxSize", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_ipaddr, 0, 0x41, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 4, 22, 1, 1, }}, "ipNetToMediaIfIndex", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_nettomedia, 0, 0x412, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 4, 22, 1, 2, }}, "ipNetToMediaPhysAddress", SNMP_NODE_COLUMN, SNMP_SYNTAX_OCTETSTRING, op_nettomedia, 0, 0x412, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 4, 22, 1, 3, }}, "ipNetToMediaNetAddress", SNMP_NODE_COLUMN, SNMP_SYNTAX_IPADDRESS, op_nettomedia, 0, 0x412, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 4, 22, 1, 4, }}, "ipNetToMediaType", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_nettomedia, 0, 0x412, NULL },
- {{ 9, { 1, 3, 6, 1, 2, 1, 4, 24, 3, }}, "ipCidrRouteNumber", SNMP_NODE_LEAF, SNMP_SYNTAX_GAUGE, op_route, 0, 0, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 4, 24, 4, 1, 1, }}, "ipCidrRouteDest", SNMP_NODE_COLUMN, SNMP_SYNTAX_IPADDRESS, op_route_table, 0, 0x41444, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 4, 24, 4, 1, 2, }}, "ipCidrRouteMask", SNMP_NODE_COLUMN, SNMP_SYNTAX_IPADDRESS, op_route_table, 0, 0x41444, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 4, 24, 4, 1, 3, }}, "ipCidrRouteTos", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_route_table, 0, 0x41444, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 4, 24, 4, 1, 4, }}, "ipCidrRouteNextHop", SNMP_NODE_COLUMN, SNMP_SYNTAX_IPADDRESS, op_route_table, 0, 0x41444, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 4, 24, 4, 1, 5, }}, "ipCidrRouteIfIndex", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_route_table, 0, 0x41444, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 4, 24, 4, 1, 6, }}, "ipCidrRouteType", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_route_table, 0, 0x41444, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 4, 24, 4, 1, 7, }}, "ipCidrRouteProto", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_route_table, 0, 0x41444, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 4, 24, 4, 1, 8, }}, "ipCidrRouteAge", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_route_table, 0, 0x41444, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 4, 24, 4, 1, 9, }}, "ipCidrRouteInfo", SNMP_NODE_COLUMN, SNMP_SYNTAX_OID, op_route_table, 0, 0x41444, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 4, 24, 4, 1, 10, }}, "ipCidrRouteNextHopAS", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_route_table, 0, 0x41444, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 4, 24, 4, 1, 11, }}, "ipCidrRouteMetric1", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_route_table, 0, 0x41444, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 4, 24, 4, 1, 12, }}, "ipCidrRouteMetric2", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_route_table, 0, 0x41444, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 4, 24, 4, 1, 13, }}, "ipCidrRouteMetric3", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_route_table, 0, 0x41444, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 4, 24, 4, 1, 14, }}, "ipCidrRouteMetric4", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_route_table, 0, 0x41444, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 4, 24, 4, 1, 15, }}, "ipCidrRouteMetric5", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_route_table, 0, 0x41444, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 4, 24, 4, 1, 16, }}, "ipCidrRouteStatus", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_route_table, 0, 0x41444, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 1, }}, "icmpInMsgs", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 2, }}, "icmpInErrors", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 3, }}, "icmpInDestUnreachs", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 4, }}, "icmpInTimeExcds", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 5, }}, "icmpInParmProbs", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 6, }}, "icmpInSrcQuenchs", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 7, }}, "icmpInRedirects", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 8, }}, "icmpInEchos", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 9, }}, "icmpInEchoReps", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 10, }}, "icmpInTimestamps", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 11, }}, "icmpInTimestampReps", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 12, }}, "icmpInAddrMasks", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 13, }}, "icmpInAddrMaskReps", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 14, }}, "icmpOutMsgs", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 15, }}, "icmpOutErrors", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 16, }}, "icmpOutDestUnreachs", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 17, }}, "icmpOutTimeExcds", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 18, }}, "icmpOutParmProbs", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 19, }}, "icmpOutSrcQuenchs", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 20, }}, "icmpOutRedirects", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 21, }}, "icmpOutEchos", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 22, }}, "icmpOutEchoReps", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 23, }}, "icmpOutTimestamps", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 24, }}, "icmpOutTimestampReps", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 25, }}, "icmpOutAddrMasks", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 5, 26, }}, "icmpOutAddrMaskReps", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_icmpstat, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 6, 1, }}, "tcpRtoAlgorithm", SNMP_NODE_LEAF, SNMP_SYNTAX_INTEGER, op_tcp, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 6, 2, }}, "tcpRtoMin", SNMP_NODE_LEAF, SNMP_SYNTAX_INTEGER, op_tcp, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 6, 3, }}, "tcpRtoMax", SNMP_NODE_LEAF, SNMP_SYNTAX_INTEGER, op_tcp, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 6, 4, }}, "tcpMaxConn", SNMP_NODE_LEAF, SNMP_SYNTAX_INTEGER, op_tcp, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 6, 5, }}, "tcpActiveOpens", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_tcp, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 6, 6, }}, "tcpPassiveOpens", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_tcp, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 6, 7, }}, "tcpAttemptFails", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_tcp, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 6, 8, }}, "tcpEstabResets", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_tcp, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 6, 9, }}, "tcpCurrEstab", SNMP_NODE_LEAF, SNMP_SYNTAX_GAUGE, op_tcp, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 6, 10, }}, "tcpInSegs", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_tcp, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 6, 11, }}, "tcpOutSegs", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_tcp, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 6, 12, }}, "tcpRetransSegs", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_tcp, 0, 0, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 6, 13, 1, 1, }}, "tcpConnState", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_tcpconn, 0, 0x14144, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 6, 13, 1, 2, }}, "tcpConnLocalAddress", SNMP_NODE_COLUMN, SNMP_SYNTAX_IPADDRESS, op_tcpconn, 0, 0x14144, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 6, 13, 1, 3, }}, "tcpConnLocalPort", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_tcpconn, 0, 0x14144, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 6, 13, 1, 4, }}, "tcpConnRemAddress", SNMP_NODE_COLUMN, SNMP_SYNTAX_IPADDRESS, op_tcpconn, 0, 0x14144, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 6, 13, 1, 5, }}, "tcpConnRemPort", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_tcpconn, 0, 0x14144, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 6, 14, }}, "tcpInErrs", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_tcp, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 7, 1, }}, "udpInDatagrams", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_udp, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 7, 2, }}, "udpNoPorts", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_udp, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 7, 3, }}, "udpInErrors", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_udp, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 7, 4, }}, "udpOutDatagrams", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_udp, 0, 0, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 7, 5, 1, 1, }}, "udpLocalAddress", SNMP_NODE_COLUMN, SNMP_SYNTAX_IPADDRESS, op_udptable, 0, 0x142, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 7, 5, 1, 2, }}, "udpLocalPort", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_udptable, 0, 0x142, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 1, }}, "ifName", SNMP_NODE_COLUMN, SNMP_SYNTAX_OCTETSTRING, op_ifxtable, 0, 0x11, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 2, }}, "ifInMulticastPkts", SNMP_NODE_COLUMN, SNMP_SYNTAX_COUNTER, op_ifxtable, 0, 0x11, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 3, }}, "ifInBroadcastPkts", SNMP_NODE_COLUMN, SNMP_SYNTAX_COUNTER, op_ifxtable, 0, 0x11, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 4, }}, "ifOutMulticastPkts", SNMP_NODE_COLUMN, SNMP_SYNTAX_COUNTER, op_ifxtable, 0, 0x11, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 5, }}, "ifOutBroadcastPkts", SNMP_NODE_COLUMN, SNMP_SYNTAX_COUNTER, op_ifxtable, 0, 0x11, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 6, }}, "ifHCInOctets", SNMP_NODE_COLUMN, SNMP_SYNTAX_COUNTER64, op_ifxtable, 0, 0x11, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 7, }}, "ifHCInUcastPkts", SNMP_NODE_COLUMN, SNMP_SYNTAX_COUNTER64, op_ifxtable, 0, 0x11, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 8, }}, "ifHCInMulticastPkts", SNMP_NODE_COLUMN, SNMP_SYNTAX_COUNTER64, op_ifxtable, 0, 0x11, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 9, }}, "ifHCInBroadcastPkts", SNMP_NODE_COLUMN, SNMP_SYNTAX_COUNTER64, op_ifxtable, 0, 0x11, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 10, }}, "ifHCOutOctets", SNMP_NODE_COLUMN, SNMP_SYNTAX_COUNTER64, op_ifxtable, 0, 0x11, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 11, }}, "ifHCOutUcastPkts", SNMP_NODE_COLUMN, SNMP_SYNTAX_COUNTER64, op_ifxtable, 0, 0x11, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 12, }}, "ifHCOutMulticastPkts", SNMP_NODE_COLUMN, SNMP_SYNTAX_COUNTER64, op_ifxtable, 0, 0x11, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 13, }}, "ifHCOutBroadcastPkts", SNMP_NODE_COLUMN, SNMP_SYNTAX_COUNTER64, op_ifxtable, 0, 0x11, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 14, }}, "ifLinkUpDownTrapEnable", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_ifxtable, 0|SNMP_NODE_CANSET, 0x11, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 15, }}, "ifHighSpeed", SNMP_NODE_COLUMN, SNMP_SYNTAX_GAUGE, op_ifxtable, 0, 0x11, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 16, }}, "ifPromiscuousMode", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_ifxtable, 0|SNMP_NODE_CANSET, 0x11, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 17, }}, "ifConnectorPresent", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_ifxtable, 0, 0x11, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 18, }}, "ifAlias", SNMP_NODE_COLUMN, SNMP_SYNTAX_OCTETSTRING, op_ifxtable, 0, 0x11, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 19, }}, "ifCounterDiscontinuityTime", SNMP_NODE_COLUMN, SNMP_SYNTAX_TIMETICKS, op_ifxtable, 0, 0x11, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 31, 1, 2, 1, 3, }}, "ifStackStatus", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_ifstack, 0, 0x112, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 31, 1, 4, 1, 2, }}, "ifRcvAddressStatus", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_rcvaddr, 0, 0x212, NULL },
- {{ 11, { 1, 3, 6, 1, 2, 1, 31, 1, 4, 1, 3, }}, "ifRcvAddressType", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_rcvaddr, 0, 0x212, NULL },
- {{ 9, { 1, 3, 6, 1, 2, 1, 31, 1, 5, }}, "ifTableLastChange", SNMP_NODE_LEAF, SNMP_SYNTAX_TIMETICKS, op_ifmib, 0, 0, NULL },
- {{ 9, { 1, 3, 6, 1, 2, 1, 31, 1, 6, }}, "ifStackLastChange", SNMP_NODE_LEAF, SNMP_SYNTAX_TIMETICKS, op_ifmib, 0, 0, NULL },
-};
-
diff --git a/lib/libbsnmp/modules/snmp_mibII/mibII_tree.h b/lib/libbsnmp/modules/snmp_mibII/mibII_tree.h
deleted file mode 100644
index e19ac3c4d6ba5..0000000000000
--- a/lib/libbsnmp/modules/snmp_mibII/mibII_tree.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/* $FreeBSD$ */
-/* generated file, don't edit - use ./genfiles */
-int op_interfaces(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_ifNumber 1
-int op_ifentry(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_ifIndex 1
-# define LEAF_ifDescr 2
-# define LEAF_ifType 3
-# define LEAF_ifMtu 4
-# define LEAF_ifSpeed 5
-# define LEAF_ifPhysAddress 6
-# define LEAF_ifAdminStatus 7
-# define LEAF_ifOperStatus 8
-# define LEAF_ifLastChange 9
-# define LEAF_ifInOctets 10
-# define LEAF_ifInUcastPkts 11
-# define LEAF_ifInNUcastPkts 12
-# define LEAF_ifInDiscards 13
-# define LEAF_ifInErrors 14
-# define LEAF_ifInUnknownProtos 15
-# define LEAF_ifOutOctets 16
-# define LEAF_ifOutUcastPkts 17
-# define LEAF_ifOutNUcastPkts 18
-# define LEAF_ifOutDiscards 19
-# define LEAF_ifOutErrors 20
-# define LEAF_ifOutQLen 21
-# define LEAF_ifSpecific 22
-int op_ip(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_ipForwarding 1
-# define LEAF_ipDefaultTTL 2
-int op_ipstat(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_ipInReceives 3
-# define LEAF_ipInHdrErrors 4
-# define LEAF_ipInAddrErrors 5
-# define LEAF_ipForwDatagrams 6
-# define LEAF_ipInUnknownProtos 7
-# define LEAF_ipInDiscards 8
-# define LEAF_ipInDelivers 9
-# define LEAF_ipOutRequests 10
-# define LEAF_ipOutDiscards 11
-# define LEAF_ipOutNoRoutes 12
-# define LEAF_ipReasmTimeout 13
-# define LEAF_ipReasmReqds 14
-# define LEAF_ipReasmOKs 15
-# define LEAF_ipReasmFails 16
-# define LEAF_ipFragOKs 17
-# define LEAF_ipFragFails 18
-# define LEAF_ipFragCreates 19
-int op_ipaddr(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_ipAdEntAddr 1
-# define LEAF_ipAdEntIfIndex 2
-# define LEAF_ipAdEntNetMask 3
-# define LEAF_ipAdEntBcastAddr 4
-# define LEAF_ipAdEntReasmMaxSize 5
-int op_nettomedia(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_ipNetToMediaIfIndex 1
-# define LEAF_ipNetToMediaPhysAddress 2
-# define LEAF_ipNetToMediaNetAddress 3
-# define LEAF_ipNetToMediaType 4
-int op_route(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_ipCidrRouteNumber 3
-int op_route_table(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_ipCidrRouteDest 1
-# define LEAF_ipCidrRouteMask 2
-# define LEAF_ipCidrRouteTos 3
-# define LEAF_ipCidrRouteNextHop 4
-# define LEAF_ipCidrRouteIfIndex 5
-# define LEAF_ipCidrRouteType 6
-# define LEAF_ipCidrRouteProto 7
-# define LEAF_ipCidrRouteAge 8
-# define LEAF_ipCidrRouteInfo 9
-# define LEAF_ipCidrRouteNextHopAS 10
-# define LEAF_ipCidrRouteMetric1 11
-# define LEAF_ipCidrRouteMetric2 12
-# define LEAF_ipCidrRouteMetric3 13
-# define LEAF_ipCidrRouteMetric4 14
-# define LEAF_ipCidrRouteMetric5 15
-# define LEAF_ipCidrRouteStatus 16
-int op_icmpstat(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_icmpInMsgs 1
-# define LEAF_icmpInErrors 2
-# define LEAF_icmpInDestUnreachs 3
-# define LEAF_icmpInTimeExcds 4
-# define LEAF_icmpInParmProbs 5
-# define LEAF_icmpInSrcQuenchs 6
-# define LEAF_icmpInRedirects 7
-# define LEAF_icmpInEchos 8
-# define LEAF_icmpInEchoReps 9
-# define LEAF_icmpInTimestamps 10
-# define LEAF_icmpInTimestampReps 11
-# define LEAF_icmpInAddrMasks 12
-# define LEAF_icmpInAddrMaskReps 13
-# define LEAF_icmpOutMsgs 14
-# define LEAF_icmpOutErrors 15
-# define LEAF_icmpOutDestUnreachs 16
-# define LEAF_icmpOutTimeExcds 17
-# define LEAF_icmpOutParmProbs 18
-# define LEAF_icmpOutSrcQuenchs 19
-# define LEAF_icmpOutRedirects 20
-# define LEAF_icmpOutEchos 21
-# define LEAF_icmpOutEchoReps 22
-# define LEAF_icmpOutTimestamps 23
-# define LEAF_icmpOutTimestampReps 24
-# define LEAF_icmpOutAddrMasks 25
-# define LEAF_icmpOutAddrMaskReps 26
-int op_tcp(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_tcpRtoAlgorithm 1
-# define LEAF_tcpRtoMin 2
-# define LEAF_tcpRtoMax 3
-# define LEAF_tcpMaxConn 4
-# define LEAF_tcpActiveOpens 5
-# define LEAF_tcpPassiveOpens 6
-# define LEAF_tcpAttemptFails 7
-# define LEAF_tcpEstabResets 8
-# define LEAF_tcpCurrEstab 9
-# define LEAF_tcpInSegs 10
-# define LEAF_tcpOutSegs 11
-# define LEAF_tcpRetransSegs 12
-int op_tcpconn(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_tcpConnState 1
-# define LEAF_tcpConnLocalAddress 2
-# define LEAF_tcpConnLocalPort 3
-# define LEAF_tcpConnRemAddress 4
-# define LEAF_tcpConnRemPort 5
-# define LEAF_tcpInErrs 14
-int op_udp(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_udpInDatagrams 1
-# define LEAF_udpNoPorts 2
-# define LEAF_udpInErrors 3
-# define LEAF_udpOutDatagrams 4
-int op_udptable(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_udpLocalAddress 1
-# define LEAF_udpLocalPort 2
-int op_ifxtable(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_ifName 1
-# define LEAF_ifInMulticastPkts 2
-# define LEAF_ifInBroadcastPkts 3
-# define LEAF_ifOutMulticastPkts 4
-# define LEAF_ifOutBroadcastPkts 5
-# define LEAF_ifHCInOctets 6
-# define LEAF_ifHCInUcastPkts 7
-# define LEAF_ifHCInMulticastPkts 8
-# define LEAF_ifHCInBroadcastPkts 9
-# define LEAF_ifHCOutOctets 10
-# define LEAF_ifHCOutUcastPkts 11
-# define LEAF_ifHCOutMulticastPkts 12
-# define LEAF_ifHCOutBroadcastPkts 13
-# define LEAF_ifLinkUpDownTrapEnable 14
-# define LEAF_ifHighSpeed 15
-# define LEAF_ifPromiscuousMode 16
-# define LEAF_ifConnectorPresent 17
-# define LEAF_ifAlias 18
-# define LEAF_ifCounterDiscontinuityTime 19
-int op_ifstack(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_ifStackStatus 3
-int op_rcvaddr(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_ifRcvAddressStatus 2
-# define LEAF_ifRcvAddressType 3
-int op_ifmib(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_ifTableLastChange 5
-# define LEAF_ifStackLastChange 6
-#define mibII_CTREE_SIZE 142
-extern const struct snmp_node mibII_ctree[];
diff --git a/lib/libbsnmp/modules/snmp_netgraph/Makefile b/lib/libbsnmp/modules/snmp_netgraph/Makefile
index 3760c5df0c9cc..6c3cfb49ab53a 100644
--- a/lib/libbsnmp/modules/snmp_netgraph/Makefile
+++ b/lib/libbsnmp/modules/snmp_netgraph/Makefile
@@ -6,6 +6,7 @@ CONTRIB=${.CURDIR}/../../../../contrib/bsnmp
MOD= netgraph
SRCS= snmp_netgraph.c
+XSYM= begemotNg
MAN= snmp_netgraph.3
MIBS= BEGEMOT-NETGRAPH.txt
diff --git a/lib/libbsnmp/modules/snmp_netgraph/genfiles b/lib/libbsnmp/modules/snmp_netgraph/genfiles
deleted file mode 100644
index b92a39228eaaa..0000000000000
--- a/lib/libbsnmp/modules/snmp_netgraph/genfiles
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-# $FreeBSD$
-
-XSYM="begemotNg"
-
-gensnmptree <netgraph_tree.def -e ${XSYM} >netgraph_oid.h
-gensnmptree <netgraph_tree.def -l -p netgraph_
-
-for i in netgraph_tree.h netgraph_tree.c netgraph_oid.h ; do
- ex $i <<'EOF'
-0a
-/* $FreeBSD$ */
-/* generated file, don't edit - use ./genfiles */
-.
-wq
-EOF
-done
diff --git a/lib/libbsnmp/modules/snmp_netgraph/netgraph_oid.h b/lib/libbsnmp/modules/snmp_netgraph/netgraph_oid.h
deleted file mode 100644
index 5be1a1672bb03..0000000000000
--- a/lib/libbsnmp/modules/snmp_netgraph/netgraph_oid.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/* $FreeBSD$ */
-/* generated file, don't edit - use ./genfiles */
-#define OID_begemotNg 2
-#define OIDLEN_begemotNg 9
-#define OIDX_begemotNg { 9, { 1, 3, 6, 1, 4, 1, 12325, 1, 2, } }
diff --git a/lib/libbsnmp/modules/snmp_netgraph/netgraph_tree.c b/lib/libbsnmp/modules/snmp_netgraph/netgraph_tree.c
deleted file mode 100644
index 4b249f0a693e4..0000000000000
--- a/lib/libbsnmp/modules/snmp_netgraph/netgraph_tree.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* $FreeBSD$ */
-/* generated file, don't edit - use ./genfiles */
-#include <sys/types.h>
-#include <stdio.h>
-#include "asn1.h"
-#include "snmp.h"
-#include "snmpagent.h"
-#include "netgraph_tree.h"
-
-const struct snmp_node netgraph_ctree[] = {
- {{ 12, { 1, 3, 6, 1, 4, 1, 12325, 1, 2, 1, 1, 1, }}, "begemotNgControlNodeName", SNMP_NODE_LEAF, SNMP_SYNTAX_OCTETSTRING, op_ng_config, 0|SNMP_NODE_CANSET, 0, NULL },
- {{ 12, { 1, 3, 6, 1, 4, 1, 12325, 1, 2, 1, 1, 2, }}, "begemotNgResBufSiz", SNMP_NODE_LEAF, SNMP_SYNTAX_INTEGER, op_ng_config, 0|SNMP_NODE_CANSET, 0, NULL },
- {{ 12, { 1, 3, 6, 1, 4, 1, 12325, 1, 2, 1, 1, 3, }}, "begemotNgTimeout", SNMP_NODE_LEAF, SNMP_SYNTAX_INTEGER, op_ng_config, 0|SNMP_NODE_CANSET, 0, NULL },
- {{ 12, { 1, 3, 6, 1, 4, 1, 12325, 1, 2, 1, 1, 4, }}, "begemotNgDebugLevel", SNMP_NODE_LEAF, SNMP_SYNTAX_GAUGE, op_ng_config, 0|SNMP_NODE_CANSET, 0, NULL },
- {{ 12, { 1, 3, 6, 1, 4, 1, 12325, 1, 2, 1, 2, 1, }}, "begemotNgNoMems", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_ng_stats, 0, 0, NULL },
- {{ 12, { 1, 3, 6, 1, 4, 1, 12325, 1, 2, 1, 2, 2, }}, "begemotNgMsgReadErrs", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_ng_stats, 0, 0, NULL },
- {{ 12, { 1, 3, 6, 1, 4, 1, 12325, 1, 2, 1, 2, 3, }}, "begemotNgTooLargeMsgs", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_ng_stats, 0, 0, NULL },
- {{ 12, { 1, 3, 6, 1, 4, 1, 12325, 1, 2, 1, 2, 4, }}, "begemotNgDataReadErrs", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_ng_stats, 0, 0, NULL },
- {{ 12, { 1, 3, 6, 1, 4, 1, 12325, 1, 2, 1, 2, 5, }}, "begemotNgTooLargeDatas", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_ng_stats, 0, 0, NULL },
- {{ 13, { 1, 3, 6, 1, 4, 1, 12325, 1, 2, 1, 3, 1, 2, }}, "begemotNgTypeStatus", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_ng_type, 0|SNMP_NODE_CANSET, 0x21, NULL },
- {{ 13, { 1, 3, 6, 1, 4, 1, 12325, 1, 2, 1, 4, 1, 2, }}, "begemotNgNodeStatus", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_ng_node, 0, 0x11, NULL },
- {{ 13, { 1, 3, 6, 1, 4, 1, 12325, 1, 2, 1, 4, 1, 3, }}, "begemotNgNodeName", SNMP_NODE_COLUMN, SNMP_SYNTAX_OCTETSTRING, op_ng_node, 0, 0x11, NULL },
- {{ 13, { 1, 3, 6, 1, 4, 1, 12325, 1, 2, 1, 4, 1, 4, }}, "begemotNgNodeType", SNMP_NODE_COLUMN, SNMP_SYNTAX_OCTETSTRING, op_ng_node, 0, 0x11, NULL },
- {{ 13, { 1, 3, 6, 1, 4, 1, 12325, 1, 2, 1, 4, 1, 5, }}, "begemotNgNodeHooks", SNMP_NODE_COLUMN, SNMP_SYNTAX_GAUGE, op_ng_node, 0, 0x11, NULL },
- {{ 13, { 1, 3, 6, 1, 4, 1, 12325, 1, 2, 1, 5, 1, 3, }}, "begemotNgHookStatus", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_ng_hook, 0, 0x262, NULL },
- {{ 13, { 1, 3, 6, 1, 4, 1, 12325, 1, 2, 1, 5, 1, 4, }}, "begemotNgHookPeerNodeId", SNMP_NODE_COLUMN, SNMP_SYNTAX_GAUGE, op_ng_hook, 0, 0x262, NULL },
- {{ 13, { 1, 3, 6, 1, 4, 1, 12325, 1, 2, 1, 5, 1, 5, }}, "begemotNgHookPeerHook", SNMP_NODE_COLUMN, SNMP_SYNTAX_OCTETSTRING, op_ng_hook, 0, 0x262, NULL },
- {{ 13, { 1, 3, 6, 1, 4, 1, 12325, 1, 2, 1, 5, 1, 6, }}, "begemotNgHookPeerType", SNMP_NODE_COLUMN, SNMP_SYNTAX_OCTETSTRING, op_ng_hook, 0, 0x262, NULL },
-};
-
diff --git a/lib/libbsnmp/modules/snmp_netgraph/netgraph_tree.h b/lib/libbsnmp/modules/snmp_netgraph/netgraph_tree.h
deleted file mode 100644
index 5b6d3f6d1c7ce..0000000000000
--- a/lib/libbsnmp/modules/snmp_netgraph/netgraph_tree.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* $FreeBSD$ */
-/* generated file, don't edit - use ./genfiles */
-int op_ng_config(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_begemotNgControlNodeName 1
-# define LEAF_begemotNgResBufSiz 2
-# define LEAF_begemotNgTimeout 3
-# define LEAF_begemotNgDebugLevel 4
-int op_ng_stats(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_begemotNgNoMems 1
-# define LEAF_begemotNgMsgReadErrs 2
-# define LEAF_begemotNgTooLargeMsgs 3
-# define LEAF_begemotNgDataReadErrs 4
-# define LEAF_begemotNgTooLargeDatas 5
-int op_ng_type(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_begemotNgTypeStatus 2
-int op_ng_node(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_begemotNgNodeStatus 2
-# define LEAF_begemotNgNodeName 3
-# define LEAF_begemotNgNodeType 4
-# define LEAF_begemotNgNodeHooks 5
-int op_ng_hook(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_begemotNgHookStatus 3
-# define LEAF_begemotNgHookPeerNodeId 4
-# define LEAF_begemotNgHookPeerHook 5
-# define LEAF_begemotNgHookPeerType 6
-#define netgraph_CTREE_SIZE 18
-extern const struct snmp_node netgraph_ctree[];
diff --git a/usr.sbin/bsnmpd/bsnmpd/Makefile b/usr.sbin/bsnmpd/bsnmpd/Makefile
index e9520b9458df2..4bcc00545ff8e 100644
--- a/usr.sbin/bsnmpd/bsnmpd/Makefile
+++ b/usr.sbin/bsnmpd/bsnmpd/Makefile
@@ -3,29 +3,36 @@
# Author: Harti Brandt <harti@freebsd.org>
CONTRIB=${.CURDIR}/../../../contrib/bsnmp
-.PATH: ${CONTRIB}/snmpd
+.PATH: ${CONTRIB}/snmpd
PROG= bsnmpd
-SRCS= oid.h tree.h tree.c main.c action.c config.c export.c trap.c \
- trans_udp.c trans_lsock.c
+SRCS= main.c action.c config.c export.c trap.c trans_udp.c trans_lsock.c
+SRCS+= oid.h tree.c tree.h
+XSYM= snmpMIB begemotSnmpdModuleTable begemotSnmpd begemotTrapSinkTable \
+ sysUpTime snmpTrapOID coldStart authenticationFailure \
+ begemotSnmpdTransUdp begemotSnmpdTransLsock begemotSnmpdLocalPortTable
+CLEANFILES= oid.h tree.c tree.h
MAN= bsnmpd.1 snmpmod.3
-WARNS= 6
+WARNS?= 6
-FILESGROUPS += MIBS DEFS
+FILESGROUPS= MIBS DEFS
MIBS= FOKUS-MIB.txt BEGEMOT-MIB.txt BEGEMOT-SNMPD.txt
MIBSDIR= ${SHAREDIR}/bsnmp/mibs
DEFS= tree.def
DEFSDIR= ${SHAREDIR}/bsnmp/defs
-INCSDIR= ${INCLUDEDIR}/bsnmp
-# snmpdmod is installed in lib/libbsnmp/modules
-# INCS= snmpmod.h
-CFLAGS+= -I. -I${.CURDIR} -I${.CURDIR}/../lib -I${.OBJDIR} \
- -I${CONTRIB}/lib -I${CONTRIB}/snmpd
-DPADD+= ${LIBISC} ${LIBBSNMP}
+CFLAGS+= -I${CONTRIB}/lib -I${CONTRIB}/snmpd -I.
+DPADD= ${LIBISC} ${LIBBSNMP}
LDADD= -lisc -lbsnmp
-LDFLAGS+= -export-dynamic
+LDFLAGS= -export-dynamic
+
+oid.h: tree.def
+ gensnmptree -e ${XSYM} < ${.ALLSRC} > ${.TARGET}
+
+.ORDER: tree.c tree.h
+tree.c tree.h: tree.def
+ gensnmptree -l < ${.ALLSRC}
.include <bsd.prog.mk>
diff --git a/usr.sbin/bsnmpd/bsnmpd/genfiles b/usr.sbin/bsnmpd/bsnmpd/genfiles
deleted file mode 100644
index 1c5507a65ad28..0000000000000
--- a/usr.sbin/bsnmpd/bsnmpd/genfiles
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-# $FreeBSD$
-
-XSYM="snmpMIB begemotSnmpdModuleTable begemotSnmpd begemotTrapSinkTable \
- sysUpTime snmpTrapOID coldStart authenticationFailure \
- begemotSnmpdTransUdp begemotSnmpdTransLsock begemotSnmpdLocalPortTable"
-SRC=../../../contrib/bsnmp/snmpd
-
-gensnmptree -l <${SRC}/tree.def
-gensnmptree <${SRC}/tree.def -e ${XSYM} >oid.h
-
-for i in tree.h tree.c oid.h ; do
- ex $i <<'EOF'
-0a
-/* $XFreeBSD$ */
-/* generated file, don't edit - use ./genfiles */
-.
-1s/X//
-wq
-EOF
-done
diff --git a/usr.sbin/bsnmpd/bsnmpd/oid.h b/usr.sbin/bsnmpd/bsnmpd/oid.h
deleted file mode 100644
index c3e8f6b0bfa9b..0000000000000
--- a/usr.sbin/bsnmpd/bsnmpd/oid.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* $FreeBSD$ */
-/* generated file, don't edit - use ./genfiles */
-#define OID_snmpMIB 1
-#define OIDLEN_snmpMIB 7
-#define OIDX_snmpMIB { 7, { 1, 3, 6, 1, 6, 3, 1, } }
-#define OID_begemotSnmpdModuleTable 6
-#define OIDLEN_begemotSnmpdModuleTable 11
-#define OIDX_begemotSnmpdModuleTable { 11, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 6, } }
-#define OID_begemotSnmpd 1
-#define OIDLEN_begemotSnmpd 9
-#define OIDX_begemotSnmpd { 9, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, } }
-#define OID_begemotTrapSinkTable 2
-#define OIDLEN_begemotTrapSinkTable 11
-#define OIDX_begemotTrapSinkTable { 11, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 2, } }
-#define OID_sysUpTime 3
-#define OIDLEN_sysUpTime 8
-#define OIDX_sysUpTime { 8, { 1, 3, 6, 1, 2, 1, 1, 3, } }
-#define OID_snmpTrapOID 1
-#define OIDLEN_snmpTrapOID 10
-#define OIDX_snmpTrapOID { 10, { 1, 3, 6, 1, 6, 3, 1, 1, 4, 1, } }
-#define OID_coldStart 1
-#define OIDLEN_coldStart 10
-#define OIDX_coldStart { 10, { 1, 3, 6, 1, 6, 3, 1, 1, 5, 1, } }
-#define OID_authenticationFailure 5
-#define OIDLEN_authenticationFailure 10
-#define OIDX_authenticationFailure { 10, { 1, 3, 6, 1, 6, 3, 1, 1, 5, 5, } }
-#define OID_begemotSnmpdTransUdp 2
-#define OIDLEN_begemotSnmpdTransUdp 12
-#define OIDX_begemotSnmpdTransUdp { 12, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 10, 2, } }
-#define OID_begemotSnmpdTransLsock 3
-#define OIDLEN_begemotSnmpdTransLsock 12
-#define OIDX_begemotSnmpdTransLsock { 12, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 10, 3, } }
-#define OID_begemotSnmpdLocalPortTable 9
-#define OIDLEN_begemotSnmpdLocalPortTable 11
-#define OIDX_begemotSnmpdLocalPortTable { 11, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 9, } }
diff --git a/usr.sbin/bsnmpd/bsnmpd/tree.c b/usr.sbin/bsnmpd/bsnmpd/tree.c
deleted file mode 100644
index f03c058e3f8a3..0000000000000
--- a/usr.sbin/bsnmpd/bsnmpd/tree.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/* $FreeBSD$ */
-/* generated file, don't edit - use ./genfiles */
-#include <sys/types.h>
-#include <stdio.h>
-#include "asn1.h"
-#include "snmp.h"
-#include "snmpagent.h"
-#include "tree.h"
-
-const struct snmp_node ctree[] = {
- {{ 8, { 1, 3, 6, 1, 2, 1, 1, 1, }}, "sysDescr", SNMP_NODE_LEAF, SNMP_SYNTAX_OCTETSTRING, op_system_group, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 1, 2, }}, "sysObjectId", SNMP_NODE_LEAF, SNMP_SYNTAX_OID, op_system_group, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 1, 3, }}, "sysUpTime", SNMP_NODE_LEAF, SNMP_SYNTAX_TIMETICKS, op_system_group, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 1, 4, }}, "sysContact", SNMP_NODE_LEAF, SNMP_SYNTAX_OCTETSTRING, op_system_group, 0|SNMP_NODE_CANSET, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 1, 5, }}, "sysName", SNMP_NODE_LEAF, SNMP_SYNTAX_OCTETSTRING, op_system_group, 0|SNMP_NODE_CANSET, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 1, 6, }}, "sysLocation", SNMP_NODE_LEAF, SNMP_SYNTAX_OCTETSTRING, op_system_group, 0|SNMP_NODE_CANSET, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 1, 7, }}, "sysServices", SNMP_NODE_LEAF, SNMP_SYNTAX_INTEGER, op_system_group, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 1, 8, }}, "sysORLastChange", SNMP_NODE_LEAF, SNMP_SYNTAX_TIMETICKS, op_system_group, 0, 0, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 1, 9, 1, 2, }}, "sysORID", SNMP_NODE_COLUMN, SNMP_SYNTAX_OID, op_or_table, 0, 0x11, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 1, 9, 1, 3, }}, "sysORDescr", SNMP_NODE_COLUMN, SNMP_SYNTAX_OCTETSTRING, op_or_table, 0, 0x11, NULL },
- {{ 10, { 1, 3, 6, 1, 2, 1, 1, 9, 1, 4, }}, "sysORUpTime", SNMP_NODE_COLUMN, SNMP_SYNTAX_TIMETICKS, op_or_table, 0, 0x11, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 11, 1, }}, "snmpInPkts", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_snmp, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 11, 3, }}, "snmpInBadVersions", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_snmp, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 11, 4, }}, "snmpInBadCommunityNames", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_snmp, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 11, 5, }}, "snmpInBadCommunityUses", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_snmp, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 11, 6, }}, "snmpInASNParseErrs", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_snmp, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 11, 30, }}, "snmpEnableAuthenTraps", SNMP_NODE_LEAF, SNMP_SYNTAX_INTEGER, op_snmp, 0|SNMP_NODE_CANSET, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 11, 31, }}, "snmpSilentDrops", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_snmp, 0, 0, NULL },
- {{ 8, { 1, 3, 6, 1, 2, 1, 11, 32, }}, "snmpProxyDrops", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_snmp, 0, 0, NULL },
- {{ 12, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 1, 1, }}, "begemotSnmpdTransmitBuffer", SNMP_NODE_LEAF, SNMP_SYNTAX_INTEGER, op_snmpd_config, 0|SNMP_NODE_CANSET, 0, NULL },
- {{ 12, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 1, 2, }}, "begemotSnmpdReceiveBuffer", SNMP_NODE_LEAF, SNMP_SYNTAX_INTEGER, op_snmpd_config, 0|SNMP_NODE_CANSET, 0, NULL },
- {{ 12, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 1, 3, }}, "begemotSnmpdCommunityDisable", SNMP_NODE_LEAF, SNMP_SYNTAX_INTEGER, op_snmpd_config, 0|SNMP_NODE_CANSET, 0, NULL },
- {{ 12, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 1, 4, }}, "begemotSnmpdTrap1Addr", SNMP_NODE_LEAF, SNMP_SYNTAX_IPADDRESS, op_snmpd_config, 0|SNMP_NODE_CANSET, 0, NULL },
- {{ 12, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 1, 5, }}, "begemotSnmpdVersionEnable", SNMP_NODE_LEAF, SNMP_SYNTAX_GAUGE, op_snmpd_config, 0|SNMP_NODE_CANSET, 0, NULL },
- {{ 13, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 2, 1, 3, }}, "begemotTrapSinkStatus", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_trapsink, 0|SNMP_NODE_CANSET, 0x142, NULL },
- {{ 13, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 2, 1, 4, }}, "begemotTrapSinkComm", SNMP_NODE_COLUMN, SNMP_SYNTAX_OCTETSTRING, op_trapsink, 0|SNMP_NODE_CANSET, 0x142, NULL },
- {{ 13, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 2, 1, 5, }}, "begemotTrapSinkVersion", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_trapsink, 0|SNMP_NODE_CANSET, 0x142, NULL },
- {{ 13, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 4, 1, 3, }}, "begemotSnmpdPortStatus", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_snmp_port, 0|SNMP_NODE_CANSET, 0x142, NULL },
- {{ 13, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 5, 1, 3, }}, "begemotSnmpdCommunityString", SNMP_NODE_COLUMN, SNMP_SYNTAX_OCTETSTRING, op_community, 0|SNMP_NODE_CANSET, 0x622, NULL },
- {{ 13, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 5, 1, 4, }}, "begemotSnmpdCommunityDescr", SNMP_NODE_COLUMN, SNMP_SYNTAX_OCTETSTRING, op_community, 0, 0x622, NULL },
- {{ 13, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 6, 1, 2, }}, "begemotSnmpdModulePath", SNMP_NODE_COLUMN, SNMP_SYNTAX_OCTETSTRING, op_modules, 0|SNMP_NODE_CANSET, 0x21, NULL },
- {{ 13, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 6, 1, 3, }}, "begemotSnmpdModuleComment", SNMP_NODE_COLUMN, SNMP_SYNTAX_OCTETSTRING, op_modules, 0, 0x21, NULL },
- {{ 12, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 7, 1, }}, "begemotSnmpdStatsNoRxBufs", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_snmpd_stats, 0, 0, NULL },
- {{ 12, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 7, 2, }}, "begemotSnmpdStatsNoTxBufs", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_snmpd_stats, 0, 0, NULL },
- {{ 12, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 7, 3, }}, "begemotSnmpdStatsInTooLongPkts", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_snmpd_stats, 0, 0, NULL },
- {{ 12, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 7, 4, }}, "begemotSnmpdStatsInBadPduTypes", SNMP_NODE_LEAF, SNMP_SYNTAX_COUNTER, op_snmpd_stats, 0, 0, NULL },
- {{ 12, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 8, 1, }}, "begemotSnmpdDebugDumpPdus", SNMP_NODE_LEAF, SNMP_SYNTAX_INTEGER, op_debug, 0|SNMP_NODE_CANSET, 0, NULL },
- {{ 12, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 8, 2, }}, "begemotSnmpdDebugSnmpTrace", SNMP_NODE_LEAF, SNMP_SYNTAX_GAUGE, op_debug, 0|SNMP_NODE_CANSET, 0, NULL },
- {{ 12, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 8, 3, }}, "begemotSnmpdDebugSyslogPri", SNMP_NODE_LEAF, SNMP_SYNTAX_INTEGER, op_debug, 0|SNMP_NODE_CANSET, 0, NULL },
- {{ 13, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 9, 1, 2, }}, "begemotSnmpdLocalPortStatus", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_lsock_port, 0|SNMP_NODE_CANSET, 0x21, NULL },
- {{ 13, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 9, 1, 3, }}, "begemotSnmpdLocalPortType", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_lsock_port, 0|SNMP_NODE_CANSET, 0x21, NULL },
- {{ 14, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 10, 1, 1, 2, }}, "begemotSnmpdTransportStatus", SNMP_NODE_COLUMN, SNMP_SYNTAX_INTEGER, op_transport_table, 0, 0x21, NULL },
- {{ 14, { 1, 3, 6, 1, 4, 1, 12325, 1, 1, 1, 10, 1, 1, 3, }}, "begemotSnmpdTransportOid", SNMP_NODE_COLUMN, SNMP_SYNTAX_OID, op_transport_table, 0, 0x21, NULL },
- {{ 10, { 1, 3, 6, 1, 6, 3, 1, 1, 6, 1, }}, "snmpSetSerialNo", SNMP_NODE_LEAF, SNMP_SYNTAX_INTEGER, op_snmp_set, 0|SNMP_NODE_CANSET, 0, NULL },
-};
-
diff --git a/usr.sbin/bsnmpd/bsnmpd/tree.h b/usr.sbin/bsnmpd/bsnmpd/tree.h
deleted file mode 100644
index 3b2f29a0369ca..0000000000000
--- a/usr.sbin/bsnmpd/bsnmpd/tree.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* $FreeBSD$ */
-/* generated file, don't edit - use ./genfiles */
-int op_system_group(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_sysDescr 1
-# define LEAF_sysObjectId 2
-# define LEAF_sysUpTime 3
-# define LEAF_sysContact 4
-# define LEAF_sysName 5
-# define LEAF_sysLocation 6
-# define LEAF_sysServices 7
-# define LEAF_sysORLastChange 8
-int op_or_table(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_sysORID 2
-# define LEAF_sysORDescr 3
-# define LEAF_sysORUpTime 4
-int op_snmp(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_snmpInPkts 1
-# define LEAF_snmpInBadVersions 3
-# define LEAF_snmpInBadCommunityNames 4
-# define LEAF_snmpInBadCommunityUses 5
-# define LEAF_snmpInASNParseErrs 6
-# define LEAF_snmpEnableAuthenTraps 30
-# define LEAF_snmpSilentDrops 31
-# define LEAF_snmpProxyDrops 32
-int op_snmpd_config(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_begemotSnmpdTransmitBuffer 1
-# define LEAF_begemotSnmpdReceiveBuffer 2
-# define LEAF_begemotSnmpdCommunityDisable 3
-# define LEAF_begemotSnmpdTrap1Addr 4
-# define LEAF_begemotSnmpdVersionEnable 5
-int op_trapsink(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_begemotTrapSinkStatus 3
-# define LEAF_begemotTrapSinkComm 4
-# define LEAF_begemotTrapSinkVersion 5
-int op_snmp_port(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_begemotSnmpdPortStatus 3
-int op_community(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_begemotSnmpdCommunityString 3
-# define LEAF_begemotSnmpdCommunityDescr 4
-int op_modules(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_begemotSnmpdModulePath 2
-# define LEAF_begemotSnmpdModuleComment 3
-int op_snmpd_stats(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_begemotSnmpdStatsNoRxBufs 1
-# define LEAF_begemotSnmpdStatsNoTxBufs 2
-# define LEAF_begemotSnmpdStatsInTooLongPkts 3
-# define LEAF_begemotSnmpdStatsInBadPduTypes 4
-int op_debug(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_begemotSnmpdDebugDumpPdus 1
-# define LEAF_begemotSnmpdDebugSnmpTrace 2
-# define LEAF_begemotSnmpdDebugSyslogPri 3
-int op_lsock_port(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_begemotSnmpdLocalPortStatus 2
-# define LEAF_begemotSnmpdLocalPortType 3
-int op_transport_table(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_begemotSnmpdTransportStatus 2
-# define LEAF_begemotSnmpdTransportOid 3
-int op_snmp_set(struct snmp_context *, struct snmp_value *, u_int, u_int, enum snmp_op);
-# define LEAF_snmpSetSerialNo 1
-#define CTREE_SIZE 44
-extern const struct snmp_node ctree[];
diff --git a/usr.sbin/bsnmpd/modules/Makefile.inc b/usr.sbin/bsnmpd/modules/Makefile.inc
index aa49857c65e12..ebeb521bcb3ee 100644
--- a/usr.sbin/bsnmpd/modules/Makefile.inc
+++ b/usr.sbin/bsnmpd/modules/Makefile.inc
@@ -1,8 +1,16 @@
# $FreeBSD$
SHLIB_NAME= snmp_${MOD}.so.${SHLIB_MAJOR}
-SRCS+= ${MOD}_tree.c
-CFLAGS+= -I${CONTRIB}/lib -I${CONTRIB}/snmpd -I${.CURDIR}
+SRCS+= ${MOD}_oid.h ${MOD}_tree.c ${MOD}_tree.h
+CLEANFILES+= ${MOD}_oid.h ${MOD}_tree.c ${MOD}_tree.h
+CFLAGS+= -I${CONTRIB}/lib -I${CONTRIB}/snmpd -I.
+
+${MOD}_oid.h: ${MOD}_tree.def
+ gensnmptree -e ${XSYM} < ${.ALLSRC} > ${.TARGET}
+
+.ORDER: ${MOD}_tree.c ${MOD}_tree.h
+${MOD}_tree.c ${MOD}_tree.h: ${MOD}_tree.def
+ gensnmptree -l -p ${MOD}_ < ${.ALLSRC}
.if defined(DEFS)
FILESGROUPS+= DEFS
diff --git a/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile b/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile
index 7215880d1ab17..c677c533ef356 100644
--- a/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile
+++ b/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile
@@ -9,6 +9,8 @@ MOD= mibII
SRCS= mibII.c mibII_ifmib.c mibII_ip.c mibII_interfaces.c \
mibII_ipaddr.c mibII_ifstack.c mibII_rcvaddr.c \
mibII_nettomedia.c mibII_tcp.c mibII_udp.c mibII_route.c
+XSYM= ipAddrTable ifTable ifRcvAddressEntry ifMIB ipMIB tcpMIB udpMIB \
+ ipForward ifIndex linkDown linkUp
MAN= snmp_mibII.3
DEFS= ${MOD}_tree.def
diff --git a/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile b/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile
index 3760c5df0c9cc..6c3cfb49ab53a 100644
--- a/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile
+++ b/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile
@@ -6,6 +6,7 @@ CONTRIB=${.CURDIR}/../../../../contrib/bsnmp
MOD= netgraph
SRCS= snmp_netgraph.c
+XSYM= begemotNg
MAN= snmp_netgraph.3
MIBS= BEGEMOT-NETGRAPH.txt