Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of OmniWheels by
Traps
[SNMPv2c agent]
Functions | |
| const char * | snmp_get_community_trap (void) |
| Returns current SNMP community string used for sending traps. | |
| void | snmp_set_community_trap (const char *const community) |
| Sets SNMP community string used for sending traps. | |
| void | snmp_trap_dst_enable (u8_t dst_idx, u8_t enable) |
| Sets enable switch for this trap destination. | |
| void | snmp_trap_dst_ip_set (u8_t dst_idx, const ip_addr_t *dst) |
| Sets IPv4 address for this trap destination. | |
| void | snmp_set_auth_traps_enabled (u8_t enable) |
| Enable/disable authentication traps. | |
| u8_t | snmp_get_auth_traps_enabled (void) |
| Get authentication traps enabled state. | |
| err_t | snmp_send_trap (const struct snmp_obj_id *eoid, s32_t generic_trap, s32_t specific_trap, struct snmp_varbind *varbinds) |
| Sends a generic or enterprise specific trap message. | |
| err_t | snmp_send_trap_generic (s32_t generic_trap) |
| Send generic SNMP trap. | |
| err_t | snmp_send_trap_specific (s32_t specific_trap, struct snmp_varbind *varbinds) |
| Send specific SNMP trap with variable bindings. | |
| void | snmp_coldstart_trap (void) |
| Send coldstart trap. | |
| void | snmp_authfail_trap (void) |
| Send authentication failure trap (used internally by agent) | |
Function Documentation
| void snmp_authfail_trap | ( | void | ) |
Send authentication failure trap (used internally by agent)
Definition at line 263 of file lwip_snmp_traps.c.
| void snmp_coldstart_trap | ( | void | ) |
Send coldstart trap.
Definition at line 253 of file lwip_snmp_traps.c.
| u8_t snmp_get_auth_traps_enabled | ( | void | ) |
Get authentication traps enabled state.
Definition at line 143 of file lwip_snmp_traps.c.
| const char* snmp_get_community_trap | ( | void | ) |
Returns current SNMP community string used for sending traps.
- Returns:
- current SNMP community string used for sending traps
Definition at line 112 of file lwip_snmp_msg.c.
| err_t snmp_send_trap | ( | const struct snmp_obj_id * | eoid, |
| s32_t | generic_trap, | ||
| s32_t | specific_trap, | ||
| struct snmp_varbind * | varbinds | ||
| ) |
Sends a generic or enterprise specific trap message.
- Parameters:
-
eoid 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
- Returns:
- ERR_OK when success, ERR_MEM if we're out of memory
- Note:
- the use of the enterprise 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.
send to the TRAP destination
Definition at line 166 of file lwip_snmp_traps.c.
| err_t snmp_send_trap_generic | ( | s32_t | generic_trap ) |
Send generic SNMP trap.
Definition at line 232 of file lwip_snmp_traps.c.
| err_t snmp_send_trap_specific | ( | s32_t | specific_trap, |
| struct snmp_varbind * | varbinds | ||
| ) |
Send specific SNMP trap with variable bindings.
Definition at line 243 of file lwip_snmp_traps.c.
| void snmp_set_auth_traps_enabled | ( | u8_t | enable ) |
Enable/disable authentication traps.
Definition at line 133 of file lwip_snmp_traps.c.
| 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).
- Parameters:
-
community is a pointer to new trap community string
Definition at line 142 of file lwip_snmp_msg.c.
| void snmp_trap_dst_enable | ( | u8_t | dst_idx, |
| u8_t | enable | ||
| ) |
Sets enable switch for this trap destination.
- Parameters:
-
dst_idx index in 0 .. SNMP_TRAP_DESTINATIONS-1 enable switch if 0 destination is disabled >0 enabled.
Definition at line 107 of file lwip_snmp_traps.c.
| void snmp_trap_dst_ip_set | ( | u8_t | dst_idx, |
| const ip_addr_t * | dst | ||
| ) |
Sets IPv4 address for this trap destination.
- Parameters:
-
dst_idx index in 0 .. SNMP_TRAP_DESTINATIONS-1 dst IPv4 address in host order.
Definition at line 121 of file lwip_snmp_traps.c.
Generated on Fri Jul 22 2022 04:54:09 by
1.7.2
