Rtos API example

Embed: (wiki syntax)

« Back to documentation index

lwip_snmp_traps.c File Reference

lwip_snmp_traps.c File Reference

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.
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)

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 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 382 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:
trapTrap message
vb_lenvarbind-list length
Returns:
the required length for encoding the trap header

Definition at line 305 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.

handle for sending traps

Definition at line 87 of file lwip_snmp_traps.c.