1# 2# Author: Harti Brandt <harti@freebsd.org> 3 4.include <src.opts.mk> 5 6CONTRIB=${SRCTOP}/contrib/bsnmp 7.PATH: ${CONTRIB}/snmpd 8 9CONFS= snmpd.config 10CONFSMODE= 600 11PROG= bsnmpd 12SRCS= main.c action.c config.c export.c trap.c trans_udp.c trans_lsock.c 13SRCS+= trans_inet.c oid.h tree.c tree.h 14XSYM= snmpMIB begemotSnmpdModuleTable begemotSnmpd begemotTrapSinkTable \ 15 sysUpTime snmpTrapOID coldStart authenticationFailure \ 16 begemotSnmpdTransUdp begemotSnmpdTransLsock begemotSnmpdLocalPortTable \ 17 freeBSD freeBSDVersion begemotSnmpdTransInet 18CLEANFILES= oid.h tree.c tree.h 19 20MAN= bsnmpd.1 snmpmod.3 21 22MLINKS+= snmpmod.3 FIND_OBJECT_INT.3 23MLINKS+= snmpmod.3 FIND_OBJECT_INT_LINK.3 24MLINKS+= snmpmod.3 FIND_OBJECT_INT_LINK_INDEX.3 25MLINKS+= snmpmod.3 FIND_OBJECT_OID.3 26MLINKS+= snmpmod.3 FIND_OBJECT_OID_LINK.3 27MLINKS+= snmpmod.3 FIND_OBJECT_OID_LINK_INDEX.3 28MLINKS+= snmpmod.3 INSERT_OBJECT_INT.3 29MLINKS+= snmpmod.3 INSERT_OBJECT_INT_LINK.3 30MLINKS+= snmpmod.3 INSERT_OBJECT_INT_LINK_INDEX.3 31MLINKS+= snmpmod.3 INSERT_OBJECT_OID.3 32MLINKS+= snmpmod.3 INSERT_OBJECT_OID_LINK.3 33MLINKS+= snmpmod.3 INSERT_OBJECT_OID_LINK_INDEX.3 34MLINKS+= snmpmod.3 NEXT_OBJECT_INT.3 35MLINKS+= snmpmod.3 NEXT_OBJECT_INT_LINK.3 36MLINKS+= snmpmod.3 NEXT_OBJECT_INT_LINK_INDEX.3 37MLINKS+= snmpmod.3 NEXT_OBJECT_OID.3 38MLINKS+= snmpmod.3 NEXT_OBJECT_OID_LINK.3 39MLINKS+= snmpmod.3 NEXT_OBJECT_OID_LINK_INDEX.3 40MLINKS+= snmpmod.3 bsnmpd_get_target_stats.3 41MLINKS+= snmpmod.3 bsnmpd_get_usm_stats.3 42MLINKS+= snmpmod.3 bsnmpd_reset_usm_stats.3 43MLINKS+= snmpmod.3 buf_alloc.3 44MLINKS+= snmpmod.3 buf_size.3 45MLINKS+= snmpmod.3 comm_define.3 46MLINKS+= snmpmod.3 community.3 47MLINKS+= snmpmod.3 fd_deselect.3 48MLINKS+= snmpmod.3 fd_resume.3 49MLINKS+= snmpmod.3 fd_select.3 50MLINKS+= snmpmod.3 fd_suspend.3 51MLINKS+= snmpmod.3 get_ticks.3 52MLINKS+= snmpmod.3 index_append.3 53MLINKS+= snmpmod.3 index_append_off.3 54MLINKS+= snmpmod.3 index_compare.3 55MLINKS+= snmpmod.3 index_compare_off.3 56MLINKS+= snmpmod.3 index_decode.3 57MLINKS+= snmpmod.3 ip_commit.3 58MLINKS+= snmpmod.3 ip_get.3 59MLINKS+= snmpmod.3 ip_rollback.3 60MLINKS+= snmpmod.3 ip_save.3 61MLINKS+= snmpmod.3 or_register.3 62MLINKS+= snmpmod.3 or_unregister.3 63MLINKS+= snmpmod.3 oid_commit.3 64MLINKS+= snmpmod.3 oid_get.3 65MLINKS+= snmpmod.3 oid_rollback.3 66MLINKS+= snmpmod.3 oid_save.3 67MLINKS+= snmpmod.3 oid_usmNotInTimeWindows.3 68MLINKS+= snmpmod.3 oid_usmUnknownEngineIDs.3 69MLINKS+= snmpmod.3 oid_zeroDotZero.3 70MLINKS+= snmpmod.3 reqid_allocate.3 71MLINKS+= snmpmod.3 reqid_base.3 72MLINKS+= snmpmod.3 reqid_istype.3 73MLINKS+= snmpmod.3 reqid_next.3 74MLINKS+= snmpmod.3 reqid_type.3 75MLINKS+= snmpmod.3 snmp_input_finish.3 76MLINKS+= snmpmod.3 snmp_input_start.3 77MLINKS+= snmpmod.3 snmp_output.3 78MLINKS+= snmpmod.3 snmp_pdu_auth_access.3 79MLINKS+= snmpmod.3 snmp_send_port.3 80MLINKS+= snmpmod.3 snmp_send_trap.3 81MLINKS+= snmpmod.3 snmpd_target_stat.3 82MLINKS+= snmpmod.3 snmpd_usmstats.3 83MLINKS+= snmpmod.3 start_tick.3 84MLINKS+= snmpmod.3 string_commit.3 85MLINKS+= snmpmod.3 string_free.3 86MLINKS+= snmpmod.3 string_get.3 87MLINKS+= snmpmod.3 string_get_max.3 88MLINKS+= snmpmod.3 string_rollback.3 89MLINKS+= snmpmod.3 string_save.3 90MLINKS+= snmpmod.3 systemg.3 91MLINKS+= snmpmod.3 this_tick.3 92MLINKS+= snmpmod.3 timer_start.3 93MLINKS+= snmpmod.3 timer_start_repeat.3 94MLINKS+= snmpmod.3 timer_stop.3 95MLINKS+= snmpmod.3 target_activate_address.3 96MLINKS+= snmpmod.3 target_address.3 97MLINKS+= snmpmod.3 target_delete_address.3 98MLINKS+= snmpmod.3 target_delete_notify.3 99MLINKS+= snmpmod.3 target_delete_param.3 100MLINKS+= snmpmod.3 target_first_address.3 101MLINKS+= snmpmod.3 target_first_notify.3 102MLINKS+= snmpmod.3 target_first_param.3 103MLINKS+= snmpmod.3 target_flush_all.3 104MLINKS+= snmpmod.3 target_next_address.3 105MLINKS+= snmpmod.3 target_next_notify.3 106MLINKS+= snmpmod.3 target_next_param.3 107MLINKS+= snmpmod.3 target_new_address.3 108MLINKS+= snmpmod.3 target_new_notify.3 109MLINKS+= snmpmod.3 target_new_param.3 110MLINKS+= snmpmod.3 target_notify.3 111MLINKS+= snmpmod.3 target_param.3 112MLINKS+= snmpmod.3 usm_delete_user.3 113MLINKS+= snmpmod.3 usm_find_user.3 114MLINKS+= snmpmod.3 usm_first_user.3 115MLINKS+= snmpmod.3 usm_flush_users.3 116MLINKS+= snmpmod.3 usm_next_user.3 117MLINKS+= snmpmod.3 usm_new_user.3 118MLINKS+= snmpmod.3 usm_user.3 119 120FILESGROUPS= BMIBS DEFS 121 122DEFSPACKAGE= bsnmp 123BMIBSPACKAGE= bsnmp 124 125BMIBS= FOKUS-MIB.txt BEGEMOT-MIB.txt BEGEMOT-SNMPD.txt 126BMIBSDIR= ${SHAREDIR}/snmp/mibs 127DEFS= tree.def 128DEFSDIR= ${SHAREDIR}/snmp/defs 129 130CFLAGS+= -I${CONTRIB}/lib -I${CONTRIB}/snmpd -I. -DUSE_LIBBEGEMOT 131CFLAGS+= -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DHAVE_ERR_H -DHAVE_STRLCPY 132LIBADD= begemot bsnmp 133 134LDFLAGS= -Wl,-export-dynamic 135 136.if ${MK_OPENSSL} != "no" 137CFLAGS+= -DHAVE_LIBCRYPTO 138.endif 139 140.if ${MK_TCP_WRAPPERS} != "no" 141CFLAGS+= -DUSE_TCPWRAPPERS 142LIBADD+= wrap 143.endif 144 145oid.h: tree.def Makefile 146 gensnmptree -I${CONTRIB}/lib -e ${XSYM} < ${.ALLSRC:M*.def} > ${.TARGET} 147 148.ORDER: tree.c tree.h 149tree.h: .NOMETA 150tree.c tree.h: tree.def 151 gensnmptree -I${CONTRIB}/lib -l -f < ${.ALLSRC} 152 153MANFILTER= sed -e 's%@MODPATH@%${LIBDIR}/%g' \ 154 -e 's%@DEFPATH@%${DEFSDIR}/%g' \ 155 -e 's%@MIBSPATH@%${BMIBSDIR}/%g' 156 157.include <bsd.prog.mk> 158