- Simple Network Management Protocol (SNMP) Version 3 Agent
*
- Module for Microchip TCP/IP Stack
- -Provides SNMPv3 API for doing stuff
*
- -Reference: RFCs 3410, 3411, 3412, 3413, 3414
*******************************************************************
- FileName: SNMPv3.h
- Dependencies: TCP/IP stack
- Processor: PIC32
- Compiler: Microchip C32
*
- Software License Agreement
*
- Copyright (C) 2012 Microchip Technology Inc. All rights
- reserved.
*
- Microchip licenses to you the right to use, modify, copy, and
- distribute:
- (i) the Software when embedded on a Microchip microcontroller or
- digital signal controller product ("Device") which is
- integrated into Licensee's product; or
- (ii) ONLY the Software driver source files ENC28J60.c, ENC28J60.h,
- ENCX24J600.c and ENCX24J600.h ported to a non-Microchip device
- used in conjunction with a Microchip ethernet controller for
- the sole purpose of interfacing with the ethernet controller.
*
- You should refer to the license agreement accompanying this
- Software for additional information regarding your rights and
- obligations.
*
- THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
- WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
- LIMITATION, ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- MICROCHIP BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR
- CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF
- PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY OR SERVICES, ANY CLAIMS
- BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE
- THEREOF), ANY CLAIMS FOR INDEMNITY OR CONTRIBUTION, OR OTHER
- SIMILAR COSTS, WHETHER ASSERTED ON THE BASIS OF CONTRACT, TORT
- (INCLUDING NEGLIGENCE), BREACH OF WARRANTY, OR OTHERWISE.
Enumerations
|
Name |
Description |
|
This is type REPORT_FLAG_AND_SECURITY_LEVEL_FLAGS. | |
|
The fifth octet indicates how the rest (6th and following octets) are formatted. Refer to RFC3411 section5 Page# 41 | |
|
Type of hash being calculated | |
|
This is type SNMPV3_MSG_AUTH_SEC_PARAM_RESULT. | |
|
This is type SNMPV3_MSG_PRIV_SEC_PARAM_RESULT. | |
|
This is type SNMPV3_PRIV_PROT_TYPE. | |
|
This is type STD_BASED_SNMP_MESSAGE_PROCESSING_MODEL. | |
|
Snmp Message Processing Model | |
|
This is type STD_BASED_SNMPV3_SECURITY_LEVEL. | |
|
This is type USM_SECURITY_LEVEL. |
Functions
|
Name |
Description |
|
Decode variable length structure. | |
|
Verifies variable datatype as INT and retrieves its value. | |
|
outGoing SNMPv3 scoped PDU Encryption using AES encryption protocol. | |
|
Authenticate an incoming SNMPV3 USM PDU using MD5 or SHA | |
|
Authenticate to an outgoing SNMPV3 USM PDU using MD5 or SHA | |
|
Pad zero to the authentication key localized buffer. | |
|
Routine to find the index of the user name in the user data base table. | |
|
Compute HMAC inner and outer pad for authorization localized key. | |
|
Compute HMAC - MD5 authentication code | |
|
Compute HMAC - SHA authentication code | |
|
Compute HMAC - MD5 authentication code | |
|
Compute HMAC - SHA authentication code | |
|
Get Security level from authentication and Privacy type. | |
|
Routine to find the report, auth and privacy flags settings in the TRAP. | |
|
SNMPv3 initialization. | |
|
Intialize default SNMPv3 global user database. | |
|
Convert MD5 Auth password to the localized Key using SNMPEngineID. | |
|
Convert SHA Auth password to the localized Key using SNMPEngineID. | |
|
SNMP USM out message uses Privacy protocol (RFC 3826 ) | |
|
Convert Auth and Priv password to the localized Key using SNMPEngineID. |
Macros
|
Name |
Description |
|
SNMPv3 Authentication Localized passwed key lenegth size | |
|
#define PRIV_LOCALIZED_PASSWORD_KEY_LEN 16 SNMPv3 Privacy Pasword key length size | |
|
SNMPv3 authentication localized Key length for memory validation | |
|
This is macro SNMPV3_H. | |
|
SNMPv3 privacy key length size for memory validation | |
|
User security name length for memory validation | |
|
User Security Model should have atleast 1 user. Default is 3. User should change as per the requirement. | |
|
This is macro SNMPV3MSG_AUTHENTICATION_FAIL. | |
|
This is macro SNMPV3MSG_AUTHENTICATION_SUCCESS. | |
|
SNMPv3 User Security Name length |
Structures
|
Name |
Description |
|
Applications are the typical clients of the service(s) of the Access Control Subsystem. The following primitive is provided by the Access Control Subsystem to check if access is allowed: statusInformation = -- success or errorIndication | |
|
Process Incoming Request or Notification PDU Dispatcher provides the following primitive to pass an incoming snmp pdu to an application. | |
|
Generate Outgoing Request or Notification statusInformation = -- sendPduHandle if success -- errorIndication if failure | |
|
Generate Outgoing Response The PDU Dispatcher provides the following primitive for an application to return an SNMP Response PDU to the PDU Dispatcher: result = SUCCESS or FAILURE | |
|
Prepare Data Elements from an Incoming SNMP Message The Message Processing Subsystem provides this service primitive for preparing the abstract data elements from an incoming SNMP message: result = -- SUCCESS or errorIndication | |
|
Prepare Outgoing SNMP Request or Notification Message The Message Processing Subsystem provides this service primitive for preparing an outgoing SNMP Request or Notification Message | |
|
Prepare an Outgoing SNMP Response Message The Message Processing Subsystem provides this service primitive for preparing an outgoing SNMP Response Message: result = -- SUCCESS or FAILURE | |
|
Process Incoming Response PDU The PDU Dispatcher provides the following primitive to pass an incoming SNMP Response PDU to an application: | |
|
success or errorIndication | |
|
This is record SecuritySysGenerateRequestMsg. | |
|
Generate a Response Message The Security Subsystem provides the following primitive to generate a Response message: | |
|
Release State Reference Information All Subsystems which pass stateReference information also provide a primitive to release the memory that holds the referenced state information | |
|
This is record unregisterContextEngineID. | |
|
This is type SecuritySysProcessIncomingMsg. | |
|
This is type SNMPV3_REQUEST_WHOLEMSG. | |
|
This is type SNMPV3_RESPONSE_WHOLEMSG. | |
|
This is type snmpV3EngnUserDataBase. | |
|
snmpv3 target configuration with respect to trap. | |
|
success or errorIndication |