lwIP 2.2.0
Lightweight IP stack
|
Functions | |
const char * | snmp_get_community_trap (void) |
void | snmp_set_community_trap (const char *const community) |
void | snmp_trap_dst_enable (u8_t dst_idx, u8_t enable) |
void | snmp_trap_dst_ip_set (u8_t dst_idx, const ip_addr_t *dst) |
void | snmp_set_auth_traps_enabled (u8_t enable) |
u8_t | snmp_get_auth_traps_enabled (void) |
void | snmp_set_default_trap_version (u8_t snmp_version) |
u8_t | snmp_get_default_trap_version (void) |
err_t | snmp_send_trap (const struct snmp_obj_id *oid, s32_t generic_trap, s32_t specific_trap, struct snmp_varbind *varbinds) |
err_t | snmp_send_trap_generic (s32_t generic_trap) |
err_t | snmp_send_trap_specific (s32_t specific_trap, struct snmp_varbind *varbinds) |
void | snmp_coldstart_trap (void) |
void | snmp_authfail_trap (void) |
err_t | snmp_send_inform_specific (s32_t specific_trap, struct snmp_varbind *varbinds, s32_t *ptr_request_id) |
err_t | snmp_send_inform_generic (s32_t generic_trap, struct snmp_varbind *varbinds, s32_t *ptr_request_id) |
err_t | snmp_send_inform (const struct snmp_obj_id *oid, s32_t generic_trap, s32_t specific_trap, struct snmp_varbind *varbinds, s32_t *ptr_request_id) |
void snmp_authfail_trap | ( | void | ) |
Send authentication failure trap (used internally by agent)
void snmp_coldstart_trap | ( | void | ) |
Send coldstart trap
u8_t snmp_get_auth_traps_enabled | ( | void | ) |
Get authentication traps enabled state
const char * snmp_get_community_trap | ( | void | ) |
Returns current SNMP community string used for sending traps.
u8_t snmp_get_default_trap_version | ( | void | ) |
Get default SNMP version for sending traps
err_t snmp_send_inform | ( | const struct snmp_obj_id * | oid, |
s32_t | generic_trap, | ||
s32_t | specific_trap, | ||
struct snmp_varbind * | varbinds, | ||
s32_t * | ptr_request_id | ||
) |
Generic function for sending informs
oid | points to object identifier |
generic_trap | is the trap code |
specific_trap | used for enterprise traps when generic_trap == 6 |
varbinds | linked list of varbinds (at the beginning of this list function will insert 2 special purpose varbinds [see RFC 3584]) |
ptr_request_id | [out] variable in which to store request_id needed to verify acknowledgement |
err_t snmp_send_inform_generic | ( | s32_t | generic_trap, |
struct snmp_varbind * | varbinds, | ||
s32_t * | ptr_request_id | ||
) |
Wrapper function for sending informs
generic_trap | is the trap code |
varbinds | linked list of varbinds (at the beginning of this list function will insert 2 special purpose varbinds [see RFC 3584]) |
ptr_request_id | [out] variable in which to store request_id needed to verify acknowledgement |
err_t snmp_send_inform_specific | ( | s32_t | specific_trap, |
struct snmp_varbind * | varbinds, | ||
s32_t * | ptr_request_id | ||
) |
Wrapper function for sending informs
specific_trap | will be appended to enterprise oid [see RFC 3584] |
varbinds | linked list of varbinds (at the beginning of this list function will insert 2 special purpose varbinds [see RFC 3584]) |
ptr_request_id | [out] variable in which to store request_id needed to verify acknowledgement |
err_t snmp_send_trap | ( | const struct snmp_obj_id * | oid, |
s32_t | generic_trap, | ||
s32_t | specific_trap, | ||
struct snmp_varbind * | varbinds | ||
) |
This function is a wrapper function for preparing and sending generic or specific traps.
oid | points to enterprise object identifier |
generic_trap | is the trap code |
specific_trap | used for enterprise traps when generic_trap == 6 |
varbinds | linked list of varbinds to be sent |
err_t snmp_send_trap_generic | ( | s32_t | generic_trap | ) |
Send generic SNMP trap
generic_trap | is the trap code return ERR_OK when success |
err_t snmp_send_trap_specific | ( | s32_t | specific_trap, |
struct snmp_varbind * | varbinds | ||
) |
Send specific SNMP trap with variable bindings
specific_trap | used for enterprise traps (generic_trap = 6) |
varbinds | linked list of varbinds to be sent |
void snmp_set_auth_traps_enabled | ( | u8_t | enable | ) |
Enable/disable authentication traps
enable | enable SNMP traps |
void snmp_set_community_trap | ( | const char *const | community | ) |
Sets SNMP community string used for sending traps. The string itself (its storage) must be valid throughout the whole life of program (or until it is changed to sth else).
community | is a pointer to new trap community string |
void snmp_set_default_trap_version | ( | u8_t | snmp_version | ) |
Choose default SNMP version for sending traps (if not specified, default version is SNMP_VERSION_1) SNMP_VERSION_1 0 SNMP_VERSION_2c 1 SNMP_VERSION_3 3
snmp_version | version that will be used for sending traps |
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, |
const ip_addr_t * | dst | ||
) |
Sets IPv4 address for this trap destination.
dst_idx | index in 0 .. SNMP_TRAP_DESTINATIONS-1 |
dst | IPv4 address in host order. |