summaryrefslogtreecommitdiff
path: root/usr.sbin/snmpd/snmpd.h
diff options
context:
space:
mode:
authorMartijn van Duren <martijn@cvs.openbsd.org>2021-09-02 05:41:03 +0000
committerMartijn van Duren <martijn@cvs.openbsd.org>2021-09-02 05:41:03 +0000
commitdd2f0547bfd4b562b9743005054954b869b44464 (patch)
tree6ae56cb551a5523dd6b174eaf494bfd887a60624 /usr.sbin/snmpd/snmpd.h
parentdb176ad624aca4167a922a51adeaa261f1317195 (diff)
Allow snmpd(8) to send SNMPv3 traps.
OK jmatthew@
Diffstat (limited to 'usr.sbin/snmpd/snmpd.h')
-rw-r--r--usr.sbin/snmpd/snmpd.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/usr.sbin/snmpd/snmpd.h b/usr.sbin/snmpd/snmpd.h
index d5f3b75d688..778f5eca6b3 100644
--- a/usr.sbin/snmpd/snmpd.h
+++ b/usr.sbin/snmpd/snmpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: snmpd.h,v 1.99 2021/08/09 18:14:53 martijn Exp $ */
+/* $OpenBSD: snmpd.h,v 1.100 2021/09/02 05:41:02 martijn Exp $ */
/*
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
@@ -512,10 +512,18 @@ TAILQ_HEAD(addresslist, address);
(ADDRESS_FLAG_SNMPV1 | ADDRESS_FLAG_SNMPV2 | ADDRESS_FLAG_SNMPV3)
struct trap_address {
- struct sockaddr_storage ss;
- struct sockaddr_storage ss_local;
- char *sa_community;
- struct ber_oid *sa_oid;
+ struct sockaddr_storage ta_ss;
+ struct sockaddr_storage ta_sslocal;
+ int ta_version;
+ union {
+ char ta_community[SNMPD_MAXCOMMUNITYLEN];
+ struct {
+ char *ta_usmusername;
+ struct usmuser *ta_usmuser;
+ int ta_seclevel;
+ };
+ };
+ struct ber_oid *ta_oid;
TAILQ_ENTRY(trap_address) entry;
};
@@ -655,6 +663,7 @@ struct kif_arp *karp_getaddr(struct sockaddr *, u_short, int);
void snmpe(struct privsep *, struct privsep_proc *);
void snmpe_shutdown(void);
void snmpe_dispatchmsg(struct snmp_message *);
+void snmpe_response(struct snmp_message *);
int snmp_messagecmp(struct snmp_message *, struct snmp_message *);
RB_PROTOTYPE(snmp_messages, snmp_message, sm_entry, snmp_messagecmp)