#ifndef _PICL2DOOR_H
#define _PICL2DOOR_H
#ifdef __cplusplus
extern "C" {
#endif
#define PICLD_DOOR_VERSION 1
#define PICLD_DOOR "/var/run/picld_door"
#define PICLD_DOOR_COOKIE ((void *)(0xdeaffeed ^ PICLD_DOOR_VERSION))
typedef enum {
PICL_CNUM_INIT = 0x1,
PICL_CNUM_FINI,
PICL_CNUM_GETROOT,
PICL_CNUM_GETATTRVAL,
PICL_CNUM_GETATTRVALBYNAME,
PICL_CNUM_GETATTRINFO,
PICL_CNUM_GETFIRSTATTR,
PICL_CNUM_GETNEXTATTR,
PICL_CNUM_GETATTRBYNAME,
PICL_CNUM_GETATTRBYROW,
PICL_CNUM_GETATTRBYCOL,
PICL_CNUM_SETATTRVAL,
PICL_CNUM_SETATTRVALBYNAME,
PICL_CNUM_PING,
PICL_CNUM_WAIT,
PICL_CNUM_ERROR,
PICL_CNUM_FINDNODE,
PICL_CNUM_NODEBYPATH,
PICL_CNUM_FRUTREEPARENT
} picl_callnumber_t;
typedef union {
picl_nodehdl_t nodeh;
picl_prophdl_t proph;
char str[1];
} propval_t;
#define ret_buf u.str
#define ret_nodeh u.nodeh
#define ret_proph u.proph
typedef struct {
picl_callnumber_t cnum;
char buf[4];
} picl_req_t;
typedef struct {
picl_callnumber_t cnum;
char buf[4];
} picl_ret_t;
typedef struct {
picl_callnumber_t cnum;
unsigned int clrev;
} picl_reqinit_t;
typedef struct {
picl_callnumber_t cnum;
int rev;
} picl_retinit_t;
typedef struct {
picl_callnumber_t cnum;
} picl_reqfini_t;
typedef struct {
picl_callnumber_t cnum;
} picl_retfini_t;
typedef struct {
picl_callnumber_t cnum;
} picl_reqroot_t;
typedef struct {
picl_callnumber_t cnum;
picl_nodehdl_t rnode;
} picl_retroot_t;
typedef struct {
picl_callnumber_t cnum;
picl_prophdl_t attr;
uint32_t bufsize;
} picl_reqattrval_t;
typedef struct {
picl_callnumber_t cnum;
picl_prophdl_t attr;
uint32_t nbytes;
propval_t u;
} picl_retattrval_t;
typedef struct {
picl_callnumber_t cnum;
picl_nodehdl_t nodeh;
char propname[PICL_PROPNAMELEN_MAX];
uint32_t bufsize;
} picl_reqattrvalbyname_t;
typedef struct {
picl_callnumber_t cnum;
picl_nodehdl_t nodeh;
char propname[PICL_PROPNAMELEN_MAX];
uint32_t nbytes;
propval_t u;
} picl_retattrvalbyname_t;
typedef struct {
picl_callnumber_t cnum;
picl_prophdl_t attr;
} picl_reqattrinfo_t;
typedef struct {
picl_callnumber_t cnum;
picl_prophdl_t attr;
picl_prop_type_t type;
unsigned int accessmode;
uint32_t size;
char name[PICL_PROPNAMELEN_MAX];
} picl_retattrinfo_t;
typedef struct {
picl_callnumber_t cnum;
picl_nodehdl_t nodeh;
} picl_reqfirstattr_t;
typedef struct {
picl_callnumber_t cnum;
picl_nodehdl_t nodeh;
picl_prophdl_t attr;
} picl_retfirstattr_t;
typedef struct {
picl_callnumber_t cnum;
picl_prophdl_t attr;
} picl_reqnextattr_t;
typedef struct {
picl_callnumber_t cnum;
picl_prophdl_t attr;
picl_prophdl_t nextattr;
} picl_retnextattr_t;
typedef struct {
picl_callnumber_t cnum;
picl_nodehdl_t nodeh;
char propname[PICL_PROPNAMELEN_MAX];
} picl_reqattrbyname_t;
typedef struct {
picl_callnumber_t cnum;
picl_nodehdl_t nodeh;
char propname[PICL_PROPNAMELEN_MAX];
picl_prophdl_t attr;
} picl_retattrbyname_t;
typedef struct {
picl_callnumber_t cnum;
picl_prophdl_t attr;
} picl_reqattrbyrow_t;
typedef struct {
picl_callnumber_t cnum;
picl_prophdl_t attr;
picl_prophdl_t rowattr;
} picl_retattrbyrow_t;
typedef struct {
picl_callnumber_t cnum;
picl_prophdl_t attr;
} picl_reqattrbycol_t;
typedef struct {
picl_callnumber_t cnum;
picl_prophdl_t attr;
picl_prophdl_t colattr;
} picl_retattrbycol_t;
typedef struct {
picl_callnumber_t cnum;
picl_prophdl_t attr;
uint32_t bufsize;
char valbuf[1];
} picl_reqsetattrval_t;
typedef struct {
picl_callnumber_t cnum;
picl_prophdl_t attr;
} picl_retsetattrval_t;
typedef struct {
picl_callnumber_t cnum;
picl_nodehdl_t nodeh;
char propname[PICL_PROPNAMELEN_MAX];
uint32_t bufsize;
char valbuf[1];
} picl_reqsetattrvalbyname_t;
typedef struct {
picl_callnumber_t cnum;
picl_nodehdl_t nodeh;
char propname[PICL_PROPNAMELEN_MAX];
} picl_retsetattrvalbyname_t;
typedef struct {
picl_callnumber_t cnum;
} picl_reqping_t;
typedef struct {
picl_callnumber_t cnum;
} picl_retping_t;
typedef struct {
picl_callnumber_t cnum;
unsigned int secs;
} picl_reqwait_t;
typedef struct {
picl_callnumber_t cnum;
unsigned int secs;
int retcode;
} picl_retwait_t;
typedef struct {
picl_callnumber_t cnum;
picl_nodehdl_t nodeh;
char propname[PICL_PROPNAMELEN_MAX];
picl_prop_type_t ptype;
uint32_t valsize;
char valbuf[1];
} picl_reqfindnode_t;
typedef struct {
picl_callnumber_t cnum;
picl_nodehdl_t rnodeh;
} picl_retfindnode_t;
typedef struct {
picl_callnumber_t cnum;
uint32_t psize;
char pathbuf[PATH_MAX];
} picl_reqnodebypath_t;
typedef struct {
picl_callnumber_t cnum;
picl_nodehdl_t nodeh;
} picl_retnodebypath_t;
typedef struct {
picl_callnumber_t cnum;
picl_nodehdl_t devh;
} picl_reqfruparent_t;
typedef struct {
picl_callnumber_t cnum;
picl_nodehdl_t fruh;
} picl_retfruparent_t;
typedef struct {
picl_callnumber_t cnum;
picl_callnumber_t in_cnum;
picl_errno_t errnum;
} picl_reterror_t;
typedef union {
picl_req_t in;
picl_ret_t out;
picl_reqinit_t req_init;
picl_retinit_t ret_init;
picl_reqfini_t req_fini;
picl_retfini_t ret_fini;
picl_reqroot_t req_root;
picl_retroot_t ret_root;
picl_reqattrval_t req_attrval;
picl_retattrval_t ret_attrval;
picl_reqattrvalbyname_t req_attrvalbyname;
picl_retattrvalbyname_t ret_attrvalbyname;
picl_reqattrinfo_t req_attrinfo;
picl_retattrinfo_t ret_attrinfo;
picl_reqfirstattr_t req_firstattr;
picl_retfirstattr_t ret_firstattr;
picl_reqnextattr_t req_nextattr;
picl_retnextattr_t ret_nextattr;
picl_reqattrbyname_t req_attrbyname;
picl_retattrbyname_t ret_attrbyname;
picl_reqattrbyrow_t req_attrbyrow;
picl_retattrbyrow_t ret_attrbyrow;
picl_reqattrbycol_t req_attrbycol;
picl_retattrbycol_t ret_attrbycol;
picl_reqsetattrval_t req_setattrval;
picl_retsetattrval_t ret_setattrval;
picl_reqsetattrvalbyname_t req_setattrvalbyname;
picl_retsetattrvalbyname_t ret_setattrvalbyname;
picl_reqping_t req_ping;
picl_retping_t ret_ping;
picl_reqwait_t req_wait;
picl_retwait_t ret_wait;
picl_reqfindnode_t req_findnode;
picl_retfindnode_t ret_findnode;
picl_reqnodebypath_t req_nodebypath;
picl_retnodebypath_t ret_nodebypath;
picl_reqfruparent_t req_fruparent;
picl_retfruparent_t ret_fruparent;
picl_reterror_t ret_error;
} picl_service_t;
#ifdef __cplusplus
}
#endif
#endif