snmpdx_regTblEntry.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 1996 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "impl.h"
#include "asn1.h"
#include "error.h"
#include "snmp.h"
#include "trap.h"
#include "pdu.h"
#include "node.h"
#include "snmpdx_stub.h"
/***** regTblEntry ********************************/
{
int res;
&((*regTblEntry_data)->regTblIndex),
index);
&((*regTblEntry_data)->regTblAgentID),
index);
res = get_regTblOID(
&((*regTblEntry_data)->regTblOID),
index);
&((*regTblEntry_data)->regTblStartColumn),
index);
&((*regTblEntry_data)->regTblEndColumn),
index);
&((*regTblEntry_data)->regTblStartRow),
index);
&((*regTblEntry_data)->regTblEndRow),
index);
&((*regTblEntry_data)->regTblStatus),
index);
return res;
}
{
}
{
/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
/* this function should modify the index argument to the */
/* appropriate value */
switch(search_type)
{
case FIRST_ENTRY:
/* assume 1 is the first index */
}else{
/* index type will be array of integer */
/* assume that there are two index */
}
break;
case NEXT_ENTRY:
}else{
/* index type will be array of integer */
/* assume that there are two index */
}
break;
case EXACT_ENTRY:
break;
}
/*assume that the mib variable has a value of 1 */
*regTblIndex = 1;
return SNMP_ERR_NOERROR;
}
{
/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
/* this function should modify the index argument to the */
/* appropriate value */
switch(search_type)
{
case FIRST_ENTRY:
/* assume 1 is the first index */
}else{
/* index type will be array of integer */
/* assume that there are two index */
}
break;
case NEXT_ENTRY:
}else{
/* index type will be array of integer */
/* assume that there are two index */
}
break;
case EXACT_ENTRY:
break;
}
/*assume that the mib variable has a value of 1 */
*regTblAgentID = 1;
return SNMP_ERR_NOERROR;
}
{
int len;
/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
/* this function should modify the index argument to the */
/* appropriate value */
switch(search_type)
{
case FIRST_ENTRY:
/* assume 1 is the first index */
}else{
/* index type will be array of integer */
/* assume that there are two index */
}
break;
case NEXT_ENTRY:
}else{
/* index type will be array of integer */
/* assume that there are two index */
}
break;
case EXACT_ENTRY:
break;
}
/* It is required to allocate memory to the pointers */
/* inside the input argument */
/* Here, we assume that "1.3.6.1.4.1.42" is the value */
/* of the mib variable */
/* please change it to the real one */
/* 1.3.6.1.4.1.42 has 7 number separated by "." */
len =7 ;
/* fill in the contents of the argument */
return SNMP_ERR_NOERROR;
}
{
switch(pass)
{
case FIRST_PASS:
/* check the existence of the element which */
/* corresponding to the given index and */
/* check the validity fo the input value */
/* if not valid or not exist, */
return SNMP_ERR_GENERR;
case SECOND_PASS:
/* change the following coding, such that */
/* the input value will be stored in the */
/* corresponding mib variable of the given */
/* index */
return SNMP_ERR_NOERROR;
}
}
{
{
}
}
{
/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
/* this function should modify the index argument to the */
/* appropriate value */
switch(search_type)
{
case FIRST_ENTRY:
/* assume 1 is the first index */
}else{
/* index type will be array of integer */
/* assume that there are two index */
}
break;
case NEXT_ENTRY:
}else{
/* index type will be array of integer */
/* assume that there are two index */
}
break;
case EXACT_ENTRY:
break;
}
/*assume that the mib variable has a value of 1 */
*regTblStartColumn = 1;
return SNMP_ERR_NOERROR;
}
{
switch(pass)
{
case FIRST_PASS:
/* check the existence of the element which */
/* corresponding to the given index and */
/* check the validity fo the input value */
/* if not valid or not exist, */
return SNMP_ERR_GENERR;
case SECOND_PASS:
/* change the following coding, such that */
/* the input value will be stored in the */
/* corresponding mib variable of the given */
/* index */
return SNMP_ERR_NOERROR;
}
}
{
/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
/* this function should modify the index argument to the */
/* appropriate value */
switch(search_type)
{
case FIRST_ENTRY:
/* assume 1 is the first index */
}else{
/* index type will be array of integer */
/* assume that there are two index */
}
break;
case NEXT_ENTRY:
}else{
/* index type will be array of integer */
/* assume that there are two index */
}
break;
case EXACT_ENTRY:
break;
}
/*assume that the mib variable has a value of 1 */
*regTblEndColumn = 1;
return SNMP_ERR_NOERROR;
}
{
switch(pass)
{
case FIRST_PASS:
/* check the existence of the element which */
/* corresponding to the given index and */
/* check the validity fo the input value */
/* if not valid or not exist, */
return SNMP_ERR_GENERR;
case SECOND_PASS:
/* change the following coding, such that */
/* the input value will be stored in the */
/* corresponding mib variable of the given */
/* index */
return SNMP_ERR_NOERROR;
}
}
{
/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
/* this function should modify the index argument to the */
/* appropriate value */
switch(search_type)
{
case FIRST_ENTRY:
/* assume 1 is the first index */
}else{
/* index type will be array of integer */
/* assume that there are two index */
}
break;
case NEXT_ENTRY:
}else{
/* index type will be array of integer */
/* assume that there are two index */
}
break;
case EXACT_ENTRY:
break;
}
/*assume that the mib variable has a value of 1 */
*regTblStartRow = 1;
return SNMP_ERR_NOERROR;
}
{
switch(pass)
{
case FIRST_PASS:
/* check the existence of the element which */
/* corresponding to the given index and */
/* check the validity fo the input value */
/* if not valid or not exist, */
return SNMP_ERR_GENERR;
case SECOND_PASS:
/* change the following coding, such that */
/* the input value will be stored in the */
/* corresponding mib variable of the given */
/* index */
return SNMP_ERR_NOERROR;
}
}
{
/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
/* this function should modify the index argument to the */
/* appropriate value */
switch(search_type)
{
case FIRST_ENTRY:
/* assume 1 is the first index */
}else{
/* index type will be array of integer */
/* assume that there are two index */
}
break;
case NEXT_ENTRY:
}else{
/* index type will be array of integer */
/* assume that there are two index */
}
break;
case EXACT_ENTRY:
break;
}
/*assume that the mib variable has a value of 1 */
*regTblEndRow = 1;
return SNMP_ERR_NOERROR;
}
{
switch(pass)
{
case FIRST_PASS:
/* check the existence of the element which */
/* corresponding to the given index and */
/* check the validity fo the input value */
/* if not valid or not exist, */
return SNMP_ERR_GENERR;
case SECOND_PASS:
/* change the following coding, such that */
/* the input value will be stored in the */
/* corresponding mib variable of the given */
/* index */
return SNMP_ERR_NOERROR;
}
}
{
/* In the case, the search_type is FIRST_ENTRY or NEXT_ENTRY */
/* this function should modify the index argument to the */
/* appropriate value */
switch(search_type)
{
case FIRST_ENTRY:
/* assume 1 is the first index */
}else{
/* index type will be array of integer */
/* assume that there are two index */
}
break;
case NEXT_ENTRY:
}else{
/* index type will be array of integer */
/* assume that there are two index */
}
break;
case EXACT_ENTRY:
break;
}
/*assume that the mib variable has a value of 1 */
*regTblStatus = 1;
return SNMP_ERR_NOERROR;
}
{
switch(pass)
{
case FIRST_PASS:
/* check the existence of the element which */
/* corresponding to the given index and */
/* check the validity fo the input value */
/* if not valid or not exist, */
return SNMP_ERR_GENERR;
case SECOND_PASS:
/* change the following coding, such that */
/* the input value will be stored in the */
/* corresponding mib variable of the given */
/* index */
return SNMP_ERR_NOERROR;
}
}