Functions | |
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) |
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 | |
struct snmp_msg_trap | trap_msg |
Output responses and traps are build in two passes:
Pass 0: iterate over the output message backwards to determine encoding lengths Pass 1: the actual forward encoding of internal form into ASN1
The single-pass encoding method described by Comer & Stevens requires extra buffer space and copying for reversal of the packet. The buffer requirement can be prohibitively large for big payloads (>= 484) therefore we use the two encoding passes.
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_msg_trap trap_msg |
TRAP message structure