SNMP.h

Microchip TCP/IP Stack

Microchip TCP/IP Stack Help
SNMP.h
  • SNMP Defs for Microchip TCP/IP Stack

*

*******************************************************************
  • FileName: SNMP.h
  • Dependencies: StackTsk.h
  • UDP.h
  • Processor: PIC18, PIC24F, PIC24H, dsPIC30F, dsPIC33F, PIC32
  • Compiler: Microchip C32 v1.05 or higher
  • Microchip C30 v3.12 or higher
  • Microchip C18 v3.30 or higher
  • HI-TECH PICC-18 PRO 9.63PL2 or higher
  • Company: Microchip Technology, Inc.

*

  • Software License Agreement

*

  • Copyright (C) 2002-2009 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.

*

  • V5.36 ---- STACK_USE_MPFS has been removed
Enumerations
 
Name 
Description 
 
This is type COMMUNITY_TYPE. 
 
 
 
This is type GENERIC_TRAP_NOTIFICATION_TYPE. 
 
This is type INOUT_SNMP_PDU. 
 
This is the list of SNMP action a remote NMS can perform. This inforamtion is passed to application via callback SNMPValidateCommunity(). Application should validate the action for given community string. 
 
 
 
This is type VENDOR_SPECIFIC_TRAP_NOTIFICATION_TYPE. 
Functions
 
Name 
Description 
 
Prepare for full duplex transfer. 
 
Read byte from snmp udp socket rx buffer. 
 
Copy byte to tx buffer. 
 
Get ASN data type info. 
 
Searches for the next leaf node in the MIP tree. 
 
Get OID string from MPFS using the node address. 
 
Get complete notification variable OID string from MPFS using var id. 
 
Resolves generic trap code to generic trap OID. 
 
Verifies variable datatype as INT and retrieves its value. 
 
Retrieves the packet length and actual pdu length. 
 
Decode variable length structure. 
 
To search and validate whether the requested OID is in the MIB database. 
 
This routine process the SNMPv2c Get Bulk Request. 
 
Retrieves next node from the MIB database. 
 
Processes snmp Get request pdu. 
 
Processes snmp Set request pdu. 
 
This routine processes the snmpv3 request and parallely creates the response pdu. 
 
Set snmp error status in the response pdu. 
 
To search for exact index node in case of a Sequence variable. 
 
To search for next index node in case of a Sequence variable. 
 
Returns trap resolve get time. 
 
Used to Get/collect OID variable information. 
 
Used to Restrict the access dynamic and non dynamic OID string for A perticular SNMP Version. 
 
Initialize SNMP module internals. 
 
Resolves given remoteHost IP address into MAC address. 
 
Validates the set variable data length to data type. 
 
Creates and Sends TRAP pdu. 
 
Collects trap notification info and send ARP to remote host. 
 
Prepare, validate remote node which will receive trap and send trap pdu. 
 
This routine Set the mib variable with the requested value. 
 
Polls for every snmp pdu received. 
 
Incoming SNMPv3 scoped PDU decryption using AES decryption protocol. 
 
Copies BYTE data to dynamically allocated memory buffer. 
 
Formulates the snmpEngineID for the SNMPV3 engine. 
 
Updates the snmp engine time variable 'snmpEngineTime' for the SNMPV3 engine. 
 
Reads BYTE data from dynamically allocated memory buffer. 
 
This routine collects or populates the message processing model infomation from the received SNMPv3 request PDU or to the response PDU respectively. 
 
Creates and Sends SNMPv3 TRAP pdu. 
 
This routine collects the scoped pdu header information from the received SNMPv3 request PDU or populates to the response PDU respectively. 
 
TRAP PDU scoped pdu header construction. 
 
This routine collects or populates the security model parametrs infomation from the received SNMPv3 request PDU or to the response PDU respectively. 
 
AES Encryption and decryption init vector.(RFC 3826 ) 
 
Both MD5 and SHA1 is used for the outgoing message authentication. 
 
Validate engine ID. 
 
Vaidate security name with Security level. 
 
Validate SNMPV3 user name or security name. 
 
Validates community name for access control. 
Macros
 
Name 
Description 
 
This is macro _SNMPGetTxOffset. 
 
 
 
This is macro AGENT_NOTIFY_PORT. 
 
This is macro ASN_INT. 
 
This is macro ASN_NULL. 
 
This is macro ASN_OID. 
 
 
 
This is macro GET_BULK_REQUEST. 
 
This is macro GET_NEXT_REQUEST. 
 
 
 
This is macro GET_RESPONSE. 
 
This is macro IS_AGENT_PDU. 
 
This is macro IS_ASN_INT. 
 
This is macro IS_ASN_NULL. 
 
This is macro IS_GET_NEXT_REQUEST. 
 
This is macro IS_GET_REQUEST. 
 
This is macro IS_GET_RESPONSE. 
 
This is macro IS_OCTET_STRING. 
 
This is macro IS_OID. 
 
This is macro IS_SET_REQUEST. 
 
This is macro IS_SNMPV3_AUTH_STRUCTURE. 
 
 
 
This is macro IS_TRAP. 
 
This is macro OCTET_STRING. 
 
Change this to match your OID string length. 
 
This is macro REPORT_RESPONSE. 
 
This is macro SET_REQUEST. 
 
 
 
This is the file that contains SNMP bib file. File name must contain all upper case letter and must match with what was included in MPFS2 image. 
 
This is macro SNMP_COUNTER32. 
 
This is macro SNMP_END_OF_VAR. 
 
This is macro SNMP_GAUGE32. 
 
This is macro SNMP_INDEX_INVALID. 
 
This is macro SNMP_IP_ADDR. 
 
SNMP MIN and MAX message 484 bytes in size As per RFC 3411 snmpEngineMaxMessageSize and RFC 1157 ( section 4- protocol specification ) and implementation supports more than 484 whenever feasible. 
 
This macro will be used to avoid SNMP OID memory buffer corruption 
 
This is macro SNMP_NMS_PORT. 
 
This is macro SNMP_NSAP_ADDR. 
 
This is macro SNMP_OPAQUE. 
 
This is macro SNMP_START_OF_VAR. 
 
This is macro SNMP_TIME_TICKS. 
 
This macro will be used to avoid SNMP OID memory buffer corruption 
 
 
 
This is macro SNMP_V2C. 
 
This is macro SNMP_V3. 
 
 
 
TRAP 
This is macro TRAP. 
 
This is macro TRAP_COMMUNITY_MAX_LEN. 
 
This is macro TRAP_TABLE_SIZE. 
Structures
 
Name 
Description 
 
 
 
 
 
 
 
 
 
 
 
This is type SNMPNONMIBRECDINFO. 
 
SNMPv3 
 
This is type TRAP_INFO. 
Types
 
Name 
Description 
 
This is the SNMP OID variable id. This id is assigned via MIB file. Only dynamic and AgentID variables can contian ID. MIB2BIB utility enforces this rules when BIB was generated. 
 
This is type SNMP_INDEX. 
Unions
 
Name 
Description 
 
 
 
 
 
 
 
This is type SNMP_VAL. 
Microchip TCP/IP Stack 5.42.08 - June 15, 2013
Copyright © 2012 Microchip Technology, Inc.  All rights reserved.