Webserver+3d print
snmp_agent_misc.c File Reference
SNMP agent (miscellaneous functions) More...
Go to the source code of this file.
Functions | |
void | snmpLockMib (SnmpAgentContext *context) |
Lock MIB bases. | |
void | snmpUnlockMib (SnmpAgentContext *context) |
Unlock MIB bases. | |
error_t | snmpInitResponse (SnmpAgentContext *context) |
Initialize a GetResponse-PDU. | |
void | snmpRefreshEngineTime (SnmpAgentContext *context) |
Refresh SNMP engine time. | |
error_t | snmpCheckEngineTime (SnmpAgentContext *context, SnmpMessage *message) |
Replay protection. | |
SnmpUserInfo * | snmpFindUser (SnmpAgentContext *context, const char_t *name, size_t length) |
Find user in the local configuration datastore. | |
error_t | snmpParseVarBinding (const uint8_t *p, size_t length, SnmpVarBind *var, size_t *consumed) |
Parse variable binding. | |
error_t | snmpWriteVarBinding (SnmpAgentContext *context, const SnmpVarBind *var) |
Write variable binding. | |
error_t | snmpCopyVarBindingList (SnmpAgentContext *context) |
Copy the list of variable bindings. | |
error_t | snmpSetObjectValue (SnmpAgentContext *context, SnmpVarBind *var, bool_t commit) |
Assign object value. | |
error_t | snmpGetObjectValue (SnmpAgentContext *context, SnmpVarBind *var) |
Retrieve object value. | |
error_t | snmpGetNextObject (SnmpAgentContext *context, SnmpVarBind *var) |
Search MIBs for the next object. | |
error_t | snmpFindMibObject (SnmpAgentContext *context, const uint8_t *oid, size_t oidLen, const MibObject **object) |
Search MIBs for the given object. | |
error_t | snmpTranslateStatusCode (SnmpMessage *message, error_t status, uint_t index) |
Translate status code. |
Detailed Description
SNMP agent (miscellaneous functions)
License
Copyright (C) 2010-2017 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.
- Version:
- 1.7.6
Definition in file snmp_agent_misc.c.
Function Documentation
error_t snmpCheckEngineTime | ( | SnmpAgentContext * | context, |
SnmpMessage * | message | ||
) |
Replay protection.
- Parameters:
-
[in] context Pointer to the SNMP agent context [in,out] message Pointer to the incoming SNMP message
- Returns:
- Error code
Definition at line 208 of file snmp_agent_misc.c.
error_t snmpCopyVarBindingList | ( | SnmpAgentContext * | context ) |
Copy the list of variable bindings.
- Parameters:
-
[in] context Pointer to the SNMP agent context
- Returns:
- Error code
Definition at line 485 of file snmp_agent_misc.c.
error_t snmpFindMibObject | ( | SnmpAgentContext * | context, |
const uint8_t * | oid, | ||
size_t | oidLen, | ||
const MibObject ** | object | ||
) |
Search MIBs for the given object.
- Parameters:
-
[in] context Pointer to the SNMP agent context [in] oid Object identifier [in] oidLen Length of the OID [out] object Pointer the MIB object descriptor
- Returns:
- Error code
Definition at line 932 of file snmp_agent_misc.c.
SnmpUserInfo* snmpFindUser | ( | SnmpAgentContext * | context, |
const char_t * | name, | ||
size_t | length | ||
) |
Find user in the local configuration datastore.
- Parameters:
-
[in] context Pointer to the SNMP agent context [in] name Pointer to the user name [in] length Length of the user name
- Returns:
- Security profile corresponding to the specified user name
Definition at line 249 of file snmp_agent_misc.c.
error_t snmpGetNextObject | ( | SnmpAgentContext * | context, |
SnmpVarBind * | var | ||
) |
Search MIBs for the next object.
- Parameters:
-
[in] context Pointer to the SNMP agent context [in] var Variable binding
- Returns:
- Error pointer
Definition at line 826 of file snmp_agent_misc.c.
error_t snmpGetObjectValue | ( | SnmpAgentContext * | context, |
SnmpVarBind * | var | ||
) |
Retrieve object value.
- Parameters:
-
[in] context Pointer to the SNMP agent context [out] var Variable binding
- Returns:
- Error code
Definition at line 676 of file snmp_agent_misc.c.
error_t snmpInitResponse | ( | SnmpAgentContext * | context ) |
Initialize a GetResponse-PDU.
- Parameters:
-
[in] context Pointer to the SNMP agent context
- Returns:
- Error code
Definition at line 93 of file snmp_agent_misc.c.
void snmpLockMib | ( | SnmpAgentContext * | context ) |
Lock MIB bases.
Definition at line 51 of file snmp_agent_misc.c.
error_t snmpParseVarBinding | ( | const uint8_t * | p, |
size_t | length, | ||
SnmpVarBind * | var, | ||
size_t * | consumed | ||
) |
Parse variable binding.
- Parameters:
-
[in] p Input stream where to read the variable binding [in] length Number of bytes available in the input stream [out] var Variable binding [out] consumed Total number of bytes that have been consumed
- Returns:
- Error code
Definition at line 292 of file snmp_agent_misc.c.
void snmpRefreshEngineTime | ( | SnmpAgentContext * | context ) |
Refresh SNMP engine time.
- Parameters:
-
[in] context Pointer to the SNMP agent context
Definition at line 169 of file snmp_agent_misc.c.
error_t snmpSetObjectValue | ( | SnmpAgentContext * | context, |
SnmpVarBind * | var, | ||
bool_t | commit | ||
) |
Assign object value.
- Parameters:
-
[in] context Pointer to the SNMP agent context [in] var Variable binding [in] commit This flag tells whether the changes should be committed to the MIB base
- Returns:
- Error code
Definition at line 512 of file snmp_agent_misc.c.
error_t snmpTranslateStatusCode | ( | SnmpMessage * | message, |
error_t | status, | ||
uint_t | index | ||
) |
Translate status code.
- Parameters:
-
[in,out] message Pointer to the outgoing SNMP message [in] status Status code [in] index Index of the variable binding in the list that caused an exception
- Returns:
- error code
Definition at line 1007 of file snmp_agent_misc.c.
void snmpUnlockMib | ( | SnmpAgentContext * | context ) |
Unlock MIB bases.
Definition at line 71 of file snmp_agent_misc.c.
error_t snmpWriteVarBinding | ( | SnmpAgentContext * | context, |
const SnmpVarBind * | var | ||
) |
Write variable binding.
- Parameters:
-
[in] context Pointer to the SNMP agent context [in] var Variable binding
- Returns:
- Error code
Definition at line 367 of file snmp_agent_misc.c.
Generated on Tue Jul 12 2022 17:10:22 by
