diff options
author | Martijn van Duren <martijn@cvs.openbsd.org> | 2021-02-05 10:30:46 +0000 |
---|---|---|
committer | Martijn van Duren <martijn@cvs.openbsd.org> | 2021-02-05 10:30:46 +0000 |
commit | 51521b16c8af298237f47bffc99c83c26ffb5982 (patch) | |
tree | deaf90b8fc00ae047d3081c2640d70a0bf1cafe5 /usr.sbin/snmpd/snmpd.h | |
parent | e218b1a11d67811d7e1ba054423a31509a0bead9 (diff) |
Introduce a transaction id. This is currently mostly a dummy-variable, but
will later on be needed for when we reintroduce agentx master support.
feedback and OK dlg@, rob@
Diffstat (limited to 'usr.sbin/snmpd/snmpd.h')
-rw-r--r-- | usr.sbin/snmpd/snmpd.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.sbin/snmpd/snmpd.h b/usr.sbin/snmpd/snmpd.h index c490ed2fd46..40f08748d4b 100644 --- a/usr.sbin/snmpd/snmpd.h +++ b/usr.sbin/snmpd/snmpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: snmpd.h,v 1.93 2021/01/28 20:45:14 martijn Exp $ */ +/* $OpenBSD: snmpd.h,v 1.94 2021/02/05 10:30:45 martijn Exp $ */ /* * Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org> @@ -399,6 +399,8 @@ struct snmp_message { u_int8_t sm_data[READ_BUF_SIZE]; size_t sm_datalen; + uint32_t sm_transactionid; + u_int sm_version; /* V1, V2c */ @@ -436,7 +438,11 @@ struct snmp_message { struct ber_element *sm_varbind; struct ber_element *sm_varbindresp; + + RB_ENTRY(snmp_message) sm_entry; }; +RB_HEAD(snmp_messages, snmp_message); +extern struct snmp_messages snmp_messages; /* Defined in SNMPv2-MIB.txt (RFC 3418) */ struct snmp_stats { @@ -642,6 +648,8 @@ 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 *); +int snmp_messagecmp(struct snmp_message *, struct snmp_message *); +RB_PROTOTYPE(snmp_messages, snmp_message, sm_entry, snmp_messagecmp) /* trap.c */ void trap_init(void); |