37#ifndef PROTOCORE_SNMP_AGENT_H
38#define PROTOCORE_SNMP_AGENT_H
42#if PROTOCORE_ENABLE_SNMP
55EMBED_ENUM_BYTE(SnmpErr, SNMP_ERR_NO_ERROR = 0, SNMP_ERR_TOO_BIG = 1, SNMP_ERR_NO_SUCH_NAME = 2, SNMP_ERR_BAD_VALUE = 3,
56 SNMP_ERR_READ_ONLY = 4, SNMP_ERR_GEN_ERR = 5, SNMP_ERR_NO_ACCESS = 6, SNMP_ERR_WRONG_TYPE = 7,
57 SNMP_ERR_NOT_WRITABLE = 17, );
78typedef embed_bool (*SnmpGetFn)(SnmpValue *out);
80typedef embed_bool (*SnmpSetFn)(
const SnmpValue *in);
107 const char *location;
127 embed_bool allow_write;
158 SnmpCommunityArgs community;
159 SnmpObjectArgs object;
160 SnmpSystemArgs system;
168extern SnmpAgentVars SnmpAgentV;
173 void (*
const init)(uint8_t *work);
174 void (*
const set_rw_community)(uint8_t *work);
175 void (*
const set_system)(uint8_t *work);
176 void (*
const add_string)(uint8_t *work);
177 void (*
const add_integer)(uint8_t *work);
178 void (*
const add_dynamic)(uint8_t *work);
179 void (*
const dispatch_pdu)(uint8_t *work);
180 void (*
const process)(uint8_t *work);
181 void (*
const listen)(
const uint8_t *work);
186void protocore_snmp_agent_init(uint8_t *work);
187void protocore_snmp_agent_set_rw_community(uint8_t *work);
188void protocore_snmp_agent_set_system(uint8_t *work);
189void protocore_snmp_agent_add_string(uint8_t *work);
190void protocore_snmp_agent_add_integer(uint8_t *work);
191void protocore_snmp_agent_add_dynamic(uint8_t *work);
192void protocore_snmp_agent_dispatch_pdu(uint8_t *work);
193void protocore_snmp_agent_process(uint8_t *work);
194void protocore_snmp_agent_listen(
const uint8_t *work);
200static const SnmpAgentNs SnmpAgent __attribute__((unused)) = {
201 .init = protocore_snmp_agent_init,
202 .set_rw_community = protocore_snmp_agent_set_rw_community,
203 .set_system = protocore_snmp_agent_set_system,
204 .add_string = protocore_snmp_agent_add_string,
205 .add_integer = protocore_snmp_agent_add_integer,
206 .add_dynamic = protocore_snmp_agent_add_dynamic,
207 .dispatch_pdu = protocore_snmp_agent_dispatch_pdu,
208 .process = protocore_snmp_agent_process,
209 .listen = protocore_snmp_agent_listen,
221uint8_t *protocore_snmp_agent_span(
void);
EMBED_ENUM_BYTE(ProtoConn, PROTO_NONE=0, PROTO_HTTP=1, PROTO_TELNET=2, PROTO_SSH=3, PROTO_MODBUS=4, PROTO_OPCUA=5, PROTO_SSH_RFWD=6, PROTO_RELAY=7, PROTO_BRIDGE=8, PROTO_NTRIP_CASTER=9, PROTO_MESH=10, PROTO_UDP=11,)
Application protocol spoken on a listener port or connection slot.
The SNMP serialization: ASN.1 Basic Encoding Rules over a caller buffer.