Data Structures | |
struct | snmp_resp_header_lengths |
struct | snmp_trap_header_lengths |
Functions | |
void | snmp_init (void) |
void | snmp_trap_dst_enable (u8_t dst_idx, u8_t enable) |
void | snmp_trap_dst_ip_set (u8_t dst_idx, struct ip_addr *dst) |
struct snmp_varbind * | snmp_varbind_alloc (struct snmp_obj_id *oid, u8_t type, u8_t len) |
void | snmp_msg_event (u8_t request_id) |
err_t | snmp_send_response (struct snmp_msg_pstat *m_stat) |
err_t | snmp_send_trap (s8_t generic_trap, struct snmp_obj_id *eoid, s32_t specific_trap) |
Variables | |
const s32_t | snmp_version |
const char | snmp_publiccommunity [7] |
struct snmp_msg_trap | trap_msg |
void snmp_init | ( | void | ) |
Agent setup, start listening to port 161.
Starts SNMP Agent. Allocates UDP pcb and binds it to IP_ADDR_ANY port 161.
void snmp_msg_event | ( | u8_t | request_id | ) |
Handle an internal (recv) or external (private response) event.
Handle one internal or external event. Called for one async event. (recv external/private answer)
request_id | identifies requests from 0 to (SNMP_CONCURRENT_REQUESTS-1) |
err_t snmp_send_response | ( | struct snmp_msg_pstat * | m_stat | ) |
Sends a 'getresponse' message to the request originator.
m_stat | points to the current message request state source |
connect to the originating source
disassociate remote address and port with this pcb
err_t snmp_send_trap | ( | s8_t | generic_trap, | |
struct snmp_obj_id * | eoid, | |||
s32_t | specific_trap | |||
) |
Sends an generic or enterprise specific trap message.
generic_trap | is the trap code | |
eoid | points to enterprise object identifier | |
specific_trap | used for enterprise traps when generic_trap == 6 |
the use of the enterpise identifier field is per RFC1215. Use .iso.org.dod.internet.mgmt.mib-2.snmp for generic traps and .iso.org.dod.internet.private.enterprises.yourenterprise (sysObjectID) for specific traps.
connect to the TRAP destination
disassociate remote address and port with this pcb
void snmp_trap_dst_enable | ( | u8_t | dst_idx, | |
u8_t | enable | |||
) |
Sets enable switch for this trap destination.
dst_idx | index in 0 .. SNMP_TRAP_DESTINATIONS-1 | |
enable | switch if 0 destination is disabled >0 enabled. |
void snmp_trap_dst_ip_set | ( | u8_t | dst_idx, | |
struct ip_addr * | dst | |||
) |
Sets IPv4 address for this trap destination.
dst_idx | index in 0 .. SNMP_TRAP_DESTINATIONS-1 | |
dst | IPv4 address in host order. |
struct snmp_varbind* snmp_varbind_alloc | ( | struct snmp_obj_id * | oid, | |
u8_t | type, | |||
u8_t | len | |||
) | [read] |
Varbind-list functions.
const char snmp_publiccommunity[7] |
Agent default "public" community string
default SNMP community string
const s32_t snmp_version |
Agent Version constant, 0 = v1 oddity
SNMP v1 == 0
struct snmp_msg_trap trap_msg |
TRAP message structure