snmpdx_agentEntry.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"
/***** agentEntry ********************************/
{
int res;
res = get_agentID(
&((*agentEntry_data)->agentID),
index);
&((*agentEntry_data)->agentStatus),
index);
&((*agentEntry_data)->agentTimeOut),
index);
&((*agentEntry_data)->agentPortNumber),
index);
&((*agentEntry_data)->agentPersonalFile),
index);
&((*agentEntry_data)->agentConfigFile),
index);
&((*agentEntry_data)->agentExecutable),
index);
&((*agentEntry_data)->agentVersionNum),
index);
&((*agentEntry_data)->agentProcessID),
index);
res = get_agentName(
&((*agentEntry_data)->agentName),
index);
&((*agentEntry_data)->agentSystemUpTime),
index);
&((*agentEntry_data)->agentWatchDogTime),
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 */
*agentID = 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 */
*agentStatus = 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 */
*agentTimeOut = 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 */
*agentPortNumber = 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;
}
}
{
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 "hello" is the value of the mib variable */
/* please change it to the real one */
return SNMP_ERR_GENERR;
}
/*fill in the contents of the argument */
return SNMP_ERR_NOERROR;
}
{
char buf[100];
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;
}
}
{
{
agentPersonalFile->len = 0;
}
}
{
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 "hello" is the value of the mib variable */
/* please change it to the real one */
return SNMP_ERR_GENERR;
}
/*fill in the contents of the argument */
return SNMP_ERR_NOERROR;
}
{
char buf[100];
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;
}
}
{
{
agentConfigFile->len = 0;
}
}
{
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 "hello" is the value of the mib variable */
/* please change it to the real one */
return SNMP_ERR_GENERR;
}
/*fill in the contents of the argument */
return SNMP_ERR_NOERROR;
}
{
char buf[100];
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;
}
}
{
{
agentExecutable->len = 0;
}
}
{
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 "hello" is the value of the mib variable */
/* please change it to the real one */
return SNMP_ERR_GENERR;
}
/*fill in the contents of the argument */
return SNMP_ERR_NOERROR;
}
{
char buf[100];
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;
}
}
{
{
agentVersionNum->len = 0;
}
}
{
/* 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 */
*agentProcessID = 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;
}
}
{
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 "hello" is the value of the mib variable */
/* please change it to the real one */
return SNMP_ERR_GENERR;
}
/*fill in the contents of the argument */
return SNMP_ERR_NOERROR;
}
{
char buf[100];
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 */
*agentSystemUpTime = 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 */
*agentWatchDogTime = 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;
}
}