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