12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- #ifndef TRAP_API_H
- #define TRAP_API_H
- #include <stdbool.h>
- #include "common_config.h"
- typedef enum
- {
- SIMPLE_TRAP = 0,
- VARBIND_TRAP,
-
- } TRAP_TYPE_t;
- typedef struct
- {
- TRAP_LIST_t listName;
- uint8_t trapId;
- uint8_t varbindId;
- bool trapEnable;
- void (*handle)(char*, uint8_t*);
-
- } TRAP_t;
- bool SNMP_SendMessageTrap(TRAP_t trap, char* msg, uint8_t len);
- bool SNMP_SendVarbindTrap(TRAP_t *trap);
- void SNMP_InitTrapsBase(void);
- bool SNMP_SendTrap(TRAP_t trap);
- #endif
|