Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

Traps

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 272 of file lwip_snmp_traps.c.

void snmp_coldstart_trap ( void   )

Send coldstart trap.

Definition at line 262 of file lwip_snmp_traps.c.

u8_t snmp_get_auth_traps_enabled ( void   )

Get authentication traps enabled state.

Definition at line 150 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 202 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:
eoidpoints to enterprise object identifier
generic_trapis the trap code
specific_trapused for enterprise traps when generic_trap == 6
varbindslinked 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 173 of file lwip_snmp_traps.c.

err_t snmp_send_trap_generic ( s32_t  generic_trap )

Send generic SNMP trap.

Definition at line 241 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 252 of file lwip_snmp_traps.c.

void snmp_set_auth_traps_enabled ( u8_t  enable )

Enable/disable authentication traps.

Definition at line 140 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:
communityis a pointer to new trap community string

Definition at line 233 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_idxindex in 0 .. SNMP_TRAP_DESTINATIONS-1
enableswitch if 0 destination is disabled >0 enabled.

Definition at line 112 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_idxindex in 0 .. SNMP_TRAP_DESTINATIONS-1
dstIPv4 address in host order.

Definition at line 127 of file lwip_snmp_traps.c.