snmp_agent_trap.h File Reference

SNMP trap notifications. More...

#include "core/net.h"
#include "snmp/snmp_agent.h"

Go to the source code of this file.

Data Structures

struct  SnmpTrapObject
 Object descriptor for trap notifications. More...
 

Macros

#define SNMP_AGENT_TRAP_SUPPORT   ENABLED
 

Functions

error_t snmpFormatTrapMessage (SnmpAgentContext *context, SnmpVersion version, const char_t *userName, uint_t genericTrapType, uint_t specificTrapCode, const SnmpTrapObject *objectList, uint_t objectListSize)
 Format SNMP Trap message. More...
 
error_t snmpFormatTrapPdu (SnmpAgentContext *context, SnmpVersion version, const char_t *userName, uint_t genericTrapType, uint_t specificTrapCode, const SnmpTrapObject *objectList, uint_t objectListSize)
 Format Trap-PDU or SNMPv2-Trap-PDU. More...
 

Detailed Description

SNMP trap notifications.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneTCP Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.4

Definition in file snmp_agent_trap.h.

Macro Definition Documentation

◆ SNMP_AGENT_TRAP_SUPPORT

#define SNMP_AGENT_TRAP_SUPPORT   ENABLED

Definition at line 40 of file snmp_agent_trap.h.

Function Documentation

◆ snmpFormatTrapMessage()

error_t snmpFormatTrapMessage ( SnmpAgentContext context,
SnmpVersion  version,
const char_t userName,
uint_t  genericTrapType,
uint_t  specificTrapCode,
const SnmpTrapObject objectList,
uint_t  objectListSize 
)

Format SNMP Trap message.

Parameters
[in]contextPointer to the SNMP agent context
[in]versionSNMP version identifier
[in]userNameUser name or community name
[in]genericTrapTypeGeneric trap type
[in]specificTrapCodeSpecific code
[in]objectListList of object names
[in]objectListSizeNumber of entries in the list
Returns
Error code

Definition at line 58 of file snmp_agent_trap.c.

◆ snmpFormatTrapPdu()

error_t snmpFormatTrapPdu ( SnmpAgentContext context,
SnmpVersion  version,
const char_t userName,
uint_t  genericTrapType,
uint_t  specificTrapCode,
const SnmpTrapObject objectList,
uint_t  objectListSize 
)

Format Trap-PDU or SNMPv2-Trap-PDU.

Parameters
[in]contextPointer to the SNMP agent context
[in]versionSNMP version identifier
[in]userNameUser name or community name
[in]genericTrapTypeGeneric trap type
[in]specificTrapCodeSpecific code
[in]objectListList of object names
[in]objectListSizeNumber of entries in the list
Returns
Error code

Definition at line 186 of file snmp_agent_trap.c.