.\" 
.TH mcsysinfoc 3 "12 April 2003"
.ds ]W www.MagniComp.com
.SH NAME
mcsysinfoc \- MagniComp(tm) SysInfo(tm) \-\- C API to obtain detailed system information in a platform neutral manner
.SH SYNOPSIS
cc -I\fI/opt/sysinfo/include\fR [ options ] \fIfile\fR [ ... ] `/opt/sysinfo/libexec/bin/libs`
.nf

#include <mcsysinfo.h>

MCSIquery_t Query;
McsiOpt_t Opt;

/* Set configuration options */
Opt->ConfigDir = "/opt/sysinfo/config";     /* Config Dir - REQUIRED */
Opt->ProgramName = "\fIname\fR";        /* Name of program - REQUIRED */
Opt->Flags = \fIFlags\fR;               /* Flags like SIM_DEBUG */
Query.Op = \fBMCSIOP_SETOPTS\fR;
Query.In = \fBOpt\fR;
Query.InSize = sizeof(McsiOpt_t);
if (mcSysInfo(&Query) == 0)
    /* Success */
else
    /* Error */

/* Retrieve \fIMCCMD\fR data */
Query.Op = \fBMCSIOP_CREATE\fR;
Query.Cmd = \fIMCCMD\fR;                /* Command to run */
if (mcSysInfo(&Query) == 0)
    /* Success */
else
    /* Error */

/* Destroy (free) memory */
Query.Op = \fBMCSIOP_DESTROY\fR;
if (mcSysInfo(&Query) == 0)
    /* Success */
else
    /* Error */
.fi
.SH DESCRIPTION
The 
.B mcSysInfo() 
C API is part of
.B SysInfo(tm)
from
.B MagniComp(tm).
It
allows the caller to obtain system information about the
local or remote system's configuration
via a platform neutral interface.
The
.B mcsysinfoperl(3)
.B perl(1)
object API may also be used if
a 
.B perl(1)
interface is required.
.PP
The MagniComp
.B mcsysinfo(1)
command uses the
.B mcsysinfoc(3)
API to obtain system configuration data and present it in human and
machine readable formats.
.PP
The 
.B Query.Op
parameter controls the basic operation performed by
.B mcSysInfo().
The following values are supported:
.RS
.IP "MCSIOP_PROGRAM (Deprecated)"
When
.B Query.Op
is set to
.B MCSIOP_PROGRAM
then
.B Query.In
should point at a string naming the calling program
and
.B Query.InSize
should be set to the size of 
.B Query.In
in bytes.
This name is used by 
.B mcSysInfo()
when displaying error and debug messages.
This interface is deprecated by McsiOpt_t->ProgramName.
.IP MCSIOP_SETOPTS
When
.B Query.Op
is set to
.B MCSIOP_SETOPTS
then
.B Query.In
should be a pointer to a
.B McsiOpt_t
buffer
and
.B Query.InSize
should be the size of
.B Query.In
When
.B Query.Op
is set to
.B MCSIOP_DESTROY,
the data located at the address indicated by
.B Query.Out
is destroyed (unallocated).
.RE
.SH "CONFIGURATION WITH McsiOpt_t"
.PP
The
.B McsiOpt_t
type is used to specify configuration options when
.B Query.Op
is set to
.B MCSIOP_SETOPTS.
It's defined as follows:
.RS
.nf

#define MCSIOPT_NOSERIAL	0x000001	/* Don't check serial #'s */
#define MCSIOPT_DEBUG		0x000002	/* Enable debugging output */

/*
 * Set mcSysInfo() options.
 *
 * This type is based to mcSysInfo() to allow the caller to specify
 * API options.
 *
 * Passed to mcSysInfo() when MCSIquery_t.Op = MCSIOP_SETOPTS
 */
typedef struct {
    int			Flags;		/* General flags */
    char	       *ProgramPath;	/* Path to this program */
    char	       *ProgramName;	/* Name of this program */
    char	       *ConfigDir;	/* SysInfo config dir */
    char	       *ConfigFile;	/* Caller specified config file */
} McsiOpt_t;

.fi
.RE
The
.B ConfigDir
and
.B ProgramName
members are required to be set prior to any
.B MCSIOP_CREATE
operation.
Failure to set
.B ConfigDir
may result in incomplete data being returned.
.SH "QUERY INTERFACE"
    uint_t      Flags;      /* Option Flags */
    char      **SearchExp;  /* Search Expression */
    Opaque_t    In;         /* Ptr to Input */
    size_t      InSize;     /* Size of In */
    /* Results */
    Opaque_t    Out;        /* Ptr to Output */
    size_t      OutSize;    /* Size of Out */
} MCSIquery_t;
.RE
.fi
.sp
.PP
The members of
.B MCSIquery_t
are defined as follows:
.IP Op
Specifies what operation to perform on
.I Cmd.
Valid values are as follows:
.RS
.IP MCSIOP_CREATE
(Default)
Obtain the data requested by
.I Cmd
and return the result in the
.I Out
and
.I OutSize
parameters.
The data located at
.I Out
is allocated when this function is called and should be destroyed
(unallocated) by calling 
.B mcSysInfo()
with
.I Op
set to 
.B MCSIOP_DESTROY
(see below).
.IP MCSIOP_DESTROY
Destroy (unallocate) the data located at address
.I Out.
.RE
.IP Cmd
Specifies which command to perform.  See below for the valid list of commands.
.IP Flags
.I Flags
is a set of bit flags which enable different options as specified by 
the
following values:
.RS
.IP MCSIF_DATA
.RE
.IP SearchExp
An array of strings to use to limit the data returned in
.I Out.
Only the following commands support this option:
.RS

.IP MCSI_DEVTREE
Used to specify a list of names which are checked against the device's
.I Name,
.I Aliases,
and
.I AltName
values.
.I 
.RE
.IP In
Used to provide input to certain operations such as MCSIOP_PROGRAM.
.IP InSize
Size of 
.I In
in bytes.
.IP Out
All data is returned in an allocated buffer at the location specified by
the 
.I Out
parameter
The contents of the buffer
vary according to the
.I Cmd
specified.
See below for more details.
.IP OutSize
The size (length) of data located in the
.I Out
location is 
specified by
.I OutSize
where appropriate.
The
.I OutSize
data is not guarenteed to by the full size of the allocated buffer, but
is guaranteed to always be greater than zero when the call succeeds and
.I Out
points to a valid buffer.
See below for more details.
.PP
The valid values for
.I Cmd
are as follows:
.RS

.IP MCSI_BOOTTIME
Obtain the time that the system was last booted.
.RS
.IP \fIOut\fR
Points at a 
.I "char *"
buffer.
e.g "Sat Jun 19 11:55:41 1999".
.IP \fIOutSize\fR
Indicates the length of the
.I Out
buffer.
.RE

.IP MCSI_CPUINFO
Obtain detailed information about the
primary CPU in the system.
.RS
.IP \fIOut\fR
Points at a 
.I "CpuInfo_t"
buffer.
.IP \fIOutSize\fR
Indicates the length of the
.I Out
buffer.
.RE

.IP MCSI_CPUTYPE
Obtain the type of CPU used in the system (e.g. SPARCv9, Pentium, etc.).
.RS
.IP \fIOut\fR
Points at a 
.I "char *"
buffer.
e.g. "UltraSPARC-III".
.IP \fIOutSize\fR
Indicates the length of the
.I Out
buffer.
.RE

.IP MCSI_CPUSPEED
Obtain the clock speed of the
primary CPU in the system.
.RS
.IP \fIOut\fR
Points at a 
.I "char *"
buffer.
e.g. "1.6 GHz"
.IP \fIOutSize\fR
Indicates the length of the
.I Out
buffer.
.RE

.IP MCSI_DEVTREE
Obtain a list, 
possible in a hierarchical tree, 
of physical (hardware) devices present on the system.
.RS
.IP \fIOut\fR
Pointer to a 
.I "DevInfo_t"
buffer.
See
.B "DevInfo_t" 
below for details.
.IP \fIOutSize\fR
Is 1 or more if 
.I Out
contains valid data.
.RE

.IP MCSI_HOSTADDRS
Obtain a list of the local hosts IP addresses.
.RS
.IP \fIOut\fR
When
.B MCSIF_DATA
is set in
.I Flags
(the default)
.I Out
is a pointer to a 
.I "char **"
array of IP addresses.
The last entry in this array will always be NULL.
When
.B MCSIF_STRING
is set in
.I Flags
.I Out
is a pointer to a 
.I "char *"
string which contains a space seperated list of IP addresses.
e.g. "129.152.1.1 129.152.20.1 192.5.5.44".

.IP \fIOutSize\fR
When
.B MCSIF_DATA
is set in
.I Flags
Obtain a list of host aliases for the local host.
These are obtained via the
.B gethostbyname(3)
call from the 
.B h_aliases
parameter of 
.B struct hostent.
.RS
.IP \fIOut\fR
When
.B MCSIF_DATA
is set in
.I Flags
(the default)
.I Out
is a pointer to a 
.I "char **"
array of aliases.
The last entry in this array will always be NULL.
When
.B MCSIF_STRING
is set in
.I Flags
.I Out
is a pointer to a 
.I "char *"
string which contains a space seperated list of aliases.
e.g. "fred fred2 fred3".
.IP \fIOutSize\fR
When
.B MCSIF_DATA
is set in
.I Flags
(the default)
.I OutSize
indicates the number of entries in the array located at the
.I Out
location.
When
.B MCSIF_STRING
is set in
.I Flags
.I OutSize
indicates the length of the buffer.
.RE

.IP MCSI_HOSTID
Obtain the host identifier.
.RS
.IP \fIOut\fR
Points at a 
.I "char *"
buffer.
e.g. "sunworld".
.IP \fIOutSize\fR
Indicates the length of the
.I Out
buffer.
.RE

.IP MCSI_KERNARCH
Obtain the kernel architecture of the system (e.g. sun4u, sun4m, etc.).
.RS
.IP \fIOut\fR
Points at a 
.I "char *"
buffer.
e.g. "sun4u".
.IP \fIOutSize\fR
Indicates the length of the
.I Out
buffer.
.RE

.IP MCSI_KERNBITS
Obtain the kernel bit size of the system (e.g. 32, 64)
.RS
.IP \fIOut\fR
Points at a 
.I "char *"
buffer.
e.g. "32".
.IP \fIOutSize\fR
Indicates the length of the
.I Out
buffer.
.RE

.IP MCSI_KERNELVAR
Obtain a list of kernel variables, their description, and their values as
presently configured.
.RS
.IP \fIOut\fR
Points at a linked list of type
.I "Define_t"
which contains data as follows:
.RS
.IP KeyStr
The name of the kernel variable.
.IP ValStr1
The type of variable this is (boolean, int, long, string).
.IP ValStr2
Descriptive text of what this variable is for.
.IP ValStr3
.I "char *"
buffer.
.IP \fIOutSize\fR
Indicates the length of the
.I Out
buffer.
.RE

.IP MCSI_LIBCNAME
Obtain the name of libc used on the system.
Normally returns "libc" or "glibc".
.RS
.IP \fIOut\fR
Points at a 
.I "char *"
buffer.
e.g. "libc"
.IP \fIOutSize\fR
Indicates the length of the
.I Out
buffer.
.RE

.IP MCSI_LIBCVER
Obtain the version of libc used on the system.
.RS
.IP \fIOut\fR
Points at a 
.I "char *"
buffer.
e.g. "2.2.4"
.IP \fIOutSize\fR
Indicates the length of the
.I Out
buffer.
.RE

.IP MCSI_LICENSE
Obtain a list of all licenses from locally running license servers.
.RS
.IP \fIOut\fR
Pointer to a
.I "License_t"
buffer.
See
.B "License_t" 
below for details.
.IP \fIOutSize\fR
Is 1 or more if 
.I Out
contains valid data.
.RE

.IP MCSI_MANLONG
Obtain the long name of the host's manufacturer.
.RS
.IP \fIOut\fR
Points at a 
.I "char *"
buffer.
e.g. "Sun Microsystems, Inc."
.IP \fIOutSize\fR
Indicates the length of the
.I Out
buffer.
.RE

.IP MCSI_MANSHORT
Obtain the short name of the host's manufacturer.
.RS
.IP \fIOut\fR
Points at a 
.I "char *"
buffer.
e.g. "Sun".
.IP \fIOutSize\fR
Indicates the length of the
.I Out
buffer.
.RE

.IP MCSI_MODEL
Obtain the host's model name.
.RS
.IP \fIOut\fR
Points at a 
.I "char *"
buffer.
e.g. "Ultra 10 Model 300".
.IP \fIOutSize\fR
Indicates the length of the
.I Out
buffer.
.RE

.IP MCSI_NUMCPU
Obtain the number of physical CPUs which are installed and enabled.
.RS
.IP \fIOut\fR
Points at a 
.I "char *"
buffer.
e.g. "2".
.IP \fIOutSize\fR
Indicates the length of the
.I Out
buffer.
.RE

.IP MCSI_OSDIST
Obtain the full distribution description
of the operating system (e.g. Solaris 2.6 5/98,
S.u.S.e. 6.1, etc.).
.RS
.IP \fIOut\fR
Points at a 
.I "char *"
buffer.
.IP \fIOutSize\fR
Indicates the length of the
.I Out
buffer.
.RE

.IP MCSI_OSDISTNAME
Obtain the distribution name of the operating system (e.g. Solaris, Red hat,
etc.).
.RS
.IP \fIOut\fR
Points at a 
.I "char *"
buffer.
.IP \fIOutSize\fR
Indicates the length of the
.I Out
buffer.
.RE

.IP MCSI_OSDISTNAMESH
Obtain the short distribution name of the operating system
(e.g. solaris, redhat, etc.).
.RS
.IP \fIOut\fR
Points at a 
.I "char *"
buffer.
.IP \fIOutSize\fR
Indicates the length of the
.I Out
buffer.
.RE

.IP MCSI_OSDISTVER
Obtain the distribution version of the operating system
(e.g. 8, 7.2, etc.)
.RS
Points at a 
.I "char *"
buffer.
e.g. "SunOS".
.IP \fIOutSize\fR
Indicates the length of the
.I Out
buffer.
.RE

.IP MCSI_OSVER
Obtain the version of the operating system (e.g. 5.6, 4.2.1, etc.).
.RS
.IP \fIOut\fR
Points at a 
.I "char *"
buffer.
.IP \fIOutSize\fR
Indicates the length of the
.I Out
buffer.
.RE

.IP MCSI_PARTITION
Obtain a list, possible in a hierarchical tree, 
of disk partitions defined on this system.
.RS
.IP \fIOut\fR
Pointer to a
.I "PartInfo_t"
buffer.
See
.B "PartInfo_t" 
below for details.
.IP \fIOutSize\fR
Is 1 or more if 
.I Out
contains valid data.
.RE

.IP MCSI_PRINTER
Obtain a list of all printer queues know to the system.
.RS
.IP \fIOut\fR
Pointer to a
.I "Printer_t"
buffer.
See
.B "Printer_t" 
below for details.
.IP \fIOutSize\fR
Is 1 or more if 
.I Out
buffer.
.RE

.IP MCSI_SOFTINFO
Obtain a list, possible in a hierarchical tree, 
of software and software packages which are installed on
the system.
.RS
.IP \fIOut\fR
Pointer to a
.I "SoftInfo_t"
buffer.
See
.B "SoftInfo_t" 
below for details.
.IP \fIOutSize\fR
Is 1 or more if 
.I Out
contains valid data.
.RE

.IP MCSI_SYSCONF
Obtain a list of system configuration values via the
.I sysconf(3)
interface.
.RS
.IP \fIOut\fR
Points at a linked list of type
.I "Define_t"
which contains data as follows:
.RS
.IP KeyStr
The name of the variable.
.IP ValStr1
The type of variable this is (boolean, int, long, string).
.IP ValStr2
Descriptive text of what this variable is for.
.IP ValStr3
The value obtained from the kernel converted to a string.
The value is NULL if the information was not available from the
kernel.
.IP ValInt1
The value obtained from the kernel in integer form.
The value is less than 0 if the data was not retrieved successfully.
.RE

.SH "DESCRIPTION OF DevInfo_t"
The primary device information data type is
.I DevInfo_t
which is defined as:
.sp
    char              *Capacity;   /* Capacity of device */
    char              *Speed;      /* Speed of device */
    char              *Revision;   /* Revision Info */
    DevDesc_t         *DescList;   /* Device Description */
    int                Unit;       /* Unit number */
    int                NodeID;     /* ID of this node */
    char              *MasterName; /* Name of master */
    void              *DevSpec;    /* Device specific info */
    struct _DevInfo   *Master;     /* Device controller */
    struct _DevInfo   *Slaves;     /* Devices on this device */
    struct _DevInfo   *Next;       /* Pointer to next device */
    /* Internal use only */
    void              *OSdata;     /* Data from OS */
    /* Obsolete */
    int                Addr;       /* Address */
    int                Prio;       /* Priority */
    int                Vec;        /* Vector */
};
typedef struct _DevInfo DevInfo_t;
.RE
.fi
.sp
.PP
The members of
.I DevInfo_t
are defined as follows:
.IP Name
The devices name, inclusive of it's unit number.  e.g. 
.B sd0.
If the device name ends in a digit, then the slash ('/')
character followed by the unit number is appended
to clarify the name.  e.g. 
.B pgx32/0
.IP Driver
The name of the device driver for this device.  This is typically, but
not always, the value of
.I Name
without the unit.
e.g. For a device with a
.I Name
of
.B sd0
the value of
.I Driver
would be 
.B sd
.IP Aliases
An array of alternate values for
.I Names
by which this device may be addressed.
e.g. A device with
.I Name
.IP Type
A numeric value which classes the type of device.
Valid numeric values are defined by the DT_* entries in <mcsysinfo.h>.
.IP ClassType
This value defines a classification of this device within it's
.I Type.
The valid values for
.I ClassType
are specified by the CT_* entries in <mcsysinfo.h>.
e.g. A SCSI disk device would have a 
.I Type
of 
.B DT_DISK
and a
.I ClassType
value of
.B CT_SCSI .
.IP Vendor
The name of the vendor who sold or manufactured this device.
.IP Model
The model name of the device.
.IP ModelDesc
A further description of the model which varies by device and
operating system.
.IP Serial
The devices serial number.
.IP Capacity
A string containing the capacity (size) of a device in device specific units.
For a 
.B DT_DISKDRIVE
this will typically be a something like
.B "32 GB".
.IP Speed
A string containing the speed of a device in device specific units.
For a
.B DT_DISKDRIVE
this might be
.B "33 MB/s".
For a
.B DT_PROCESSOR
the speed would indicate the clock speed such as
.B "850 MHz".
.IP Revision
The revision of the device.
.IP DescList
A list of descriptive information that is not otherwise specified in 
.I DevInfo_t.
This list varies greatly by operating system and specific hardware platforms
and models.
There is no guarentee that the 
.I DescList
information will remain constant from model to model, even on the same
The
.I Master
data should always be used whenever available.
.IP Master
A pointer to the master (parent) for this device.
.IP Slaves
A pointer to a list of any slave (child) devices which belong to this
device.
.IP Next
A pointer to any sibling devices which all belong to the same
.I Master.
.IP DevSpec
The address to a buffer containing information specific to the device
.I Type .
The following device
.I Type
values normally provide data via
.I DevSpec :
.RS
.IP DT_CPU
Pointer to a
.I CpuInfo_t
entry (see below).
.IP DT_DISK
Pointer to a 
.I DiskDrive_t
entry.
.IP DT_FRAMEBUFFER
Pointer to a 
.I FrameBuffer_t
entry.
.IP DT_NETIF
Pointer to a
.I NetIF_t
entry.
.IP DT_MONITOR
Pointer to a
.I Monitor_t
entry.
.RE
.IP Addr
This value is obsolete.
.IP Prio
This value is obsolete.
.IP Vec
This value is obsolete.
.SS "CpuInfo_t"
The
.I CpuInfo_t
type specifies CPU information.
It is usually available via
.I DevInfo_t.DevSpec
    char		       *ArchVer;	/* Architecture Version */
    char		       *Serial;		/* Serial# */
    int				BitSize;	/* Bits 32/64/... */
    Large_t			Speed;		/* Clock Speed in Mhz */
    CacheInfo_t		       *L1iCache;	/* L1 Instruction Cache */
    CacheInfo_t		       *L1dCache;	/* L1 Data Cache */
    CacheInfo_t		       *L2Cache;	/* L2 Cache */
    /* General features */
    Bool_t			HasFPU;		/* Has FPU */
    int				Stepping;	/* Stepping */
    Desc_t		       *Features;	/* List of features */
};
typedef struct _CpuInfo		CpuInfo_t;

.RE
.fi
.sp
.PP
The members of
.I CpuInfo_t
are defined as follows:
.IP Man
The name of the manufacturer of the CPU.
.IP Model
The model of CPU.
.IP Arch
The architecture of the CPU.
.IP ArchVer
The architecture version of the CPU.
.IP Serial
The serial number of the CPU.
.IP BitSize
The addressable bitsize of the CPU.
e.g.
.B 32
or
.B 64
.IP Speed
The clock speed of the CPU in mega-hertz.
.IP L1iCache
A
.I CacheInfo_t
entry describing the L1 instruction cache.
.IP L1dCache
A
.I CacheInfo_t
entry describing the L1 data cache.
.IP L2Cache
A
.I CacheInfo_t
entry describing the L2 cache.
.IP HasFPU
.I CacheInfo_t
is as follows:
.RS
.nf

/*
 * Cache Information type
 */
typedef struct {
    int				Enabled;	/* Is this cache enabled? */
    int				Type;		/* Type of Cache */
    int				Level;		/* Level=1, 2, ... */
    Large_t			Size;		/* Size (bytes) */
    int				Speed;		/* Speed (ns) */
    int				Assoc;		/* Associativity */
    int				Lines;		/* # Lines */
    int				LineSize;	/* Line Size (bytes)*/
    int				TLB;		/* # TLB Entries */
    int				TLBAssoc;	/* # TLB Associativity */
    int				Socketed;	/* Is cache socketed? */
    char		       *Location;	/* Location relative to CPU */
    char		       *SramType;	/* SRAM Type */
    char		       *EccType;	/* ECC Type */
    char		       *Mode;		/* Mode (Write Back/Through..*/
} CacheInfo_t;

.fi
.RE
.PP
The members of
.I CacheInfo_t
are defined as follows:
.IP Enabled
A boolean indicating whether the cache is enabled (\fB1\fR) or not (\fB0\fR).
.IP Type
An integer which 
specifies the type of cache.
The value should be one of the following:
.RS
.IP CACHE_TYPE_INST
Instruction cache
.IP CACHE_TYPE_DATA
Data cache
.IP CACHE_TYPE_UNIFIED
Unified cache
.RE
.IP Level
An integer which specifies the level of cache.
i.e. 
.B 1
is an L1 cache,
.B 2
.IP Assoc
A number which specifies the
Associativity value.
.IP Lines
The number of lines in the cache.
.IP LineSize
The size of each line in the cache in bytes.
.IP TLB
The number of TLB entries.
.IP TLBAssoc
The number of TLB associativity.
.IP Socketed
A value of 
.B 1
indicates the cache is socketed.
A value of
.B 0
indicates the cache is not socketed.
A value of
.B -1
indicates an unknown state.
.IP Location
A string describing the location of the cache.
.IP SramType
A string describing the SRAM type.
.IP EccType
A string describing the type of error correction used.
.IP Mode
A string describing the mode of cache.
i.e. 
.B "Write Back", 
etc.

.SH "DESCRIPTION OF License_t"
The
.B License_t
type defines a license entry as follows:
.RS
.nf

/*
 * Types of licenses
 */
#define LT_FLOAT		1		/* Floating/concurrent */
#define LT_NODELOCK		2		/* Locked to 1 node */
/*
 * License Types
 * Order/value must match LT_* values
 */
#define LICENSE_TYPES		{ "", "float", "node", NULL }
#define LICENSE_DESCS		{ "", "Floating", "Node Locked", NULL }

    char		       *VendorServerVer;/* Vendor server soft ver */
    int				Count;		/* # of allowed licenses */
    char		       *Issuer;		/* Who issued license */
    char		       *Hostid;		/* Hostid lic is for */
    char		       *IssueDate;	/* Date lic was issued */
    char		       *StartDate;	/* Start date */
    char		       *ExpireDate;	/* Date of expiration */
    char		       *Key;		/* License key */
    char		       *Serial;		/* Serial Number */
    struct _License	       *Next;		/* Next member */
};
typedef struct _License		License_t;

.fi
.RE
The members of
.B License_t
are defined as follows:
.RS
.IP SoftName
The name of the software.
.IP SoftVer
The version of the software.
.IP Type
The type of entry as follows:
.RS
.IP LT_FLOAT
Floating/concurrent
.IP LT_NODELOCK
Locked to one node (system)
.RE
.IP TypeStr
String version of Type.
.IP TypeDescStr
A descriptive text describing Type.
.IP Port
The port the license server is running on.
.IP File
The license file.
.IP ServerSoft
Name of license server software.
.IP ServerVer
Version of license server software.
.IP VendorServerSoft
The name of the vendor supplied license agent.
.IP VendorServerVer
The version of the vendor supplied license agent.
.IP Count
The number of allowed licenses (aka RTUs).
.IP Issuer
Who issued the license.
.IP Hostid
The
.B PartInfo_t
type defines a partition entry as follows:
.sp
.nf
.RS
/*
 * Partition Information (CN_PARTITION)
 */
struct _PartInfo {
    char	       *Title;		/* Describes this entry */
    char	       *DevPath;	/* Dev Path e.g. /dev/dsk/c0t0s1 */
    char	       *DevPathRaw;	/* Raw Dev Path e.g. /dev/rdsk/c0t0s1 */
    char	       *DevName;	/* Dev Name e.g. c0t0 */
    char	       *BaseName;	/* c0t0s1 */
    char	       *Name;		/* Name e.g. s1 */
    int			Num;		/* Part # for this disk e.g. 1 */
    char	       *Type;		/* Type e.g. ufs */
    char	       *TypeDesc;	/* Description of Type */
    u_int		TypeNum;	/* Numeric value of Type if any */
    char	       *UsageStatus;	/* String value for Usage (below) */
    char	       *MntName;	/* Mount Name e.g. /usr */
    char	      **MntOpts;	/* Mount Options e.g. rw,quota */
    Large_t		Size;		/* Size of partition (MB) */
    Large_t		AmtUsed;	/* Amt of space currently used (MB)*/
    int			SecSize;	/* Size of 1 sector */
    Large_t		StartSect;	/* Starting Sector # */
    Large_t		EndSect;	/* Ending Sector # */
    Large_t		NumSect;	/* Number of Sectors (size) */
    /* Internal use only */
    int			Usage;		/* How used, one of PIU_* */
    struct _PartInfo   *Next;
};
typedef struct _PartInfo PartInfo_t;
.RE
.fi
.sp
The members of
.B PartInfo_t
are defined as follows:
.RS
.IP Title
A string which helps identify this entry.
.IP DevPath
A string which names the pathname of the 
(block) device which represents this
partition.
e.g.
.B /dev/dsk/c0t0d0s3
.IP DevPathRaw
A string which names the pathname of the raw (character) 
device which represents this
e.g.
.B s3
.IP Num
The numeric number of this partition which corresponds to
.B Name.
e.g.
.B 3
.IP Type
A short string, usually a single word, 
describing the type of partition this is.
e.g.
.B ufs
.IP TypeDesc
A more verbose description of the parititoin type.
e.g.
.B "Unix File System"
.IP TypeNum
The numeric type identifier of this partition as described by
.B Type
and 
.B TypeDesc.
.IP UsageStatus
A string containing information on how this partition is used.
e.g.
For a UFS filesystem this would contain a mount point such as
.B /usr
.IP MntName
The name of the mount point.
e.g.
.B /usr
.IP MntOpts
An array of strings containing the options used by the OS to mount this 
partition.
e.g. 
.B "rw" 
.B "quota" 
.B "logging"
.IP Size
The total size, in MB, of this partition.
.IP AmtUsed
The amount of space, in MB, this partition currently consumes.
.IP SecSize
The number of bytes in 1 sector (usually 512).
.IP StartSect
The location of the first, starting sector of this partition relative to the
entire disk.
.IP EndSect
The location of the last sector of this partition relative to the entire disk.
.IP NumSect
The number of sectors (\fBEndSect - StartSect\fR) this partition uses.
.RE

/*
 * Printer Protocol names - must match PP_*
 */
#define PRINTER_PROTO_LIST \
{ \
    NULL, "Local", "LPD", "SYSV", "SMB" \
}

/*
 * Printer Languages
 */
#define PL_PS			"PostScript"	/* PostScript */
#define PL_PS1			"PostScript-1"	/* PostScript Level 1 */
#define PL_PS2			"PostScript-2"	/* PostScript Level 2 */
#define PL_PS3			"PostScript-3"	/* PostScript Level 3 */
#define PL_PCL			"PCL"		/* PCL */

/*
 * Printer class data
 */
struct _Printer {
    char		       *Queue;		/* Name of queue */
    char		      **Aliases;	/* Queue aliases */
    char		       *Desc;		/* Queue Description */
    char		       *Vendor;		/* Printer vendor */
    char		       *Model;		/* Printer model */
    int				Proto;		/* Protocol - One of PP_* */
    char		       *Device;		/* File name of device */
    char		       *Server;		/* Name of server */
    char		       *RemoteQueue;	/* Queue name on Server */
    char		      **Langs;		/* Supported Languages PL_* */
    char		       *SpoolDir;	/* Spool directory */
    long			MaxJobSize;	/* Max size of jobs (KB) */
    Desc_t		       *DescList;	/* Descriptions */
    struct _Printer	       *Next;		/* Next member */
};
typedef struct _Printer		Printer_t;

.fi
.RE
.PP
The members of
.B Printer_t
are defined as follows:
.RS
.IP Queue
The canonical name of the printer queue.
.IP Aliases
Array of aliases for printer queue.
.IP Desc
Description of queue.
This frequently includes a description of the printer type and its location.
An array of languages which the printer speaks.
i.e. PostScript, etc.
.IP SpoolDir
The directory on the system where jobs for this printer are spooled 
temporarily.
.IP MaxJobSize
The max size of an individual job in KB.
.IP DescList
Misc descriptive info.
.RE

.SH "DESCRIPTION OF SoftInfo_t"
The software information data type is
.I SoftInfo_t
which is defined as:
.sp
.nf
.RS
struct _SoftInfo {
    char	       *EntryType;	/* Entry Type MC_SET_*_S */
    int			EntryTypeNum;	/* Numeric EntryType */
    char	       *Name;		/* Name */
    char	       *Version;	/* Version */
    char	       *Revision;	/* Revision for this Version */
    char	       *Desc;		/* Description of software */
    char	       *DescVerbose;	/* Verbose Description */
    char	       *URL;	 	/* Product URL */
    char	       *License; 	/* Product License */
    char	       *Copyright; 	/* Product Copyright */
    char	       *Category;	/* Category pkg belongs to */
    char	       *SubCategory;	/* Sub Category */
    char	       *OSname;		/* OS name runs on */
    char	       *OSversion;	/* OS version runs on */
    char	       *Arch;		/* Architecture runs on */
    char	       *ISArch;		/* Instruct. Set Arch. */
    char	       *InstDate;	/* Installation Date */
    char	       *BuildDate;	/* Build Date */
    char	       *ProdStamp;	/* Production Stamp */
    char	       *BaseDir;	/* Base Dir for files */
    Large_t		DiskUsage;	/* Space used by FileList */
    SoftFileList_t     *FileList;	/* List of Files */
    Desc_t	       *DescList;	/* Misc Descriptions */
    /* Vendor's info */
    char	       *VendorName;	/* Name of vendor */
    char	       *VendorEmail;	/* Email of vendor */
    char	       *VendorPhone;	/* Phone of vendor */
    char	       *VendorStock;	/* Vendor's Stock # for Pkg */
    /* Tree Links */
    struct _SoftInfo   *Master;		/* (Up) Our parent */
    struct _SoftInfo   *Slaves;		/* (Down) Children */
    struct _SoftInfo   *Next;		/* (Side) Siblings */
};
.RS
.IP MC_SET_PKG_S
Package - this entry represents a collection of installed files/directories.
This is the lowest level 
.B EntryType.
.IP MC_SET_PROD_S
Product - this entry represents a collection of packages (MC_SET_PKG_S).
It normally acts as a parent node in a hierarchical tree of software 
packages and
usually does not include any attributes other than 
.B Slaves 
and 
.B Next .
.RE
.sp
.IP EntryTypeNum
The corresponding numeric value for 
.B EntryType.
The following constants are valid values:
.sp
.RS
.IP MC_SET_PKG
Numeric value for 
.B MC_SET_PKG_S.
.IP MC_SET_PROD
Numeric value for
.B MC_SET_PROD_S.
.RE
.sp
.IP Name
A string which describes the package (if 
.B EntryType
==
.B MC_SET_PKG )
or the product (if
.B EntryType
==
.B MC_SET_PROD ).
e.g. 
.B SUNWcsr
.IP Version
A string which indicates the version of this package or product.
e.g.
.B 5.1
.IP Revision
A string indicatating the revision of this package.
e.g.
.B 2000-02-03
.IP Desc
A short string without any newline (\\n) characters which 
provides a description of this package.
e.g. 
.B "Free to everyone with no restrictions"
.IP Copyright
A string naming or describing the copyright terms of this package or product.
The string may include embedded newline characters.
e.g. 
.B "(c)Copyright 1901-2101 Big Software Company"
.IP Category
A string describing the primary category this package or product belongs to.
e.g.
.B "system"
.IP SubCategory
A string describing the secondary category, often within 
.B Category,
that this package or product belongs to.
e.g.
.B openwindows
.IP OSname
A string containing the name of the operating system this package runs on.
e.g.
.B "Linux"
.IP OSversion
A string containing the version of the operating system this package runs on.
e.g.
.B "2.2.1"
.IP Arch
A string naming the CPU architecture which this package runs on.
e.g.
.B "x86"
.IP ISArch
A string naming the Instruction Set Architecture which this package runs on.
The ISA usually represents a more specific value than
.B Arch.
e.g.
.B "Pentium-III"
.IP InstDate
A string containing the date this package was installed.
e.g.
.B "Feb 02 1999 20:43"
.IP BuildDate
A string containing the date this package was built.
e.g.
.B "1/15/98"
.IP ProdStamp
A string generated whent he package was built to identify the
production of the package.
e.g.
.B "buttercup19980904173114"
.IP BaseDir
A string naming the base directory under which package files are installed.
e.g.
.B "/usr"
.IP DiskUsage
The parent (master) node for this package in the SoftInfo_t tree.
.IP Slaves
The slave (child) nodes for this package.
.IP Next
The peer nodes in the SoftInfo_t tree.
.IP FileList
A list of files associated with this package.
See 
.B SoftFileList_t 
for more information.
.RE

.SH "DESCRIPTION OF SoftFileList_t"
The
.B SoftFileList_t
type defines software file information usually in a linked list.
It is defined as follows:
.sp
.nf
.RS
/*
 * Software File Data
 */
struct _SoftFileData {
    int			Type;		/* File, dir, symlink, etc */
    char	       *Path;		/* Path to file */
    char	       *LinkTo;		/* Link To what */
    Large_t		FileSize;	/* Size of file */
    char	       *MD5;		/* MD5 checksum */
    char	       *CheckSum;	/* Platform specific checksum */
    char	      **PkgNames;	/* List of used by Pkgs */
    struct _SoftFileData *Next;		/* Next entry */
};
typedef struct _SoftFileData SoftFileData_t;

/*
 * List of SoftFileData_t entries
 */
struct _SoftFileList {
    SoftFileData_t     *FileData;	/* Ptr to FileData entry */
    struct _SoftFileList *Next;		/* Next entry in our list */
};
typedef struct _SoftFileList SoftFileList_t;
/*
 * SoftFile Types for SoftFileData.Type
 */
#define SFT_FILE	1		/* Plain file */
#define SFT_FILE_S	"File"
#define SFT_HLINK	2		/* Hard Link */
#define SFT_HLINK_S	"Hard-Link"
#define SFT_SLINK	3		/* Soft Link */
#define SFT_SLINK_S	"Symbolic-Link"
The actual file data is defined in
.B SoftFileList_t->FileData.
.PP
The members of 
.B SoftFileData_t 
are defined as follows:
.RS
.IP Type
Indicates the type of file this is.
The valid values are defined by the following constants:
.RS
.IP \fBSFT_FILE\fR
A regular file.
.IP \fBSFT_HLINK\fR
A hard link.
.IP \fBSFT_SLINK\fR
A symbolic link.
.IP \fBSFT_DIR\fR
A directory.
.IP \fBSFT_CDEV\fR
A character special device file.
.IP \fBSFT_BDEV\fR
A block special device file.
.RE
.IP Path
The pathname of this entry.
e.g.
.B /bin/cp
.IP LinkTo
If 
.B Type
is 
.B SFT_HLINK
or
.B SFT_SLINK
then this variable names the path that
.B Path
is linked to.
.IP FileSize
The size of this file.
Usually only valid if
.B Type
is 
.B SFT_FILE.
.IP MD5
The MD5 checksum of the file.
.IP CheckSum
The platform specific checksum of the file.
.IP PkgNames
A list of package names this file belongs to.
.RE

specific as well as what OS libraries are needed.
.PP
The 
.B libs
command automatically determines the options to specify to your
compiler/linker command to link in both the mcSysInfo libraries and
the required OS libraries.
Normally you just need to "backtic" the command at the end of your linking
command.
i.e.
.RS
.nf

.B `/opt/sysinfo/libexec/bin/libs`

.fi
.RE
.SH NOTES
File descriptors are opened for certain
.B MCSI_*
commands
when using the 
.B MCSIOP_CREATE
operator depending upon the platform upon which
.B mcSysInfo()
is operating on.
All file descriptors which are opened by the platform specific
functions of
.B mcSysInfo()
are closed before returning.
.SH FILES
/opt/sysinfo/config 	\- Config files read at runtime
.SH "SEE ALSO"
mcsysinfo(1),
mcsysinfoperl(3)
.SH URL
http://www.MagniComp.com/sysinfo