16#ifndef DETERMINISTICESPASYNCWEBSERVER_SNMP_BER_H
17#define DETERMINISTICESPASYNCWEBSERVER_SNMP_BER_H
26enum class SnmpTag : uint8_t
29 BER_OCTET_STRING = 0x04,
34 SNMP_IPADDRESS = 0x40,
35 SNMP_COUNTER32 = 0x41,
37 SNMP_TIMETICKS = 0x43,
39 SNMP_COUNTER64 = 0x46,
41 SNMP_NO_SUCH_OBJECT = 0x80,
42 SNMP_NO_SUCH_INSTANCE = 0x81,
43 SNMP_END_OF_MIB_VIEW = 0x82,
46 SNMP_PDU_GETNEXT = 0xA1,
47 SNMP_PDU_RESPONSE = 0xA2,
49 SNMP_PDU_GETBULK = 0xA5,
50 SNMP_PDU_TRAPV2 = 0xA7,
51 SNMP_PDU_REPORT = 0xA8,
67void ber_enc_init(BerEnc *e, uint8_t *buf,
size_t cap);
69bool ber_put_integer(BerEnc *e,
long v);
70bool ber_put_uint(BerEnc *e, uint8_t tag, uint32_t v);
71bool ber_put_octet_string(BerEnc *e, uint8_t tag,
const uint8_t *d,
size_t n);
72bool ber_put_null(BerEnc *e);
73bool ber_put_oid(BerEnc *e,
const uint32_t *arcs,
size_t n);
74bool ber_put_tlv(BerEnc *e, uint8_t tag,
const uint8_t *val,
size_t n);
75bool ber_put_raw(BerEnc *e,
const uint8_t *bytes,
size_t n);
77size_t ber_seq_begin(BerEnc *e, uint8_t tag);
78void ber_seq_end(BerEnc *e,
size_t token);
91void ber_dec_init(BerDec *d,
const uint8_t *buf,
size_t len);
94bool ber_read_header(BerDec *d, uint8_t *tag,
size_t *length);
96bool ber_read_integer(BerDec *d,
long *out);
98bool ber_read_oid(BerDec *d, uint32_t *arcs,
size_t max,
size_t *n);
100bool ber_skip(BerDec *d,
size_t length);
User-facing configuration for DeterministicESPAsyncWebServer.