snmp_agent_inform.h File Reference

SNMP inform notifications. More...

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

Go to the source code of this file.

Macros

#define SNMP_AGENT_INFORM_SUPPORT   DISABLED
 
#define SNMP_AGENT_INFORM_MAX_RETRIES   5
 
#define SNMP_AGENT_INFORM_TIMEOUT   2000
 

Enumerations

enum  SnmpAgentState {
  SNMP_AGENT_STATE_IDLE = 0, SNMP_AGENT_STATE_SENDING_GET_REQ = 1, SNMP_AGENT_STATE_WAITING_REPORT = 2, SNMP_AGENT_STATE_SENDING_INFORM_REQ = 3,
  SNMP_AGENT_STATE_WAITING_GET_RESP = 4
}
 State of the inform sending process. More...
 

Functions

error_t snmpFormatInformRequestMessage (SnmpAgentContext *context, SnmpVersion version, const char_t *userName, uint_t genericTrapType, uint_t specificTrapCode, const SnmpTrapObject *objectList, uint_t objectListSize)
 Format SNMP InformRequest message. More...
 
error_t snmpFormatInformRequestPdu (SnmpAgentContext *context, SnmpVersion version, const char_t *userName, uint_t genericTrapType, uint_t specificTrapCode, const SnmpTrapObject *objectList, uint_t objectListSize)
 Format InformRequest-PDU. More...
 
error_t snmpFormatGetRequestMessage (SnmpAgentContext *context, SnmpVersion version)
 Format SNMP GetRequest message. More...
 
error_t snmpFormatGetRequestPdu (SnmpAgentContext *context, SnmpVersion version)
 Format GetRequest-PDU (engine ID discovery procedure) More...
 
error_t snmpProcessGetResponsePdu (SnmpAgentContext *context)
 Process GetResponse-PDU. More...
 
error_t snmpProcessReportPdu (SnmpAgentContext *context)
 Process Report-PDU. More...
 

Detailed Description

SNMP inform notifications.

License

Copyright (C) 2010-2018 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
1.9.0

Definition in file snmp_agent_inform.h.

Macro Definition Documentation

◆ SNMP_AGENT_INFORM_MAX_RETRIES

#define SNMP_AGENT_INFORM_MAX_RETRIES   5

Definition at line 45 of file snmp_agent_inform.h.

◆ SNMP_AGENT_INFORM_SUPPORT

#define SNMP_AGENT_INFORM_SUPPORT   DISABLED

Definition at line 38 of file snmp_agent_inform.h.

◆ SNMP_AGENT_INFORM_TIMEOUT

#define SNMP_AGENT_INFORM_TIMEOUT   2000

Definition at line 52 of file snmp_agent_inform.h.

Enumeration Type Documentation

◆ SnmpAgentState

State of the inform sending process.

Enumerator
SNMP_AGENT_STATE_IDLE 
SNMP_AGENT_STATE_SENDING_GET_REQ 
SNMP_AGENT_STATE_WAITING_REPORT 
SNMP_AGENT_STATE_SENDING_INFORM_REQ 
SNMP_AGENT_STATE_WAITING_GET_RESP 

Definition at line 67 of file snmp_agent_inform.h.

Function Documentation

◆ snmpFormatGetRequestMessage()

error_t snmpFormatGetRequestMessage ( SnmpAgentContext context,
SnmpVersion  version 
)

Format SNMP GetRequest message.

Parameters
[in]contextPointer to the SNMP agent context
[in]versionSNMP version identifier
Returns
Error code

Definition at line 324 of file snmp_agent_inform.c.

◆ snmpFormatGetRequestPdu()

error_t snmpFormatGetRequestPdu ( SnmpAgentContext context,
SnmpVersion  version 
)

Format GetRequest-PDU (engine ID discovery procedure)

Parameters
[in]contextPointer to the SNMP agent context
[in]versionSNMP version identifier
Returns
Error code

Definition at line 361 of file snmp_agent_inform.c.

◆ snmpFormatInformRequestMessage()

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

Format SNMP InformRequest 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 56 of file snmp_agent_inform.c.

◆ snmpFormatInformRequestPdu()

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

Format InformRequest-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 191 of file snmp_agent_inform.c.

◆ snmpProcessGetResponsePdu()

error_t snmpProcessGetResponsePdu ( SnmpAgentContext context)

Process GetResponse-PDU.

Parameters
[in]contextPointer to the SNMP agent context
Returns
Error code

Definition at line 430 of file snmp_agent_inform.c.

◆ snmpProcessReportPdu()

error_t snmpProcessReportPdu ( SnmpAgentContext context)

Process Report-PDU.

Parameters
[in]contextPointer to the SNMP agent context
Returns
Error code

Definition at line 466 of file snmp_agent_inform.c.