SNMP.c

Microchip TCP/IP Stack

Microchip TCP/IP Stack Help
SNMP.c
  • Simple Network Management Protocol (SNMP) Version 1 Agent
  • Simple Network Management Protocol (SNMP) Version 2 community based Agent
  • Module for Microchip TCP/IP Stack
  • -Provides SNMP API for doing stuff

*

  • -Reference: RFC 1157 (for SNMP V1)
  • RFC 3416 (for SNMPv2C)
*******************************************************************
  • FileName: SNMP.c
  • Dependencies: UDP, ARP
  • 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.

*

  • Author Date Comment

*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  • Nilesh Rajbharti 1/9/03 Original (Rev 1.0)
  • Dan Cohen 12/11/03 Removed trap support by #define if not
  • required to lower code space requirements
  • Amit Shirbhate 09/24/08 SNMPv2c Support, comments and function
  • headers added.
  • Hrisikesh Sahu 04/15/10 SNMPv2 Trap Format Support.
Functions
 
Name 
Description 
 
Finds number of varbinds in the varbind list received in a pdu. 
 
Verifies the value type as ASN_NULL
 
Verifies for the community string datatype and the max community name and length, this agent can process. 
 
Populates OID type, length and oid string from the received pdu. 
 
Verifies for the snmp request type. 
 
Validates the received udp packet Get/Set request header. 
 
Validates the received udp packet Snmp header. 
 
This routine processes the snmp request and parallely creates the response pdu. 
 
Get OID string from MPFS using the node address. 
 
To find whether requested OID is only for private access. 
Variables
 
Name 
Description 
 
global flag to modify OID by appending zero 
 
ASN format datatype for snmp v1 and v2c 
 
This variable is used for gext next request for zero instance 
 
MPFS file handler 
 
Snmp udp socket 
 
notify info for trap 
 
vars from req list processing err status 
 
Snmp udp buffer rx offset 
 
MIB file access status 
 
This is variable snmpTrapTimer. 
Microchip TCP/IP Stack 5.42.08 - June 15, 2013
Copyright © 2012 Microchip Technology, Inc.  All rights reserved.