SNMPSetVar Function

Microchip TCP/IP Stack

Microchip TCP/IP Stack Help
SNMPSetVar Function
C
BOOL SNMPSetVar(
    SNMP_ID var, 
    SNMP_INDEX index, 
    BYTE ref, 
    SNMP_VAL val
);
Description

This is a callback function called by module for the snmp SET request.User application must modify this function for the new variables address.

Preconditions

ProcessVariables() is called.

Parameters
Parameters 
Description 
var 
Variable id whose value is to be set
 
ref 
Variable reference used to transfer multi-byte data 0 if first byte is set otherwise nonzero value to indicate corresponding byte being set.
 
val 
Up to 4 byte data value. If var data type is BYTE, variable value is in val->byte If var data type is WORD, variable value is in val->word If var data type is DWORD, variable value is in val->dword. If var data type is IP_ADDRESS, COUNTER32, or GAUGE32, value is in val->dword If var data type is OCTET_STRING, ASCII_STRING value is in val->byte; multi-byte transfer will be performed to transfer remaining bytes of data. 
Return Values
Return Values 
Description 
TRUE 
if it is OK to set more byte(s). 
FALSE 
if otherwise. 
Remarks

This function may get called more than once depending on number of bytes in a specific set request for given variable. only dynamic read-write variables needs to be handled.

Microchip TCP/IP Stack 5.42.08 - June 15, 2013
Copyright © 2012 Microchip Technology, Inc.  All rights reserved.