mikroSDK Reference Manual
snmp_agent_trap.h
Go to the documentation of this file.
1
31#ifndef _SNMP_AGENT_TRAP_H
32#define _SNMP_AGENT_TRAP_H
33
34//Dependencies
35#include "core/net.h"
36#include "snmp/snmp_agent.h"
37
38//Trap notification support
39#ifndef SNMP_AGENT_TRAP_SUPPORT
40 #define SNMP_AGENT_TRAP_SUPPORT ENABLED
41#elif (SNMP_AGENT_TRAP_SUPPORT != ENABLED && SNMP_AGENT_TRAP_SUPPORT != DISABLED)
42 #error SNMP_AGENT_TRAP_SUPPORT parameter is not valid
43#endif
44
45//C++ guard
46#ifdef __cplusplus
47extern "C" {
48#endif
49
50
55typedef struct
56{
57 uint8_t oid[SNMP_MAX_OID_SIZE];
58 size_t oidLen;
60
61
62//SNMP trap related functions
63error_t snmpFormatTrapMessage(SnmpAgentContext *context, SnmpVersion version,
64 const char_t *userName, uint_t genericTrapType, uint_t specificTrapCode,
65 const SnmpTrapObject *objectList, uint_t objectListSize);
66
67error_t snmpFormatTrapPdu(SnmpAgentContext *context, SnmpVersion version,
68 const char_t *userName, uint_t genericTrapType, uint_t specificTrapCode,
69 const SnmpTrapObject *objectList, uint_t objectListSize);
70
71//C++ guard
72#ifdef __cplusplus
73}
74#endif
75
76#endif
error_t
Error codes.
Definition error.h:43
TCP/IP stack core.
SNMP agent (Simple Network Management Protocol)
SnmpVersion
SNMP version identifiers.
Definition snmp_common.h:137
Object descriptor for trap notifications.
Definition snmp_agent_trap.h:56