/*
 * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
 *
 * 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.
 *
 */
/*
 * Note: this file originally auto-generated by mib2c using
 *        : mib2c.iterate.conf,v 5.5 2002/12/16 22:50:18 hardaker Exp $
 */
#ifndef ENTPHYSICALTABLE_H
#define ENTPHYSICALTABLE_H

/* function declarations */
void init_entPhysicalTable(void);
void initialize_table_entPhysicalTable(void);
Netsnmp_Node_Handler entPhysicalTable_handler;

Netsnmp_First_Data_Point  entPhysicalTable_get_first_data_point;
Netsnmp_Next_Data_Point   entPhysicalTable_get_next_data_point;

/* column number definitions for table entPhysicalTable */
       #define COLUMN_ENTPHYSICALINDEX		1
       #define COLUMN_ENTPHYSICALDESCR		2
       #define COLUMN_ENTPHYSICALVENDORTYPE		3
       #define COLUMN_ENTPHYSICALCONTAINEDIN		4
       #define COLUMN_ENTPHYSICALCLASS		5
       #define COLUMN_ENTPHYSICALPARENTRELPOS		6
       #define COLUMN_ENTPHYSICALNAME		7
       #define COLUMN_ENTPHYSICALHARDWAREREV		8
       #define COLUMN_ENTPHYSICALFIRMWAREREV		9
       #define COLUMN_ENTPHYSICALSOFTWAREREV		10
       #define COLUMN_ENTPHYSICALSERIALNUM		11
       #define COLUMN_ENTPHYSICALMFGNAME		12
       #define COLUMN_ENTPHYSICALMODELNAME		13
       #define COLUMN_ENTPHYSICALALIAS		14
       #define COLUMN_ENTPHYSICALASSETID		15
       #define COLUMN_ENTPHYSICALISFRU		16

typedef struct entPhysicalEntry_s {
    int_l entPhysicalIndex;
    char *entPhysicalDescr;
    oid *entPhysicalVendorType;
    int_l entPhysicalVendorTypeSize;
    int_l entPhysicalContainedIn;
    int_l entPhysicalClass;               /* see ENTPHYSICAL_CLASS_XXX */
    int_l entPhysicalParentRelPos;
    char *entPhysicalName;
    char *entPhysicalHardwareRev;
    char *entPhysicalFirmwareRev;
    char *entPhysicalSoftwareRev;
    char *entPhysicalSerialNum;
    char *entPhysicalMfgName;
    char *entPhysicalModelName;
    char *entPhysicalAlias;
    char *entPhysicalAssetID;
    int_l entPhysicalIsFRU;
    struct entPhysicalEntry_s *pNextEntry;
} entPhysicalEntry_t;


#define ENTPHYSICAL_CLASS_OTHER         1
#define ENTPHYSICAL_CLASS_UNKNOWN       2
#define ENTPHYSICAL_CLASS_CHASSIS       3
#define ENTPHYSICAL_CLASS_BACKPLANE     4
#define ENTPHYSICAL_CLASS_CONTAINER     5
#define ENTPHYSICAL_CLASS_POWERSUPPLY   6
#define ENTPHYSICAL_CLASS_FAN           7
#define ENTPHYSICAL_CLASS_SENSOR        8
#define ENTPHYSICAL_CLASS_MODULE        9
#define ENTPHYSICAL_CLASS_PORT          10
#define ENTPHYSICAL_CLASS_STACK         11

extern entPhysicalEntry_t* getPhysicalTableEntry(int xPhysicalIndex);
extern entPhysicalEntry_t* getPhysicalTableStaleEntry(int xPhysicalIndex);
extern int allocPhysicalEntry(int physidx, entPhysicalEntry_t * newPhysEntry);

extern void populate_entPhysicalEntry(entPhysicalEntry_t *phyStatic,
    char *entPhysicalDescr,
    oid *entPhysicalVendorType,
    int entPhysicalVendorTypeSize,
    int entPhysicalContainedIn,
    int entPhysicalClass,
    int entPhysicalParentRelPos,
    char *entPhysicalName,
    char *entPhysicalHardwareRev,
    char *entPhysicalFirmwareRev,
    char *entPhysicalSoftwareRev,
    char *entPhysicalSerialNum,
    char *entPhysicalMfgName,
    char *entPhysicalModelName,
    char *entPhysicalAlias,
    char *entPhysicalAssetID,
    int entPhysicalIsFRU);

extern int makePhysicalTableEntryLive(int xPhysicalIndex);
extern int makePhysicalTableEntryStale(int xPhysicalIndex);
extern int deletePhysicalTableEntry(int xPhysicalIndex);
/* Fix for 4915080 */
extern int *getAllChildrenFromPhysicalContainedIn(int parentIndex);
/* End of Fix for 4915080 */
#endif /* ENTPHYSICALTABLE_H */
