Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
snmp_usm.h File Reference
User-based Security Model (USM) for SNMPv3. More...
Go to the source code of this file.
Data Structures | |
| struct | SnmpKey |
| SNMP secret key. More... | |
| struct | SnmpUserInfo |
| SNMP user information. More... | |
Enumerations | |
| enum | SnmpMessageFlags |
SNMP message flags. More... | |
| enum | SnmpSecurityModel { SNMP_SECURITY_MODEL_USM = 3, SNMP_SECURITY_MODEL_TSM = 4 } |
SNMP security models. More... | |
| enum | SnmpAccess |
Access modes. More... | |
| enum | SnmpAuthProtocol { SNMP_AUTH_PROTOCOL_NONE = 0, SNMP_AUTH_PROTOCOL_MD5 = 1, SNMP_AUTH_PROTOCOL_SHA1 = 2, SNMP_AUTH_PROTOCOL_SHA224 = 3, SNMP_AUTH_PROTOCOL_SHA256 = 4, SNMP_AUTH_PROTOCOL_SHA384 = 5, SNMP_AUTH_PROTOCOL_SHA512 = 6 } |
SNMP authentication protocols. More... | |
| enum | SnmpPrivProtocol { SNMP_PRIV_PROTOCOL_NONE = 0, SNMP_PRIV_PROTOCOL_DES = 1, SNMP_PRIV_PROTOCOL_AES = 2 } |
SNMP privacy protocols. More... | |
| enum | SnmpKeyFormat { SNMP_KEY_FORMAT_NONE = 0, SNMP_KEY_FORMAT_TEXT = 1, SNMP_KEY_FORMAT_RAW = 2 } |
SNMP key format. More... | |
Functions | |
| error_t | snmpGenerateKey (SnmpAuthProtocol authProtocol, const char_t *password, const uint8_t *engineId, size_t engineIdLen, SnmpKey *key) |
| Password to key algorithm. | |
| error_t | snmpCheckSecurityParameters (const SnmpUserInfo *user, SnmpMessage *message, const uint8_t *engineId, size_t engineIdLen) |
| Check security parameters. | |
| error_t | snmpAuthOutgoingMessage (const SnmpUserInfo *user, SnmpMessage *message) |
| Authenticate outgoing SNMP message. | |
| error_t | snmpAuthIncomingMessage (const SnmpUserInfo *user, SnmpMessage *message) |
| Authenticate incoming SNMP message. | |
| error_t | snmpEncryptData (const SnmpUserInfo *user, SnmpMessage *message, uint64_t *salt) |
| Data encryption. | |
| error_t | snmpDecryptData (const SnmpUserInfo *user, SnmpMessage *message) |
| Data decryption. | |
Detailed Description
User-based Security Model (USM) for SNMPv3.
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_usm.h.
Enumeration Type Documentation
| enum SnmpAccess |
Access modes.
Definition at line 207 of file snmp_usm.h.
| enum SnmpAuthProtocol |
SNMP authentication protocols.
- Enumerator:
Definition at line 220 of file snmp_usm.h.
| enum SnmpKeyFormat |
SNMP key format.
- Enumerator:
SNMP_KEY_FORMAT_NONE Unspecified key format.
SNMP_KEY_FORMAT_TEXT ASCII password.
SNMP_KEY_FORMAT_RAW Raw key.
Definition at line 248 of file snmp_usm.h.
| enum SnmpMessageFlags |
SNMP message flags.
Definition at line 184 of file snmp_usm.h.
| enum SnmpPrivProtocol |
SNMP privacy protocols.
- Enumerator:
SNMP_PRIV_PROTOCOL_NONE No privacy.
SNMP_PRIV_PROTOCOL_DES DES-CBC.
SNMP_PRIV_PROTOCOL_AES AES-128-CFB.
Definition at line 236 of file snmp_usm.h.
| enum SnmpSecurityModel |
SNMP security models.
- Enumerator:
SNMP_SECURITY_MODEL_USM User-based security model.
SNMP_SECURITY_MODEL_TSM Transport security model.
Definition at line 196 of file snmp_usm.h.
Function Documentation
| error_t snmpAuthIncomingMessage | ( | const SnmpUserInfo * | user, |
| SnmpMessage * | message | ||
| ) |
Authenticate incoming SNMP message.
- Parameters:
-
[in] user Security profile of the user [in] message Pointer to the incoming SNMP message
- Returns:
- Error code
Definition at line 339 of file snmp_usm.c.
| error_t snmpAuthOutgoingMessage | ( | const SnmpUserInfo * | user, |
| SnmpMessage * | message | ||
| ) |
Authenticate outgoing SNMP message.
- Parameters:
-
[in] user Security profile of the user [in,out] message Pointer to the outgoing SNMP message
- Returns:
- Error code
Definition at line 237 of file snmp_usm.c.
| error_t snmpCheckSecurityParameters | ( | const SnmpUserInfo * | user, |
| SnmpMessage * | message, | ||
| const uint8_t * | engineId, | ||
| size_t | engineIdLen | ||
| ) |
Check security parameters.
- Parameters:
-
[in] user Security profile of the user [in,out] message Pointer to the incoming SNMP message [in] engineId Pointer to the authoritative engine ID [in] engineIdLen Length of the authoritative engine ID
- Returns:
- Error code
Definition at line 190 of file snmp_usm.c.
| error_t snmpDecryptData | ( | const SnmpUserInfo * | user, |
| SnmpMessage * | message | ||
| ) |
Data decryption.
- Parameters:
-
[in] user Security profile of the user [in,out] message Pointer to the incoming SNMP message
- Returns:
- Error code
Definition at line 594 of file snmp_usm.c.
| error_t snmpEncryptData | ( | const SnmpUserInfo * | user, |
| SnmpMessage * | message, | ||
| uint64_t * | salt | ||
| ) |
Data encryption.
- Parameters:
-
[in] user Security profile of the user [in,out] message Pointer to the outgoing SNMP message [in,out] salt Pointer to the salt integer
- Returns:
- Error code
Definition at line 455 of file snmp_usm.c.
| error_t snmpGenerateKey | ( | SnmpAuthProtocol | authProtocol, |
| const char_t * | password, | ||
| const uint8_t * | engineId, | ||
| size_t | engineIdLen, | ||
| SnmpKey * | key | ||
| ) |
Password to key algorithm.
- Parameters:
-
[in] authProtocol Authentication protocol (MD5 or SHA-1) [in] password NULL-terminated string that contains the password [in] engineId Pointer to the engine ID [in] engineIdLen Length of the engine ID [out] key Pointer to the resulting key
- Returns:
- Error code
Definition at line 77 of file snmp_usm.c.
Generated on Tue Jul 12 2022 17:10:22 by
1.7.2