Webserver+3d print
snmp_agent.h File Reference
SNMP agent (Simple Network Management Protocol) More...
Go to the source code of this file.
Data Structures | |
struct | SnmpAgentSettings |
SNMP agent settings. More... | |
struct | SnmpAgentContext |
SNMP agent context. More... | |
struct | SnmpTrapObject |
Object descriptor. More... | |
Typedefs | |
typedef error_t(* | SnmpAgentRandCallback )(uint8_t *data, size_t length) |
Random data generation callback function. | |
Functions | |
void | snmpAgentGetDefaultSettings (SnmpAgentSettings *settings) |
Initialize settings with default values. | |
error_t | snmpAgentInit (SnmpAgentContext *context, const SnmpAgentSettings *settings) |
SNMP agent initialization. | |
error_t | snmpAgentStart (SnmpAgentContext *context) |
Start SNMP agent. | |
error_t | snmpAgentLoadMib (SnmpAgentContext *context, const MibModule *module) |
Load a MIB module. | |
error_t | snmpAgentUnloadMib (SnmpAgentContext *context, const MibModule *module) |
Unload a MIB module. | |
error_t | snmpAgentSetEngineBoots (SnmpAgentContext *context, int32_t engineBoots) |
Set the value of the snmpEngineBoots variable. | |
error_t | snmpAgentGetEngineBoots (SnmpAgentContext *context, int32_t *engineBoots) |
Get the value of the snmpEngineBoots variable. | |
error_t | snmpAgentSetEnterpriseOid (SnmpAgentContext *context, const uint8_t *enterpriseOid, size_t enterpriseOidLen) |
Set enterprise OID. | |
error_t | snmpAgentSetContextEngine (SnmpAgentContext *context, const void *contextEngine, size_t contextEngineLen) |
Set context engine identifier. | |
error_t | snmpAgentSetContextName (SnmpAgentContext *context, const char_t *contextName) |
Set context name. | |
error_t | snmpAgentCreateCommunity (SnmpAgentContext *context, const char_t *community, SnmpAccess mode) |
Create a new community string. | |
error_t | snmpAgentDeleteCommunity (SnmpAgentContext *context, const char_t *community) |
Remove a community string. | |
error_t | snmpAgentCreateUser (SnmpAgentContext *context, const char_t *username, SnmpAccess mode, SnmpKeyFormat keyFormat, SnmpAuthProtocol authProtocol, const void *authKey, SnmpPrivProtocol privProtocol, const void *privKey) |
Create a new user. | |
error_t | snmpAgentDeleteUser (SnmpAgentContext *context, const char_t *username) |
Remove existing user. | |
error_t | snmpAgentSendTrap (SnmpAgentContext *context, const IpAddr *destIpAddr, SnmpVersion version, const char_t *username, uint_t genericTrapType, uint_t specificTrapCode, const SnmpTrapObject *objectList, uint_t objectListSize) |
Send SNMP trap message. | |
void | snmpAgentTask (SnmpAgentContext *context) |
SNMP agent task. |
Detailed Description
SNMP agent (Simple Network Management Protocol)
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.h.
Typedef Documentation
typedef error_t(* SnmpAgentRandCallback)(uint8_t *data, size_t length) |
Random data generation callback function.
Definition at line 76 of file snmp_agent.h.
Function Documentation
error_t snmpAgentCreateCommunity | ( | SnmpAgentContext * | context, |
const char_t * | community, | ||
SnmpAccess | mode | ||
) |
Create a new community string.
- Parameters:
-
[in] context Pointer to the SNMP agent context [in] community NULL-terminated string that contains the community name [in] mode Access rights
- Returns:
- Error code
Definition at line 546 of file snmp_agent.c.
error_t snmpAgentCreateUser | ( | SnmpAgentContext * | context, |
const char_t * | username, | ||
SnmpAccess | mode, | ||
SnmpKeyFormat | keyFormat, | ||
SnmpAuthProtocol | authProtocol, | ||
const void * | authKey, | ||
SnmpPrivProtocol | privProtocol, | ||
const void * | privKey | ||
) |
Create a new user.
- Parameters:
-
[in] context Pointer to the SNMP agent context [in] username NULL-terminated string that contains the user name [in] mode Access rights [in] keyFormat Key format (ASCII password or raw key) [in] authProtocol Authentication type [in] authKey Key to be used for data authentication [in] privProtocol Privacy type [in] privKey Key to be used for data encryption
- Returns:
- Error code
Definition at line 592 of file snmp_agent.c.
error_t snmpAgentDeleteCommunity | ( | SnmpAgentContext * | context, |
const char_t * | community | ||
) |
Remove a community string.
- Parameters:
-
[in] context Pointer to the SNMP agent context [in] community NULL-terminated string that contains the community name
- Returns:
- Error code
Definition at line 567 of file snmp_agent.c.
error_t snmpAgentDeleteUser | ( | SnmpAgentContext * | context, |
const char_t * | username | ||
) |
Remove existing user.
- Parameters:
-
[in] context Pointer to the SNMP agent context [in] username NULL-terminated string that contains the user name
- Returns:
- Error code
Definition at line 758 of file snmp_agent.c.
void snmpAgentGetDefaultSettings | ( | SnmpAgentSettings * | settings ) |
Initialize settings with default values.
- Parameters:
-
[out] settings Structure that contains SNMP agent settings
Definition at line 69 of file snmp_agent.c.
error_t snmpAgentGetEngineBoots | ( | SnmpAgentContext * | context, |
int32_t * | engineBoots | ||
) |
Get the value of the snmpEngineBoots variable.
- Parameters:
-
[in] context Pointer to the SNMP agent context [out] engineBoots Number of times the SNMP engine has re-booted
- Returns:
- Error code
Definition at line 404 of file snmp_agent.c.
error_t snmpAgentInit | ( | SnmpAgentContext * | context, |
const SnmpAgentSettings * | settings | ||
) |
SNMP agent initialization.
- Parameters:
-
[in] context Pointer to the SNMP agent context [in] settings SNMP agent specific settings
- Returns:
- Error code
Definition at line 96 of file snmp_agent.c.
error_t snmpAgentLoadMib | ( | SnmpAgentContext * | context, |
const MibModule * | module | ||
) |
Load a MIB module.
- Parameters:
-
[in] context Pointer to the SNMP agent context [in] module Pointer the MIB module to be loaded
- Returns:
- Error code
Definition at line 230 of file snmp_agent.c.
error_t snmpAgentSendTrap | ( | SnmpAgentContext * | context, |
const IpAddr * | destIpAddr, | ||
SnmpVersion | version, | ||
const char_t * | username, | ||
uint_t | genericTrapType, | ||
uint_t | specificTrapCode, | ||
const SnmpTrapObject * | objectList, | ||
uint_t | objectListSize | ||
) |
Send SNMP trap message.
- Parameters:
-
[in] context Pointer to the SNMP agent context [in] destIpAddr Destination IP address [in] version SNMP version identifier [in] username User name or community name [in] genericTrapType Generic trap type [in] specificTrapCode Specific code [in] objectList List of object names [in] objectListSize Number of entries in the list
- Returns:
- Error code
Definition at line 813 of file snmp_agent.c.
error_t snmpAgentSetContextEngine | ( | SnmpAgentContext * | context, |
const void * | contextEngine, | ||
size_t | contextEngineLen | ||
) |
Set context engine identifier.
- Parameters:
-
[in] context Pointer to the SNMP agent context [in] contextEngine Pointer to the context engine identifier [in] contextEngineLen Length of the context engine identifier
- Returns:
- Error code
Definition at line 468 of file snmp_agent.c.
error_t snmpAgentSetContextName | ( | SnmpAgentContext * | context, |
const char_t * | contextName | ||
) |
Set context name.
- Parameters:
-
[in] context Pointer to the SNMP agent context [in] contextName NULL-terminated string that contains the context name
- Returns:
- Error code
Definition at line 505 of file snmp_agent.c.
error_t snmpAgentSetEngineBoots | ( | SnmpAgentContext * | context, |
int32_t | engineBoots | ||
) |
Set the value of the snmpEngineBoots variable.
- Parameters:
-
[in] context Pointer to the SNMP agent context [in] engineBoots Number of times the SNMP engine has re-booted
- Returns:
- Error code
Definition at line 365 of file snmp_agent.c.
error_t snmpAgentSetEnterpriseOid | ( | SnmpAgentContext * | context, |
const uint8_t * | enterpriseOid, | ||
size_t | enterpriseOidLen | ||
) |
Set enterprise OID.
- Parameters:
-
[in] context Pointer to the SNMP agent context [in] enterpriseOid Pointer to the enterprise OID [in] enterpriseOidLen Length of the enterprise OID
- Returns:
- Error code
Definition at line 435 of file snmp_agent.c.
error_t snmpAgentStart | ( | SnmpAgentContext * | context ) |
Start SNMP agent.
- Parameters:
-
[in] context Pointer to the SNMP agent context
- Returns:
- Error code
Definition at line 199 of file snmp_agent.c.
void snmpAgentTask | ( | SnmpAgentContext * | context ) |
SNMP agent task.
- Parameters:
-
[in] context Pointer to the SNMP agent context
Definition at line 977 of file snmp_agent.c.
error_t snmpAgentUnloadMib | ( | SnmpAgentContext * | context, |
const MibModule * | module | ||
) |
Unload a MIB module.
- Parameters:
-
[in] context Pointer to the SNMP agent context [in] module Pointer the MIB module to be unloaded
- Returns:
- Error code
Definition at line 310 of file snmp_agent.c.
Generated on Tue Jul 12 2022 17:10:22 by
