/*
*
* U.S. Government Rights - Commercial software. Government users are subject
* to the Sun Microsystems, Inc. standard license agreement and applicable
* provisions of the FAR and its supplements.
*
*
* This distribution may include materials developed by third parties. Sun,
* Sun Microsystems, the Sun logo and Solaris are trademarks or registered
* trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
*
*/
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include "stdhdr.h"
#include "entPhysicalTable.h"
#include "entLogicalTable.h"
#include "entPhysicalContainsTable.h"
#include "entAliasMappingTable.h"
#include "entLPMappingTable.h"
#include "MyTable.h"
/*
These are global arrays that manage the physical indexes
and logical indexes within the scope of this program.
Similar index management scheme will be
developed within the program that uses the entity MIB
skeleton. The array is statically allocated here
for convience in the example
*/
int i=0, j=0;
/*
This is the initialisation function for the library.
This function is always named as init_<library name>. This function is called during
when this library gets loaded in the agent. Make sure that the libentity.so
library is already loaded before this library is loaded.
*/
void init_demo_module_11(void) {
/*
All these are ficitious OIDs created for this example. Do not
rely on these OID numbers, these are used just for demonstration
purposes
*/
/*
Assuming that the entity MIB skeleton is already loaded, the
following lines adds all the Physical objects that will
be present in the modelled system
*/
0, 3, -1, "b1000", "A(1.00.02)", "", "", "C100076544",
"Sun Microsystems", "CHS-1000", "cl-SJ17-3-006:rack1:rtr-U3",
"0007372293", MIB_TRUE);
"C100087363", "Sun Microsystems", "R10-FE00",
"C100098732", "Sun Microsystems", "R10-FE0C",
"C100098732", "Sun Microsystems", "R11-C100",
/*
The following lines adds all the logical instances that will
be present in the modelled system. Here first parameter to
allocLogicalEntry is ignored for now, it may be used in the
future to request a particular index in the table
*/
/*
Now we add all the relationships into the entity MIB. The
physical and logical indexes must be present to create
any relationships, and so the relationship table is
filled after the physical and logical tables are
populated
*/
/*
Any error in addition to the relationship table will
be logged in the agent's log file
*/
/*
The physical child table must not contains any recursive relationships
Care must be taken to avoid them. The entity MIB infrastructure should
be able to check this in the future
*/
/*
printTableIndex();
*/
}
/*
This function is just a conveience function to add many physical table
entries
*/
char *entPhysicalDescr,
int entPhysicalClass,
char *entPhysicalName,
char *entPhysicalHardwareRev,
char *entPhysicalFirmwareRev,
char *entPhysicalSoftwareRev,
char *entPhysicalSerialNum,
char *entPhysicalMfgName,
char *entPhysicalModelName,
char *entPhysicalAlias,
char *entPhysicalAssetID,
int entPhysicalIsFRU)
{
}
/*
This function is just a convenience function to add many logical table
entries
*/
char *entLogicalDescr,
int entLogicalTypeSize,
char *entLogicalCommunity,
char *entLogicalTAddress,
char *entLogicalContextEngineId,
char *entLogicalContextName)
{
}
void printTableIndex()
{
int k=0, m=0;
printf("\n The physical indexes allocated are, \n");
for (k=0; k<i; k++)
printf("\n The logical indexes allocated are, \n");
for (m=0; m<j; m++)
printf("\n");
}