37#ifndef PROTOCORE_SNMP_AGENT_H
38#define PROTOCORE_SNMP_AGENT_H
42#if PROTOCORE_ENABLE_SNMP
58 SNMP_ERR_NO_ERROR = 0,
60 SNMP_ERR_NO_SUCH_NAME = 2,
61 SNMP_ERR_BAD_VALUE = 3,
62 SNMP_ERR_READ_ONLY = 4,
64 SNMP_ERR_NO_ACCESS = 6,
65 SNMP_ERR_WRONG_TYPE = 7,
66 SNMP_ERR_NOT_WRITABLE = 17,
88typedef proto_bool (*SnmpGetFn)(SnmpValue *out);
90typedef proto_bool (*SnmpSetFn)(
const SnmpValue *in);
117 const char *location;
168 SnmpCommunityArgs community;
169 SnmpObjectArgs object;
170 SnmpSystemArgs system;
178extern SnmpAgentVars SnmpAgentV;
183 void (*
const init)(uint8_t *work);
184 void (*
const set_rw_community)(uint8_t *work);
185 void (*
const set_system)(uint8_t *work);
186 void (*
const add_string)(uint8_t *work);
187 void (*
const add_integer)(uint8_t *work);
188 void (*
const add_dynamic)(uint8_t *work);
189 void (*
const dispatch_pdu)(uint8_t *work);
190 void (*
const process)(uint8_t *work);
191 void (*
const listen)(uint8_t *work);
196void protocore_snmp_agent_init(uint8_t *work);
197void protocore_snmp_agent_set_rw_community(uint8_t *work);
198void protocore_snmp_agent_set_system(uint8_t *work);
199void protocore_snmp_agent_add_string(uint8_t *work);
200void protocore_snmp_agent_add_integer(uint8_t *work);
201void protocore_snmp_agent_add_dynamic(uint8_t *work);
202void protocore_snmp_agent_dispatch_pdu(uint8_t *work);
203void protocore_snmp_agent_process(uint8_t *work);
204void protocore_snmp_agent_listen(uint8_t *work);
210static const SnmpAgentNs SnmpAgent __attribute__((unused)) = {
211 .init = protocore_snmp_agent_init,
212 .set_rw_community = protocore_snmp_agent_set_rw_community,
213 .set_system = protocore_snmp_agent_set_system,
214 .add_string = protocore_snmp_agent_add_string,
215 .add_integer = protocore_snmp_agent_add_integer,
216 .add_dynamic = protocore_snmp_agent_add_dynamic,
217 .dispatch_pdu = protocore_snmp_agent_dispatch_pdu,
218 .process = protocore_snmp_agent_process,
219 .listen = protocore_snmp_agent_listen,
231uint8_t *protocore_snmp_agent_span(
void);
PROTO_ENUM_PACKED
Application protocol spoken on a listener port or connection slot.
The SNMP serialization: ASN.1 Basic Encoding Rules over a caller buffer.
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS