MiniPICL
In Solaris Platform Information and Control Library (PICL) provides
access to various platform information organized as a tree. Unfortunately,
64-bit version of libpicl, library shipped to work with picld is broken.
This module mimics libpicl behavior, but implements only a subset of it.
All functions have similiar prototypes as libpicl ones do, so useman function_name
to get information on them.
References
libpicl is broken for 64-bit apps
Oracle Bug 18409563 - libpicl is broken for 64-bit apps
Constants
PICL_FAILURE, PICL_NOTINITIALIZED, PICL_NODENOTFOUND, PICL_SUCCESS, PICL_WALK_TERMINATE, PICL_TREEBUSY, PICL_ENDOFLIST, PICL_UNKNOWNSERVICE, PICL_CANTPARENT, PICL_INVREFERENCE, PICL_WALK_CONTINUE, PICL_VALUETOOBIG, PICL_INVALIDHANDLE, PICL_RESERVEDNAME, PICL_NOSPACE, PICL_NOTWRITABLE, PICL_PROPEXISTS, PICL_PROPNOTFOUND, PICL_NOTTABLE, PICL_TIMEDOUT, PICL_PROPVALUNAVAILABLE, PICL_STALEHANDLE, PICL_NOTPROP, PICL_INVALIDARG, PICL_CANTDESTROY, PICL_NOTNODE, PICL_PERMDENIED, PICL_NORESPONSE, PICL_NOTREADABLE, PICL_NOTSUPPORTED
PICL error codes
#define PICL_SUCCESS 0 #define PICL_FAILURE 1 #define PICL_NORESPONSE 2 #define PICL_UNKNOWNSERVICE 3 #define PICL_NOTINITIALIZED 4 #define PICL_INVALIDARG 5 #define PICL_VALUETOOBIG 6 #define PICL_PROPNOTFOUND 7 #define PICL_NOTTABLE 8 #define PICL_NOTNODE 9 #define PICL_NOTPROP 10 #define PICL_ENDOFLIST 11 #define PICL_PROPEXISTS 12 #define PICL_NOTWRITABLE 13 #define PICL_PERMDENIED 14 #define PICL_INVALIDHANDLE 15 #define PICL_STALEHANDLE 16 #define PICL_NOTSUPPORTED 17 #define PICL_TIMEDOUT 18 #define PICL_CANTDESTROY 19 #define PICL_TREEBUSY 20 #define PICL_CANTPARENT 21 #define PICL_RESERVEDNAME 22 #define PICL_INVREFERENCE 23 #define PICL_WALK_CONTINUE 24 #define PICL_WALK_TERMINATE 25 #define PICL_NODENOTFOUND 26 #define PICL_NOSPACE 27 #define PICL_NOTREADABLE 28 #define PICL_PROPVALUNAVAILABLE 29
Functions
picl_get_root
TSDOC_FORCE int picl_get_root(picl_nodehdl_t *rooth)
picl_get_propval_by_name, picl_get_propval
TSDOC_FORCE int picl_get_propval(picl_prophdl_t proph, void *valbuf, size_t nbytes) TSDOC_FORCE int picl_get_propval_by_name(picl_nodehdl_t nodeh, const char *propname,void *valbuf, size_t nbytes)
picl_get_prop_by_name
TSDOC_FORCE int picl_get_prop_by_name(picl_nodehdl_t nodeh, const char *name,picl_prophdl_t *proph)
picl_get_propinfo_by_name, picl_get_propinfo
TSDOC_FORCE int picl_get_propinfo(picl_prophdl_t proph, picl_propinfo_t *pinfo) TSDOC_FORCE int picl_get_propinfo_by_name(picl_nodehdl_t nodeh, const char *prop_name,picl_propinfo_t *pinfo, picl_prophdl_t *proph)
picl_walk_tree_by_class
TSDOC_FORCE int picl_walk_tree_by_class(picl_nodehdl_t rooth, const char *classname,void *c_args, int (*callback_fn)(picl_nodehdl_t hdl, void *args))
picl_shutdown, picl_initialize
TSDOC_FORCE int picl_initialize(void) TSDOC_FORCE int picl_shutdown(void)
Types
typedef uint64_t picl_nodehdl_t; typedef uint64_t picl_prophdl_t;
picl_prop_type_t
typedef enum { PICL_PTYPE_UNKNOWN = 0x0, PICL_PTYPE_VOID, PICL_PTYPE_INT, PICL_PTYPE_UNSIGNED_INT, PICL_PTYPE_FLOAT, PICL_PTYPE_REFERENCE, PICL_PTYPE_TABLE, PICL_PTYPE_TIMESTAMP, PICL_PTYPE_BYTEARRAY, PICL_PTYPE_CHARSTRING } picl_prop_type_t;
picl_propinfo_t
typedef struct { picl_prop_type_t type; unsigned int accessmode; size_t size; char name[PICL_PROPNAMELEN_MAX]; } picl_propinfo_t;