snmp_agent_object.c File Reference

MIB object access. More...

#include "core/net.h"
#include "snmp/snmp_agent.h"
#include "snmp/snmp_agent_object.h"
#include "core/crypto.h"
#include "encoding/asn1.h"
#include "encoding/oid.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   SNMP_TRACE_LEVEL
 

Functions

error_t snmpSetObjectValue (SnmpAgentContext *context, const SnmpMessage *message, SnmpVarBind *var, bool_t commit)
 Assign object value. More...
 
error_t snmpGetObjectValue (SnmpAgentContext *context, const SnmpMessage *message, SnmpVarBind *var)
 Retrieve object value. More...
 
error_t snmpGetNextObject (SnmpAgentContext *context, const SnmpMessage *message, SnmpVarBind *var)
 Search MIBs for the next object. More...
 
error_t snmpFindMibObject (SnmpAgentContext *context, const uint8_t *oid, size_t oidLen, const MibObject **object)
 Search MIBs for the given object. More...
 

Detailed Description

MIB object access.

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_object.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   SNMP_TRACE_LEVEL

Definition at line 30 of file snmp_agent_object.c.

Function Documentation

◆ snmpFindMibObject()

error_t snmpFindMibObject ( SnmpAgentContext context,
const uint8_t *  oid,
size_t  oidLen,
const MibObject **  object 
)

Search MIBs for the given object.

Parameters
[in]contextPointer to the SNMP agent context
[in]oidObject identifier
[in]oidLenLength of the OID
[out]objectPointer the MIB object descriptor
Returns
Error code

Definition at line 680 of file snmp_agent_object.c.

◆ snmpGetNextObject()

error_t snmpGetNextObject ( SnmpAgentContext context,
const SnmpMessage message,
SnmpVarBind var 
)

Search MIBs for the next object.

Parameters
[in]contextPointer to the SNMP agent context
[in]messagePointer to the received SNMP message
[in]varVariable binding
Returns
Error pointer

Definition at line 422 of file snmp_agent_object.c.

◆ snmpGetObjectValue()

error_t snmpGetObjectValue ( SnmpAgentContext context,
const SnmpMessage message,
SnmpVarBind var 
)

Retrieve object value.

Parameters
[in]contextPointer to the SNMP agent context
[in]messagePointer to the received SNMP message
[out]varVariable binding
Returns
Error code

Definition at line 228 of file snmp_agent_object.c.

◆ snmpSetObjectValue()

error_t snmpSetObjectValue ( SnmpAgentContext context,
const SnmpMessage message,
SnmpVarBind var,
bool_t  commit 
)

Assign object value.

Parameters
[in]contextPointer to the SNMP agent context
[in]messagePointer to the received SNMP message
[in]varVariable binding
[in]commitThis flag specifies whether the changes should be committed to the MIB base
Returns
Error code

Definition at line 55 of file snmp_agent_object.c.