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.
SNMPv1 traps implementation. More...
Go to the source code of this file.
Functions | |
static u16_t | snmp_trap_header_sum (struct snmp_msg_trap *trap, u16_t vb_len) |
Sums trap header field lengths from tail to head and returns trap_header_lengths for second encoding pass. | |
static void | snmp_trap_header_enc (struct snmp_msg_trap *trap, struct snmp_pbuf_stream *pbuf_stream) |
Encodes trap header from head to tail. | |
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. | |
static err_t | snmp_send_trap (const struct snmp_obj_id *device_enterprise_oid, s32_t generic_trap, s32_t specific_trap, struct snmp_varbind *varbinds) |
Sends an 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) | |
Variables | |
const char * | snmp_community_trap |
Agent community string for sending traps. | |
void * | snmp_traps_handle |
handle for sending traps |
Detailed Description
SNMPv1 traps implementation.
Definition in file lwip_snmp_traps.c.
Function Documentation
static err_t snmp_send_trap | ( | const struct snmp_obj_id * | device_enterprise_oid, |
s32_t | generic_trap, | ||
s32_t | specific_trap, | ||
struct snmp_varbind * | varbinds | ||
) | [static] |
Sends an generic or enterprise specific trap message.
- Parameters:
-
generic_trap is the trap code eoid points to enterprise object identifier specific_trap used for enterprise traps when generic_trap == 6
- 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 164 of file lwip_snmp_traps.c.
static void snmp_trap_header_enc | ( | struct snmp_msg_trap * | trap, |
struct snmp_pbuf_stream * | pbuf_stream | ||
) | [static] |
Encodes trap header from head to tail.
Definition at line 380 of file lwip_snmp_traps.c.
static u16_t snmp_trap_header_sum | ( | struct snmp_msg_trap * | trap, |
u16_t | vb_len | ||
) | [static] |
Sums trap header field lengths from tail to head and returns trap_header_lengths for second encoding pass.
- Parameters:
-
vb_len varbind-list length thl points to returned header lengths
- Returns:
- the required length for encoding the trap header
Definition at line 303 of file lwip_snmp_traps.c.
Variable Documentation
const char* snmp_community_trap |
Agent community string for sending traps.
Definition at line 64 of file lwip_snmp_msg.c.
void* snmp_traps_handle |
handle for sending traps
Definition at line 87 of file lwip_snmp_traps.c.
Generated on Tue Jul 12 2022 17:35:02 by
