ソース変更ガイド

HPSS4.5とHPSS6.2では用意されているヘッダーが異なります。以下のヘッダー一覧で太字で示されている箇所は、HPSS4.5とHPSS6.2でファイル名が同じだけれども、内容が異なるヘッダーです。

ヘッダー一覧

HPSS4.5

HPSS6.2

acct_av.h
acct_av_common.h
acct_av_lib.h
acct_av_lib_internal.h
acct_av_log.h
acct_av_md.h
acct_av_metadata.h
acct_avaledit.h
acct_config.h
acct_hpss.h
acct_interface.h
acct_log.h
acct_logging.h
acct_metadata.h
acct_site.h
acct_summary.h
api_internal.h
api_log.h
auth_mgr.h
auth_shmem.h
bfs.h
bfs_abort.h
bfs_acct.h
bfs_asynch.h
bfs_cache.h
bfs_config.h
bfs_control.h
bfs_cos.h
bfs_exlock.h
bfs_funcs.h
bfs_gk.h
bfs_interface_def.h
bfs_lock.h
bfs_logging.h
bfs_metadata.h
bfs_rtm.h
bfs_ssm.h




cos_cache.h
cos_metadata.h
cs_Log.h
cs_LogcConfig.h
cs_LogCm.h
cs_LogCmIod.h
cs_LogCmIodXdr.h
cs_LogCmXdr.h
cs_LogdConfig.h
cs_LogErr.h
cs_LogFileAttr.h
cs_LogMsg.h
cs_LogPolicy.h

dce_hpsserrno.h
dce_logging.h
dces_msg.h
file_family_metadata.h
gk_AsyncCalls.h
gk_Config.h
gk_Connect.h
gk_Constants.h
gk_Entry.h
gk_EntryCache.h
gk_gk_IFStructs.h
gk_Globals.h
gk_IntConstants.h
gk_LogIndices.h
gk_LogMessages.h
gk_metadata.h
gk_Protos.h
gk_RTM.h
gk_ShutDown.h
gk_SiteProtos.h
gsz_demo1.h
gszapi.h
gszdce.h
gszdceIF.h
gszmvr.h
gsztoken.h
hacl.h
hpss_3494.h

hpss_aml_pvr.h
hpss_ampex.h
hpss_api.h
hpss_api_def.h


hpss_CfgParser.h



hpss_cores.h
hpss_cos.h
hpss_dirent.h
hpss_env_defs.h
hpss_errno.h

hpss_file_family.h
hpss_ftpls.h


hpss_Getenv.h
hpss_global_config.h
hpss_global_metadata.h
hpss_hier.h
hpss_hier_cache.h
hpss_idl_types.h

hpss_interop.h
hpss_iod.h

hpss_iodior.h


hpss_limits.h
hpss_lint.h

hpss_logging.h
hpss_ls.h
hpss_lto.h

hpss_media_dflts.h
hpss_media_type.h



hpss_migr_policy.h

hpss_netopt.h

hpss_ofd.h
hpss_options.h


hpss_purge_policy.h
hpss_ReleaseLocks.h
hpss_req_list.h


hpss_rpc_handles.h
hpss_rpcconn.h
hpss_rw_ops.h
hpss_sclass.h
hpss_sclass_cache.h
hpss_sclass_threshold.h







hpss_server_args.h
hpss_server_attr.h

hpss_site.h
hpss_sleep.h
hpss_soid_func.h
hpss_sort.h

hpss_srvstate.h
hpss_stk.h
hpss_storsubsys_config.h
hpss_storsubsys_metadata.h



hpss_thread_safe.h
hpss_timemac.h
hpss_timestamp_sec.h
hpss_trpc_handles.h


hpss_types.h

hpss_vattr.h
hpss_version.h

hpssaddr.h

hpsscomm.h
hpssd.h
hpssd_msg.h
hpssIF.h
hpssIF_rpcs.h
hpssmutex.h
hpssoid.h
hpsssem.h
hpsswrap.h
hsec.h
hsec_api.h
hsec_audit.h
hsec_info.h
hsec_log.h
log_metadata.h
ls_api.h
ls_common.h
ls_connect.h
ls_internal.h
ls_lock.h
ls_locmap.h
ls_logging.h
ls_metadata.h
ls_policy.h
ls_types.h
lsc_config.h
lsc_internal.h
metadata.h
mm_errno.h
mm_idl_types.h
mm_mon_metadata.h
mm_ssm_data.h
mpio.h
mpio_errno.h
mpio_MPI2.h
mpio_threads.h
mpiof.h
mps.h
mps_ckpt.h
mps_config.h
mps_conn.h
mps_coshier.h
mps_interface_def.h
mps_logging.h
mps_metadata.h
mps_prototypes.h
mps_report.h
mps_tape.h
mps_wrapper_badofd.h
mps_wrapper_reconn.h
mvr_asyncio.h
mvr_clientif.h
mvr_config.h
mvr_decfuncs.h
mvr_devdesc.h
mvr_device.h
mvr_disk.h
mvr_dstfuncs.h
mvr_iodior.h
mvr_ipc.h
mvr_ipi3.h
mvr_log.h
mvr_metadata.h
mvr_misc.h
mvr_mvrstate.h
mvr_protint.h
mvr_protocol.h
mvr_pthru.h
mvr_register.h
mvr_reqdesc.h
mvr_request.h

mvr_sem.h
mvr_shmem.h
mvr_srcsink.h
mvr_tape.h
ndcg_log.h
ndcg_metadata.h
ndcg_misc.h
ndcg_register.h
ndcg_sem.h
ndcg_shmem.h
ndcg_tcpproc.h
ndcg_types.h
ndcl_hpss_api.h
ndcl_internal.h
ndcl_log.h
ndcl_thread.h
nfs_metadata.h
ns_Attrs.h
ns_Blocks.h
ns_Compress.h
ns_Config.h
ns_Connect.h
ns_Constants.h
ns_CoreStructs.h
ns_Crash.h
ns_FilesetCache.h
ns_FreeList.h
ns_Globals.h
ns_IFStructs.h

ns_KeyTypes.h
ns_Lint.h
ns_LogIndices.h
ns_LogMessages.h
ns_metadata.h

ns_PathNameCache.h
ns_Protos.h
ns_TransData.h
object.h
owner.h
pdata.h
piofsie.h
pm.h
pm_IFdefs.h
pm_interface.h
pvl.h
pvl_definitions.h
pvl_drive_attr.h
pvl_internal.h
pvl_job_attr.h
pvl_log.h
pvl_metadata.h
pvl_pvl_attr.h
pvl_queue_attr.h
pvl_request_attr.h
pvl_vol_attr.h
pvr.h
pvr_cart_attr.h
pvr_definitions.h
pvr_metadata.h
pvr_pvr_attr.h
rtm_interface_def.h
rtm_log.h
rtm_reqlist.h




scsictl.h
security.h
server_metadata.h
site_metadata.h
ss.h
ss_io.h
ss_log.h
ss_map.h
ss_metadata.h
ss_misc.h
ss_pv.h
ss_pvcommon.h
ss_pvl.h
ss_pvl_mount.h
ss_pvl_wrappers.h
ss_pvlist.h

ss_rtm.h
ss_session.h
ss_ss.h
ss_sscommon.h
ss_ssm.h
ss_types.h
ss_util.h
ss_vv.h
ss_vvcommon.h
ssm.h
ssm_defs.h
ssm_devices.h
ssm_ds.h
ssm_ds_java.h
ssm_ds_java_structs.h
ssm_ds_messages.h
ssm_errno.h
ssm_sm.h
ssm_sm_msg.h
ssm_sm_net.h
ssm_sm_notify.h
ssm_sm_prototypes.h
ssm_sm_reg.h
ssm_sm_th.h
ssm_types.h
tools.h

traniod.h
u_signed64.h

util.h
util_bbtree.h
util_stack.h


acct_av_common.h
acct_av_lib.h
acct_av_lib_internal.h
acct_av_log.h



acct_config.h
acct_hpss.h






api_internal.h
api_log.h













bfs_interface_def.h





bfs_userif_def.h
core_api_def.h
core_diagnostics.h
core_mo.h


cs_Log.h

cs_LogCm.h
cs_LogCmIod.h

cs_LogCmXdr.h

cs_LogErr.h
cs_LogFileAttr.h
cs_LogMsg.h
cs_LogPolicy.h
cs_LogShmem.h


























hacl.h

hpss_acl_cons.h


hpss_api.h
hpss_api_def.h
hpss_attrs.h
hpss_authz_token.h
hpss_CfgParser.h
hpss_config.h
hpss_connmgr.h
hpss_Container.h
hpss_cores.h
hpss_cos.h
hpss_dirent.h
hpss_env_defs.h
hpss_errno.h
hpss_ErrorText.h


hpss_gasapi.h
hpss_gasmech.h
hpss_Getenv.h





hpss_InfraLog.h
hpss_interop.h
hpss_iod.h
hpss_iod_clnt.h

hpss_keytab.h
hpss_ldap.h
hpss_limits.h

hpss_localsite.h
hpss_logging.h
hpss_ls.h

hpss_mech.h

hpss_media_type.h
hpss_memalign.h
hpss_menu.h
hpss_menu_tui.h

hpss_msg.h
hpss_netopt.h
hpss_obj_handle.h


hpss_proc.h
hpss_pthread.h



hpss_rpc.h
hpss_rpc_defs.h


hpss_rw_ops.h
hpss_sclass.h


hpss_scsi.h
hpss_sec.h
hpss_sec_api.h
hpss_sec_audit.h
hpss_sec_authz.h
hpss_sec_info.h
hpss_sec_log.h

hpss_server_attr.h
hpss_server_types.h

hpss_sleep.h
hpss_soid_func.h

hpss_stat.h




hpss_String.h
hpss_StringBuf.h
hpss_StringUtil.h
hpss_thread_safe.h



hpss_tui.h
hpss_tui_binding.h
hpss_types.h
hpss_uuid.h
hpss_vattr.h
hpss_version.h
hpss_xdr.h
hpssaddr.h
hpssclntaddr.h





hpssmutex.h
hpssoid.h









ls_common.h

ls_internal.h


ls_logging.h


ls_types.h
lsc_config.h
lsc_internal.h























mvr_asyncio.h
mvr_clientif.h
mvr_config.h

mvr_devdesc.h
mvr_device.h
mvr_disk.h
mvr_dstfuncs.h
mvr_iodior.h
mvr_ipc.h
mvr_ipi3.h
mvr_log.h

mvr_misc.h
mvr_mvrstate.h
mvr_protint.h
mvr_protocol.h
mvr_pthru.h
mvr_register.h
mvr_reqdesc.h
mvr_request.h
mvr_san3p.h
mvr_sem.h
mvr_shmem.h
mvr_srcsink.h
mvr_tape.h


















ns_Constants.h






ns_interface_defs.h





ns_ObjHandle.h





pdata.h





pvl_definitions.h
pvl_drive_attr.h













rtm_interface_def.h


san3p.h
san3p_cfg.h
san3p_msgdefs.h
san3p_util.h















ss_pvlist.h
ss_resource_md.h





ss_types.h




















toolslib.h
traniod.h
u_signed64.h
unixpwent.h

util_bbtree.h




上記に太字で示したヘッダーの変更点を記載します。変更があった箇所は以下の表の太字の部分になります。また、HPSS4.5から削除されたコードはHPSS6.2の列で空白にしております。

acct_av_common.h

HPSS4.5

HPSS6.2

<略>
#define AV_C_IFSPEC (acct_av_if_v1_1_c_ifspec)
#define AV_S_IFSPEC (acct_av_if_v1_1_s_ifspec)
<略>
#define AV_TCELL_RETRY_PERIOD (60)
<略>
signed32
av_GetLocalCellId(
unsigned32 *LocalCellId
);

signed32
av_UidToName(
unsigned32 CellId,
unsigned32 Uid,
unsigned32 RetryPeriod,
char *UserName
);

signed32
av_NameToUid(
unsigned32 CellId,
char *UserName,
unsigned32 RetryPeriod,
unsigned32 *Uid
);
<略>

<略>
#define AV_IF_HANDLE (acct_av_if_v1_0_if_handle)

<略>
#define AV_REALM_RETRY_PERIOD (60)
<略>
signed32
av_GetLocalRealmId(
unsigned32 *LocalRealmId
);

signed32
av_UidToName(
unsigned32 RealmId,
unsigned32 Uid,
unsigned32 RetryPeriod,
char *UserName
);

signed32
av_NameToUid(
unsigned32 RealmId,
char *UserName,
unsigned32 RetryPeriod,
unsigned32 *Uid
);
<略>


acct_av_liv.h

HPSS4.5

HPSS6.2

signed32
av_cli_AcctIdxToName(
uuid_t SiteId, /* IN */
hpss_reqid_t RequestId, /* IN */
unsigned32 UserCellId, /* IN */
unsigned32 Uid, /* IN */
unsigned32 Gid, /* IN */
unsigned32 Flags, /* IN */
acct_rec_t Acct, /* IN */
char *AcctName /* OUT */
);

signed32
av_cli_AcctNameToIdx(
uuid_t SiteId, /* IN */
hpss_reqid_t RequestId, /* IN */
unsigned32 CellId, /* IN */
unsigned32 Uid, /* IN */
unsigned32 Gid, /* IN */
unsigned32 Flags, /* IN */
char *InAcctName, /* IN */
char *OutAcctName, /* OUT */
acct_rec_t *Acct /* OUT */
);

signed32
av_cli_ValidateChacct(
uuid_t SiteId, /* IN */
hpss_reqid_t RequestId, /* IN */
unsigned32 UserCellId, /* IN */
unsigned32 UserUid, /* IN */
unsigned32 FileCellId, /* IN */
unsigned32 FileUid, /* IN */
unsigned32 FileGid, /* IN */
acct_rec_t OldAcct, /* IN */
acct_rec_t NewAcct, /* IN */
acct_rec_t *OutAcct /* OUT */
);

signed32
av_cli_ValidateChown(
uuid_t SiteId, /* IN */
hpss_reqid_t RequestId, /* IN */
unsigned32 OldCellId, /* IN */
unsigned32 OldUid, /* IN */
unsigned32 OldGid, /* IN */
acct_rec_t OldAcct, /* IN */
unsigned32 NewCellId, /* IN */
unsigned32 NewUid, /* IN */
unsigned32 NewGid, /* IN */
acct_rec_t SessionAcct, /* IN */
acct_rec_t *OutAcct /* OUT */
);

signed32
av_cli_ValidateCreate(
uuid_t SiteId, /* IN */
hpss_reqid_t RequestId, /* IN */
unsigned32 CellId, /* IN */
unsigned32 Uid, /* IN */
unsigned32 Gid, /* IN */
acct_rec_t Acct, /* IN */
acct_rec_t ParentAcct, /* IN */
acct_rec_t *OutAcct /* OUT */
);

signed32
av_srv_ServerInit(
char *GlobalConfigMdPath, /* IN */
unsigned32 SubsystemId /* IN */
);

signed32
av_srv_ValidateAcct(
hpss_reqid_t RequestId, /* IN */
unsigned32 CellId, /* IN */
unsigned32 Uid, /* IN */
acct_rec_t InAcct, /* IN */
unsigned32 Flags, /* IN */
acct_rec_t *ParentAcct, /* OUT */
acct_rec_t *OutAcct /* OUT */
);

signed32
av_cli_AcctIdxToName(
hpss_uuid_t SiteId, /* IN */
hpss_reqid_t RequestId, /* IN */
unsigned32 UserRealmId, /* IN */
unsigned32 Uid, /* IN */
unsigned32 Gid, /* IN */
unsigned32 Flags, /* IN */
acct_rec_t Acct, /* IN */
char *AcctName /* OUT */
);

signed32
av_cli_AcctNameToIdx(
hpss_uuid_t SiteId, /* IN */
hpss_reqid_t RequestId, /* IN */
unsigned32 RealmId, /* IN */
unsigned32 Uid, /* IN */
unsigned32 Gid, /* IN */
unsigned32 Flags, /* IN */
char *InAcctName, /* IN */
char *OutAcctName, /* OUT */
acct_rec_t *Acct /* OUT */
);

signed32
av_cli_ValidateChacct(
hpss_uuid_t SiteId, /* IN */
hpss_reqid_t RequestId, /* IN */
unsigned32 UserRealmId, /* IN */
unsigned32 UserUid, /* IN */
unsigned32 FileRealmId, /* IN */
unsigned32 FileUid, /* IN */
unsigned32 FileGid, /* IN */
acct_rec_t OldAcct, /* IN */
acct_rec_t NewAcct, /* IN */
acct_rec_t *OutAcct /* OUT */
);

signed32
av_cli_ValidateChown(
hpss_uuid_t SiteId, /* IN */
hpss_reqid_t RequestId, /* IN */
unsigned32 OldRealmId, /* IN */
unsigned32 OldUid, /* IN */
unsigned32 OldGid, /* IN */
acct_rec_t OldAcct, /* IN */
unsigned32 NewRealmId, /* IN */
unsigned32 NewUid, /* IN */
unsigned32 NewGid, /* IN */
acct_rec_t SessionAcct, /* IN */
acct_rec_t *OutAcct /* OUT */
);

signed32
av_cli_ValidateCreate(
hpss_uuid_t SiteId, /* IN */
hpss_reqid_t RequestId, /* IN */
unsigned32 RealmId, /* IN */
unsigned32 Uid, /* IN */
unsigned32 Gid, /* IN */
acct_rec_t Acct, /* IN */
acct_rec_t ParentAcct, /* IN */
acct_rec_t *OutAcct /* OUT */
);

signed32
av_srv_ServerInit(
char *GlobalDBName, /* IN */
unsigned32 SubsystemId /* IN */
);

signed32
av_srv_ValidateAcct(
hpss_reqid_t RequestId, /* IN */
unsigned32 RealmId, /* IN */
unsigned32 Uid, /* IN */
acct_rec_t InAcct, /* IN */
unsigned32 Flags, /* IN */
acct_rec_t *ParentAcct, /* OUT */
acct_rec_t *OutAcct /* OUT */
);


acct_av_liv_internal.h

HPSS4.5

HPSS6.2

<略>
#include "hpss_rpcconn.h"
#include "hpss_global_config.h"
#include "acct_config.h"
#include "hpss_storsubsys_config.h"

#include "hpssmutex.h"
#include "hsec.h"
#include "mm_idl_types.h"

#include "ls_types.h"
#include "acct_hpss.h"
#include "acct_av_lib.h"
<略>
#define AV_SRV_RETRY_PERIOD (60)
#define AV_SRV_MD_RETRY_PERIOD (360)
#define AV_SRV_CACHE_FLAGS_HAVE_PARENT (0x00000001)
#define AV_SRV_CACHE_ELEMENTS (20)
#define AV_SRV_CACHE_LIFETIME (30)
<略>
typedef struct av_cli_site
{
struct av_cli_site *Next;
hpss_lock_cb_t Lock;
uuid_t SiteId;
unsigned32 CellId;
unsigned32 Flags;
unsigned32 AcctStyle;
ls_map_t AvalLoc;
hpss_rpcconn_cb_t Conn;
} av_cli_site_t;
<略>
typedef struct av_cli_chacct_cache
{
uuid_t SiteId;
unsigned32 UserCellId;
unsigned32 UserUid;
unsigned32 FileCellId;
unsigned32 FileUid;
unsigned32 FileGid;
acct_rec_t OldAcct;
acct_rec_t NewAcct;
acct_rec_t ResultAcct;
} av_cli_chacct_cache_t;

typedef struct av_cli_chown_cache
{
uuid_t SiteId;
unsigned32 OldCellId;
unsigned32 OldUid;
unsigned32 OldGid;
acct_rec_t OldAcct;
unsigned32 NewCellId;
unsigned32 NewUid;
unsigned32 NewGid;
acct_rec_t SessionAcct;
acct_rec_t ResultAcct;
} av_cli_chown_cache_t;

typedef struct av_cli_create_cache
{
uuid_t SiteId;
unsigned32 CellId;
unsigned32 Uid;
unsigned32 Gid;
acct_rec_t Acct;
acct_rec_t ParentAcct;
acct_rec_t ResultAcct;
} av_cli_create_cache_t;

typedef struct av_cli_idx_to_name_cache
{
uuid_t SiteId;
unsigned32 CellId;
unsigned32 Uid;
unsigned32 Gid;
unsigned32 Flags;
acct_rec_t AcctIdx;
char AcctName[HPSS_MAX_ACCOUNT_NAME];
} av_cli_idx_to_name_cache_t;

typedef struct av_cli_name_to_idx_cache
{
uuid_t SiteId;
char AcctName[HPSS_MAX_ACCOUNT_NAME];
acct_rec_t AcctIdx;
unsigned32 CellId;
unsigned32 Uid;
unsigned32 Gid;
unsigned32 Flags;
unsigned32 DefaultAcct;
} av_cli_name_to_idx_cache_t;

typedef struct av_srv_validate_acct_cache
{
unsigned32 CellId;
unsigned32 Uid;
acct_rec_t Acct;
unsigned32 Flags;
acct_rec_t ParentAcct;
acct_rec_t OutAcct;
unsigned32 CacheFlags;
} av_srv_validate_acct_cache_t;

<略>
signed32
av_cli_BindToAval(
uuid_t SiteId, /* IN */
hpss_reqid_t RequestId, /* IN */
ls_map_t *AvalLoc, /* OUT */
hpss_rpcconn_cb_t **Conn, /* OUT */
unsigned32 *BypassAval /* OUT */
);

signed32
av_cli_GetRgyAcctInfo(
unsigned32 CellId, /* IN */
unsigned32 Uid, /* IN */
unsigned32 *Style, /* OUT */
acct_rec_t *DefAccount, /* OUT */
char *UserName /* OUT */
);

signed32
av_cli_SiteAndNameToUid(
uuid_t SiteId, /* IN */
char *Moniker, /* IN */
unsigned32 *Uid /* OUT */
);

signed32
av_cli_SiteIdToCellId(
uuid_t SiteId, /* IN */
unsigned32 *CellId /* OUT */
);

<略>
signed32
av_cli_GetAcctStyle(
unsigned32 CellId, /* IN */
unsigned32 Uid, /* IN */
unsigned32 *Style /* OUT */
);

void
av_srv_InitOnce(
void
);

signed32
av_srv_ReadGlobalCfg(
char *GlobalMdName, /* IN */
hpss_global_config_t *GlobalCfgMd /* OUT */
);

signed32
av_srv_ReadAcctPolicy(
char *PolicyMdName, /* IN */
acct_config_t *AcctPolicy /* OUT */
);

signed32
av_srv_ReadStorSubsys(
char *ConfigMdName, /* IN */
unsigned32 SubsystemId, /* IN */
hpss_storsubsys_config_t *Config /* OUT */
);

signed32
av_srv_ReadConfig(
char *ConfigMdName,
uuid_t *ServerUuid, /* IN */
hpss_server_config_t *Config /* OUT */
);

signed32
av_srv_ReadConfigsByType(
unsigned32 ServerType, /* IN */
char *ConfigMdName, /* IN */
hpss_server_config_t **ConfigArray, /* OUT */
unsigned32 *Count /* OUT */
);

signed32
av_srv_CmpValidAcct(
av_lib_cache_elem_t *Element,
void *Data
);

<略>

<略>
#include "hpss_rpc.h"




#include "hpssmutex.h"
#include "hpss_sec.h"
#include "hpss_connmgr.h"
#include "hpss_server_types.h"
#include "ls_types.h"
#include "acct_hpss.h"
#include "acct_av_lib.h"
<略>






typedef struct av_cli_site
{
struct av_cli_site *Next;
hpss_lock_cb_t Lock;
hpss_uuid_t SiteId;
unsigned32 RealmId;
unsigned32 Flags;
unsigned32 AcctStyle;
ls_map_t AvalLoc;
hpss_ConnMgrEntry_t *ConnEntry;
} av_cli_site_t;
<略>
typedef struct av_cli_chacct_cache
{
hpss_uuid_t SiteId;
unsigned32 UserRealmId;
unsigned32 UserUid;
unsigned32 FileRealmId;
unsigned32 FileUid;
unsigned32 FileGid;
acct_rec_t OldAcct;
acct_rec_t NewAcct;
acct_rec_t ResultAcct;
} av_cli_chacct_cache_t;

typedef struct av_cli_chown_cache
{
hpss_uuid_t SiteId;
unsigned32 OldRealmId;
unsigned32 OldUid;
unsigned32 OldGid;
acct_rec_t OldAcct;
unsigned32 NewRealmId;
unsigned32 NewUid;
unsigned32 NewGid;
acct_rec_t SessionAcct;
acct_rec_t ResultAcct;
} av_cli_chown_cache_t;

typedef struct av_cli_create_cache
{
hpss_uuid_t SiteId;
unsigned32 RealmId;
unsigned32 Uid;
unsigned32 Gid;
acct_rec_t Acct;
acct_rec_t ParentAcct;
acct_rec_t ResultAcct;
} av_cli_create_cache_t;

typedef struct av_cli_idx_to_name_cache
{
hpss_uuid_t SiteId;
unsigned32 RealmId;
unsigned32 Uid;
unsigned32 Gid;
unsigned32 Flags;
acct_rec_t AcctIdx;
char AcctName[HPSS_MAX_ACCOUNT_NAME];
} av_cli_idx_to_name_cache_t;

typedef struct av_cli_name_to_idx_cache
{
hpss_uuid_t SiteId;
char AcctName[HPSS_MAX_ACCOUNT_NAME];
acct_rec_t AcctIdx;
unsigned32 RealmId;
unsigned32 Uid;
unsigned32 Gid;
unsigned32 Flags;
unsigned32 DefaultAcct;
} av_cli_name_to_idx_cache_t;

typedef struct av_srv_validate_acct_cache
{
unsigned32 RealmId;
unsigned32 Uid;
acct_rec_t Acct;
unsigned32 Flags;
acct_rec_t ParentAcct;
acct_rec_t OutAcct;
unsigned32 CacheFlags;
} av_srv_validate_acct_cache_t;

<略>
signed32
av_cli_BindToAval(
hpss_uuid_t SiteId, /* IN */
hpss_reqid_t RequestId, /* IN */
ls_map_t *AvalLoc, /* OUT */
hpss_ConnMgrEntry_t **Conn, /* OUT */
unsigned32 *BypassAval /* OUT */
);

signed32
av_cli_GetRgyAcctInfo(
unsigned32 RealmId, /* IN */
unsigned32 Uid, /* IN */
unsigned32 *Style, /* OUT */
acct_rec_t *DefAccount, /* OUT */
char *UserName /* OUT */
);

signed32
av_cli_SiteAndNameToUid(
hpss_uuid_t SiteId, /* IN */
char *Moniker, /* IN */
unsigned32 *Uid /* OUT */
);

signed32
av_cli_SiteIdToRealmId(
hpss_uuid_t SiteId, /* IN */
unsigned32 *RealmId /* OUT */
);

<略>
signed32
av_cli_GetAcctStyle(
unsigned32 RealmId, /* IN */
unsigned32 Uid, /* IN */
unsigned32 *Style /* OUT */
);














































<略>


acct_av_log.h

HPSS4.5

HPSS6.2

<略>
#include "gk_ShutDown.h"
#include "acct_av_common.h"
#define AV_NULL_REQID (cast64m(0))
<略>
#if defined(AV_DEFINE_MSG)
#define MSGDEF(number, name, text) \
const int AV_MSG_##name = (number); \
const char AV_DEF_##name##[] = text;

#else
#define MSGDEF(number, name, text) \
extern const int AV_MSG_##name; \
extern const char AV_DEF_##name##[];

#endif

<略>
MSGSRV(103, PRE_REGISTER, "Failed to pre-register interface (%s)")
MSGSRV(104, REGISTER_SERVICE, "Failed to register interface (%s)")
MSGSRV(105, UNREGISTER_SERVICE, "Failed to register interface (%s)")
MSGCOM(106, LOCAL_CELL_ID, "Can't get local id from trusted cell table (%s)")
MSGCOM(107, MUTEX_INIT, "Failed to initialize a pthread mutex (%s)")
MSGCOM(108, MUTEX_LOCK, "Failed to lock a pthread mutex (%s)")
MSGCOM(109, MUTEX_UNLOCK, "Failed to unlock a pthread mutex (%s)")
MSGCOM(110, CANT_GET_OFD, "Failed to open a metadata file (%s)")
MSGCOM(111, CANT_FREE_OFD, "Failed to close a metadata file (%s)")
MSGCOM(112, CANT_READ_POLICY, "Can't read accounting policy (%s)")
MSGSRV(113, SITE_INIT, "Site AVAL initialization failed (%s)")
MSGSRV(114, SITE_SHUTDOWN, "Error during site AVAL shutdown (%s)")
MSGSRV(115, INVALID_CONFIG, "Check accounting policy (%s)")
MSGCOM(116, OUT_OF_MEMORY, "Out of memory (object: %s)")
MSGSRV(117, FATAL_REQ_ERROR, "Fatal error while processing request (%s)")
MSGSRV(118, FATAL_CALLER_AUTH, "Fatal authorization checking error (%s)")
MSGLIB(119, LOCAL_SITE_INFO, "Can't get local site info from LS (%s)")
MSGLIB(120, GLOBAL_CFG, "Can't read global config from metadata (%s)")
MSGLIB(121, ACCT_POLICY, "Can't read accounting policy from metadata (%s)")
MSGLIB(122, STORSS_ERROR, "Can't read storage subystem from metadata (%s)")
MSGLIB(123, INIT_CONN_FAILED, "Can't initialize connection block (%s)")
MSGLIB(124, NO_VALID_AV_CFG, "Can't locate GK config from subsystem (%s)")
MSGLIB(125, READ_ALL_CFG_ERROR, "Can't read all GK configs from subsystem (%s)")
MSGLIB(126, NO_AV_CFGS_FOUND, "No executable GK found for acct validation (%s)")
MSGLIB(127, DESTROY_CONN, "Can't destroy bad RPC connection to GK (%s)")
MSGLIB(128, BAD_AV_SRV_LIST, "Invalid GK server list returned by LS (%s)")
MSGLIB(129, GRAB_CONN_FAILED, "Unexpected error binding to Gatekeeper (%s)")
MSGLIB(130, CANT_CONNECT, "Unable to connect to site (%s)")
MSGCOM(131, RGY_ERROR, "Cant contact DCE registry at (%s)")
MSGSRV(132, CANT_READ_AV_MD, "Can't read acct validation metadata (%s)")


<略>
MSGLIB(907, REUSING_CONN, "Reusing connection (%s)")
MSGLIB(908, REBUILDING_CONN, "Rebilding connection (%s)")
MSGLIB(909, NO_AV_SERVERS, "Bypassing accounting at site, no GKs. (%s)")
MSGLIB(910, INITTING_CONN, "Initializing connection (%s)")
MSGLIB(911, BYPASSING_CONN, "AV being bypassed at site (%s)")
MSGLIB(912, ESTABLISHED_CONN, "Connection established (%s)")
MSGLIB(913, CALLING_AV, "Calling AV API %s")
MSGCOM(914, UT_BYPASS_CONN, "UNIT TEST: Bypassing connection attempt (%s)")


<略>

<略>

#include "acct_av_common.h"
#define AV_NULL_REQID (0)
<略>
#if defined(AV_DEFINE_MSG)
#define MSGDEF(number, name, text) \
const int AV_MSG_##name = (number); \
const char AV_DEF_##name[] = text;

#else
#define MSGDEF(number, name, text) \
extern const int AV_MSG_##name; \
extern const char AV_DEF_##name[];

#endif

<略>
MSGCOM(103, CANT_GET_TRAN_HANDLE, "Cannot get transaction handle for DB (%s)")
MSGSRV(104, REGISTER_SERVICE, "Failed to register interface (%s)")

MSGSRV(105, UNREGISTER_SERVICE, "Failed to unregister interface (%s)")
MSGCOM(106, LOCAL_REALM_ID, "Can't get local id from trusted realm table (%s)")
MSGCOM(107, MUTEX_INIT, "Failed to initialize a pthread mutex (%s)")

MSGCOM(108, MUTEX_LOCK, "Failed to lock a pthread mutex (%s)")

MSGCOM(109, MUTEX_UNLOCK, "Failed to unlock a pthread mutex (%s)")





MSGCOM(112, CANT_READ_POLICY, "Can't read accounting policy from DB (%s)")
MSGSRV(113, SITE_INIT, "Site AVAL initialization failed (%s)")
MSGSRV(114, SITE_SHUTDOWN, "Error during site AVAL shutdown (%s)")

MSGSRV(115, INVALID_CONFIG, "Check accounting policy (%s)")
MSGCOM(116, OUT_OF_MEMORY, "Out of memory (object: %s)")
MSGSRV(117, FATAL_REQ_ERROR, "Fatal error while processing request (%s)")
MSGSRV(118, FATAL_CALLER_AUTH, "Fatal authorization checking error (%s)")
MSGLIB(119, LOCAL_SITE_INFO, "Can't get local site info from LS (%s)")

MSGLIB(120, GLOBAL_CFG, "Can't read global config from metadata DB (%s)")
MSGLIB(121, ACCT_POLICY, "Can't read accounting policy from metadata DB (%s)")
MSGLIB(122, STORSS_ERROR, "Can't read storage subystem from metadata DB (%s)")
MSGLIB(123, INIT_CONN_FAILED, "Can't initialize connection block (%s)")

MSGLIB(124, NO_VALID_AV_CFG, "Can't locate GK config from subsystem (%s)")
MSGLIB(125, READ_ALL_CFG_ERROR, "Can't read all GK configs from subsystem (%s)")
MSGLIB(126, NO_AV_CFGS_FOUND, "No executable GK found for acct validation (%s)")
MSGLIB(127, DESTROY_CONN, "Can't destroy bad RPC connection to GK (%s)")
MSGLIB(128, BAD_AV_SRV_LIST, "Invalid GK server list returned by LS (%s)")
MSGLIB(129, GRAB_CONN_FAILED, "Unexpected error binding to Gatekeeper (%s)")
MSGLIB(130, CANT_CONNECT, "Unable to connect to site (%s)")
MSGCOM(131, RGY_ERROR, "Cant contact registry at (%s)")
MSGSRV(132, CANT_READ_AV_MD, "Can't read acct validation metadata in DB (%s)")
MSGLIB(133, LOCAL_MGR_HANDLE, "Can't init local handle (%s)")

<略>
MSGLIB(907, REUSING_CONN, "Reusing connection (%s)")
MSGLIB(908, REBUILDING_CONN, "Rebuilding connection (%s)")
MSGLIB(909, NO_AV_SERVERS, "Bypassing accounting at site, no GKs. (%s)")
MSGLIB(910, INITTING_CONN, "Initializing connection (%s)")
MSGLIB(911, BYPASSING_CONN, "AV being bypassed at site (%s)")

MSGLIB(912, ESTABLISHED_CONN, "Connection established (%s)")

MSGLIB(913, CALLING_AV, "Calling AV API %s")
MSGCOM(914, UT_BYPASS_CONN, "UNIT TEST: Bypassing connection attempt (%s)")
MSGCOM(915, DETAILED_MM_ERR_TEXT, "MM detailed err: (%s)")

<略>


acct_config.h

HPSS4.5

HPSS6.2

#ifndef acct_config_v0_0_included
#define acct_config_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif
#ifndef hpss_idl_types_v0_0_included
#include <hpss_idl_types.h>
#endif
#ifndef hpss_limits_v0_0_included
#include <hpss_limits.h>
#endif
#define ACCT_NEVER_RUN_BEFORE (101)
#define ACCT_RUNNING (102)
#define ACCT_FAILED (103)
#define ACCT_COMPLETED (104)
#define ACCT_REPORT_GENERATED (105)
#define ACCT_SITE_STYLE (201)
#define ACCT_UNIX_STYLE (202)
#define ACCT_FLAGS_UNUSED (1)
#define ACCT_FLAGS_LOCK_SUMMARY (2)
#define ACCT_FLAGS_VALIDATION (4)
#define ACCT_FLAGS_REQDFLTACCT (8)
#define ACCT_FLAGS_INHERITANCE (16)
typedef struct acct_config {
unsigned32 AcctPolicyID;
unsigned32 StyleFlag;
unsigned32 RunStatus;
timestamp_sec_t AcctResultsDate;
unsigned32 StatusInterval;
unsigned32 Flags;
unsigned32 Pad1;
unsigned32 NumberOfAccounts;
u_signed64 StorageUnitSize;
u_signed64 TotalStorageUsed;
u_signed64 BytesTransferred;
u_signed64 FileAccesses;
u_signed64 LengthOfFiles;
idl_char ExecutablePathName[1024];
idl_char ReportPathName[1024];
idl_char CommentaryPathName[1024];
idl_char AcctSnapshotMdFname[128];
idl_char AcctValidateMdFname[128];
} acct_config_t;



#ifdef __cplusplus
}

#endif



#endif

#ifndef _ACCT_CONFIG_H_RPCGEN
#define _ACCT_CONFIG_H_RPCGEN
#include <rpc/rpc.h>
#ifndef _acct_config_h
#define _acct_config_h









#include "hpss_types.h"


#include "hpss_limits.h"






#define ACCT_SITE_STYLE 201
#define ACCT_UNIX_STYLE 202
#define ACCT_FLAGS_UNUSED 0x00000001
#define ACCT_FLAGS_LOCK_SUMMARY 0x00000002
#define ACCT_FLAGS_VALIDATION 0x00000004
#define ACCT_FLAGS_REQDFLTACCT 0x00000008
#define ACCT_FLAGS_INHERITANCE 0x00000010
struct acct_config {
unsigned32 AcctPolicyID;
unsigned32 StyleFlag;


unsigned32 StatusInterval;
unsigned32 Flags;


u_signed64 StorageUnitSize;




char ExecutablePathName[HPSS_MAX_PATH_NAME];
char ReportPathName[HPSS_MAX_PATH_NAME];
char CommentaryPathName[HPSS_MAX_PATH_NAME];


};
typedef struct acct_config acct_config;

typedef acct_config acct_config_t;




#endif
extern bool_t xdr_acct_config();
extern bool_t xdr_acct_config_t();
#endif


acct_hpss.h

HPSS4.5

HPSS6.2

#ifndef acct_idl_v0_0_included
#define acct_idl_v0_0_included
#ifndef IDLBASE_H
#include
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif
#ifndef hpss_idl_types_v0_0_included
#include <hpss_idl_types.h>
#endif
#ifndef hpss_limits_v0_0_included
#include <hpss_limits.h>
#endif
typedef unsigned32 acct_rec_t;
#define ACCT_REC_DEFAULT (-1)

#ifdef __cplusplus
}

#endif


#endif

#ifndef _ACCT_HPSS_H_RPCGEN
#define _ACCT_HPSS_H_RPCGEN
#include <rpc/rpc.h>
#ifndef _acct_hpss_h
#define _acct_hpss_h









#include "hpss_types.h"


#include "hpss_limits.h"


#define ACCT_REC_DEFAULT 0xffffffff





#endif

#endif


api_internal.h

HPSS4.5

HPSS6.2

#ifndef api_internal_h
#define api_internal_h

#include <string.h>


#include "hpss_api.h"


#include "api_log.h"
#include "hpss_ls.h"





#include "mvr_register.h"

















typedef enum {
NON_RETRYABLE, /* Never retry */
RETRYABLE, /* Retry the number of specified times */
DELAY_RETRYABLE, /* Retry the number of specified times with delay */
LIMITED_RETRYABLE, /* Retry a limited number of times */
GK_RETRYABLE /* Delay for gk_delay time */
} api_retry_class_t; /* Retry error class */

typedef struct retry_cb {
unsigned32 initialized; /* Flag indicating initialized data */
unsigned32 retries; /* Number of retry attempts */
signed32 time_limit; /* Delay between retries */
unsigned32 gk_delay; /* Delay time for this Gatekeeper retry */
signed32 gk_time_limit; /* Maximum delay time for all Gatekeeper retry attempts */
api_retry_class_t retry_class; /* Error retry class */
} retry_cb_t;

#define API_GK_NODELAY (0)









































































































































































































typedef enum { API_CALL_ERROR, API_CALL_HPSS, API_CALL_DMG } call_type_t;

#define API_CHASE_NONE (0x00000000)
#define API_CHASE_SYMLINK (0x00000001)
#define API_CHASE_JUNCTION (0x00000002)
#define API_CHASE_ALL (0x00000003)


#define DATA_THREAD_TIMEOUT (60 * 15)

#define API_SOCKOPT_RECVBUF (0x00000001)
#define API_SOCKOPT_SENDBUF (0x00000002)
#define API_SOCKOPT_REUSEADDR (0x00000004)
#define API_SOCKOPT_KEEPALIVE (0x00000008)
#define API_SOCKOPT_TCPNODELAY (0x00000010)
#define API_SOCKOPT_FIONBIO (0x00000020)
#define API_SOCKOPT_RFC1323 (0x00000040)

#define API_SOCKOPT_PERFOPTS (API_SOCKOPT_RECVBUF | \
API_SOCKOPT_SENDBUF | \
API_SOCKOPT_RFC1323)
#define API_SOCKOPT_AFTERCONNOPTS (API_SOCKOPT_TCPNODELAY | \
API_SOCKOPT_KEEPALIVE)













































#if (defined(__alpha) && defined(__unix__)) || defined(__SVR4)

#define ENOCONNECT ECONNREFUSED



#endif

#if defined(IPI3_SUPPORT)
extern pthread_mutex_t API_Ipi3Mutex;
#endif





















































































void
API_UnlockFileTableEntries(
srcsinkdesc_t *SrcSinkPtr, /* start of src/sink descriptor list */
filetable_t *FileTabPtr,
fd_set *FildesLocked, /* indicates files to be unlocked */
int NumLocked, /* number of files to unlock */
int LockTable); /* should we lock/unlock the table? */






long
API_AllocateRequestIOR(
IOD_t *IODPtr, /* IN - received IOD */
IOR_t *IORPtr); /* IN - ptr to skeleton IOR */







































long
API_FreeRequestIOR(
IOD_t *IODPtr, /* IN - received IOD */
IOR_t *IORPtr); /* IN - IOR to be released */

void
API_FreeIODPtrs(
IOD_t *IODPtr); /* IN - IOD containing pts to release */

void
API_ConvertHpnsModeToPosixMode(
ns_Attrs_t *NSAttr, /* IN - name server attrs */
mode_t *PosixMode); /* OUT - POSIX mode bits */

void
API_ConvertPosixModeToHpnsMode(
mode_t PosixMode, /* IN - POSIX mode bits */
ns_Attrs_t *NSAttr); /* OUT - name server attrs */

void
API_ConvertUcredToUserCred(
hsec_ucred_t UcredPtr, /* IN - system credentials */
hsec_UserCred_t *UserCredPtr); /* OUT - HPSS user creds */

void
API_ConvertNSAttrsToVAttrs(
ns_Attrs_t *NSAttrs, /* IN - name server attributes */
hpss_vattr_t *VAttrs); /* OUT - VFS attributes */

void
API_ConvertVAttrsToNSAttrs(
hpss_vattr_t *VAttrs, /* IN - VFS attributes */
ns_Attrs_t *NSAttrs); /* OUT - name server attributes */

void
API_ConvertNSToVattrSelFlags(
u_signed64 NSSelFlags, /* IN - NS selection flags */
u_signed64 *RetFlagsPtr); /* OUT - VFS selection flags */

void
API_ConvertVattrToNSSelFlags(
u_signed64 VattrSelFlags, /* IN - VFS selection flags */
u_signed64 *RetFlagsPtr, /* OUT - NS selection flags */
unsigned32 Type); /* IN - NS type of object */

void
API_ConvertVAttrToBFSattr(
hpss_vattr_t *VAttrs, /* IN - VFS attributes */
bf_attrib_t *BFSAttrs); /* OUT - bitfile server attributes */

void
API_ConvertBFSattrToVAttr(
bf_attrib_t *BFSAttrs, /* IN - bitfile server attributes */
hpss_vattr_t *VAttrs); /* OUT - VFS attributes */

void
API_ConvertVattrToBFSSelFlags(
u_signed64 VattrSelFlags, /* IN - VFS selection flags */
u_signed64 *RetFlagsPtr); /* OUT - BFS selection flags */

void
API_ConvertBFSToVattrSelFlags(
u_signed64 BFSSelFlags, /* IN - BFS selection flags */
u_signed64 *RetFlagsPtr); /* OUT - VFS selection flags */











api_requestId_t
API_GetUniqueRequestID();

void
API_SocketSetOptions(
int Socket, /* Socket descriptor */
struct sockaddr_in *SaddrPtr, /* Socket address */
unsigned long Options); /* What options */

int
API_OpenListenDesc(
int Type, /* Type of port to open */
int *ListenDesc, /* Returned open socket */
data_addr_t *ListenAddr); /* Returned socket identification */

void
API_CloseListenDesc(
int Type, /* IN - type of desciptor to close */
int ListenDesc); /* IN - open descriptor */

void
API_CloseDataConnList(
desc_elem_t **ListPtr); /* IN - pointer to list head */

int
API_DetermineAcct(
hsec_UserCred_t *UserCred, /* IN - User credentials */
apithrdstate_t *threadcontext, /* IN - Thread context */
uuid_t NameServerUUID, /* IN - Id of Name Server */
api_requestId_t RequestID, /* IN - Request id */
uuid_t *SiteId, /* OUT - Site location */
acct_rec_t *AcctCode); /* OUT - Account code */

long
API_GetUUIDNSHandle(
ns_ObjHandle_t *ObjHandle, /* IN - object handle */
unsigned32 *ServerType, /* OUT - regular or root name server */
uuid_t *UUID); /* OUT - name server uuid */

long
API_GetUUIDNSBitfileID(
apithrdstate_t *ThreadContext, /* IN - thread context */
api_requestId_t RequestID, /* IN - request id */
hpssoid_t *BitfileID, /* IN/OUT - bitfile id */
bf_attrib_t *Bitfile, /* OUT - bitfile - optional */
gss_token_t *AuthzTicket, /* IN/OUT - authorization ticket */
uuid_t *UUID); /* OUT - name server uuid */

int
API_GetUUIDNSType(
uuid_t *UUID, /* IN - name server uuid */
unsigned32 *ServerType); /* OUT - regular or root name server */

long
API_GetNet(
apithrdstate_t *ThreadContext, /* IN - thread context */
int ServerType, /* IN - type of server (bfs/ns/dmg)*/
uuid_t *ServerUUID, /* IN - server uuid */
unsigned32 Tries, /* IN - number of attempts to make */
api_local_net_t **Local); /* OUT - local network table entry */

















int
API_PAG_PurgeList(
apithrdstate_t *ThreadContext); /* IN - thread context */

int
API_PAG_Verify(
apithrdstate_t *ThreadContext, /* IN - thread context */
api_local_net_t *GatewayComm, /* IN - gateway comm handle */
uuid_t *GatewayUUID, /* IN - gateway UUID */
unsigned32 RequestID, /* IN - request ID */
u_signed64 FilesetID, /* IN - file set ID */
unsigned32 *PAG); /* OUT - retured PAG */

long
API_ProcessBadConn(
apithrdstate_t *ThreadContext, /* IN - local thread context */
api_local_net_t *LocalNet); /* IN - local network table entry */

long
API_ProcessTRPCAbort(
apithrdstate_t *ThreadContext, /* IN - local thread context */
api_local_net_t *LocalNet, /* IN - local network table entry */
char *TrpcAbortReason); /* IN - abort reason */

long
API_ProcessTRPCError(
apithrdstate_t *ThreadContext, /* IN - local thread context */
api_local_net_t *LocalNet, /* IN - local network table entry */
trpc_status_t TrpcError); /* IN - TRPC comm error */

int
API_SetCurrentSessionAcct(
apithrdstate_t *ThreadContext, /* IN/OUT - local thread context */
uuid_t *SiteId); /* IN - Site location */

void
API_SetCWD(
ns_ObjHandle_t *CwdPtr); /* IN - new working dir */

void
API_SetUmask(
mode_t Umask); /* IN - new user mask */

int
API_TraversePath (
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */

ns_ObjHandle_t *ObjHandle, /* IN - NS object handle */
char *Path, /* IN - pathname */
api_cwd_stack_t *CwdStack, /* IN - cwd stack */
unsigned32 ChaseFlags, /* IN - chase symlink/junction */
u_signed64 SelectFlags, /* IN - object attribute bits */
u_signed64 ParentSelectFlags, /* IN - parent attribute bits */





api_cwd_stack_t *RetCwdStack, /* OUT - returned cwd stack */
ns_ObjHandle_t *RetHandle, /* OUT - NS object handle */
gss_token_t *RetTa, /* OUT - authz ticket */
ns_Attrs_t *RetAttrs, /* OUT - object attributes */

ns_Attrs_t *RetParentAttrs, /* OUT - parent attributes */

char *RetObjectName); /* OUT - object name */


int
API_PathFromCwdStack(
api_cwd_stack_t *Stack, /* IN - pointer to cwd stack */
unsigned32 Size, /* IN - size of path */
char *Path); /* OUT - returned path */

int
API_InitCwdStack(
api_cwd_stack_t *Stack, /* IN - pointer to cwd stack */
unsigned32 Local); /* IN - Thread local stack flag */

void
API_FreeCwdStack(
api_cwd_stack_t *Stack); /* IN - pointer to cwd stack */

int
API_SetCwdStack(
api_cwd_stack_t *CwdStack, /* IN - Pointer to cwd stack */
api_cwd_stack_t *FromStack); /* IN - Pointer to from stack */

int
API_DetermineCall(
unsigned32 FilesetType, /* IN - file set type */
signed32 *Error); /* OUT - returned error */

int
API_PerformRetry(
retry_cb_t *RetryCB, /* IN - retry control block */
long Error); /* IN - error return code */







int
API_TranslateError(
apithrdstate_t *ThreadContext, /* IN - thread context */
signed32 Error, /* IN - error value */
api_local_net_t *LocalHandle); /* IN - local connection handle */

int
API_DivideFilePath(
char *PathIn, /* IN - path and file */
char *PathOut, /* OUT - returned path */
char *FileOut); /* OUT - returned file */

int
API_ns_Delete(
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */
ns_ObjHandle_t *ObjHandle, /* IN - NS object handle */
char *Path, /* IN - pathname */
unsigned32 DeleteFlag, /* IN - flag for delete */
hpssoid_t *BitfileId, /* OUT - id for a file delete */
unsigned32 *LinkCount); /* OUT - link count after */

int
API_ns_DeleteACL(
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */
ns_ObjHandle_t *ObjHandle, /* IN - NS object handle */
char *Path, /* IN - pathname */
unsigned32 Options, /* IN - processing options */
ns_ACLConfArray_t *ACLEntry, /* IN - ACL entry to delete */
api_local_net_t **LocalNet); /* IN - local network table entry pointer */

int
API_ns_GetACL(
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */
ns_ObjHandle_t *ObjHandle, /* IN - NS object handle */
char *Path, /* IN - pathname */
unsigned32 Options, /* IN - processing options */
ns_ACLConfArray_t **ACL); /* OUT - list of ACL entries */

int
API_ns_GetAttrs(
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */
ns_ObjHandle_t *ObjHandle, /* IN - NS object handle */
char *Path, /* IN - pathname */
unsigned32 TraversalFlags, /* IN - traversal flags */
unsigned32 ChaseSymLink, /* IN - chase sym links */
u_signed64 SelectFlags, /* IN - object attribute bits */
u_signed64 ParentSelectFlags,/* IN - parent attribute bits */
ns_ObjHandle_t *RetObjHandle, /* OUT - NS object handle */
gss_token_t *RetTa, /* OUT - authz ticket */
ns_Attrs_t *RetAttrs, /* OUT - object attributes */
ns_Attrs_t *RetParentAttrs, /* OUT - parent attributes */
char *ObjectName, /* OUT - object name */
ns_RemainingPath_t *RemainingPath); /* OUT - any remaining path */

int
API_ns_GetFilesetAttrs(
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */
uuid_t *UUID, /* IN - server UUID */
u_signed64 *FilesetId, /* IN - file set id */
ns_ObjHandle_t *FilesetHandle, /* IN - file set handle */
ns_FilesetAttrBits_t AttrBits, /* IN - attributes bits */
ns_FilesetAttrs_t *OutAttrs); /* OUT - file set attributes */

int
API_ns_GetFilesetByName(
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */
uuid_t *RootNSUUID, /* IN - root name server uuid */
char *FilesetName, /* IN - fileset name */
u_signed64 *FilesetId, /* OUT - fileset id */
uuid_t *NameServerUUID,/* OUT - supporting name server */
uuid_t *GatewayUUID); /* OUT - supporting gateway */

int
API_ns_GetFilesetById(
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */
uuid_t *RootNSUUID, /* IN - root name server uuid */
u_signed64 *FilesetId, /* IN - fileset id */
uuid_t *NameServerUUID,/* OUT - supporting name server */
uuid_t *GatewayUUID); /* OUT - supporting gateway */

int
API_ns_GetJunctions(
apithrdstate_t *ThreadContext, /* IN - thread context */
hsec_UserCred_t *Ucred, /* IN - user's credentials */
api_requestId_t RequestID, /* IN - request id */
unsigned long OffsetIn, /* IN - offset to start at */
unsigned long Entries, /* IN - number of entries to return*/
unsigned long *End, /* OUT - hit end of directory */
unsigned long *OffsetOut, /* OUT - offset of last entry */
ns_JunctionPathConfArray_t **JentBufPtr); /* OUT - junction entry information */

int
API_ns_GetName(
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */
hpssoid_t *BitFileID, /* IN - bitfile id */
ns_ObjHandle_t *ObjHandle, /* IN - NS object handle */
bf_attrib_t *BitFile, /* IN/OUT - bitfile - optional */
ns_ObjHandle_t *FSHandle, /* OUT - fileset handle */
char *RetName, /* OUT - name of object */
gss_token_t *RetTa); /* OUT - authz ticket */

int
API_ns_Insert(
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */
ns_ObjHandle_t *ObjHandle, /* IN - NS object handle */
char *Path, /* IN - pathname */
u_signed64 *FilesetID, /* IN - fileset id number */
u_signed64 UpdateFlags, /* IN - attributes to set */
ns_Attrs_t *AttrIn, /* IN - new attributes */
gss_token_t *TaPtr, /* IN - ticket supplied by BFS */
u_signed64 SelectFlags, /* IN - attributes to be returned */
api_local_net_t **LocalNet, /* IN - local network table entry */
ns_Attrs_t *AttrOut, /* OUT - return attributes */
ns_ObjHandle_t *RetHandle, /* OUT - object handle */
gss_token_t *RetTa); /* OUT - authz ticket */

int
API_ns_MkDir(
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */
ns_ObjHandle_t *ObjHandle, /* IN - NS object handle */
char *Path, /* IN - pathname */
u_signed64 *FilesetID, /* IN - fileset id number */
u_signed64 UpdateFlags, /* IN - attributes to set */
ns_Attrs_t *AttrIn, /* IN - new attributes */
u_signed64 SelectFlags, /* IN - attributes to return */
ns_Attrs_t *AttrOut, /* OUT - resulting attributes */
ns_ObjHandle_t *RetHandle); /* OUT - object handle */

int
API_ns_MkLink(
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */
ns_ObjHandle_t *ObjHandle, /* IN - NS object handle */
char *Path, /* IN - pathname */
u_signed64 *FilesetID, /* IN - fileset id number */
ns_ObjHandle_t *ExistingHandle,/* IN - NS object handle */
api_local_net_t **LocalNet, /* IN - local network table entry pointer */
ns_ObjHandle_t *RetHandle); /* OUT - object handle */

int
API_ns_MkSymLink(
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */
ns_ObjHandle_t *ObjHandle, /* IN - NS object handle */
char *Path, /* IN - pathname */
u_signed64 *FilesetID, /* IN - fileset id number */
char *LinkText, /* IN - symlink contents */
ns_ObjHandle_t *RetHandle); /* OUT - object handle */

int
API_ns_ReadDir(
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */
ns_ObjHandle_t *ObjHandle, /* IN - NS object handle */
unsigned32 Offset, /* IN - directory offset */
unsigned32 BufferSize, /* IN - size of client buffer */
u_signed64 SelectFlags, /* IN - attrs to return */
unsigned32 *End, /* OUT - end of directory? */
ns_DirEntry_t **Buffer); /* OUT - directory entries */

int
API_ns_ReadGlobalFilesets(
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */
u_signed64 OffsetIn, /* IN - offset to start at */
unsigned32 Entries, /* IN - number of entries to return */
unsigned32 *End, /* OUT - hit end of the list */
ns_GFilesetConfArray_t **FileConfArray); /* OUT - array of fileset entries */

int
API_ns_ReadLink(
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */
ns_ObjHandle_t *ObjHandle, /* IN - NS object handle */
char *Path, /* IN - pathname */
char *LinkText); /* OUT - symlink contents */

int
API_ns_Rename(
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */
ns_ObjHandle_t *CurObjHandle, /* IN - NS object handle */
char *CurPath, /* IN - current pathname */
ns_ObjHandle_t *NewObjHandle, /* IN - NS object handle */
char *NewPath); /* IN - new pathname */

int
API_ns_SetACL(
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */
ns_ObjHandle_t *ObjHandle, /* IN - NS object handle */
char *Path, /* IN - pathname */
unsigned32 Options, /* IN - processing options */
ns_ACLConfArray_t *NewACL, /* IN - new ACL list */
api_local_net_t **LocalNet); /* IN - local network table entry pointer */

int
API_ns_SetAttrs(
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */
ns_ObjHandle_t *ObjHandle, /* IN - NS object handle */
char *Path, /* IN - pathname */
u_signed64 UpdateFlags, /* IN - attributes to set */
ns_Attrs_t *AttrIn, /* IN - new attributes */
gss_token_t *TaPtr, /* IN - authz ticket */
u_signed64 SelectFlags, /* IN - attributes to be returned */
ns_Attrs_t *AttrOut, /* OUT - updated attributes */
gss_token_t *RetTa); /* OUT - returned authz ticket */

int
API_ns_SetFilesetAttrs(
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */
uuid_t *UUID, /* IN - server UUID */
u_signed64 *FilesetId, /* IN - file set id */
ns_ObjHandle_t *FilesetHandle, /* IN - file set handle */
ns_FilesetAttrBits_t InAttrBits, /* IN - input attribute bits */
ns_FilesetAttrs_t *InAttrs, /* IN - input attributes */
ns_FilesetAttrBits_t BitsForOutAttrs,/* IN - output attribute bits */
ns_FilesetAttrs_t *OutAttrs); /* OUT - output attributes */

int
API_ns_UpdateACL(
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */
ns_ObjHandle_t *ObjHandle, /* IN - NS object handle */
char *Path, /* IN - pathname */
unsigned32 Options, /* IN - processing options */
ns_ACLConfArray_t *ACLEntry, /* IN - new ACL entry */
api_local_net_t **LocalNet); /* IN - local network table entry pointer */

int
API_ns_MkFileset(
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */
uuid_t *UUID, /* IN - server UUID */
ns_FilesetAttrBits_t FilesetAttrBits, /* IN - file set attributes bits */
ns_FilesetAttrs_t *FilesetAttrs, /* IN - file set attributes */
ns_AttrBits_t ObjAttrBits, /* IN - file set obj attribute bits */
ns_Attrs_t *ObjAttrs, /* IN - file set obj attributes */
ns_FilesetAttrBits_t RetFSAttrBits, /* IN - return file set attr bits */
ns_AttrBits_t RetObjAttrBits, /* IN - return file set obj attr bits */
ns_FilesetAttrs_t *RetFSAttrs, /* OUT - return file set attrs */
ns_Attrs_t *RetObjAttrs, /* OUT - return file set obj attrs */
ns_ObjHandle_t *FilesetHandle); /* OUT - returned file set handle */

int
API_ns_DeleteFileset(
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */
uuid_t *UUID, /* IN - server UUID */
u_signed64 *FilesetId, /* IN - file set id */
ns_ObjHandle_t *FilesetHandle);/* IN - file set handle */

int
API_ns_MkJunction(
apithrdstate_t *ThreadContext, /* IN - current context */
hsec_UserCred_t *Ucred, /* IN - user credentials */
api_requestId_t RequestID, /* IN - request id */
ns_ObjHandle_t *ObjHandle, /* IN - contains the new junction */
char *Path, /* IN - junction name */
u_signed64 *FilesetId, /* IN - file set id */
ns_ObjHandle_t *FilesetHandle, /* IN - file set handle */
ns_AttrBits_t AttrBits, /* IN - file set attributes bits */
ns_Attrs_t *Attrs, /* IN - file set attributes */
ns_ObjHandle_t *RetHandle); /* OUT - returned junction handle */

int
API_bfs_Create(
apithrdstate_t *ThreadContext, /* IN - current context */
ns_ObjHandle_t *ParentNSHandle,/* IN - new file's parent handle */
u_signed64 SelectFlags, /* IN - attributes to set */
bf_attrib_t *AttrIn, /* IN - new attributes */
api_requestId_t RequestID, /* IN - request id */
uuid_t *RetryGKControlNo, /* IN - gatekeeper retry control #*/
hpss_cos_hints_t *HintsIn, /* IN - COS hints */
hpss_cos_priorities_t *HintsPri, /* IN - COS priorities */
gss_token_t Ta, /* IN - authz ticket */
api_local_net_t **LocalNet, /* IN - local network table entry pointer */
ls_map_array_t **LSMapArray, /* IN - location map array pointer */
bfs_gk_ctl_t *GKControlPtr, /* OUT - gatekeeper control pointer */
hpssoid_t *RetBitfileID, /* OUT - new bitfile id */
hpss_cos_md_t *RetCOSPtr, /* OUT - COS values */
hpss_sclass_md_t *RetSClassPtr, /* OUT - level 0 sclass values */
gss_token_t *RetTa); /* OUT - bfs generated authz ticket */

int
API_bfs_GetCOSStats(
apithrdstate_t *ThreadContext, /* IN - current context */
api_requestId_t RequestID, /* IN - request id */
uuid_t *UUID, /* IN - server UUID */
unsigned32 CosId, /* Class of Service */
unsigned32 *BfsMaxOpenFiles, /* OUT - maximum open files allowed */
u_signed64 *BfsBlockSize, /* OUT - block size */
u_signed64 *BfsTotalBytes, /* OUT - total bytes */
u_signed64 *BfsFreeBytes); /* OUT - free bytes */

int
API_bfs_Unlink(
apithrdstate_t *ThreadContext, /* IN - current context */
hpssoid_t *BitfileID, /* IN - bitfile id */
gss_token_t Ta, /* IN - authz ticket */
rev_map_t *RevMapPtr, /* IN - reverse map info */
api_requestId_t RequestID); /* IN - request id */

int
API_bfs_Open(
apithrdstate_t *ThreadContext, /* IN - current context */
hpssoid_t *BitfileID, /* IN - bitfile id */
gss_token_t Ta, /* IN - authz ticket */
unsigned32 OpenFlags, /* IN - open mode flags */
api_requestId_t RequestID, /* IN - request id */
uuid_t *RetryGKControlNo, /* IN- gatekeeper retry control # */
bfs_gk_ctl_t *GKControlPtr, /* OUT - gatekeeper control pointer */
hpss_object_handle_t *RetBFHandle); /* OUT - bitfile handle */

int
API_bfs_Close(
apithrdstate_t *ThreadContext, /* IN - current context */
int Fildes, /* IN - file descriptor */
hpss_object_handle_t *BFHandle, /* IN - bitfile handle */
api_requestId_t RequestID); /* IN - request id */

int
API_bfs_Read(
apithrdstate_t *ThreadContext, /* IN - current context */
int Fildes, /* IN - file descriptor */
hpss_object_handle_t *BFHandle, /* IN - bitfile handle */
api_requestId_t RequestID, /* IN - request id */
unsigned32 Flags, /* IN - control flags for I/O */
IOD_t *IODPtr, /* IN - IOD */
IOR_t *IORPtr, /* OUT - IOR */
int *IORValid); /* OUT - is IOR valid? */

int
API_bfs_Write(
apithrdstate_t *ThreadContext, /* IN - current context */
int Fildes, /* IN - file descriptor */
hpss_object_handle_t *BFHandle, /* IN - bitfile handle */
api_requestId_t RequestID, /* IN - request id */
unsigned32 Flags, /* IN - control flags for I/O */
IOD_t *IODPtr, /* IN - IOD */
IOR_t *IORPtr, /* OUT - IOR */
int *IORValid); /* OUT - is IOR valid? */

int
API_bfs_BitfileOpenSetAttrs(
apithrdstate_t *ThreadContext, /* IN - current context */
int Fildes, /* IN - file descriptor */
hpss_object_handle_t *BFHandle, /* IN - bitfile handle */
api_requestId_t RequestID, /* IN - request id */
u_signed64 OwnerRecFlags, /* IN - owner record flags */
u_signed64 InSelectBitmap, /* IN - attributes to set */
u_signed64 *OutSelectBitmap,/* OUT - attributes set */
bf_attrib_t *AttrIn, /* IN - new attributes */
bf_attrib_t *AttrOut); /* OUT - result attributes */

int
API_bfs_BitfileSetAttrs(
apithrdstate_t *ThreadContext, /* IN - current context */
hpssoid_t *BitfileID, /* IN - bitfile id */
api_requestId_t RequestID, /* IN - request id */
u_signed64 OwnerRecFlags, /* IN - owner record flags */
u_signed64 InSelectBitmap, /* IN - attributes to set */
u_signed64 *OutSelectBitmap,/* OUT - attributes set */
bf_attrib_t *AttrIn, /* IN - new attributes */
bf_attrib_t *AttrOut, /* OUT - result attributes */
gss_token_t Ta); /* IN - authz ticket */

int
API_bfs_BitfileOpenGetAttrs(
apithrdstate_t *ThreadContext, /* IN - current context */
int Fildes, /* IN - file descriptor */
hpss_object_handle_t *BFHandle, /* IN - bitfile handle */
api_requestId_t RequestID, /* IN - request id */
bf_attrib_t *AttrOut); /* OUT - result attributes */

int
API_bfs_BitfileGetAttrs(
apithrdstate_t *ThreadContext, /* IN - current context */
hpssoid_t *BitfileID, /* IN - bitfile id */
api_requestId_t RequestID, /* IN - request id */
bf_attrib_t *AttrOut, /* OUT - result attributes */
gss_token_t Ta); /* IN - authz ticket */

int
API_bfs_BitfileGetXAttrs(
apithrdstate_t *ThreadContext, /* IN - current context */
hpssoid_t *BitfileID, /* IN - bitfile id */
api_requestId_t RequestID, /* IN - request id */
unsigned32 Flags, /* IN - control flags */
unsigned32 StorageLevel, /* IN - storage level */
bf_xattrib_t *XAttrOut, /* OUT - extended attributes */
gss_token_t Ta); /* IN - authz ticket */

int
API_bfs_Clear(
apithrdstate_t *ThreadContext, /* IN - current context */
int Fildes, /* IN - file descriptor */
hpss_object_handle_t *BFHandle, /* IN - bitfile handle */
api_requestId_t RequestID, /* IN - request id */
unsigned32 Flags, /* IN - control flags for I/O */
u_signed64 Offset, /* IN - beginning offset */
u_signed64 Length); /* IN - length of hole */

int
API_bfs_Stage(
apithrdstate_t *ThreadContext, /* IN - current context */
int Fildes, /* IN - fild descriptor */
hpss_object_handle_t *BFHandle, /* IN - bitfile handle */
api_requestId_t RequestID, /* IN - request id */
uuid_t *RetryGKControlNo, /* IN- gatekeeper retry control number */
unsigned32 Flags, /* IN - stage flags */
unsigned32 StorageLevel, /* IN - new storage level */
u_signed64 Offset, /* IN - beginning file offset */
u_signed64 Length, /* IN - length to stage */
bfs_gk_ctl_t *GKControlPtr); /* OUT - gatekeeper control pointer */

int
API_bfs_Migrate(
apithrdstate_t *ThreadContext, /* IN - current context */
int Fildes, /* IN - file descriptor */
hpss_object_handle_t *BFHandle, /* IN - bitfile handle */
api_requestId_t RequestID, /* IN - request id */
unsigned32 Flags, /* IN - migrate flags */
unsigned32 SrcLevel, /* IN - starting level in hierarchy */
u_signed64 *RetBytesMigrated); /* OUT - number of bytes migrated */

int
API_bfs_Purge(
apithrdstate_t *ThreadContext, /* IN - current context */
int Fildes, /* IN - file descriptor */
hpss_object_handle_t *BFHandle, /* IN - bitfile handle */
api_requestId_t RequestID, /* IN - request id */
unsigned32 Flags, /* IN - purge flags */
unsigned32 StorageLevel, /* IN - storage level */
u_signed64 Offset, /* IN - begin file offset */
u_signed64 Length, /* IN - length to purge */
u_signed64 *RetBytesPurged); /* OUT - number of bytes purged */

int
API_bfs_BitfileOpenSetCosByHints(
apithrdstate_t *ThreadContext, /* IN - current context */
int Fildes, /* IN - open file descriptor */
hpss_object_handle_t *BFHandle, /* IN - bitfile handle */
unsigned32 Flags, /* IN - flags */
api_requestId_t RequestID, /* IN - request id */
hpss_cos_hints_t *HintsPtr, /* IN - input hints */
hpss_cos_priorities_t *PrioPtr, /* IN - input priorities */
hpss_cos_md_t *COSPtr); /* OUT - COS used */

int
API_bfs_StageCallBack(
apithrdstate_t *ThreadContext, /* IN - current context */
hpssoid_t *BitfileID, /* IN - bitfile id */
api_requestId_t RequestID, /* IN - request id */
uuid_t *RetryGKControlNo, /* IN- gatekeeper retry control number */
unsigned32 Flags, /* IN - stage flags */
unsigned32 StorageLevel, /* IN - storage level */
u_signed64 Offset, /* IN - stage offset */
u_signed64 Length, /* IN - stage length */
bfs_callback_addr_t *CallBackPtr, /* IN - callback routine */
gss_token_t Ta, /* IN - security token */
bfs_gk_ctl_t *GKControlPtr); /* OUT - gatekeeper control pointer */

int
API_bfs_CopyFile(
apithrdstate_t *ThreadContext, /* IN - current context */
int SrcFileDes, /* IN - src file descriptor*/
hpss_object_handle_t *SrcBFHandle, /* IN src bitfile handle */
hpss_object_handle_t *DestBFHandle, /* IN dest bitfile handle */
api_requestId_t RequestID); /* IN - request id */

int
API_bfs_AsynchGetStatus(
apithrdstate_t *ThreadContext, /* IN - current context */
api_requestId_t RequestID, /* IN - request id */
signed32 CallBackId, /* IN - callback info */
hpssoid_t *BitfileID, /* IN - bitfile id */
signed32 *Status); /* OUT - status info */

int
API_dmg_hp_create(
apithrdstate_t *ThreadContext, /* IN - thread context */
uuid_t GatewayUUID, /* IN - DMAP gateway UUID */
api_requestId_t RequestID, /* IN - request ID */
u_signed64 FilesetID, /* IN - file set ID */
byte DMParentHandle[], /* IN - DMAP Parent Handle */
unsigned32 DMParentHandleLeng, /* IN - DMAP Handle Length */
char *EntryName, /* IN - entry name path */
unsigned32 HPSSMode, /* IN - creation mode */
unsigned32 Type, /* IN - type of object */
hpss_cos_hints_t *HintsIn, /* IN - creation hints */
hpss_cos_priorities_t *HintsPri, /* IN - creation hints priorities */
hsec_UserCred_t *UserCreds, /* IN - user credentials */
byte DMObjectHandle[], /* OUT - returned DMAP obj handle */
unsigned32 *DMObjectHandleLeng, /* OUT - DMAP handle length */
hpss_cos_hints_t *HintsOut); /* OUT - returned creation hints */

int
API_dmp_hp_fclear(
apithrdstate_t *ThreadContext, /* IN - thread context */
uuid_t GatewayUUID, /* IN - DMAP gateway UUID */
api_requestId_t RequestID, /* IN - request ID */
u_signed64 FilesetID, /* IN - file set ID */
byte *DMObjectHandle, /* IN - DMAP object handle */
unsigned32 DMObjectHandleLeng, /* IN - DMAP handle length */
u_signed64 Offset, /* IN - starting offset */
u_signed64 Length, /* IN - number of bytes */
unsigned32 Flags, /* IN - fclear flags */
hsec_UserCred_t *UserCreds); /* IN - user credentials */

int
API_dmg_hp_lookup(
apithrdstate_t *ThreadContext, /* IN - thread context */
uuid_t GatewayUUID, /* IN - DMAP gateway UUID */
api_requestId_t RequestID, /* IN - request ID */
u_signed64 FilesetID, /* IN - file set ID */
byte *DMHandle, /* IN - DMAP Handle */
unsigned32 DMHandleLeng, /* IN - DMAP Handle Length */
char *Path, /* IN - object path */
hsec_UserCred_t *UserCreds, /* IN - user credentials */
dmg_object_attrs_t *ReturnAttrs); /* OUT - returned DMAP attributes */

int
API_dmg_hp_remove(
apithrdstate_t *ThreadContext, /* IN - thread context */
uuid_t GatewayUUID, /* IN - DMAP gateway UUID */
api_requestId_t RequestID, /* IN - request ID */
u_signed64 FilesetID, /* IN - file set ID */
byte *DMParentHandle, /* IN - DMAP Parent Handle */
unsigned32 DMParentHandleLeng, /* IN - DMAP Handle Length */
char *EntryName, /* IN - entry name path */
unsigned32 Type, /* IN - type of object */
hsec_UserCred_t *UserCreds); /* IN - user credentials */

int
API_dmg_hp_rename(
apithrdstate_t *ThreadContext, /* IN - thread context */
uuid_t GatewayUUID, /* IN - DMAP gateway UUID */
api_requestId_t RequestID, /* IN - request ID */
u_signed64 FilesetID, /* IN - file set ID */
byte *OldDMParentHandle, /* IN - old parent handle */
unsigned32 OldDMParentHandleLeng, /* IN - parent handle length */
char *OldEntryName, /* IN - old entry path name */
byte *NewDMParentHandle, /* IN - new parent handle */
unsigned32 NewDMParentHandleLeng, /* IN - parent handle length */
char *NewEntryName, /* IN - new entry path name */
hsec_UserCred_t *UserCreds); /* IN - user credentials */

int
API_dmg_hp_symlink(
apithrdstate_t *ThreadContext, /* IN - thread context */
uuid_t GatewayUUID, /* IN - DMAP gateway UUID */
api_requestId_t RequestID, /* IN - request ID */
u_signed64 FilesetID, /* IN - file set ID */
byte *DMParentHandle, /* IN - DMAP parent handle */
unsigned32 DMParentHandleLeng, /* IN - DMAP handle length */
char *EntryName, /* IN - entry name path */
char *Contents, /* IN - contents of link */
hsec_UserCred_t *UserCreds, /* IN - user credentials */
byte *DMObjectHandle, /* OUT - returned DMAP handle */
unsigned32 *DMObjectHandleLeng);/* OUT - DMAP handle length */

int
API_dmg_hp_link(
apithrdstate_t *ThreadContext, /* IN - thread context */
uuid_t GatewayUUID, /* IN - DMAP gateway UUID */
api_requestId_t RequestID, /* IN - request ID */
u_signed64 FilesetID, /* IN - file set ID */
byte *DMParentHandle, /* IN - DMAP parent handle */
unsigned32 DMParentHandleLeng, /* IN - DMAP handle length */
char *EntryName, /* IN - entry name path */
byte *DMSourceHandle, /* IN - source handle */
unsigned32 DMSourceHandleLeng, /* IN - source handle length */
char *SourceName, /* IN - source name path */
hsec_UserCred_t *UserCreds); /* IN - user credentials */

int
API_dmg_hp_setattrs(
apithrdstate_t *ThreadContext, /* IN - thread context */
uuid_t GatewayUUID, /* IN - DMAP gateway UUID */
api_requestId_t RequestID, /* IN - request ID */
u_signed64 FilesetID, /* IN - file set ID */
byte *DMParentHandle, /* IN - DMAP parent handle */
unsigned32 DMParentHandleLeng, /* IN - DMAP handle length */
char *EntryName, /* IN - entry path name */
u_signed64 NewAttrBits, /* IN - new attribute bits */
dmg_object_attrs_t *NewAttr, /* IN - new attributes */
hsec_UserCred_t *UserCreds, /* IN - user credentials */
unsigned32 AclOptions, /* IN - ACL Options */
dmg_object_attrs_t *RetAttr); /* OUT - returned DMAP attributes */

int
API_dmg_hp_force_migrate(
apithrdstate_t *ThreadContext, /* IN - thread context */
uuid_t GatewayUUID, /* IN - DMAP gateway UUID */
api_requestId_t RequestID, /* IN - request ID */
u_signed64 FilesetID, /* IN - file set ID */
byte *DMObjectHandle, /* IN - DMAP object handle */
unsigned32 DMObjectHandleLeng, /* IN - handle length */
u_signed64 Offset, /* IN - data offset */
u_signed64 Length, /* IN - data length */
unsigned32 Flags, /* IN - migrate flags */
hsec_UserCred_t *UserCreds); /* IN - user credentials */

int
API_dmg_hp_invalidate_cache(
apithrdstate_t *ThreadContext, /* IN - thread context */
uuid_t GatewayUUID, /* IN - DMAP gateway UUID */
api_requestId_t RequestID, /* IN - request ID */
u_signed64 FilesetID, /* IN - file set ID */
byte *DMObjectHandle, /* IN - DMAP object handle */
unsigned32 DMObjectHandleLeng, /* IN - handle length */
u_signed64 Offset, /* IN - data offset */
u_signed64 Length, /* IN - data length */
unsigned32 Flags, /* IN - migrate flags */
u_signed64 AttrBits, /* IN - DMAP attribute bits */
dmg_object_attrs_t *SetAttrs, /* IN - DMAP attributes */
hsec_UserCred_t *UserCreds); /* IN - user credentials */

int
API_dmg_hp_get_DMAPSecServerUUID(
apithrdstate_t *ThreadContext, /* IN - thread context */
uuid_t *GatewayUUID, /* IN - DMAP gateway UUID */
api_local_net_t *GatewayComm, /* IN - gateway comm handle */
api_requestId_t RequestID, /* IN - request ID */
u_signed64 FilesetID, /* IN - file set ID */
uuid_t *DMAPUUID); /* OUT - HPSS/DMAP UUID */

int
API_hdm_dfs_SetCred
(apithrdstate_t *ThreadContext, /* IN - thread context */
api_requestId_t RequestID, /* IN - request ID */
uuid_t *UUID, /* IN - security service UUID */
unsigned32 *PAG, /* OUT - returned PAG */
idl_long_int *LifeTime); /* OUT - PAG lifetime */

int
API_hdm_dfs_RenewCred
(apithrdstate_t *ThreadContext, /* IN - thread context */
api_requestId_t RequestID, /* IN - request ID */
uuid_t *UUID, /* IN - security service UUID */
unsigned32 OldPAG, /* IN - old PAG */
unsigned32 *NewPAG, /* OUT - new PAG */
idl_long_int *LifeTime); /* OUT - PAG lifetime */

int
API_hdm_dfs_PurgeCred
(apithrdstate_t *ThreadContext, /* IN - thread context */
api_requestId_t RequestID, /* IN - request ID */
uuid_t *UUID, /* IN - security service UUID */
unsigned32 PAG); /* IN - purge PAG */

void
API_LockMutex(
pthread_mutex_t *MutexPtr); /* IN - ptr to mutext */

void
API_UnlockMutex(
pthread_mutex_t *MutexPtr); /* IN - ptr to mutext */

signed32
API_LockCondition(
api_condition_variable_t *Lock, /* IN - condition variable structure */
char *Function); /* IN - calling function */

signed32
API_UnlockCondition(
api_condition_variable_t *Lock, /* IN - condition variable structure */
char *Function); /* IN - calling function */

int
API_DebugPrint(
FILE *File, /* IN - file stream */

char *Format, /* IN - Format-control string */
... ); /* IN - Optional arguments */

int
API_DebugPrintRqstid(
FILE *File, /* IN - file stream */
api_requestId_t RequestID, /* IN - Request ID */
char *Format, /* IN - Format-control string */
... ); /* IN - Optional arguments */


































































































































































































































































































































































































































































































































































































































































































#define API_RDDIR_BUFSIZE (16 * (sizeof(ns_DirEntry_t)))

#define API_ASSERT(C) \
if (!(C)) { \
printf("API Assertion Failed: [%s #%d]\n",__FILE__,__LINE__); \
kill(getpid(),SIGABRT); \
}

#define API_RETRY(retry_cb,error) \
for (retry_cb.initialized = FALSE; \
API_PerformRetry(&retry_cb,error); \
)

#if defined (API_DMAP_GATEWAY)
#define API_TOPLEVEL transaction
#else
#define API_TOPLEVEL topLevel
#endif

extern int API_Debug;

extern char API_RootDir[];

extern api_config_t API_Config;

extern FILE *DebugFile;

#if defined(API_DEBUG)

#define API_DEBUG_FPRINTF API_DebugPrint

#define API_DEBUG_FPRINTF_RQSTID API_DebugPrintRqstid

#define API_DEBUG_FFLUSH \
if (API_Debug != 0) \
fflush
#else

#define API_DEBUG_FPRINTF

#define API_DEBUG_FPRINTF_RQSTID

#define API_DEBUG_FFLUSH

#endif

#define API_RETURN(retval) \
if (1) \
{ \
if ((retval) < 0) \
errno = -(retval); \
return(retval); \
} \
else

extern int API_TransferType;
extern int API_BusyDelay;
extern int API_BusyRetries;
extern int API_NumRetries;
extern int API_LimitedRetries;
extern int API_TotalDelay;
extern int API_GKTotalDelay;
extern int API_ReuseDataConnections;
extern int API_UsePortRange;
extern int API_DMAPWriteUpdates;

extern pthread_mutexattr_t API_MutexAttrs;

#endif /* api_internal_h */

#ifndef api_internal_h
#define api_internal_h

#include <string.h>
#include <signal.h>
#include <pthread.h>

#include "hpss_api.h"
#include "hpss_sec.h"
#include "hpss_sec_info.h"

#include "api_log.h"
#include "hpss_ls.h"
#include "hpss_sclass.h"
#include "hpss_connmgr.h"
#include "core_mo.h"
#include "hpss_iod.h"
#include "dmapi/dmg/dmg_types.h"



typedef struct api_condition_variable {
pthread_mutex_t Mutex;
pthread_cond_t Cond;
unsigned32 Predicate;
char Name[HPSS_MAX_DESC_NAME];
} api_condition_variable_t;


#define API_AVAILABLE (1) /* condition variable free */
#define API_INUSE (2) /* condition variable in use */


typedef enum {
NO_OPEN_HANDLE = 0, /* Null object */
BFS_OPEN_HANDLE, /* BitFile */
NS_OPEN_HANDLE /* Directory */
} open_type;


typedef enum {
API_NON_RETRYABLE, /* Never retry */
API_RETRYABLE, /* Retry number of times */
API_DELAY_RETRYABLE, /* Retry number of times with delay */


API_LIMITED_RETRYABLE, /* Retry a limited number of times */
API_GK_RETRYABLE /* Delay for gk_delay time */

} api_retry_class_t;

typedef struct retry_cb {
unsigned32 initialized; /* Flag indicating */
signed32 retries; /* Number of retry attempts */
signed32 time_limit; /* Delay between retries */
unsigned32 gk_delay; /* Delay time for this */
signed32 gk_time_limit; /* Maximum delay time for all */

api_retry_class_t retry_class; /* Error retry class */
} retry_cb_t;

#define API_GK_NODELAY (0)

typedef struct api_cwd_rec {
char *Path; /* Cwd partial path */
ns_ObjHandle_t Handle; /* file set handle */
struct api_cwd_rec *Next; /* Next cwd record */
struct api_cwd_rec *Prev; /* Previous cwd record */
} api_cwd_rec_t;

typedef struct {
unsigned32 Size; /* Size of cwd stack */
unsigned32 Local; /* If the stack is not shared */
pthread_mutex_t Mutex; /* Cwd stack mutex */
api_cwd_rec_t *Top; /* Top of cwd stack */
api_cwd_rec_t *Bottom; /* Bottom of cwd stack */
} api_cwd_stack_t;

#define API_MAX_CWD_RECORDS (50)

#define API_NULL_CWD_STACK (NULL)

typedef struct open_bf_desc {
hpss_object_handle_t BFHandle; /* handle to open bitfile */
hpss_uuid_t CoreServerUUID;/* uuid of core server for file */
u_signed64 Offset; /* current file offset */
int OpenFlag; /* open flags */
pthread_mutex_t Mutex; /* descriptor mutex */
pthread_cond_t Cond; /* descriptor condition variable*/
unsigned32 Updates; /* writes since last XDSM update */
api_dmap_attrs_t DMattrs; /* DMAP attributes for the file */
unsigned32 FilesetCOS; /* file's class of service */
int ListenDesc; /* listen descriptor */
int DataDesc; /* data descriptor */
desc_elem_t *DataConnPtr; /* list of data connections */
data_addr_t ListenAddr_u; /* listen address */
data_addr_t DataAddr_u; /* data address */
} open_bf_desc_t;

typedef struct open_hpns_desc {
unsigned32 End;
u_signed64 Offset;
signed32 NextCacheEntryIndex;
ns_DirEntryConfArray_t CachePtr;
} open_hpns_desc_t;

#define ENTRY_BUSY (0x00000001)
#define ENTRY_STALE (0x00000002)
#define ENTRY_INSERTED (0x00000004)

typedef struct openfiletable {
open_type Type; /* Type of open handle */
int Flags; /* State of the handle */
hpss_reqid_t GlobalRqstId; /* Global request id */
ns_ObjHandle_t ObjectHandle; /* NS object handle */
union {
open_bf_desc_t OpenBF; /* BitFile */
open_hpns_desc_t OpenNS; /* Directory */
} descunion_u;
} openfiletable_t;

#define _HPSS_OPEN_MAX (4096)

typedef struct filetable {
openfiletable_t OpenDesc[_HPSS_OPEN_MAX];
int NumOpenDesc;
int TotalOpens;
int TotalCloses;
pthread_mutex_t Mutex;
} filetable_t;

#define API_CORE_SERVER (1) /* hpss core server */
#define API_DMG (2) /* dmap gateway */
#define API_HDM_SEC (3) /* hpss dmap security server*/
#define API_ROOT_CORE_SERVER (4) /* root hpss core subsystem */
#define API_SERVER_MAX (5) /* upper limit on server types */

typedef struct api_acct_list {
hpss_uuid_t SiteId;
acct_rec_t AccountCode;
char AccountName[HPSS_MAX_ACCOUNT_NAME];
struct api_acct_list *Next;
} api_acct_list_t;

typedef struct apithrdstate {
pthread_t ThreadID; /* Thread identifier */
sec_cred_t UserCred; /* User's credentials */
mode_t Umask; /* Creation mask */
hpss_sec_info_desc_t SecurityInfo; /* Security info */
filetable_t *FileTable; /* Table of open files */
ns_ObjHandle_t CwdObjectHandle; /* CWD object handle */
api_cwd_stack_t *CwdStackPtr; /* CWD path stack */
char RootDir[HPSS_MAX_PATH_NAME];
/* Root directory */
api_acct_list_t *AccountList; /* Sites visited */
int AcctListSize; /* Number of accounts */
retry_cb_t RetryCB; /* Retry control block */
hpss_ExTransHandle_t *TransHandlePtr; /* Transaction handle */
struct apithrdstate *Next; /* List pointer */
} apithrdstate_t;

#define API_STATUS_OK (0)
#define API_STATUS_NEED_INITIALIZE (1)
#define API_STATUS_NEED_CONN_INIT (2)
#define API_STATUS_NEED_CREDS (3)
#define API_STATUS_NEED_FTABLE_INIT (4)
#define API_STATUS_NEED_CHDIR (5)
#define API_STATUS_UNINITIALIZED (99)

typedef struct iodxferstate {
int Flags; /* Xfer in progress? */
int ListenDesc; /* Listen socket */
int DataDesc; /* Data descriptor */
hpss_IOD_t *ClientIODPtr; /* Ptr to client's IOD */
hpss_IOR_t *XferIORPtr; /* Ptr to client's IOR */
int TotalLength; /* Length for mover endpoints */
int BytesMoved; /* Total bytes moved */
desc_elem_t **SDPtr; /* List of open descriptors */
int RetVal; /* Return value */
pthread_mutex_t *MutexPtr; /* Structure protection */
pthread_cond_t *CondPtr; /* Condition variable */
int CondWait; /* Wait variable */
data_addr_t *DataAddrPtr; /* Data (IPI-3) Address */
} iodxferstate_t;

#define API_DATA_THREAD_ACTIVE (0x00000001)
#define API_DATA_IPI3_INPROG (0x00000002)
#define API_DATA_IOR_RECVD (0x00000004)

typedef struct datathreadstate {
int Flags; /* Xfer in progress? */
int ListenDesc; /* Listen socket */
int DataDesc; /* Data descriptor (IPI-3) */
hpss_reqid_t RequestID; /* Request ID */
u_signed64 XferID; /* Transfer ID */
u_signed64 Offset; /* Relative offset in addr space */
char *Buffer; /* Data pointer. */
int BufSize; /* Size of buffer in bytes */
int BytesMoved; /* Total bytes moved */
int RetVal; /* Return value */
desc_elem_t **SDPtr; /* List of open descriptors */
pthread_mutex_t *MutexPtr; /* Structure protection */
pthread_cond_t *CondPtr; /* Condition variable */
int CondWait; /* Wait variable */
data_addr_t *DataAddrPtr; /* Data (IPI-3) Address */
} datathreadstate_t;

typedef enum {
ACL_CACHE_USER, /* Use the user name cache */
ACL_CACHE_GROUP /* Use the group name cache */
} acl_cache_type_t;

typedef struct acl_cache_entry {
time_t Time; /* Time when entry created */
int Id; /* The uid or gid of the principal */
int RealmId;
/* HPSS realm id where principal resides */
char Name[HPSS_MAX_PRINCIPAL_NAME];
/* User or group name of principal */
char RealmName[HPSS_MAX_REALM_NAME];
/* Name of cell where principal resides */
struct acl_cache_entry *Next; /* Next less recently used entry */
struct acl_cache_entry *Prev; /* Next more recently used entry */
} acl_cache_entry_t;

#define API_MAX_ACCT_LIST_SIZE (20)

#define F_HPSS_MAX_BUFFERS 4
#define F_HPSS_BUF_AVAILABLE 0
#define F_HPSS_BUF_BUSY -1
#define F_HPSS_BUF_ACTIVE 1
#define F_HPSS_BUF_INBUF 2
#define F_HPSS_BUF_OUTBUF 3
#define F_HPSS_BUF_DONE 4
#define F_HPSS_BUFSIZE (32*1024*1024)
#define F_HPSS_NOBUF -1
#define F_HPSS_PTEXIT -99
#define F_HPSS_TIMEOUT 1

typedef struct __HPSS_FILE {
int hpss_fd; /* HPSS file descriptor */
unsigned char *bufPtr[F_HPSS_MAX_BUFFERS];/* Array of buffer pointers */
int bufStat[F_HPSS_MAX_BUFFERS];/* Array of buffer statuses */
size_t offset[F_HPSS_MAX_BUFFERS]; /* Array of buffer offsets */
size_t total[F_HPSS_MAX_BUFFERS]; /* Array of buffer total bytes*/
ssize_t retval[F_HPSS_MAX_BUFFERS]; /* Return values from r/w */
size_t size; /* Size of HPSS File (bytes) */
size_t totalwritten; /* Total bytes written to file*/
size_t totalread; /* Total bytes read from file */
int buf; /* Active client buffer */
char *mode; /* File mode (r,w,a,r+,w+,a+) */
char lastop; /* Last file operation (r,w,f)*/
int numbuf; /* Number of buffers */
pthread_t rtid; /* Read Thread ID */
pthread_t wtid; /* Write Thread ID */
pthread_mutex_t mutex; /* Synchronization mutex */
pthread_cond_t rcond; /* Read condition variable */
pthread_cond_t wcond; /* Write condition variable */
int rbuf; /* Read buffer */
int wbuf; /* Write buffer */
};


typedef enum { API_CALL_ERROR, API_CALL_HPSS, API_CALL_DMG } call_type_t;

#define API_CHASE_NONE (0x00000000)
#define API_CHASE_SYMLINK (0x00000001)
#define API_CHASE_JUNCTION (0x00000002)
#define API_CHASE_ALL (API_CHASE_SYMLINK|API_CHASE_JUNCTION)

#define DATA_THREAD_TIMEOUT (60 * 15)

#define API_SOCKOPT_RECVBUF (0x00000001)
#define API_SOCKOPT_SENDBUF (0x00000002)
#define API_SOCKOPT_REUSEADDR (0x00000004)
#define API_SOCKOPT_KEEPALIVE (0x00000008)
#define API_SOCKOPT_TCPNODELAY (0x00000010)
#define API_SOCKOPT_FIONBIO (0x00000020)
#define API_SOCKOPT_RFC1323 (0x00000040)

#define API_SOCKOPT_PERFOPTS (API_SOCKOPT_RECVBUF | \
API_SOCKOPT_SENDBUF | \
API_SOCKOPT_RFC1323)

#define API_SOCKOPT_AFTERCONNOPTS (API_SOCKOPT_TCPNODELAY | \
API_SOCKOPT_KEEPALIVE)


#define API_THREAD_ENABLE_CANCEL(OldState) if(1) { \
int err = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,&(OldState)); \
if(err != 0) { \
API_DEBUG_FPRINTF(DebugFile,&rqstid,"%s:%d Could not set cancel state, error=%d\n", \
__FILE__,__LINE__,err); \
kill(getpid(),SIGABRT); \
} \
}

#define API_THREAD_DISABLE_CANCEL(OldState) if(1) { \
int err = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE,&(OldState)); \
if(err != 0) { \
API_DEBUG_FPRINTF(DebugFile,&rqstid,"%s:%d Could not set cancel state, error=%d\n", \
__FILE__,__LINE__,err); \
kill(getpid(),SIGABRT); \
} \
}

#define API_THREAD_ASYNC_CANCEL(OldType) if(1) { \
int err = pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS,&(OldType)); \
if(err != 0) { \
API_DEBUG_FPRINTF(DebugFile,&rqstid,"%s:%d Could not set cancel type, error=%d\n", \
__FILE__,__LINE__,err); \
kill(getpid(),SIGABRT); \
} \
}

#define API_THREAD_DEFER_CANCEL(OldType) if(1) { \
int err = pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED,&(OldType)); \
if(err != 0) { \
API_DEBUG_FPRINTF(DebugFile,&rqstid,"%s:%d Could not set cancel type, error=%d\n", \
__FILE__,__LINE__,err); \
kill(getpid(),SIGABRT); \
} \
}

#if defined(__SVR4) || defined(LINUX) || \
(defined(__alpha) && defined(__unix__))

#define ENOCONNECT ECONNREFUSED
#elif defined(__sgi)
#define ENOCONNECT ECONNREFUSED
#define ENOTREADY EAGAIN

#endif

#if defined(IPI3_SUPPORT)
extern pthread_mutex_t API_Ipi3Mutex;
#endif

#define API_RDDIR_BUFSIZE (128 * (sizeof(ns_DirEntry_t)))

#define API_ASSERT(C) \
if (!(C)) { \
printf("API Assertion Failed: [%s #%d]\n",__FILE__,__LINE__); \
kill(getpid(),SIGABRT); \
}

#define API_RETRY_INIT(retry_cb) \
(void)memset(&retry_cb,0,sizeof(retry_cb)); \
retry_cb.initialized = TRUE; \
retry_cb.time_limit = time(0) + API_TotalDelay; \
retry_cb.retry_class = API_NON_RETRYABLE; \
retry_cb.gk_delay = API_GK_NODELAY;

#define API_RETRY(retry_cb,error) \
if(error != 0) \
API_TRACE_FPRINTF(DebugFile, NULL, "performing retry (" \
"function=%s, retries=%d, class=%d," \
" now=%d,time_limit=%d, busydelay=%d, " \
" totaldelay=%d, gk delay=%d)\n", \
function_name, \
retry_cb.retries, retry_cb.retry_class, \
time(0), retry_cb.time_limit, \
API_BusyDelay, API_TotalDelay, \
retry_cb.gk_delay); \
for(retry_cb.retries=-1,error=0;API_PerformRetry(&retry_cb,error);)

extern int API_Debug;

#define API_DEBUG_ERROR (1)
#define API_DEBUG_REQUEST (2)
#define API_DEBUG_TRACE (4)

extern char API_RootDir[];

extern api_config_t API_Config;

extern FILE *DebugFile;

#if defined(API_DEBUG)
#define API_REQUEST_FPRINTF API_DebugPrintRequest
#define API_DEBUG_FPRINTF API_DebugPrintError
#define API_TRACE_FPRINTF API_DebugPrintTrace
#else
#define API_REQUEST_FPRINTF
#define API_DEBUG_FPRINTF
#define API_TRACE_FPRINTF
#endif

#define API_ENTER(name) \
API_REQUEST_FPRINTF(DebugFile, NULL, "API enter %s\n", (name))

#define API_RETURN(retval) \
if (1) \
{ \
if ((retval) < 0) \
errno = -(retval); \
API_REQUEST_FPRINTF(DebugFile, NULL, \
"API return: file=%s,line=%d,value=%d\n", \
__FILE__,__LINE__,retval); \
return(retval); \
} \
else

extern int API_TransferType;
extern int API_BusyDelay;
extern int API_BusyRetries;
extern int API_NumRetries;
extern int API_LimitedRetries;
extern int API_TotalDelay;
extern int API_ReuseDataConnections;
extern int API_UsePortRange;
extern int API_DMAPWriteUpdates;
extern int API_3rdPartySanEnabled;

extern pthread_mutex_t API_DefaultMutex;
extern pthread_cond_t API_DefaultCondVar;
extern pthread_attr_t API_DataThreadAttrs;

int
API_ClientAPIInit(
apithrdstate_t **ThreadState); /* IN - Pointer to thread's state */


void
API_UnlockFileTableEntries(
iod_srcsinkdesc_t *SrcSinkPtr, /* IN - start of src/sink descriptor list */
filetable_t *FileTabPtr, /* IN - file table pointer */
fd_set *FildesLocked, /* IN - indicates files to be unlocked */
int NumLocked, /* IN - number of files to unlock */
int LockTable); /* IN - should we lock/unlock the table? */

int
API_InitializeServerIOD(
hpss_IOD_t *IODPtr, /* IN - client IOD pointer */
IOD_t *RetIODPtr); /* IN/OUT - newly initialize server IOD */

int

API_AllocateRequestIOR(
IOD_t *IODPtr, /* IN - received IOD */
hpss_IOR_t *IORPtr); /* IN - ptr to skeleton IOR */

int
API_CalcBufOffsetAndSize(
u_signed64 Offset, /* IN - client's relative offset in the xfer */
int BufSize, /* IN - client's buffer size */
char *Buffer, /* IN - client's buffer */
u_signed64 MessageOffset, /* IN - message transfer offset */
u_signed64 MessageLength, /* IN - message bytes to transfer */
char **RetBufStart, /* IN - where in Buffer to start data xfer */
int *RetLength); /* OUT - how many bytes to transfer */


int
API_BuildFileSrcSink(
iod_srcsinkdesc_t *DescList, /* IN - client IOD descriptor list */
filetable_t *FTPtr, /* IN - pointer to the file table */
open_bf_desc_t **OpenBFDescPtr, /* IN - open bitfile descriptor */
srcsinkdesc_t **RetDescList); /* IN/OUT - server IOD descriptor list */

int
API_BuildXferSrcSink(
iod_srcsinkdesc_t *DescList, /* IN - client IOD descriptor list */
open_bf_desc_t *OpenBFDesc, /* IN - open bitfile descriptor */
u_signed64 RequestId, /* IN - IOD request number */
int *ListenDesc, /* IN/OUT - listen socket descriptor */
int *DataDesc, /* OUT - data IO socket descriptor */
data_addr_t **DataAddrPtr, /* OUT - data address information */
u_signed64 *MemoryLength, /* OUT - bytes of memory to use */
srcsinkdesc_t **RetDescList); /* IN/OUT - server IOD descriptor list */

int
API_ApplyRootDir(
char *Path, /* IN - requested path */
char *RootDir, /* IN - current root path */
char *NewPath, /* OUT - returned path */
apithrdstate_t *ThreadContext);/* IN/OUT - current thread context */


int
API_FreeRequestIOR(
IOD_t *IODPtr, /* IN - received IOD */
IOR_t *IORPtr); /* IN - IOR to be released */

void
API_FreeIODPtrs(
IOD_t *IODPtr); /* IN - IOD containing pts to release */

void
API_ConvertModeToPosixMode(
hpss_Attrs_t *Attrs, /* IN - HPSS attrs */
mode_t *PosixMode); /* OUT - POSIX mode bits */

void
API_ConvertPosixModeToMode(
mode_t PosixMode, /* IN - POSIX mode bits */
hpss_Attrs_t *Attrs); /* OUT - HPSS attrs */







void
API_ConvertAttrsToVAttrs(
hpss_Attrs_t *NSAttrs, /* IN - HPSS attributes */
hpss_vattr_t *VAttrs); /* OUT - VFS attributes */

void
API_ConvertVAttrsToAttrs(
hpss_vattr_t *VAttrs, /* IN - VFS attributes */
hpss_Attrs_t *NSAttrs); /* OUT - HPSS attributes */
































void
API_ConvertAttrToVAttrSelFlags(
hpss_AttrBits_t SelFlags, /* IN - HPSS selection flags */
u_signed64 *RetFlagsPtr); /* OUT - VFS selection flags */

void
API_ConvertVAttrToAttrSelFlags(
u_signed64 SelFlags, /* IN - VFS selection flags */
hpss_AttrBits_t *RetFlagsPtr); /* OUT - NS selection flags */

hpss_reqid_t
API_GetUniqueRequestID();

void
API_SocketSetOptions(
int Socket, /* Socket descriptor */
struct sockaddr_in *SaddrPtr, /* Socket address */
unsigned int Options); /* What options */

int
API_OpenListenDesc(
int Type, /* Type of port to open */
int *ListenDesc, /* Returned open socket */
data_addr_t *ListenAddr); /* Returned socket identification */

void
API_CloseListenDesc(
int Type, /* IN - type of desciptor to close */
int ListenDesc); /* IN - open descriptor */

void
API_CloseDataConnList(
desc_elem_t **ListPtr); /* IN - pointer to list head */

int
API_DetermineAcct(
sec_cred_t *UserCred, /* IN - user credentials */
apithrdstate_t *threadcontext, /* IN - thread context */
hpss_uuid_t CoreServerUUID, /* IN - id of Core Server */
hpss_reqid_t RequestID, /* IN - request id */
hpss_uuid_t *SiteId, /* OUT - site location */
acct_rec_t *AcctCode); /* OUT - account code */

int
API_GetUUIDFromObjHandle(
ns_ObjHandle_t *ObjHandle, /* IN - object handle */
unsigned32 *ServerType, /* OUT - server type */

hpss_uuid_t *UUID); /* OUT - server uuid */

int
API_GetUUIDFromBitfileID(
apithrdstate_t *ThreadContext, /* IN - thread context */
hpss_reqid_t RequestID, /* IN - request id */
hpssoid_t *BitfileID, /* IN - bitfile id */

hpss_authz_token_t *AuthzTicket, /* IN - authorization ticket */
hpss_uuid_t *UUID); /* OUT - core server uuid */















int
API_GrabConn(
char *FunctionName, /* IN - calling function name */
hpss_reqid_t RequestId, /* IN - request id */
int ServerType, /* IN - Type of the server */
hpss_uuid_t *ServerUUID, /* IN - Server to get connect for */
hpss_ConnMgrEntry_t **Conn); /* OUT - connection entry */

int
API_ReleaseConn(
char *FunctionName, /* IN - calling function name */
hpss_reqid_t RequestId, /* IN - request id */
hpss_ConnMgrEntry_t *Conn, /* IN - connection entry */
signed32 Error, /* IN - Error from the server */
signed32 RpcErr); /* IN - Error from the RPC */

int
API_PAG_PurgeList(
apithrdstate_t *ThreadContext); /* IN - thread context */

int
API_PAG_Verify(
apithrdstate_t *ThreadContext, /* IN - thread context */
hpss_ConnMgrEntry_t *GatewayComm, /* IN - gateway comm handle */
hpss_uuid_t *GatewayUUID, /* IN - gateway UUID */
unsigned32 RequestID, /* IN - request ID */
u_signed64 FilesetID, /* IN - file set ID */
unsigned32 *PAG); /* OUT - retured PAG */


















int
API_SetCurrentSessionAcct(
apithrdstate_t *ThreadContext, /* IN/OUT - local thread context */

hpss_uuid_t *SiteId); /* IN - site location */

void
API_SetCwd(
ns_ObjHandle_t *CwdPtr); /* IN - new working dir */

void
API_SetUmask(
mode_t Umask); /* IN - new user mask */

int
API_TraversePath (
apithrdstate_t *ThreadContext, /* IN - current context */

hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *ObjHandle, /* IN - object handle */
char *Path, /* IN - pathname */
api_cwd_stack_t *CwdStack, /* IN - cwd stack */



unsigned32 TraversalFlags, /* IN - path traversal flags */
unsigned32 XAttrFlags, /* IN - extended attrs flags */
unsigned32 XAttrStoreLevel, /* IN - extended attrs args */
hpss_AttrBits_t SelectFlags, /* IN - object attribute bits */
hpss_AttrBits_t ParentSelectFlags, /* IN - parent attribute bits */
api_cwd_stack_t *RetCwdStack, /* OUT - returned cwd stack */

ns_ObjHandle_t *RetHandle, /* OUT - object handle */

hpss_Attrs_t *RetAttrs, /* OUT - object attributes */
ns_ObjHandle_t *RetParentHandle, /* OUT - parent handle */
hpss_Attrs_t *RetParentAttrs, /* OUT - parent attributes */
hpss_authz_token_t *RetTa, /* OUT - authz ticket */
char *RetObjectName, /* OUT - object name */
bf_sc_attrib_t *XAttr); /* OUT - extended attrs */

int
API_PathFromCwdStack(
api_cwd_stack_t *Stack, /* IN - pointer to cwd stack */
unsigned32 Size, /* IN - size of path */
char *Path); /* OUT - returned path */

int
API_InitCwdStack(
api_cwd_stack_t *Stack, /* IN - pointer to cwd stack */
unsigned32 Local); /* IN - Thread local stack flag */

void
API_FreeCwdStack(
api_cwd_stack_t *Stack); /* IN - pointer to cwd stack */

int
API_SetCwdStack(
api_cwd_stack_t *CwdStack, /* IN - pointer to cwd stack */
api_cwd_stack_t *FromStack); /* IN - pointer to from stack */

call_type_t
API_DetermineCall(
unsigned32 FilesetType, /* IN - file set type */
signed32 *Error); /* OUT - returned error */

int
API_PerformRetry(
retry_cb_t *RetryCB, /* IN - retry control block */
int Error); /* IN - error return code */

int
API_DivideFilePath(
char *PathIn, /* IN - path and file */
char *PathOut, /* OUT - returned path */
char *FileOut); /* OUT - returned file */

int
API_TranslateError(

signed32 Error, /* IN - error value */
retry_cb_t *RetryCB); /* IN - retry control block */



























































































































































































































































































































































































































































































































































































































































































































































void
API_LockMutex(
pthread_mutex_t *MutexPtr); /* IN - ptr to mutext */

void
API_UnlockMutex(
pthread_mutex_t *MutexPtr); /* IN - ptr to mutext */

signed32
API_LockCondition(
api_condition_variable_t *Lock, /* IN - condition variable structure */

char *Function); /* IN - calling function */

signed32
API_UnlockCondition(
api_condition_variable_t *Lock, /* IN - condition variable structure */

char *Function); /* IN - calling function */

void
API_DebugPrintError(
FILE *File, /* IN - file stream */
hpss_reqid_t *RequestID, /* IN - request ID */
char *Format, /* IN - format-control string */
... ); /* IN - optional arguments */

void
API_DebugPrintRequest(

FILE *File, /* IN - file stream */
hpss_reqid_t *RequestID, /* IN - request ID */
char *Format, /* IN - rormat-control string */
... ); /* IN - optional arguments */

void
API_DebugPrintTrace(
FILE *File, /* IN - file stream */
hpss_reqid_t *RequestID, /* IN - request ID */
char *Format, /* IN - format-control string */
... ); /* IN - optional arguments */

int
API_core_AsynchGetStatus(
apithrdstate_t *ThreadContext, /* IN - thread context */
hpss_reqid_t RequestID, /* IN - request id */
hpssoid_t *BitfileID, /* IN - bitfile id */
signed32 CallBackId, /* IN - callback info */
signed32 *Status); /* OUT - status info */

int
API_core_BeginExTrans(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
hpss_uuid_t *CoreServerUUID,/* IN - core server UUID */
hpss_ExTransHandle_t *TransHandle); /* OUT - extended transaction */

int
API_core_BitfileGetAttrs(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
hpssoid_t *BitfileID, /* IN - bitfile id */
hpss_authz_token_t Ta, /* IN - authz ticket */
bf_attrib_t *AttrOut); /* OUT - result attributes */

int
API_core_BitfileGetXAttrs(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
hpssoid_t *BitfileID, /* IN - bitfile id */
unsigned32 Flags, /* IN - control flags */
unsigned32 StorageLevel, /* IN - storage level */
hpss_authz_token_t Ta, /* IN - authz ticket */
bf_xattrib_t *XAttrOut); /* OUT - extended attributes */

int
API_core_BitfileOpenGetAttrs(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
open_bf_desc_t *OpenBFDescPtr, /* IN - bf descriptor ptr */
bf_attrib_t *AttrOut); /* OUT - result attributes */

int
API_core_BitfileOpenSetAttrs(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
open_bf_desc_t *OpenBFDescPtr, /* IN - bf descriptor ptr */
u_signed64 InSelectBitmap, /* IN - attributes to set */
u_signed64 *OutSelectBitmap,/* OUT - attributes set */
bf_attrib_t *AttrIn, /* IN - new attributes */
bf_attrib_t *AttrOut); /* OUT - result attributes */

int
API_core_BitfileOpenSetCosByHints(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
open_bf_desc_t *OpenBFDescPtr, /* IN - bf descriptor ptr */
unsigned32 Flags, /* IN - flags */
hpss_cos_hints_t *HintsPtr, /* IN - input hints */
hpss_cos_priorities_t *PrioPtr, /* IN - input priorities */
hpss_cos_md_t *COSPtr); /* OUT - COS used */

int
API_core_BitfileSetAttrs(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
hpssoid_t *BitfileID, /* IN - bitfile id */
u_signed64 InSelectBitmap, /* IN - attributes to set */
bf_attrib_t *AttrIn, /* IN - new attributes */
hpss_authz_token_t Ta, /* IN - authz ticket */
u_signed64 *OutSelectBitmap,/* OUT - attributes set */
bf_attrib_t *AttrOut); /* OUT - result attributes */

int
API_core_ClearFile(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
open_bf_desc_t *OpenBFDescPtr, /* IN - bf descriptor ptr */
unsigned32 Flags, /* IN - flags for I/O */
u_signed64 Offset, /* IN - beginning offset */
u_signed64 Length); /* IN - length of hole */

int
API_core_CopyFile(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
open_bf_desc_t *SrcOpenBFDescPtr, /* IN - src descriptor */
open_bf_desc_t *DestOpenBFDescPtr);/* IN - dest descriptor */

int
API_core_CloseFile(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
open_bf_desc_t *OpenBFDescPtr); /* IN - bf descriptor ptr */

int
API_core_CreateFile(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *ObjHandle, /* IN - parent handle */
char *Path, /* IN - new name */
hpss_cos_hints_t *HintsIn, /* IN - COS hints */
hpss_cos_priorities_t *HintsPri, /* IN - COS priorities */
hpss_AttrBits_t InAttrBits, /* IN - file attribute bits */
hpss_Attrs_t *InAttrs, /* IN - file attributes */
hpss_authz_token_t *Ta, /* IN - authz ticket */
hpss_AttrBits_t OutAttrBits, /* OUT - attribute bits */
hpss_Attrs_t *OutAttrs, /* OUT - atttributes */
ns_ObjHandle_t *OutObjHandle, /* OUT - object handle */
hpss_cos_md_t *RetCOSPtr, /* OUT - COS values */
hpss_sclass_md_t *RetSClassPtr, /* OUT - level 0 sclass */
hpss_authz_token_t *RetTa); /* OUT - authz ticket */

int
API_core_Delete(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *ObjHandle, /* IN - object handle */
char *Path, /* IN - pathname */
unsigned32 DeleteFlag); /* IN - flag for delete */

int
API_core_DeleteACL(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *ObjHandle, /* IN - object handle */
char *Path, /* IN - pathname */
unsigned32 Options, /* IN - processing options */
ns_ACLConfArray_t *ACLEntry); /* IN - ACL entry to delete */

int
API_core_DeleteFileset(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
hpss_uuid_t *CoreServerUUID,/* IN - core server UUID */
u_signed64 *FilesetId, /* IN - file set id */
ns_ObjHandle_t *FilesetHandle);/* IN - file set handle */

int
API_core_EndExTrans(
apithrdstate_t *ThreadContext,/* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
hpss_ExTransOutcome_t Outcome, /* IN - transaction outcome */
hpss_ExTransHandle_t *TransHandle); /* IN - extended transaction */

int
API_core_GetACL(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *ObjHandle, /* IN - object handle */
char *Path, /* IN - pathname */
unsigned32 Options, /* IN - processing options */
ns_ACLConfArray_t **ACL); /* OUT - list of ACL entries */

int
API_core_GetAttrs(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *ObjHandle, /* IN - object handle */
char *Path, /* IN - pathname */
unsigned32 TraversalFlags, /* IN - traversal flags */
unsigned32 XAttrFlags, /* IN - extended attrs flags */
unsigned32 XAttrStoreLevel, /* IN - extended attrs args */
hpss_AttrBits_t SelectFlags, /* IN - object attr bits */
hpss_AttrBits_t ParentSelectFlags,/* IN - parent attr bits */
ns_ObjHandle_t *RetObjHandle, /* OUT - object handle */
hpss_Attrs_t *RetAttrs, /* OUT - object attrs */
ns_ObjHandle_t *RetParentHandle, /* OUT - parent handle */
hpss_Attrs_t *RetParentAttrs, /* OUT - parent attrs */
hpss_authz_token_t *RetTa, /* OUT - authz ticket */
char *ObjectName, /* OUT - object name */
ns_RemainingPath_t *RemainingPath, /* OUT - remaining path */
bf_sc_attrib_t *XAttr); /* OUT - extended level info */

int
API_core_GetCOSStats(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
hpss_uuid_t *CoreServerUUID,/* IN - core server UUID */
unsigned32 *CosId, /* IN/OUT - class of service */
unsigned32 *BfsMaxOpenFiles, /* OUT - open files */
u_signed64 *BfsBlockSize, /* OUT - block size */
u_signed64 *BfsTotalBytes, /* OUT - total free bytes */
u_signed64 *BfsFreeBytes); /* OUT - free bytes */

int
API_core_GetMO(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
unsigned32 SubsystemId, /* IN - subsystem id */
core_ManagedObject_t *MOData); /* OUT - managed object */

int
API_core_GetFilesetAttrs(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
hpss_uuid_t *CoreServerUUID,/* IN - core server UUID */
u_signed64 *FilesetId, /* IN - file set id */
ns_ObjHandle_t *FilesetHandle, /* IN - file set handle */
ns_FilesetAttrBits_t AttrBits, /* IN - attributes bits */
ns_FilesetAttrs_t *OutAttrs); /* OUT - file set attributes */

int
API_core_GetFilesetByName(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
hpss_uuid_t *RootCoreServerUUID, /* IN - root core server uuid */
char *FilesetName, /* IN - fileset name */
u_signed64 *FilesetId, /* OUT - fileset id */
hpss_uuid_t *CoreServerUUID,/* OUT - core server */
hpss_uuid_t *GatewayUUID); /* OUT - gateway gateway */

int
API_core_GetFilesetById(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
hpss_uuid_t *RootCoreUUID, /* IN - root core server uuid */
u_signed64 *FilesetId, /* IN - fileset id */
hpss_uuid_t *CoreUUID, /* OUT - core server */
hpss_uuid_t *GatewayUUID); /* OUT - gateway server */

int
API_core_GetJunctions(
apithrdstate_t *ThreadContext, /* IN - thread context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user's credentials */
unsigned32 SubsystemId, /* IN - Subsystem identifier */
u_signed64 OffsetIn, /* IN - offset to start at */
unsigned32 Entries, /* IN - # of entries */
unsigned32 *End, /* OUT - end of directory */
u_signed64 *OffsetOut, /* OUT - off of last entry */
ns_JunctionPathConfArray_t **JentBufPtr);/* OUT - junction entries */

int
API_core_GetName(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
hpssoid_t *BitFileID, /* IN - bitfile id */
ns_ObjHandle_t *ObjHandle, /* IN - object handle */
ns_ObjHandle_t *FSHandle, /* OUT - fileset handle */
ns_ObjHandle_t *RetObjHandle, /* OUT - object handle */
char *RetName); /* OUT - name of object */

int
API_core_MigrateFile(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
open_bf_desc_t *OpenBFDescPtr, /* IN - bf descriptor ptr */
unsigned32 Flags, /* IN - migrate flags */
unsigned32 SrcLevel, /* IN - source level */
u_signed64 *RetBytesMigrated);/* OUT - bytes migrated */

int
API_core_MkDir(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *ObjHandle, /* IN - object handle */
char *Path, /* IN - pathname */
hpss_AttrBits_t UpdateFlags, /* IN - attrs to set */
hpss_Attrs_t *AttrIn, /* IN - new attrs */
hpss_AttrBits_t SelectFlags, /* IN - attrs to return */
hpss_Attrs_t *AttrOut, /* OUT - return attrs */
ns_ObjHandle_t *RetHandle); /* OUT - object handle */

int
API_core_MkFileset(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
hpss_uuid_t *CoreUUID, /* IN - core server UUID */
ns_FilesetAttrBits_t FilesetAttrBits,/* IN - fileset attrs bits */
ns_FilesetAttrs_t *FilesetAttrs, /* IN - fileset attrs */
hpss_AttrBits_t ObjAttrBits, /* IN - dir attr bits */
hpss_Attrs_t *ObjAttrs, /* IN - dir attrs */
dmg_fileset_info_t *DMGFSInfo, /* IN - DMG fileset info */
unsigned32 CreateOptions, /* IN - creation options */
ns_FilesetAttrBits_t RetFSAttrBits, /* OUT - fileset attr bits */
hpss_AttrBits_t RetObjAttrBits, /* OUT - dir attr bits */
ns_FilesetAttrs_t *RetFSAttrs, /* OUT - fileset attrs */
hpss_Attrs_t *RetObjAttrs, /* OUT - dir attrs */
ns_ObjHandle_t *FilesetHandle);/* OUT - fileset handle */

int
API_core_MkJunction(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *ObjHandle, /* IN - junction parent */
char *Path, /* IN - junction name */
ns_ObjHandle_t *FilesetHandle, /* IN - file set handle */
hpss_AttrBits_t AttrBits, /* IN - file set attr bits */
hpss_Attrs_t *Attrs, /* IN - file set attrs */
ns_ObjHandle_t *RetHandle); /* OUT - junction handle */

int
API_core_MkLink(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *ObjHandle, /* IN - object handle */
char *Path, /* IN - pathname */
ns_ObjHandle_t *ExistingHandle,/* IN - object handle */
ns_ObjHandle_t *RetHandle); /* OUT - object handle */

int
API_core_MkSymLink(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *ObjHandle, /* IN - object handle */
char *Path, /* IN - pathname */
u_signed64 *FilesetID, /* IN - fileset id number */
char *LinkText, /* IN - symlink contents */
ns_ObjHandle_t *RetHandle); /* OUT - object handle */

int
API_core_OpenFile(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
hpssoid_t *BitfileID, /* IN - bitfile id */
hpss_authz_token_t Ta, /* IN - authz ticket */
unsigned32 OpenFlags, /* IN - open mode flags */
hpss_cos_md_t *RetCOSPtr, /* OUT - COS values */
hpss_sclass_md_t *RetSClassPtr, /* OUT - level 0 sclass */
hpss_object_handle_t *RetBFHandle); /* OUT - bitfile handle */

int
API_core_PurgeFile(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
open_bf_desc_t *OpenBFDescPtr, /* IN - bf descriptor ptr */
unsigned32 Flags, /* IN - purge flags */
unsigned32 StorageLevel, /* IN - storage level */
u_signed64 Offset, /* IN - begin file offset */
u_signed64 Length, /* IN - length to purge */
u_signed64 *RetBytesPurged); /* OUT - bytes purged */

int
API_core_ReadDir(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *ObjHandle, /* IN - object handle */
u_signed64 Offset, /* IN - directory offset */
unsigned32 BufferSize, /* IN - size of buffer */
u_signed64 SelectFlags, /* IN - attrs to return */
unsigned32 *End, /* OUT - end of directory? */
ns_DirEntryConfArray_t *Buffer); /* OUT - directory entries */

int
API_core_ReadFile(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
open_bf_desc_t *OpenBFDescPtr, /* IN - bf descriptor ptr */
unsigned32 Flags, /* IN - control flags */
IOD_t *IODPtr, /* IN - IOD */
IOR_t *IORPtr, /* OUT - IOR */
int *IORValid); /* OUT - is IOR valid? */

int
API_core_ReadGlobalFilesets(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
u_signed64 OffsetIn, /* IN - offset to start at */
unsigned32 Entries, /* IN - entries to return */
unsigned32 *End, /* OUT - end of the list? */
ns_GFilesetConfArray_t **FileConfArray);/* OUT - fileset entries */

int
API_core_ReadLink(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *ObjHandle, /* IN - object handle */
char *Path, /* IN - pathname */
char *LinkText); /* OUT - symlink contents */

int
API_core_Rename(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *CurObjHandle, /* IN - object handle */
char *CurPath, /* IN - current pathname */
ns_ObjHandle_t *NewObjHandle, /* IN - object handle */
char *NewPath); /* IN - new pathname */

int
API_core_SetACL(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *ObjHandle, /* IN - object handle */
char *Path, /* IN - pathname */
unsigned32 Options, /* IN - processing options */
ns_ACLConfArray_t *NewACL); /* IN - new ACL list */

int
API_core_SetAttrs(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *ObjHandle, /* IN - object handle */
char *Path, /* IN - pathname */
hpss_AttrBits_t UpdateFlags, /* IN - attributes to set */
hpss_Attrs_t *AttrIn, /* IN - new attributes */
hpss_AttrBits_t SelectFlags, /* IN - attrs to return */
hpss_Attrs_t *AttrOut); /* OUT - attrs */

int
API_core_SetFilesetAttrs(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
hpss_uuid_t *CoreUUID, /* IN - core server UUID */
u_signed64 *FilesetId, /* IN - file set id */
ns_ObjHandle_t *FilesetHandle, /* IN - file set handle */
ns_FilesetAttrBits_t InAttrBits, /* IN - input attr bits */
ns_FilesetAttrs_t *InAttrs, /* IN - input attrs */
ns_FilesetAttrBits_t BitsForOutAttrs,/* IN - output attr bits */
ns_FilesetAttrs_t *OutAttrs); /* OUT - output attrs */

int
API_core_SetMO(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
unsigned32 SubsystemId, /* IN - subsystem id */
u_signed64 SelectFlags, /* IN - options flags */
core_ManagedObject_t *MOData, /* IN - managed object */
core_ManagedObject_t *OutMOData); /* OUT - managed object out */

int
API_core_StageFile(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
open_bf_desc_t *OpenBFDescPtr, /* IN - bf descriptor ptr */
unsigned32 Flags, /* IN - stage flags */
unsigned32 StorageLevel, /* IN - new storage level */
u_signed64 Offset, /* IN - file offset */
u_signed64 Length); /* IN - length to stage */

int
API_core_StageCallBack(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
hpssoid_t *BitfileID, /* IN - bitfile id */
unsigned32 Flags, /* IN - stage flags */
unsigned32 StorageLevel, /* IN - storage level */
u_signed64 Offset, /* IN - stage offset */
u_signed64 Length, /* IN - stage length */
bfs_callback_addr_t *CallBackPtr, /* IN - callback routine */
hpss_authz_token_t Ta); /* IN - security token */

int
API_core_UnlinkFile(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
hpssoid_t *BitfileID, /* IN - bitfile id */
hpss_authz_token_t *Ta); /* IN - authz ticket */

int
API_core_UpdateACL(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
sec_cred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *ObjHandle, /* IN - object handle */
char *Path, /* IN - pathname */
unsigned32 Options, /* IN - processing options */
ns_ACLConfArray_t *ACLEntry); /* IN - new ACL entry */

int
API_core_WriteFile(
apithrdstate_t *ThreadContext, /* IN - current context */
hpss_reqid_t RequestID, /* IN - request id */
open_bf_desc_t *OpenBFDescPtr, /* IN - bf descriptor ptr */
unsigned32 Flags, /* IN - control flags */
IOD_t *IODPtr, /* IN - IOD */
IOR_t *IORPtr, /* OUT - IOR */
int *IORValid); /* OUT - is IOR valid? */

int
API_dmg_Create(
apithrdstate_t *ThreadContext, /* IN - thread context */
hpss_reqid_t RequestID, /* IN - request ID */
sec_cred_t *UserCreds, /* IN - user credentials */
hpss_uuid_t *GatewayUUID, /* IN - DMAP gateway UUID */
u_signed64 FilesetID, /* IN - file set ID */
byte DMParentHandle[], /* IN - DMAP Parent Handle */
unsigned32 DMParentHandleLeng, /* IN - DMAP Handle Length */
char *EntryName, /* IN - entry name path */
unsigned32 HPSSMode, /* IN - creation mode */
unsigned32 Type, /* IN - type of object */
hpss_cos_hints_t *HintsIn, /* IN - create hints */
hpss_cos_priorities_t *HintsPri, /* IN - create hints prios */
byte DMObjectHandle[], /* OUT - returned DMAP obj handle */
unsigned32 *DMObjectHandleLeng, /* OUT - DMAP handle length */
hpss_cos_hints_t *HintsOut); /* OUT - returned creation hints */

int
API_dmg_hp_Fclear(
apithrdstate_t *ThreadContext, /* IN - thread context */
hpss_reqid_t RequestID, /* IN - request ID */
sec_cred_t *UserCreds, /* IN - user credentials */
hpss_uuid_t *GatewayUUID, /* IN - DMAP gateway UUID */
u_signed64 FilesetID, /* IN - file set ID */
byte *DMObjectHandle, /* IN - DMAP object handle */
unsigned32 DMObjectHandleLeng, /* IN - DMAP handle length */
u_signed64 Offset, /* IN - starting offset */
u_signed64 Length, /* IN - number of bytes */
unsigned32 Flags); /* IN - fclear flags */

int
API_dmg_Lookup(
apithrdstate_t *ThreadContext, /* IN - thread context */
hpss_reqid_t RequestID, /* IN - request ID */
sec_cred_t *UserCreds, /* IN - user credentials */
hpss_uuid_t *GatewayUUID, /* IN - DMAP gateway UUID */
u_signed64 FilesetID, /* IN - file set ID */
byte *DMHandle, /* IN - DMAP Handle */
unsigned32 DMHandleLeng, /* IN - DMAP Handle Length */
char *Path, /* IN - object path */
dmg_object_attrs_t *ReturnAttrs); /* OUT - returned DMAP attributes */

int
API_dmg_Remove(
apithrdstate_t *ThreadContext, /* IN - thread context */
hpss_reqid_t RequestID, /* IN - request ID */
sec_cred_t *UserCreds, /* IN - user credentials */
hpss_uuid_t *GatewayUUID, /* IN - DMAP gateway UUID */
u_signed64 FilesetID, /* IN - file set ID */
byte *DMParentHandle, /* IN - DMAP Parent Handle */
unsigned32 DMParentHandleLeng, /* IN - DMAP Handle Length */
char *EntryName, /* IN - entry name path */
unsigned32 Type); /* IN - type of object */

int
API_dmg_Rename(
apithrdstate_t *ThreadContext, /* IN - thread context */
hpss_reqid_t RequestID, /* IN - request ID */
sec_cred_t *UserCreds, /* IN - user credentials */
hpss_uuid_t *GatewayUUID, /* IN - DMAP gateway UUID */
u_signed64 FilesetID, /* IN - file set ID */
byte *OldDMParentHandle, /* IN - old parent handle */
unsigned32 OldDMParentHandleLeng,/* IN - parent handle length */
char *OldEntryName, /* IN - old entry path name */
byte *NewDMParentHandle, /* IN - new parent handle */
unsigned32 NewDMParentHandleLeng,/* IN - parent handle length */
char *NewEntryName); /* IN - new entry path name */

int
API_dmg_Symlink(
apithrdstate_t *ThreadContext, /* IN - thread context */
hpss_reqid_t RequestID, /* IN - request ID */
sec_cred_t *UserCreds, /* IN - user credentials */
hpss_uuid_t *GatewayUUID, /* IN - DMAP gateway UUID */
u_signed64 FilesetID, /* IN - file set ID */
byte *DMParentHandle, /* IN - DMAP parent handle */
unsigned32 DMParentHandleLeng, /* IN - DMAP handle length */
char *EntryName, /* IN - entry name path */
char *Contents, /* IN - contents of link */
byte *DMObjectHandle, /* OUT - returned DMAP handle */
unsigned32 *DMObjectHandleLeng);/* OUT - DMAP handle length */

int
API_dmg_Link(
apithrdstate_t *ThreadContext, /* IN - thread context */
hpss_reqid_t RequestID, /* IN - request ID */
sec_cred_t *UserCreds, /* IN - user credentials */
hpss_uuid_t *GatewayUUID, /* IN - DMAP gateway UUID */
u_signed64 FilesetID, /* IN - file set ID */
byte *DMParentHandle, /* IN - DMAP parent handle */
unsigned32 DMParentHandleLeng, /* IN - DMAP handle length */
char *EntryName, /* IN - entry name path */
byte *DMSourceHandle, /* IN - source handle */
unsigned32 DMSourceHandleLeng, /* IN - source handle length */
char *SourceName); /* IN - source name path */

int
API_dmg_SetAttrs(
apithrdstate_t *ThreadContext, /* IN - thread context */
hpss_reqid_t RequestID, /* IN - request ID */
sec_cred_t *UserCreds, /* IN - user credentials */
hpss_uuid_t *GatewayUUID, /* IN - DMAP gateway UUID */
u_signed64 FilesetID, /* IN - file set ID */
byte *DMParentHandle, /* IN - DMAP parent handle */
unsigned32 DMParentHandleLeng, /* IN - DMAP handle length */
char *EntryName, /* IN - entry path name */
u_signed64 NewAttrBits, /* IN - new attribute bits */
dmg_object_attrs_t *NewAttr, /* IN - new attributes */
unsigned32 AclOptions, /* IN - ACL Options */
dmg_object_attrs_t *RetAttr); /* OUT - returned DMAP attributes */

int
API_dmg_Migrate(
apithrdstate_t *ThreadContext, /* IN - thread context */
hpss_reqid_t RequestID, /* IN - request ID */
sec_cred_t *UserCreds, /* IN - user credentials */
hpss_uuid_t *GatewayUUID, /* IN - DMAP gateway UUID */
u_signed64 FilesetID, /* IN - file set ID */
byte *DMObjectHandle, /* IN - DMAP object handle */
unsigned32 DMObjectHandleLeng, /* IN - handle length */
u_signed64 Offset, /* IN - data offset */
u_signed64 Length, /* IN - data length */
unsigned32 Flags); /* IN - migrate flags */

int
API_dmg_InvalidateCache(
apithrdstate_t *ThreadContext, /* IN - thread context */
hpss_reqid_t RequestID, /* IN - request ID */
sec_cred_t *UserCreds, /* IN - user credentials */
hpss_uuid_t *GatewayUUID, /* IN - DMAP gateway UUID */
u_signed64 FilesetID, /* IN - file set ID */
byte *DMObjectHandle, /* IN - DMAP object handle */
unsigned32 DMObjectHandleLeng, /* IN - handle length */
u_signed64 Offset, /* IN - data offset */
u_signed64 Length, /* IN - data length */
unsigned32 Flags, /* IN - migrate flags */
u_signed64 AttrBits, /* IN - DMAP attribute bits */
dmg_object_attrs_t *SetAttrs); /* IN - DMAP attributes */

int
API_dmg_GetSecServerUUID(
apithrdstate_t *ThreadContext, /* IN - thread context */
hpss_reqid_t RequestID, /* IN - request ID */
hpss_uuid_t *GatewayUUID, /* IN - DMAP gateway UUID */
u_signed64 FilesetID, /* IN - file set ID */
hpss_uuid_t *DMAPUUID); /* OUT - HPSS/DMAP UUID */

int
API_hdm_SetCred(
apithrdstate_t *ThreadContext, /* IN - thread context */
hpss_reqid_t RequestID, /* IN - request ID */
hpss_uuid_t *UUID, /* IN - security service UUID */
unsigned32 *PAG, /* OUT - returned PAG */
idl_long_int *LifeTime); /* OUT - PAG lifetime */

int
API_hdm_RenewCred(
apithrdstate_t *ThreadContext, /* IN - thread context */
hpss_reqid_t RequestID, /* IN - request ID */
hpss_uuid_t *UUID, /* IN - security service UUID */
unsigned32 OldPAG, /* IN - old PAG */
unsigned32 *NewPAG, /* OUT - new PAG */
idl_long_int *LifeTime); /* OUT - PAG lifetime */

int
API_hdm_PurgeCred(
apithrdstate_t *ThreadContext, /* IN - thread context */
hpss_reqid_t RequestID, /* IN - request ID */
hpss_uuid_t *UUID, /* IN - security service UUID */
unsigned32 PAG); /* IN - purge PAG */






































































#endif /* api_internal_h */


api_log.h

HPSS4.5

HPSS6.2

<略>
#define API_TRANS_ABORT_ERROR (1)
#define API_GET_CONTEXT_ERROR (2)
#define API_GET_PWENT_ERROR (3)
#define API_HSEC_INIT_ERROR (4)
#define API_PREINIT_CONN_ERROR (5)
#define API_INIT_CONN_ERROR (6)
#define API_GET_CRED_ERROR (7)
#define API_GET_TRPC_HANDLE_ERROR (8)
#define API_GET_RPC_HANDLE_ERROR (9)
#define API_GET_RPC_FOR_CH_HANDLE_ERROR (10)
#define API_OPEN_CONN_AUTH_ERROR (11)
#define API_FIND_SERVICE_ERROR (12)
#define API_OPEN_CONN_ERROR (13)
#define API_SYSTEM_CALL_ERROR (14)
#define API_SERVER_CALL_ERROR (15)
#define API_SERVER_RPC_ERROR (16)
#define API_OPEN_LISTEN_DESC_ERROR (17)
#define API_IOR_STATUS_ERROR (18)
#define API_MUTEX_INIT_ERROR (19)
#define API_MUTEX_LOCK_ERROR (20)
#define API_MUTEX_UNLOCK_ERROR (21)
#define API_COND_INIT_ERROR (22)
#define API_COND_SIGNAL_ERROR (23)
#define API_COND_WAIT_ERROR (24)
#define API_SOCK_SEND_ERROR (25)
#define API_SOCK_RECV_ERROR (26)
#define API_MVRPROT_SEND_ERROR (27)
#define API_MVRPROT_RECV_ERROR (28)
#define API_COMP_STATUS_ERROR (29)
#define API_COMP_LENGTH_ERROR (30)
#define API_IPI3_OPEN_ERROR (31)
#define API_IPI3_READ_ERROR (32)
#define API_IPI3_WRITE_ERROR (33)
#define API_IPI3_COMPLETE_ERROR (34)
#define API_PTHREAD_CREATE_ERROR (35)
#define API_PTHREAD_JOIN_ERROR (36)
#define API_CERTIFY_IDENTITY_ERROR (37)
#define API_TOO_MANY_JUNCTIONS_ERROR (38)
#define API_LOCATE_SERVER_ERROR (39)
#define API_NETWORK_CONN_ERROR (40)
#define API_GET_PAG_ERROR (41)
#define API_HPSS_DATA_NOT_VALID (42)
#define API_NO_DMAP_SUPPORT (43)
#define API_INQUIRE_NET_INFO_ERROR (44)
#define API_MUTEX_DESTROY_ERROR (45)
#define API_COND_DESTROY_ERROR (46)
#define API_PTHREAD_CANCEL_ERROR (47)
#define API_PTHREAD_DETACH_ERROR (48)
#define API_GET_EXPIRATION_ERROR (49)
#define API_COND_TIMEDWAIT_ERROR (50)

void
API_LogMsg(
char *FunctionName, /* IN Name of function LogMsg called from. */
unsigned32 RequestID, /* IN Request ID */
unsigned32 LogType, /* IN A Log record type from cs_Log.h. */
unsigned32 MsgType, /* IN A modifier of LogType from cs_Log.h. */
unsigned32 SeverityLev, /* IN A SeverityLevel from cs_Log.h. */
unsigned32 MsgNum, /* IN Index of the message to be logged. */
unsigned32 Error, /* IN Error code to be entered into log. */
...); /* IN Any additional parameters. */

extern char *API_DefaultLogMsgs[];
extern nl_catd *HPSS_MasterCatFD;


#endif /* ifndef api_log_h */

<略>
#define API_REQUEST_ERROR (1)
#define API_GET_CONTEXT_ERROR (2)
#define API_SEC_INIT_ERROR (3)
#define API_INIT_CONN_ERROR (4)
#define API_GET_CRED_ERROR (5)
#define API_SYSTEM_CALL_ERROR (6)
#define API_SERVER_CALL_ERROR (7)
#define API_SERVER_RPC_ERROR (8)
#define API_OPEN_LISTEN_DESC_ERROR (9)
#define API_IOR_STATUS_ERROR (10)
#define API_MUTEX_INIT_ERROR (11)
#define API_MUTEX_LOCK_ERROR (12)
#define API_MUTEX_UNLOCK_ERROR (13)
#define API_COND_SIGNAL_ERROR (14)
#define API_COND_WAIT_ERROR (15)
#define API_SOCK_SEND_ERROR (16)
#define API_SOCK_RECV_ERROR (17)
#define API_MVRPROT_SEND_ERROR (18)
#define API_MVRPROT_RECV_ERROR (19)
#define API_COMP_STATUS_ERROR (20)
#define API_COMP_LENGTH_ERROR (21)
#define API_IPI3_READ_ERROR (22)
#define API_IPI3_WRITE_ERROR (23)
#define API_IPI3_COMPLETE_ERROR (24)
#define API_PTHREAD_CREATE_ERROR (25)
#define API_PTHREAD_JOIN_ERROR (26)
#define API_CERTIFY_IDENTITY_ERROR (27)
#define API_TOO_MANY_JUNCTIONS_ERROR (28)
#define API_LOCATE_SERVER_ERROR (29)
#define API_NETWORK_CONN_ERROR (30)
#define API_GET_PAG_ERROR (31)
#define API_NO_DMAP_SUPPORT (32)
#define API_INQUIRE_NET_INFO_ERROR (33)
#define API_MUTEX_DESTROY_ERROR (34)
#define API_COND_DESTROY_ERROR (35)
#define API_PTHREAD_CANCEL_ERROR (36)
#define API_PTHREAD_DETACH_ERROR (37)
#define API_GET_EXPIRATION_ERROR (38)
#define API_COND_TIMEDWAIT_ERROR (39)
#define API_HPSS_DATA_NOT_VALID (40)
#define API_SAN3P_OPEN_ERROR (41)
#define API_SAN3P_READ_ERROR (42)
#define API_SAN3P_WRITE_ERROR (43)
#define API_SAN3P_PROTOCOL_ERROR (44)







void
API_LogMsg(
char *FunctionName, /* IN Name of function LogMsg called from. */
hpss_reqid_t RequestID, /* IN Request ID */
unsigned32 LogType, /* IN A Log record type from cs_Log.h. */
unsigned32 MsgType, /* IN A modifier of LogType from cs_Log.h. */
unsigned32 SeverityLev, /* IN A SeverityLevel from cs_Log.h. */
unsigned32 MsgNum, /* IN Index of the message to be logged. */
unsigned32 Error, /* IN Error code to be entered into log. */
...); /* IN Any additional parameters. */

extern char *API_DefaultLogMsgs[];
extern nl_catd *HPSS_MasterCatFD;


#endif /* ifndef api_log_h */


bfs_interface_def.h

HPSS4.5

HPSS6.2

#ifndef bfs_interface_def_v0_0_included
#define bfs_interface_def_v0_0_included
#ifndef IDLBASE_H
#include
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif
#ifndef acct_idl_v0_0_included
#include <acct_hpss.h>
#endif
#ifndef hpss_iod_v0_0_included
#include <hpss_iod.h>
#endif
#ifndef idlsecurity_v0_0_included
#include <security.h>
#endif



#ifndef ss_pvlist_v0_0_included
#include <ss_pvlist.h>
#endif
#ifndef hpss_server_attr_v0_0_included
#include <hpss_server_attr.h>
#endif
#define BFS_NUM_REV_MAPS (1)
#define BFS_REV_MAP_LEN (32)
typedef signed32 reqid_t;
typedef struct bfs_callback_addr {
unsigned32 addr;
unsigned16 port;
unsigned16 family;
signed32 id;
} bfs_callback_addr_t;
typedef struct bfs_callback_ret_msg {
signed32 reqid;
signed32 retcode;
} bfs_callback_ret_msg_t;
typedef struct rev_map {
idl_byte RevMapId[32];
} rev_map_t;
#define BFS_ASYNCH_CALL (1)
#define BFS_CALLBACK_CALL (32768)
#define BFS_PURGE_ALL (2)
#define BFS_PURGE_FORCE (4)
#define BFS_PURGE_CLEAN (8)
#define BFS_MIGRATE_ALL (2)
#define BFS_MIGRATE_FORCE (4)
#define BFS_MIGRATE_PURGE_DATA (8)
#define BFS_MIGRATE_NO_MARK_PURGE (16)
#define BFS_MIGRATE_MULTIPLE_COPY_OP (32)
#define BFS_MIGRATE_CLIENT_CALL_OP (64)
#define BFS_STAGE_ALL (2)
#define BFS_INTERNAL_STAGE (4)
#define BFS_REQ_ALREADY_SCHDLD (8)
#define BFS_READ_SEQUENTIAL (2)
#define BFS_NO_TRUNC_DEST (2)
#define BFS_RESET_SEGSIZE (2)
#define BFS_GETATTRS_STATS_FOR_LEVEL (2)
#define BFS_GETATTRS_STATS_FOR_1STLEVEL (4)
#define BFS_GETATTRS_STATS_OPTIMIZE (8)
#define BFS_GETATTRS_STATS_ALL_LEVELS (16)
#define BFS_GETATTRS_NO_BLOCK (32)
#define BFS_ACCT_GET_STATS_ONLY (2)
typedef struct hpss_segment_desc {
struct hpss_segment_desc *NextPtr;
unsigned32 Flags;
hpssoid_t SSegId;
} hpss_segment_desc_t;
typedef struct hpss_segment_list {
unsigned32 Flags;
unsigned32 Count;
hpss_segment_desc_t *SegDescPtr;
} hpss_segment_list_t;
typedef struct bf_copy_desc {
struct bf_copy_desc *NextPtr;
u_signed64 Offset;
u_signed64 Length;
} bf_copy_desc_t;
typedef struct bfs_owner_rec {
signed32 RevMapCount;
unsigned32 Pad;
rev_map_t RevMap[1];
} bfs_owner_rec_t;
typedef struct bf_attrib_md {
u_signed64 DataLen;
signed32 ReadCount;
signed32 WriteCount;
signed32 LinkCount;
timestamp_sec_t CreateTime;
timestamp_sec_t ModifyTime;
timestamp_sec_t WriteTime;
timestamp_sec_t ReadTime;
unsigned32 COSId;
unsigned32 NewCOSId;
acct_rec_t Acct;
unsigned32 Flags;
unsigned32 StorageSegMult;
bfs_owner_rec_t OwnerRec;
u_signed64 RegisterBitmap;
unsigned32 CellId;
unsigned32 Spare1;
u_signed64 Spare2;
u_signed64 Spare3;
u_signed64 Spare4;
} bf_attrib_md_t;




#define SYNC_FILESET_DATA (1)
#define HPSS_DATA_VALID (2)
#define CACHE_DATA_VALID (4)
#define BFS_ACCT_STATS_VALID1 (8)
#define BFS_ACCT_STATS_VALID2 (16)
#define BFS_NO_PURGE (32)
#define BFS_REG_OPEN_COUNT (0)
#define BFS_REG_DATA_LEN (1)
#define BFS_REG_READ_COUNT (2)
#define BFS_REG_WRITE_COUNT (3)
#define BFS_REG_LINK_COUNT (4)
#define BFS_REG_CREATE_TIME (5)
#define BFS_REG_MODIFY_TIME (6)
#define BFS_REG_WRITE_TIME (7)
#define BFS_REG_READ_TIME (8)
#define BFS_REG_OWNER_REC (9)
#define BFS_REG_COS_ID (10)
#define BFS_REG_ACCT (11)
#define BFS_REG_CELL_ID (12)
#define BFS_REG_FAMILY_ID (13)
typedef struct bf_attrib {
u_signed64 CurrentPosition;
signed32 OpenCount;
unsigned32 FamilyId;
bf_attrib_md_t BfAttribMd;
} bf_attrib_t;



#define BFS_MAX_VV_TO_RETURN_AT_LEVEL (4)
typedef struct bf_vv_attrib {
hpssoid_t VVID;
signed32 RelPosition;
u_signed64 BytesOnVV;
pv_list_t *PVList;
} bf_vv_attrib_t;





typedef struct bf_sc_attrib {
bf_vv_attrib_t VVAttrib[4];

unsigned32 NumberOfVVs;
u_signed64 BytesAtLevel;
unsigned32 OptimumAccessSize;
unsigned32 StripeWidth;
u_signed64 StripeLength;
unsigned32 Flags;
} bf_sc_attrib_t;




typedef struct bf_xattrib {
u_signed64 CurrentPosition;
signed32 OpenCount;
unsigned32 FamilyId;
bf_sc_attrib_t SCAttrib[5];
bf_attrib_md_t BfAttribMd;
} bf_xattrib_t;



#define BFS_BFATTRS_LEVEL_IS_DISK (1)
#define BFS_BFATTRS_LEVEL_IS_TAPE (2)
#define BFS_BFATTRS_DATAEXISTS_AT_LEVEL (4)
#define BFS_BFATTRS_ADDITIONAL_VV_EXIST (8)
#define BFS_SET_CURRENT_POSITION (1)
#define BFS_SET_DATA_LEN (2)
#define BFS_SET_CREATE_TIME (3)
#define BFS_SET_MODIFY_TIME (4)
#define BFS_SET_WRITE_TIME (5)
#define BFS_SET_READ_TIME (6)
#define BFS_SET_OWNER_REC (7)
#define BFS_SET_COS_ID (8)
#define BFS_SET_ACCT (9)
#define BFS_SET_CELL_ID (10)
#define BFS_SET_REGISTER_BITMAP (11)
#define BFS_SET_CONSISTENCY_FLAGS (12)
#define BFS_SET_PREALLOC_LEN (13)
#define BFS_SET_FAMILY_ID (14)
#define BFS_SET_NO_PURGE_FLAG (15)
#define BFS_SET_BFID_FROM_PARM (32)
#define BFS_OPEN_READ (1)
#define BFS_OPEN_WRITE (2)
#define BFS_OPEN_MODIFY (4)
#define BFS_OPEN_APPEND (16)
#define BFS_OPEN_TRUNCATE (32)
#define BFS_OPEN_EXCL (64)
#define BFS_OPEN_NO_STAGE (128)
#define BFS_OPEN_MIGRATE (256)
typedef struct bf_tape_segment_md {
hpssoid_t BfId;
unsigned32 StorageClass;
unsigned32 Flags;
hpssoid_t SSegId;
u_signed64 SSegOffset;
u_signed64 BfSegLength;
u_signed64 BfOffset;
timestamp_sec_t ReadTime;
timestamp_sec_t WriteTime;
timestamp_sec_t MigrateTime;
timestamp_sec_t CacheTime;
} bf_tape_segment_md_t;
typedef struct bf_disk_segment_md {
hpssoid_t BfId;
unsigned32 StorageClass;
unsigned32 Flags;
u_signed64 BfSegLength;
u_signed64 BfOffset;
} bf_disk_segment_md_t;
#define BFS_MIGRATED_BUT_NOT_PURGED (1)
#define BFS_PURGED_BY_FORCE (2)
#define BFS_MULT_COPY_FLAG_INDEX (16777216)
typedef struct bf_disk_region_entry_md {
hpssoid_t SSegId;
timestamp_sec_t ReadTime;
timestamp_sec_t WriteTime;
timestamp_sec_t MigrateTime;
timestamp_sec_t CacheTime;
unsigned32 Flags;
unsigned32 Pad;
} bf_disk_region_entry_md_t;
typedef struct bf_disk_alloc_rec_md {
hpssoid_t BfId;
unsigned32 RecordNumber;
unsigned32 StorageClass;
unsigned32 StorageSegmentSize;
unsigned32 Pad;
bf_disk_region_entry_md_t RegionInfo[8];
} bf_disk_alloc_rec_md_t;
typedef struct {
unsigned32 Flags;
unsigned32 Pad;
timestamp_sec_t ReadTime;
timestamp_sec_t WriteTime;
timestamp_sec_t MigrateTime;
timestamp_sec_t CacheTime;
unsigned32 ReadCount;
unsigned32 WriteCount;
} bf_level_stats_md_t;
typedef struct {
hpssoid_t BfId;
bf_attrib_md_t BfAttrib;
bf_level_stats_md_t LevelStats[5];
u_signed64 reserv1[2];
unsigned32 FamilyId;
signed32 reserv2[1];
} bf_descriptor_md_t;
typedef struct bfMO_attrib {
signed32 Version;
hpssoid_t BfId;
bf_attrib_t bf_attrib;
} bfMO_attrib_t;
typedef struct bf_sseg_chkpt_md {
hpssoid_t BfId;
uuid_t SSId;
hpssoid_t SSegId;
unsigned32 Flags;
unsigned32 Type;
} bf_sseg_chkpt_md_t;
#define SEG_CHKPT_TAPE_ALLOC (1)
#define SEG_CHKPT_DISK_RECOVER (2)
#define SEG_CHKPT_CHANGE_COS (4)
#define SEG_CHKPT_UNLINK_OPEN (8)
#define SEG_CHKPT_NO_DELETE_ON_CLOSE (1)
typedef struct bfs_ss_unlink_rec_md {
unsigned32 SClassId;
timestamp_sec_t CreateTime;
hpssoid_t BfId;
hpssoid_t SSegId;
unsigned32 Spare1;
unsigned32 Spare2;
} bfs_ss_unlink_rec_md_t;
typedef struct bf_cos_change_md {
hpssoid_t BfId;
timestamp_t RecordCreateTime;
unsigned32 SequenceNo;
unsigned32 RetryCount;
} bf_cos_change_md_t;
typedef struct bf_migration_rec_md {
unsigned32 SClassId;
unsigned32 Flags;
hpssoid_t BfId;
timestamp_sec_t RecordCreateTime;
unsigned32 FamilyId;
unsigned32 HierId;
unsigned32 Future2;
u_signed64 Future3;
} bf_migration_rec_md_t;
typedef struct bf_purge_rec_md {
unsigned32 SClassId;
unsigned32 Flags;
hpssoid_t BfId;
timestamp_sec_t RecordCreateTime;
timestamp_sec_t RecordLockTime;
u_signed64 Future2;
} bf_purge_rec_md_t;
#define BFS_BYPASS_CONSISTENCY_CHECKS (1)
#define BFS_MODIFY_CONSISTENCY_FLAGS (2)
#define BFS_BYPASS_COS_IO_CHECKS (4)
typedef struct bfs_stats {
unsigned32 StageCount;
unsigned32 MigrationCount;
unsigned32 PurgeCount;
unsigned32 DeleteCount;
timestamp_sec_t TimeLastReset;
} bfs_stats_t;
typedef struct bfs_gk_ctl {
uuid_t GKControlNo;
unsigned32 GKWaitTime;
} bfs_gk_ctl_t;

#ifdef __cplusplus
}

#endif


































#endif

#ifndef _BFS_USERIF_DEF_H_RPCGEN
#define _BFS_USERIF_DEF_H_RPCGEN
#include <rpc/rpc.h>
#ifndef _bfs_attr_def_h
#define _bfs_attr_def_h















#include "hpss_types.h"
#include "hpss_limits.h"
#include "hpssoid.h"

#include "ss_pvlist.h"






















#define BFS_ASYNCH_CALL 0x00000001
#define BFS_CALLBACK_CALL 0x00008000
#define BFS_PURGE_ALL 0x00000002
#define BFS_PURGE_FORCE 0x00000004
#define BFS_PURGE_CLEAN 0x00000008
#define BFS_MIGRATE_ALL 0x00000002
#define BFS_MIGRATE_FORCE 0x00000004
#define BFS_MIGRATE_PURGE_DATA 0x00000008
#define BFS_MIGRATE_NO_MARK_PURGE 0x00000010
#define BFS_MIGRATE_MULTIPLE_COPY_OP 0x00000020
#define BFS_MIGRATE_CLIENT_CALL_OP 0x00000040
#define BFS_STAGE_ALL 0x00000002
#define BFS_INTERNAL_STAGE 0x00000004
#define BFS_REQ_ALREADY_SCHDLD 0x00000008
#define BFS_READ_SEQUENTIAL 0x00000002
#define BFS_NO_TRUNC_DEST 0x00000002
#define BFS_RESET_SEGSIZE 0x00000002
#define BFS_GETATTRS_STATS_FOR_LEVEL 0x00000002
#define BFS_GETATTRS_STATS_FOR_1STLEVEL 0x00000004
#define BFS_GETATTRS_STATS_OPTIMIZE 0x00000008
#define BFS_GETATTRS_STATS_ALL_LEVELS 0x00000010
#define BFS_GETATTRS_NO_BLOCK 0x00000020
#define BFS_ACCT_GET_STATS_ONLY 0x00000002




















struct bf_attrib_md {
u_signed64 DataLen;
signed32 ReadCount;
signed32 WriteCount;
signed32 LinkCount;
timestamp_sec_t CreateTime;
timestamp_sec_t ModifyTime;
timestamp_sec_t WriteTime;
timestamp_sec_t ReadTime;
unsigned32 COSId;
unsigned32 NewCOSId;
acct_rec_t Acct;
unsigned32 Flags;
unsigned32 StorageSegMult;

u_signed64 RegisterBitmap;
unsigned32 RealmId;




};
typedef struct bf_attrib_md bf_attrib_md;

typedef bf_attrib_md bf_attrib_md_t;

#define SYNC_FILESET_DATA 0x00000001
#define HPSS_DATA_VALID 0x00000002
#define CACHE_DATA_VALID 0x00000004
#define BFS_ACCT_STATS_VALID1 0x00000008
#define BFS_ACCT_STATS_VALID2 0x000000010
#define BFS_NO_PURGE 0x00000020
#define BFS_REG_OPEN_COUNT 0
#define BFS_REG_DATA_LEN 1
#define BFS_REG_READ_COUNT 2
#define BFS_REG_WRITE_COUNT 3
#define BFS_REG_LINK_COUNT 4
#define BFS_REG_CREATE_TIME 5
#define BFS_REG_MODIFY_TIME 6
#define BFS_REG_WRITE_TIME 7
#define BFS_REG_READ_TIME 8

#define BFS_REG_COS_ID 10
#define BFS_REG_ACCT 11
#define BFS_REG_REALM_ID 12
#define BFS_REG_FAMILY_ID 13
struct bf_attrib {
u_signed64 CurrentPosition;
signed32 OpenCount;
unsigned32 FamilyId;
bf_attrib_md_t BfAttribMd;
};
typedef struct bf_attrib bf_attrib;

typedef bf_attrib bf_attrib_t;

struct bf_vv_attrib {
hpssoid_t VVID;
signed32 RelPosition;
u_signed64 BytesOnVV;
pv_list_t *PVList;
};
typedef struct bf_vv_attrib bf_vv_attrib;

typedef bf_vv_attrib bf_vv_attrib_t;
#define BFS_MAX_VV_TO_RETURN_AT_LEVEL 4

struct bf_sc_attrib {
bf_vv_attrib_t VVAttrib[BFS_MAX_VV_TO_RETURN_AT_LEVEL];
unsigned32 NumberOfVVs;
u_signed64 BytesAtLevel;
unsigned32 OptimumAccessSize;
unsigned32 StripeWidth;
u_signed64 StripeLength;
unsigned32 Flags;
};
typedef struct bf_sc_attrib bf_sc_attrib;

typedef bf_sc_attrib bf_sc_attrib_t;

struct bf_xattrib {
u_signed64 CurrentPosition;
signed32 OpenCount;
unsigned32 FamilyId;
bf_sc_attrib_t SCAttrib[HPSS_MAX_STORAGE_LEVELS];
bf_attrib_md_t BfAttribMd;
};
typedef struct bf_xattrib bf_xattrib;

typedef bf_xattrib bf_xattrib_t;
#define BFS_BFATTRS_LEVEL_IS_DISK 1
#define BFS_BFATTRS_LEVEL_IS_TAPE 2
#define BFS_BFATTRS_DATAEXISTS_AT_LEVEL 4
#define BFS_BFATTRS_ADDITIONAL_VV_EXIST 8
#define BFS_SET_CURRENT_POSITION 1
#define BFS_SET_DATA_LEN 2
#define BFS_SET_CREATE_TIME 3
#define BFS_SET_MODIFY_TIME 4
#define BFS_SET_WRITE_TIME 5
#define BFS_SET_READ_TIME 6

#define BFS_SET_COS_ID 8
#define BFS_SET_ACCT 9
#define BFS_SET_REALM_ID 10
#define BFS_SET_REGISTER_BITMAP 11
#define BFS_SET_CONSISTENCY_FLAGS 12
#define BFS_SET_PREALLOC_LEN 13
#define BFS_SET_FAMILY_ID 14
#define BFS_SET_NO_PURGE_FLAG 15
#define BFS_SET_BFID_FROM_PARM 32
#define BFS_OPEN_READ 0x00000001
#define BFS_OPEN_WRITE 0x00000002
#define BFS_OPEN_MODIFY 0x00000004
#define BFS_OPEN_APPEND 0x00000010
#define BFS_OPEN_TRUNCATE 0x00000020
#define BFS_OPEN_EXCL 0x00000040
#define BFS_OPEN_NO_STAGE 0x00000080
#define BFS_OPEN_MIGRATE 0x00000100
#define BFS_OPEN_PURGE 0x00000200






























































































































struct bfs_callback_addr {
unsigned32 addr;
unsigned16 port;
unsigned16 family;
signed32 id;
};
typedef struct bfs_callback_addr bfs_callback_addr;

typedef bfs_callback_addr bfs_callback_addr_t;

struct bfs_callback_ret_msg {
signed32 reqid;
signed32 retcode;
};
typedef struct bfs_callback_ret_msg bfs_callback_ret_msg;

typedef bfs_callback_ret_msg bfs_callback_ret_msg_t;
#endif

/* the xdr functions */
extern bool_t xdr_bf_attrib_md();
extern bool_t xdr_bf_attrib_md_t();
extern bool_t xdr_bf_attrib();
extern bool_t xdr_bf_attrib_t();
extern bool_t xdr_bf_vv_attrib();
extern bool_t xdr_bf_vv_attrib_t();
extern bool_t xdr_bf_sc_attrib();
extern bool_t xdr_bf_sc_attrib_t();
extern bool_t xdr_bf_xattrib();
extern bool_t xdr_bf_xattrib_t();
extern bool_t xdr_bfs_callback_addr();
extern bool_t xdr_bfs_callback_addr_t();
extern bool_t xdr_bfs_callback_ret_msg();
extern bool_t xdr_bfs_callback_ret_msg_t();
#endif /* !_BFS_USERIF_DEF_H_RPCGEN */


cs_Log.h

HPSS4.5

HPSS6.2

<略>
#ifndef NO_DCE
#include <dce/nbase.h>
#include <dce/rpcbase.h>
#endif
<略>
#include "hpss_thread_safe.h"

#define CS_LOG_MSG 1
#define CS_SSM_MSG 2

#define CS_MASTER_CAT_NAME "hpss.cat"
#define CS_LOGFILE_ID_STAMP "logfile"
#define CS_LOGFILE01 "logfile01"
#define CS_LOGFILE02 "logfile02"
#if defined(LINUX)
#define NULL_CATD (nl_catd) -1
#else
#define NULL_CATD (nl_catd) 0
#endif
#define CS_SSM 1
#define CS_VERSION 1

#define CS_LOG_MSGTYPE 100L
#define CS_LOG_PORT 8100
#define CS_LOG_SHM_KEY 2801
#define CS_LOG_VERSION 1

#define CS_LOG_TRANSACTION_TYPE 1
#define CS_LOG_ERROR_TYPE 2

#define CS_SFS_OPEN_TIMEOUT 60
#define CS_MAX_LOGCM_MSG_LENGTH 500
#define CS_MAX_TEXT_MSG_LENGTH 100
#define CS_MAX_SYSLOG_LENGTH 500
#define CS_MAX_SSM_RPC_ATTEMPTS 1
#define CS_SSM_RPC_TIMEOUT 5
#define CS_SSM_RETRY_DELAY 15
#define CS_LOG_SOCK_BUFSIZE 65536

#define CS_LOG_ENV "HPSSLOG"
#define CS_LOGGER_ENV "HPSSLOGGER"
#define CS_LOG_STDOUT "stdout"
#define CS_LOG_SYSLOG "syslog"
#define CS_SHMKEY_ENV "HPSSLOG_SHMKEY"
#define CS_SHMID_ENV "HPSSLOG_SHMID"
#define CS_HOSTNAME_ENV "HPSSLOG_HOSTNAME"

#define CS_FAIL_TERM -1
#define CS_FAIL_CONT -2

#define CS_SSM_NOT_CONNECTED 0 /* no SSM connection */
#define CS_SSM_RECONNECTING 1 /* initializing SSM connection */
#define CS_SSM_CONNECTED 2 /* connected to SSM */


#define CS_ALARM 1
#define CS_EVENT 2
#define CS_REQUEST 4
#define CS_SECURITY 8
#define CS_ACCOUNTING 16
#define CS_DEBUG 32
#define CS_TRACE 64
#define CS_STATUS 128

#define NONE 0
#define WARNING 1
#define MINOR 2
#define MAJOR 3
#define CRITICAL 4
#define INDETERMINATE 5
#define CLEARED 6

#define SERVICE_DEGRADATION 1
#define SECURITY_VIOLATION 2
#define SOFTWARE_ERROR 3
#define HARDWARE_ERROR 4
#define COMMUNICATION_ERROR 5
#define THRESHOLD 6

#define OBJECT_CREATION 10
#define OBJECT_DELETION 11
#define OPERATION_INITIATION 12
#define OPERATION_COMPLETION 13
#define OTHER_EVENT 14

#define TEXT_REQUEST 20
#define IOD_REQUEST 21
#define IOR_REQUEST 22
#define PIOFS_REQUEST 23

#define LOG_LOGFILE_INVALID 1
#define LOG_LOGFILE_INUSE 2
#define LOG_LOGFILE_ARCHIVE 3
#define LOG_LOGFILE_ARCHIVING 4
#define LOG_LOGFILE_READY 5

#define CS_LOG_MAX_SERVERS 100
#define CS_LOG_MAX_TIME_LEN 21

#define CS_LOG_MSGCAT_SETNUMBER_INFRA (1)
#define CS_LOG_MSGCAT_SETNUMBER_BFS (2)
#define CS_LOG_MSGCAT_SETNUMBER_SS (3)
#define CS_LOG_MSGCAT_SETNUMBER_MVR (4)
#define CS_LOG_MSGCAT_SETNUMBER_PVL (5)
#define CS_LOG_MSGCAT_SETNUMBER_PVR (6)
#define CS_LOG_MSGCAT_SETNUMBER_SSMSM (7)
#define CS_LOG_MSGCAT_SETNUMBER_SSMDS (8)
#define CS_LOG_MSGCAT_SETNUMBER_HSEC (9)
#define CS_LOG_MSGCAT_SETNUMBER_MM (10)
#define CS_LOG_MSGCAT_SETNUMBER_MMON (11)
#define CS_LOG_MSGCAT_SETNUMBER_PIOFSCMD (12)
#define CS_LOG_MSGCAT_SETNUMBER_PIOFSHPSS (13)
#define CS_LOG_MSGCAT_SETNUMBER_LOGCM (14)
#define CS_LOG_MSGCAT_SETNUMBER_LOG (15)
#define CS_LOG_MSGCAT_SETNUMBER_NS (16)
#define CS_LOG_MSGCAT_SETNUMBER_NFS (17)
#define CS_LOG_MSGCAT_SETNUMBER_ERRNO (18)
#define CS_LOG_MSGCAT_SETNUMBER_MPS (19)
#define CS_LOG_MSGCAT_SETNUMBER_RECLAIM (20)
#define CS_LOG_MSGCAT_SETNUMBER_REPACK (21)
#define CS_LOG_MSGCAT_SETNUMBER_ACCT (22)
#define CS_LOG_MSGCAT_SETNUMBER_DMG (23)
#define CS_LOG_MSGCAT_SETNUMBER_LS (24)
#define CS_LOG_MSGCAT_SETNUMBER_NDCL (25)
#define CS_LOG_MSGCAT_SETNUMBER_NDCG (26)
#define CS_LOG_MSGCAT_SETNUMBER_API (27)
#define CS_LOG_MSGCAT_SETNUMBER_PM (28)
#define CS_LOG_MSGCAT_SETNUMBER_RTM (29)
#define CS_LOG_MSGCAT_SETNUMBER_GK (30)
#define CS_LOG_MSGCAT_SETNUMBER_COMMON (31)
#define CS_LOG_MSGCAT_SETNUMBER_AV (32)



#define CS_LOG_MNEMONIC_BFS "BFSR"
#define CS_LOG_MNEMONIC_DISK_SS "DSRV"
#define CS_LOG_MNEMONIC_TAPE_SS "TSRV"
#define CS_LOG_MNEMONIC_MVR "MOVR"
#define CS_LOG_MNEMONIC_PVL "PVLS"
#define CS_LOG_MNEMONIC_PVR "PVRS"
#define CS_LOG_MNEMONIC_SSMSM "SSMS"
#define CS_LOG_MNEMONIC_SSMDS "SSMD"
#define CS_LOG_MNEMONIC_HSEC "HSEC"
#define CS_LOG_MNEMONIC_LOG "LOG "
#define CS_LOG_MNEMONIC_LOGC "LOGC"
#define CS_LOG_MNEMONIC_LOGD "LOGD"
#define CS_LOG_MNEMONIC_DLOG "DLOG"
#define CS_LOG_MNEMONIC_MMON "MMON"
#define CS_LOG_MNEMONIC_NS "NSRV"
#define CS_LOG_MNEMONIC_NFS "NFS "
#define CS_LOG_MNEMONIC_MNT "MNT"
#define CS_LOG_MNEMONIC_MPS "MPSR"
#define CS_LOG_MNEMONIC_ACCT "ACCT"
#define CS_LOG_MNEMONIC_DMG "DMG "
#define CS_LOG_MNEMONIC_LSRV "LSRV"
#define CS_LOG_MNEMONIC_LCLI "LCLI"
#define CS_LOG_MNEMONIC_NDCL "NDCL"
#define CS_LOG_MNEMONIC_NDCG "NDCG"
#define CS_LOG_MNEMONIC_API "APIL"
#define CS_LOG_MNEMONIC_HANDLES "CSHL"
#define CS_LOG_MNEMONIC_HPSSD "SUDD"
#define CS_LOG_MNEMONIC_PM "PMGR"
#define CS_LOG_MNEMONIC_RTM "RTM "

#define CS_LOG_MNEMONIC_GK "GKSR"

#define CS_LOG_MNEMONIC_COMMON "COMM"
#define CS_LOG_MNEMONIC_AVAL "AVAL"
#define CS_LOG_MNEMONIC_AVCL "AVCL"


#define CS_LOG_MSG_CLASS_LS (0)
#define CS_LOG_MSG_CLASS_SERVER (1)

#define CS_LOG_MSG_CLASS_SS (3)
#define CS_LOG_MSG_CLASS_SS_PV (4)
#define CS_LOG_MSG_CLASS_SS_VV (5)
#define CS_LOG_MSG_CLASS_SS_SS (6)
#define CS_LOG_MSG_CLASS_SS_MAP (7)
#define CS_LOG_MSG_CLASS_SS_SESS (8)
#define CS_LOG_MSG_CLASS_MOVER (8)
#define CS_LOG_MSG_CLASS_DEVICE (9)
#define CS_LOG_MSG_CLASS_API (10)
#define CS_LOG_MSG_CLASS_NDCL (10)
#define CS_LOG_MSG_CLASS_BFS (11)

#define CS_LOG_MSG_CLASS_SECURITY (27)
#define CS_LOG_MSG_CLASS_MPS (37)
#define CS_LOG_MSG_CLASS_ACCT (38)
#define CS_LOG_MSG_CLASS_AV (39)



#define CS_LOG_MSG_CLASS_COMMON (100)

#if defined (__alpha) && defined (__osf__)
#define CS_XDR_TIMEVAL(a,b) ((xdr_int( a, &((b)->tv_sec) ) || xdr_int( a, &((b)->tv_usec) )))



#else
#define CS_XDR_TIMEVAL(a,b) ((xdr_long( a, &((b)->tv_sec) ) || xdr_long( a, &((b)->tv_usec) )))
#endif

char *hpss_Catgets( nl_catd catd, int set_num, int msg_num, char *msg_string );

typedef struct {
char LogIDStamp[8]; /* unique log identifier */
unsigned32 LogFlags; /* log file state flags */
timestamp_t LogStart; /* time when file initialized */
timestamp_t LogEnd; /* time when log file no longer used */
} LogHdr_t;

typedef struct {
int mtype; /* message type */
log_msg_t marea; /* message area */
} logq_msg_t;

#define CS_XDR_MSG_BUF_SZ (sizeof(int)+sizeof(log_msg_t)+sizeof(int))

typedef struct {
log_rec_hdr_t LogRecHdr; /* log record header */
char LogRecBody[CS_MAX_LOGCM_MSG_LENGTH]; /* log record body */
} logcm_msg_t;

typedef struct {
int ShmID; /* shared memory ID */
int SemID; /* semaphore ID */
int LogcPort; /* log client port */
unsigned32 LogReinit; /* reinit policy flag */
unsigned32 LogPolicyCount; /* count of policy entries */
u_signed64 LogcChangedSvrAttrs; /* server object attrs */
hpss_server_attrib_t LogcServerAttr; /* server object attrs */
unsigned char DefaultPolicyName[HPSS_MAX_DCE_NAME]; /* def. policy name */
LogPolicy_t LogPolicy[CS_LOG_MAX_SERVERS]; /* log policy entry */
} LogSharedMem_t;

int cs_LogInit( char *DescName, char *ApplCatName, nl_catd *ApplCatd,
nl_catd *MasterCatd );

int cs_Msg( unsigned32 LogRecordType, char *DescName, char *ClientProgName,
char *ClientID, unsigned32 RequestID, unsigned32 ObjectClass,
unsigned32 MsgType, unsigned32 SeverityLevel, signed32 ErrorCode,
unsigned32 LogRecordLength, char *MsgArea, int MsgNum, int SetNum,
nl_catd Catd );

#endif /* !cs_log_h */

<略>





#include "cs_LogShmem.h"

#define CS_LOG_MSG 1
#define CS_SSM_MSG 2


#define CS_LOGFILE_ID_STAMP "logfile"
#define CS_LOGFILE01 "logfile01"
#define CS_LOGFILE02 "logfile02"
#if defined(LINUX)
#define NULL_CATD (nl_catd) -1
#else
#define NULL_CATD (nl_catd) 0
#endif
#define CS_SSM 1
#define CS_VERSION 1

#define CS_LOG_MSGTYPE 100L
#define CS_LOG_PORT 8100
#define CS_LOG_SHM_KEY 2801
#define CS_LOG_VERSION 1

#define CS_LOG_TRANSACTION_TYPE 1
#define CS_LOG_ERROR_TYPE 2

#define CS_SFS_OPEN_TIMEOUT 60
#define CS_MAX_LOGCM_MSG_LENGTH 500
#define CS_MAX_TEXT_MSG_LENGTH 100
#define CS_MAX_SYSLOG_LENGTH 500
#define CS_MAX_SSM_RPC_ATTEMPTS 3
#define CS_SSM_RPC_TIMEOUT 5
#define CS_SSM_RETRY_DELAY 15
#define CS_LOG_SOCK_BUFSIZE 65536

#define CS_LOG_ENV "HPSSLOG"
#define CS_LOGGER_ENV "HPSSLOGGER"
#define CS_LOG_STDOUT "stdout"
#define CS_LOG_SYSLOG "syslog"
#define CS_SHMKEY_ENV "HPSSLOG_SHMKEY"
#define CS_SHMID_ENV "HPSSLOG_SHMID"
#define CS_HOSTNAME_ENV "HPSSLOG_HOSTNAME"

#define CS_FAIL_TERM -1
#define CS_FAIL_CONT -2

#define CS_SSM_NOT_CONNECTED 0 /* no SSM connection */
#define CS_SSM_RECONNECTING 1 /* initializing SSM connection */
#define CS_SSM_CONNECTED 2 /* connected to SSM */
#define CS_SSM_SHUTDOWN_CONN 3 /* connection shutdown */

#define CS_ALARM 1
#define CS_EVENT 2
#define CS_REQUEST 4
#define CS_SECURITY 8
#define CS_ACCOUNTING 16
#define CS_DEBUG 32
#define CS_TRACE 64
#define CS_STATUS 128

#define NONE 0
#define WARNING 1
#define MINOR 2
#define MAJOR 3
#define CRITICAL 4
#define INDETERMINATE 5
#define CLEARED 6

#define SERVICE_DEGRADATION 1
#define SECURITY_VIOLATION 2
#define SOFTWARE_ERROR 3
#define HARDWARE_ERROR 4
#define COMMUNICATION_ERROR 5
#define THRESHOLD 6

#define OBJECT_CREATION 10
#define OBJECT_DELETION 11
#define OPERATION_INITIATION 12
#define OPERATION_COMPLETION 13
#define OTHER_EVENT 14


#define TEXT_REQUEST 20
#define IOD_REQUEST 21
#define IOR_REQUEST 22

#define LOG_LOGFILE_INVALID 1
#define LOG_LOGFILE_INUSE 2
#define LOG_LOGFILE_ARCHIVE 3
#define LOG_LOGFILE_ARCHIVING 4
#define LOG_LOGFILE_READY 5


#define CS_LOG_MAX_TIME_LEN 40

#define CS_LOG_MSGCAT_SETNUMBER_INFRA (1)
#define CS_LOG_MSGCAT_SETNUMBER_CORE (2)

#define CS_LOG_MSGCAT_SETNUMBER_MVR (4)
#define CS_LOG_MSGCAT_SETNUMBER_PVL (5)
#define CS_LOG_MSGCAT_SETNUMBER_PVR (6)
#define CS_LOG_MSGCAT_SETNUMBER_SSMSM (7)

#define CS_LOG_MSGCAT_SETNUMBER_SEC (9)
#define CS_LOG_MSGCAT_SETNUMBER_MM (10)
#define CS_LOG_MSGCAT_SETNUMBER_MMON (11)
#define CS_LOG_MSGCAT_SETNUMBER_PIOFSCMD (12)
#define CS_LOG_MSGCAT_SETNUMBER_PIOFSHPSS (13)
#define CS_LOG_MSGCAT_SETNUMBER_LOGCM (14)
#define CS_LOG_MSGCAT_SETNUMBER_LOG (15)

#define CS_LOG_MSGCAT_SETNUMBER_NFS (17)
#define CS_LOG_MSGCAT_SETNUMBER_ERRNO (18)
#define CS_LOG_MSGCAT_SETNUMBER_MPS (19)
#define CS_LOG_MSGCAT_SETNUMBER_RECLAIM (20)
#define CS_LOG_MSGCAT_SETNUMBER_REPACK (21)
#define CS_LOG_MSGCAT_SETNUMBER_ACCT (22)
#define CS_LOG_MSGCAT_SETNUMBER_DMG (23)
#define CS_LOG_MSGCAT_SETNUMBER_LS (24)
#define CS_LOG_MSGCAT_SETNUMBER_NDCL (25)
#define CS_LOG_MSGCAT_SETNUMBER_NDCG (26)
#define CS_LOG_MSGCAT_SETNUMBER_API (27)
#define CS_LOG_MSGCAT_SETNUMBER_PM (28)
#define CS_LOG_MSGCAT_SETNUMBER_RTM (29)
#define CS_LOG_MSGCAT_SETNUMBER_GK (30)
#define CS_LOG_MSGCAT_SETNUMBER_COMMON (31)
#define CS_LOG_MSGCAT_SETNUMBER_AV (32)
#define CS_LOG_MSGCAT_SETNUMBER_RTMU (33)
#define CS_LOG_MSGCAT_SETNUMBER_HPSSD (34)

#define CS_LOG_MNEMONIC_ACCT "ACCT"
#define CS_LOG_MNEMONIC_API "APIL"
#define CS_LOG_MNEMONIC_AVAL "AVAL"
#define CS_LOG_MNEMONIC_AVCL "AVCL"

#define CS_LOG_MNEMONIC_COMMON "COMM"
#define CS_LOG_MNEMONIC_CORE "CORE"
#define CS_LOG_MNEMONIC_DLOG "DLOG"
#define CS_LOG_MNEMONIC_DMG "DMG "
#define CS_LOG_MNEMONIC_GK "GKSR"

#define CS_LOG_MNEMONIC_HPSSD "SUDD"

#define CS_LOG_MNEMONIC_LCLI "LCLI"
#define CS_LOG_MNEMONIC_LOG "LOG "
#define CS_LOG_MNEMONIC_LOGC "LOGC"
#define CS_LOG_MNEMONIC_LOGD "LOGD"
#define CS_LOG_MNEMONIC_LSRV "LSRV"
#define CS_LOG_MNEMONIC_MMON "MMON"
#define CS_LOG_MNEMONIC_MNT "MNT"
#define CS_LOG_MNEMONIC_MPS "MPSR"
#define CS_LOG_MNEMONIC_MVR "MOVR"
#define CS_LOG_MNEMONIC_NDCG "NDCG"
#define CS_LOG_MNEMONIC_NDCL "NDCL"
#define CS_LOG_MNEMONIC_NFS "NFS "
#define CS_LOG_MNEMONIC_PM "PMGR"

#define CS_LOG_MNEMONIC_PVL "PVLS"
#define CS_LOG_MNEMONIC_PVR "PVRS"
#define CS_LOG_MNEMONIC_RPC "RPC"
#define CS_LOG_MNEMONIC_RTM "RTM "
#define CS_LOG_MNEMONIC_SEC "SEC"
#define CS_LOG_MNEMONIC_SSMSM "SSMS"
#define CS_LOG_MNEMONIC_SSMDS "SSMD"

#define CS_LOG_MNEMONIC_TRANIOD "TIOD"


#define CS_LOG_MSG_CLASS_LS (0)
#define CS_LOG_MSG_CLASS_SERVER (1)
#define CS_LOG_MSG_CLASS_INFRA (2)






#define CS_LOG_MSG_CLASS_MOVER (8)
#define CS_LOG_MSG_CLASS_DEVICE (9)
#define CS_LOG_MSG_CLASS_API (10)
#define CS_LOG_MSG_CLASS_NDCL (10)
#define CS_LOG_MSG_CLASS_BFS (11)
#define CS_LOG_MSG_CLASS_NDCG (12)

#define CS_LOG_MSG_CLASS_MPS (37)
#define CS_LOG_MSG_CLASS_ACCT (38)
#define CS_LOG_MSG_CLASS_AV (39)
#define CS_LOG_MSG_CLASS_CORE (40)
#define CS_LOG_MSG_CLASS_GK (41)
#define CS_LOG_MSG_CLASS_DMG (42)
#define CS_LOG_MSG_CLASS_COMMON (100)

#if defined (__alpha) && defined (__osf__)
#define CS_XDR_TIMEVAL(a,b) ((xdr_int( a, &((b)->tv_sec) ) || xdr_int( a, &((b)->tv_usec) )))
#elif (LONG_BIT == 64)
#define CS_XDR_TIMEVAL(a,b) ((xdr_u_int( a, &((b)->tv_sec) ) || xdr_u_int( a, &((b)->tv_usec) )))
#else
#define CS_XDR_TIMEVAL(a,b) ((xdr_long( a, &((b)->tv_sec) ) || xdr_long( a, &((b)->tv_usec) )))
#endif

char *hpss_Catgets( nl_catd catd, int set_num, int msg_num, char *msg_string );

typedef struct {
char LogIDStamp[8]; /* unique log identifier */
unsigned32 LogFlags; /* log file state flags */
timestamp_t LogStart; /* time when file initialized */
timestamp_t LogEnd; /* time when log file no longer used */
} LogHdr_t;

typedef struct {
int mtype; /* message type */
log_msg_t marea; /* message area */
} logq_msg_t;

#define CS_XDR_MSG_BUF_SZ (sizeof(int)+sizeof(log_msg_t)+sizeof(int))


typedef struct {
log_rec_hdr_t LogRecHdr; /* log record header */
char LogRecBody[CS_MAX_LOGCM_MSG_LENGTH]; /* log record body */
} logcm_msg_t;
















int cs_LogInit( char *DescName, char *ApplCatName, nl_catd *ApplCatd,
nl_catd *MasterCatd );


int cs_Msg( unsigned32 LogRecordType, char *DescName, char *ClientProgName,
char *ClientID, unsigned32 RequestID, unsigned32 ObjectClass,
unsigned32 MsgType, unsigned32 SeverityLevel, signed32 ErrorCode,
unsigned32 LogRecordLength, char *MsgArea, int MsgNum, int SetNum,
nl_catd Catd );


#endif /* !cs_log_h */


cs_Log_CnIod.h

HPSS4.5

HPSS6.2

#ifndef _CS_LOG_CMIOD_H
#define _CS_LOG_CMIOD_H

int
format_iod(
char *msg,
IOD_t *iodptr,
char **out_msg_p);

int
format_ior(
char *msg,
IOR_t *iorptr,
char **out_msg_p);

int
format_piofs(
char *msg,
piofs_ie_t *piofs_ie_p,
char **out_msg_p);

void
getlen_iod(
IOD_t *iodptr,
unsigned32 *length);

void
getlen_ior(
IOR_t *iorptr,
unsigned32 *length);

void
getlen_piofs(
piofs_ie_t *piofs_ie_p,
unsigned32 *length);

void copy_iod(
IOD_t *iodptr,
char *out_buf,
unsigned32 *length);

void copy_ior(
IOR_t *iorptr,
char *out_buf,
unsigned32 *length);

int
copy_piofs(
piofs_ie_t *piofs_ie_p,
char *out_buf,
unsigned32 *length);

int
logcm_psyslog_iodior(
log_msg_t *log_msg, /* ptr to log record message */
char **out_msg_p); /* ptr to text output string ptr */

int
logcm_prt_iodior(
log_msg_t *log_msg, /* log message area */
char **out_msg_p, /* ptr to message output string ptr */
int filedes); /* file descriptor */

#endif /* ifndef _CS_LOG_CMIOD_H */

#ifndef _CS_LOG_CMIOD_H
#define _CS_LOG_CMIOD_H

int
format_iod(
char *msg,
IOD_t *iodptr,
char **out_msg_p);

int
format_ior(
char *msg,
IOR_t *iorptr,
char **out_msg_p);







void
getlen_iod(
IOD_t *iodptr,
unsigned32 *length);

void
getlen_ior(
IOR_t *iorptr,
unsigned32 *length);






void copy_iod(
IOD_t *iodptr,
char *out_buf,
unsigned32 *length);

void copy_ior(
IOR_t *iorptr,
char *out_buf,
unsigned32 *length);







int
logcm_psyslog_iodior(
log_msg_t *log_msg, /* ptr to log record message */
char **out_msg_p); /* ptr to text output string ptr */

int
logcm_prt_iodior(
log_msg_t *log_msg, /* log message area */
char **out_msg_p, /* ptr to message output string ptr */
int filedes); /* file descriptor */

#endif /* ifndef _CS_LOG_CMIOD_H */


cs_LogCmXdr.h

HPSS4.5

HPSS6.2

#ifndef _CS_LOG_CMXDR_H
#define _CS_LOG_CMXDR_H

#include <errno.h>
#include <sys/types.h>
#include <rpc/types.h>
#include <rpc/xdr.h>
#include "hpss_types.h"
#include "hpss_iod.h"
#include "piofsie.h"
#include "cs_Log.h"


int
logcm_xdr_rechdr(
XDR *xdrs, /* xdr memory stream */
log_rec_hdr_t *hdrp); /* address of log record */

int
logcm_xdr_text(
XDR *xdrs, /* xdr memory stream */
char *log_msg); /* log message area */

int
logcm_xdr_iod(
XDR *xdrs, /* xdr memory stream */
IOD_t *msg_body); /* address of IOD structure */

int
logcm_xdr_ior(
XDR *xdrs, /* xdr memory stream */
IOR_t *msg_body); /* address of IOR structure */

int
logcm_xdr_piofs(
XDR *xdrs, /* xdr memory stream */
piofs_ie_t *msg_body ); /* address of PIOFS import/export structure */

#endif /* ifndef _CS_LOG_CMXDR_H */

#ifndef _CS_LOG_CMXDR_H
#define _CS_LOG_CMXDR_H

#include <errno.h>
#include <sys/types.h>
#include <rpc/types.h>
#include <rpc/xdr.h>
#include "hpss_types.h"
#include "hpss_iod.h"

#include "cs_Log.h"


int
logcm_xdr_rechdr(
XDR *xdrs, /* xdr memory stream */
log_rec_hdr_t *hdrp); /* address of log record */

int
logcm_xdr_text(
XDR *xdrs, /* xdr memory stream */
char *log_msg); /* log message area */

int
logcm_xdr_iod(
XDR *xdrs, /* xdr memory stream */
IOD_t *msg_body); /* address of IOD structure */

int
logcm_xdr_ior(
XDR *xdrs, /* xdr memory stream */
IOR_t *msg_body); /* address of IOR structure */






#endif /* ifndef _CS_LOG_CMXDR_H */


cs_LogErr.h

HPSS4.5

HPSS6.2

<略>
#define PIOFS_REQUEST_NUM 44
#define PIOFS_REQUEST_DEF "PIOFS"

#define OBJ_CLASS_NUM 45
#define OBJ_CLASS_DEF ", Object Class="
#define REQID_NUM 46
#define REQID_DEF ", Request Id="

<略>
#define MT_WORMOPTICAL_DEFAULT_NUM 615
<略>
#define PIOFSADDR_NUM 209
#define PIOFSADDR_DEF "%s PIOFS:"
#define FILEADDR_NUM 210
#define FILEADDR_DEF "%s FILE:"
#define SSEGADDR_NUM 211
#define SSEGADDR_DEF "%s SSEG:"
#define VVOLADDR_NUM 212
#define VVOLADDR_DEF "%s VVOL:"
#define PVOLADDR_NUM 213
#define PVOLADDR_DEF "%s PVOL:"
#define DEVICEADDR_NUM 214
#define DEVICEADDR_DEF "%s DEVICE:"
#define STRIPEADDR_NUM 215
#define STRIPEADDR_DEF "%s STRIPE:"
#define MEMORYADDR_NUM 216
#define MEMORYADDR_DEF "%s MEMORY:"
#define CLIENTFILEADDR_NUM 217
#define CLIENTFILEADDR_DEF "%s CLIENTFILE:"
#define SHMADDR_NUM 218
#define SHMADDR_DEF "%s SHM:"
#define SOCKXFERIDEQ_NUM 219
#define SOCKXFERIDEQ_DEF "%s Transfer ID = 0x%08x.0x%08x\n"
#define ADDREQ_NUM 220
#define ADDREQ_DEF "%s Addr = 0x%08x\n"
#define PORTEQ_NUM 221
#define PORTEQ_DEF "%s Port = %d\n"
#define FAMILYEQ_NUM 222
#define FAMILYEQ_DEF "%s Family = %d\n"
#define IPIXFERIDEQ_NUM 223
#define IPIXFERIDEQ_DEF "%s Transfer ID = 0x%08x\n"
#define INTERFACEEQ_NUM 224
#define INTERFACEEQ_DEF "%s Interface = %hd\n"
#define NAMEEQ_NUM 225
#define NAMEEQ_DEF "%s Name = %s\n"
#define PFLAGSEQ_NUM 226
#define PFLAGSEQ_DEF "%s PIOFS mode = %o\n"
#define PPERMSEQ_NUM 227
#define PPERMSEQ_DEF "%s PIOFS permissions = %o\n"
#define VBSEQ_NUM 228
#define VBSEQ_DEF "%s Vbs = %d\n"
#define VNEQ_NUM 229
#define VNEQ_DEF "%s Vn = %d\n"
#define HBSEQ_NUM 230
#define HBSEQ_DEF "%s Hbs = %d\n"
#define HNEQ_NUM 231
#define HNEQ_DEF "%s Hn = %d\n"
#define SUBFILEEQ_NUM 232
#define SUBFILEEQ_DEF "%s Subfile = %d\n"
#define CHKPTFLAGEQ_NUM 233
#define CHKPTFLAGEQ_DEF "%s Checkpoint flag = "
#define CHKPT_CHECKPOINT_NUM 234
#define CHKPT_CHECKPOINT_DEF "CHECKPOINT\n"
#define PNAMEEQ_NUM 235
#define PNAMEEQ_DEF "%s PIOFS name = %s\n"
#define HANDLE_NUM 236
#define HANDLE_DEF "%s HANDLE:"
#define OBJECTPTREQ_NUM 237
#define OBJECTPTREQ_DEF "%s Object ptr = 0x%08x\n"
#define OBJECTIDEQ_NUM 238
#define OBJECTIDEQ_DEF "%s Object ID = %s\n"
#define OBJECTTYPEEQ_NUM 239
#define OBJECTTYPEEQ_DEF "%s Object type = %d\n"
#define CONNTYPEEQ_NUM 240
#define CONNTYPEEQ_DEF "%s Connection type = %d\n"
#define CLIENTPTREQ_NUM 241
#define CLIENTPTREQ_DEF "%s Client ptr = 0x%08x\n"
#define SOID_NUM 242
#define SOID_DEF "%s SOID:"
#define SERVERDEP1EQ_NUM 243
#define SERVERDEP1EQ_DEF "%s Server dep1 = 0x%08x\n"
#define SERVERDEP2EQ_NUM 244
#define SERVERDEP2EQ_DEF "%s Server dep2 = 0x%04x\n"
#define SERVERDEP3EQ_NUM 245
#define SERVERDEP3EQ_DEF "%s Server dep3 = 0x%04x\n"
#define SERVERDEP4EQ_NUM 246
#define SERVERDEP4EQ_DEF "%s Server dep4 = 0x%02x\n"
#define SERVERDEP5EQ_NUM 247
#define SERVERDEP5EQ_DEF "%s Server dep4 = 0x%02x\n"
#define SECURITYLEVELEQ_NUM 248
#define SECURITYLEVELEQ_DEF "%s Security level = 0x%04x\n"
#define RESERVED3EQ_NUM 249
#define RESERVED3EQ_DEF "%s Reserved = 0x%04x%02x\n"









<略>
#define PIOFS_NUM 268
#define PIOFS_DEF ""
#define IOR_NUM 269
#define IOR_DEF ""
#define REQUESTIDEQ_NUM 270
#define REQUESTIDEQ_DEF "%s Request ID = %d\n"
#define IOR_NOT_PROCESSED_NUM 271
#define IOR_NOT_PROCESSED_DEF "NOT_PROCESSED "
#define IOR_COMPLETE_NUM 272
#define IOR_COMPLETE_DEF "COMPLETE "
#define IOR_ERROR_NUM 273
#define IOR_ERROR_DEF "ERROR "
#define POSITIONVALID_NUM 274
#define POSITIONVALID_DEF "POSITION_VALID "
#define ENDPOSITION_NUM 275
#define ENDPOSITION_DEF "END_POSITION "
#define IOR_GAPINFO_VALID_NUM 276
#define IOR_GAPINFO_VALID_DEF "GAPINFO_VALID "
#define IOR_FOREIGN_LABEL_NUM 277
#define IOR_FOREIGN_LABEL_DEF "FOREIGN_LABEL "
#define IOR_NO_LABEL_NUM 278
#define IOR_NO_LABEL_DEF "NO_LABEL "
#define IOR_NON_ANSI_LABEL_NUM 279
#define IOR_NON_ANSI_LABEL_DEF "NON_ANSI_LABEL "
#define STATUSEQ_NUM 280
#define STATUSEQ_DEF "\n%s Status = %d\n"
#define REQSPECREPLYEQ_NUM 281
#define REQSPECREPLYEQ_DEF "%s ReqSpecReply = 0x%08x\n"
#define REQSPECREPLY_NUM 282
#define REQSPECREPLY_DEF "\tREQSPEC_REPLY:"
#define SRCREPLYLENEQ_NUM 283
#define SRCREPLYLENEQ_DEF "%s SrcReplyLength = %d\n"
#define SINKREPLYLENEQ_NUM 284
#define SINKREPLYLENEQ_DEF "%s SinkReplyLength = %d\n"
#define SRCREPLYLISTEQ_NUM 285
#define SRCREPLYLISTEQ_DEF "%s SrcReplyList = 0x%08x\n"
#define SINKREPLYLISTEQ_NUM 286
#define SINKREPLYLISTEQ_DEF "%s SinkReplyList = 0x%08x\n"
#define COUNTPROCEQ_NUM 287
#define COUNTPROCEQ_DEF "%s Count processed = %d\n"
#define REQLISTLENEQ_NUM 288
#define REQLISTLENEQ_DEF "%s ReqListLen = %d\n"
#define REQREPLYTYPEEQ_NUM 289
#define REQREPLYTYPEEQ_DEF "%s Reply type = "
#define REPLY_NONE_NUM 290
#define REPLY_NONE_DEF "NONE\n"
#define REPLY_LISTENLIST_NUM 291
#define REPLY_LISTENLIST_DEF "LISTEN_LIST\n"
#define LISTENLISTEQ_NUM 292
#define LISTENLISTEQ_DEF "%s ListenList = 0x%08x\n"
#define REPLY_DEVICEATTR_NUM 293
#define REPLY_DEVICEATTR_DEF "DEVICE_ATTR\n"
#define REPLY_VOLUMEID_NUM 294
#define REPLY_VOLUMEID_DEF "VOLUMEID\n"
#define REPLY_GAPINFO_NUM 295
#define REPLY_GAPINFO_DEF "GAP_INFO\n"
#define SRCSINK_NUM 296
#define SRCSINK_DEF "\t\tSRCSINK:"
#define GAP_NUM 297
#define GAP_DEF "\tGAP:"
#define BYTESMOVEDEQ_NUM 298
#define BYTESMOVEDEQ_DEF "%s Bytes moved = %s\n"
#define OPEQ_NUM 299
#define OPEQ_DEF "%s Operation = "
#define IMPORT_NUM 300
#define IMPORT_DEF "IMPORT\n"
#define EXPORT_NUM 301
#define EXPORT_DEF "EXPORT\n"
#define EFLAGSEQ_NUM 302
#define EFLAGSEQ_DEF "%s HPSS mode = %o\n"
#define EPERMSEQ_NUM 303
#define EPERMSEQ_DEF "%s HPSS permissions = %o\n"
#define PRECSIZEEQ_NUM 304
#define PRECSIZEEQ_DEF "%s PIOFS recsize = %d\n"
#define PCELLSEQ_NUM 305
#define PCELLSEQ_DEF "%s PIOFS cells = %d\n"
#define LISTSIZEEQ_NUM 306
#define LISTSIZEEQ_DEF "%s List size = %d\n"
#define EFSEQ_NUM 307
#define EFSEQ_DEF "%s EFS = %s\n"
#define ENAMEEQ_NUM 308
#define ENAMEEQ_DEF "%s HPSS name = %s\n"
#define PFILEEQ_NUM 309
#define PFILEEQ_DEF "%s pfile name = %s\n"
#define HINTSEQ_NUM 310
#define HINTSEQ_DEF "%s Hints = %s\n"
#define LIST_NUM 311
#define LIST_DEF "\tLIST:"
#define SRCOFFSETEQ_NUM 312
#define SRCOFFSETEQ_DEF "%s Src offset = %s\n"
#define DESTOFFSETEQ_NUM 313
#define DESTOFFSETEQ_DEF "%s Dest offset = %s\n"
#define REQUESTEDLENEQ_NUM 314
#define REQUESTEDLENEQ_DEF "%s Requested len = %s\n"
#define INVALID_NUM 315
#define INVALID_DEF "INVALID"
#define IOR_NON_BLOCK_OFFSET_NUM 316
#define IOR_NON_BLOCK_OFFSET_DEF "NON_BLOCK_OFFSET "
#define MT_TAPE_REDW_NUM 317
#define MT_TAPE_REDW_DEF "REDWOOD\n"
#define MT_TAPE_TMBRLN_NUM 318
#define MT_TAPE_TMBRLN_DEF "TIMBERLINE\n"
#define MT_TAPE_9840_NUM 319
#define MT_TAPE_9840_DEF "STK 9840\n"
#define MT_SUB_3590_E_DOUBLELEN_NUM 320
#define MT_SUB_3590_E_DOUBLELEN_DEF "3590E DOUBLE\n"
#define MT_SUB_DST_312_NUM 321
#define MT_SUB_DST_312_DEF "DST-312\n"
#define MT_SUB_DST_314_NUM 322
#define MT_SUB_DST_314_DEF "DST-314\n"
#define IOR_DEVICE_DISABLED_NUM 323
#define IOR_DEVICE_DISABLED_DEF "DEVICE_DISABLED\n"
#define LAST_SEG_WRITE_NUM 324
#define LAST_SEG_WRITE_DEF "LAST_SEG_WRITE "
#define LFTADDR_NUM 325
#define LFTADDR_DEF "%s LFT:"
#define LFTFLAGSEQ_NUM 326
#define LFTFLAGSEQ_DEF "%s LFT flags = 0x%x\n"
#define LFTUIDEQ_NUM 327
#define LFTUIDEQ_DEF "%s UID = %d\n"
#define LFTGIDEQ_NUM 328
#define LFTGIDEQ_DEF "%s GID = %d\n"
#define LFTCELLIDEQ_NUM 329
#define LFTCELLIDEQ_DEF "%s Cell Id = %d\n"
#define LFTNAMEEQ_NUM 330
#define LFTNAMEEQ_DEF "%s LFT name = %s\n"
#define MT_TAPE_9940_NUM 331
#define MT_TAPE_9940_DEF "STK 9940\n"
#define MT_TAPE_3580_NUM 332
#define MT_TAPE_3580_DEF "IBM 3580 LTO\n"
#define MT_TAPE_GY8240_NUM 333
#define MT_TAPE_GY8240_DEF "Sony GY-8240\n"
#define REQ_JOBID_NUM 334
#define REQ_JOBID_DEF "REQUEST_JOBID\n"
#define MT_SUB_9940_A_NUM 335
#define MT_SUB_9940_A_DEF "9940A(60GB)\n"
#define MT_SUB_9940_B_NUM 336
#define MT_SUB_9940_B_DEF "9940B(200GB)\n"
#define DEVICE_READLASTOP_NUM 337
#define DEVICE_READLASTOP_DEF "READLASTOP "
#define DEVICE_BLKID_SUPP_NUM 338
#define DEVICE_BLKID_SUPP_DEF "BLKID_SUPP "
#define DEVICE_SCSI2_LBA_NUM 339
#define DEVICE_SCSI2_LBA_DEF "SCSI2_LBA "
#define MT_SUB_3590_H_SINGLELEN_NUM 340
#define MT_SUB_3590_H_SINGLELEN_DEF "3590H SINGLE\n"
#define MT_SUB_3590_H_DOUBLELEN_NUM 341
#define MT_SUB_3590_H_DOUBLELEN_DEF "3590H DOUBLE\n"





























<略>
#define LOG_COND_INIT_ERR 7
#define LOG_COND_INIT_DEF "Initialization of a condition variable failed"
#define LOG_DEF_POLICY_NUM 8
#define LOG_DEF_POLICY_DEF "default policy"

<略>
#define LOG_NO_POLICY_DEF "Logging policy not found - logging enabled for all types except TRACE"

<略>
#define LOGC_GETS_ENTER_ERR 100
#define LOGC_GETS_ENTER_DEF "Error entering connection to get Log Client attributes"
#define LOGC_GETS_LEAVE_ERR 101
#define LOGC_GETS_LEAVE_DEF "Error leaving connection to get Log Client attributes"

#define LOGC_SETS_ENTER_ERR 110
#define LOGC_SETS_ENTER_DEF "Error entering connection to set Log Client attributes"
#define LOGC_REINIT_REQ_NUM 111
#define LOGC_REINIT_REQ_DEF "Log Client reinitialization request received"
#define LOGC_SETS_LEAVE_ERR 112
#define LOGC_SETS_LEAVE_DEF "Error leaving connection to set Log Client attributes"
#define LOG_INV_SETATTR_ERR 113
#define LOG_INV_SETATTR_ENO -2824
#define LOG_INV_SETATTR_DEF "Attribute specified is not settable"
#define LOG_AUDIT_ERR 114
#define LOG_AUDIT_DEF "Security audit message failed"

<略>
#define LOG_SSM_UNREG_ERR 124
#define LOG_SSM_UNREG_DEF "Unregister of SSM interface failed - %s"
#define LOG_CONN_UNREG_ERR 125
#define LOG_CONN_UNREG_DEF "Unregister of connection manager interface failed - %s"
#define LOG_CLOSE_CONN_ERR 126
#define LOG_CLOSE_CONN_DEF "Close of SSM connection handle failed - %s"

<略>
#define LOG_SYSCON_OPEN_ERR 160
#define LOG_SYSCON_OPEN_DEF "HPSS server configuration file open failed - %s"
#define LOG_SEC_INIT_ERR 161
#define LOG_SEC_INIT_DEF "Security initialization failed"
#define LOG_AUTHZ_INIT_ERR 162
#define LOG_AUTHZ_INIT_DEF "Initialization of authorization vector failed"
#define LOG_AUTHZ_ADD_ERR 163
#define LOG_AUTHZ_ADD_DEF "Addition of SSM server to the authorization vector failed"
#define LOG_SYSCON_CLOS_ERR 164
#define LOG_SYSCON_CLOS_DEF "HPSS server configuration file close failed"
#define LOGC_LOGCON_OPEN_ERR 165
#define LOGC_LOGCON_OPEN_DEF "Log Client specific configuration file open failed - %s"
#define LOG_NO_GEN_ENT_ERR 166
#define LOG_NO_GEN_ENT_DEF "Server generic configuration entry not defined: Descriptive name = %s, File Name = %s"
#define LOG_NO_SPEC_ENT_ERR 167
#define LOG_NO_SPEC_ENT_DEF "Server specific configuration entry not defined: Descriptive name = '%s', File Name = %s"
#define LOGC_LOGCON_CLOS_ERR 168
#define LOGC_LOGCON_CLOS_DEF "Log Client specific configuration file close failed"



#define LOGC_NOSTDOUT_ERR 169
#define LOGC_NOSTDOUT_DEF "Log Client options PRT_LOG/PRT_STDOUT are mutually exclusive - STDOUT disabled"
#define LOG_PREINIT_CONN_ERR 170
#define LOG_PREINIT_CONN_DEF "Connection preinitialization failed - %s"
#define LOGC_PREREG_SSM_ERR 171
#define LOGC_PREREG_SSM_DEF "Preregistration of Log Client SSM I/F failed - %s"
#define LOG_INIT_CONN_ERR 172
#define LOG_INIT_CONN_DEF "Connection initialization failed - %s"

#define LOGC_POLREC_OPEN_ERR 180
#define LOGC_POLREC_OPEN_DEF "Log policy configuration file open failed - %s"
#define LOGC_NO_POLREC_ERR 181
#define LOGC_NO_POLREC_DEF "Log policy configuration record not found"
#define LOGC_POLREC_READ_ERR 182
#define LOGC_POLREC_READ_DEF "Log policy configuration record read failed"
#define LOGC_POLREC_CLOS_ERR 183
#define LOGC_POLREC_CLOS_DEF "Log policy configuration file close failed"

<略>
#define LOGC_BAD_PATH_ERR 197
#define LOGC_BAD_PATH_ENO -2827
#define LOGC_BAD_PATH_DEF "Invalid Log Client pathname"
#define LOGC_LOCAL_OPEN_ERR 198
#define LOGC_LOCAL_OPEN_DEF "Local log file open failed"
#define LOGC_STARTING 199
#define LOGC_STARTING_DEF "Log Client starting"
#define LOGC_MQ_RETRY_ERR 200
#define LOGC_MQ_RETRY_ENO -2828
#define LOGC_MQ_RETRY_DEF "Connection to Log Daemon failed - retrying"
#define LOGC_MQ_CONN_ERR 201
#define LOGC_MQ_CONN_ENO -2829
#define LOGC_MQ_CONN_DEF "Connection to Log Daemon failed with severe error"
#define LOGC_MQ_MAX_ERR 202
#define LOGC_MQ_MAX_ENO -2830
#define LOGC_MQ_MAX_DEF "Connection to Log Daemon failed - retries exhausted"
#define LOGC_STARTUP_CMP 203
#define LOGC_STARTUP_DEF "Log Client startup complete"
#define LOGC_SHUTDOWN 204
#define LOGC_SHUTDOWN_DEF "Log Client shutdown request received"

<略>
#define LOG_FIND_CONN_ERR 215
#define LOG_FIND_CONN_DEF "Find for SSM connection handle failed - %s"
#define LOG_OPEN_CONN_ERR 216
#define LOG_OPEN_CONN_DEF "Open of connection handle for SSM notification failed - %s"

<略>
#define LOG_REG_SSM_ERR 260
#define LOG_REG_SSM_DEF "Registration of SSM I/F failed - %s"
#define LOG_RPC_HANDLE_ERR 261
#define LOG_RPC_HANDLE_DEF "Initialization of RPC handle failed"
#define LOG_LISTEN_ERR 262
#define LOG_LISTEN_DEF "RPC listen failed - %s"

#define LOG_RECON_SSM_ERR 270
#define LOG_RECON_SSM_DEF "Creation of SSM binding handle thread failed"
#define LOG_MUTEX_UNLOCK_ERR 271
#define LOG_MUTEX_UNLOCK_DEF "Unlock of mutex failed"





#define LOGC_SYSLOG_WRT_ERR 280
#define LOGC_SYSLOG_WRT_DEF "Write to syslog failed"
#define LOGC_PRT_WRT_ERR 281
#define LOGC_PRT_WRT_DEF "Write to local log file failed"

#define LOGC_SOCK_BIND_ERR 290
#define LOGC_SOCK_BIND_DEF "Socket bind failed"

<略>
#define LOGD_GETS_ENTER_ERR 420
#define LOGD_GETS_ENTER_DEF "Error entering connection to get Log Server attributes"
#define LOGD_GETS_LEAVE_ERR 421
#define LOGD_GETS_LEAVE_DEF "Error leaving connection to get Log Server attributes"

#define LOGD_SETS_ENTER_ERR 430
#define LOGD_SETS_ENTER_DEF "Error entering connection to set Log Server attributes"
#define LOGD_SETS_LEAVE_ERR 431
#define LOGD_SETS_LEAVE_DEF "Error leaving connection to set Log Server attributes"

#define LOGD_GETL_ENTER_ERR 440
#define LOGD_GETL_ENTER_DEF "Error entering connection to get log file attributes"
#define LOGD_GET_ATTRS_ERR 441
#define LOGD_GET_ATTRS_ENO -2852
#define LOGD_GET_ATTRS_DEF "Invalid log file name specified in get attributes request"
#define LOGD_GETL_LEAVE_ERR 442
#define LOGD_GETL_LEAVE_DEF "Error leaving connection to get log file attributes"

#define LOGD_SETL_ENTER_ERR 450
#define LOGD_SETL_ENTER_DEF "Error entering connection to set log file attributes"
#define LOGD_SET_ATTRS_ERR 451
#define LOGD_SET_ATTRS_ENO -2853
#define LOGD_SET_ATTRS_DEF "Invalid log file name specified in set attributes structure"
#define LOGD_SETL_LEAVE_ERR 452
#define LOGD_SETL_LEAVE_DEF "Error leaving connection to set log file attributes"

<略>
#define LOGD_CHDIR_ERR 492
#define LOGD_CHDIR_DEF "Change to log directory failed"
#define LOGD_SOCK_BIND_ERR 493
#define LOGD_SOCK_BIND_DEF "socket bind failed - Log Daemon may already be executing"
#define LOGD_LISTEN_ERR 494
#define LOGD_LISTEN_DEF "Socket listen failed"
#define LOGD_STARTUP_CMP 495
#define LOGD_STARTUP_DEF "Log Daemon startup complete"

#define LOGD_PREREG_SSM_ERR 500
#define LOGD_PREREG_SSM_DEF "Preregistration of Log Daemon SSM I/F failed - %s"
#define LOGD_LOGCON_OPEN_ERR 501
#define LOGD_LOGCON_OPEN_DEF "Log Daemon specific configuration file open failed - %s"
#define LOGD_CONF_READ_ERR 502
#define LOGD_CONF_READ_DEF "Error detected reading Log Daemon specific configuration record"
#define LOGD_LOGCON_CLOS_ERR 503
#define LOGD_LOGCON_CLOS_DEF "Log Daemon specific configuration file close failed"
#define LOG_NO_GLOBCON_ERR 504
#define LOG_NO_GLOBCON_DEF "Configuration error: No Global configuration file"
#define LOG_GLOBCON_OPEN_ERR 505
#define LOG_GLOBCON_OPEN_DEF "Global configuration file open failed"
#define LOG_GLOBCON_CLOS_ERR 506
#define LOG_GLOBCON_CLOS_DEF "Global configuration file close failed"

<略>
#define LOGD_INIT_ER 551
#define LOGD_INIT_DEF "Log Daemon initialization failed"

<略>
#define DELOG_LS_OPT_NUM 714
#define DELOG_LS_OPT_DEF "-l"
#define DELOG_KTAB_OPT_NUM 715
#define DELOG_KTAB_OPT_DEF "-k"
#define DELOG_PRINC_OPT_NUM 716
#define DELOG_PRINC_OPT_DEF "-p"
#define DELOG_ALARM_NUM 717
#define DELOG_ALARM_DEF "alarm"
#define DELOG_EVENT_NUM 718
#define DELOG_EVENT_DEF "event"
#define DELOG_REQUEST_NUM 719
#define DELOG_REQUEST_DEF "request"
#define DELOG_SECURITY_NUM 720
#define DELOG_SECURITY_DEF "security"
#define DELOG_ACCOUNTING_NUM 721
#define DELOG_ACCOUNTING_DEF "accounting"
#define DELOG_DEBUG_NUM 722
#define DELOG_DEBUG_DEF "debug"
#define DELOG_TRACE_NUM 723
#define DELOG_TRACE_DEF "trace"
#define DELOG_STATUS_NUM 724
#define DELOG_STATUS_DEF "status"
#define DELOG_DUP_START_ERR 800
#define DELOG_DUP_START_DEF "Usage error: duplicate delog start time"
#define DELOG_INV_START_ERR 801
#define DELOG_INV_START_DEF "Usage error: invalid delog start time"

#define DELOG_DUP_END_ERR 802
#define DELOG_DUP_END_DEF "Usage error: duplicate delog end time"
#define DELOG_DUP_LS_ERR 803
#define DELOG_DUP_LS_DEF "Usage error: duplicate LS server name"
#define DELOG_DUP_KTAB_ERR 804
#define DELOG_DUP_KTAB_DEF "Usage error: duplicate keytab pathname"
#define DELOG_DUP_PRINC_ERR 805
#define DELOG_DUP_PRINC_DEF "Usage error: duplicate log principal name"
#define DELOG_INV_END_ERR 806
#define DELOG_INV_END_DEF "Usage error: invalid delog end time"

#define DELOG_INV_TYPE_ERR 807
#define DELOG_INV_TYPE_DEF "Usage error: invalid delog record type"
#define DELOG_INV_OPT_ERR 808
#define DELOG_INV_OPT_DEF "Usage error: invalid delog option"




#define DELOG_SETLOGIN_ERR 809
#define DELOG_SETLOGIN_DEF "Set login context failed"
#define DELOG_OPEN_ERR 810
#define DELOG_OPEN_DEF "Open of delog output file open failed"
#define DELOG_MALLOC_ERR 811
#define DELOG_MALLOC_DEF "Allocation of delog buffer failed"
#define DELOG_INV_HDR_ERR -3100
#define DELOG_INV_HDR_ENO 812
#define DELOG_INV_HDR_DEF "Invalid log file header detected"
#define DELOG_WRITE_ERR 813
#define DELOG_WRITE_DEF "Write to delog output file failed"
#define DELOG_COMPLETE_NUM 814
#define DELOG_COMPLETE_DEF "Delog complete - number of output records = %d"
#define DELOG_CLOSE_ERR 815
#define DELOG_CLOSE_DEF "Close of delog output file open failed"
#define DELOG_FILE_NAME_ERR 816
#define DELOG_FILE_NAME_DEF "Delog output file name may not be logfile01 or logfile02"





#endif /* !cs_logerr_h */

<略>



#define OBJ_CLASS_NUM 44
#define OBJ_CLASS_DEF ", Object Class="
#define REQID_NUM 45
#define REQID_DEF ", Request Id="

<略>
#define MT_WORMOPTICAL_DEFAULT_NUM 116
<略>


#define FILEADDR_NUM 209
#define FILEADDR_DEF "%s FILE:"
#define SSEGADDR_NUM 210
#define SSEGADDR_DEF "%s SSEG:"
#define VVOLADDR_NUM 211
#define VVOLADDR_DEF "%s VVOL:"
#define PVOLADDR_NUM 212
#define PVOLADDR_DEF "%s PVOL:"
#define DEVICEADDR_NUM 213
#define DEVICEADDR_DEF "%s DEVICE:"
#define STRIPEADDR_NUM 214
#define STRIPEADDR_DEF "%s STRIPE:"
#define MEMORYADDR_NUM 215
#define MEMORYADDR_DEF "%s MEMORY:"
#define CLIENTFILEADDR_NUM 216
#define CLIENTFILEADDR_DEF "%s CLIENTFILE:"
#define SHMADDR_NUM 217
#define SHMADDR_DEF "%s SHM:"
#define SOCKXFERIDEQ_NUM 218
#define SOCKXFERIDEQ_DEF "%s Transfer ID = 0x%08x.0x%08x\n"

#define ADDREQ_NUM 219
#define ADDREQ_DEF "%s Addr = 0x%08x\n"
#define PORTEQ_NUM 220
#define PORTEQ_DEF "%s Port = %d\n"
#define FAMILYEQ_NUM 221
#define FAMILYEQ_DEF "%s Family = %d\n"
#define IPIXFERIDEQ_NUM 222
#define IPIXFERIDEQ_DEF "%s Transfer ID = 0x%08x\n"
#define INTERFACEEQ_NUM 223
#define INTERFACEEQ_DEF "%s Interface = %hd\n"
#define NAMEEQ_NUM 224
#define NAMEEQ_DEF "%s Name = %s\n"




#define VBSEQ_NUM 225
#define VBSEQ_DEF "%s Vbs = %d\n"
#define VNEQ_NUM 226
#define VNEQ_DEF "%s Vn = %d\n"
#define HBSEQ_NUM 227
#define HBSEQ_DEF "%s Hbs = %d\n"
#define HNEQ_NUM 228
#define HNEQ_DEF "%s Hn = %d\n"
#define SUBFILEEQ_NUM 229
#define SUBFILEEQ_DEF "%s Subfile = %d\n"
#define CHKPTFLAGEQ_NUM 230
#define CHKPTFLAGEQ_DEF "%s Checkpoint flag = "
#define CHKPT_CHECKPOINT_NUM 231
#define CHKPT_CHECKPOINT_DEF "CHECKPOINT\n"


#define HANDLE_NUM 232
#define HANDLE_DEF "%s HANDLE:"
#define OBJECTPTREQ_NUM 233
#define OBJECTPTREQ_DEF "%s Object ptr = 0x%08x\n"
#define OBJECTIDEQ_NUM 234
#define OBJECTIDEQ_DEF "%s Object ID = %s\n"
#define OBJECTTYPEEQ_NUM 235
#define OBJECTTYPEEQ_DEF "%s Object type = %d\n"
#define CONNTYPEEQ_NUM 236
#define CONNTYPEEQ_DEF "%s Connection type = %d\n"
#define CLIENTPTREQ_NUM 237
#define CLIENTPTREQ_DEF "%s Client ptr = 0x%08x\n"
#define SOID_NUM 238
#define SOID_DEF "%s SOID:"
#define SERVERDEP1EQ_NUM 239
#define SERVERDEP1EQ_DEF "%s Server dep1 = 0x%08x\n"
#define SERVERDEP2EQ_NUM 240
#define SERVERDEP2EQ_DEF "%s Server dep2 = 0x%04x\n"
#define SERVERDEP3EQ_NUM 241
#define SERVERDEP3EQ_DEF "%s Server dep3 = 0x%04x\n"
#define SERVERDEP4EQ_NUM 242
#define SERVERDEP4EQ_DEF "%s Server dep4 = 0x%02x\n"
#define SERVERDEP5EQ_NUM 243
#define SERVERDEP5EQ_DEF "%s Server dep5 = 0x%02x\n"
#define SECURITYLEVELEQ_NUM 244
#define SECURITYLEVELEQ_DEF "%s Security level = 0x%04x\n"

#define RESERVED3EQ_NUM 245
#define RESERVED3EQ_DEF "%s Reserved = 0x%04x\n"
#define SUBTYPEEQ_NUM 246
#define SUBTYPEEQ_DEF "%s Subtype = "
#define NOSUBTYPE_NUM 247
#define NOSUBTYPE_DEF "NONE\n"
#define DISKSUBTYPE_NUM 248
#define DISKSUBTYPE_DEF "DISK\n"
#define TAPESUBTYPE_NUM 249
#define TAPESUBTYPE_DEF "TAPE\n"

<略>


#define IOR_NUM 268
#define IOR_DEF ""
#define REQUESTIDEQ_NUM 269
#define REQUESTIDEQ_DEF "%s Request ID = %d\n"
#define IOR_NOT_PROCESSED_NUM 270
#define IOR_NOT_PROCESSED_DEF "NOT_PROCESSED "
#define IOR_COMPLETE_NUM 271
#define IOR_COMPLETE_DEF "COMPLETE "
#define IOR_ERROR_NUM 272
#define IOR_ERROR_DEF "ERROR "
#define POSITIONVALID_NUM 273
#define POSITIONVALID_DEF "POSITION_VALID "
#define ENDPOSITION_NUM 274
#define ENDPOSITION_DEF "END_POSITION "
#define IOR_GAPINFO_VALID_NUM 275
#define IOR_GAPINFO_VALID_DEF "GAPINFO_VALID "
#define IOR_FOREIGN_LABEL_NUM 276
#define IOR_FOREIGN_LABEL_DEF "FOREIGN_LABEL "
#define IOR_NO_LABEL_NUM 277
#define IOR_NO_LABEL_DEF "NO_LABEL "
#define IOR_NON_ANSI_LABEL_NUM 278
#define IOR_NON_ANSI_LABEL_DEF "NON_ANSI_LABEL "
#define STATUSEQ_NUM 279
#define STATUSEQ_DEF "\n%s Status = %d\n"
#define REQSPECREPLYEQ_NUM 280
#define REQSPECREPLYEQ_DEF "%s ReqSpecReply = 0x%08x\n"

#define REQSPECREPLY_NUM 281
#define REQSPECREPLY_DEF "\tREQSPEC_REPLY:"
#define SRCREPLYLENEQ_NUM 282
#define SRCREPLYLENEQ_DEF "%s SrcReplyLength = %d\n"

#define SINKREPLYLENEQ_NUM 283
#define SINKREPLYLENEQ_DEF "%s SinkReplyLength = %d\n"

#define SRCREPLYLISTEQ_NUM 284
#define SRCREPLYLISTEQ_DEF "%s SrcReplyList = 0x%08x\n"

#define SINKREPLYLISTEQ_NUM 285
#define SINKREPLYLISTEQ_DEF "%s SinkReplyList = 0x%08x\n"

#define COUNTPROCEQ_NUM 286
#define COUNTPROCEQ_DEF "%s Count processed = %d\n"
#define REQLISTLENEQ_NUM 287
#define REQLISTLENEQ_DEF "%s ReqListLen = %d\n"
#define REQREPLYTYPEEQ_NUM 288
#define REQREPLYTYPEEQ_DEF "%s Reply type = "
#define REPLY_NONE_NUM 289
#define REPLY_NONE_DEF "NONE\n"
#define REPLY_LISTENLIST_NUM 290
#define REPLY_LISTENLIST_DEF "LISTEN_LIST\n"
#define LISTENLISTEQ_NUM 291
#define LISTENLISTEQ_DEF "%s ListenList = 0x%08x\n"
#define REPLY_DEVICEATTR_NUM 292
#define REPLY_DEVICEATTR_DEF "DEVICE_ATTR\n"
#define REPLY_VOLUMEID_NUM 293
#define REPLY_VOLUMEID_DEF "VOLUMEID\n"
#define REPLY_GAPINFO_NUM 294
#define REPLY_GAPINFO_DEF "GAP_INFO\n"
#define SRCSINK_NUM 295
#define SRCSINK_DEF "\t\tSRCSINK:"
#define GAP_NUM 296
#define GAP_DEF "\tGAP:"
#define BYTESMOVEDEQ_NUM 297
#define BYTESMOVEDEQ_DEF "%s Bytes moved = %s\n"
#define OPEQ_NUM 298
#define OPEQ_DEF "%s Operation = "
#define IMPORT_NUM 299
#define IMPORT_DEF "IMPORT\n"
#define EXPORT_NUM 300
#define EXPORT_DEF "EXPORT\n"
#define EFLAGSEQ_NUM 301
#define EFLAGSEQ_DEF "%s HPSS mode = %o\n"
#define EPERMSEQ_NUM 302
#define EPERMSEQ_DEF "%s HPSS permissions = %o\n"




#define LISTSIZEEQ_NUM 303
#define LISTSIZEEQ_DEF "%s List size = %d\n"
#define EFSEQ_NUM 304
#define EFSEQ_DEF "%s EFS = %s\n"
#define ENAMEEQ_NUM 305
#define ENAMEEQ_DEF "%s HPSS name = %s\n"
#define PFILEEQ_NUM 306
#define PFILEEQ_DEF "%s pfile name = %s\n"
#define HINTSEQ_NUM 307
#define HINTSEQ_DEF "%s Hints = %s\n"
#define LIST_NUM 308
#define LIST_DEF "\tLIST:"
#define SRCOFFSETEQ_NUM 309
#define SRCOFFSETEQ_DEF "%s Src offset = %s\n"
#define DESTOFFSETEQ_NUM 310
#define DESTOFFSETEQ_DEF "%s Dest offset = %s\n"
#define REQUESTEDLENEQ_NUM 311
#define REQUESTEDLENEQ_DEF "%s Requested len = %s\n"
#define INVALID_NUM 312
#define INVALID_DEF "INVALID"
#define IOR_NON_BLOCK_OFFSET_NUM 313
#define IOR_NON_BLOCK_OFFSET_DEF "NON_BLOCK_OFFSET "
#define MT_TAPE_REDW_NUM 314
#define MT_TAPE_REDW_DEF "REDWOOD\n"
#define MT_TAPE_TMBRLN_NUM 315
#define MT_TAPE_TMBRLN_DEF "TIMBERLINE\n"
#define MT_TAPE_9840_NUM 316
#define MT_TAPE_9840_DEF "STK 9840\n"
#define MT_SUB_3590_E_DOUBLELEN_NUM 317
#define MT_SUB_3590_E_DOUBLELEN_DEF "3590E DOUBLE\n"
#define MT_SUB_DST_312_NUM 318
#define MT_SUB_DST_312_DEF "DST-312\n"
#define MT_SUB_DST_314_NUM 319
#define MT_SUB_DST_314_DEF "DST-314\n"
#define IOR_DEVICE_DISABLED_NUM 320
#define IOR_DEVICE_DISABLED_DEF "DEVICE_DISABLED\n"
#define LAST_SEG_WRITE_NUM 321
#define LAST_SEG_WRITE_DEF "LAST_SEG_WRITE "

#define LFTADDR_NUM 322
#define LFTADDR_DEF "%s LFT:"
#define LFTFLAGSEQ_NUM 323
#define LFTFLAGSEQ_DEF "%s LFT flags = 0x%x\n"
#define LFTUIDEQ_NUM 324
#define LFTUIDEQ_DEF "%s UID = %d\n"
#define LFTGIDEQ_NUM 325
#define LFTGIDEQ_DEF "%s GID = %d\n"
#define LFTREALMIDEQ_NUM 326
#define LFTREALMIDEQ_DEF "%s Realm Id = %d\n"
#define LFTNAMEEQ_NUM 327
#define LFTNAMEEQ_DEF "%s LFT name = %s\n"
#define MT_TAPE_9940_NUM 328
#define MT_TAPE_9940_DEF "STK 9940\n"
#define MT_TAPE_3580_NUM 329
#define MT_TAPE_3580_DEF "IBM 3580 LTO\n"
#define MT_TAPE_GY8240_NUM 330
#define MT_TAPE_GY8240_DEF "Sony GY-8240\n"
#define REQ_JOBID_NUM 331
#define REQ_JOBID_DEF "REQUEST_JOBID\n"
#define MT_SUB_9940_A_NUM 332
#define MT_SUB_9940_A_DEF "9940A(60GB)\n"
#define MT_SUB_9940_B_NUM 333
#define MT_SUB_9940_B_DEF "9940B(200GB)\n"
#define DEVICE_READLASTOP_NUM 334
#define DEVICE_READLASTOP_DEF "READLASTOP "
#define DEVICE_BLKID_SUPP_NUM 335
#define DEVICE_BLKID_SUPP_DEF "BLKID_SUPP "
#define DEVICE_SCSI2_LBA_NUM 336
#define DEVICE_SCSI2_LBA_DEF "SCSI2_LBA "
#define MT_SUB_3590_H_SINGLELEN_NUM 337
#define MT_SUB_3590_H_SINGLELEN_DEF "3590H SINGLE\n"
#define MT_SUB_3590_H_DOUBLELEN_NUM 338
#define MT_SUB_3590_H_DOUBLELEN_DEF "3590H DOUBLE\n"

#define MT_SUB_3580_GEN1_NUM 339
#define MT_SUB_3580_GEN1_DEF "IBM 3580 LTO Gen1\n"

#define MT_SUB_3580_GEN2_NUM 340
#define MT_SUB_3580_GEN2_DEF "IBM 3580 LTO Gen2\n"
#define MT_TAPE_3592_NUM 341
#define MT_TAPE_3592_DEF "IBM 3592\n"
#define PDATA_PUSH_NUM 342
#define PDATA_PUSH_DEF "HPSS_PDATA_PUSH "
#define IOR_STRIPE_ERROR_NUM 343
#define IOR_STRIPE_ERROR_DEF "IOR_STRIPE_ERROR "
#define EOM_ON_CONTROL_NUM 344
#define EOM_ON_CONTROL_DEF "EOM_ON_CONTROL "
#define SHARED_DEV_INFO_NUM 345
#define SHARED_DEV_INFO_DEF "%s Shared Device Info = 0x%x\n"
#define XFEROPT_SAN3P_NUM 346
#define XFEROPT_SAN3P_DEF "XFER_OPT_SAN3P "
#define DEVICE_SAN3P_SUPP_NUM 347
#define DEVICE_SAN3P_SUPP_DEF "SAN3P_SUPP "
#define COND_CTRL_ADDR_NUM 348
#define COND_CTRL_ADDR_DEF "COND_CTRL_ADDR "
#define SAN3PADDR_NUM 349
#define SAN3PADDR_DEF "%s SAN3P:"
#define SAN3PTRANSFERID_NUM 350
#define SAN3PTRANSFERID_DEF "%s Transfer ID = %d"
#define SAN3PSECTKN_NUM 351
#define SAN3PSECTKN_DEF "%s SecurityToken = %x\n"
#define DONT_BREAK_IO_NUM 352
#define DONT_BREAK_IO_DEF "DONT_BREAK_IO"
#define USE_PORT_RANGE_NUM 353
#define USE_PORT_RANGE_DEF "USE_PORT_RANGE"

<略>



#define LOG_DEF_POLICY_NUM 7
#define LOG_DEF_POLICY_DEF "default policy"

<略>
#define LOG_NO_POLICY_DEF "Logging policy not found - logging enabled for ALARM and EVENT only"

<略>










#define LOGC_REINIT_REQ_NUM 100
#define LOGC_REINIT_REQ_DEF "Log Client reinitialization request received"




#define LOG_INV_SETATTR_ERR 101
#define LOG_INV_SETATTR_ENO -2824
#define LOG_INV_SETATTR_DEF "Attribute specified is not settable"




<略>










<略>





#define LOG_AUTHZ_INIT_ERR 160
#define LOG_AUTHZ_INIT_DEF "Initialization of authorization vector failed"

#define LOG_MM_TRANHANDLE_ERR 161
#define LOG_MM_TRANHANDLE_DEF "Error getting database transaction handle: %s"
#define LOG_MM_NO_SERVER_ERR 162
#define LOG_MM_NO_SERVER_DEF "General configuration file not found for server %s"
#define LOG_EMDATA_SERVER_ERR 163
#define LOG_EMDATA_SERVER_DEF "Error reading specific configuration file for server %s: %s"
#define LOG_MM_NO_SPECSRV_ERR 164
#define LOG_MM_NO_SPECSRV_DEF "Specific configuration file not found for server %s"

#define LOG_EMDATA_SPECSRV_ERR 165
#define LOG_EMDATA_SPECSRV_DEF "Error reading general configuration file for server %s: %s"
#define LOGC_NO_GLOBAL_ERR 166
#define LOGC_NO_GLOBAL_DEF "Global configuration file not found"
#define LOGC_EMDATA_GLOB_ERR 167
#define LOGC_EMDATA_GLOB_DEF "Error reading Global Configuration file: %s"
#define LOG_MM_SELECT_ERR 168
#define LOG_MM_SELECT_DEF "Database select failed: %s"
#define LOGC_NOSTDOUT_ERR 169
#define LOGC_NOSTDOUT_DEF "Log Client options PRT_LOG/PRT_STDOUT are mutually exclusive - STDOUT disabled"














#define LOGC_NO_POLREC_ERR 180
#define LOGC_NO_POLREC_DEF "Log Policy configuration record not found"
#define LOGC_EMDATA_POLREC_ERR 181
#define LOGC_EMDATA_POLREC_DEF "Error reading Log Policy configuration file: %s"




<略>




























<略>







<略>









#define LOG_RECON_SSM_ERR 260
#define LOG_RECON_SSM_DEF "Creation of SSM binding handle thread failed"
#define LOG_MUTEX_UNLOCK_ERR 261
#define LOG_MUTEX_UNLOCK_DEF "Unlock of mutex failed"
#define LOG_JOIN_SSM_ERR 262
#define LOG_JOIN_SSM_DEF "Join of SSM binding handle thread failed"
#define LOG_STATUS_SSM_ERR 263
#define LOG_STATUS_SSM_DEF "Status check of SSM connection failed"

#define LOGC_SYSLOG_WRT_ERR 270
#define LOGC_SYSLOG_WRT_DEF "Write to syslog failed"
#define LOGC_PRT_WRT_ERR 271
#define LOGC_PRT_WRT_DEF "Write to local log file failed"

#define LOGC_SOCK_BIND_ERR 280
#define LOGC_SOCK_BIND_DEF "Socket bind failed"

<略>

















#define LOGD_GET_ATTRS_ERR 440
#define LOGD_GET_ATTRS_ENO -2852
#define LOGD_GET_ATTRS_DEF "Invalid log file name specified in get attributes request"







#define LOGD_SET_ATTRS_ERR 450







<略>


#define LOGD_SOCK_BIND_ERR 493
#define LOGD_SOCK_BIND_DEF "Socket bind failed - Log Daemon may already be executing"




























<略>



<略>
#define DELOG_AUTH_NAME_OPT_NUM 715
#define DELOG_AUTH_NAME_OPT_DEF "-k"
#define DELOG_AUTH_MECH_OPT_NUM 716
#define DELOG_AUTH_MECH_OPT_DEF "-m"
#define DELOG_PRINC_OPT_NUM 717
#define DELOG_PRINC_OPT_DEF "-p"
#define DELOG_ALARM_NUM 718
#define DELOG_ALARM_DEF "alarm"
#define DELOG_EVENT_NUM 719
#define DELOG_EVENT_DEF "event"
#define DELOG_REQUEST_NUM 720
#define DELOG_REQUEST_DEF "request"
#define DELOG_SECURITY_NUM 721
#define DELOG_SECURITY_DEF "security"
#define DELOG_ACCOUNTING_NUM 722
#define DELOG_ACCOUNTING_DEF "accounting"
#define DELOG_DEBUG_NUM 723
#define DELOG_DEBUG_DEF "debug"
#define DELOG_TRACE_NUM 724
#define DELOG_TRACE_DEF "trace"
#define DELOG_STATUS_NUM 725
#define DELOG_STATUS_DEF "status"
#define DELOG_DUP_START_ERR 800
#define DELOG_DUP_START_DEF "Usage error: duplicate delog start time"

#define DELOG_INV_START_ERR 801
#define DELOG_INV_START_DEF "Usage error: invalid delog start time\nformat = YYYY:MM:DD:HH:MM:SS (YYYY: defaults to current year)"
#define DELOG_DUP_END_ERR 802
#define DELOG_DUP_END_DEF "Usage error: duplicate delog end time"

#define DELOG_DUP_AUTH_NAME_ERR 804
#define DELOG_DUP_AUTH_NAME_DEF "Usage error: duplicate authenticator"
#define DELOG_DUP_AUTH_MECH_ERR 805
#define DELOG_DUP_AUTH_MECH_DEF "Usage error: duplicate authentication mechanism"
#define DELOG_DUP_PRINC_ERR 806
#define DELOG_DUP_PRINC_DEF "Usage error: duplicate log principal name"

#define DELOG_INV_END_ERR 807
#define DELOG_INV_END_DEF "Usage error: invalid delog end time\nformat = YYYY:MM:DD:HH:MM:SS (YYYY: defaults to current year)"
#define DELOG_INV_TYPE_ERR 808
#define DELOG_INV_TYPE_DEF "Usage error: invalid delog record type"

#define DELOG_INV_OPT_ERR 809
#define DELOG_INV_OPT_DEF "Usage error: invalid delog option"
#define DELOG_AUTHMECH_ERR 810
#define DELOG_AUTHMECH_DEF "Invalid authentication mechanism"
#define DELOG_AUTHNAME_ERR 811
#define DELOG_AUTHNAME_DEF "Unable to parse authenticator name and type"
#define DELOG_SETLOGIN_ERR 812
#define DELOG_SETLOGIN_DEF "Set login creds failed"
#define DELOG_OPEN_ERR 813
#define DELOG_OPEN_DEF "Open of delog output file failed"

#define DELOG_MALLOC_ERR 814
#define DELOG_MALLOC_DEF "Allocation of delog buffer failed"

#define DELOG_INV_HDR_ERR -3100
#define DELOG_INV_HDR_ENO 815
#define DELOG_INV_HDR_DEF "Invalid log file header detected"

#define DELOG_WRITE_ERR 816
#define DELOG_WRITE_DEF "Write to delog output file failed"

#define DELOG_COMPLETE_NUM 817
#define DELOG_COMPLETE_DEF "Delog complete - number of output records = %d"
#define DELOG_CLOSE_ERR 818
#define DELOG_CLOSE_DEF "Close of delog output file open failed"

#define DELOG_FILE_NAME_ERR 819
#define DELOG_FILE_NAME_DEF "Delog output file name may not be logfile01 or logfile02"
#define DELOG_USAGE_ERR 820
#define DELOG_USAGE_DEF "Usage: hpss_delog Logfile Delogfile [-sStart time] [-eEnd Time]\n\t[-dDescriptive Name]\n\t-t\n\t[-uUser] [-pPrincipal] [-kKeytab File]\n"

#endif /* !cs_logerr_h */


cs_LogFileAttr.h

HPSS4.5

HPSS6.2

#ifndef cs_LogFileAttr_v0_0_included
#define cs_LogFileAttr_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif
#ifndef hpss_idl_types_v0_0_included
#include <hpss_idl_types.h>
#endif
#ifndef hpss_limits_v0_0_included
#include <hpss_limits.h>
#endif
#define LOG_REGISTER_BITMAP_BIT (0)
#define VERSION_BIT (1)
#define CURRENT_LOG_SIZE_BIT (2)
#define CURRENT_RECORDS_BIT (3)
#define LOG_STATE_BIT (4)
#define LOG_INTERVAL_START_TIME_BIT (5)
#define LOG_INTERVAL_STOP_TIME_BIT (6)

typedef struct {
u_signed64 RegisterBitmap;
unsigned32 Version;
unsigned32 CurrentLogSize;
unsigned32 LogState;
timestamp_t LogIntervalStartTime;
timestamp_t LogIntervalStopTime;
idl_char LogFileName[256];
} LogFileAttr_t;




#ifdef __cplusplus
}

#endif



#endif

#ifndef _CS_LOGFILEATTR_H_RPCGEN
#define _CS_LOGFILEATTR_H_RPCGEN
#include <rpc/rpc.h>
#ifndef _cs_LogFileAttr_h
#define _cs_LogFileAttr_h










#include "hpss_types.h"


#include "hpss_limits.h"

#define LOG_REGISTER_BITMAP_BIT 0
#define VERSION_BIT 1
#define CURRENT_LOG_SIZE_BIT 2
#define CURRENT_RECORDS_BIT 3
#define LOG_STATE_BIT 4
#define LOG_INTERVAL_START_TIME_BIT 5
#define LOG_INTERVAL_STOP_TIME_BIT 6

struct cs_LogFileAttr {
u_signed64 RegisterBitmap;
unsigned32 Version;
unsigned32 CurrentLogSize;
unsigned32 LogState;
timestamp_t LogIntervalStartTime;
timestamp_t LogIntervalStopTime;
char LogFileName[HPSS_MAX_FILE_NAME];
};
typedef struct cs_LogFileAttr cs_LogFileAttr;

typedef cs_LogFileAttr LogFileAttr_t;
#endif




extern bool_t xdr_cs_LogFileAttr();
extern bool_t xdr_LogFileAttr_t();


#endif /* !_CS_LOGFILEATTR_H_RPCGEN */


cs_LogMsg.h

HPSS4.5

HPSS6.2

#ifndef cs_LogMsg_v0_0_included
#define cs_LogMsg_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif
#ifndef hpss_idl_types_v0_0_included
#include <hpss_idl_types.h>
#endif
#ifndef hpss_limits_v0_0_included
#include <hpss_limits.h>
#endif
#define CS_MAX_LOG_MSG_LENGTH (20480)
#define CS_LOG_MAX_PROG_NAME (64)
#define CS_LOG_MAX_SS_NAME (8)

typedef struct {
unsigned32 LogRecordType;
unsigned32 LogVersion;
timestamp_t LogRecordLoggingTime;
timestamp_t LogRecordEventTime;
idl_char DescName[32];
idl_char Routine[64];
unsigned32 ClientPID;
idl_char ClientNodeID[64];
idl_char ClientID[16];
unsigned32 RequestID;
unsigned32 ObjectClass;
unsigned32 MsgType;
unsigned32 SeverityLevel;
signed32 ErrorCode;
unsigned32 LogRecordLength;
unsigned32 MsgNum;
idl_char Subsystem[8];
} log_rec_hdr_t;




typedef struct {
log_rec_hdr_t LogRecHdr;
idl_char LogRecBody[20480];
} log_msg_t;




#ifdef __cplusplus
}




#endif
#endif

#ifndef _CS_LOGMSG_H_RPCGEN
#define _CS_LOGMSG_H_RPCGEN


#include <rpc/rpc.h>
#ifndef _cs_LogMsg_h
#define _cs_LogMsg_h









#include "hpss_types.h"


#include "hpss_limits.h"

#define CS_MAX_LOG_MSG_LENGTH 32768
#define CS_LOG_MAX_PROG_NAME 64
#define CS_LOG_MAX_SS_NAME 8

struct log_rec_hdr {
unsigned32 LogRecordType;
unsigned32 LogVersion;
timestamp_t LogRecordLoggingTime;
timestamp_t LogRecordEventTime;
char DescName[HPSS_MAX_DESC_NAME];
char Routine[CS_LOG_MAX_PROG_NAME];
unsigned32 ClientPID;
char ClientNodeID[HPSS_MAX_HOST_NAME];
char ClientID[HPSS_MAX_USER_NAME];
unsigned32 RequestID;
unsigned32 ObjectClass;
unsigned32 MsgType;
unsigned32 SeverityLevel;
signed32 ErrorCode;
unsigned32 LogRecordLength;
unsigned32 MsgNum;
char Subsystem[CS_LOG_MAX_SS_NAME];
};
typedef struct log_rec_hdr log_rec_hdr;

typedef log_rec_hdr log_rec_hdr_t;

struct log_msg {
log_rec_hdr_t LogRecHdr;
byte LogRecBody[CS_MAX_LOG_MSG_LENGTH];
};
typedef struct log_msg log_msg;

typedef log_msg log_msg_t;
#endif


extern bool_t xdr_log_rec_hdr();
extern bool_t xdr_log_rec_hdr_t();
extern bool_t xdr_log_msg();
extern bool_t xdr_log_msg_t();


#endif /* !_CS_LOGMSG_H_RPCGEN */


cs_LogPolicy.h

HPSS4.5

HPSS6.2

#ifndef cs_LogPolicy_v0_0_included
#define cs_LogPolicy_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif


#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif
#ifndef hpss_limits_v0_0_included
#include <hpss_limits.h>
#endif

typedef struct {
idl_char DescName[32];
unsigned32 LogRecordTypeMask;
unsigned32 SSMRecordTypeMask;
} LogPolicy_t;




#ifdef __cplusplus
}


#endif
#endif

#ifndef _CS_LOGPOLICY_H_RPCGEN
#define _CS_LOGPOLICY_H_RPCGEN


#include <rpc/rpc.h>
#ifndef _cs_LogPolicy_h
#define _cs_LogPolicy_h




#include "hpss_types.h"




#include "hpss_limits.h"


struct cs_LogPolicy {
char DescName[HPSS_MAX_DESC_NAME];
unsigned32 LogRecordTypeMask;
unsigned32 SSMRecordTypeMask;
};
typedef struct cs_LogPolicy cs_LogPolicy;
typedef cs_LogPolicy LogPolicy_t;

#endif


extern bool_t xdr_cs_LogPolicy();
extern bool_t xdr_LogPolicy_t();

#endif /* !_CS_LOGPOLICY_H_RPCGEN */


hacl.h

HPSS4.5

HPSS6.2

#ifndef _hacl_h
#define _hacl_h

#ifdef HACL_ASSERTION
#include <assert.h>
#endif

#include "hpss_api.h"

#ifndef ASSERTION
#ifdef HACL_ASSERTION
#define ASSERTION(predicate) assert(predicate)
#else
#define ASSERTION(ignored) ((void) 0)
#endif
#endif

#define HPSS_EHACL_UNAUTH (-10500)

#define HACL_MAX_PERMS 8 /* rwxcid */
#define HACL_MAX_TYPE 24 /* foreign_group_delegate */


#define HACL_MAX_ENTRY_SIZE \
(HACL_MAX_TYPE + 1 + HPSS_MAX_DCE_NAME + 1 + \
HPSS_MAX_PRINCIPAL_NAME + 1 + HACL_MAX_TYPE)

#define HACL_M_USE_MASK_OBJ (0x80000000)
#define HACL_M_REQUIRE_PERMS (0x40000000)
#define HACL_M_USE_LOCAL_CELL_SPEC (0x20000000)
#define HACL_M_ALLOW_UNAUTHENTICATED (0x10000000)

typedef struct hacl_acl_entry {
char EntryType[HACL_MAX_TYPE];
char Perms[HACL_MAX_PERMS];
char EntryName[HPSS_MAX_PRINCIPAL_NAME];
char CellName[HPSS_MAX_DCE_NAME];
} hacl_acl_entry_t;

typedef struct hacl_acl {
int Length;
char DefaultCell[HPSS_MAX_DCE_NAME];

hacl_acl_entry_t ACLEntry[1];
} hacl_acl_t;

#ifdef FUTURE_CHOWN_COMMAND
int hacl_ChownAndCell(char *, uid_t, gid_t, unsigned32);
#endif
int hacl_ConvertACLToHACL(ns_ACLConfArray_t *, hacl_acl_t **);
int hacl_ConvertHACLToACL(hacl_acl_t *, ns_ACLConfArray_t **);
int hacl_ConvertHACLToString(hacl_acl_t *, int, char *, char **);
int hacl_ConvertHACLPermsToPerms(char *, unsigned char *);
int hacl_ConvertHACLTypeToType(char *, unsigned char *);
int hacl_ConvertPermsToHACLPerms(unsigned char, char *);
int hacl_ConvertStringsToHACL(int,char *[], char *, char *, int, hacl_acl_t **);
int hacl_ConvertTypeToHACLType(unsigned char, char *);

int hacl_DeleteHACL(char *, unsigned32, hacl_acl_t *);
int hacl_GetHACL(char *, unsigned32, hacl_acl_t **);
void hacl_SortHACL(hacl_acl_t *);
int hacl_SetHACL(char *, unsigned32, hacl_acl_t *);
int hacl_UpdateHACL(char *, unsigned32, hacl_acl_t *);

#endif /* _hacl_h */

#ifndef _hacl_h
#define _hacl_h





#include "hpss_api.h"









#define HPSS_EHACL_UNAUTH (-10500)

#define HACL_MAX_PERMS 8 /* rwxcid */
#define HACL_MAX_TYPE 24 /* foreign_group_delegate */


#define HACL_MAX_ENTRY_SIZE \
(HACL_MAX_TYPE + 1 + HPSS_MAX_REALM_NAME + 1 + \
HPSS_MAX_PRINCIPAL_NAME + 1 + HACL_MAX_TYPE)

#define HACL_M_USE_MASK_OBJ (0x80000000)
#define HACL_M_REQUIRE_PERMS (0x40000000)
#define HACL_M_USE_LOCAL_REALM_SPEC (0x20000000)
#define HACL_M_ALLOW_UNAUTHENTICATED (0x10000000)

typedef struct hacl_acl_entry {
char EntryType[HACL_MAX_TYPE];
char Perms[HACL_MAX_PERMS];
char EntryName[HPSS_MAX_PRINCIPAL_NAME];
char RealmName[HPSS_MAX_REALM_NAME];
} hacl_acl_entry_t;

typedef struct hacl_acl {
size_t Length;
char DefaultRealm[HPSS_MAX_REALM_NAME];

hacl_acl_entry_t ACLEntry[1];
} hacl_acl_t;




int hacl_ConvertACLToHACL(ns_ACLConfArray_t *, hacl_acl_t **);
int hacl_ConvertHACLToACL(hacl_acl_t *, ns_ACLConfArray_t **);
int hacl_ConvertHACLToString(hacl_acl_t *, int, char *, char **);
int hacl_ConvertHACLPermsToPerms(char *, unsigned char *);
int hacl_ConvertHACLTypeToType(char *, unsigned char *);
int hacl_ConvertPermsToHACLPerms(unsigned char, char *);
int hacl_ConvertStringsToHACL(int,char *[], char *, char *, int, hacl_acl_t **);
int hacl_ConvertTypeToHACLType(unsigned char, char *);

int hacl_DeleteHACL(char *, unsigned32, hacl_acl_t *);
int hacl_GetHACL(char *, unsigned32, hacl_acl_t **);
void hacl_SortHACL(hacl_acl_t *);
int hacl_SetHACL(char *, unsigned32, hacl_acl_t *);
int hacl_UpdateHACL(char *, unsigned32, hacl_acl_t *);

#endif /* _hacl_h */


hpss_api.h

HPSS4.5

HPSS6.2

#ifndef hpss_api_h
#define hpss_api_h

#include <tc/tc.h>
#include <tc/rpc/tc_trpc.h>
#include <trpc/trpc.h>
#include <owner.h>
#include <security.h>
#include <hsec.h>
#include <hpss_api_def.h>
#include <hpss_dirent.h>

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <pthread.h>
#include <sys/socket.h>
#include <sys/select.h>
#if defined(__alpha) && defined(__osf__)
#include <sys/mount.h>
#else
#include <sys/statfs.h>
#endif
#include <sys/statvfs.h>
#include <stdlib.h>
#include <limits.h>
#include <utime.h>
#include <time.h>
#include <netdb.h>
#include <netinet/in.h>
#include <hpss_iod.h>
#include <hpss_cos.h>
#include <hpss_sclass.h>
#include <hpss_errno.h>
#include <hpss_trpc_handles.h>
#include <bfs_interface_def.h>
#include <ss_pvlist.h>
#include <dmapi/dmg/dmg_types.h>
#include <ns_Constants.h>
#include <ns_IFStructs.h>
#include <ns_Attrs.h>
#include <hpss_vattr.h>



















#if defined(IPI3_SUPPORT)
#include <ipi3/ipi3defs.h>
#include <ipi3/ipi3struct.h>
#endif

typedef unsigned32 api_requestId_t;

typedef struct {
ns_ObjHandle_t FilesetHandle;
unsigned char JunctionPathName[HPSS_MAX_PATH_NAME];
ns_ObjHandle_t JunctionHandle;
} hpss_junction_ent_t;

typedef struct api_condition_variable {
pthread_mutex_t Mutex;
pthread_cond_t Cond;
unsigned32 Predicate;
char Name[HPSS_MAX_DESC_NAME];
} api_condition_variable_t;

#define API_AVAILABLE (1) /* condition variable free */
#define API_INUSE (2) /* condition variable in use */

#define HPSS_SET_OFFSET_FORWARD (0)
#define HPSS_SET_OFFSET_BACKWARD (1)

#define HPSS_READ_SEQUENTIAL (0x00000001)

typedef enum {
NO_OPEN_HANDLE = 0, /* Null object */
BFS_OPEN_HANDLE, /* BitFile */
NS_OPEN_HANDLE /* Directory */
} open_type;

typedef union data_addr {
struct sockaddr_in SockAddr;
#if defined(IPI3_SUPPORT)
IPI3_INTERFACE_STRUCT IpiAddr;
#endif
} data_addr_t;

typedef struct desc_elem {
int Desc; /* Open descriptor */
struct desc_elem *Next; /* Next pointer */
} desc_elem_t;

typedef struct {
u_signed64 FilesetID;
unsigned32 FilesetType;
uuid_t DMGuuid;
unsigned32 HandleLength;
byte Handle[MAX_DMEPI_HANDLE_SIZE];
} api_dmap_attrs_t;


typedef struct api_cwd_rec {
char *Path; /* Cwd partial path */
ns_ObjHandle_t Handle; /* file set handle */
struct api_cwd_rec *Next; /* Next cwd record */
struct api_cwd_rec *Prev; /* Previous cwd record */
} api_cwd_rec_t;


typedef struct {
unsigned32 Size; /* Size of cwd stack */
unsigned32
Local; /* If the stack is not shared */
pthread_mutex_t Mutex; /* Cwd stack mutex */
api_cwd_rec_t *Top; /* Top of cwd stack */
api_cwd_rec_t *Bottom; /* Bottom of cwd stack */
} api_cwd_stack_t;

#define API_MAX_CWD_RECORDS (50)

#define API_NULL_CWD_STACK ((api_cwd_stack_t *)0)

typedef struct open_bf_desc {
hpss_object_handle_t bitfile_handle;
uuid_t BFSuuid;
u_signed64 Offset;
int OpenFlag;
pthread_mutex_t Mutex;
pthread_cond_t Cond;
unsigned32 Updates;
api_dmap_attrs_t DMattrs;
unsigned32 FilesetCOS;
int ListenDesc;
int DataDesc;
desc_elem_t *DataConnPtr;
data_addr_t ListenAddr_u;
data_addr_t DataAddr_u;
} open_bf_desc_t;

typedef struct open_hpns_desc {
unsigned32 End;
unsigned32 Offset;
ns_DirEntry_t *NextCacheEntry;
ns_DirEntry_t *CachePtr;
} open_hpns_desc_t;

#define ENTRY_BUSY (0x00000001)
#define ENTRY_STALE (0x00000002)
#define ENTRY_INSERTED (0x00000004)

typedef struct openfiletable {
open_type Type; /* Type of open handle stored */
int Flags; /* State of the handle */
api_requestId_t GlobalRqstId; /* Global request id */
ns_ObjHandle_t ObjectHandle; /* NS object handle */
union {
open_bf_desc_t OpenBF; /* BitFile */
open_hpns_desc_t OpenNS; /* Directory */
} descunion_u;
} openfiletable_t;

#define _HPSS_OPEN_MAX (4096)

typedef struct filetable {
openfiletable_t OpenDesc[_HPSS_OPEN_MAX];
int NumOpenDesc;
int TotalOpens;
int TotalCloses;
pthread_mutex_t Mutex;
} filetable_t;

typedef union api_trpchandle_u {
trpc_master_handle_t MasterTrpcHandle;
trpc_local_handle_t LocalTrpcHandle;
} api_trpchandle_t;

#define API_BFS (1) /* bitfile server */
#define API_DMG (2) /* dmap gateway */
#define API_HDM_SEC (3) /* hpss dmap security server*/
#define API_NS (4) /* name server */
#define API_NS_ROOT (5) /* root name server */
#define API_SERVER_MAX (6) /* upper limit on server types */

#define API_CONNECT_LIFE (5*60)
#define API_RPC_TIMEOUT (3)
#define API_RPC_RETRIES (3)
#define API_CONNECTED (0x01)

#define INCREMENT_INUSE_COUNT(Local) \
{ \
API_LockMutex(&(Local->MasterEntry->InUseCountMutex)); \
Local->MasterEntry->InUseCount++; \
API_UnlockMutex(&(Local->MasterEntry->InUseCountMutex));\
}

#define DECREMENT_INUSE_COUNT(Local) \
{ \
API_LockMutex(&(Local->MasterEntry->InUseCountMutex)); \
Local->MasterEntry->InUseCount--; \
API_UnlockMutex(&(Local->MasterEntry->InUseCountMutex));\
}

typedef struct api_master_net {
uuid_t ServerUUID;
unsigned32 ServerType;
char CDSName[HPSS_MAX_DCE_NAME];
uuid_t HPSSId;
rpc_if_handle_t IfSpec;
trpc_master_handle_t BhMaster;
hpss_connect_handle_t *Ch;
rpc_master_handle_t ChBh;
unsigned32 ChState;
unsigned32 ChVersion;
api_condition_variable_t ChLock;
int Flags;
pthread_mutex_t InUseCountMutex;
int InUseCount;
unsigned32 NumberUsers;
unsigned32 TimesUsed;
timestamp_sec_t TimeLastUsed;
struct api_master_net *Next;
} api_master_net_t;

typedef struct api_local_net {
uuid_t ServerUUID;
trpc_local_handle_t BhLocal;
time_t TimeLastUsed;
unsigned32 TimesUsed;
api_master_net_t *MasterEntry;
struct api_local_net *Next;
} api_local_net_t;

typedef struct api_acct_list {
uuid_t SiteId;
acct_rec_t AccountCode;
char AccountName[HPSS_MAX_ACCOUNT_NAME];
struct api_acct_list *Next;
} api_acct_list_t;

typedef struct apithrdstate {
unsigned32 Status;
pthread_t ThreadID;
hsec_UserCred_t UserCred;
mode_t Umask;
hsec_info_t SecurityInfo;
api_local_net_t *LocalNet;
filetable_t *FileTable; /* Table of open objects */
ns_ObjHandle_t CwdObjectHandle; /* CWD NS object handle */
api_cwd_stack_t *CwdStackPtr; /* CWD path stack */
char RootDir[HPSS_MAX_PATH_NAME];
/* Threads root directory */
api_acct_list_t *AccountList; /* List of sites visited */
int AcctListSize; /* Number of accounts */
struct apithrdstate *Next; /* List pointer */
} apithrdstate_t;

#define API_MAX_ACCT_LIST_SIZE (20)

#define API_STATUS_OK (0)
#define API_STATUS_NEED_INITIALIZE (1)
#define API_STATUS_NEED_HSEC_INIT (2)
#define API_STATUS_NEED_TRPC_INIT (3)
#define API_STATUS_NEED_CONN_INIT (4)
#define API_STATUS_NEED_FTABLE_INIT (5)
#define API_STATUS_NEED_RPC_HANDLES (6)
#define API_STATUS_NEED_TRPC_HANDLES (7)
#define API_STATUS_NEED_CHDIR (8)
#define API_STATUS_UNINITIALIZED (99)

#define API_DATA_THREAD_ACTIVE (0x00000001)
#define API_DATA_IPI3_INPROG (0x00000002)
#define API_DATA_IOR_RECVD (0x00000004)

typedef struct datathreadstate {
int Flags; /* Xfer in progress? */
int ListenDesc; /* Listen socket */
int DataDesc; /* Data descriptor (IPI-3) */
api_requestId_t RequestID; /* Request ID */
u_signed64 XferID; /* Transfer ID */
u_signed64 Offset; /* Relative offset in addr space */
char *Buffer; /* Data pointer. */
int BufSize; /* Size of buffer in bytes */
int BytesMoved; /* Total bytes moved */
int RetVal; /* Return value */
desc_elem_t **SDPtr; /* List of open descriptors */
pthread_mutex_t *MutexPtr; /* Structure protection */
pthread_cond_t *CondPtr; /* Condition variable */
int CondWait; /* Wait variable */
data_addr_t *DataAddrPtr; /* Data (IPI-3) Address */
} datathreadstate_t;

typedef struct iodxferstate {
int Flags; /* Xfer in progress? */
int ListenDesc; /* Listen socket */
int DataDesc; /* Data descriptor */
IOD_t *ClientIODPtr; /* Ptr to client's original IOD */
IOR_t *XferIORPtr; /* Ptr to client's IOR */
int TotalLength; /* Length for mover endpoints */
int BytesMoved; /* Total bytes moved */
desc_elem_t **SDPtr; /* List of open descriptors */
int RetVal; /* Return value */
pthread_mutex_t *MutexPtr; /* Structure protection */
pthread_cond_t *CondPtr; /* Condition variable */
int CondWait; /* Wait variable */
data_addr_t *DataAddrPtr; /* Data (IPI-3) Address */
} iodxferstate_t;

typedef struct api_config {
long Flags;
long DebugValue;
long TransferType;
long NumRetries;
int BusyDelay;
int BusyRetries;
int TotalDelay;
int GKTotalDelay;
int LimitedRetries;
long MaxConnections;
int ReuseDataConnections;
int UsePortRange;
long RetryStageInp;
int DMAPWriteUpdates;


char ServerName[HPSS_MAX_DCE_NAME];
char DescName[HPSS_MAX_DESC_NAME];
char PrincipalName[HPSS_MAX_PRINCIPAL_NAME];
char KeytabPath[HPSS_MAX_PATH_NAME];
char DebugPath[HPSS_MAX_PATH_NAME];
char HostName[HPSS_MAX_HOST_NAME];
char RegistrySiteName[HPSS_MAX_DCE_NAME];
} api_config_t;

#define API_INIT_HSEC (0x00000001) /* do hsec initialization */
#define API_INIT_TRPC (0x00000002) /* do TRPC initialization */
#define API_INIT_CONN (0x00000004) /* do connection init */
#define API_ENABLE_LOGGING (0x00000008) /* do HPSS logging */

#define API_USE_ENV (0x00000020) /* config parms set by client */
#define API_DISABLE_CROSS_CELL (0x00000040) /* prevent cross-cell communic */
#define API_DISABLE_JUNCTIONS (0x00000080) /* prevent junction traversals */


#define API_CONFIG_DEFAULT (0x00000027) /* default config flags */
#define API_CONFIG_ALL_FLAGS (0x000000EF) /* all valid flags */


typedef enum {
PURGE_UNLOCK = 0, /* Purge unlock the file */
PURGE_LOCK /* Purge lock the file */
} purgelock_flag_t;

#define HPSS_MIGRATE_HPSS_ONLY (0x1)
#define HPSS_MIGRATE_FORCE (BFS_MIGRATE_FORCE)
#define HPSS_MIGRATE_PURGE_DATA (BFS_MIGRATE_PURGE_DATA)
#define HPSS_MIGRATE_NO_COPY (BFS_MIGRATE_CLIENT_CALL_OP)
#define API_TRANSFER_TCP 0


#define API_TRANSFER_IPI3 1


















typedef struct {
struct file_info {
hpss_object_handle_t bitfile_handle; /* bitfile handle */
uuid_t BFSuuid; /* bitfile server UUID */
u_signed64 Offset; /* file offset */
int OpenFlag; /* open flags */
unsigned32 FilesetCOS; /* COS of the fileset */
api_dmap_attrs_t DMattrs; /* DMAP attributes */
} Info; /* distribute file information */
uchar CkSum; /* check sum digest */
} api_dist_file_info_t;

#define HPSS_MAX_FS_NAME NS_FS_MAX_FS_NAME_LENGTH

typedef struct
{
u_signed64 FilesetId;
unsigned char FilesetName[HPSS_MAX_FS_NAME];
uuid_t GatewayUUID;
uuid_t NameServerUUID;
} hpss_global_fsent_t;

typedef enum {
NAMESPEC_SKIP, /* Place holder. No translation needed. */
NAMESPEC_CELL, /* Translate cell name only */
NAMESPEC_USER, /* Translate user name and cell name */
NAMESPEC_GROUP /* Translate group name and cell name */
} namespec_type_t;

typedef enum {
ACL_CACHE_USER, /* Use the user name cache */
ACL_CACHE_GROUP /* Use the group name cache */
} acl_cache_type_t;

typedef struct acl_cache_entry {
time_t Time;
int Id;
int CellId;
char Name[HPSS_MAX_DCE_NAME];
char CellName[HPSS_MAX_DCE_NAME];
struct acl_cache_entry *Next;
struct acl_cache_entry *Prev;
} acl_cache_entry_t;

typedef struct api_namespec {
namespec_type_t Type;
int Id;
int CellId;

char Name[HPSS_MAX_DCE_NAME];
char CellName[HPSS_MAX_DCE_NAME];
} api_namespec_t;

























































int
hpss_AcctCodeToName(
acct_rec_t AcctCode, /* IN - account code */
uuid_t *Site, /* IN - site location */
char *AcctName); /* OUT - account name */

int
hpss_AcctNameToCode(
char *AcctName, /* IN - account name */
uuid_t *Site, /* IN - site location */
acct_rec_t *AcctCode); /* OUT - account code */

int
hpss_Access(
char *Path, /* IN - path of file to check access rights */
int Amode); /* IN - Type of access to be checked */

int
hpss_AccessHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path of file to check access rights */
int Amode, /* IN - Type of access to be checked */
hsec_UserCred_t *Ucred, /* IN - user credentials */
gss_token_t *AuthzTicket); /* OUT - authorization ticket */






int
hpss_ClientAPIInit(
apithrdstate_t **ThreadContext);/* [OUT] Thread specific state */

<略>

int
hpss_ConvertIdsToNames(
int NumEntries, /* IN - number of specs to convert */
api_namespec_t *Specs); /* IN/OUT - specs to convert */

int
hpss_ConvertNamesToIds(
int NumEntries, /* IN - number of specs to convert */
api_namespec_t *Specs); /* IN/OUT - specs to convert */

int
hpss_CopyFile(
int SrcFildes, /* IN - ID of src object */
int DestFildes); /* IN - ID of dest object */

int
hpss_DeleteACL(
char *Path, /* IN - path of file */
unsigned32 Options, /* IN - bitmask of ACL options */
ns_ACLConfArray_t *ACL); /* IN - ACL array to be removed */

int
hpss_DeleteACLHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path of file */
hsec_UserCred_t *Ucred, /* IN - user credentials */
unsigned32 Options, /* IN - bitmask of ACL options */
ns_ACLConfArray_t *ACL); /* IN - ACL array to be removed */

long
hpss_DumpFT();

long
hpss_DumpNet();






int
hpss_Fclear(
int Fildes, /* IN - ID of open object */
u_signed64 Length); /* IN - Hole length */

int
hpss_FclearOffset(
int Fildes, /* IN - ID of open object */
u_signed64 Offset, /* IN - Offset at which to begin clear */
u_signed64 Length); /* IN - Hole length */












































int
hpss_FileGetAttributes(
char *Path, /* IN - path to the object */
hpss_fileattr_t *AttrOut); /* OUT - attributes of entry */

int
hpss_FileGetAttributesHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path to the object */
hsec_UserCred_t *Ucred, /* IN - user credentials */
gss_token_t *AuthzTicket, /* OUT - authorization ticket */
hpss_fileattr_t *AttrOut); /* OUT - attributes after query */

int
hpss_FileGetAttributesSOID(
hpssoid_t *BitfileID, /* IN - bitfile id */
char *Path, /* OUT - one path to the object */
hpss_fileattr_t *AttrOut); /* OUT - attributes after query */

int
hpss_FileGetXAttributes(
char *Path, /* IN - path to the object */
unsigned32 Flags, /* IN - flags for storage attrs */
unsigned32 StorageLevel, /* IN - level to query */
hpss_xfileattr_t *AttrOut); /* OUT - attributes after query */

int
hpss_FileSetAttributes(
char *Path, /* IN - path to the object */
u_signed64 NSSelFlags, /* IN - NS attributes fields to set */
u_signed64 BFSSelFlags, /* IN - BFS attributes fields to set */
hpss_fileattr_t *AttrIn, /* IN - input attributes */
hpss_fileattr_t *AttrOut); /* OUT - attributes after change */

int
hpss_FileSetAttributesHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path to the object */
hsec_UserCred_t *Ucred, /* IN - user credentials */
u_signed64 NSSelFlags, /* IN - NS attributes fields to set */
u_signed64 BFSSelFlags, /* IN - BFS attributes fields to set */
hpss_fileattr_t *AttrIn, /* IN - input attributes */
hpss_fileattr_t *AttrOut); /* OUT - attributes after change */

int
hpss_FileSetAttributesSOID(
hpssoid_t *BitfileID, /* IN - Bitfile ID */
u_signed64 NSSelFlags, /* IN - NS attribute fields to set */
u_signed64 BFSSelFlags, /* IN - BFS attribute fields to set */
hpss_fileattr_t *AttrIn, /* IN - input attributes */
hpss_fileattr_t *AttrOut, /* OUT - attributes after query */
char *Path); /* OUT - path to the object */

int
hpss_FilesetCreate(
uuid_t *NameServer, /* IN - Name Server UUID */

ns_FilesetAttrBits_t FilesetAttrBits, /* IN - File set attributes to set */
ns_FilesetAttrs_t *FilesetAttrs, /* IN - File set attributes */
ns_AttrBits_t ObjectAttrBits, /* IN - Object attributes to set */
ns_Attrs_t *ObjectAttrs, /* IN - Object attributes */

ns_FilesetAttrBits_t RetFilesetAttrBits, /* IN - File set attributes to return */
ns_AttrBits_t RetObjectAttrBits, /* IN - Object attributes to return */
ns_FilesetAttrs_t *RetFilesetAttrs, /* OUT - Returned file set attributes */
ns_Attrs_t *RetObjectAttrs, /* OUT - Returned object attributes */
ns_ObjHandle_t *FilesetHandle); /* OUT - New file set object handle */

int
hpss_FilesetDelete(
char *Name, /* IN - File set name */
u_signed64 *FilesetId, /* IN - File set ID */
ns_ObjHandle_t *FilesetHandle); /* IN - File set object handle */

int
hpss_FilesetGetAttributes(
char *Name, /* IN - File set name */
u_signed64 *FilesetId, /* IN - File set ID */
ns_ObjHandle_t *FilesetHandle, /* IN - File set object handle */
uuid_t *NameServerUUID, /* IN - Name Server of fileset */
ns_FilesetAttrBits_t FilesetAttrBits, /* IN - File set attribute bits */
ns_FilesetAttrs_t *FilesetAttrs); /* OUT - Returned attributes */

int
hpss_FilesetListAll(
u_signed64 OffsetIn, /* IN - offset to start at */
unsigned32 Entries, /* IN - number of entries to return */
unsigned32 *End, /* OUT - hit end of the list */
u_signed64 *OffsetOut,/* OUT - offset of last entry */
hpss_global_fsent_t *FSentPtr);/* OUT - fileset entry information */

int
hpss_FilesetSetAttributes(
char *Name, /* IN - File set name */
u_signed64 *FilesetId, /* IN - File set ID */
ns_ObjHandle_t *FilesetHandle, /* IN - File set object handle */
ns_FilesetAttrBits_t FilesetAttrBitsIn, /* IN - File set attribute bits */
ns_FilesetAttrs_t *FilesetAttrsIn, /* IN - File set attributes */
ns_FilesetAttrBits_t FilesetAttrBitsOut,/* IN - Returned set attribute bits */
ns_FilesetAttrs_t *FilesetAttrsOut); /* OUT - Returned attribues */

int
hpss_Fpreallocate(
int Fildes, /* IN - ID of open file */
u_signed64 Length); /* IN - new file length */

int
hpss_Fstat(
int Fildes, /* IN - ID of open object */
struct stat *Buf); /* OUT - Returned statistics */

int
hpss_Ftruncate(
int Fildes, /* IN - ID of open file to truncate */
u_signed64 Length); /* IN - new file length */

int
hpss_GetAcct(
acct_rec_t *RetDefAcct, /* OUT - default account code */
acct_rec_t *RetCurAcct); /* OUT - current account code */

int
hpss_GetAcctName(
char *AcctName); /* OUT - current account name */

int
hpss_GetACL(
char *Path, /* IN - path of file */
unsigned32 Options, /* IN - bitmask of ACL options */
ns_ACLConfArray_t **ACL); /* OUT - returned ACL array */

int
hpss_GetACLHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path of file */
hsec_UserCred_t *Ucred, /* IN - user credentials */
unsigned32 Options, /* IN - bitmask of ACL options */
ns_ACLConfArray_t **ACL); /* OUT - returned ACL array */

int
hpss_GetAsynchStatus(
signed32 CallBackId, /* OUT - assigned request id */
hpssoid_t *BitfileID, /* OUT - bitfile ID */
signed32 *Status); /* OUT - status info */

int
hpss_GetAttrHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path of file to get attributes */
hsec_UserCred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *HandleOut, /* OUT - returned object handle */
gss_token_t *AuthzTicket, /* OUT - returned authorization */

hpss_vattr_t *AttrOut); /* OUT - returned attributes */

int
hpss_GetRawAttrHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path of object to get attributes */
hsec_UserCred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *HandleOut, /* OUT - returned object handle */
gss_token_t *AuthzTicket, /* OUT - returned authorization */

hpss_vattr_t *AttrOut); /* OUT - returned attributes */

int
hpss_Getcwd(
char *Buf, /* OUT - current working directory */
size_t Size); /* IN - size of the buffer */

int
hpss_GetDistFile(
int Fildes, /* IN - Open file handle */
api_dist_file_info_t *FileInfo);/* OUT - File table information */

int
hpss_GetListAttrs(
char *Path, /* IN - path of file to get statistics */
ns_Attrs_t *AttrOut); /* OUT - Returned statistics */

int
hpss_InsertDistFile(
api_dist_file_info_t *FileInfo);/* IN - File table information */

unsigned32
hpss_GetObjType(
ns_ObjHandle_t *ObjHandle); /* IN - object handle */

unsigned32
hpss_GetObjId(
ns_ObjHandle_t *ObjHandle); /* IN - object handle */

int
hpss_GetPathHandle(
ns_ObjHandle_t *ObjHandle, /* IN - object handle */
ns_ObjHandle_t *FilesetRootHandle, /* OUT - Fileset root handle */
char *Path); /* OUT - Path to object */

int
hpss_GetJunctions(

unsigned long OffsetIn, /* IN - offset to start at */
unsigned long Entries, /* IN - number of entries to return*/
unsigned long *End, /* OUT - hit end of directory */
unsigned long *OffsetOut,/* OUT - offset of last entry */
hpss_junction_ent_t *JentPtr); /* OUT - junction entry information */

int
hpss_JunctionCreate(
char *Path, /* IN - path of the new junction */
ns_ObjHandle_t *SourceHandle, /* IN - directory or fileset handle */
ns_ObjHandle_t *JunctionHandle); /* OUT - Junction handle */

int
hpss_JunctionCreateHandle(
ns_ObjHandle_t *ParentHandle, /* IN - directory to insert junction */
char *Path, /* IN - entry name of the new junction */
ns_ObjHandle_t *SourceHandle, /* IN - Directory or fileset handle */
hsec_UserCred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *JunctionHandle); /* OUT - Junction handle */

int
hpss_JunctionDelete(
char *Path); /* IN - Path of junction to delete */







int
hpss_Link(
char *Existing, /* IN - Existing name of the object */
char *New); /* IN - New name of the object */

int
hpss_LinkHandle(
ns_ObjHandle_t *ObjHandle, /* IN - Handle of existing file */
ns_ObjHandle_t *DirHandle, /* IN - parent directory handle */
char *New, /* IN - New name of the object */
hsec_UserCred_t *Ucred); /* IN - pointer to user credentials */






hpss_off_t
hpss_Lseek(
int Fildes, /* IN - ID of open object */
hpss_off_t Offset, /* IN - # of bytes to calculate new offset */
int Whence); /* IN - Origin for the seek */

int
hpss_SetAuditInfo(
unsigned int EndUserHostAddr); /* IN - IP address of end user's host */

int
hpss_SetFileOffset(
int Fildes, /* IN - ID of open object */
u_signed64 OffsetIn, /* IN - # of bytes to calculate new offset */
int Whence, /* IN - Origin for the seek */
int Direction, /* IN - OffsetIn is forward or backward */
u_signed64 *OffsetOut); /* OUT - resulting offset */

int
hpss_Lstat(
char *Path, /* IN - path of file/link to get statistics */
struct stat *Buf); /* OUT - Returned statistics */

int
hpss_Migrate(
int Fildes, /* IN - open file handle */
unsigned32 SrcLevel, /* IN - where to migrate data from */
unsigned32 Flags, /* IN - controlling flags */
u_signed64 *RetBytesMigrated); /* OUT - number of bytes migrated */

int
hpss_Mkdir(
char *Path, /* IN - path of directory */
mode_t Mode); /* IN - permission bits of the new directory */

int
hpss_MkdirHandle(
ns_ObjHandle_t *ObjHandle, /* IN - handle of parent directory */
char *Path, /* IN - path of directory */
mode_t Mode, /* IN - perm bits for new directory */
hsec_UserCred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *HandleOut, /* OUT - returned object handle */
hpss_vattr_t *AttrOut); /* OUT - returned VFS attributes */

int
hpss_MkdirDMHandle(
ns_ObjHandle_t *ObjHandle, /* IN - handle of parent directory */
char *Path, /* IN - path of directory */
mode_t Mode, /* IN - perm bits for new directory */
hsec_UserCred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *HandleOut, /* OUT - returned object handle */
hpss_vattr_t *AttrOut); /* OUT - returned VFS attributes */

unsigned32
hpss_NSHandleCompare (
ns_ObjHandle_t *FirstObjHandle, /* IN - first handle to compare */

ns_ObjHandle_t *SecondObjHandle); /* IN - second handle to compare */

int
hpss_Open(
char *Path, /* IN - Path to file to be opened */
int Oflag, /* IN - Type of file access */
mode_t Mode, /* IN - Desired file perms if create */
hpss_cos_hints_t *HintsIn, /* IN - Desired class of service */
hpss_cos_priorities_t *HintsPri, /* IN - priorities of COS fields */
hpss_cos_hints_t *HintsOut); /* OUT - Granted class of service */

int
hpss_OpenBitfile(
hpssoid_t *BitFileID, /* IN - Bitfile to be opened */
int Oflag, /* IN - Type of file access */
hsec_UserCred_t *Ucred, /* IN - User credentials */
gss_token_t *AuthzTicket); /* IN - Client authorization */












int
hpss_Opendir(
char *DirName); /* IN - path of directory */

int
hpss_OpenHandle(
ns_ObjHandle_t *ObjHandle, /* IN - Parent object handle */
char *Path, /* IN - Path to file to be opened */
int Oflag, /* IN - Type of file access */
mode_t Mode, /* IN - Desired file perms if create */
hsec_UserCred_t *Ucred, /* IN - User credentials */
hpss_cos_hints_t *HintsIn, /* IN - Desired class of service */
hpss_cos_priorities_t *HintsPri, /* IN - Priorities of hint struct */
hpss_cos_hints_t *HintsOut, /* OUT - Granted class of service */
hpss_vattr_t *AttrsOut, /* OUT - File attributes */
gss_token_t *AuthzTicket); /* OUT - Client authorization */


int
hpss_Purge(
int Fildes, /* IN - open file handle */
u_signed64 Offset, /* IN - beginning offset */
u_signed64 Length, /* IN - length to be purged */
unsigned32 StorageLevel, /* IN - where to purge data */
unsigned32 Flags, /* IN - controlling flags */
u_signed64 *RetBytesPurged); /* OUT - number of bytes purged */

int
hpss_PurgeLock(
int Fildes, /* IN - ID of open object */
purgelock_flag_t Flag); /* IN - PURGE_LOCK or PURGE_UNLOCK the file*/

ssize_t
hpss_Read(
int Fildes, /* IN - ID of object to be read */
void *Buf, /* IN - Buffer in which to receive data */
size_t Nbyte); /* IN - number of bytes to read */

int
hpss_ReadAttrs(
int Dirdes, /* IN - open directory stream handle */
unsigned32 OffsetIn, /* IN - directory position */
unsigned32 BufferSize, /* IN - size of output buffer */
unsigned32 GetAttributes, /* IN - get object attributes? */
unsigned32 *End, /* OUT - hit end of directory */
unsigned32 *OffsetOut, /* OUT - resulting directory position */
ns_DirEntry_t *DirentPtr); /* OUT - directory entry information */

int
hpss_ReadAttrsHandle(
ns_ObjHandle_t *ObjHandle, /* IN - directory object handle */
unsigned32 OffsetIn, /* IN - directory position */
hsec_UserCred_t *Ucred, /* IN - user credentials */
unsigned32 BufferSize, /* IN - size of output buffer */
unsigned32 GetAttributes, /* IN - get object attributes? */
unsigned32 *End, /* OUT - hit end of directory */
unsigned32 *OffsetOut, /* OUT - resulting directory position */
ns_DirEntry_t *DirentPtr); /* OUT - directory entry information */

int
hpss_ReadRawAttrsHandle(
ns_ObjHandle_t *ObjHandle, /* IN - directory object handle */
unsigned32 OffsetIn, /* IN - directory position */
hsec_UserCred_t *Ucred, /* IN - user credentials */
unsigned32 BufferSize, /* IN - size of output buffer */
unsigned32 GetAttributes, /* IN - get object attributes? */
unsigned32 *End, /* OUT - hit end of directory */
unsigned32 *OffsetOut, /* OUT - resulting directory position */
ns_DirEntry_t *DirentPtr); /* OUT - directory entry information */

int
hpss_Readdir(
int DirDes, /* IN - open directory stream handle */
hpss_dirent_t *DirentPtr); /* OUT - directory entry */

int
hpss_ReaddirHandle(
ns_ObjHandle_t *ObjHandle, /* IN - directory object handle */
unsigned32 OffsetIn, /* IN - directory position */
hsec_UserCred_t *Ucred, /* IN - user credentials */
unsigned32 BufferSize, /* IN - size of output buffer */
unsigned32 *End, /* OUT - hit end of directory */
unsigned32 *OffsetOut, /* OUT - resulting directory position */
hpss_dirent_t *DirentPtr); /* OUT - directory entry information */

int
hpss_Readlink(
char *Path, /* IN - Name of the link */
char *Contents, /* OUT - Contents of link */
size_t BufferSize); /* IN - Size, in bytes, of Contents buffer */

int
hpss_ReadlinkHandle(
ns_ObjHandle_t *ObjHandle, /* IN - Handle of existing file */
char *Path, /* IN - New name of the symbolic link */
char *Contents, /* OUT - Desired contents of the link */
unsigned32 BufferSize, /* IN - Size, in bytes, of contents buffer */
hsec_UserCred_t *Ucred); /* IN - pointer to user credentials */

int
hpss_ReadList(
IOD_t *IODPtr, /* IN - IO description */
unsigned32 Flags, /* IN - IO specific flags */
IOR_t *IORPtr); /* OUT - results of the IO */

int
hpss_Rename(
char *Old, /* IN - Old name of the object */
char *New); /* IN - New name of the object */

int
hpss_RenameHandle(
ns_ObjHandle_t *OldHandle, /* IN - Old ancestor handle */
char *OldPath, /* IN - Old path name */
ns_ObjHandle_t *NewHandle, /* IN - New ancestor handle */
char *NewPath, /* IN - Old path name */
hsec_UserCred_t *Ucred); /* IN - User credentials */

int
hpss_ReopenBitfile(
int Fildes, /* IN - ID of object to be reopened */
hpssoid_t *BitFileID, /* IN - Bitfile to be opened */
int Oflag, /* IN - Type of file access */
hsec_UserCred_t *Ucred, /* IN - User credentials */
gss_token_t *AuthzTicket); /* IN - Client authorization */


int
hpss_Rmdir(
char *Path); /* IN - path of directory */

int
hpss_RmdirHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path of directory */
hsec_UserCred_t *Ucred); /* IN - user credentials */







int
hpss_Rewinddir(
int Dirdes); /* IN - open directory stream handle */

int
hpss_SetACL(
char *Path, /* IN - path of file */
unsigned32 Options, /* IN - bitmask of ACL options */
ns_ACLConfArray_t *ACL); /* IN - new ACL array */

int
hpss_SetACLHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path of file */
hsec_UserCred_t *Ucred, /* IN - user credentials */
unsigned32 Options, /* IN - bitmask of ACL options */
ns_ACLConfArray_t *ACL); /* IN - new ACL array */

int
hpss_SetAcct(
acct_rec_t NewCurAcct); /* IN - new current account code */

int
hpss_SetAcctByName(
char *NewAcctName); /* IN - new current account name */

int
hpss_SetAttrHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path of file to get attributes */
hsec_UserCred_t *Ucred, /* IN - user credentials */
u_signed64 SelFlagsIn, /* IN - indication of attrs to be set */
hpss_vattr_t *AttrIn, /* IN - new attribute values */
u_signed64 *SelFlagsOut, /* OUT - indication of attrs set */
hpss_vattr_t *AttrOut); /* OUT - returned attributes */

int
hpss_SetCOSByHints(
int Fildes, /* IN - ID of object to be read */
unsigned32 Flags, /* IN - operation flags to use */
hpss_cos_hints_t *HintsPtr, /* IN - COS hints desired */
hpss_cos_priorities_t *PrioPtr, /* IN - Priorities of COS hints */
hpss_cos_md_t *COSPtr); /* OUT - COS used */

int
hpss_SiteIdToName(
uuid_t *SiteId, /* IN - site id */
char *SiteName); /* OUT - site name */

int
hpss_SiteNameToId(
char *SiteName, /* IN - site name */
uuid_t *SiteId); /* OUT - site id */

int
hpss_Stage(
int Fildes, /* IN - open file handle */
u_signed64 Offset, /* IN - beginning offset */
u_signed64 Length, /* IN - length to be staged */
unsigned32 StorageLevel, /* IN - where to stage data */
unsigned32 Flags); /* IN - controlling flags */

int
hpss_StageCallBack(
char *Path, /* IN - path to the object */
u_signed64 Offset, /* IN - beginning offset */
u_signed64 Length, /* IN - length to be staged */
unsigned32 StorageLevel, /* IN - where to stage data */
bfs_callback_addr_t *CallBackPtr, /* IN - callback info */
unsigned32 Flags, /* IN - controlling flags */
signed32 *ReqID, /* OUT - assigned request id */
hpssoid_t *BitfileID); /* OUT - bitfile ID */

int
hpss_Stat(
char *Path, /* IN - path of file to get statistics */
struct stat *Buf); /* OUT - Returned statistics */

int
hpss_Statfs(
unsigned32 CosId, /* IN - Class of Service ID */
struct statfs *StatfsBuffer); /* OUT - file system status. */

int
hpss_Statvfs(
unsigned32 CosId, /* IN - Class of Service ID */
struct statvfs *StatvfsBuffer);/* OUT - file system status */

int
hpss_Symlink(
char *Contents, /* IN - Contents of link */
char *Path); /* IN - Name of the link */

int
hpss_SymlinkHandle(
ns_ObjHandle_t *ObjHandle, /* IN - Handle of existing file */
char *Contents, /* IN - Desired contents of the link */
char *Path, /* IN - New name of the symbolic link */
hsec_UserCred_t *Ucred, /* IN - pointer to user credentials */
hpss_vattr_t *AttrsOut); /* OUT - symbolic link attributes */

int
hpss_Truncate(
char *Path, /* IN - path of file/link to truncate */
u_signed64 Length); /* IN - new file length */

int
hpss_TruncateHandle(
ns_ObjHandle_t *ObjHandle, /* IN - handle of file or parent */
char *Path, /* IN - path of file/link to truncate */
u_signed64 Length, /* IN - new file length */
hsec_UserCred_t *Ucred); /* IN - pointer to user's credentials */

mode_t
hpss_Umask(
mode_t CMask); /* IN - New file creation mask */

int
hpss_Utime(
char *Path, /* IN - path of the object */
const struct utimbuf *Times); /* IN - new time values */

int
hpss_Unlink(
char *Path); /* IN - path of file to unlink */

int
hpss_UnlinkHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path of file to unlink */
hsec_UserCred_t *Ucred); /* IN - user credentials */

int
hpss_UnlinkBFSObject(
hpssoid_t *BFId); /* IN - Bitfile SOID */

int
hpss_UnlinkNameHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path of name to unlink */
hsec_UserCred_t *Ucred); /* IN - user credentials */







int
hpss_UpdateACL(
char *Path, /* IN - path of file */
unsigned32 Options, /* IN - processing options */
ns_ACLConfArray_t *ACL); /* IN - ACL array to be updated */

int
hpss_UpdateACLHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path of file */
hsec_UserCred_t *Ucred, /* IN - user credentials */
unsigned32 Options, /* IN - processing options */
ns_ACLConfArray_t *ACL); /* IN - ACL array to be updated */

ssize_t
hpss_Write(
int Fildes, /* IN - ID of object to be written */
const void *Buf, /* IN - Buffer from which to send data */
size_t Nbyte); /* IN - number of bytes to write */

int
hpss_WriteList(
IOD_t *IODPtr, /* IN - IO description */
unsigned32 Flags, /* IN - IO specific flags */
IOR_t *IORPtr); /* OUT - results of the IO */











































int
hpss_LoadThreadState(
uid_t UserID, /* New user id */
mode_t Umask); /* New umask */


int
hpss_XLoadThreadState(
uid_t UserID, /* New user id */
mode_t Umask, /* New umask */
char *ClientFullName);

int
hpss_LoadDefaultThreadState(
uid_t UserID, /* New user id */
mode_t Umask, /* New umask */
char *ClientFullName);

int
hpss_ThreadCleanUp(
pthread_t ThreadID); /* ID of thread to cleanup */





void
hpss_ClientAPIReset();

long
hpss_GetConfiguration(
api_config_t *ConfigOut); /* OUT - Configuration parameters */

long
hpss_SetConfiguration(
api_config_t *ConfigIn); /* IN - Configuration parameters */

int
hpss_GetBFSStats(
bfs_stats_t *StatsOut); /* OUT - stats after query */

int
hpss_SetBFSStats(
bfs_stats_t *StatsOut); /* OUT - stats after query */























u_signed64
API_AddRegisterValues(
u_signed64 InitialValue, /* IN - Initial value */
...); /* IN - Bits to add */

u_signed64
API_RemoveRegisterValues(
u_signed64 InitialValue, /* IN - Initial value */
...); /* IN - Bits to remove */

u_signed64
API_AddAllRegisterValues(
long LastPosition); /* IN - Last bit position */

long
API_RecvIODDataThread(
iodxferstate_t *ThreadState); /* parameters for the transfer */

long
API_SendIODDataThread(
iodxferstate_t *ThreadState); /* parameters for the transfer */































#endif /* hpss_api_h */

#ifndef hpss_api_h
#define hpss_api_h










#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <sys/select.h>







#include <stdlib.h>
#include <limits.h>
#include <utime.h>
#include <time.h>
#include <netdb.h>
#include <netinet/in.h>












#include "hpss_types.h"
#include "u_signed64.h"
#include "hpss_pthread.h"
#include "hpss_sec_api.h"
#include "hpss_authz_token.h"
#include "core_api_def.h"
#include "hpss_api_def.h"
#include "hpss_dirent.h"
#include "ns_Constants.h"
#include "hpss_obj_handle.h"
#include "hpss_iod_clnt.h"
#include "hpss_cos.h"
#include "hpss_limits.h"
#include "hpss_errno.h"
#include "dmapi/dmg/dmg_fileset_info.h"
#include "hpss_stat.h"
#include "hpss_vattr.h"
#include "ss_pvlist.h"
#include "san3p.h"

#ifdefined(IPI3_SUPPORT)
#include <ipi3/ipi3defs.h>
#include <ipi3/ipi3struct.h>
#endif



typedef struct {
ns_ObjHandle_t FilesetHandle;
unsigned char JunctionPathName[HPSS_MAX_PATH_NAME];
ns_ObjHandle_t JunctionHandle;
} hpss_junction_ent_t;











#define HPSS_SET_OFFSET_FORWARD (0)
#define HPSS_SET_OFFSET_BACKWARD (1)

#define HPSS_READ_SEQUENTIAL (0x00000001)







typedef union data_addr {
struct sockaddr_in SockAddr;
#if defined(IPI3_SUPPORT)
IPI3_INTERFACE_STRUCT IpiAddr;
#endif
} data_addr_t;

typedef struct desc_elem {
int Desc; /* Open descriptor */
struct desc_elem *Next; /* Next pointer */
} desc_elem_t;
























































































































































































































typedef struct api_config {
unsigned int Flags;
int DebugValue;
int TransferType;
int NumRetries;
int BusyDelay;
int BusyRetries;
int TotalDelay;

int LimitedRetries;
int MaxConnections;
int ReuseDataConnections;
int UsePortRange;
int RetryStageInp;
int DMAPWriteUpdates;
hpss_authn_mech_t AuthnMech;
hpss_rpc_prot_level_t RPCProtLevel;

char DescName[HPSS_MAX_DESC_NAME];


char DebugPath[HPSS_MAX_PATH_NAME];
char HostName[HPSS_MAX_HOST_NAME];

} api_config_t;




#define API_ENABLE_LOGGING (0x00000001) /* do HPSS logging */

#define API_DISABLE_CROSS_REALM (0x00000002) /* no cross-realm */
#define API_DISABLE_JUNCTIONS (0x00000004) /* no junction traversal */
#define API_USE_CONFIG (0x00000008) /* config from API */

#define API_CONFIG_DEFAULT (0x00000000) /* default config flags */
#define API_CONFIG_ALL_FLAGS (0x0000000F) /* all valid flags */

typedef enum {
PURGE_UNLOCK = 0, /* Purge unlock the file */
PURGE_LOCK /* Purge lock the file */
} purgelock_flag_t;

#define HPSS_MIGRATE_HPSS_ONLY (0x1)
#define HPSS_MIGRATE_FORCE (BFS_MIGRATE_FORCE)
#define HPSS_MIGRATE_PURGE_DATA (BFS_MIGRATE_PURGE_DATA)

#define HPSS_MIGRATE_NO_COPY (BFS_MIGRATE_CLIENT_CALL_OP)

#define API_TRANSFER_TCP 0
#define API_TRANSFER_MVRSELECT 1 /* mover selects protocol - pdata */
#define API_TRANSFER_IPI3 2

#define API_MSGTYPE_PDATA PDATA_MSG_TYPE

#define API_MSGTYPE_MVRPROT MVRPROTOCOL_MSG_TYPE

typedef struct {
u_signed64 FilesetID; /* ID of DMAP fileset for the file */
unsigned32 FilesetType; /* fileset type: NS_FS_TYPE_BACKEDUP */
/* NS_FS_TYPE_NATIVE */
/* NS_FS_TYPE_MIRRORED */
/* NS_FS_TYPE_NS_LOCAL */
hpss_uuid_t DMGuuid; /* DMAP gateway for the file */
unsigned32 HandleLength; /* length of the DMAP file handle */
byte Handle[HPSS_MAX_DMEPI_HANDLE_SIZE]; /* DMAP file handle */
} api_dmap_attrs_t;

typedef struct {
struct file_info {
hpss_object_handle_t bitfile_handle; /* bitfile handle */
hpss_uuid_t CoreServerUUID; /* core server UUID */
u_signed64 Offset; /* file offset */
int OpenFlag; /* open flags */
unsigned32 FilesetCOS; /* COS of the fileset */
api_dmap_attrs_t DMattrs; /* DMAP attributes */
} Info; /* distribute file information */
uchar CkSum; /* check sum digest */
} api_dist_file_info_t;

#define HPSS_MAX_FS_NAME HPSS_MAX_FS_NAME_LENGTH

typedef struct
{
u_signed64 FilesetId;
unsigned char FilesetName[HPSS_MAX_FS_NAME];
hpss_uuid_t GatewayUUID;
hpss_uuid_t CoreServerUUID;
} hpss_global_fsent_t;

typedef enum {
NAMESPEC_SKIP, /* Place holder. No translation needed. */
NAMESPEC_REALM, /* Translate realm name only */
NAMESPEC_USER, /* Translate user name and realm name */
NAMESPEC_GROUP /* Translate group name and realm name */
} namespec_type_t;
















typedef struct api_namespec {
namespec_type_t Type; /* Type of name represented */
unsigned32 Id; /* Principal's uid or gid */
unsigned32 RealmId; /* HPSS Realm id where principal resides */
char Name[HPSS_MAX_PRINCIPAL_NAME];
char RealmName[HPSS_MAX_REALM_NAME];
} api_namespec_t;

typedef struct subsys_stats {
unsigned32 StageCount; /* Files staged since last reset */
unsigned32 MigrationCount; /* Files migrated since last reset */
unsigned32 PurgeCount; /* Files purged since last reset */
unsigned32 DeleteCount; /* Files deleted since last reset */
timestamp_sec_t TimeLastReset; /* Time of last statistics reset */
} subsys_stats_t;

typedef void *hpss_pio_grp_t;
typedef enum { HPSS_PIO_READ, HPSS_PIO_WRITE } hpss_pio_operation_t;
typedef enum { HPSS_PIO_TCPIP } hpss_pio_transport_t;
typedef unsigned32 hpss_pio_options_t;

#define HPSS_PIO_PUSH (1<<0)
#define HPSS_PIO_HANDLE_GAP (1<<1)

typedef struct hpss_pio_params_s {
hpss_pio_operation_t Operation; /* Operation type for PIO group */
unsigned32 ClntStripeWidth; /* # of element in client stripe */
unsigned32 BlockSize; /* Bytes for each element */
unsigned32 FileStripeWidth; /* # of element in file stripe */
unsigned32 IOTimeOutSecs; /* seconds to wait for I/O - */
hpss_pio_transport_t Transport; /* Type of data transport */
hpss_pio_options_t Options; /* PIO data transport options */
} hpss_pio_params_t;

#define HPSS_PIO_STRIPE_UNKNOWN 0

typedef struct hpss_pio_gapinfo_s {
u_signed64 Offset; /* Starting offset of gap */
u_signed64 Length; /* Length of gap */
} hpss_pio_gapinfo_t;

typedef int (*hpss_pio_cb_t)(
void *, /* IN - Call back argument */
u_signed64, /* IN - Local file offset */
unsigned int *, /* IN/OUT - Length of requested data */
void **); /* IN/OUT - Pointer to first byte of data */

#define HPSS_STAGE_STATUS_UNKNOWN (0)
#define HPSS_STAGE_STATUS_QUEUED (1)
#define HPSS_STAGE_STATUS_ACTIVE (2)
#define F_HPSS_SET_COS 1
#define F_HPSS_SET_FILE_SIZE 2

struct __HPSS_FILE;
typedef struct __HPSS_FILE HPSS_FILE;

#ifdef __cplusplus
extern "C" {
#endif

int
hpss_AcctCodeToName(
acct_rec_t AcctCode, /* IN - account code */
hpss_uuid_t *Site, /* IN - site location */
char *AcctName); /* OUT - account name */

int
hpss_AcctNameToCode(
char *AcctName, /* IN - account name */
hpss_uuid_t *Site, /* IN - site location */
acct_rec_t *AcctCode); /* OUT - account code */

int
hpss_Access(
char *Path, /* IN - path of file to check access rights */
int Amode); /* IN - Type of access to be checked */

int
hpss_AccessHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path of file to check */
int Amode, /* IN - Type of access to be checked */
sec_cred_t *Ucred, /* IN - user credentials */
hpss_authz_token_t *AuthzTicket); /* OUT - authorization ticket */

int
hpss_BeginExTrans(
hpss_uuid_t *CoreServerUUID);/* IN - Core Server UUID */

int
hpss_ClientAPIInit(void);


<略>

int
hpss_ConvertIdsToNames(
signed32 NumEntries, /* IN - number of specs to convert */
api_namespec_t *Specs); /* IN/OUT - specs to convert */

int
hpss_ConvertNamesToIds(
signed32 NumEntries, /* IN - number of specs to convert */
api_namespec_t *Specs); /* IN/OUT - specs to convert */

int
hpss_CopyFile(
int SrcFildes, /* IN - ID of src object */
int DestFildes); /* IN - ID of dest object */

int
hpss_DeleteACL(
char *Path, /* IN - path of file */
unsigned32 Options, /* IN - bitmask of ACL options */
ns_ACLConfArray_t *ACL); /* IN - ACL array to be removed */

int
hpss_DeleteACLHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path of file */
sec_cred_t *Ucred, /* IN - user credentials */
unsigned32 Options, /* IN - bitmask of ACL options */
ns_ACLConfArray_t *ACL); /* IN - ACL array to be removed */







int
hpss_EndExTrans(
hpss_ExTransOutcome_t Outcome); /* IN - transaction outcome */


int
hpss_Fclear(
int Fildes, /* IN - ID of open object */
u_signed64 Length); /* IN - Hole length */

int
hpss_FclearOffset(
int Fildes, /* IN - ID of open object */
u_signed64 Offset, /* IN - Offset at which to begin clear */
u_signed64 Length); /* IN - Hole length */

int
hpss_Fcntl(
int hpss_id, /* IN Open HPSS File descriptor */
int cmd, /* IN Requested command */
/* F_GETFL/F_SETFL, F_HPSS_SET_COS */
/* F_HPSS_SET_FILE_SIZE */
long arg); /* IN Command argument */

HPSS_FILE *
hpss_Fopen(
char *Path, /* IN - Path to HPSS file to open */
char *Mode); /* IN - Desired access mode (r,w,a,r+,w+,a+) */


int
hpss_Fclose(
HPSS_FILE *hpss_Stream); /* IN - Pointer to HPSS I/O Stream */


int
hpss_Fflush(
HPSS_FILE *hpss_Stream); /* IN - Pointer to HPSS I/O Stream */


size_t
hpss_Fread(
void *Ptr, /* IN - Pointer to buffer for read */
size_t Size, /* IN - Size of items to read */
size_t Num, /* IN - Number of items to read of given size*/
HPSS_FILE *hpss_Stream); /* IN - Pointer to open HPSS_FILE Structure */

int
hpss_Fsync(
int hpss_fd); /* IN - Open HPSS file descriptor */

size_t
hpss_Fwrite(
void *Ptr, /* IN - Pointer to buffer to write from */
size_t Size, /* IN - Size of items to write */
size_t Num, /* IN - Number of items to write of given size*/
HPSS_FILE *hpss_Stream); /* IN - Pointer to open HPSS_FILE Structure */

int
hpss_FileGetAttributes(
char *Path, /* IN - path to the object */
hpss_fileattr_t *AttrOut); /* OUT - attributes of entry */

int
hpss_FileGetAttributesHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path to the object */
sec_cred_t *Ucred, /* IN - user credentials */
hpss_authz_token_t *AuthzTicket, /* OUT - authorization ticket */
hpss_fileattr_t *AttrOut); /* OUT - attributes after query */

int
hpss_FileGetAttributesSOID(
hpssoid_t *BitfileID, /* IN - bitfile id */
char *Path, /* OUT - one path to the object */
hpss_fileattr_t *AttrOut); /* OUT - attributes after query */

int
hpss_FileGetXAttributes(
char *Path, /* IN - path to the object */
unsigned32 Flags, /* IN - flags for storage attrs */
unsigned32 StorageLevel, /* IN - level to query */
hpss_xfileattr_t *AttrOut); /* OUT - attributes after query */

int
hpss_FileSetAttributes(
char *Path, /* IN - path to the object */

hpss_fileattrbits_t SelFlags, /* IN - attributes fields to set */
hpss_fileattr_t *AttrIn, /* IN - input attributes */
hpss_fileattr_t *AttrOut); /* OUT - attributes after change */

int
hpss_FileSetAttributesHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path to the object */
sec_cred_t *Ucred, /* IN - user credentials */

hpss_fileattrbits_t SelFlags, /* IN - attributes fields to set */
hpss_fileattr_t *AttrIn, /* IN - input attributes */
hpss_fileattr_t *AttrOut); /* OUT - attributes after change */

int
hpss_FileSetAttributesSOID(
hpssoid_t *BitfileID, /* IN - Bitfile ID */

hpss_fileattrbits_t SelFlags, /* IN - attributes fields to set */
hpss_fileattr_t *AttrIn, /* IN - input attributes */
hpss_fileattr_t *AttrOut, /* OUT - attributes after query */
char *Path); /* OUT - path to the object */

int
hpss_FilesetCreate(
hpss_uuid_t *CoreServerUUID, /* IN - Core Server UUID */
unsigned32 CreateOptions, /* IN - creation options */
ns_FilesetAttrBits_t FilesetAttrBits, /* IN - File set attributes to set */

ns_FilesetAttrs_t *FilesetAttrs, /* IN - File set attributes */
hpss_AttrBits_t ObjectAttrBits, /* IN - Object attributes to set */
hpss_Attrs_t *ObjectAttrs, /* IN - Object attributes */
dmg_fileset_info_t *DMGFSInfo, /* IN - DMG fileset info */

ns_FilesetAttrBits_t RetFilesetAttrBits, /* IN - Fileset attr to return */
hpss_AttrBits_t RetObjectAttrBits, /* IN - Dir attr to return */

ns_FilesetAttrs_t *RetFilesetAttrs, /* OUT - Returned fileset attr */

hpss_Attrs_t *RetObjectAttrs, /* OUT - Returned dir attr */
ns_ObjHandle_t *FilesetHandle); /* OUT - New fileset handle */


int
hpss_FilesetDelete(
char *Name, /* IN - File set name */
u_signed64 *FilesetId, /* IN - File set ID */
ns_ObjHandle_t *FilesetHandle); /* IN - File set object handle */

int
hpss_FilesetGetAttributes(
char *Name, /* IN - File set name */
u_signed64 *FilesetId, /* IN - File set ID */
ns_ObjHandle_t *FilesetHandle, /* IN - File set object handle */
hpss_uuid_t *CoreServerUUID, /* IN - Core Server of fileset */
ns_FilesetAttrBits_t FilesetAttrBits, /* IN - File set attribute bits */
ns_FilesetAttrs_t *FilesetAttrs); /* OUT - Returned attributes */

int
hpss_FilesetListAll(
u_signed64 OffsetIn, /* IN - offset to start at */
unsigned32 Entries, /* IN - number of entries to return */
unsigned32 *End, /* OUT - hit end of the list */
u_signed64 *OffsetOut,/* OUT - offset of last entry */
hpss_global_fsent_t *FSentPtr);/* OUT - fileset entry information */

int
hpss_FilesetSetAttributes(
char *Name, /* IN - File set name */
u_signed64 *FilesetId, /* IN - File set ID */
ns_ObjHandle_t *FilesetHandle, /* IN - File set object handle */
ns_FilesetAttrBits_t FilesetAttrBitsIn, /* IN - File set attribute bits */
ns_FilesetAttrs_t *FilesetAttrsIn, /* IN - File set attributes */
ns_FilesetAttrBits_t FilesetAttrBitsOut,/* IN - Returned set attribute bits */
ns_FilesetAttrs_t *FilesetAttrsOut); /* OUT - Returned attribues */

int
hpss_Fpreallocate(
int Fildes, /* IN - ID of open file */
u_signed64 Length); /* IN - new file length */

int
hpss_Fstat(
int Fildes, /* IN - ID of open object */
hpss_stat_t *Buf); /* OUT - Returned statistics */

int
hpss_Ftruncate(
int Fildes, /* IN - ID of open file to truncate */
u_signed64 Length); /* IN - new file length */

int
hpss_GetAcct(
acct_rec_t *RetDefAcct, /* OUT - default account code */
acct_rec_t *RetCurAcct); /* OUT - current account code */

int
hpss_GetAcctName(
char *AcctName); /* OUT - current account name */

int
hpss_GetACL(
char *Path, /* IN - path of file */
unsigned32 Options, /* IN - bitmask of ACL options */
ns_ACLConfArray_t **ACL); /* OUT - returned ACL array */

int
hpss_GetACLHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path of file */
sec_cred_t *Ucred, /* IN - user credentials */
unsigned32 Options, /* IN - bitmask of ACL options */
ns_ACLConfArray_t **ACL); /* OUT - returned ACL array */

int
hpss_GetAsynchStatus(
signed32 CallBackId, /* OUT - assigned request id */
hpssoid_t *BitfileID, /* OUT - bitfile ID */
signed32 *Status); /* OUT - status info */

int
hpss_GetAttrHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path of file to get attributes */
sec_cred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *HandleOut, /* OUT - returned object handle */
hpss_authz_token_t *AuthzTicket, /* OUT - returned authorization */
hpss_vattr_t *AttrOut); /* OUT - returned attributes */

int
hpss_GetRawAttrHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path of object */
sec_cred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *HandleOut, /* OUT - returned object handle */
hpss_authz_token_t *AuthzTicket, /* OUT - returned authorization */
hpss_vattr_t *AttrOut); /* OUT - returned attributes */

int
hpss_Getcwd(
char *Buf, /* OUT - current working directory */
size_t Size); /* IN - size of the buffer */

int
hpss_GetDistFile(
int Fildes, /* IN - Open file handle */
api_dist_file_info_t *FileInfo);/* OUT - File table information */

int
hpss_GetListAttrs(
char *Path, /* IN - path of file to get statistics */
hpss_Attrs_t *AttrOut); /* OUT - Returned statistics */

int
hpss_InsertDistFile(
api_dist_file_info_t *FileInfo);/* IN - File table information */

unsigned32
hpss_GetObjType(
ns_ObjHandle_t *ObjHandle); /* IN - object handle */

unsigned32
hpss_GetObjId(
ns_ObjHandle_t *ObjHandle); /* IN - object handle */

int
hpss_GetPathHandle(
ns_ObjHandle_t *ObjHandle, /* IN - object handle */
ns_ObjHandle_t *FilesetRootHandle, /* OUT - Fileset root handle */
char *Path); /* OUT - Path to object */

int
hpss_GetJunctions(
unsigned32 SubsystemID, /* IN - Subsystem identifier */
u_signed64 OffsetIn, /* IN - offset to start at */
unsigned32 Entries, /* IN - number of entries to return*/
unsigned32 *End, /* OUT - hit end of directory */
u_signed64 *OffsetOut, /* OUT - offset of last entry */
hpss_junction_ent_t *JentPtr); /* OUT - junction entry information */

int
hpss_JunctionCreate(
char *Path, /* IN - path of the new junction */
ns_ObjHandle_t *SourceHandle, /* IN - directory or fileset handle */
ns_ObjHandle_t *JunctionHandle); /* OUT - Junction handle */

int
hpss_JunctionCreateHandle(
ns_ObjHandle_t *ParentHandle, /* IN - directory to insert junction */
char *Path, /* IN - entry name of the new junction */
ns_ObjHandle_t *SourceHandle, /* IN - Directory or fileset handle */
sec_cred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *JunctionHandle); /* OUT - Junction handle */

int
hpss_JunctionDelete(
char *Path); /* IN - Path of junction to delete */

int
hpss_JunctionDeleteHandle(
ns_ObjHandle_t *ParentHandle, /* IN - Parent directory */
char *Path, /* IN - Name of junction */
sec_cred_t *Ucred); /* IN - user credentials */

int
hpss_Link(
char *Existing, /* IN - Existing name of the object */
char *New); /* IN - New name of the object */

int
hpss_LinkHandle(
ns_ObjHandle_t *ObjHandle, /* IN - Handle of existing file */
ns_ObjHandle_t *DirHandle, /* IN - parent directory handle */
char *New, /* IN - New name of the object */
sec_cred_t *Ucred); /* IN - pointer to user credentials */

int
hpss_LookupRootCS(
char *SiteName, /* IN - HPSS site name */
hpss_uuid_t *ServerId); /* OUT - Root CS server ID */

hpss_off_t
hpss_Lseek(
int Fildes, /* IN - ID of open object */
hpss_off_t Offset, /* IN - # of bytes to calculate new offset */
int Whence); /* IN - Origin for the seek */

int
hpss_SetAuditInfo(
unsigned int EndUserHostAddr); /* IN - IP address of end user's host */


int
hpss_SetFileOffset(
int Fildes, /* IN - ID of open object */
u_signed64 OffsetIn, /* IN - # of bytes to calculate new offset */
int Whence, /* IN - Origin for the seek */
int Direction, /* IN - OffsetIn is forward or backward */
u_signed64 *OffsetOut); /* OUT - resulting offset */

int
hpss_Lstat(
char *Path, /* IN - path of file/link to get statistics */
hpss_stat_t *Buf); /* OUT - Returned statistics */

int
hpss_Migrate(
int Fildes, /* IN - open file handle */
unsigned32 SrcLevel, /* IN - where to migrate data from */
unsigned32 Flags, /* IN - controlling flags */
u_signed64 *RetBytesMigrated); /* OUT - number of bytes migrated */


int
hpss_Mkdir(
char *Path, /* IN - path of directory */
mode_t Mode); /* IN - permission bits of the new directory */

int
hpss_MkdirHandle(
ns_ObjHandle_t *ObjHandle, /* IN - handle of parent directory */
char *Path, /* IN - path of directory */
mode_t Mode, /* IN - perm bits for new directory */
sec_cred_t *Ucred, /* IN - user credentials */
ns_ObjHandle_t *HandleOut, /* OUT - returned object handle */
hpss_vattr_t *AttrOut); /* OUT - returned VFS attributes */










unsigned32
hpss_HandleCompare (
ns_ObjHandle_t *FirstObjHandle, /* IN - first handle to compare */
ns_ObjHandle_t *SecondObjHandle); /* IN - second handle to compare */


int
hpss_Open(
char *Path, /* IN - Path to file to be opened */
int Oflag, /* IN - Type of file access */
mode_t Mode, /* IN - Desired file perms if create */
hpss_cos_hints_t *HintsIn, /* IN - Desired class of service */
hpss_cos_priorities_t *HintsPri, /* IN - priorities of fields */
hpss_cos_hints_t *HintsOut); /* OUT - Granted class of service */

int
hpss_OpenBitfile(
hpssoid_t *BitFileID, /* IN - Bitfile to be opened */
int Oflag, /* IN - Type of file access */
sec_cred_t *Ucred, /* IN - User credentials */
hpss_authz_token_t *AuthzTicket); /* IN - Client authorization */


int
hpss_OpenBitfileVAttrs(
hpss_vattr_t *FileAttrs, /* IN - File attributes */
int Oflag, /* IN - Type of file access */
sec_cred_t *Ucred, /* IN - User credentials */
hpss_authz_token_t *AuthzTicket, /* IN - Client authorization */
hpss_cos_hints_t *HintsOut); /* OUT - actual hint values used */

int
hpss_Opendir(
char *DirName); /* IN - path of directory */

int
hpss_OpenHandle(
ns_ObjHandle_t *ObjHandle, /* IN - Parent object handle */
char *Path, /* IN - Path to file to be opened */
int Oflag, /* IN - Type of file access */
mode_t Mode, /* IN - Desired file perms if create */
sec_cred_t *Ucred, /* IN - User credentials */
hpss_cos_hints_t *HintsIn, /* IN - Desired class of service */
hpss_cos_priorities_t *HintsPri, /* IN - Priorities of hint struct */
hpss_cos_hints_t *HintsOut, /* OUT - Granted class of service */
hpss_vattr_t *AttrsOut, /* OUT - File attributes */
hpss_authz_token_t *AuthzTicket); /* OUT - Client authorization */

int
hpss_Purge(
int Fildes, /* IN - open file handle */
u_signed64 Offset, /* IN - beginning offset */
u_signed64 Length, /* IN - length to be purged */
unsigned32 StorageLevel, /* IN - where to purge data */
unsigned32 Flags, /* IN - controlling flags */
u_signed64 *RetBytesPurged); /* OUT - number of bytes purged */

int
hpss_PurgeLock(
int Fildes, /* IN - ID of open object */
purgelock_flag_t Flag); /* IN - PURGE_LOCK or PURGE_UNLOCK the file*/

ssize_t
hpss_Read(
int Fildes, /* IN - ID of object to be read */
void *Buf, /* IN - Buffer in which to receive data */
size_t Nbyte); /* IN - number of bytes to read */

int
hpss_ReadAttrs(
int Dirdes, /* IN - open directory stream handle */
u_signed64 OffsetIn, /* IN - directory position */
unsigned32 BufferSize, /* IN - size of output buffer */
unsigned32 GetAttributes, /* IN - get object attributes? */
unsigned32 *End, /* OUT - hit end of directory */
u_signed64 *OffsetOut, /* OUT - resulting directory position */
ns_DirEntry_t *DirentPtr); /* OUT - directory entry information */

int
hpss_ReadAttrsHandle(
ns_ObjHandle_t *ObjHandle, /* IN - directory object handle */
u_signed64 OffsetIn, /* IN - directory position */
sec_cred_t *Ucred, /* IN - user credentials */
unsigned32 BufferSize, /* IN - size of output buffer */
unsigned32 GetAttributes, /* IN - get object attributes? */
unsigned32 *End, /* OUT - hit end of directory */
u_signed64 *OffsetOut, /* OUT - resulting directory position */
ns_DirEntry_t *DirentPtr); /* OUT - directory entry information */

int
hpss_ReadRawAttrsHandle(
ns_ObjHandle_t *ObjHandle, /* IN - directory object handle */
u_signed64 OffsetIn, /* IN - directory position */
sec_cred_t *Ucred, /* IN - user credentials */
unsigned32 BufferSize, /* IN - size of output buffer */
unsigned32 GetAttributes, /* IN - get object attributes? */
unsigned32 *End, /* OUT - hit end of directory */
u_signed64 *OffsetOut, /* OUT - resulting directory position */
ns_DirEntry_t *DirentPtr); /* OUT - directory entry information */

int
hpss_Readdir(
int DirDes, /* IN - open directory stream handle */
hpss_dirent_t *DirentPtr); /* OUT - directory entry */

int
hpss_ReaddirHandle(
ns_ObjHandle_t *ObjHandle, /* IN - directory object handle */
u_signed64 OffsetIn, /* IN - directory position */
sec_cred_t *Ucred, /* IN - user credentials */
unsigned32 BufferSize, /* IN - size of output buffer */
unsigned32 *End, /* OUT - hit end of directory */
u_signed64 *OffsetOut, /* OUT - resulting directory position */
hpss_dirent_t *DirentPtr); /* OUT - directory entry information */

int
hpss_Readlink(
char *Path, /* IN - Name of the link */
char *Contents, /* OUT - Contents of link */
size_t BufferSize); /* IN - Size, in bytes, of Contents buffer */

int
hpss_ReadlinkHandle(
ns_ObjHandle_t *ObjHandle, /* IN - Handle of existing file */
char *Path, /* IN - New name of the symbolic link */
char *Contents, /* OUT - Desired contents of the link */
size_t BufferSize, /* IN - Size, in bytes, of contents buffer */
sec_cred_t *Ucred); /* IN - pointer to user credentials */

int
hpss_ReadList(
hpss_IOD_t *IODPtr, /* IN - IO description */
unsigned32 Flags, /* IN - IO specific flags */
hpss_IOR_t *IORPtr); /* OUT - results of the IO */

int
hpss_Rename(
char *Old, /* IN - Old name of the object */
char *New); /* IN - New name of the object */

int
hpss_RenameHandle(
ns_ObjHandle_t *OldHandle, /* IN - Old ancestor handle */
char *OldPath, /* IN - Old path name */
ns_ObjHandle_t *NewHandle, /* IN - New ancestor handle */
char *NewPath, /* IN - Old path name */
sec_cred_t *Ucred); /* IN - User credentials */

int
hpss_ReopenBitfile(
int Fildes, /* IN - descriptor to be reopened */
hpssoid_t *BitFileID, /* IN - Bitfile to be opened */
int Oflag, /* IN - Type of file access */
sec_cred_t *Ucred, /* IN - User credentials */
hpss_authz_token_t *AuthzTicket); /* IN - Client authorization */

int
hpss_Rmdir(
char *Path); /* IN - path of directory */

int
hpss_RmdirHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path of directory */
sec_cred_t *Ucred); /* IN - user credentials */

int
hpss_RmdirNoLookup(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path of directory */
sec_cred_t *Ucred); /* IN - user credential */

int
hpss_Rewinddir(
int Dirdes); /* IN - open directory stream handle */

int
hpss_SetACL(
char *Path, /* IN - path of file */
unsigned32 Options, /* IN - bitmask of ACL options */
ns_ACLConfArray_t *ACL); /* IN - new ACL array */

int
hpss_SetACLHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path of file */
sec_cred_t *Ucred, /* IN - user credentials */
unsigned32 Options, /* IN - bitmask of ACL options */
ns_ACLConfArray_t *ACL); /* IN - new ACL array */

int
hpss_SetAcct(
acct_rec_t NewCurAcct); /* IN - new current account code */

int
hpss_SetAcctByName(
char *NewAcctName); /* IN - new current account name */

int
hpss_SetAttrHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path of file to get attributes */
sec_cred_t *Ucred, /* IN - user credentials */
u_signed64 SelFlagsIn, /* IN - indication of attrs to be set */
hpss_vattr_t *AttrIn, /* IN - new attribute values */
u_signed64 *SelFlagsOut, /* OUT - indication of attrs set */
hpss_vattr_t *AttrOut); /* OUT - returned attributes */

int
hpss_SetCOSByHints(
int Fildes, /* IN - ID of object to be read */
unsigned32 Flags, /* IN - operation flags to use */
hpss_cos_hints_t *HintsPtr, /* IN - COS hints desired */
hpss_cos_priorities_t *PrioPtr, /* IN - Priorities of COS hints */
hpss_cos_md_t *COSPtr); /* OUT - COS used */

int
hpss_SiteIdToName(
hpss_uuid_t *SiteId, /* IN - site id */
char *SiteName); /* OUT - site name */

int
hpss_SiteNameToId(
char *SiteName, /* IN - site name */
hpss_uuid_t *SiteId); /* OUT - site id */

int
hpss_Stage(
int Fildes, /* IN - open file handle */
u_signed64 Offset, /* IN - beginning offset */
u_signed64 Length, /* IN - length to be staged */
unsigned32 StorageLevel, /* IN - where to stage data */
unsigned32 Flags); /* IN - controlling flags */

int
hpss_StageCallBack(
char *Path, /* IN - path to the object */
u_signed64 Offset, /* IN - beginning offset */
u_signed64 Length, /* IN - length to be staged */
unsigned32 StorageLevel, /* IN - where to stage data */
bfs_callback_addr_t *CallBackPtr, /* IN - callback info */
unsigned32 Flags, /* IN - controlling flags */
hpss_reqid_t *ReqID, /* OUT - assigned request id */
hpssoid_t *BitfileID); /* OUT - bitfile ID */

int
hpss_Stat(
char *Path, /* IN - path of file to get statistics */
hpss_stat_t *Buf); /* OUT - Returned statistics */

int
hpss_Statfs(
unsigned32 CosId, /* IN - Class of Service ID */
hpss_statfs_t *StatfsBuffer); /* OUT - file system status. */

int
hpss_Statvfs(
unsigned32 CosId, /* IN - Class of Service ID */
hpss_statvfs_t *StatvfsBuffer);/* OUT - file system status */

int
hpss_Symlink(
char *Contents, /* IN - Contents of link */
char *Path); /* IN - Name of the link */

int
hpss_SymlinkHandle(
ns_ObjHandle_t *ObjHandle, /* IN - Handle of existing file */
char *Contents, /* IN - Desired contents of the link */
char *Path, /* IN - New name of the symbolic link */
sec_cred_t *Ucred, /* IN - pointer to user credentials */
hpss_vattr_t *AttrsOut); /* OUT - symbolic link attributes */

int
hpss_Truncate(
char *Path, /* IN - path of file/link to truncate */
u_signed64 Length); /* IN - new file length */

int
hpss_TruncateHandle(
ns_ObjHandle_t *ObjHandle, /* IN - handle of file or parent */
char *Path, /* IN - path of file/link to truncate */
u_signed64 Length, /* IN - new file length */
sec_cred_t *Ucred); /* IN - pointer to user's credentials */

mode_t
hpss_Umask(
mode_t CMask); /* IN - New file creation mask */

int
hpss_Utime(
char *Path, /* IN - path of the object */
const struct utimbuf *Times); /* IN - new time values */

int
hpss_Unlink(
char *Path); /* IN - path of file to unlink */

int
hpss_UnlinkHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path of file to unlink */
sec_cred_t *Ucred); /* IN - user credentials */











int
hpss_UnlinkNoLookup(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path of name to unlink */
sec_cred_t *Ucred); /* IN - user credentials */

int
hpss_UpdateACL(
char *Path, /* IN - path of file */
unsigned32 Options, /* IN - processing options */
ns_ACLConfArray_t *ACL); /* IN - ACL array to be updated */

int
hpss_UpdateACLHandle(
ns_ObjHandle_t *ObjHandle, /* IN - parent object handle */
char *Path, /* IN - path of file */
sec_cred_t *Ucred, /* IN - user credentials */
unsigned32 Options, /* IN - processing options */
ns_ACLConfArray_t *ACL); /* IN - ACL array to be updated */

ssize_t
hpss_Write(
int Fildes, /* IN - ID of object to be written */
const void *Buf, /* IN - Buffer from which to send data */
size_t Nbyte); /* IN - number of bytes to write */

int
hpss_WriteList(
hpss_IOD_t *IODPtr, /* IN - IO description */
unsigned32 Flags, /* IN - IO specific flags */
hpss_IOR_t *IORPtr); /* OUT - results of the IO */

int
hpss_PIOStart(
hpss_pio_params_t *InputParams, /* IN - Input parameters */
hpss_pio_grp_t *StripeGroup); /* OUT - New IO stripe group */

int
hpss_PIORegister(
unsigned32 StripeElement, /* IN - Element of the stripe */
unsigned32 DataNetAddr, /* IN - NIC address for data movement */
void *DataBuffer, /* IN - Data buffer for IO */
unsigned32 DataBufLen, /* IN - Data buffer length */
hpss_pio_grp_t StripeGroup, /* IN - IO stripe group */
hpss_pio_cb_t IOCallback, /* IN - IO call back function */
void *IOCallbackArg);/* IN - IO call back argument */

int
hpss_PIOExecute(
int Fd, /* IN - Open file descriptor */
u_signed64 FileOffset, /* IN - IO file offset */
u_signed64 Size, /* IN - IO size */
hpss_pio_grp_t StripeGroup, /* IN - IO stripe group */
hpss_pio_gapinfo_t *GapInfo, /* OUT - Sparse file information */
u_signed64 *BytesMoved); /* OUT - Bytes moved */

int
hpss_PIOExportGrp(
hpss_pio_grp_t StripeGroup, /* IN - IO stripe group */
void **Buffer, /* OUT - Raw data buffer */
unsigned int *BufLength); /* OUT - Raw buffer length */

int
hpss_PIOImportGrp(
void *Buffer, /* IN - Raw data buffer */
unsigned int BufLength, /* IN - Raw buffer length */
hpss_pio_grp_t *StripeGroup); /* OUT - IO stripe group */

int
hpss_PIOEnd(
hpss_pio_grp_t StripeGroup); /* IN - IO stripe group */

int
hpss_LoadThreadState(
uid_t UserID, /* IN - New user id */
mode_t Umask, /* IN - New umask */
char *ClientFullName);/* IN - Client name (optional) */







int
hpss_LoadDefaultThreadState(
uid_t UserID, /* IN - New user id */
mode_t Umask, /* IN - New umask */
char *ClientFullName);/* IN - Client name (optional) */

int
hpss_ThreadCleanUp(
pthread_t ThreadID); /* IN - ID of thread to cleanup */

int
hpss_GetThreadUcred(
sec_cred_t *RetUcred); /* OUT - credentials on client */

void
hpss_ClientAPIReset();

int
hpss_GetConfiguration(
api_config_t *ConfigOut); /* OUT - Configuration parameters */

int
hpss_SetConfiguration(
api_config_t *ConfigIn); /* IN - Configuration parameters */









int
hpss_SetLoginCred(
char *PrincipalName, /* IN - Principal name */
hpss_authn_mech_t Mechanism, /* IN - Security Mechanism */
hpss_rpc_cred_type_t CredType, /* IN - Type of creds needed */
hpss_rpc_auth_type_t AuthType, /* IN - Authenticator type */
void *Authenticator); /* IN - Authenticator */

void
hpss_PurgeLoginCred(void);

int
hpss_GetSubSysStats(
unsigned32 SubsystemID, /* IN - Subsystem identifier */
subsys_stats_t *StatsOut); /* OUT - stats after query */

int
hpss_ResetSubSysStats(
unsigned32 SubsystemID, /* IN - Subsystem identifier */
subsys_stats_t *StatsOut); /* IN - stats after reset */

u_signed64
API_AddRegisterValues(
u_signed64 InitialValue, /* IN - Initial value */
...); /* IN - Bits to add */

u_signed64
API_RemoveRegisterValues(
u_signed64 InitialValue, /* IN - Initial value */
...); /* IN - Bits to remove */

u_signed64
API_AddAllRegisterValues(
int LastPosition); /* IN - Last bit position */









int
API_GetClientAddr(
iod_srcsinkdesc_t *SrcSinkPtr, /* IN - initial src/sink descriptor */
iod_srcsinkreply_t *SrcSinkReplyPtr,/* IN - initial src/sink reply */
u_signed64 Offset, /* IN - offset within transfer */
iod_address_t **RetAddr, /* OUT - returned client address */
u_signed64 *RetLength, /* OUT - returned length */
iod_srcsinkdesc_t **RetDescPtr, /* OUT - returned descriptor ptr */
iod_srcsinkreply_t **RetReplyPtr); /* OUT - returned reply ptr */

int
API_GetUUIDForSubsystem(
unsigned32 SubsystemID, /* IN - identifier for the subsystem */
hpss_reqid_t RequestID, /* IN - request id */
hpss_uuid_t *RetUUID); /* OUT - returned UUID */

void
API_FreeIOR(
hpss_IOR_t *IORPtr); /* IN - pointer to IOR to free */

int
API_GetDataThreadStackSize(void);
#ifdef __cplusplus
}
#endif
#endif /* hpss_api_h */


hpss_api_def.h

HPSS4.5

HPSS6.2

#ifndef hpss_api_def_v0_0_included
#define hpss_api_def_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif

#ifndef hpss_limits_v0_0_included
#include <hpss_limits.h>
#endif
#ifndef IFStructs_v0_0_included
#include <ns_IFStructs.h>
#endif
#ifndef bfs_interface_def_v0_0_included
#include <bfs_interface_def.h>
#endif



#define API_GET_STATS_FOR_LEVEL (1)
#define API_GET_STATS_FOR_1STLEVEL (2)
#define API_GET_STATS_OPTIMIZE (4)
#define API_GET_STATS_FOR_ALL_LEVELS (8)

typedef struct hpss_fileattr {
ns_ObjHandle_t NSObjectHandle;
ns_Attrs_t NSAttr;
bf_attrib_t BFSAttr;
} hpss_fileattr_t;






typedef struct hpss_xfileattr {
ns_ObjHandle_t NSObjectHandle;
ns_Attrs_t NSAttr;
bf_xattrib_t BFSAttr;
} hpss_xfileattr_t;





#ifdef __cplusplus
}





#endif
#endif

#ifndef _HPSS_API_DEF_H_RPCGEN
#define _HPSS_API_DEF_H_RPCGEN

#include <rpc/rpc.h>
#ifndef _hpss_api_def_h
#define _hpss_api_def_h







#include "hpss_types.h"

#include "hpss_limits.h"





#include "ns_interface_defs.h"

#include "bfs_userif_def.h"
#include "core_api_def.h"

#define API_GET_STATS_FOR_LEVEL 0x00000001
#define PI_GET_STATS_FOR_1STLEVEL 0x00000002
#define PI_GET_STATS_OPTIMIZE 0x00000004
#define PI_GET_STATS_FOR_ALL_LEVELS 0x00000008

struct hpss_fileattr {
ns_ObjHandle_t ObjectHandle;
hpss_Attrs_t Attrs;

};
typedef struct hpss_fileattr hpss_fileattr;

typedef hpss_fileattr hpss_fileattr_t;

typedef hpss_AttrBits_t hpss_fileattrbits_t;

struct hpss_xfileattr {
ns_ObjHandle_t ObjectHandle;
hpss_Attrs_t Attrs;
bf_sc_attrib_t SCAttrib[HPSS_MAX_STORAGE_LEVELS];
};
typedef struct hpss_xfileattr hpss_xfileattr;

typedef hpss_xfileattr hpss_xfileattr_t;
#endif



extern bool_t xdr_hpss_fileattr();
extern bool_t xdr_hpss_fileattr_t();
extern bool_t xdr_hpss_fileattrbits_t();
extern bool_t xdr_hpss_xfileattr();
extern bool_t xdr_hpss_xfileattr_t();

#endif /* !_HPSS_API_DEF_H_RPCGEN */


hpss_CfgParser.h

HPSS4.5

HPSS6.2

#ifndef hpss_CfgParser_h
#define hpss_CfgParser_h


#define HPSS_CFG_BUFSIZE 128 /* Line Size */
#define HPSS_CFG_SUCCESS 0
#define HPSS_CFG_SYNTAX -22
#define HPSS_CFG_IS_EMPTY_LINE 0 /* Empty Line */
#define HPSS_CFG_COMMENT 1 /* # or ; first character */
#define HPSS_CFG_FLAG 2 /* Descriptor Only */
#define HPSS_CFG_VARIABLE_WITH_VALUE 3 /* Variable = value */
#define HPSS_CFG_BEGIN_NEW_LEVEL 4 /* = OpenBrace */
#define HPSS_CFG_END_LEVEL 5 /* CloseBrace */
#define HPSS_CFG_TOO_SHALLOW -1 /* Oops !! */
#define HPSS_CFG_IS_LEVEL_ZERO 0 /* Initial Depth */
#define HPSS_CFG_IS_LEVEL_ONE 1 /* Reading a Stanza */
#define HPSS_CFG_IS_LEVEL_TWO 2 /* Reading a Section */
#define HPSS_CFG_IS_LEVEL_THREE 3 /* Reading a SubSection */
#define HPSS_CFG_TOO_DEEP 4 /* Oops !! */

<略>

int
hpss_Cfg_PrintSearchList(
hpss_Cfg_SearchList_p SearchList /* IN */
);

































































#endif /* hpss_CfgParser_h */

#ifndef hpss_CfgParser_h
#define hpss_CfgParser_h

#include "hpss_types.h"
#define HPSS_CFG_BUFSIZE 128 /* Line Size */
#define HPSS_CFG_SUCCESS 0
#define HPSS_CFG_SYNTAX -22
#define HPSS_CFG_IS_EMPTY_LINE 0 /* Empty Line */
#define HPSS_CFG_COMMENT 1 /* # or ; first character */
#define HPSS_CFG_FLAG 2 /* Descriptor Only*/
#define HPSS_CFG_VARIABLE_WITH_VALUE 3 /* Variable = value */
#define HPSS_CFG_BEGIN_NEW_LEVEL 4 /* = OpenBrace */
#define HPSS_CFG_END_LEVEL 5 /* CloseBrace */
#define HPSS_CFG_TOO_SHALLOW -1 /* Oops !! */
#define HPSS_CFG_IS_LEVEL_ZERO 0 /* Initial Depth */
#define HPSS_CFG_IS_LEVEL_ONE 1 /* Reading a Stanza */
#define HPSS_CFG_IS_LEVEL_TWO 2 /* Reading a Section */
#define HPSS_CFG_IS_LEVEL_THREE 3 /* Reading a SubSection */
#define HPSS_CFG_TOO_DEEP 4 /* Oops !! */

<略>

int
hpss_Cfg_PrintSearchList(
hpss_Cfg_SearchList_p SearchList /* IN */
);

typedef struct hpss_cfg_parser_item
{
void *object;
struct hpss_cfg_parser_item *next;
} hpss_cfg_parser_item_t, *hpss_cfg_parser_item_p;

typedef struct
{
hpss_cfg_parser_item_p top;
unsigned16 depth;
} hpss_cfg_parser_stack_t, *hpss_cfg_parser_stack_p;

hpss_cfg_parser_stack_p
hpss_Cfg_CreateStack(
void
);

void *
hpss_Cfg_PeekStack(
hpss_cfg_parser_stack_p const stack /* IN */
);

byte
hpss_Cfg_IsStackEmpty(
hpss_cfg_parser_stack_p const stack /* IN */
);

unsigned16
hpss_Cfg_PushStack(
hpss_cfg_parser_stack_p const stack, /* IN */
const void * const object, /* IN */
size_t size /* IN */
);

void *
hpss_Cfg_PopStack(
hpss_cfg_parser_stack_p const stack /* IN */
);

unsigned16
hpss_Cfg_DepthStack(
hpss_cfg_parser_stack_p const stack /* IN */
);

void
hpss_Cfg_ClearStack(
hpss_cfg_parser_stack_p const stack /* IN */
);

void
hpss_Cfg_DestroyStack(
hpss_cfg_parser_stack_p stack /* IN */
);

typedef struct hpss_cfg_parser_addr_array_desc {
char IFName[20];
char DotAddress[16];
unsigned long Flags;
} hpss_cfg_parser_addr_array_t, *hpss_cfg_parser_addr_array_p;

int
hpss_Cfg_FindAddr(
hpss_cfg_parser_addr_array_p *output_array,
int *howmany );

#endif /* hpss_CfgParser_h */


hpss_cos.h

HPSS4.5

HPSS6.2

#ifndef hpss_cos_v0_0_included
#define hpss_cos_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif
#ifndef hpss_idl_types_v0_0_included
#include <hpss_idl_types.h>
#endif
#ifndef hpss_limits_v0_0_included
#include <hpss_limits.h>
#endif
#ifndef hpss_rw_ops_v0_0_included
#include <hpss_rw_ops.h>
#endif
typedef unsigned32 cos_t;

typedef struct {
unsigned32 COSId;
unsigned32 HierId;
idl_char COSName[32];
unsigned32 OptimumAccessSize;
unsigned32 Flags;
u_signed64 MinFileSize;
u_signed64 MaxFileSize;
unsigned32 AccessFrequency;
unsigned32 TransferRate;
unsigned32 AvgLatency;
unsigned32 WriteOps;
unsigned32 ReadOps;
unsigned32 StageCode;
} hpss_cos_md_t;





#define COS_ENFORCE_MAX_FILE_SIZE (1)
#define COS_FORCE_SELECTION (2)
#define COS_AUTO_STAGE_RETRY (4)
#define COS_STAGE_NO_STAGE (0)
#define COS_STAGE_ON_OPEN (1)
#define COS_STAGE_ON_OPEN_ASYNCH (2)
#define COS_STAGE_ON_OPEN_BACKGROUND (3)
#define FREQ_HOURLY (1)
#define FREQ_DAILY (2)
#define FREQ_WEEKLY (3)
#define FREQ_MONTHLY (4)
#define FREQ_ARCHIVE (5)

typedef struct {
unsigned32 COSId;
idl_char COSName[32];

u_signed64 OptimumAccessSize;
u_signed64 MinFileSize;
u_signed64 MaxFileSize;
unsigned32 AccessFrequency;
unsigned32 TransferRate;
unsigned32 AvgLatency;
unsigned32 WriteOps;
unsigned32 ReadOps;
unsigned32 StageCode;
unsigned32 StripeWidth;
u_signed64 StripeLength;
} hpss_cos_hints_t;





typedef struct {
unsigned32 COSIdPriority;
unsigned32 COSNamePriority;
unsigned32 OptimumAccessSizePriority;
unsigned32 MinFileSizePriority;
unsigned32 MaxFileSizePriority;
unsigned32 AccessFrequencyPriority;
unsigned32 TransferRatePriority;
unsigned32 AvgLatencyPriority;
unsigned32 WriteOpsPriority;
unsigned32 ReadOpsPriority;
unsigned32 StageCodePriority;
unsigned32 StripeWidthPriority;
unsigned32 StripeLengthPriority;
} hpss_cos_priorities_t;



#define NO_PRIORITY (0)
#define LOWEST_PRIORITY (5)
#define LOW_PRIORITY (10)
#define DESIRED_PRIORITY (15)
#define HIGHLY_DESIRED_PRIORITY (20)
#define REQUIRED_PRIORITY (30)

#ifdef __cplusplus
}

#endif









#endif

#ifndef _HPSS_COS_H_RPCGEN
#define _HPSS_COS_H_RPCGEN

#include <rpc/rpc.h>
#ifndef _hpss_cos_h
#define _hpss_cos_h








#include "hpss_types.h"


#include "hpss_limits.h"


#include "hpss_rw_ops.h"

typedef unsigned32 cos_t;

struct hpss_cos_md {
unsigned32 COSId;
unsigned32 HierId;
char COSName[HPSS_MAX_OBJECT_NAME];
unsigned32 OptimumAccessSize;
unsigned32 Flags;
u_signed64 MinFileSize;
u_signed64 MaxFileSize;
unsigned32 AccessFrequency;
unsigned32 TransferRate;
unsigned32 AvgLatency;
unsigned32 WriteOps;
unsigned32 ReadOps;
unsigned32 StageCode;
};
typedef struct hpss_cos_md hpss_cos_md;

typedef hpss_cos_md hpss_cos_md_t;

typedef hpss_cos_md COSStruct_t;
#define COS_ENFORCE_MAX_FILE_SIZE 0x00000001
#define COS_FORCE_SELECTION 0x00000002
#define COS_AUTO_STAGE_RETRY 0x00000004
#define COS_STAGE_NO_STAGE 0
#define COS_STAGE_ON_OPEN 1
#define COS_STAGE_ON_OPEN_ASYNCH 2
#define COS_STAGE_ON_OPEN_BACKGROUND 3
#define FREQ_HOURLY 1
#define FREQ_DAILY 2
#define FREQ_WEEKLY 3
#define FREQ_MONTHLY 4
#define FREQ_ARCHIVE 5

struct hpss_cos_hints {
unsigned32 COSId;
char COSName[HPSS_MAX_OBJECT_NAME];
unsigned32 Flags;
u_signed64 OptimumAccessSize;
u_signed64 MinFileSize;
u_signed64 MaxFileSize;
unsigned32 AccessFrequency;
unsigned32 TransferRate;
unsigned32 AvgLatency;
unsigned32 WriteOps;
unsigned32 ReadOps;
unsigned32 StageCode;
unsigned32 StripeWidth;
u_signed64 StripeLength;
};
typedef struct hpss_cos_hints hpss_cos_hints;

typedef hpss_cos_hints hpss_cos_hints_t;
#define HINTS_FORCE_MAX_SSEG 0x00000001

struct hpss_cos_priorities {
unsigned32 COSIdPriority;
unsigned32 COSNamePriority;
unsigned32 OptimumAccessSizePriority;
unsigned32 MinFileSizePriority;
unsigned32 MaxFileSizePriority;
unsigned32 AccessFrequencyPriority;
unsigned32 TransferRatePriority;
unsigned32 AvgLatencyPriority;
unsigned32 WriteOpsPriority;
unsigned32 ReadOpsPriority;
unsigned32 StageCodePriority;
unsigned32 StripeWidthPriority;
unsigned32 StripeLengthPriority;
};
typedef struct hpss_cos_priorities hpss_cos_priorities;

typedef hpss_cos_priorities hpss_cos_priorities_t;
#define NO_PRIORITY 0
#define LOWEST_PRIORITY 5
#define LOW_PRIORITY 10
#define DESIRED_PRIORITY 15
#define HIGHLY_DESIRED_PRIORITY 20
#define REQUIRED_PRIORITY 30
#endif




extern bool_t xdr_cos_t();
extern bool_t xdr_hpss_cos_md();
extern bool_t xdr_hpss_cos_md_t();
extern bool_t xdr_COSStruct_t();
extern bool_t xdr_hpss_cos_hints();
extern bool_t xdr_hpss_cos_hints_t();
extern bool_t xdr_hpss_cos_priorities();
extern bool_t xdr_hpss_cos_priorities_t();

#endif /* !_HPSS_COS_H_RPCGEN */


hpss_dirent.h

HPSS4.5

HPSS6.2

#if RPC_XDR
#undef hpss_dirent_h
#endif

#ifndef hpss_dirent_h
#define hpss_dirent_h

#include <sys/types.h>

#include "hpss_types.h"
#include "hpss_limits.h"
#include "ns_IFStructs.h"

typedef struct hpss_dirent {
unsigned32 d_offset;
ns_ObjHandle_t d_handle;
unsigned16 d_reclen;
unsigned16 d_namelen;
char d_name[HPSS_MAX_FILE_NAME];
} hpss_dirent_t;

#if !(RPC_XDR)
#endif /* hpss_dirent_h */
#endif

#if RPC_XDR
#undef hpss_dirent_h
#endif

#ifndef hpss_dirent_h
#define hpss_dirent_h

#include <sys/types.h>

#include "hpss_types.h"
#include "hpss_limits.h"
#include "ns_interface_defs.h"

typedef struct hpss_dirent {
u_signed64 d_offset; /* Offset of next entry/
ns_ObjHandle_t d_handle; /* HPSS Name Server handle */
unsigned16 d_reclen; /* Record length */
unsigned16 d_namelen; /* Length of entry name */
char d_name[HPSS_MAX_FILE_NAME]; /* Directory entry name */
} hpss_dirent_t;

#if !(RPC_XDR)
#endif /* hpss_dirent_h */
#endif


hpss_env_def.h

HPSS4.5

HPSS6.2

#ifndef mm_config_defs_h
#define mm_config_defs_h
#define HPSS_ENV_FILE

typedef struct env {
char *name;
char *def;
char *value;
} env_t;

static env_t hpss_env_defs[] = {

{ "HPSS_ROOT", "/opt/hpss" },
{ "HPSS_HOST", "%H" },
{ "HPSS_KEYTAB_FILE_SERVER", "/krb5/hpss.keytabs" },
{ "HPSS_KEYTAB_FILE_CLIENT", "/krb5/hpssclient.keytab" },

{ "HPSS_PATH", "${HPSS_ROOT}" },

{ "HPSS_PATH_BIN", "${HPSS_PATH}/bin" },



{ "HPSS_PATH_SLASH_BIN", "/bin" },
{ "HPSS_PATH_SLASH_ETC", "/etc" },
{ "HPSS_PATH_USR_BIN", "/usr/bin" },
{ "HPSS_PATH_USR_SBIN", "/usr/sbin" },
{ "HPSS_PATH_VAR", "/var/hpss" },
{ "HPSS_USER", "hpss" },
{ "HPSS_USERROOT", "root" },

{ "HPSS_PATH_SAMMI_BIN", "$HPSS_PATH_SAMMI_INSTALL/bin" },
{ "HPSS_PATH_SAMMI_DATA", "$HPSS_PATH_SAMMI_INSTALL/data" },




{ "HPSS_GRP_NAME", "hpss" },
{ "HPSS_GRP_NAME_SERVER", "hpss_server" },
{ "HPSS_GRP_NAME_CLIENT", "hpss_client" },

{ "HPSS_PRINCIPAL", NULL, },
{ "HPSS_PRINCIPAL_BFS", "hpss_bfs", },
{ "HPSS_PRINCIPAL_CLIENT_API", "hpss_client_api", },

{ "HPSS_PRINCIPAL_DMG", "hpss_dmg", },
{ "HPSS_PRINCIPAL_FTPD", "hpss_ftp", },
{ "HPSS_PRINCIPAL_GK", "hpss_gk", },

{ "HPSS_PRINCIPAL_HPSSD", "hpss_hpssd", },
{ "HPSS_PRINCIPAL_LOG", "hpss_log", },
{ "HPSS_PRINCIPAL_LS", "hpss_ls", },

{ "HPSS_PRINCIPAL_MM", "hpss_mmon", },
{ "HPSS_PRINCIPAL_MOUNTD", "hpss_mountd", },
{ "HPSS_PRINCIPAL_MPS", "hpss_mps", },
{ "HPSS_PRINCIPAL_MVR", "hpss_mvr", },
{ "HPSS_PRINCIPAL_NDCG", "hpss_ndcg", },
{ "HPSS_PRINCIPAL_NFSD", "hpss_nfs", },
{ "HPSS_PRINCIPAL_NS", "hpss_cns", },
{ "HPSS_PRINCIPAL_PFSD", "hpss_piofsie", },
{ "HPSS_PRINCIPAL_PVL", "hpss_pvl", },
{ "HPSS_PRINCIPAL_PVR", "hpss_pvr", },
{ "HPSS_PRINCIPAL_SS", "hpss_ss", },
{ "HPSS_PRINCIPAL_SSM", "hpss_ssm", },


{ "HPSS_PRINCIPAL_BFS_UID", "", },
{ "HPSS_PRINCIPAL_CLIENT_API_UID", "", },

{ "HPSS_PRINCIPAL_DMG_UID", "", },
{ "HPSS_PRINCIPAL_FTPD_UID", "", },
{ "HPSS_PRINCIPAL_GK_UID", "", },

{ "HPSS_PRINCIPAL_HPSSD_UID", "", },
{ "HPSS_PRINCIPAL_LOG_UID", "", },
{ "HPSS_PRINCIPAL_LS_UID", "", },

{ "HPSS_PRINCIPAL_MM_UID", "", },
{ "HPSS_PRINCIPAL_MOUNTD_UID", "", },
{ "HPSS_PRINCIPAL_MPS_UID", "", },
{ "HPSS_PRINCIPAL_MVR_UID", "", },
{ "HPSS_PRINCIPAL_NDCG_UID", "", },
{ "HPSS_PRINCIPAL_NFSD_UID", "", },
{ "HPSS_PRINCIPAL_NS_UID", "", },
{ "HPSS_PRINCIPAL_PFSD_UID", "", },
{ "HPSS_PRINCIPAL_PVL_UID", "", },
{ "HPSS_PRINCIPAL_PVR_UID", "", },
{ "HPSS_PRINCIPAL_SS_UID", "", },
{ "HPSS_PRINCIPAL_SSM_UID", "", },

{ "HPSS_EXEC_ACCT", "${HPSS_PATH_BIN}/hpss_acct" },

{ "HPSS_EXEC_BFS", "${HPSS_PATH_BIN}/hpss_bfs" },


{ "HPSS_EXEC_DMG", "${HPSS_PATH_BIN}/hpss_dmg" },

{ "HPSS_EXEC_FTPD", "${HPSS_PATH_BIN}/hpss_ftp" },

{ "HPSS_EXEC_GK", "${HPSS_PATH_BIN}/hpss_gk" },

{ "HPSS_EXEC_HPSSD", "${HPSS_PATH_BIN}/hpssd" },

{ "HPSS_EXEC_LOGC", "${HPSS_PATH_BIN}/hpss_logc" },

{ "HPSS_EXEC_LOGD", "${HPSS_PATH_BIN}/hpss_logd" },

{ "HPSS_EXEC_LS", "${HPSS_PATH_BIN}/hpss_ls" },

{ "HPSS_EXEC_MM", "${HPSS_PATH_BIN}/hpss_mmon" },
{ "HPSS_EXEC_MOUNTD", "${HPSS_PATH_BIN}/hpss_mnt" },

{ "HPSS_EXEC_MPS", "${HPSS_PATH_BIN}/hpss_mps" },

{ "HPSS_EXEC_MVR", "${HPSS_PATH_BIN}/hpss_mvr" },

{ "HPSS_EXEC_MVR_TCP", "${HPSS_PATH_BIN}/hpss_mvr_tcp" },

{ "HPSS_EXEC_NDCG", "${HPSS_PATH_BIN}/hpss_ndcg" },
{ "HPSS_EXEC_NFSD", "${HPSS_PATH_BIN}/hpss_nfs" },

{ "HPSS_EXEC_NS", "${HPSS_PATH_BIN}/hpss_cns" },
{ "HPSS_EXEC_PFSD", "${HPSS_PATH_BIN}/hpss_piofsie" },
{ "HPSS_EXEC_PVL", "${HPSS_PATH_BIN}/hpss_pvl" },

{ "HPSS_EXEC_PVR_AMPEX", "${HPSS_PATH_BIN}/hpss_pvr_ampex" },

{ "HPSS_EXEC_PVR_OPER", "${HPSS_PATH_BIN}/hpss_pvr_operator" },

{ "HPSS_EXEC_PVR_STK", "${HPSS_PATH_BIN}/hpss_pvr_stk" },

{ "HPSS_EXEC_PVR_3494", "${HPSS_PATH_BIN}/hpss_pvr_3494"},

{ "HPSS_EXEC_PVR_3495", "${HPSS_PATH_BIN}/hpss_pvr_3495"},

{ "HPSS_EXEC_PVR_LTO", "${HPSS_PATH_BIN}/hpss_pvr_lto"},

{ "HPSS_EXEC_PVR_AML", "${HPSS_PATH_BIN}/hpss_pvr_aml"},



{ "HPSS_EXEC_SSDISK", "${HPSS_PATH_BIN}/hpss_ss_disk" },
{ "HPSS_EXEC_SSTAPE", "${HPSS_PATH_BIN}/hpss_ss_tape" },
{ "HPSS_EXEC_SSMDS", "${HPSS_PATH_BIN}/hpss_ssmds" },
{ "HPSS_EXEC_SSMSM", "${HPSS_PATH_BIN}/hpss_ssmsm" },


{ "HPSS_EXEC_ACL_EDIT", "${HPSS_PATH_SLASH_BIN}/acl_edit" },

{ "HPSS_EXEC_CDSCP", "${HPSS_PATH_SLASH_BIN}/cdscp" },

{ "HPSS_EXEC_DELOG", "${HPSS_PATH_BIN}/hpss_delog" },

{ "HPSS_EXEC_RECLAIM", "${HPSS_PATH_BIN}/reclaim.ksh" },

{ "HPSS_EXEC_REPACK", "${HPSS_PATH_BIN}/repack" },


{ "HPSS_PATH_LOG", "${HPSS_PATH_VAR}/log" },

{ "HPSS_UNIX_LOCAL_LOG", "${HPSS_PATH_LOG}/local.log" },


{ "HPSS_PATH_ACCT", "${HPSS_PATH_VAR}/acct" },
{ "HPSS_UNIX_ACCT_CHECKPOINT", "${HPSS_PATH_ACCT}/acct_checkpoint" },

{ "HPSS_UNIX_ACCT_REPORT", "${HPSS_PATH_ACCT}/acct_report" },

{ "HPSS_UNIX_ACCT_COMMENTARY", "${HPSS_PATH_ACCT}/acct_commentary" },

{ "HPSS_PATH_NFS", "${HPSS_PATH_VAR}/nfs" },

{ "HPSS_UNIX_NFS_EXPORTS", "${HPSS_PATH_NFS}/exports" },

{ "HPSS_UNIX_NFS_CREDMAP", "${HPSS_PATH_NFS}/credmap.nfs" },

{ "HPSS_UNIX_NFS_CACHEFILE", "${HPSS_PATH_NFS}/cachefile.nfs" },

{ "HPSS_UNIX_NFS_CHECKPOINT", "${HPSS_PATH_NFS}/checkpoint.nfs" },

{ "HPSS_NFS_DISABLE_JUNCTIONS", "TRUE" },
{ "HPSS_MNT_DISABLE_JUNCTIONS", "TRUE" },

{ "HPSS_PATH_MPS", "${HPSS_PATH_VAR}/mps" },

{ "HPSS_UNIX_MPS_REPORT", "" },

{ "HPSS_PATH_GK", "${HPSS_PATH_VAR}/gk" },
{ "HPSS_UNIX_GK_SITE_POLICY", "${HPSS_PATH_GK}/gksitepolicy" },


{ "HPSS_SFS", "hpss" },
{ "HPSS_SFS_SERVER", "/.:/encina/sfs/${HPSS_SFS}" },
{ "HPSS_SFS_SUFFIX", "" },
{ "ENCINA_LOCAL", "/opt/encinalocal" },
{ "ENCINA_MIRROR", "/opt/encinamirror" },

{ "HPSS_CONFIG_GLOBAL",
"${HPSS_SFS_SERVER}/globalconfig${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_STORSUBSYS",
"${HPSS_SFS_SERVER}/storsubsysconfig${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_COS",
"${HPSS_SFS_SERVER}/cos${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_HIERARCHY",
"${HPSS_SFS_SERVER}/hierarchy${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_STORAGECLASS",
"${HPSS_SFS_SERVER}/storageclass${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_SCLASS", "${HPSS_CONFIG_STORAGECLASS}" },
{ "HPSS_CONFIG_SCLASSTHRESHOLD",
"${HPSS_SFS_SERVER}/sclassthreshold${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_NSGLOBALFILESETS",
"${HPSS_SFS_SERVER}/nsglobalfilesets${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_FILE_FAMILY",
"${HPSS_SFS_SERVER}/filefamily${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_ACCOUNTING",
"${HPSS_SFS_SERVER}/accounting${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_ACCT", "${HPSS_CONFIG_ACCOUNTING}" },
{ "HPSS_CONFIG_ACCTSUM",
"${HPSS_SFS_SERVER}/acctsum${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_LOGPOLICY",
"${HPSS_SFS_SERVER}/logpolicy${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_LOGP", "${HPSS_CONFIG_LOGPOLICY}" },
{ "HPSS_CONFIG_LSPOLICY",
"${HPSS_SFS_SERVER}/lspolicy${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_LS", "${HPSS_CONFIG_LSPOLICY}" },
{ "HPSS_CONFIG_MIGPOLICY",
"${HPSS_SFS_SERVER}/migpolicy${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_MIGRP", "${HPSS_CONFIG_MIGPOLICY}" },
{ "HPSS_CONFIG_MOVERDEVICE",
"${HPSS_SFS_SERVER}/moverdevice${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_PURGEPOLICY",
"${HPSS_SFS_SERVER}/purgepolicy${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_PURGP", "${HPSS_CONFIG_PURGEPOLICY}" },
{ "HPSS_CONFIG_SERVER",
"${HPSS_SFS_SERVER}/serverconfig${HPSS_SFS_SUFFIX}" },

{ "HPSS_CONFIG_BFMIGRREC",
"${HPSS_SFS_SERVER}/bfmigrrec${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_BFPURGEREC",
"${HPSS_SFS_SERVER}/bfpurgerec${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_ACCTLOG",
"${HPSS_SFS_SERVER}/acctlog${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_BITFILE",
"${HPSS_SFS_SERVER}/bitfile${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_BFCOSCHANGE",
"${HPSS_SFS_SERVER}/bfcoschange${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_BFDISKSEGMENT",
"${HPSS_SFS_SERVER}/bfdisksegment${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_BFTAPESEGMENT",
"${HPSS_SFS_SERVER}/bftapesegment${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_BFDISKALLOCREC",
"${HPSS_SFS_SERVER}/bfdiskallocrec${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_BFSSSEGCHKPT",
"${HPSS_SFS_SERVER}/bfsssegchkpt${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_BFSSUNLINK",
"${HPSS_SFS_SERVER}/bfssunlink${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_NSACLS",
"${HPSS_SFS_SERVER}/nsacls${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_NSFILESETATTRS",
"${HPSS_SFS_SERVER}/nsfilesetattrs${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_NSOBJECTS",
"${HPSS_SFS_SERVER}/nsobjects${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_NSTEXT",
"${HPSS_SFS_SERVER}/nstext${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_MPCHKPT",
"${HPSS_SFS_SERVER}/mpchkpt${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_SSPVDISK",
"${HPSS_SFS_SERVER}/sspvdisk${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_SSPVTAPE",
"${HPSS_SFS_SERVER}/sspvtape${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_STORAGEMAPDISK",
"${HPSS_SFS_SERVER}/storagemapdisk${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_STORAGEMAPTAPE",
"${HPSS_SFS_SERVER}/storagemaptape${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_STORAGESEGDISK",
"${HPSS_SFS_SERVER}/storagesegdisk${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_STORAGESEGTAPE",
"${HPSS_SFS_SERVER}/storagesegtape${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_VVDISK",
"${HPSS_SFS_SERVER}/vvdisk${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_VVTAPE",
"${HPSS_SFS_SERVER}/vvtape${HPSS_SFS_SUFFIX}" },

{ "HPSS_CONFIG_ACCTSNAP",
"${HPSS_SFS_SERVER}/acctsnap${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_ACCTVALIDATE",
"${HPSS_SFS_SERVER}/acctvalidate${HPSS_SFS_SUFFIX}" },

{ "HPSS_CONFIG_BFS",
"${HPSS_SFS_SERVER}/bfs${HPSS_SFS_SUFFIX}" },

{ "HPSS_CONFIG_NS",
"${HPSS_SFS_SERVER}/nsconfig${HPSS_SFS_SUFFIX}" },

{ "HPSS_CONFIG_DMG",
"${HPSS_SFS_SERVER}/dmg${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_DMGFILESET",
"${HPSS_SFS_SERVER}/dmgfileset${HPSS_SFS_SUFFIX}" },

{ "HPSS_CONFIG_GK",
"${HPSS_SFS_SERVER}/gkconfig${HPSS_SFS_SUFFIX}" },

{ "HPSS_CONFIG_LOGC",
"${HPSS_SFS_SERVER}/logclient${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_LOGD",
"${HPSS_SFS_SERVER}/logdaemon${HPSS_SFS_SUFFIX}" },

{ "HPSS_CONFIG_SITE",
"${HPSS_SFS_SERVER}/site${HPSS_SFS_SUFFIX}" },

{ "HPSS_CONFIG_MM",
"${HPSS_SFS_SERVER}/mmonitor${HPSS_SFS_SUFFIX}" },

{ "HPSS_CONFIG_MPS",
"${HPSS_SFS_SERVER}/mps${HPSS_SFS_SUFFIX}" },

{ "HPSS_CONFIG_MVR",
"${HPSS_SFS_SERVER}/mover${HPSS_SFS_SUFFIX}" },

{ "HPSS_CONFIG_NDCG",
"${HPSS_SFS_SERVER}/ndcg${HPSS_SFS_SUFFIX}" },


{ "HPSS_CONFIG_NFSD",
"${HPSS_SFS_SERVER}/nfs${HPSS_SFS_SUFFIX}" },

{ "HPSS_CONFIG_PVL",
"${HPSS_SFS_SERVER}/pvl${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_PVLACTIVITY",
"${HPSS_SFS_SERVER}/pvlactivity${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_PVLDRIVE",
"${HPSS_SFS_SERVER}/pvldrive${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_PVLJOB",
"${HPSS_SFS_SERVER}/pvljob${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_PVLPV",
"${HPSS_SFS_SERVER}/pvlpv${HPSS_SFS_SUFFIX}" },

{ "HPSS_CONFIG_PVR",
"${HPSS_SFS_SERVER}/pvr${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_CART_AMPEX",
"${HPSS_SFS_SERVER}/cartridge_ampex${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_CART_OPER",
"${HPSS_SFS_SERVER}/cartridge_operator${HPSS_SFS_SUFFIX}"},
{ "HPSS_CONFIG_CART_STK",
"${HPSS_SFS_SERVER}/cartridge_stk${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_CART_STK_RAIT",
"${HPSS_SFS_SERVER}/cartridge_stk_rait${HPSS_SFS_SUFFIX}"},
{ "HPSS_CONFIG_CART_3494",
"${HPSS_SFS_SERVER}/cartridge_3494${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_CART_3495",
"${HPSS_SFS_SERVER}/cartridge_3495${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_CART_LTO",
"${HPSS_SFS_SERVER}/cartridge_lto${HPSS_SFS_SUFFIX}" },
{ "HPSS_CONFIG_CART_AML",
"${HPSS_SFS_SERVER}/cartridge_aml${HPSS_SFS_SUFFIX}" },

{ "HPSS_CONFIG_SS",
"${HPSS_SFS_SERVER}/ss${HPSS_SFS_SUFFIX}" },


{ "HPSS_CDS_PREFIX", "/.:/hpss" },

{ "HPSS_CDS_BFS", "${HPSS_CDS_PREFIX}/bfs" },
{ "HPSS_CDS_DMG", "${HPSS_CDS_PREFIX}/dmg" },
{ "HPSS_CDS_GK", "${HPSS_CDS_PREFIX}/gk" },
{ "HPSS_CDS_HPSSD", "${HPSS_CDS_PREFIX}/hpssd" },
{ "HPSS_CDS_LOGC", "${HPSS_CDS_PREFIX}/logc" },
{ "HPSS_CDS_LOGD", "${HPSS_CDS_PREFIX}/logd" },
{ "HPSS_CDS_LS", "${HPSS_CDS_PREFIX}/ls" },
{ "HPSS_CDS_MM", "${HPSS_CDS_PREFIX}/mmonitor" },
{ "HPSS_CDS_MOUNTD", "${HPSS_CDS_PREFIX}/mountd" },
{ "HPSS_CDS_MPS", "${HPSS_CDS_PREFIX}/mps" },
{ "HPSS_CDS_MVR", "${HPSS_CDS_PREFIX}/mvr" },
{ "HPSS_CDS_NDCG", "${HPSS_CDS_PREFIX}/ndcg" },
{ "HPSS_CDS_NFSD", "${HPSS_CDS_PREFIX}/nfs" },
{ "HPSS_CDS_NS", "${HPSS_CDS_PREFIX}/cns" },
{ "HPSS_CDS_PFSD", "${HPSS_CDS_PREFIX}/piofsie" },
{ "HPSS_CDS_PVL", "${HPSS_CDS_PREFIX}/pvl" },
{ "HPSS_CDS_PVR_AMPEX", "${HPSS_CDS_PREFIX}/pvr_ampex" },
{ "HPSS_CDS_PVR_OPER", "${HPSS_CDS_PREFIX}/pvr_operator"},
{ "HPSS_CDS_PVR_STK", "${HPSS_CDS_PREFIX}/pvr_stk" },
{ "HPSS_CDS_PVR_STK_RAIT", "${HPSS_CDS_PREFIX}/pvr_stk_rait"},
{ "HPSS_CDS_PVR_3494", "${HPSS_CDS_PREFIX}/pvr_3494" },
{ "HPSS_CDS_PVR_3495", "${HPSS_CDS_PREFIX}/pvr_3495" },
{ "HPSS_CDS_PVR_LTO", "${HPSS_CDS_PREFIX}/pvr_lto" },
{ "HPSS_CDS_PVR_AML", "${HPSS_CDS_PREFIX}/pvr_aml" },
{ "HPSS_CDS_SSDISK", "${HPSS_CDS_PREFIX}/ssdisk" },
{ "HPSS_CDS_SSTAPE", "${HPSS_CDS_PREFIX}/sstape" },
{ "HPSS_CDS_SSMDS", "${HPSS_CDS_PREFIX}/ssmds" },
{ "HPSS_CDS_SSMSM", "${HPSS_CDS_PREFIX}/ssmsm" },












{ "HPSS_DESC_BFS", "BFS" },


{ "HPSS_DESC_DMG", "DMAP Gateway" },
{ "HPSS_DESC_FTPD", "FTP Daemon" },
{ "HPSS_DESC_GK", "Gatekeeper Server" },
{ "HPSS_DESC_HPSSD", "Startup Daemon (${HPSS_HOST})" },



{ "HPSS_DESC_LOGC", "Log Client (${HPSS_HOST})" },


{ "HPSS_DESC_LOGD", "Log Daemon" },
{ "HPSS_DESC_LS", "Location Server" },
{ "HPSS_DESC_MM", "Metadata Monitor" },
{ "HPSS_DESC_MOUNTD", "Mount Daemon" },
{ "HPSS_DESC_MPS", "Migration/Purge Server" },

{ "HPSS_DESC_MVR", "Mover (${HPSS_HOST})" },


{ "HPSS_DESC_NDCG", "Non-DCE Gateway" },
{ "HPSS_DESC_NFSD", "NFS Daemon" },
{ "HPSS_DESC_NS", "Name Server" },
{ "HPSS_DESC_PFSD", "PIOFS Import/Export" },
{ "HPSS_DESC_PVL", "PVL" },
{ "HPSS_DESC_PVR_AMPEX", "Ampex PVR" },
{ "HPSS_DESC_PVR_OPER", "Operator PVR" },
{ "HPSS_DESC_PVR_STK", "STK PVR" },
{ "HPSS_DESC_PVR_STK_RAIT", "STK RAIT PVR" },

{ "HPSS_DESC_PVR_3494", "3494 PVR" },
{ "HPSS_DESC_PVR_3495", "3495 PVR" },
{ "HPSS_DESC_PVR_LTO", "3584 LTO PVR" },
{ "HPSS_DESC_PVR_AML", "AML PVR" },

{ "HPSS_DESC_SSDISK", "Disk Storage Server" },
{ "HPSS_DESC_SSTAPE", "Tape Storage Server" },
{ "HPSS_DESC_SSMSM", "SSM System Manager" },


{ "HPSS_SM_SRV_CONNECT_FAIL_COUNT", "3" },
{ "HPSS_SM_SRV_CONNECT_INTERVAL_MIN", "20" },
{ "HPSS_SM_SRV_CONNECT_INTERVAL_MAX", "60" },
{ "HPSS_SM_SRV_LIST_UPDATE_INTERVAL", "5" },
{ "HPSS_SM_SRV_MONITOR_THREADS", "10" },
{ "ENCINA_TPOOL_SIZE", "100" },

{ "HPSS_NOTIFY_Q_DATA_THREADS", "1" },
{ "HPSS_NOTIFY_Q_LIST_THREADS", "1" },
{ "HPSS_NOTIFY_Q_LOG_THREADS", "1" },
{ "HPSS_NOTIFY_Q_TAPE_THREADS", "1" },
{ "HPSS_NOTIFY_Q_TAPE_CHECKIN_THREADS", "1" },

{ "HPSS_NOTIFY_Q_DATA_SIZE_MAX", "500" },
{ "HPSS_NOTIFY_Q_LIST_SIZE_MAX", "500" },
{ "HPSS_NOTIFY_Q_LOG_SIZE_MAX", "500" },
{ "HPSS_NOTIFY_Q_TAPE_SIZE_MAX", "500" },
{ "HPSS_NOTIFY_Q_TAPE_SIZE_CHECKIN_MAX","500" },

{ "HPSS_PATH_SSM", "${HPSS_PATH_VAR}/ssm" },










{ "HPSS_ALARMS_SSMDS", NULL },
{ "HPSS_PORT_SSMDS", "0x20000069" },

{ "HPSS_SSMDS_COUNTRY", "US" },
{ "HPSS_SSMDS_LANGUAGE", "en" },
{ "HPSS_SSMDS_INTERVAL", "60000000" },
{ "HPSS_SSMDS_RMI_HOST", NULL },
{ "HPSS_SSMDS_RMI_NAME", "HPSS_DataServer" },
{ "HPSS_SSMDS_RMI_PORT", "1066" },
{ "HPSS_SSMDS_KEYSTORE", "${HPSS_PATH_VAR}/ssm/keystore.ds" },
{ "HPSS_SSMDS_KEYSTORE_PW","${HPSS_PATH_VAR}/ssm/keystore.ds.pw" },
{ "HPSS_SSMDS_JAVA_CONFIG","${HPSS_PATH_VAR}/ssm/hpssadm.config" },
{ "HPSS_SSMDS_JAVA_POLICY","${HPSS_PATH_VAR}/ssm/java.policy.ds" },
{ "HPSS_HPSSADM_JAVA_POLICY",
"${HPSS_PATH_VAR}/ssm/java.policy.hpssadm" },


























{ "JAVA_ROOT", "/usr/java130" },
{ "JAVA_HOME", "${JAVA_ROOT}/jre" },
{ "JAVA_BIN", "${JAVA_ROOT}/bin" },

{ "JAVA_LIB1", "${JAVA_HOME}/lib" },
{ "JAVA_LIB2", "${JAVA_ROOT}/bin:${JAVA_ROOT}/bin/classic"},
{ "JAVA_LIB3", "${HPSS_ROOT}/lib" },
{ "HPSS_SSMDS_LIBPATH", "${JAVA_LIB2}:${JAVA_LIB3}" },
{ "JAVA_CLS1", "${JAVA_LIB1}/rt.jar" },
{ "JAVA_CLS2", "${HPSS_ROOT}/bin/hpssadm.jar" },
{ "JAVA_CLS3", "${HPSS_ROOT}/bin/mobjects.jar" },
{ "HPSS_SSMDS_CLASSPATH", "${JAVA_CLS1}:${JAVA_CLS2}:${JAVA_CLS3}" },
{ "AIXTHREAD_MNRATIO", "1:1" },
{ "AIXTHREAD_SCOPE", "S" },
{ "AIXTHREAD_MUTEX_DEBUG", "OFF" },
{ "AIXTHREAD_RWLOCK_DEBUG","OFF" },
{ "AIXTHREAD_COND_DEBUG", "OFF" },









































{ "HPSS_HDM_SERVER_ID", "1" },
{ "HPSS_HDM_SHMEM_KEY", "3789" },

{ "HPSS_PATH_HDM", "${HPSS_PATH_VAR}/hdm" },






{ "HPSSLOG_SHMKEY", "2801" },


{ "HPSSLOGGER", "" },











{ "HPSS_PATH_FTP", "${HPSS_PATH_VAR}/ftp" },

{ "HPSS_FTPD_CONTROL_PORT", "4021" },
{ "HPSS_FTP_RESERVED", "1025" },
{ "HPSS_FTP_BLOCK_SIZE", "4" },

{ "HPSS_LS_NAME", "${HPSS_CDS_LS}/group" },
{ "HPSS_NDCG_KRB5_SERVICENAME", "ndcg" },
































































{ "HPSS_KRB_TO_DCE_FILE", "${HPSS_PATH_ETC}/krb5_Realms_to_DCE_Cells" },
{ "HPSS_KCHILD_PATH", "${HPSS_PATH_BIN}/ndcg_kchild" },
{ "HPSS_KCHILD_KEYTAB", "/krb5/v5srvtab" },
{ "HPSS_NDCL_KEY_CONFIG_FILE", "${HPSS_PATH_ETC}/ndcl.keyconfig" },

{ "RPC_SUPPORTED_PROTSEQS", "ncadg_ip_udp" },
{ "HPSS_PATH_ADM", "${HPSS_PATH_VAR}/adm" },

{ "HPSS_PATH_CORE", "${HPSS_PATH_ADM}/core" },

{ "HPSS_PATH_TMP", "${HPSS_PATH_VAR}/tmp" },

{ "HPSS_PATH_ETC", "${HPSS_PATH_VAR}/etc" },



{ "HPSS_AUTH_LEVEL", "2" },



{ NULL, NULL, }
};

#endif

#ifndef hpss_env_defs_h
#define hpss_env_defs_h


typedef struct env {
char *name;
char *def;
char *value;
} env_t;

static env_t hpss_env_defs[] = {

{ "HPSS_ROOT", "/opt/hpss", NULL},
{ "HPSS_HOST", "%H", NULL},


{ "HPSS_NODE_TYPE", NULL, NULL},

{ "HPSS_PATH_INSTALL", "/opt/hpss", NULL},
{ "HPSS_PATH_BIN", "${HPSS_PATH_INSTALL}/bin", NULL},
{ "HPSS_PATH_MSG", "${HPSS_PATH_INSTALL}/msg/En_US", NULL},
{ "HPSS_PATH_SLASH_BIN", "/bin", NULL},
{ "HPSS_PATH_SLASH_ETC", "/etc", NULL},
{ "HPSS_PATH_USR_BIN", "/usr/bin", NULL},
{ "HPSS_PATH_USR_SBIN", "/usr/sbin", NULL},
{ "HPSS_PATH_VAR", "/var/hpss", NULL},
{ "HPSS_USER", "hpss", NULL},
{ "HPSS_USERROOT", "root", NULL},
{ "HPSS_PATH_DB_INSTALL", NULL, NULL},


{ "HPSS_SYSTEM", "%S", NULL},
{ "HPSS_SYSTEM_VERSION", "%V", NULL},
{ "HPSS_HOST_FULL_NAME", "%L", NULL},

{ "HPSS_GRP_NAME", "hpss", NULL},
{ "HPSS_GRP_NAME_SERVER", "hpsssrvr", NULL},
{ "HPSS_GRP_NAME_CLIENT", "hpss_client", NULL},

{ "HPSS_PRINCIPAL", NULL, NULL},


{ "HPSS_PRINCIPAL_CORE", "hpsscore", NULL},
{ "HPSS_PRINCIPAL_DMG", "hpssdmg", NULL},
{ "HPSS_PRINCIPAL_FTPD", "hpssftp", NULL},
{ "HPSS_PRINCIPAL_GK", "hpssgk", NULL},
{ "HPSS_PRINCIPAL_HDM", "hpsshdm", NULL},
{ "HPSS_PRINCIPAL_HPSSD", "hpsssd", NULL},
{ "HPSS_PRINCIPAL_LOG", "hpsslog", NULL},
{ "HPSS_PRINCIPAL_LS", "hpssls", NULL},
{ "HPSS_PRINCIPAL_FS", "hpssfs", NULL},

{ "HPSS_PRINCIPAL_MOUNTD", "hpssmntd", NULL},
{ "HPSS_PRINCIPAL_MPS", "hpssmps", NULL},
{ "HPSS_PRINCIPAL_MVR", "hpssmvr", NULL},

{ "HPSS_PRINCIPAL_NFSD", "hpssnfs", NULL},


{ "HPSS_PRINCIPAL_PVL", "hpsspvl", NULL},
{ "HPSS_PRINCIPAL_PVR", "hpsspvr", NULL},

{ "HPSS_PRINCIPAL_SSM", "hpssssm", NULL},
{ "HPSS_PRINCIPAL_ADM_USER", "${HPSS_USER}", NULL},


{ "HPSS_PRINCIPAL_CORE_UID", "", NULL},
{ "HPSS_PRINCIPAL_DMG_UID", "", NULL},
{ "HPSS_PRINCIPAL_FTPD_UID", "", NULL},
{ "HPSS_PRINCIPAL_GK_UID", "", NULL},
{ "HPSS_PRINCIPAL_HDM_UID", "", NULL},
{ "HPSS_PRINCIPAL_HPSSD_UID", "", NULL},
{ "HPSS_PRINCIPAL_LOG_UID", "", NULL},
{ "HPSS_PRINCIPAL_LS_UID", "", NULL},
{ "HPSS_PRINCIPAL_FS_UID", "", NULL},

{ "HPSS_PRINCIPAL_MOUNTD_UID", "", NULL},
{ "HPSS_PRINCIPAL_MPS_UID", "", NULL},
{ "HPSS_PRINCIPAL_MVR_UID", "", NULL},

{ "HPSS_PRINCIPAL_NFSD_UID", "", NULL},


{ "HPSS_PRINCIPAL_PVL_UID", "", NULL},
{ "HPSS_PRINCIPAL_PVR_UID", "", NULL},

{ "HPSS_PRINCIPAL_SSM_UID", "", NULL},

{ "HPSS_EXEC_ACCT", "${HPSS_PATH_BIN}/hpss_acct",NULL},

{ "HPSS_EXEC_CORE", "${HPSS_PATH_BIN}/hpss_core",NULL},
{ "HPSS_EXEC_DMG", "${HPSS_PATH_BIN}/hpss_dmg",NULL},
{ "HPSS_EXEC_FTPD", "${HPSS_PATH_BIN}/hpss_pftpd",NULL},
{ "HPSS_EXEC_GK", "${HPSS_PATH_BIN}/hpss_gk",NULL},
{ "HPSS_EXEC_HPSSD", "${HPSS_PATH_BIN}/hpssd",NULL},
{ "HPSS_EXEC_LOGC", "${HPSS_PATH_BIN}/hpss_logc",NULL},
{ "HPSS_EXEC_LOGD", "${HPSS_PATH_BIN}/hpss_logd",NULL},
{ "HPSS_EXEC_LS", "${HPSS_PATH_BIN}/hpss_ls",NULL},

{ "HPSS_EXEC_MOUNTD", "${HPSS_PATH_BIN}/hpss_mnt",NULL},
{ "HPSS_EXEC_MPS", "${HPSS_PATH_BIN}/hpss_mps",NULL},
{ "HPSS_EXEC_MVR", "${HPSS_PATH_BIN}/hpss_mvr",NULL},
{ "HPSS_EXEC_MVR_TCP", "${HPSS_PATH_BIN}/hpss_mvr_tcp",NULL},

{ "HPSS_EXEC_NFSD", "${HPSS_PATH_BIN}/hpss_nfs",NULL},


{ "HPSS_EXEC_PVL", "${HPSS_PATH_BIN}/hpss_pvl",NULL},
{ "HPSS_EXEC_PVR_AMPEX", "${HPSS_PATH_BIN}/hpss_pvr_ampex",NULL},
{ "HPSS_EXEC_PVR_OPER", "${HPSS_PATH_BIN}/hpss_pvr_operator",NULL},
{ "HPSS_EXEC_PVR_STK", "${HPSS_PATH_BIN}/hpss_pvr_stk",NULL},
{ "HPSS_EXEC_PVR_3494", "${HPSS_PATH_BIN}/hpss_pvr_3494",NULL},
{ "HPSS_EXEC_PVR_3495", "${HPSS_PATH_BIN}/hpss_pvr_3495",NULL},
{ "HPSS_EXEC_PVR_LTO", "${HPSS_PATH_BIN}/hpss_pvr_lto",NULL},
{ "HPSS_EXEC_PVR_AML", "${HPSS_PATH_BIN}/hpss_pvr_aml",NULL},
{ "HPSS_EXEC_PVR_SCSI", "${HPSS_PATH_BIN}/hpss_pvr_scsi",NULL},



{ "HPSS_EXEC_SSMSM", "${HPSS_PATH_BIN}/hpss_ssmsm",NULL},

{ "HPSS_EXEC_ACL_EDIT", "${HPSS_PATH_SLASH_BIN}/acl_edit",NULL},
{ "HPSS_EXEC_CDSCP", "${HPSS_PATH_SLASH_BIN}/cdscp",NULL},
{ "HPSS_EXEC_DELOG", "${HPSS_PATH_BIN}/hpss_delog",NULL},
{ "HPSS_EXEC_RECLAIM", "${HPSS_PATH_BIN}/reclaim",NULL},
{ "HPSS_EXEC_REPACK", "${HPSS_PATH_BIN}/repack",NULL},

{ "HPSS_PATH_LOG", "${HPSS_PATH_VAR}/log", NULL},
{ "HPSS_UNIX_LOCAL_LOG", "${HPSS_PATH_LOG}/local.log",NULL},

{ "HPSS_PATH_ACCT", "${HPSS_PATH_VAR}/acct",NULL},
{ "HPSS_UNIX_ACCT_CHECKPOINT", "${HPSS_PATH_ACCT}/acct_checkpoint",NULL},
{ "HPSS_UNIX_ACCT_REPORT", "${HPSS_PATH_ACCT}/acct_report",NULL},
{ "HPSS_UNIX_ACCT_COMMENTARY", "${HPSS_PATH_ACCT}/acct_commentary",NULL},

{ "HPSS_PATH_NFS", "${HPSS_PATH_VAR}/nfs", NULL},
{ "HPSS_UNIX_NFS_EXPORTS", "${HPSS_PATH_NFS}/exports",NULL},
{ "HPSS_UNIX_NFS_CREDMAP", "${HPSS_PATH_NFS}/credmap.nfs",NULL},
{ "HPSS_UNIX_NFS_CACHEFILE", "${HPSS_PATH_NFS}/cachefile.nfs",NULL},
{ "HPSS_UNIX_NFS_CHECKPOINT", "${HPSS_PATH_NFS}/checkpoint.nfs",NULL},
{ "HPSS_NFS_DISABLE_JUNCTIONS", "TRUE", NULL},
{ "HPSS_MNT_DISABLE_JUNCTIONS", "TRUE", NULL},

{ "HPSS_PATH_MPS", "${HPSS_PATH_VAR}/mps", NULL},
{ "HPSS_UNIX_MPS_REPORT", "", NULL},

{ "HPSS_PATH_GK", "${HPSS_PATH_VAR}/gk", NULL},
{ "HPSS_UNIX_GK_SITE_POLICY", "${HPSS_PATH_GK}/gksitepolicy",NULL},









































































































































































































{ "HPSS_DB_INSTANCE_OWNER", "hpssdb", NULL},
{ "HPSS_GLOBAL_DB_NAME", "cfg", NULL},
{ "HPSS_SUBSYS_DB_NAME", "subsys", NULL},
{ "HPSS_MM_SCHEMA_NAME", "HPSS", NULL},
{ "HPSS_MM_LOW_WATER_MARK", "1", NULL},
{ "HPSS_MM_HIGH_WATER_MARK", "5", NULL},
{ "HPSS_MM_CACHE", "", NULL},
{ "HPSS_SERVER_DB_GROUP", "HPSSSRVR", NULL},
{ "HPSS_SERVER_DB_KEYTAB", "${HPSS_PATH_ETC}/mm.keytab",NULL},


{ "HPSS_HOST_TMP", "%H", NULL},
{ "HPSS_DESC_CORE", "Core Server", NULL},
{ "HPSS_DESC_DMG", "DMAP Gateway", NULL},
{ "HPSS_DESC_FTPD", "FTP Daemon", NULL},
{ "HPSS_DESC_GK", "Gatekeeper", NULL},
{ "HPSS_DESC_HPSSD", "Startup Daemon (${HPSS_HOST_TMP})", NULL},
{ "HPSS_DESC_HPSSD_SHORT", "Startup Daemon", NULL},
{ "HPSS_DESC_LOGC", "Log Client (${HPSS_HOST_TMP})", NULL},
{ "HPSS_DESC_LOGC_SHORT", "Log Client", NULL},
{ "HPSS_DESC_LOGD", "Log Daemon", NULL},
{ "HPSS_DESC_LS", "Location Server", NULL},
{ "HPSS_DESC_MM", "Metadata Monitor", NULL},
{ "HPSS_DESC_MOUNTD", "Mount Daemon", NULL},
{ "HPSS_DESC_MPS", "Migration/Purge Server",NULL},
{ "HPSS_DESC_MVR", "Mover (${HPSS_HOST_TMP})", NULL},
{ "HPSS_DESC_MVR_SHORT", "Mover", NULL},

{ "HPSS_DESC_NFSD", "NFS Daemon", NULL},


{ "HPSS_DESC_PVL", "PVL", NULL},
{ "HPSS_DESC_PVR_AMPEX", "Ampex PVR", NULL},
{ "HPSS_DESC_PVR_OPER", "Operator PVR", NULL},
{ "HPSS_DESC_PVR_STK", "STK PVR", NULL},
{ "HPSS_DESC_PVR_STK_RAIT", "STK RAIT PVR", NULL},
{ "HPSS_DESC_PVR_3494", "3494 PVR", NULL},
{ "HPSS_DESC_PVR_3495", "3495 PVR", NULL},
{ "HPSS_DESC_PVR_LTO", "3584 LTO PVR", NULL},
{ "HPSS_DESC_PVR_AML", "AML PVR", NULL},
{ "HPSS_DESC_PVR_SCSI", "SCSI PVR", NULL},


{ "HPSS_DESC_SSMSM", "SSM System Manager", NULL},





















{ "HPSS_PATH_SSM", "${HPSS_PATH_VAR}/ssm", NULL},
{ "HPSS_SSM_ALARMS", NULL, NULL},
{ "HPSS_SSM_ALARMS_DISPLAY", "2000", NULL},
{ "HPSS_SSM_ALARMS_GET", "500", NULL},
{ "HPSS_SSM_COUNTRY", "US", NULL},
{ "HPSS_SSM_LANGUAGE", "en", NULL},
{ "HPSS_SSM_SERVER_LISTEN_PORT","0", NULL},
{ "HPSS_HELP_FILES_PATH", "${HPSS_PATH_VAR}/doc", NULL},
{ "HPSS_HELP_URL_TYPE", "file:", NULL},















{ "HPSSGUI_SM_HOST_NAME", "${HPSS_HOST}", NULL},
{ "HPSSADM_SM_HOST_NAME", "${HPSS_HOST}", NULL},
{ "HPSSGUI_SM_PORT_NUM", "536870913:1", NULL},
{ "HPSSADM_SM_PORT_NUM", "536870913:1", NULL},
{ "HPSSGUI_RPC_PROT_LEVEL", "${HPSS_RPC_PROT_LEVEL}",NULL},
{ "HPSSADM_RPC_PROT_LEVEL", "${HPSS_RPC_PROT_LEVEL}",NULL},
{ "HPSSSSM_UI_WAIT_TIME", "${SSM_UI_WAIT_TIME}", NULL},
{ "HPSSSSM_UI_MO_RATE", "${SSM_UI_MO_RATE}", NULL},
{ "HPSSSSM_UI_LIST_RATE", "${SSM_UI_LIST_RATE}", NULL},
{ "HPSSSSM_UI_ALARM_RATE", "${SSM_UI_ALARM_RATE}", NULL},
{ "HPSSGUI_SEC_MECH", NULL, NULL},
{ "HPSSADM_SEC_MECH", NULL, NULL},
{ "HPSSGUI_USER_CFG_PATH", "${HOME}/hpss-ssm-prefs",NULL},
{ "HPSSADM_USER_CFG_PATH", "${HOME}/hpss-ssm-prefs",NULL},
{ "HPSS_SSMUSER_JAVA_POLICY", "${HPSS_PATH_VAR}/ssm/java.policy.ssmuser", NULL},
{ "JAVA_ROOT","/usr/java14", NULL},

{ "JAVA_BIN", "${JAVA_ROOT}/bin", NULL},
{ "JAVA_CLS1", "${HPSS_ROOT}/bin/hpss.jar", NULL},















{ "HPSS_SSM_CLASSPATH","${JAVA_CLS1}", NULL},
{ "HPSS_SM_SRV_CONNECT_FAIL_COUNT", "3", NULL},
{ "HPSS_SM_SRV_CONNECT_INTERVAL_MIN", "20", NULL},
{ "HPSS_SM_SRV_CONNECT_INTERVAL_MAX", "60", NULL},
{ "HPSS_SM_SRV_LIST_UPDATE_INTERVAL", "5", NULL},
{ "HPSS_SM_SRV_MONITOR_THREADS", "10", NULL},
{ "HPSS_SM_SRV_QUEUE_SIZE", "0", NULL},
{ "HPSS_SM_SRV_TPOOL_SIZE", "100", NULL},
{ "HPSS_SM_SRV_MAX_CONNECTIONS", "50", NULL},

{ "AIXTHREAD_COND_DEBUG", "OFF", NULL},
{ "HPSS_API_HOSTNAME", "${HPSS_HOST}", NULL},
{ "HPSS_API_DESC_NAME", "Client Application", NULL},
{ "HPSS_API_DEBUG_PATH", "stdout", NULL},
{ "HPSS_API_MAX_CONN", "0", NULL},
{ "HPSS_API_DEBUG", "0", NULL},
{ "HPSS_API_RETRIES", "4", NULL},
{ "HPSS_API_BUSY_DELAY", "15", NULL},
{ "HPSS_API_BUSY_RETRIES", "3", NULL},
{ "HPSS_API_TOTAL_DELAY", "0", NULL},
{ "HPSS_API_LIMITED_RETRIES", "1", NULL},
{ "HPSS_API_DMAP_WRITE_UPDATES","20", NULL},
{ "HPSS_API_REUSE_CONNECTIONS", "0", NULL},
{ "HPSS_API_USE_PORT_RANGE", "0", NULL},
{ "HPSS_API_RETRY_STAGE_INP", "1", NULL},
{ "HPSS_API_DISABLE_CROSS_REALM","0", NULL},
{ "HPSS_API_DISABLE_JUNCTIONS", "0", NULL},
{ "HPSS_API_SITE_NAME", "${HPSS_SITE_NAME}", NULL},
{ "HPSS_API_AUTHN_MECH", "${HPSS_CLIENT_AUTHN_MECH}",NULL},
{ "HPSS_API_RPC_PROT_LEVEL", "${HPSS_RPC_PROT_LEVEL}",NULL},
{ "HPSS_API_SAN3P", "1", NULL},


{ "HPSS_HDM_CAT_NAME", "${HPSS_PATH_MSG}/hdm.cat",NULL},
{ "HPSS_HDM_SERVER_ID", "1", NULL},
{ "HPSS_HDM_SHMEM_KEY", "3789", NULL},
{ "HPSS_PATH_HDM", "${HPSS_PATH_VAR}/hdm/hdm1", NULL},

{ "HPSS_DMAP_TRANS_NUM", "10", NULL},
{ "HPSS_DMAP_TRANS_STALE_SECS", "30", NULL},
{ "HPSS_DMAP_TRANS_CLEANUP_SECS","10", NULL},

{ "HPSSLOG_SHMKEY", "2801", NULL},
{ "HPSSLOG_SHMID", NULL, NULL},
{ "HPSSLOG_HOSTNAME", "${HPSS_HOST}", NULL},
{ "HPSSLOGGER", "", NULL},
{ "HPSSLOG", "", NULL},
{ "HPSS_CONFIG_CAT_NAME", "${HPSS_PATH_MSG}/config.cat",NULL},

{ "HPSS_INFRA_LOG_TYPES", "CS_ALARM:CS_EVENT", NULL},
{ "HPSS_INFRA_LOG_CONF", "${HPSS_PATH_TMP}/$$.log.conf",NULL},
{ "HPSS_MASTER_CAT_NAME", "${HPSS_PATH_MSG}/hpss.cat",NULL},

{ "HPSS_PATH_FTP", "${HPSS_PATH_VAR}/ftp", NULL},
{ "HPSS_FTPD_CONTROL_PORT", "4021", NULL},
{ "HPSS_FTP_RESERVED", "1025", NULL},
{ "HPSS_FTP_BLOCK_SIZE", "4", NULL},



{ "HPSS_SEC_REALM_NAME", "%L", NULL},
{ "HPSS_SITE_NAME", "%H", NULL},
{ "HPSS_SEC_REALM_ADMIN", "admin/admin", NULL},
{ "HPSS_KRB5_AUTHN_MECH", "krb5", NULL},
{ "HPSS_KRB5_KEYTAB_FILE", "${HPSS_PATH_ETC}/hpss.keytab",NULL},
{ "HPSS_UNIX_AUTHN_MECH", "unix", NULL},
{ "HPSS_UNIX_KEYTAB_FILE", "${HPSS_PATH_ETC}/hpss.unix.keytab",NULL},
{ "HPSS_PRIMARY_AUTHN_MECH", "${HPSS_KRB5_AUTHN_MECH}",
NULL},
{ "HPSS_PRIMARY_AUTHENTICATOR", "${HPSS_KRB5_KEYTAB_FILE}",
NULL},
{ "HPSS_CLIENT_AUTHN_MECH", "${HPSS_PRIMARY_AUTHN_MECH}",NULL},
{ "IEEE_802_FILE", "${HPSS_PATH_ETC}/ieee_802_addr",NULL},
{ "HPSS_AUTH_SERVICE_CONF", "${HPSS_PATH_ETC}/auth.conf",NULL},
{ "HPSS_AUTHZ_SERVICE_CONF", "${HPSS_PATH_ETC}/authz.conf",
NULL},
{ "HPSS_SEC_EP_CONF", "${HPSS_PATH_ETC}/ep.conf",NULL},
{ "HPSS_SEC_SITE_CONF", "${HPSS_PATH_ETC}/site.conf",NULL},
{ "KRB5_CONF", "${HPSS_PATH_SLASH_ETC}/krb5.conf",NULL},
{ "HPSS_AUTHN_TYPES", "krb5,unix", NULL},
{ "HPSS_AUTHZ_TYPES", "ldap,unix", NULL},
{ "HPSS_SITE_LOCATION", "USA", NULL},
{ "KRB5_INSTALL_PATH", "", NULL},
{ "KRB5_KDC_DIR", "${HPSS_PATH_VAR}/krb5kdc",NULL},
{ "KRB5_KDC_HOST", "", NULL},
{ "HPSS_LDAP_USER_HOME", "${HPSS_PATH_VAR}/ldap", NULL},
{ "HPSS_LDAP_URL", "", NULL},
{ "HPSS_LDAP_SSL_KEYDB", "", NULL},
{ "HPSS_LDAP_BIND_TYPE", "", NULL},
{ "HPSS_LDAP_BIND_ARG", "", NULL},
{ "LDAP_USER", "idsldap", NULL},
{ "LDAP_GROUP", "idsldap", NULL},
{ "HPSS_UNIX_AUTH_PASSWD", "/var/hpss/etc/passwd", NULL},
{ "HPSS_UNIX_AUTH_SHADOW", "/var/hpss/etc/shadow", NULL},
{ "HPSS_UNIX_AUTH_GROUP", "/var/hpss/etc/group", NULL},
{ "HPSS_UNIX_CRED_HOME_DIR", "/home", NULL},
{ "HPSS_UNIX_USE_SYSTEM_COMMANDS", "TRUE", NULL},
{ "HPSS_USE_XREALM_LDAP", "0", NULL},

{ "HPSS_RPC_PORT_RANGE", NULL, NULL},
{ "HPSS_RPC_SOCKBUF_SZ", NULL, NULL},
{ "HPSS_RPC_SOCKIO_SZ", NULL, NULL},
{ "HPSS_RPC_PROG_NUM_RANGE", "0x20000000-0x20000200",NULL},
{ "HPSS_RPC_PROG_NUM_HDM", "0x20000200", NULL},
{ "HPSS_RPC_PROT_LEVEL", "connect", NULL},









{ "HPSS_PATH_ADM", "${HPSS_PATH_VAR}/adm", NULL},
{ "HPSS_PATH_CORE", "${HPSS_PATH_ADM}/core",NULL},
{ "HPSS_PATH_TMP", "${HPSS_PATH_VAR}/tmp", NULL},
{ "HPSS_PATH_ETC", "${HPSS_PATH_VAR}/etc", NULL},
{ "HPSS_PATH_CRED", "${HPSS_PATH_VAR}/cred", NULL},

{ "HPSS_ENV_CONF", "${HPSS_PATH_ETC}/env.conf",NULL},
{ "HPSS_PTHREAD_STACK", "131072", NULL},
{ NULL, NULL, NULL}
};


#endif /* hpss_env_defs_h */


hpss_errno.h

HPSS4.5

HPSS6.2

#ifndef hpss_errno_h
#define hpss_errno_h

#include <errno.h>

int(*_Errno(void));

#define HPSS_E_NOERROR 0

#define HPSS_EPERM (-1)
#define HPSS_ENOENT (-2)
#define HPSS_EINTR (-4)
#define HPSS_EIO (-5)
#define HPSS_ENXIO (-6)
#define HPSS_EBADF (-9)
#define HPSS_ECHILD (-10)
#define HPSS_EAGAIN (-11)
#define HPSS_ENOMEM (-12)
#define HPSS_EACCES (-13)
#define HPSS_EFAULT (-14)
#define HPSS_EBUSY (-16)
#define HPSS_EEXIST (-17)
#define HPSS_EXDEV (-18)
#define HPSS_ENODEV (-19)
#define HPSS_ENOTDIR (-20)
#define HPSS_EISDIR (-21)
#define HPSS_EINVAL (-22)
#define HPSS_ENFILE (-23)
#define HPSS_EMFILE (-24)
#define HPSS_EFBIG (-27)
#define HPSS_ENOSPACE (-28)
#define HPSS_EMLINK (-31)
#define HPSS_EPIPE (-32)
#define HPSS_EDOM (-33)
#define HPSS_ERANGE (-34)
#define HPSS_EDEADLK (-45)
#define HPSS_ENOLCK (-46)
#define HPSS_EWRPROTECT (-47)
#define HPSS_ECONN (-50)
#define HPSS_ESTALE (-52)
#define HPSS_EMSGSIZE (-59)
#define HPSS_ENOSR (-63)
#define HPSS_EOPNOTSUPP (-64)
#define HPSS_ENOLINK (-67)
#define HPSS_EBADMSG (-77)
#define HPSS_ETIMEDOUT (-78)
#define HPSS_ENAMETOOLONG (-86)
#define HPSS_ENOTEMPTY (-87)
#define HPSS_EDQUOT (-88)

#define HPSS_EGROUPVECTOOLONG (-1000) /* Name Server Internal Error*/
#define HPSS_EMOREPATH (-1001)
#define HPSS_EBADCONFIGINDEX (-1002)
#define HPSS_EDELETEOPT (-1003)
#define HPSS_EBACKUP (-1004)
#define HPSS_EWRONGSERVER (-1005)
#define HPSS_EBADCREDS (-1006)
#define HPSS_EFILESETRO (-1007)

#define BFS_EMAXBFOPEN (-1402)
#define BFS_EBADBFHANDLE (-1403) /* Bad bfs_ConvertBfHandle */
#define BFS_EMAXREVMAPS (-1404)
#define HPSS_ENOSSAVAIL (-1405) /* no available SS for req. */
#define HPSS_ENOTALLMOVED (-1406) /* for bfs_Move */
#define HPSS_ENOTALLCOPIED (-1407) /* for bfs_Copy */
#define HPSS_ENOTALLPURGED (-1408) /* for bfs_Purge */
#define BFS_EPERMTIME (-1409) /* change time perms error */
#define HPSS_BUSY_RETRY (-1410) /* no threads avail - retry */
#define BFS_STAGE_IN_PROGRESS (-1411) /* stage in progress */
#define HPSS_ENOTVALID (-1412) /* data in HPSS is not valid */
/* more recent data in DFS */
#define BFS_SS_NO_DELETE (-1413) /* used by BFS/SS in bulk */
/* segment delete processing */
#define BFS_SS_UNLINK_BYPASS (-1414) /* used by BFS/SS in bulk */

#define HPSS_ETOOFRAG (-1415) /* file too fragmented */
#define HPSS_ENOPURGEFLAG (-1416) /* for bfs_Purge */
#define HPSS_ENODEFAULTCOS (-1417) /* no default COS defined */

#define HPSS_EBADPVLIST (-1601) /* Metadata inconsistentcy */
#define HPSS_ECONFLICT (-1602) /* Resource busy elsewhere */
#define HPSS_EOWNER (-1603) /* Wrong number of owners */
#define HPSS_ENOMOUNT (-1604) /* Resource not mounted */
#define HPSS_ENOSESSION (-1605) /* Session can't be found */
#define HPSS_EINUSE (-1606) /* Resource in use */
#define HPSS_EPOSERROR (-1607) /* Error positioning volume*/
#define HPSS_EAPPEND (-1608) /* Bad position for append */
#define HPSS_ENOTSEQ (-1609) /* Bad position for write */
#define HPSS_ESRC (-1610) /* Error reading src in copy */
#define HPSS_ESINK (-1611) /* Error writng sink in copy */
#define HPSS_EINCONSISTENT (-1612) /* Inconsistent mvr replies */
#define HPSS_ENOTPERMITTED (-1613) /* Requested change not permitted */
#define HPSS_EIOSPAN (-1614) /* I/O request spans volumes */
#define HPSS_EMOUNTMISMATCH (-1615) /* Error reconnecting PVs */
#define HPSS_ELOCKED (-1616) /* Resource locked */
#define HPSS_EOFFLINE (-1617) /* Resource off-line */
#define HPSS_ENOTALLOCATED (-1618) /* Resource not allocated */

#define HPSS_EMMDELETE (-2000)
#define HPSS_EMMUPDATE (-2001)
#define HPSS_EMMINSERT (-2002)
#define HPSS_EMMREAD (-2003)
#define HPSS_E_OFD_ALLOC (-2004)
#define HPSS_EMUTEX (-2005)
#define HPSS_EMDATA (-2006) /* error on metadata oper */
#define HPSS_EOFDGET (-2007) /* error in allocate OFD */
#define HPSS_EOFDFREE (-2008) /* error in releasing an OFD*/
#define HPSS_ECOND (-2009) /* error on op. cond. var */
#define HPSS_EUUID (-2010) /* error in processing uuid */
#define HPSS_ERETRYTRAN (-2011) /* Client API can retry trans */









#define IS_AUTHORIZED (0) /* authorization success */
#define NOT_AUTHORIZED (-3001) /* authorization not allowed */
#define BAD_SUBJECT (-3002) /* invalid subject specified */
#define BAD_OBJECT (-3003) /* invalid object specified */
#define BAD_AUTHZ (-3004) /* invalid authorization tkt. */
#define BAD_EVENT (-3005) /* invalid audit event */
#define HSEC_ERGY (-3006) /* error contacting sec. reg. */
#define HSEC_EACL (-3007) /* error contacting acl mngr. */
#define HSEC_ENOTINIT (-3008) /* HSEC lib. not initialized */
#define HSEC_EAUTH (-3009) /* authentication error */
#define HSEC_EAUTHZ (-3010) /* authorization error */
#define HSEC_EAUTH_SERVICE (-3011) /* Invalid Authentication SVC */
#define HSEC_EAUTH_LEVEL (-3012) /* Invalid Protection Level */
#define HSEC_EAUTHZ_SERVICE (-3013) /* Invalid Authorization svc */
#define HSEC_EAUD (-3014) /* cs_LogInit Failure */

#define HPSS_ESYSTEM (-5000)
#define HPSS_ETRANSFER (-5001)
#define HPSS_E_DCE_EXC (-5002)
#define HPSS_ESOIDCREATE (-5003) /* error in creating a SOID */
#define HPSS_EINVALCOS (-5004) /* bad class of service */
#define HPSS_EINVALCOSTABLE (-5005) /* class of service and hier*/
#define HPSS_ENOSUPPORT (-5006) /* unsupported option */
#define HPSS_EREQLIST (-5007) /* Request List error */
#define HPSS_ECOMMUNICATION (-5008) /* Communication error */
#define HPSS_EINVALHINTS (-5009) /* invalid COS hints */
#define HPSS_ENOCOS (-5010) /* class of service not found*/
#define HPSS_EABORT (-5011) /* request aborted */
#define HPSS_EINVALHIER (-5012) /* invalid hierarchy info */
#define HPSS_EINVALSCLASS (-5013) /* invalid sclass info */
#define HPSS_EINVALMIGRPOLICY (-5014) /* invalid migrationpolicy info */
#define HPSS_EINVALPURGEPOLICY (-5015) /* invalid purgepolicy info */

#define HPSS_EMDM (-6001) /* Metadata failure */
#define HPSS_EHARDWARE (-6002) /* Hardware failure */
#define HPSS_ESHUTDOWN (-6003) /* PVR is shutting down */
#define HPSS_EMEDIA (-6004) /* Media error */
#define HPSS_EINPROGRESS (-6005) /* Operation is in progress */
#define HPSS_EIOPORTFULL (-6006) /* I/O Port is full */
#define HPSS_EMOUNT_TIMEOUT (-6007) /* Mount try exceeded limit */
#define HPSS_ETRANSIT (-6008) /* PVR Cartridge error */

#define HPSS_ENOTYET (-7001) /* PVL not accepting jobs */
#define HPSS_EEXPORT (-7002) /* scheduled for export */
#define HPSS_ECANCEL (-7003) /* job was cancelled */
#define HPSS_EPVRFAILURE (-7004)
#define HPSS_EDRIVEFAILURE (-7005)
#define HPSS_ETOOMANY (-7006) /* #vols exceeds #drives */
#define HPSS_EEMPTY (-7007) /* no volumes to mount */
#define HPSS_ESRCH (-7008) /* not found */
#define HPSS_EALREADY (-7009) /* already (de)allocated */
#define HPSS_ENOTSUPPORTED (-7010) /* not supported by PVL */
#define HPSS_ESOCKET (-7011) /* socket error */
#define HPSS_EUNLABELED (-7012) /* unlabeled volume */
#define HPSS_EFOREIGN (-7013) /* NON HPSS label */
#define HPSS_EDISABLED (-7014) /* Drive is disabled */

#define HPSS_ENOTREADY (-8001)
#define HPSS_ENOTELEVATED (-8002)
#define HPSS_EDEVOPEN (-8003)
#define HPSS_EOM (-9000) /* EOM? */

#define HPSS_ECOMM (-10000) /* Communication failure */
#define HPSS_EGENERIC (-10001) /* Generic HPSS failure */
#define HPSS_ESUSP (-10002) /* Connection suspended */
#define HPSS_EAUTH (-10003) /* Authentication error */
#define HPSS_ECONINIT (-10004) /* Con. Mgr. initializn. err */
#define HPSS_ENOCONN (-10005) /* Connection table is full */
#define HPSS_EBADCONN (-10006) /* Bad connection handle */
#define HPSS_ECONBUSY (-10007) /* Connection is busy */
#define HPSS_EHOST (-10008) /* gethostbyname failure */
#define HPSS_EALREADY_RUNNING (-10009) /* Server already running */
#define HPSS_ENOT_MONITORING (-10010) /* Server not being monitored */
#define HPSS_LIST_ALLOC (-10011) /* SUD server list alloc err */
#define HPSS_ENO_LOCKS (-10012) /* Too many servers, not enuf locks */
#define HPSS_EIS_RUNNING (-10013) /* Server is running */
#define HPSS_ENOT_RUNNING (-10014) /* Server is not running */
#define HPSS_ECLONE_RUNNING (-10015) /* Server is already running */
#define HPSS_EFORMAT_LOCKFILE (-10016) /* Lockfile has bad format */
#define HPSS_EOPEN_LOCKFILE (-10017) /* Cannot open lockfile */
#define HPSS_EMUTEX_PROBLEM (-10018) /* Can't init/lock/unlock mutex */
#define HPSS_EREMCONN (-10019) /* Remote conn. table is full */















































#define HPSS_RPC_AUTH (-11001)

#define HPSS_RPC_EAGAIN (-11002)

#define HPSS_RPC_FAULT (-11003)
#define HPSS_RPC_STALE_BH (-11004)

#define HPSS_RPC_STALE_CH (-11005)



























#define HPSS_EMPSCMDLINE -12001 /* incorrect number of arguments */
#define HPSS_EMPSINITFAILED -12002 /* mps init failed */
#define HPSS_ENOTSUPPORTSC -12003 /* storage class is not supported */
#define HPSS_ESCDELETED -12004 /* storage class is deleted */
#define HPSS_ENOMIGRPOLICY -12005 /* no associated migration policy */

#define HPSS_ENOPURGEPOLICY -12006 /* no associated purge policy */
#define HPSS_ENOTDISKPURGE -12007 /* not allow purge on non-disk media*/
#define HPSS_EMIGRISRUNNING -12008 /* The migration is running. */
#define HPSS_EPURGEISRUNNING -12009 /* The purge is running. */
#define HPSS_EABORTMPS -12010 /* abort the mps server */
#define HPSS_EABORTMIGRRUN -12011 /* abort the migration run */
#define HPSS_EABORTPURGERUN -12012 /* abort the migration run */
#define HPSS_ECOSHIERISBUSY -12013 /* someone is writing to COSHIER list*/
#define HPSS_EOUTOFRANGE -12014 /* argment for api is out of range */
#define HPSS_EBUILDCOSHIER -12015 /* failed to rebuild COSHier table */

#define HPSS_ERETRY (-13001) /* retry the request */
#define HPSS_EUSER_DENY (-13002) /* deny access to a particular user */
#define HPSS_ETHRESHOLD_DENY (-13003) /* deny reqst due to threshold limit */

#define HPSS_EBYPASS (-13501) /* bypass this operation */
#define HPSS_EUSEDEFAULT (-13502) /* use default method instead */















#endif /* hpss_errno_h */

#ifndef hpss_errno_h
#define hpss_errno_h

#include <errno.h>

int(*_Errno(void));

#define HPSS_E_NOERROR 0

#define HPSS_EPERM (-1)
#define HPSS_ENOENT (-2)
#define HPSS_EINTR (-4)
#define HPSS_EIO (-5)
#define HPSS_ENXIO (-6)
#define HPSS_EBADF (-9)
#define HPSS_ECHILD (-10)
#define HPSS_EAGAIN (-11)
#define HPSS_ENOMEM (-12)
#define HPSS_EACCES (-13)
#define HPSS_EFAULT (-14)
#define HPSS_EBUSY (-16)
#define HPSS_EEXIST (-17)
#define HPSS_EXDEV (-18)
#define HPSS_ENODEV (-19)
#define HPSS_ENOTDIR (-20)
#define HPSS_EISDIR (-21)
#define HPSS_EINVAL (-22)
#define HPSS_ENFILE (-23)
#define HPSS_EMFILE (-24)
#define HPSS_EFBIG (-27)
#define HPSS_ENOSPACE (-28)
#define HPSS_EMLINK (-31)
#define HPSS_EPIPE (-32)
#define HPSS_EDOM (-33)
#define HPSS_ERANGE (-34)
#define HPSS_EDEADLK (-45)
#define HPSS_ENOLCK (-46)
#define HPSS_EWRPROTECT (-47)
#define HPSS_ECONN (-50)
#define HPSS_ESTALE (-52)
#define HPSS_EMSGSIZE (-59)
#define HPSS_ENOSR (-63)
#define HPSS_EOPNOTSUPP (-64)
#define HPSS_ENOLINK (-67)
#define HPSS_EBADMSG (-77)
#define HPSS_ETIMEDOUT (-78)
#define HPSS_ENAMETOOLONG (-86)
#define HPSS_ENOTEMPTY (-87)
#define HPSS_EDQUOT (-88)

#define HPSS_EGROUPVECTOOLONG (-1000) /* Name Server Internal Error*/
#define HPSS_EMOREPATH (-1001)
#define HPSS_EBADCONFIGINDEX (-1002)
#define HPSS_EDELETEOPT (-1003)
#define HPSS_EBACKUP (-1004)
#define HPSS_EWRONGSERVER (-1005)
#define HPSS_EBADCREDS (-1006)
#define HPSS_EFILESETRO (-1007)

#define BFS_EMAXBFOPEN (-1402)
#define BFS_EBADBFHANDLE (-1403) /* Bad bfs_ConvertBfHandle */

#define BFS_EMAXREVMAPS (-1404)
#define HPSS_ENOSSAVAIL (-1405) /* no available SS for req. */

#define HPSS_ENOTALLMOVED (-1406) /* for bfs_Move */
#define HPSS_ENOTALLCOPIED (-1407) /* for bfs_Copy */
#define HPSS_ENOTALLPURGED (-1408) /* for bfs_Purge */
#define BFS_EPERMTIME (-1409) /* change time perms error */
#define HPSS_BUSY_RETRY (-1410) /* no threads avail - retry */

#define BFS_STAGE_IN_PROGRESS (-1411) /* stage in progress */

#define HPSS_ENOTVALID (-1412) /* data in HPSS is not valid */

/* more recent data in XFS */
#define BFS_SS_NO_DELETE (-1413) /* used by BFS/SS in bulk */

/* segment delete processing */
#define BFS_SS_UNLINK_BYPASS (-1414) /* used by BFS/SS in bulk */


#define HPSS_ETOOFRAG (-1415) /* file too fragmented */
#define HPSS_ENOPURGEFLAG (-1416) /* for bfs_Purge */
#define HPSS_ENODEFAULTCOS (-1417) /* no default COS defined */


#define HPSS_EBADPVLIST (-1601) /* Metadata inconsistentcy */

#define HPSS_ECONFLICT (-1602) /* Resource busy elsewhere */

#define HPSS_EOWNER (-1603) /* Wrong number of owners */
#define HPSS_ENOMOUNT (-1604) /* Resource not mounted */
#define HPSS_ENOSESSION (-1605) /* Session can't be found */

#define HPSS_EINUSE (-1606) /* Resource in use */
#define HPSS_EPOSERROR (-1607) /* Error positioning volume*/

#define HPSS_EAPPEND (-1608) /* Bad position for append */
#define HPSS_ENOTSEQ (-1609) /* Bad position for write */
#define HPSS_ESRC (-1610) /* Error reading src in copy */
#define HPSS_ESINK (-1611) /* Error writng sink in copy */
#define HPSS_EINCONSISTENT (-1612) /* Inconsistent mvr replies */

#define HPSS_ENOTPERMITTED (-1613) /* Requested change not permitted */
#define HPSS_EIOSPAN (-1614) /* I/O request spans volumes */

#define HPSS_EMOUNTMISMATCH (-1615) /* Error reconnecting PVs */

#define HPSS_ELOCKED (-1616) /* Resource locked */
#define HPSS_EOFFLINE (-1617) /* Resource off-line */
#define HPSS_ENOTALLOCATED (-1618) /* Resource not allocated */


#define HPSS_EMDATA (-2000)
#define HPSS_E_MM_DB_ERROR (-2001)
#define HPSS_E_MM_NO_DATA (-2002)
#define HPSS_E_MM_WRONG_PARAM_TYPE (-2003)
#define HPSS_E_MM_NO_FIELDS (-2004)
#define HPSS_E_MM_BAD_ISOLATION (-2005)
#define HPSS_E_MM_CONN_MGR_NOTREADY (-2006)
#define HPSS_E_MM_CACHE_FULL (-2007)
#define HPSS_E_MM_STMT_CACHE_NOTREADY (-2008)
#define HPSS_E_MM_BAD_TABLE_TYPE (-2009)
#define HPSS_E_MM_BAD_FIELD_TYPE (-2010)
#define HPSS_E_MM_NO_STATEMENT (-2011)
#define HPSS_E_MM_INVALID_HANDLE (-2012)
#define HPSS_E_MM_BAD_INDEX (-2013)
#define HPSS_E_MM_DUPLICATE (-2014)
#define HPSS_E_MM_TRAN_ABORTED (-2015)
#define HPSS_E_MM_DEADLOCK (-2016)
#define HPSS_E_MM_LOCK_TIMEOUT (-2017)
#define HPSS_E_MM_NO_OUTPUT_BUFFER (-2018)

#define HPSS_E_MM_MAX_ERROR_MSG (-2018)






















#define HPSS_ESYSTEM (-5000)
#define HPSS_ETRANSFER (-5001)
#define HPSS_ESESSIONKEYGEN (-5002)
#define HPSS_ESOIDCREATE (-5003) /* error in creating a SOID */

#define HPSS_EINVALCOS (-5004) /* bad class of service */
#define HPSS_EINVALCOSTABLE (-5005) /* class of service and hier*/

#define HPSS_ENOSUPPORT (-5006) /* unsupported option */
#define HPSS_EREQLIST (-5007) /* Request List error */
#define HPSS_ECOMMUNICATION (-5008) /* Communication error */

#define HPSS_EINVALHINTS (-5009) /* invalid COS hints */
#define HPSS_ENOCOS (-5010) /* class of service not found*/
#define HPSS_EABORT (-5011) /* request aborted */
#define HPSS_EINVALHIER (-5012) /* invalid hierarchy info */
#define HPSS_EINVALSCLASS (-5013) /* invalid sclass info */
#define HPSS_EINVALMIGRPOLICY (-5014) /* invalid migpolicy info */

#define HPSS_EINVALPURGEPOLICY (-5015) /* invalid purgepolicy info */


#define HPSS_EMDM (-6001) /* Metadata failure */
#define HPSS_EHARDWARE (-6002) /* Hardware failure */
#define HPSS_ESHUTDOWN (-6003) /* PVR is shutting down */
#define HPSS_EMEDIA (-6004) /* Media error */
#define HPSS_EINPROGRESS (-6005) /* Operation is in progress */

#define HPSS_EIOPORTFULL (-6006) /* Port is full */
#define HPSS_EMOUNT_TIMEOUT (-6007) /* Mount try exceeded limit */

#define HPSS_ETRANSIT (-6008) /* PVR Cartridge error */

#define HPSS_ENOTYET (-7001) /* PVL not accepting jobs */
#define HPSS_EEXPORT (-7002) /* scheduled for export */
#define HPSS_ECANCEL (-7003) /* job was cancelled */
#define HPSS_EPVRFAILURE (-7004)
#define HPSS_EDRIVEFAILURE (-7005)
#define HPSS_ETOOMANY (-7006) /* #vols exceeds #drives */
#define HPSS_EEMPTY (-7007) /* no volumes to mount */
#define HPSS_ESRCH (-7008) /* not found */
#define HPSS_EALREADY (-7009) /* already (de)allocated */
#define HPSS_ENOTSUPPORTED (-7010) /* not supported by PVL */

#define HPSS_ESOCKET (-7011) /* socket error */
#define HPSS_EUNLABELED (-7012) /* unlabeled volume */
#define HPSS_EFOREIGN (-7013) /* NON HPSS label */
#define HPSS_EDISABLED (-7014) /* Drive is disabled */

#define HPSS_ENOTREADY (-8001)
#define HPSS_ENOTELEVATED (-8002)
#define HPSS_EDEVOPEN (-8003)
#define HPSS_EOM (-9000) /* End of media encountered */

#define HPSS_ECOMM (-10000) /* Communication failure */
#define HPSS_EGENERIC (-10001) /* Generic HPSS failure */
#define HPSS_ESUSP (-10002) /* Connection suspended */
#define HPSS_EAUTH (-10003) /* Authentication error */
#define HPSS_ECONINIT (-10004) /* Con. Mgr. initializn. err */
#define HPSS_ENOCONN (-10005) /* Connection table is full */
#define HPSS_EBADCONN (-10006) /* Bad connection handle */
#define HPSS_ECONBUSY (-10007) /* Connection is busy */
#define HPSS_EHOST (-10008) /* gethostbyname failure */
#define HPSS_EALREADY_RUNNING (-10009) /* Server already running */

#define HPSS_ENOT_MONITORING (-10010) /* Server not being monitored */
#define HPSS_LIST_ALLOC (-10011) /* SUD server list alloc err */

#define HPSS_ENO_LOCKS (-10012) /* Too many servers, not enough locks */
#define HPSS_EIS_RUNNING (-10013) /* Server is running */
#define HPSS_ENOT_RUNNING (-10014) /* Server is not running */

#define HPSS_ECLONE_RUNNING (-10015) /* Server is already running */

#define HPSS_EFORMAT_LOCKFILE (-10016) /* Lockfile has bad format */

#define HPSS_EOPEN_LOCKFILE (-10017) /* Cannot open lockfile */

#define HPSS_EMUTEX_PROBLEM (-10018) /* Can't init/lock/unlock mutex */

#define HPSS_RPC_EENCODE (-10020) /* error encode RPC arguments */
#define HPSS_RPC_EDECODE (-10021) /* error decode RPC arguments */
#define HPSS_RPC_ENOCONN (-10022) /* connection no longer valid */
#define HPSS_RPC_ECREDS_EXPIRED (-10023) /* security credential expired */
#define HPSS_RPC_ECTX_EXPIRED (-10024) /* security credentail invalid */
#define HPSS_RPC_ECTX_INVALID (-10025) /* security context invalid */
#define HPSS_RPC_EPROT_NOTSUPP (-10026) /* protection not supported */
#define HPSS_RPC_EMECH_NOTSUPP (-10027) /* sec mechanism not supported*/
#define HPSS_RPC_ENOENDPOINT (-10028) /* can't get RPC endpoint port */
#define HPSS_RPC_ECONNREFUSED (-10029) /* connection refused */

#define HPSS_RPC_EHOSTDOWN (-10030) /* host is down */
#define HPSS_RPC_EHOSTUNREACH (-10031) /* no route to host */
#define HPSS_RPC_EINTERFACE (-10032) /* no such interface */
#define HPSS_RPC_EINVAL_HANDLE (-10033) /* invalid connection handle */

#define HPSS_SEC_ENOT_AUTHORIZED (-11000) /* authorization not allowed */
#define HPSS_SEC_EBAD_AUTHZTKT (-11001) /* invalid authz ticket */
#define HPSS_SEC_EBAD_AUTHZLABEL (-11002) /* authz label invalid */
#define HPSS_SEC_EBAD_AUTHZTYPE (-11003) /* authz type is invalid */
#define HPSS_SEC_EBAD_AUTHZVER (-11004) /* authz version invalid */
#define HPSS_SEC_EBAD_BINDINGS (-11005) /* unable to bind to mechanism*/
#define HPSS_SEC_EBAD_LABEL (-11006) /* invalid label specified */
#define HPSS_SEC_EBAD_LEVEL (-11007) /* invalid protection level */
#define HPSS_SEC_EBAD_MECH (-11008) /* invalid mechanism specified*/
#define HPSS_SEC_EBAD_OBJECT (-11009) /* invalid object specified */
#define HPSS_SEC_EBAD_SUBJECT (-11010) /* invalid subject specified */
#define HPSS_SEC_ENO_CREDS (-11012) /* no credentials were found */
#define HPSS_SEC_ENO_REALM (-11013) /* no realm was found */
#define HPSS_SEC_ENO_GROUP (-11014) /* no group entry was found */
#define HPSS_SEC_EBAD_ENDPOINTS (-11015) /* unable to find RPC endpoints */
#define HPSS_SEC_ENO_USERNAME (-11016) /* invalid user name */
#define HPSS_SEC_LIST_TOO_LONG (-11017) /* not enough room for list */
#define HPSS_SEC_LDAP_ERROR (-11018) /* ldap error */


#define HPSS_ENOREGISTER (-11100) /* svc_register failed */
#define HPSS_EMAP_PRIV (-11101) /* unpriv change to map */
#define HPSS_EUNIMPLEMENTED (-11102) /* a feature is unimplemented */
#define HPSS_E_FAILED (-11103) /* opposite of HPSS_E_NOERROR */
#define HPSS_EBAD_DIRPATH (-11104) /* problem with /etc/exports */
#define HPSS_EBAD_EXPORTOPTS (-11105) /* problem with /etc/exports */
#define HPSS_ECACHE_BUSY (-11106) /* data cache is busy */

#define HPSS_EIS_PRIV (-11200) /* Caller is privileged */
#define HPSS_ENOT_PRIV (-11201) /* Caller is not privileged */

#define HPSS_EUNK_PRIV (-11202) /* Cannot get caller privs */
#define HPSS_EENTRY_NOT_FOUND (-11203) /* No entry in cred table */


#define HPSS_EMPSCMDLINE -12001 /* incorrect number of arguments */

#define HPSS_EMPSINITFAILED -12002 /* mps init failed */
#define HPSS_ENOTSUPPORTSC -12003 /* storage class is not supported */
#define HPSS_ESCDELETED -12004 /* storage class is deleted */

#define HPSS_ENOMIGRPOLICY -12005 /* no associated migration policy */

#define HPSS_ENOPURGEPOLICY -12006 /* no associated purge policy */

#define HPSS_ENOTDISKPURGE -12007 /* not allow purge on non-disk media*/
#define HPSS_EMIGRISRUNNING -12008 /* The migration is running. */

#define HPSS_EPURGEISRUNNING -12009 /* The purge is running. */

#define HPSS_EABORTMPS -12010 /* abort the mps server */
#define HPSS_EABORTMIGRRUN -12011 /* abort the migration run */

#define HPSS_EABORTPURGERUN -12012 /* abort the purge run */

#define HPSS_ECOSHIERISBUSY -12013 /* someone is writing to COSHIER list*/
#define HPSS_EOUTOFRANGE -12014 /* argment for api is out of range */

#define HPSS_EBUILDCOSHIER -12015 /* failed to rebuild COSHier table */


#define HPSS_ERETRY (-13001) /* retry the request */
#define HPSS_EUSER_DENY (-13002) /* deny access to a particular user */

#define HPSS_ETHRESHOLD_DENY (-13003) /* deny reqst due to threshold limit */

#define HPSS_EBYPASS (-13501) /* bypass this operation */
#define HPSS_EUSEDEFAULT (-13502) /* use default method instead */

#define HPSS_EMUTEX (-20005)
#define HPSS_ECOND (-20009) /* error on op. cond. var */
#define HPSS_EUUID (-20010) /* error in processing uuid */
#define HPSS_ESYNTAX (-20011) /* syntax error */

#include "hpss_types.h"

signed32
hpss_PosixToHPSSErrno(
int Errno); /* POSIX errno value */

int
hpss_HPSSToPosixErrno(
signed32 HPSSErrno); /* HPSS errno value */


#endif /* hpss_errno_h */


hpss_Getenv.h

HPSS4.5

HPSS6.2

#ifndef hpss_Getenv_h
#define hpss_Getenv_h

#include <dce/nbase.h>


char *hpss_Getenv(char *Env);
signed32 hpss_Envcpy(char *Buf, char *Env, unsigned32 Bufsize);




#endif

#ifndef hpss_Getenv_h
#define hpss_Getenv_h

#include <hpss_types.h>

void hpss_EnvInitialize(void);
char *hpss_Getenv(char *Env);
signed32 hpss_Envcpy(char *Buf, char *Env, unsigned32 Bufsize);
signed32 hpss_UpdateEnv(char *EnvStr);
void hpss_PrintEnv(FILE *OutFp);
void hpss_PrintEnvDefs(FILE *OutFp);

#endif


hpss_iod.h

HPSS4.5

HPSS6.2

#ifndef hpss_iod_v0_0_included
#define hpss_iod_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif
#ifndef hpss_idl_types_v0_0_included
#include <hpss_idl_types.h>
#endif

#ifndef idlreladdr_v0_0_included
#include <hpssaddr.h>
#endif
#ifndef idlhpssoid_v0_0_included
#include <hpssoid.h>
#endif
#ifndef hpssIF_types_v0_0_included
#include <hpssIF.h>
#endif
#ifndef hpss_cos_v0_0_included
#include <hpss_cos.h>
#endif
#ifndef mvr_devdesc_v0_0_included
#include <mvr_devdesc.h>
#endif



#define MAXDISPBUFSIZE (16)
#define DEVICE_LOAD (1)
#define DEVICE_UNLOAD (2)
#define DEVICE_FLUSH (3)
#define DEVICE_WRITETM (4)
#define DEVICE_LOADDISPLAY (5)
#define DEVICE_READLABEL (6)
#define DEVICE_WRITELABEL (7)
#define DEVICE_CLEAR (8)
#define REQUEST_JOBID (9)

typedef struct netaddress {
u_signed64 SockTransferID;
struct {
unsigned32 addr;
unsigned16 port;
unsigned16 family;
} SockAddr;
u_signed64 SockOffset;
} netaddress_t;

typedef struct ipiaddress {
unsigned32 IPI3TransferID;
struct {
signed16 Interface;
signed16 Pad1;
idl_char Name[32];
} IPI3Addr;
u_signed64 IPI3Offset;
} ipiaddress_t;

typedef struct piofsaddress {
u_signed64 Offset;
unsigned32 Flags;
unsigned32 Perms;
unsigned32 Vbs;
unsigned32 Vn;
unsigned32 Hbs;
unsigned32 Hn;
unsigned32 Subfile;
unsigned32 Chkptflag;
idl_char Name[255];
} piofsaddress_t;

typedef struct lftaddress {
u_signed64 Offset;
unsigned32 Flags;
unsigned32 Uid;
unsigned32 Gid;
unsigned32 CellId;
idl_char PathName[1024];
} lftaddress_t;

typedef struct fileaddress {
hpss_object_handle_t BitFileHandle;
u_signed64 BitFileOffset;
} fileaddress_t;




typedef struct ssegaddress {
hpssoid_t SSegID;
u_signed64 SSegOffset;
} ssegaddress_t;




typedef struct vvaddress {
hpssoid_t VVolID;
positiondesc_t VVolPosition;
} vvaddress_t;




typedef struct pvaddress {
idl_char PVolName[12];
positiondesc_t PVolPosition;
} pvaddress_t;




typedef struct devaddress {
unsigned32 Flags;
signed32 DeviceID;
unsigned32 BlockSize;
unsigned32 BlocksBetweenTMs;
idl_char VolumeID[12];
positiondesc_t DevicePosition;
} devaddress_t;



typedef struct memaddress {
idl_char *MemoryPtr;
} memaddress_t;
typedef struct clientfileaddress {
signed32 FileDes;
u_signed64 FileOffset;
} clientfileaddress_t;
#define SHM_COPY_DATA (1)
typedef struct shmaddress {
unsigned32 Flags;
unsigned32 ShmID;
unsigned32 ShmOffset;
} shmaddress_t;
#define NET_ADDRESS (1)
#define IPI_ADDRESS (2)
#define PIOFS_ADDRESS (3)
#define PFS_ADDRESS (3)
#define VESTA_ADDRESS (3)
#define FILE_ADDRESS (4)
#define SSEG_ADDRESS (5)
#define VVOL_ADDRESS (6)
#define PVOL_ADDRESS (7)
#define DEVICE_ADDRESS (8)
#define STRIPE_ADDRESS (9)
#define MEMORY_ADDRESS (10)
#define CLIENTFILE_ADDRESS (11)
#define SHM_ADDRESS (12)
#define LFT_ADDRESS (13)

typedef struct straddress {
signed32 Type;
union {
netaddress_t NetAddr;
ipiaddress_t IPIAddr;
piofsaddress_t PIOFSAddr;
fileaddress_t FileAddr;
ssegaddress_t SSegAddr;
vvaddress_t VVolAddr;
pvaddress_t PVolAddr;
devaddress_t DevAddr;
memaddress_t MemAddr;
clientfileaddress_t ClientFileAddr;
shmaddress_t ShmAddr;
lftaddress_t LFTAddress;

} Addr_u;
} straddress_t;




typedef struct stripefixed {
u_signed64 BlockSize;
u_signed64 StripeWidth;
signed32 AddrListLength;
unsigned32 Flags;
straddress_t Addr;

} stripefixed_t;




typedef struct stripeaddress {
u_signed64 BlockSize;
u_signed64 StripeWidth;
signed32 AddrListLength;
unsigned32 Flags;
straddress_t Addr;
struct stripeaddress *Next;
} stripeaddress_t;

typedef struct address {
signed32 Type;
union {
netaddress_t NetAddr;
ipiaddress_t IPIAddr;
piofsaddress_t PIOFSAddr;
fileaddress_t FileAddr;
ssegaddress_t SSegAddr;
vvaddress_t VVolAddr;
pvaddress_t PVolAddr;
devaddress_t DevAddr;
stripeaddress_t StripeAddr;
memaddress_t MemAddr;
clientfileaddress_t ClientFileAddr;
shmaddress_t ShmAddr;
lftaddress_t LFTAddress;

} Addr_u;
} address_t;




#define INFO_NONE (1)
#define INFO_LOADDISPLAY (2)
#define INFO_DEVICEATTR (3)
#define INFO_VOLUMEID (4)
#define INFO_REPLYADDR (5)

typedef struct requestspec {
signed32 SubFunction;
signed32 Argument;
signed32 DeviceID;
u_signed64 Count;
u_signed64 SelectionFlags;
struct {
signed32 InfoType;
union {
signed32 Reserved;
idl_char DisplayBuffer[16];
devdesc_attr_t DeviceAttr;
idl_char VolumeID[12];
address_t ReplyAddr;
} ReqInfo_u;
} ReqInfo_s;
} requestspec_t;










typedef struct ssdescfixed {
signed32 Flags;
u_signed64 Offset;
u_signed64 Length;

address_t SrcSinkAddr;
signed32 *VoidPtr;

signed32 ServerDefined;
} ssdescfixed_t;

typedef struct srcsinkdesc {
unsigned32 Flags;
u_signed64 Offset;
u_signed64 Length;

address_t SrcSinkAddr;
struct srcsinkdesc *Next;
signed32 ServerDefined;
} srcsinkdesc_t;




typedef struct gapinfo {
u_signed64 Offset;
u_signed64 Length;
} gapinfo_t;

#define REPLY_NONE (1)
#define REPLY_LISTENLIST (2)
#define REPLY_DEVICEATTR (3)
#define REPLY_VOLUMEID (4)
#define REPLY_GAPINFO (5)

typedef struct reqspecreply {
unsigned32 Flags;
signed32 Status;
signed32 CountProcessed;
signed32 ReqListLength;
struct {
signed32 ReqReplyType;
union {
signed32 Reserved;
srcsinkdesc_t *ListenList;
devdesc_attr_t DeviceAttr;
idl_char VolumeID[12];
gapinfo_t GapInfo;
} ReqReply_u;
} ReqReply_s;
} reqspecreply_t;









#define NON_BLOCK_OFFSET (-2147483648)
#define IOR_STRIPE_ERROR (1073741824)

typedef struct ssreplyfixed {
signed32 Flags;
signed32 Status;
u_signed64 BytesMoved;
positiondesc_t Position;
} ssreply_fixed_t;

typedef struct srcsinkreply {
unsigned32 Flags;
signed32 Status;
u_signed64 BytesMoved;

positiondesc_t Position;
struct srcsinkreply *Next;
} srcsinkreply_t;




#define IOD_READ (1)
#define IOD_WRITE (2)
#define IOD_DEVICESPECIFIC (3)
#define IOD_GETDEVICEATTR (4)
#define IOD_SETDEVICEATTR (5)
#define IOD_ABORT (6)
#define SEQUENTIAL_IO (1)
#define HOLD_RESOURCES (2)
#define NO_LABEL_CHECK (4)
#define SSD_PROCESSED (8)
#define REPLYWHENREADY (16)
#define CONTROL_ADDR (32)
#define XFER_RESPONDER (64)
#define XFEROPT_IP (128)
#define XFEROPT_IPI3 (256)
#define XFEROPT_SHMEM (512)
#define LAST_IN_XFER (1024)
#define DONT_BREAK_IO (2048)
#define USE_PORT_RANGE (4096)
#define LAST_SEG_WRITE (8192)





typedef struct IOD_xmit {
unsigned32 Length;
idl_byte Array[1];
} IOD_xmit_t;

typedef struct IOD {
signed32 RequestID;
signed32 Function;
unsigned32 Flags;
requestspec_t *ReqSpecInfo;
signed32 SrcDescLength;
signed32 SinkDescLength;
srcsinkdesc_t *SrcDescList;
srcsinkdesc_t *SinkDescList;
} IOD_t;




#define IOR_NOT_PROCESSED (1)
#define IOR_COMPLETE (2)
#define IOR_ERROR (4)
#define POSITIONVALID (8)
#define ENDPOSITION (16)
#define IOR_GAPINFO_VALID (32)
#define IOR_FOREIGN_LABEL (64)
#define IOR_NO_LABEL (128)
#define IOR_NON_ANSI_LABEL (256)
#define IOR_INCOMPLETE_LABEL (512)
#define IOR_DEVICE_DISABLED (1024)
#define IOR_END_OF_SEGMENT (2048)



typedef struct IOR_xmit {
unsigned32 Length;
idl_byte Array[1];
} IOR_xmit_t;

typedef struct IOR {
signed32 RequestID;
unsigned32 Flags;
signed32 Status;
reqspecreply_t *ReqSpecReply;
signed32 SrcReplyLength;
signed32 SinkReplyLength;
srcsinkreply_t *SrcReplyList;
srcsinkreply_t *SinkReplyList;
} IOR_t;




void IDL_ENTRY IOD_t_from_xmit(
#ifdef IDL_PROTOTYPES
IOD_xmit_t *xmit_object,
IOD_t *object
#endif
);
void IDL_ENTRY IOD_t_to_xmit(
#ifdef IDL_PROTOTYPES
IOD_t *object,
IOD_xmit_t **xmit_object
#endif
);
void IDL_ENTRY IOD_t_free_inst(
#ifdef IDL_PROTOTYPES
IOD_t *object
#endif
);
void IDL_ENTRY IOD_t_free_xmit(
#ifdef IDL_PROTOTYPES
IOD_xmit_t *xmit_object
#endif
);
void IDL_ENTRY IOR_t_from_xmit(
#ifdef IDL_PROTOTYPES
IOR_xmit_t *xmit_object,
IOR_t *object
#endif
);
void IDL_ENTRY IOR_t_to_xmit(
#ifdef IDL_PROTOTYPES
IOR_t *object,
IOR_xmit_t **xmit_object
#endif
);
void IDL_ENTRY IOR_t_free_inst(
#ifdef IDL_PROTOTYPES
IOR_t *object
#endif
);
void IDL_ENTRY IOR_t_free_xmit(
#ifdef IDL_PROTOTYPES
IOR_xmit_t *xmit_object
#endif
);

#ifdef __cplusplus
}


































#endif
#endif

#ifndef _HPSS_IOD_H_RPCGEN
#define _HPSS_IOD_H_RPCGEN

#include <rpc/rpc.h>
#ifndef _hpss_iod_h
#define _hpss_iod_h








#include "hpss_types.h"

#include "hpssclntaddr.h"

#include "hpssaddr.h"


#include "hpssoid.h"





#include "hpss_cos.h"




#include "mvr_devdesc.h"
#include "hpss_limits.h"
#include "hpss_obj_handle.h"
#define MAXDISPBUFSIZE 16
#define DEVICE_LOAD 1
#define DEVICE_UNLOAD 2
#define DEVICE_FLUSH 3
#define DEVICE_WRITETM 4
#define DEVICE_LOADDISPLAY 5
#define DEVICE_READLABEL 6
#define DEVICE_WRITELABEL 7
#define DEVICE_CLEAR 8
#define REQUEST_JOBID 9











































struct fileaddress {
hpss_object_handle_t BitFileHandle;
u_signed64 BitFileOffset;
};
typedef struct fileaddress fileaddress;

typedef fileaddress fileaddress_t;

struct ssegaddress {
hpssoid_t SSegID;
u_signed64 SSegOffset;
};
typedef struct ssegaddress ssegaddress;

typedef ssegaddress ssegaddress_t;

struct vvaddress {
hpssoid_t VVolID;
positiondesc_t VVolPosition;
};
typedef struct vvaddress vvaddress;

typedef vvaddress vvaddress_t;

struct pvaddress {
char PVolName[HPSS_PV_NAME_SIZE];

};
typedef struct pvaddress pvaddress;

typedef pvaddress pvaddress_t;

struct devaddress {
unsigned32 Flags;
signed32 DeviceID;
unsigned32 BlockSize;
unsigned32 BlocksBetweenTMs;
char VolumeID[HPSS_PV_NAME_SIZE];
positiondesc_t DevicePosition;
};
typedef struct devaddress devaddress;

typedef devaddress devaddress_t;


















#define FILE_ADDRESS 4
#define SSEG_ADDRESS 5
#define VVOL_ADDRESS 6
#define PVOL_ADDRESS 7
#define DEVICE_ADDRESS 8






struct StrAddr {
signed32 Type;
union {
netaddress_t NetAddr;
ipiaddress_t IPIAddr;

fileaddress_t FileAddr;
ssegaddress_t SSegAddr;
vvaddress_t VVolAddr;
pvaddress_t PVolAddr;
devaddress_t DevAddr;
memaddress_t MemAddr;
clientfileaddress_t ClientFileAddr;
shmaddress_t ShmAddr;
lftaddress_t LFTAddress;
san3paddress_t SAN3PAddress;
} StrAddr_u;
};
typedef struct StrAddr StrAddr;

typedef StrAddr straddress_t;

struct stripeaddress {
u_signed64 BlockSize;
u_signed64 StripeWidth;
signed32 AddrListLength;
unsigned32 Flags;
straddress_t Addr;
struct stripeaddress *Next;
};
typedef struct stripeaddress stripeaddress;

typedef stripeaddress stripeaddress_t;










struct Addr {
signed32 Type;
union {
netaddress_t NetAddr;
ipiaddress_t IPIAddr;

fileaddress_t FileAddr;
ssegaddress_t SSegAddr;
vvaddress_t VVolAddr;
pvaddress_t PVolAddr;
devaddress_t DevAddr;
stripeaddress_t StripeAddr;
memaddress_t MemAddr;
clientfileaddress_t ClientFileAddr;
shmaddress_t ShmAddr;
lftaddress_t LFTAddress;
san3paddress_t SAN3PAddress;
} Addr_u;
};
typedef struct Addr Addr;

typedef Addr address_t;

#define INFO_NONE 1
#define INFO_LOADDISPLAY 2
#define INFO_DEVICEATTR 3
#define INFO_VOLUMEID 4
#define INFO_REPLYADDR 5

struct ReqInfo {
signed32 InfoType;
union {
signed32 Reserved;
char DisplayBuffer[MAXDISPBUFSIZE];
devdesc_attr_t DeviceAttr;
char VolumeID[HPSS_PV_NAME_SIZE];
address_t ReplyAddr;
} ReqInfo_u;
};
typedef struct ReqInfo ReqInfo;

typedef ReqInfo ReqInfo_t;

struct requestspec {
signed32 SubFunction;
signed32 Argument;
signed32 DeviceID;
u_signed64 Count;
u_signed64 SelectionFlags;
ReqInfo_t ReqInfo_s;
};

typedef struct requestspec requestspec;

typedef requestspec requestspec_t;












struct srcsinkdesc {
unsigned32 Flags;
u_signed64 Offset;
u_signed64 Length;
unsigned32 SharedDevInfo;
address_t SrcSinkAddr;
struct srcsinkdesc *Next;
signed32 ServerDefined;
};
typedef struct srcsinkdesc srcsinkdesc;

typedef srcsinkdesc srcsinkdesc_t;






#define REPLY_NONE 1
#define REPLY_LISTENLIST 2
#define REPLY_DEVICEATTR 3
#define REPLY_VOLUMEID 4
#define REPLY_GAPINFO 5

struct ReqReply {
signed32 ReqReplyType;
union {
signed32 Reserved;
srcsinkdesc_t *ListenList;
devdesc_attr_t DeviceAttr;
char VolumeID[HPSS_PV_NAME_SIZE];
gapinfo_t GapInfo;
} ReqReply_u;
};
typedef struct ReqReply ReqReply;

typedef ReqReply ReqReply_t;

struct reqspecreply {
unsigned32 Flags;
signed32 Status;
signed32 CountProcessed;
signed32 ReqListLength;
ReqReply_t ReqReply_s;
};
typedef struct reqspecreply reqspecreply;

typedef reqspecreply reqspecreply_t;











struct srcsinkreply {
unsigned32 Flags;
signed32 Status;
u_signed64 BytesMoved;
unsigned32 SharedDevInfo;
positiondesc_t Position;
struct srcsinkreply *Next;
};
typedef struct srcsinkreply srcsinkreply;

typedef srcsinkreply srcsinkreply_t;

#define IOD_READ 1
#define IOD_WRITE 2
#define IOD_DEVICESPECIFIC 3
#define IOD_GETDEVICEATTR 4
#define IOD_SETDEVICEATTR 5
#define IOD_ABORT 6
#define SEQUENTIAL_IO 0x00000001
#define HOLD_RESOURCES 0x00000002
#define NO_LABEL_CHECK 0x00000004
#define SSD_PROCESSED 0x00000008
#define REPLYWHENREADY 0x00000010
#define CONTROL_ADDR 0x00000020
#define XFER_RESPONDER 0x00000040
#define XFEROPT_IP 0x00000080
#define XFEROPT_IPI3 0x00000100
#define XFEROPT_SHMEM 0x00000200
#define LAST_IN_XFER 0x00000400
#define DONT_BREAK_IO 0x00000800
#define USE_PORT_RANGE 0x00001000
#define LAST_SEG_WRITE 0x00002000
#define HPSS_PDATA_PUSH 0x00004000
#define EOM_ON_CONTROL 0x00008000
#define XFEROPT_SAN3P 0x00010000
#define COND_CTRL_ADDR 0x00020000






struct IOD {
hpss_reqid_t RequestID;
signed32 Function;
unsigned32 Flags;
requestspec_t *ReqSpecInfo;
signed32 SrcDescLength;
signed32 SinkDescLength;
srcsinkdesc_t *SrcDescList;
srcsinkdesc_t *SinkDescList;
};
typedef struct IOD IOD;

typedef IOD IOD_t;

#define IOR_NOT_PROCESSED 0x00000001
#define IOR_COMPLETE 0x00000002
#define IOR_ERROR 0x00000004
#define POSITIONVALID 0x00000008
#define ENDPOSITION 0x00000010
#define IOR_GAPINFO_VALID 0x00000020
#define IOR_FOREIGN_LABEL 0x00000040
#define IOR_NO_LABEL 0x00000080
#define IOR_NON_ANSI_LABEL 0x00000100
#define IOR_INCOMPLETE_LABEL 0x00000200
#define IOR_DEVICE_DISABLED 0x00000400
#define IOR_END_OF_SEGMENT 0x00000800
#define NON_BLOCK_OFFSET 0x00001000
#define IOR_STRIPE_ERROR 0x00002000






struct IOR {
hpss_reqid_t RequestID;
unsigned32 Flags;
signed32 Status;
reqspecreply_t *ReqSpecReply;
signed32 SrcReplyLength;
signed32 SinkReplyLength;
srcsinkreply_t *SrcReplyList;
srcsinkreply_t *SinkReplyList;
};
typedef struct IOR IOR;

typedef IOR IOR_t;
















































#endif

extern bool_t xdr_fileaddress();
extern bool_t xdr_fileaddress_t();
extern bool_t xdr_ssegaddress();
extern bool_t xdr_ssegaddress_t();
extern bool_t xdr_vvaddress();
extern bool_t xdr_vvaddress_t();
extern bool_t xdr_pvaddress();
extern bool_t xdr_pvaddress_t();
extern bool_t xdr_devaddress();
extern bool_t xdr_devaddress_t();
extern bool_t xdr_StrAddr();
extern bool_t xdr_straddress_t();
extern bool_t xdr_stripeaddress();
extern bool_t xdr_stripeaddress_t();
extern bool_t xdr_Addr();
extern bool_t xdr_address_t();
extern bool_t xdr_ReqInfo();
extern bool_t xdr_ReqInfo_t();
extern bool_t xdr_requestspec();
extern bool_t xdr_requestspec_t();
extern bool_t xdr_srcsinkdesc();
extern bool_t xdr_srcsinkdesc_t();
extern bool_t xdr_ReqReply();
extern bool_t xdr_ReqReply_t();
extern bool_t xdr_reqspecreply();
extern bool_t xdr_reqspecreply_t();
extern bool_t xdr_srcsinkreply();
extern bool_t xdr_srcsinkreply_t();
extern bool_t xdr_IOD();
extern bool_t xdr_IOD_t();
extern bool_t xdr_IOR();
extern bool_t xdr_IOR_t();


#endif /* !_HPSS_IOD_H_RPCGEN */


hpss_limits.h

HPSS4.5

HPSS6.2

#ifndef hpss_limits_v0_0_included
#define hpss_limits_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif

#define HPSS_MAX_ACCOUNT_NAME (128)
#define HPSS_MAX_DCE_NAME (128)
#define HPSS_MAX_PRINCIPAL_NAME (128)
#define HPSS_MAX_DESC_NAME (32)

#define HPSS_MAX_FILE_NAME (256)
#define HPSS_MAX_HOST_NAME (64)
#define HPSS_MAX_PATH_NAME (1024)

#define HPSS_MAX_READDIR_ENTRIES (16)
#define HPSS_MAX_USER_NAME (16)
#define HPSS_NGROUPS_MAX (64)
#define USER_INFO_LENGTH (80)

#define HPSS_MAX_CATLG_NAME (256)
#define HPSS_MAX_STORAGE_SERVERS (64)
#define HPSS_MAX_STORAGE_LEVELS (5)
#define HPSS_MAX_COS_NAME (32)
#define HPSS_MAX_UNIX_USERNAME (32)
#define HPSS_MAX_COMMENT_LENGTH (255)
#define HPSS_MAX_DISK_REGS_PER_MAPREC (8)
#define HPSS_MAX_OBJECT_NAME (32)
#define HPSS_MAX_SCLASS_PER_LEVEL (2)

#define HPSS_MAX_COS (64)
#define HPSS_MAX_STORAGE_CLASS (192)





#define HPSS_SOCKET_BUF_MAX (1048576)
#define HPSS_SOCKET_BUF_MIN (16384)
#define HPSS_PV_NAME_SIZE (12)
#define HPSS_PV_NAME_LENGTH (8)












#ifdef __cplusplus
}

#endif
#endif

#ifndef _HPSS_LIMITS_H_RPCGEN
#define _HPSS_LIMITS_H_RPCGEN

#include <rpc/rpc.h>
#ifndef _hpss_limits_h
#define _hpss_limits_h








#define HPSS_MAX_ACCOUNT_NAME 128

#define HPSS_MAX_PRINCIPAL_NAME 128
#define HPSS_MAX_DESC_NAME 32
#define HPSS_MAX_IF_DESC_NAME 64
#define HPSS_MAX_FILE_NAME 256
#define HPSS_MAX_HOST_NAME 64
#define HPSS_MAX_PATH_NAME 1024
#define HPSS_MAX_FS_NAME_LENGTH 128
#define HPSS_MAX_READDIR_ENTRIES 16
#define HPSS_MAX_USER_NAME 256
#define HPSS_MAX_GROUP_NAME 16
#define HPSS_NGROUPS_MAX 64
#define USER_INFO_LENGTH 80
#define HPSS_MAX_CATLG_NAME 256
#define HPSS_MAX_STORAGE_SERVERS 64
#define HPSS_MAX_STORAGE_LEVELS 5
#define HPSS_MAX_COS_NAME 32
#define HPSS_MAX_UNIX_USERNAME 32
#define HPSS_MAX_COMMENT_LENGTH 255
#define HPSS_MAX_DISK_REGS_PER_MAPREC 8
#define HPSS_MAX_OBJECT_NAME 32
#define HPSS_MAX_SCLASS_PER_LEVEL 2
#define HPSS_MAX_LS_PER_SITE 8
#define HPSS_MAX_COS 64
#define HPSS_MAX_STORAGE_CLASS 192
#define HPSS_MAX_REALM_NAME 256
#define HPSS_MAX_CLIENT_FULL_NAME 385
#define HPSS_MAX_SITE_NAME 256
#define HPSS_MAX_URL_NAME 256
#define HPSS_MAX_UUID_STRING 37
#define HPSS_SOCKET_BUF_MAX 1048576
#define HPSS_SOCKET_BUF_MIN 16384
#define HPSS_PV_NAME_SIZE 12
#define HPSS_PV_NAME_LENGTH 8
#define HPSS_MAX_DB_NAME 32
#define HPSS_MAX_RPC_SEC_MECHS 4
#define HPSS_MAX_SRVR_INTERFACES 8
#define HPSS_MAX_PVR_DEV_SPEC_INFO 128
#define HPSS_MAX_AUTH_MECH_NAME 128
#define HPSS_MAX_DISK_STRIPE_WIDTH 256
#define HPSS_MAX_TAPE_STRIPE_WIDTH 64
#define HPSS_MAX_DMEPI_HANDLE_SIZE 32
#define HPSS_MAX_USER_SHELL 64
#define HPSS_MAX_PASSWORD_LENGTH 128
#define HPSS_MAX_GECOS_FIELD 64
#endif




#endif /* !_HPSS_LIMITS_H_RPCGEN */


hpss_logging.h

HPSS4.5

HPSS6.2

#ifndef hpss_logging_h
#define hpss_logging_h

#include <sys/errno.h>
#include "hpss_errno.h" /* HPSS system error numbers */
#include "hpss_limits.h" /* for HPSS_MAX_DESC_NAME */
#include <string.h> /* For strlen() */
#include <nl_types.h> /* Incl. in cs_Log.h. For nl_catd, catgets() */
#include "cs_Log.h" /* HPSS log defs; cs_LogInit(), cs_Msg() */


#define HPSS_MSGCAT_SETNUMBER CS_LOG_MSGCAT_SETNUMBER_COMMON

#define HPSS_LOG_MSG_NOT_FOUND \
"Critical logging error, message not found, id ="

#define HPSS_MSG_READ_GLOBAL_CONF (1)
#define HPSS_MSG_READ_SUBSYS_CONF (2)
#define HPSS_MSG_READ_GEN_CONF_NAME (3)
#define HPSS_MSG_READ_GEN_CONF_TYPE (4)
#define HPSS_MSG_READ_GEN_CONF_ID (5)
#define HPSS_MSG_READ_SPEC_CONF (6)
#define HPSS_MSG_MISSING_SERVER_ERR (7)
#define HPSS_MSG_MULTIPLE_SERVER_ERR (8)
#define HPSS_MSG_BAD_SERVER_TYPE (9)
#define HPSS_MSG_ACCT_VALID_INIT_ERR (10)
#define HPSS_MSG_REQLIST_INSERTION_ERR (11)
#define HPSS_MSG_REQLIST_DELETION_ERR (12)
#define HPSS_MSG_REQLIST_UPDATE_ERR (13)
#define HPSS_MSG_WAITLIST_INSERTION_ERR (14)
#define HPSS_MSG_WAITLIST_DELETION_ERR (15)
#define HPSS_MSG_REQLIST_ENTRY_ERR (16)
#define HPSS_MSG_MUTEX_LOCK_ERR (17)
#define HPSS_MSG_MUTEX_UNLOCK_ERR (18)
#define HPSS_MSG_COS_REINIT_HIER_CHANGED (19)
#define HPSS_MSG_SCLASS_MIGP_CONFIG_ERR (20)
#define HPSS_MSG_SCLASS_PURGEP_CONFIG_ERR (21)
#define HPSS_MSG_WAITLIST_UPDATE_ERR (22)
#define HPSS_MSG_RTM_INIT_ERR (23)




































#define HPSS_DEF_READ_GLOBAL_CONF \
"Error reading global configuration record: File Name = '%s'."

<略>

#define HPSS_DEF_RTM_INIT_ERR \
"Call to RTM initialization routine failed, routine = %s"



























































































































typedef struct hpss_log_config {
char Subsystem[HPSS_MAX_DESC_NAME];
nl_catd CatFd;
unsigned32 ObjectClass;
} hpss_log_config_t;

#ifdef HPSS_COMPILE_COMMON_LOG_MSG_ARRAY

char *hpss_CommonLogMsgArray[] =
{
"Zero Entry",
HPSS_DEF_READ_GLOBAL_CONF,
HPSS_DEF_READ_SUBSYS_CONF,
HPSS_DEF_READ_GEN_CONF_NAME,
HPSS_DEF_READ_GEN_CONF_TYPE,
HPSS_DEF_READ_GEN_CONF_ID,
HPSS_DEF_READ_SPEC_CONF,
HPSS_DEF_MISSING_SERVER_ERR,
HPSS_DEF_MULTIPLE_SERVER_ERR,
HPSS_DEF_BAD_SERVER_TYPE,
HPSS_DEF_ACCT_VALID_INIT_ERR,
HPSS_DEF_REQLIST_INSERTION_ERR,
HPSS_DEF_REQLIST_DELETION_ERR,
HPSS_DEF_REQLIST_UPDATE_ERR,
HPSS_DEF_WAITLIST_INSERTION_ERR,
HPSS_DEF_WAITLIST_DELETION_ERR,
HPSS_DEF_REQLIST_ENTRY_ERR,
HPSS_DEF_MUTEX_LOCK_ERR,
HPSS_DEF_MUTEX_UNLOCK_ERR,
HPSS_DEF_COS_REINIT_HIER_CHANGED,
HPSS_DEF_SCLASS_MIGP_CONFIG_ERR,
HPSS_DEF_SCLASS_PURGEP_CONFIG_ERR,
HPSS_DEF_WAITLIST_UPDATE_ERR,
HPSS_DEF_RTM_INIT_ERR,



































}; /* hpss_CommonLogMsgArray[] */

#endif

void
hpss_LogInit(
nl_catd CatFd /* [IN} Catalog descriptor */
);

void
hpss_LogDebug(
char *RoutineName, /* [IN] Caller's function name */
signed32 RequestId, /* [IN] Request Id */
signed32 ErrorCode, /* [IN] Error code to log */
int MsgNum, /* [IN] Message number to generate */
char *MsgArea, /* [in] ->log message */
... /* [IN] Other arguments as needed */
);

void
hpss_LogAlarm(
char *RoutineName, /* [IN] Caller's function name */
signed32 RequestId, /* [IN] Request Id */
unsigned32 MsgType, /* [IN] Message type */
unsigned32 SeverityLevel, /* [IN] Severity level */
signed32 ErrorCode, /* [IN] Error code to log */
int MsgNum, /* [IN] Message number to generate */
char *MsgArea, /* [IN] default log message */
... /* [IN] Other arguments as needed */
);

void
hpss_LogEvent(
char *RoutineName, /* [IN] Caller's function name */
signed32 RequestId, /* [IN] Request Id */
unsigned32 MsgType, /* [IN] Message type */
unsigned32 SeverityLevel, /* [IN] Severity level */
signed32 ErrorCode, /* [IN] Error code to log */
int MsgNum, /* [IN] Message number to generate */
char *MsgArea, /* [IN] default log message */
... /* [IN] Other arguments as needed */
);











void
hpss_LogTrace(
char *RoutineName, /* [IN] Caller's function name */
signed32 RequestId, /* [IN] Request Id */
signed32 ErrorCode, /* [IN] Error code to log */
int MsgNum, /* [IN] Message number to generate */
char *MsgArea, /* [IN] default log message */
... /* [IN] Other arguments as needed */
);

char*
hpss_LogStrFromServerType(
unsigned32 ServerType /* [IN] Server type */
);

#endif /* hpss_logging_h */

#ifndef hpss_logging_h
#define hpss_logging_h

#include <sys/errno.h>
#include "hpss_errno.h" /* HPSS system error numbers */
#include "hpss_limits.h" /* for HPSS_MAX_DESC_NAME */
#include <string.h> /* For strlen() */
#include <nl_types.h> /* Incl. in cs_Log.h. For nl_catd, catgets() */

#include "cs_Log.h" /* HPSS log defs; cs_LogInit(), cs_Msg() */


#define HPSS_MSGCAT_SETNUMBER CS_LOG_MSGCAT_SETNUMBER_COMMON

#define HPSS_LOG_MSG_NOT_FOUND \
"Critical logging error, message not found, id ="

#define HPSS_MSG_READ_GLOBAL_CONF (1)
#define HPSS_MSG_READ_SUBSYS_CONF (2)
#define HPSS_MSG_READ_GEN_CONF_NAME (3)
#define HPSS_MSG_READ_GEN_CONF_TYPE (4)
#define HPSS_MSG_READ_GEN_CONF_ID (5)
#define HPSS_MSG_READ_SPEC_CONF (6)
#define HPSS_MSG_MISSING_SERVER_ERR (7)
#define HPSS_MSG_MULTIPLE_SERVER_ERR (8)
#define HPSS_MSG_BAD_SERVER_TYPE (9)
#define HPSS_MSG_ACCT_VALID_INIT_ERR (10)
#define HPSS_MSG_REQLIST_INSERTION_ERR (11)
#define HPSS_MSG_REQLIST_DELETION_ERR (12)
#define HPSS_MSG_REQLIST_UPDATE_ERR (13)
#define HPSS_MSG_WAITLIST_INSERTION_ERR (14)
#define HPSS_MSG_WAITLIST_DELETION_ERR (15)
#define HPSS_MSG_REQLIST_ENTRY_ERR (16)
#define HPSS_MSG_MUTEX_LOCK_ERR (17)
#define HPSS_MSG_MUTEX_UNLOCK_ERR (18)
#define HPSS_MSG_COS_REINIT_HIER_CHANGED (19)
#define HPSS_MSG_SCLASS_MIGP_CONFIG_ERR (20)
#define HPSS_MSG_SCLASS_PURGEP_CONFIG_ERR (21)
#define HPSS_MSG_WAITLIST_UPDATE_ERR (22)
#define HPSS_MSG_RTM_INIT_ERR (23)
#define HPSS_MSG_INIT_MM_ERR (24)
#define HPSS_MSG_CREATE_TPOOL_ERR (25)
#define HPSS_MSG_REGISTER_TPOOL_ERR (26)
#define HPSS_MSG_GET_IF_ENDPOINT_ERR (27)
#define HPSS_MSG_REGISTER_IF_ERR (28)
#define HPSS_MSG_ALLOCATE_CONN_ERR (29)
#define HPSS_MSG_INIT_CONN_SERVICE_ERR (30)
#define HPSS_MSG_OPEN_CONN_ERR (31)
#define HPSS_MSG_CLOSE_CONN_ERR (32)
#define HPSS_MSG_UNREGISTER_IF_ERR (33)
#define HPSS_MSG_SET_LOGIN_CRED_ERR (34)
#define HPSS_MSG_FREE_CONN_ERR (35)
#define HPSS_MSG_UNUSED_36 (36)
#define HPSS_MSG_SERVER_LISTEN_ERR (37)
#define HPSS_MSG_RPC_RUNTIME_ERR (38)
#define HPSS_MSG_GET_APPL_CRED_ERR (39)
#define HPSS_MSG_CALLER_AUTH_ERR (40)
#define HPSS_MSG_SEC_AUDIT_ERR (41)
#define HPSS_MSG_RPC_GET_CC_ERR (42)
#define HPSS_MSG_RPC_MALLOC_ERR (43)
#define HPSS_MSG_CONNMGR_INIT_ERR (44)
#define HPSS_MSG_CONNMGR_DESTROY_ERR (45)
#define HPSS_MSG_CONNMGR_GRAB_CONN_ERR (46)
#define HPSS_MSG_CONNMGR_RELEASE_CONN_ERR (47)
#define HPSS_MSG_UNUSED_48 (48)
#define HPSS_MSG_UNUSED_49 (49)
#define HPSS_MSG_UNUSED_50 (50)
#define HPSS_MSG_ENDPOINT_FROM_LOCMAP_ERR (51)
#define HPSS_MSG_GET_MALLOC_CTX_ERR (52)
#define HPSS_MSG_SET_MALLOC_CTX_ERR (53)
#define HPSS_MSG_INIT_AUTHZ_VECTOR_ERR (54)
#define HPSS_MSG_UNUSED_55 (55)
#define HPSS_MSG_GET_CREDS_BY_NAME_ERR (56)
#define HPSS_MSG_GET_CREDS_BY_UID_ERR (57)
#define HPSS_MSG_SET_2ND_MECHS_ERR (58)


define HPSS_DEF_READ_GLOBAL_CONF \
"Error reading global configuration record: %s."

<略>

#define HPSS_DEF_RTM_INIT_ERR \
"Call to RTM initialization routine failed, routine = %s."

#define HPSS_DEF_INIT_MM_ERR \
"Call to mm_Initialize to initialize metadata manager failed: %s."

#define HPSS_DEF_CREATE_TPOOL_ERR \
"Call to hpss_RPCCreateThreadPool to create a thread pool failed."

#define HPSS_DEF_REGISTER_TPOOL_ERR \
"Call to hpss_RPCRegisterThreadPool to register a thread pool failed."

#define HPSS_DEF_GET_IF_ENDPOINT_ERR \
"Call to hpss_GetServerInterface to look for interface information failed."

#define HPSS_DEF_REGISTER_IF_ERR \
"Call to hpss_RPCRegisterService to register RPC service %s failed: %s."

#define HPSS_DEF_ALLOCATE_CONN_ERR \
"Call to hpss_RPCAllocateConnection to allocation RPC connection " \
"to %s failed: %s."

#define HPSS_DEF_INIT_CONN_SERVICE_ERR \
"Call to hpss_RPCInitConnection to initialize RPC services failed: %s."

#define HPSS_DEF_OPEN_CONN_ERR \
"Call to hpss_RPCOpenConnection to open an RPC connection to " \
"%s failed: %s."

#define HPSS_DEF_CLOSE_CONN_ERR \
"Call to hpss_RPCCloseConnection to close an RPC connection failed: %s."

#define HPSS_DEF_UNREGISTER_IF_ERR \
"Call to hpss_RPCUnregisterService to unregister RPC service failed: %s."

#define HPSS_DEF_SET_LOGIN_CRED_ERR \
"Call to hpss_RPCSetLoginCred to set %s login credential failed: %s."

#define HPSS_DEF_FREE_CONN_ERR \
"Call to hpss_RPCFreeConnection to free RPC connection failed: %s."

#define HPSS_DEF_UNUSED_36 \
"Unused_36"

#define HPSS_DEF_SERVER_LISTEN_ERR \
"Call to hpss_RPCServerListen to process RPC requests failed: %s."

#define HPSS_DEF_RPC_RUNTIME_ERR \
"Call to %s failed with RPC runtime error: %s."

#define HPSS_DEF_GET_APPL_CRED_ERR \
"Call to hpss_SECGetApplCreds to get security registry information" \
" failed: %s."

#define HPSS_DEF_CALLER_AUTH_ERR \
"Call to hpss_SECCallerAuthorized to check client authorization" \
" for %s failed: %s."

#define HPSS_DEF_SEC_AUDIT_ERR \
"Call to hpss_SECAudit to log an auditable event failed: %s."

#define HPSS_DEF_RPC_GET_CC_ERR \
"Call to hpss_RPCGetConnectionContext to get the connection context" \" failed: %s."

#define HPSS_DEF_RPC_MALLOC_ERR \
"Call to hpss_RPCMalloc to allocate memory failed."

#define HPSS_DEF_CONNMGR_INIT_ERR \
"Call to hpss_ConnMgrInit to initialize a connection manager failed: %s."

#define HPSS_DEF_CONNMGR_DESTROY_ERR \
"Call to hpss_ConnMgrDestroy to destroy a connection manager failed: %s."

#define HPSS_DEF_CONNMGR_GRAB_CONN_ERR \
"Call to hpss_ConnMgrGrabConn to grab a connection from a connection" \" manager failed: %s."

#define HPSS_DEF_CONNMGR_RELEASE_CONN_ERR \
"Call to hpss_ConnMgrReleaseConn to release a connection from a" \
" connection manager failed: %s."

#define HPSS_DEF_UNUSED_48 \
"Unused_48"

#define HPSS_DEF_UNUSED_49 \
"Unused_49"

#define HPSS_DEF_UNUSED_50 \
"Unused_50"

#define HPSS_DEF_ENDPOINT_FROM_LOCMAP_ERR \
"Call to hpss_EndpointFromLocMap to get endpoint for a connection to " \
"%s failed: %s."

#define HPSS_DEF_GET_MALLOC_CTX_ERR \
"Call to hpss_RPCGetMallocContext to get allocation context failed."

#define HPSS_DEF_SET_MALLOC_CTX_ERR \
"Call to hpss_RPCSetMallocContext to set allocation context failed."

#define HPSS_DEF_INIT_AUTHZ_VECTOR_ERR \
"Call to hpss_SECInitAuthzVector failed: %s."

#define HPSS_DEF_UNUSED_55 \
"Unused_55"

#define HPSS_DEF_GET_CREDS_BY_NAME_ERR \
"Call to hpss_SECGetCredsByName failed: %s."

#define HPSS_DEF_GET_CREDS_BY_UID_ERR \
"Call to hpss_SECGetCredsByUid failed: %s."

#define HPSS_DEF_SET_2ND_MECHS_ERR \
"Call to hpss_SetSecondaryMechs to set security mechanism failed."


typedef struct hpss_log_config {
char Subsystem[HPSS_MAX_DESC_NAME];
nl_catd CatFd;
unsigned32 ObjectClass;
} hpss_log_config_t;

#ifdef HPSS_COMPILE_COMMON_LOG_MSG_ARRAY

char *hpss_CommonLogMsgArray[] =
{
"Zero Entry",
HPSS_DEF_READ_GLOBAL_CONF, /* 1 */
HPSS_DEF_READ_SUBSYS_CONF, /* 2 */
HPSS_DEF_READ_GEN_CONF_NAME, /* 3 */
HPSS_DEF_READ_GEN_CONF_TYPE, /* 4 */
HPSS_DEF_READ_GEN_CONF_ID, /* 5 */
HPSS_DEF_READ_SPEC_CONF, /* 6 */
HPSS_DEF_MISSING_SERVER_ERR, /* 7 */
HPSS_DEF_MULTIPLE_SERVER_ERR, /* 8 */
HPSS_DEF_BAD_SERVER_TYPE, /* 9 */
HPSS_DEF_ACCT_VALID_INIT_ERR, /* 10 */
HPSS_DEF_REQLIST_INSERTION_ERR, /* 11 */
HPSS_DEF_REQLIST_DELETION_ERR, /* 12 */
HPSS_DEF_REQLIST_UPDATE_ERR, /* 13 */
HPSS_DEF_WAITLIST_INSERTION_ERR, /* 14 */
HPSS_DEF_WAITLIST_DELETION_ERR, /* 15 */
HPSS_DEF_REQLIST_ENTRY_ERR, /* 16 */
HPSS_DEF_MUTEX_LOCK_ERR, /* 17 */
HPSS_DEF_MUTEX_UNLOCK_ERR, /* 18 */
HPSS_DEF_COS_REINIT_HIER_CHANGED, /* 19*/
HPSS_DEF_SCLASS_MIGP_CONFIG_ERR, /* 20 */
HPSS_DEF_SCLASS_PURGEP_CONFIG_ERR, /* 21 */
HPSS_DEF_WAITLIST_UPDATE_ERR, /* 22 */
HPSS_DEF_RTM_INIT_ERR, /* 23 */
HPSS_DEF_INIT_MM_ERR, /* 24 */
HPSS_DEF_CREATE_TPOOL_ERR, /* 25 */
HPSS_DEF_REGISTER_TPOOL_ERR, /* 26 */
HPSS_DEF_GET_IF_ENDPOINT_ERR, /* 27 */
HPSS_DEF_REGISTER_IF_ERR, /* 28 */
HPSS_DEF_ALLOCATE_CONN_ERR, /* 29 */
HPSS_DEF_INIT_CONN_SERVICE_ERR, /* 30 */
HPSS_DEF_OPEN_CONN_ERR, /* 31 */
HPSS_DEF_CLOSE_CONN_ERR, /* 32 */
HPSS_DEF_UNREGISTER_IF_ERR, /* 33 */
HPSS_DEF_SET_LOGIN_CRED_ERR, /* 34 */
HPSS_DEF_FREE_CONN_ERR, /* 35 */
HPSS_DEF_UNUSED_36, /* 36 */
HPSS_DEF_SERVER_LISTEN_ERR, /* 37 */
HPSS_DEF_RPC_RUNTIME_ERR, /* 38 */
HPSS_DEF_GET_APPL_CRED_ERR, /* 39 */
HPSS_DEF_CALLER_AUTH_ERR, /* 40 */
HPSS_DEF_SEC_AUDIT_ERR, /* 41 */
HPSS_DEF_RPC_GET_CC_ERR, /* 42 */
HPSS_DEF_RPC_MALLOC_ERR, /* 43 */
HPSS_DEF_CONNMGR_INIT_ERR, /* 44 */
HPSS_DEF_CONNMGR_DESTROY_ERR, /* 45 */
HPSS_DEF_CONNMGR_GRAB_CONN_ERR, /* 46 */
HPSS_DEF_CONNMGR_RELEASE_CONN_ERR, /* 47 */
HPSS_DEF_UNUSED_48, /* 48 */
HPSS_DEF_UNUSED_49, /* 49 */
HPSS_DEF_UNUSED_50, /* 50 */
HPSS_DEF_ENDPOINT_FROM_LOCMAP_ERR, /* 51 */
HPSS_DEF_GET_MALLOC_CTX_ERR, /* 52 */
HPSS_DEF_SET_MALLOC_CTX_ERR, /* 53 */
HPSS_DEF_INIT_AUTHZ_VECTOR_ERR, /* 54 */
HPSS_DEF_UNUSED_55, /* 55 */
HPSS_DEF_GET_CREDS_BY_NAME_ERR, /* 56 */
HPSS_DEF_GET_CREDS_BY_UID_ERR, /* 57 */
HPSS_DEF_SET_2ND_MECHS_ERR /* 58 */

}; /* hpss_CommonLogMsgArray[] */

#endif

void
hpss_LogInit(
nl_catd CatFd /* [IN] Catalog descriptor */
);

void
hpss_LogDebug(
char *RoutineName, /* [IN] Caller's function name */
signed32 RequestId, /* [IN] Request Id */
signed32 ErrorCode, /* [IN] Error code to log */
int MsgNum, /* [IN] Message number to generate */
char *MsgArea, /* [IN] Log message */
... /* [IN] Other arguments as needed */
);

void
hpss_LogAlarm(
char *RoutineName, /* [IN] Caller's function name */
signed32 RequestId, /* [IN] Request Id */
unsigned32 MsgType, /* [IN] Message type */
unsigned32 SeverityLevel, /* [IN] Severity level */
signed32 ErrorCode, /* [IN] Error code to log */
int MsgNum, /* [IN] Message number to generate */
char *MsgArea, /* [IN] Default log message */
... /* [IN] Other arguments as needed */
);

void
hpss_LogEvent(
char *RoutineName, /* [IN] Caller's function name */
signed32 RequestId, /* [IN] Request Id */
unsigned32 MsgType, /* [IN] Message type */
unsigned32 SeverityLevel, /* [IN] Severity level */
signed32 ErrorCode, /* [IN] Error code to log */
int MsgNum, /* [IN] Message number to generate */
char *MsgArea, /* [IN] default log message */
... /* [IN] Other arguments as needed */
);

void
hpss_LogSecurity(
char *RoutineName, /* [IN] Caller's function name */
signed32 RequestId, /* [IN] Request Id */
signed32 ErrorCode, /* [IN] Error code to log */
int MsgNum, /* [IN] Message number to generate */
char *MsgArea, /* [IN] default log message */
... /* [IN] Other arguments as needed */
);

void
hpss_LogTrace(
char *RoutineName, /* [IN] Caller's function name */
signed32 RequestId, /* [IN] Request Id */
signed32 ErrorCode, /* [IN] Error code to log */
int MsgNum, /* [IN] Message number to generate */
char *MsgArea, /* [IN] default log message */
... /* [IN] Other arguments as needed */
);

char*
hpss_LogStrFromServerType(
unsigned32 ServerType /* [IN] Server type */
);

#endif /* hpss_logging_h */


hpss_ls.h

HPSS4.5

HPSS6.2

#ifndef hpss_ls_h
#define hpss_ls_h

#include "ls_types.h"
#include "lsc_config.h"

signed32
hpss_LocateRootNS(
signed32 RequestId, /* IN */
ls_map_t *Location /* OUT */
);

signed32
hpss_LocateServerByUUID(
signed32 RequestId, /* IN */
uuid_t ServerId, /* IN */
ls_map_t *Location /* OUT */
);

signed32
hpss_LocateServersByType(
signed32 RequestId, /* IN */
uuid_t SiteId, /* IN */
unsigned32 ServerType, /* IN */
unsigned32 SubsystemId, /* IN */
ls_map_array_t **Locations /* OUT */
);

signed32
hpss_LocateSiteById(
signed32 RequestId, /* IN */
uuid_t *SiteId, /* IN */
char *SiteName /* OUT */
);

signed32
hpss_LocateSiteByName(
signed32 RequestId, /* IN */
char *SiteName, /* IN */
uuid_t *SiteId /* OUT */
);


signed32
hpss_LocationLibInit(void);

signed32
hpss_LocationLibGetConfig(
ls_lib_config_t *Config /* OUT */
);

signed32
hpss_LocationLibSetConfig(
ls_lib_config_t *Config /* IN */
);

#endif

#ifndef hpss_ls_h
#define hpss_ls_h

#include "ls_types.h"
#include "lsc_config.h"

signed32
hpss_LocateRootCS(
hpss_reqid_t RequestId, /* IN */

ls_map_t *Location /* OUT */
);

signed32
hpss_LocateServerByUUID(
hpss_reqid_t RequestId, /* IN */
hpss_uuid_t ServerId, /* IN */
ls_map_t *Location /* OUT */
);

signed32
hpss_LocateServersByType(
hpss_reqid_t RequestId, /* IN */
hpss_uuid_t SiteId, /* IN */
unsigned32 ServerType, /* IN */
unsigned32 SubsystemId, /* IN */
ls_map_array_t **Locations /* OUT */
);

signed32
hpss_LocateSiteById(
hpss_reqid_t RequestId, /* IN */
hpss_uuid_t *SiteId, /* IN */
char *SiteName /* OUT */
);

signed32
hpss_LocateSiteByName(
hpss_reqid_t RequestId, /* IN */
char *SiteName, /* IN */
hpss_uuid_t *SiteId /* OUT */
);


signed32
hpss_LocationLibInit(void);

signed32
hpss_LocationLibGetConfig(
ls_lib_config_t *Config /* OUT */
);

signed32
hpss_LocationLibSetConfig(
ls_lib_config_t *Config /* IN */
);

#endif


hpss_media_type.h

HPSS4.5

HPSS6.2

#ifndef hpss_media_type_v0_0_included
#define hpss_media_type_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif
#ifndef hpss_idl_types_v0_0_included
#include <hpss_idl_types.h>
#endif

typedef unsigned32 media_class_t;

typedef struct {
media_class_t Type;
unsigned32 Subtype;
} media_type_t;




typedef media_type_t drive_type_t;

#define MT_CLASS_MASK (-16777216)
#define MT_PROPERTIES_MASK (16711680)
#define MT_TYPE_MASK (65535)
#define MT_CLASS_TAPE (16777216)
#define MT_CLASS_DISK (33554432)
#define MT_CLASS_RWOPTICAL (50331648)
#define MT_CLASS_WORMOPTICAL (67108864)
#define MT_CLASS_MEMORY (83886080)
#define MT_PROP_FIXED (8388608)
#define MT_PROP_RAIT (4194304)
#define MT_TAPE_DEFAULT (16777217)
#define MT_TAPE_3480 (16777218)
#define MT_TAPE_3490 (16777219)
#define MT_TAPE_3490E (16777220)
#define MT_TAPE_3590 (16777221)
#define MT_TAPE_DD2 (16777222)
#define MT_TAPE_DST (16777222)
#define MT_TAPE_8MM (16777223)
#define MT_TAPE_4MM (16777224)
#define MT_TAPE_VHS (16777225)
#define MT_TAPE_4420 (16777226)
#define MT_TAPE_REDW (16777227)
#define MT_TAPE_TMBRLN (16777228)
#define MT_TAPE_9840 (16777229)
#define MT_TAPE_9940 (16777230)
#define MT_TAPE_3580 (16777231)
#define MT_RAIT_9840 (20971533)
#define MT_RAIT_9940 (20971534)
#define MT_TAPE_GY8240 (16777232)



#define MT_DISK_DEFAULT (41943041)
#define MT_DISK_9570 (41943042)
#define MT_DISK_MAXSTDKA (41943043)


#define MT_RWOPTICAL_DEFAULT (50331649)
#define MT_WORMOPTICAL_DEFAULT (67108865)
#define MT_MEMORY_DEFAULT (83886081)
#define MT_MEMORY_ZITEL (83886082)
#define MT_SUB_9940_A (0)
#define MT_SUB_9940_B (1)
#define MT_SUB_RAIT_1_0 (16777216)
#define MT_SUB_RAIT_1_1 (17825792)
#define MT_SUB_RAIT_2_1 (34603008)
#define MT_SUB_RAIT_4_1 (68157440)
#define MT_SUB_RAIT_4_2 (69206016)
#define MT_SUB_RAIT_6_1 (101711872)
#define MT_SUB_RAIT_6_2 (102760448)
#define MT_SUB_RAIT_8_1 (135266304)
#define MT_SUB_RAIT_8_2 (136314880)
#define MT_SUB_RAIT_8_4 (138412032)
#define MT_SUB_3590_O (0)
#define MT_SUB_3590_E (1)
#define MT_SUB_3590_H (2)
#define MT_SUB_3590_SINGLELEN (0)
#define MT_SUB_3590_DOUBLELEN (256)
#define MT_SUB_3590_O_SINGLELEN (0)
#define MT_SUB_3590_E_SINGLELEN (1)
#define MT_SUB_3590_H_SINGLELEN (2)
#define MT_SUB_3590_O_DOUBLELEN (256)
#define MT_SUB_3590_E_DOUBLELEN (257)
#define MT_SUB_3590_H_DOUBLELEN (258)










#define MT_SUB_DST_312 (0)
#define MT_SUB_DST_314 (1)
#define MT_SUB_DST_SMALL (256)
#define MT_SUB_DST_MEDIUM (512)
#define MT_SUB_DST_LARGE (1024)
#define MT_SUB_DST_312_SMALL (256)
#define MT_SUB_DST_312_MEDIUM (512)
#define MT_SUB_DST_312_LARGE (1024)
#define MT_SUB_DST_314_SMALL (257)
#define MT_SUB_DST_314_MEDIUM (513)
#define MT_SUB_DST_314_LARGE (1025)
#define MT_SUB_SMALL (256)
#define MT_SUB_MEDIUM (512)
#define MT_SUB_LARGE (1024)
#define MT_SUB_2_3GB (2048)
#define MT_SUB_5GB (4096)
#define MT_SUB_GY8240 (0)
#define MT_SUB_GY8240_SMALL (256)
#define MT_SUB_GY8240_LARGE (512)





#ifdef __cplusplus
}




#endif
#endif

#ifndef _HPSS_MEDIA_TYPE_H_RPCGEN
#define _HPSS_MEDIA_TYPE_H_RPCGEN

#include <rpc/rpc.h>
#ifndef _hpss_media_type_h
#define _hpss_media_type_h








#include "hpss_types.h"


typedef unsigned32 media_class_t;

struct hpss_media_type {
media_class_t Type;
unsigned32 Subtype;
};
typedef struct hpss_media_type hpss_media_type;

typedef hpss_media_type media_type_t;

typedef hpss_media_type drive_type_t;

#define MT_CLASS_MASK 0xFF000000
#define MT_PROPERTIES_MASK 0x00FF0000
#define MT_TYPE_MASK 0x0000FFFF
#define MT_CLASS_TAPE 0x01000000
#define MT_CLASS_DISK 0x02000000
#define MT_CLASS_RWOPTICAL 0x03000000
#define MT_CLASS_WORMOPTICAL 0x04000000
#define MT_CLASS_MEMORY 0x05000000
#define MT_PROP_FIXED 0x00800000
#define MT_PROP_RAIT 0x00400000
#define MT_TAPE_DEFAULT 0x01000001
#define MT_TAPE_3480 0x01000002
#define MT_TAPE_3490 0x01000003
#define MT_TAPE_3490E 0x01000004
#define MT_TAPE_3590 0x01000005
#define MT_TAPE_DD2 0x01000006
#define MT_TAPE_DST 0x01000006
#define MT_TAPE_8MM 0x01000007
#define MT_TAPE_4MM 0x01000008
#define MT_TAPE_VHS 0x01000009
#define MT_TAPE_4420 0x0100000A
#define MT_TAPE_REDW 0x0100000B
#define MT_TAPE_TMBRLN 0x0100000C
#define MT_TAPE_9840 0x0100000D
#define MT_TAPE_9940 0x0100000E
#define MT_TAPE_3580 0x0100000F
#define MT_RAIT_9840 0x0140000D
#define MT_RAIT_9940 0x0140000E
#define MT_TAPE_GY8240 0x01000010
#define MT_TAPE_3592 0x01000011
#define MT_TAPE_SAIT 0x01000012
#define MT_TAPE_T10000 0x01000013
#define MT_DISK_DEFAULT 0x02800001
#define MT_DISK_9570 0x02800002
#define MT_DISK_MAXSTDKA 0x02800003
#define MT_DISK_RAIDZONE 0x02800004
#define MT_DISK_SAN3P 0x02800005
#define MT_RWOPTICAL_DEFAULT 0x03000001
#define MT_WORMOPTICAL_DEFAULT 0x04000001
#define MT_MEMORY_DEFAULT 0x05000001
#define MT_MEMORY_ZITEL 0x05000002
#define MT_SUB_9940_A 0x00000000
#define MT_SUB_9940_B 0x00000001
#define MT_SUB_RAIT_1_0 0x01000000
#define MT_SUB_RAIT_1_1 0x01100000
#define MT_SUB_RAIT_2_1 0x02100000
#define MT_SUB_RAIT_4_1 0x04100000
#define MT_SUB_RAIT_4_2 0x04200000
#define MT_SUB_RAIT_6_1 0x06100000
#define MT_SUB_RAIT_6_2 0x06200000
#define MT_SUB_RAIT_8_1 0x08100000
#define MT_SUB_RAIT_8_2 0x08200000
#define MT_SUB_RAIT_8_4 0x08400000
#define MT_SUB_3590_O 0x00000000
#define MT_SUB_3590_E 0x00000001
#define MT_SUB_3590_H 0x00000002
#define MT_SUB_3590_SINGLELEN 0x00000000
#define MT_SUB_3590_DOUBLELEN 0x00000100
#define MT_SUB_3590_O_SINGLELEN 0x00000000
#define MT_SUB_3590_E_SINGLELEN 0x00000001
#define MT_SUB_3590_H_SINGLELEN 0x00000002
#define MT_SUB_3590_O_DOUBLELEN 0x00000100
#define MT_SUB_3590_E_DOUBLELEN 0x00000101
#define MT_SUB_3590_H_DOUBLELEN 0x00000102
#define MT_SUB_3592_J 0x00000000
#define MT_SUB_3592_E 0x00000001
#define MT_SUB_3592_LEN_SHORT 0x00000000
#define MT_SUB_3592_LEN_REGULAR 0x00000100
#define MT_SUB_3592_LEN_EXTRA 0x00000200
#define MT_SUB_3592_J_LEN_SHORT 0x00000000
#define MT_SUB_3592_J_LEN_REGULAR 0x00000100
#define MT_SUB_3592_E_LEN_SHORT 0x00000001
#define MT_SUB_3592_E_LEN_REGULAR 0x00000101
#define MT_SUB_3592_E_LEN_EXTRA 0x00000201
#define MT_SUB_DST_312 0x00000000
#define MT_SUB_DST_314 0x00000001
#define MT_SUB_DST_SMALL 0x00000100
#define MT_SUB_DST_MEDIUM 0x00000200
#define MT_SUB_DST_LARGE 0x00000400
#define MT_SUB_DST_312_SMALL 0x00000100
#define MT_SUB_DST_312_MEDIUM 0x00000200
#define MT_SUB_DST_312_LARGE 0x00000400
#define MT_SUB_DST_314_SMALL 0x00000101
#define MT_SUB_DST_314_MEDIUM 0x00000201
#define MT_SUB_DST_314_LARGE 0x00000401
#define MT_SUB_SMALL 0x00000100
#define MT_SUB_MEDIUM 0x00000200
#define MT_SUB_LARGE 0x00000400
#define MT_SUB_2_3GB 0x00000800
#define MT_SUB_5GB 0x00001000
#define MT_SUB_GY8240 0x00000000
#define MT_SUB_GY8240_SMALL 0x00000100
#define MT_SUB_GY8240_LARGE 0x00000200
#define MT_SUB_3580_GEN1 0x00000000
#define MT_SUB_3580_GEN2 0x00000001
#define MT_SUB_3580_GEN3 0x00000002
#endif



extern bool_t xdr_media_class_t();
extern bool_t xdr_hpss_media_type();
extern bool_t xdr_media_type_t();
extern bool_t xdr_drive_type_t();

#endif /* !_HPSS_MEDIA_TYPE_H_RPCGEN */


hpss_netopt.h

HPSS4.5

HPSS6.2

#ifndef hpss_netopt_h
#define hpss_netopt_h




#ifndef TRUE
#define TRUE (1)
#endif

#ifndef FALSE
#define FALSE (0)
#endif

typedef struct netopt_entry {
unsigned long IPAddr;
unsigned long NetMask;
unsigned long RFC1323;
unsigned long SendSpace;
unsigned long RecvSpace;
unsigned long WriteSize;
unsigned long TcpNodelay;
unsigned long Reserved2;
} netopt_entry_t;

long
netopt_FindEntry(
long NetAddr,
netopt_entry_t **RetTableEntryPtr);

int
netopt_GetWriteSize(
int SocketDescriptor,
long IpAddr);






#endif /* hpss_netopt_h */

#ifndef hpss_netopt_h
#define hpss_netopt_h

#include <sys/types.h>
#include <netinet/in.h>

#ifndef TRUE
#define TRUE (1)
#endif

#ifndef FALSE
#define FALSE (0)
#endif

typedef struct netopt_entry {
unsigned int IPAddr;
unsigned int NetMask;
unsigned int RFC1323;
unsigned int SendSpace;
unsigned int RecvSpace;
unsigned int WriteSize;
unsigned int TcpNodelay;
unsigned int Reserved2;
} netopt_entry_t;

int
netopt_FindEntry(
unsigned int NetAddr,
netopt_entry_t **RetTableEntryPtr);

int
netopt_GetWriteSize(
int SocketDescriptor,
unsigned int IpAddr);

void
netopt_SetSock(
int SocketDescriptor,
struct sockaddr_in *SockAddr);

#endif /* hpss_netopt_h */


hpss_rw_ops.h

HPSS4.5

HPSS6.2

#ifndef hpss_rw_ops_v0_0_included
#define hpss_rw_ops_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif


#define HPSS_OP_RANDOM (268435456)
#define HPSS_OP_PARALLEL (536870912)
#define HPSS_OP_SEQUENTIAL (1073741824)
#define HPSS_OP_WRITE (1)
#define HPSS_OP_WRITE_MANY (2)
#define HPSS_OP_APPEND (4)
#define HPSS_OP_READ (65536)

#ifdef __cplusplus
}

#endif
#endif

#ifndef _HPSS_RW_OPS_H_RPCGEN
#define _HPSS_RW_OPS_H_RPCGEN

#include <rpc/rpc.h>
#ifndef _hpss_rw_ops_h
#define _hpss_rw_ops_h







#include "hpss_types.h"

#define HPSS_OP_RANDOM 0x10000000
#define HPSS_OP_PARALLEL 0x20000000
#define HPSS_OP_SEQUENTIAL 0x40000000
#define HPSS_OP_WRITE 0x00000001
#define HPSS_OP_WRITE_MANY 0x00000002
#define HPSS_OP_APPEND 0x00000004
#define HPSS_OP_READ 0x00010000
#endif




#endif /* !_HPSS_RW_OPS_H_RPCGEN */


hpss_sclass.h

HPSS4.5

HPSS6.2

#ifndef hpss_sclass_v0_0_included
#define hpss_sclass_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif

#ifndef hpss_limits_v0_0_included
#include <hpss_limits.h>
#endif
#ifndef hpss_media_type_v0_0_included
#include <hpss_media_type.h>
#endif
#ifndef hpss_rw_ops_v0_0_included
#include <hpss_rw_ops.h>
#endif

#define HPSS_SCLASSTYPE_TAPE (1)
#define HPSS_SCLASSTYPE_DISK (2)
#define HPSS_HAS_NO_POLICY (0)

typedef struct {
unsigned32 SClassId;
unsigned32 SClassType;
idl_char SClassName[32];
unsigned32 TransferRate;
unsigned32 MaxVVsToWrite;
u_signed64 EstimatedSize;
u_signed64 StripeLength;
unsigned32 StripeWidth;
unsigned32 VVBlockSize;
unsigned32 MediaBlockSize;
unsigned32 TapeMarks;
unsigned32 CriticalThreshold;
unsigned32 WarningThreshold;
unsigned32 MigrPolicyId;
unsigned32 PurgePolicyId;
u_signed64 BytesMigratedButNotPurged;
media_type_t Media;
unsigned32 AvgLatency;
unsigned32 WriteOps;
unsigned32 ReadOps;
unsigned32 OptimumAccessSize;
unsigned32 StorageSegmentSize;
unsigned32 MaxStorageSegmentSize;
unsigned32 AvgNumSegs;
unsigned32 Flags;
} hpss_sclass_md_t;




#ifdef __cplusplus
}


#endif
#endif

#ifndef _HPSS_SCLASS_H_RPCGEN
#define _HPSS_SCLASS_H_RPCGEN

#include <rpc/rpc.h>
#ifndef _hpss_sclass_h
#define _hpss_sclass_h







#include "hpss_types.h"

#include "hpss_limits.h"


#include "hpss_media_type.h"


#include "hpss_rw_ops.h"


#define HPSS_SCLASSTYPE_TAPE 1
#define HPSS_SCLASSTYPE_DISK 2
#define HPSS_HAS_NO_POLICY 0

struct hpss_sclass_md {
unsigned32 SClassId;
unsigned32 SClassType;
char SClassName[HPSS_MAX_OBJECT_NAME];
unsigned32 TransferRate;
unsigned32 MaxVVsToWrite;
u_signed64 EstimatedSize;
u_signed64 StripeLength;
unsigned32 StripeWidth;
unsigned32 VVBlockSize;
unsigned32 MediaBlockSize;
unsigned32 TapeMarks;
unsigned32 CriticalThreshold;
unsigned32 WarningThreshold;
unsigned32 MigrPolicyId;
unsigned32 PurgePolicyId;
u_signed64 BytesMigratedButNotPurged;
media_type_t Media;
unsigned32 AvgLatency;
unsigned32 WriteOps;
unsigned32 ReadOps;
unsigned32 OptimumAccessSize;
u_signed64 StorageSegmentSize;
u_signed64 MaxStorageSegmentSize;
unsigned32 AvgNumSegs;
unsigned32 Flags;
};
typedef struct hpss_sclass_md hpss_sclass_md;

typedef hpss_sclass_md hpss_sclass_md_t;
#endif


extern bool_t xdr_hpss_sclass_md();
extern bool_t xdr_hpss_sclass_md_t();

#endif /* !_HPSS_SCLASS_H_RPCGEN */


hpss_server_attr.h

HPSS4.5

HPSS6.2

#ifndef hpss_server_attr_v0_0_included
#define hpss_server_attr_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif
#ifndef hpss_idl_types_v0_0_included
#include <hpss_idl_types.h>
#endif
#ifndef hpss_limits_v0_0_included
#include <hpss_limits.h>
#endif

typedef signed32 threshold_t;

typedef struct hpss_server_attrib {
unsigned32 Version;
uuid_t ServerID;
idl_char DescName[32];
idl_char ServerName[128];
signed32 OperationalState;
signed32 UsageState;
signed32 AdministrativeState;
signed32 ExecutionState;
signed32 ServiceStatus;
signed32 SecurityStatus;
signed32 SoftwareStatus;
signed32 HardwareStatus;
signed32 CommunicationStatus;
threshold_t ThreadsAlarmThreshold;
threshold_t ConnectionAlarmThreshold;
u_signed64 RegisterBitmap;
} hpss_server_attrib_t;




#define REG_VERSION (0)
#define REG_SERVER_ID (1)
#define REG_DESC_NAME (2)
#define REG_SERVER_NAME (3)
#define REG_OPERATIONAL_STATE (4)
#define REG_USAGE_STATE (5)
#define REG_ADMINISTRATIVE_STATE (6)
#define REG_EXECUTION_STATE (7)
#define REG_SERVICE_STATUS (8)
#define REG_SECURITY_STATUS (9)
#define REG_SOFTWARE_STATUS (10)
#define REG_HARDWARE_STATUS (11)
#define REG_COMMUNICATION_STATUS (12)
#define REG_THREADS_ALARM_THRESHOLD (13)
#define REG_CONNECTION_ALARM_THRESHOLD (14)
#define REG_REGISTER_BITMAP (15)
#define ST_ACTIVE (1)
#define ST_ENABLED (1)
#define ST_DISABLED (2)
#define ST_SUSPECT (4)
#define ST_MINOR (8)
#define ST_MAJOR (16)
#define ST_BROKEN (32)
#define ST_IDLE (2)
#define ST_BUSY (4)
#define ST_UNKNOWN (8)
#define ST_LOCKED (1)
#define ST_UNLOCKED (2)
#define ST_SHUTDOWN (4)
#define ST_HALT (8)
#define ST_REINITIALIZE (16)
#define ST_REPAIRED (32)
#define ST_INITIALIZING (2)
#define ST_RESTARTING (4)
#define ST_TERMINATING (8)
#define ST_INACTIVE (16)
#define ST_SUSPENDING (32)
#define ST_SUSPENDED (64)
#define ST_RESUMING (128)
#define STAT_NORMAL (1)
#define STAT_WARNING (2)
#define STAT_MINOR (4)
#define STAT_MAJOR (8)
#define STAT_CRITICAL (16)

#ifdef __cplusplus
}



#endif
#endif

#ifndef _HPSS_SERVER_ATTR_H_RPCGEN
#define _HPSS_SERVER_ATTR_H_RPCGEN

#include <rpc/rpc.h>
#ifndef _hpss_server_attr_h
#define _hpss_server_attr_h








#include "hpss_types.h"


#include "hpss_limits.h"


typedef signed32 threshold_t;

struct hpss_server_attrib {
unsigned32 Version;
hpss_uuid_t ServerID;
byte DescName[HPSS_MAX_DESC_NAME];

unsigned32 OperationalState;
unsigned32 UsageState;
unsigned32 AdministrativeState;
signed32 ExecutionState;
signed32 ServiceStatus;
signed32 SecurityStatus;
signed32 SoftwareStatus;
signed32 HardwareStatus;
signed32 CommunicationStatus;
threshold_t ThreadsAlarmThreshold;
threshold_t ConnectionAlarmThreshold;
u_signed64 RegisterBitmap;
};
typedef struct hpss_server_attrib hpss_server_attrib;

typedef hpss_server_attrib hpss_server_attrib_t;

#define REG_VERSION 0
#define REG_SERVER_ID 1
#define REG_DESC_NAME 2
#define REG_SERVER_NAME 3
#define REG_OPERATIONAL_STATE 4
#define REG_USAGE_STATE 5
#define REG_ADMINISTRATIVE_STATE 6
#define REG_EXECUTION_STATE 7
#define REG_SERVICE_STATUS 8
#define REG_SECURITY_STATUS 9
#define REG_SOFTWARE_STATUS 10
#define REG_HARDWARE_STATUS 11
#define REG_COMMUNICATION_STATUS 12
#define REG_THREADS_ALARM_THRESHOLD 13
#define REG_CONNECTION_ALARM_THRESHOLD 14
#define REG_REGISTER_BITMAP 15
#define ST_ACTIVE 0x00000001
#define ST_ENABLED 0x00000001
#define ST_DISABLED 0x00000002
#define ST_SUSPECT 0x00000004
#define ST_MINOR 0x00000008
#define ST_MAJOR 0x00000010
#define ST_BROKEN 0x00000020
#define ST_IDLE 0x00000002
#define ST_BUSY 0x00000004
#define ST_UNKNOWN 0x00000008
#define ST_LOCKED 0x00000001
#define ST_UNLOCKED 0x00000002
#define ST_SHUTDOWN 0x00000004
#define ST_HALT 0x00000008
#define ST_REINITIALIZE 0x00000010
#define ST_REPAIRED 0x00000020
#define ST_INITIALIZING 0x00000002
#define ST_RESTARTING 0x00000004
#define ST_TERMINATING 0x00000008
#define ST_INACTIVE 0x00000010
#define ST_SUSPENDING 0x00000020
#define ST_SUSPENDED 0x00000040
#define ST_RESUMING 0x00000080
#define STAT_NORMAL 0x00000001
#define STAT_WARNING 0x00000002
#define STAT_MINOR 0x00000004
#define STAT_MAJOR 0x00000008
#define STAT_CRITICAL 0x00000010
#endif


extern bool_t xdr_threshold_t();
extern bool_t xdr_hpss_server_attrib();
extern bool_t xdr_hpss_server_attrib_t();

#endif /* !_HPSS_SERVER_ATTR_H_RPCGEN */


hpss_sleep.h

HPSS4.5

HPSS6.2

#ifndef hpss_sleep_h
#define hpss_sleep_h

#include <pthread.h>

void hpss_Sleep(int Seconds, int MicroSeconds);

#endif

#ifndef hpss_sleep_h
#define hpss_sleep_h

#include "hpss_pthread.h"

void hpss_Sleep(int Seconds, int MicroSeconds);

#endif


hpss_soid_func.h

HPSS4.5

HPSS6.2



#include <dce/uuid.h>
#include "hpssoid.h"

int
SOID_Create(
uuid_t *ServerID, /* Server well known unique identifier */
int Type, /* Type of hpssoid being created */
char *SecurityLevel, /* Security Level information 2 bytes */
hpssoid_t *RetHPSSoid /* Where to return the new hpssoid */
);










int
SOIDs_AreEqual(
hpssoid_t *Soid1,
hpssoid_t *Soid2
);

int
SOID_GetServerID(
hpssoid_t *Soid,
uuid_t *ServerID
);

#define SOIDsEqual(S1,S2) (memcmp((char *)S1,(char *)S2,sizeof(hpssoid_t))==0)

#define SOIDsNotEqual(S1,S2) (memcmp((char *)S1,(char *)S2,sizeof(hpssoid_t))!=0)

#endif

#ifndef hpss_soid_func
#define hpss_soid_func

#include <hpssoid.h>

int
SOID_Create(
hpss_uuid_t *ServerID, /* Server well known unique identifier */
int Type, /* Type of hpssoid being created */
char *SecurityLevel, /* Security Level information 2 bytes */
hpssoid_t *RetHPSSoid /* Where to return the new hpssoid */
);

int
SOID_CreateFromObjectID(
hpss_uuid_t *ObjectId, /* Object well known unique identifier */
hpss_uuid_t *ServerId, /* Server well known unique identifier */
int Type, /* Type of hpssoid being created */
char *SecurityLevel, /* Security Level information 2 bytes */
hpssoid_t *RetHPSSoid /* Where to return the new hpssoid */
);

int
SOIDs_AreEqual(
hpssoid_t *Soid1,
hpssoid_t *Soid2
);

int
SOID_GetServerID(
hpssoid_t *Soid,
hpss_uuid_t *ServerID
);

#define SOIDsEqual(S1,S2) (memcmp((char *)S1,(char *)S2,sizeof(hpssoid_t))==0)

#define SOIDsNotEqual(S1,S2) (memcmp((char *)S1,(char *)S2,sizeof(hpssoid_t))!=0)

#endif


hpss_thread_safe.h

HPSS4.5

HPSS6.2

#ifndef hpss_thread_safe_h
#define hpss_thread_safe_h

#include <netdb.h>



#if !(defined(_AIX) || defined(__alpha)) || !(defined(_THREAD_SAFE) || defined(_REENTRANT))

#if defined (__alpha) && defined (__unix__)
#include <stdio.h>
#endif
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>

#ifndef _MAXADDRS
#define _MAXADDRS 35
#endif

#ifndef _MAXALIASES
#define _MAXALIASES 35
#endif

#ifndef _HOSTBUFSIZE
#define _HOSTBUFSIZE (BUFSIZ + 1)
#endif





#ifndef TRUE
#define TRUE (1)
#endif

#ifndef FALSE
#define FALSE (0)
#endif


#if !defined(_AIX43)

structhostent_data {
structin_addr host_addr; /* host address pointer */
char *h_addr_ptrs[_MAXADDRS + 1]; /* host address */
char hostaddr[_MAXADDRS];
char hostbuf[_HOSTBUFSIZE + 1]; /* host data */
char *host_aliases[_MAXALIASES];
char *host_addrs[2];
FILE *hostf;
int stayopen; /* AIX addon */
ulong host_addresses[_MAXADDRS]; /* As per defect 48367. */
int this_service;
char domain[256];
char *current;
int currentlen;
void *_host_reserv1; /* reserved for future use */
void *_host_reserv2; /* reserved for future use */
}; /* Actual Addresses. */












#endif

structsyslog_data {
int log_file;
int log_stat;
char *log_tag;
int log_mask;
int log_facility;
structsockaddr syslog_addr;
};
#define SYSLOG_DATA_INIT {-1, 0, "syslog", 0xff, LOG_USER}
#endif /* ! _AIX */





















































#endif /* ! hpss_thread_safe_h */

#ifndef hpss_thread_safe_h
#define hpss_thread_safe_h

#include <netdb.h>
#include <syslog.h>
#include "hpss_types.h"

#if !(defined(_AIX) || defined(__alpha))


#if defined (__alpha) && defined (__unix__)
#include <stdio.h>
#endif
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>

#ifndef _MAXADDRS
#define _MAXADDRS 35
#endif

#ifndef _MAXALIASES
#define _MAXALIASES 35
#endif

#ifndef _HOSTBUFSIZE
#define _HOSTBUFSIZE (BUFSIZ + 1)
#endif

#ifndef _MAXLINELEN
#define _MAXLINELEN 1024
#endif

#ifndef TRUE
#define TRUE (1)
#endif

#ifndef FALSE
#define FALSE (0)
#endif

#if !defined(_IBMR2)

struct hostent_data {
struct in_addr host_addr; /* host address pointer */
char *h_addr_ptrs[_MAXADDRS + 1];/* host address */
char hostaddr[_MAXADDRS];
char hostbuf[_HOSTBUFSIZE + 1]; /* host data */
char *host_aliases[_MAXALIASES];
char *host_addrs[2];
FILE *hostf;
int stayopen; /* AIX addon */
ulong host_addresses[_MAXADDRS]; /* As per defect 48367. */
int this_service;
char domain[256];
char *current;
int currentlen;
void *_host_reserv1; /* reserved for future use */
void *_host_reserv2; /* reserved for future use */
}; /* Actual Addresses. */

struct netent_data {
FILE *net_fp;
char line[_MAXLINELEN];
char *net_aliases[_MAXALIASES];
int _net_stayopen;
char *current;
int currentlen;
void *_net_reserv1; /* reserved for future use */
void *_net_reserv2; /* reserved for future use */
};

#endif

struct syslog_data {
int log_file;
int log_stat;
char *log_tag;
int log_mask;
int log_facility;
struct sockaddr syslog_addr;
};
#define SYSLOG_DATA_INIT {-1, 0, "syslog", 0xff, LOG_USER}
#endif /* ! _AIX */

signed32
hpss_GetHostByName(
char *Name, /* IN - Host name to lookup */
structhostent *HostentPointer, /* IN/OUT - Host entry data */
structhostent_data *HostentData); /* IN - Thread data area */

signed32
hpss_GetHostByAddr(
char *Address, /* IN - Host address */
int Length, /* IN - Host address length */
int Type, /* IN - Host address type */
structhostent *HostentPointer, /* IN/OUT - Host entry data */
structhostent_data *HostentData); /* IN - Thread data area */

signed32
hpss_GetNetByName(
char *Name, /* IN - Host name to lookup */
structnetent *NetentPointer, /* IN/OUT - Net entry data */
structnetent_data *NetentData); /* IN - Thread data area */

signed32
hpss_ConvertToFullHostName(
char *Name, /* IN - Host name */
char *FullName, /* IN/OUT - Host long name */
structhostent_data *HostentData); /* IN - Thread data area */

char *
hpss_InetNtoA(
structin_addr InternetAddr, /* IN - Internet address */
unsigned32 AddrStrLength, /* IN - Address string length */
char *AddrStr); /* IN - Address string */

char *
hpss_StrError(
int ErrorNumber, /* IN - System error number */
char *StringErrorBuffer, /* IN - String buffer */
int BufferLength); /* IN - String buffer length */

void hpss_SysLog(
int Priority, /* IN - Message priority */
structsyslog_data *SyslogData, /* IN - Thread data area */
char *Format, /* IN - Message format */
...); /* IN - Message arguments */


#endif /* ! hpss_thread_safe_h */


hpss_types.h

HPSS4.5

HPSS6.2



#if RPC_XDR
#undef hpss_types_h
#endif

#ifndef hpss_types_h
#define hpss_types_h








#ifdef NO_DCE

#if !defined(BYTE8INT)


typedef unsigned char byte;
typedef char signed8;
typedef unsigned char unsigned8;
typedef short int signed16;
typedef unsigned short int unsigned16;
typedef int signed32;
typedef unsigned int unsigned32;


typedef struct u_signed64_rep {

unsigned32 high;
unsigned32 low;




} u_signed64_rep_t;

typedef u_signed64_rep_t u_signed64;


#else

typedef unsigned char byte;
#if defined(__alpha) && defined(__osf__)
typedef char signed8;
typedef unsigned char unsigned8;
typedef unsigned long long u_signed64;
#else
typedef short int signed8;
typedef unsigned short int unsigned8;
typedef unsigned long u_signed64;
#endif
typedef short int signed16;
typedef unsigned short int unsigned16;
typedef int signed32;
typedef unsigned int unsigned32;

#endif /* !defined(BYTE8INT) */


typedef unsigned char idl_byte;
typedef char idl_char;
typedef signed32 idl_long_int;


typedef unsigned32 timestamp_sec_t;
#if ! defined(HAS_TIME_STRUCT)
#if !(defined(__alpha) && defined(__osf__) && defined(TIMESTAMP32))
typedef struct timestamp {
long tv_sec;
long tv_usec;
} timestamp_t;

#else
typedef struct timestamp {
unsigned32 tv_sec;
unsigned32 tv_usec;
} timestamp_t;

#endif /* NOT ALPHA */
#endif /* HAS_TIME_STRUCT */


typedef u_signed64 hpss_reqid_t;


typedef struct uuid {
unsigned32 time_low;
unsigned16 time_mid;
unsigned16 time_hi_and_version;
unsigned8 clock_seq_hi_and_reserved;
unsigned8 clock_seq_low;
byte node[6];
} uuid_t;








































































































#if ! defined(HAVE_XOM) /* PTR 1576 */
typedef int OM_sint;
typedef short OM_sint16;
typedef long OM_sint32;
typedef unsigned OM_uint;
typedef unsigned short OM_uint16;
typedef unsigned long OM_uint32;

typedef OM_uint32 OM_string_length;

typedef struct {
OM_string_length length;
char *elements;
} OM_string;

typedef OM_string OM_object_identifier;
#endif /* HAVE_XOM */ /* PTR 1576 */

#define IDL_ENTRY

#else /* NO_DCE - Use DCE NCA definitions */

#if defined(_AIX41) || defined(__SVR4) || \
((defined(__alpha)) && (defined(__osf__)))
#include <dce/dce.h>
#endif /* _AIX41 */

#include "hpss_idl_types.h"

#if !defined(_AIX41) && !defined(__SVR4) && !(defined(__alpha) && defined(__osf__))
typedef idl_byte byte;
#endif

#if (defined(__alpha)) && (defined(__osf__))
#include <xom.h>
#else
#include <dce/xom.h>
#endif

#endif /* NO_DCE */


#if defined(_IBMR2) || defined(__SVR4) || defined(LINUX)
#include <sys/types.h>

#if RPC_XDR

#if defined(_IBMR2)
typedef unsigned long size_t;
#elif defined(__SVR4) || defined(LINUX)
typedef unsigned int size_t;
#endif

#endif

typedef size_t sockapi_len_t;

#if defined(__SVR4) || defined(LINUX)
typedef u_char uchar;
#endif

#else
typedef int sockapi_len_t;
#endif

#ifndef HPSS_OFF_t
#define HPSS_OFF_t
typedef signed32 hpss_off_t;
#endif

#ifndef TRUE
#define TRUE (1)
#endif

#ifndef FALSE
#define FALSE (0)
#endif

#if !(RPC_XDR)
#endif /* hpss_types_h */













































#endif

#ifndef _HPSS_TYPES_H_RPCGEN
#define _HPSS_TYPES_H_RPCGEN



#include <rpc/rpc.h>
#ifndef hpss_types_h
#define hpss_types_h
#include <rpc/xdr.h>
#include "hpss_limits.h"
#if defined(CONVERSION_COMPILE)
#include <dce/dce.h>
#endif
#ifdef DMALLOC
#include "dmalloc.h"
#endif


#if !defined(BYTE8INT)
#if !defined(CONVERSION_COMPILE)

typedef u_char byte;
typedef char signed8;
typedef u_char unsigned8;
typedef short signed16;
typedef u_short unsigned16;
typedef int signed32;
typedef u_int unsigned32;
#endif

struct u_signed64_rep {
#if !defined(LITTLEEND)
unsigned32 high;
unsigned32 low;
#else
unsigned32 low;
unsigned32 high;
#endif
};

typedef struct u_signed64_rep u_signed64_rep_t;

typedef struct u_signed64_rep u_signed64;
#else

typedef u_char byte;

typedef short signed8;
typedef u_short unsigned8;
typedef u_long u_signed64;





typedef short signed16;
typedef u_short unsigned16;
typedef int signed32;
typedef u_int unsigned32;

#endif
#if !defined(CONVERSION_COMPILE)

typedef u_char idl_byte;
typedef char idl_char;
typedef signed32 idl_long_int;
#endif

typedef unsigned32 timestamp_sec_t;
#if (LONG_BIT == 64)

struct timestamp {
unsigned32 tv_sec;
unsigned32 tv_usec;
};
typedef struct timestamp timestamp;
#else
struct timestamp {
long tv_sec;
long tv_usec;
};
typedef struct timestamp timestamp;
#endif

typedef timestamp timestamp_t;

typedef unsigned32 hpss_reqid_t;
#if !defined(CONVERSION_COMPILE)

struct hpss_uuid {
unsigned32 time_low;
unsigned16 time_mid;
unsigned16 time_hi_and_version;
unsigned8 clock_seq_hi_and_reserved;
unsigned8 clock_seq_low;
byte node[6];
};
typedef struct hpss_uuid hpss_uuid;

typedef hpss_uuid hpss_uuid_t;
#endif

typedef unsigned32 acct_rec_t;

enum hpss_authn_mech_t {
hpss_authn_mech_invalid = 0,
hpss_authn_mech_krb5 = 1,
hpss_authn_mech_unix = 2,
hpss_authn_mech_gsi = 3,
hpss_authn_mech_spkm = 4
};
typedef enum hpss_authn_mech_t hpss_authn_mech_t;

enum hpss_authz_mech_t {
hpss_authz_mech_ldap = 1,
hpss_authz_mech_unix = 2
};
typedef enum hpss_authz_mech_t hpss_authz_mech_t;

enum hpss_rpc_auth_type_t {
hpss_rpc_auth_type_invalid = 0,
hpss_rpc_auth_type_none = 1,
hpss_rpc_auth_type_keytab = 2,
hpss_rpc_auth_type_keyfile = 3,
hpss_rpc_auth_type_key = 4,
hpss_rpc_auth_type_passwd = 5
};
typedef enum hpss_rpc_auth_type_t hpss_rpc_auth_type_t;

structhpss_rpc_endpoint {
hpss_uuid_t InterfaceId;
unsigned32 InterfaceVersion;
char HostName[HPSS_MAX_HOST_NAME];
unsigned32 ProgNum;
unsigned32 VersNum;
};
typedef struct hpss_rpc_endpoint hpss_rpc_endpoint;

typedef hpss_rpc_endpoint hpss_rpc_endpoint_t;

enum hpss_rpc_prot_level_t {
hpss_rpc_protect_connect = 1,
hpss_rpc_protect_pkt = 2,
hpss_rpc_protect_pkt_integ = 3,
hpss_rpc_protect_pkt_privacy = 4
};
typedef enum hpss_rpc_prot_level_t hpss_rpc_prot_level_t;

enum hpss_rpc_cred_type_t {
hpss_rpc_cred_server = 1,
hpss_rpc_cred_client = 1 + 1,
hpss_rpc_cred_both = 1 + 2
};
typedef enum hpss_rpc_cred_type_t hpss_rpc_cred_type_t;
#if defined(_IBMR2)
#if defined(__64BIT__)

typedef u_int sockapi_len_t;
#else

typedef u_long sockapi_len_t;
#endif
#elif defined(__SVR4) || defined(LINUX)

typedef u_int sockapi_len_t;
#else

typedef int sockapi_len_t;
#endif
#if RPC_XDR
#if defined(_IBMR2) || ((defined(__SVR4) || defined(LINUX)) && (1 != 0))

typedef u_long size_t;
#elif defined(LINUX)

typedef u_int size_t;
#endif
#endif
#if defined(_IBMR2) || defined(__SVR4) || defined(LINUX)
#include <sys/types.h>
#if defined(__SVR4) || defined(LINUX)

typedef u_char uchar;
#endif
#else
#if defined(__sgi)

typedef u_char uchar;
#endif
#endif

typedef signed32 hpss_off_t;
#if defined(__SVR4) && (1 != 0)
#ifdef FD_SETSIZE
#undef FD_SETSIZE
#endif
#define FD_SETSIZE ((unsigned int)sysconf(_SC_OPEN_MAX))
#endif
#endif



















































































extern bool_t xdr_byte();
extern bool_t xdr_signed8();
extern bool_t xdr_unsigned8();
extern bool_t xdr_signed16();
extern bool_t xdr_unsigned16();
extern bool_t xdr_signed32();
extern bool_t xdr_unsigned32();
extern bool_t xdr_u_signed64_rep_t();
extern bool_t xdr_u_signed64();
extern bool_t xdr_byte();
extern bool_t xdr_signed8();
extern bool_t xdr_unsigned8();
extern bool_t xdr_u_signed64();
extern bool_t xdr_signed16();
extern bool_t xdr_unsigned16();
extern bool_t xdr_signed32();
extern bool_t xdr_unsigned32();
extern bool_t xdr_idl_byte();
extern bool_t xdr_idl_char();
extern bool_t xdr_idl_long_int();
extern bool_t xdr_timestamp_sec_t();
extern bool_t xdr_timestamp();
extern bool_t xdr_timestamp();
extern bool_t xdr_timestamp_t();
extern bool_t xdr_hpss_reqid_t();
extern bool_t xdr_hpss_uuid();
extern bool_t xdr_hpss_uuid_t();
extern bool_t xdr_acct_rec_t();
extern bool_t xdr_hpss_authn_mech_t();
extern bool_t xdr_hpss_authz_mech_t();
extern bool_t xdr_hpss_rpc_auth_type_t();
extern bool_t xdr_hpss_rpc_endpoint();
extern bool_t xdr_hpss_rpc_endpoint_t();
extern bool_t xdr_hpss_rpc_prot_level_t();
extern bool_t xdr_hpss_rpc_cred_type_t();
extern bool_t xdr_sockapi_len_t();
extern bool_t xdr_sockapi_len_t();
extern bool_t xdr_sockapi_len_t();
extern bool_t xdr_sockapi_len_t();
extern bool_t xdr_size_t();
extern bool_t xdr_size_t();
extern bool_t xdr_uchar();
extern bool_t xdr_uchar();
extern bool_t xdr_hpss_off_t();


#endif /* !_HPSS_TYPES_H_RPCGEN */


hpss_vattr.h

HPSS4.5

HPSS6.2

#if RPC_XDR
#undef hpss_vattr_h
#endif

#ifndef hpss_vattr_h
#define hpss_vattr_h

#include "hpss_types.h"
#include "hpssoid.h"
#include "hpss_cos.h"
#include "ns_IFStructs.h"
#include "acct_hpss.h"


#define VA_TYPE 1
#define VA_MODE 2
#define VA_UID 3
#define VA_GID 4
#define VA_FSID 5
#define VA_SERIALNO 6
#define VA_NLINK 7
#define VA_RDEV 8
#define VA_NID 9
#define VA_CHAN 10
#define VA_ACLSIZE 11
#define VA_SIZE 12
#define VA_PREFIOSIZE 13
#define VA_BLOCKSIZE 14
#define VA_NUMBLOCKS 15
#define VA_ATIME 16
#define VA_MTIME 17
#define VA_CTIME 18
#define VA_ACL 19
#define VA_OBJHANDLE 20
#define VA_SOID 21
#define VA_COS 22
#define VA_ACCOUNT 23

#define NODELAY 1

typedef unsigned32 hpss_mode_t;
typedef unsigned32 hpss_uid_t;
typedef unsigned32 hpss_gid_t;

typedef enum {
F_VNON,
F_VREG,
F_VDIR,
F_VBLK,
F_VCHR,
F_VLNK,
F_VSOCK,
F_VBAD,
F_VFIFO,
F_VMPC
} hpss_type_t;

typedef struct hpss_vattr {
hpss_type_t va_type; /* type of HPSS object */
hpss_mode_t va_mode; /* Unix permissions of object*/
hpss_uid_t va_uid; /* Unix id of object owner */
hpss_gid_t va_gid; /* Unix group id of object */
unsigned32 va_fsid; /* Not used */
unsigned32 va_serialno; /* Not used */
unsigned32 va_nlink; /* links to this object */
unsigned32 va_rdev; /* Not used */
unsigned32 va_nid; /* Network id for this object*/
unsigned32 va_chan; /* Channel for object device */
unsigned32 va_aclsize; /* ACL size in bytes */
u_signed64 va_size; /* HPSS object size in bytes */
u_signed64 va_prefiosize; /* Preferred I/O size */
u_signed64 va_blocksize; /* HPSS object block size */
u_signed64 va_numblocks; /* HPSS object block count */
u_signed64 va_ftid; /* Fileset id */
timestamp_sec_t va_atime; /* time of last access */
timestamp_sec_t va_mtime; /* time of last modification */
timestamp_sec_t va_ctime; /* time of last change */
unsigned char *va_acl; /* ptr to Access Control List*/

ns_ObjHandle_t va_objhandle; /* Name Server object handle */
hpssoid_t va_soid; /* HPSS bitfile identifier */
cos_t va_cos; /* HPSS class of service id */
acct_rec_t va_account; /* HPSS account index */
} hpss_vattr_t;

#if !(RPC_XDR)
#endif /* hpss_vattr_h */
#endif





#ifndef hpss_vattr_h
#define hpss_vattr_h

#include "hpss_types.h"
#include "hpssoid.h"
#include "hpss_cos.h"


#include "ns_interface_defs.h"

#define VA_TYPE 1
#define VA_MODE 2
#define VA_UID 3
#define VA_GID 4
#define VA_FSID 5
#define VA_SERIALNO 6
#define VA_NLINK 7
#define VA_RDEV 8
#define VA_NID 9
#define VA_CHAN 10
#define VA_ACLSIZE 11
#define VA_SIZE 12
#define VA_PREFIOSIZE 13
#define VA_BLOCKSIZE 14
#define VA_NUMBLOCKS 15
#define VA_ATIME 16
#define VA_MTIME 17
#define VA_CTIME 18
#define VA_ACL 19
#define VA_OBJHANDLE 20
#define VA_SOID 21
#define VA_COS 22
#define VA_ACCOUNT 23

#define NODELAY 1

typedef unsigned32 hpss_mode_t;
typedef unsigned32 hpss_uid_t;
typedef unsigned32 hpss_gid_t;

typedef enum {
F_VNON,
F_VREG,
F_VDIR,
F_VBLK,
F_VCHR,
F_VLNK,
F_VSOCK,
F_VBAD,
F_VFIFO,
F_VMPC
} hpss_type_t;

typedef struct hpss_vattr {
hpss_type_t va_type; /* type of HPSS object */
hpss_mode_t va_mode; /* Unix permissions of object*/
hpss_uid_t va_uid; /* Unix id of object owner */
hpss_gid_t va_gid; /* Unix group id of object */
unsigned32 va_fsid; /* Not used */
unsigned32 va_serialno; /* Not used */
unsigned32 va_nlink; /* links to this object */
unsigned32 va_rdev; /* Not used */
unsigned32 va_nid; /* Network id for this object*/
unsigned32 va_chan; /* Channel for object device */
unsigned32 va_aclsize; /* ACL size in bytes */
u_signed64 va_size; /* HPSS object size in bytes */
u_signed64 va_prefiosize; /* Preferred I/O size */
u_signed64 va_blocksize; /* HPSS object block size */
u_signed64 va_numblocks; /* HPSS object block count */
u_signed64 va_ftid; /* Fileset id */
timestamp_sec_t va_atime; /* time of last access */
timestamp_sec_t va_mtime; /* time of last modification */
timestamp_sec_t va_ctime; /* time of last change */
unsigned char *va_acl; /* ptr to Access Control List*/
unsigned32 va_realm; /* Security realm id */
ns_ObjHandle_t va_objhandle; /* Name Server object handle */
hpssoid_t va_soid; /* HPSS bitfile identifier */
cos_t va_cos; /* HPSS class of service id */
acct_rec_t va_account; /* HPSS account index */
} hpss_vattr_t;



#endif /* hpss_vattr_h */


hpss_version.h

HPSS4.5

HPSS6.2

#ifndef HPSS_VERSION_H_INCLUDED
#define HPSS_VERSION_H_INCLUDED

#define HPSS_MAJOR_VERSION 04
#define HPSS_MINOR_VERSION 5
#define HPSS_PATCH_LEVEL 0
#define HPSS_LEVEL 450

#endif /* HPSS_VERSION_H_INCLUDED */

#ifndef HPSS_VERSION_H_INCLUDED
#define HPSS_VERSION_H_INCLUDED

#define HPSS_MAJOR_VERSION 06
#define HPSS_MINOR_VERSION 2
#define HPSS_PATCH_LEVEL 0
#define HPSS_LEVEL 620

#endif /* HPSS_VERSION_H_INCLUDED */


hpssaddr.h

HPSS4.5

HPSS6.2

#ifndef idlreladdr_v0_0_included
#define idlreladdr_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif
#ifndef hpss_idl_types_v0_0_included
#include <hpss_idl_types.h>
#endif

#define ABS_ADDR_SIZE (4)
#define COMP_ADDR_SIZE (16)

typedef struct relative_address {
idl_byte Version;
idl_byte Reserved;
signed16 Partition;
signed32 Section;
u_signed64 Offset;
} relative_address_t;



typedef struct old_absolute_address {
idl_byte OldAbsAddrBytes[4];
} old_absolute_address_t;
#define AA_COOKIE (1)
#define AA_LBA (2)

typedef struct absolute_address {
signed32 Type;
idl_byte AbsAddrBytes[4];
} absolute_address_t;














typedef struct old_composite_address {
old_absolute_address_t OldCompAddr[16];
} old_composite_address_t;

typedef struct composite_address {
absolute_address_t CompAddr[16];
unsigned32 StripeIndex;
} composite_address_t;



#define PD_DIRECT_ADDR (1)

typedef struct positiondesc {
unsigned32 Flags;
u_signed64 Granularity;
relative_address_t RelativePosition;
absolute_address_t AbsolutePosition;
composite_address_t VVPosition;

relative_address_t SegmentStartAddress;
} positiondesc_t;




#ifdef __cplusplus
}










#endif
#endif

#ifndef _HPSSADDR_H_RPCGEN
#define _HPSSADDR_H_RPCGEN

#include <rpc/rpc.h>
#ifndef _hpssaddr_h
#define _hpssaddr_h








#include "hpss_types.h"

#include "hpss_limits.h"
#define ABS_ADDR_SIZE 4
#define COMP_ADDR_SIZE HPSS_MAX_TAPE_STRIPE_WIDTH

struct relative_address {
byte Version;

signed16 Partition;
signed32 Section;
u_signed64 Offset;
};
typedef struct relative_address relative_address;

typedef relative_address relative_address_t;



#define AA_COOKIE 1
#define AA_LBA 2

struct absolute_address {
byte AbsAddrBytes[ABS_ADDR_SIZE];
byte Type;
};
typedef struct absolute_address absolute_address;

typedef absolute_address absolute_address_t;

structdb_absolute_address {
hpss_uuid_t ObjectID;
unsigned32 Ordinal;
byte AbsAddrBytes[ABS_ADDR_SIZE];
byte Type;
};
typedef struct db_absolute_address db_absolute_address;

typedef db_absolute_address db_absolute_address_t;





struct composite_address {
absolute_address_t CompAddr[HPSS_MAX_TAPE_STRIPE_WIDTH];

};
typedef struct composite_address composite_address;

typedef composite_address composite_address_t;
#define PD_DIRECT_ADDR 1

struct positiondesc {
unsigned32 Flags;
u_signed64 Granularity;
relative_address_t RelativePosition;
absolute_address_t AbsolutePosition;
composite_address_t VVPosition;
unsigned32 StripeIndex;
relative_address_t SegmentStartAddress;
};
typedef struct positiondesc positiondesc;

typedef positiondesc positiondesc_t;
#endif


extern bool_t xdr_relative_address();
extern bool_t xdr_relative_address_t();
extern bool_t xdr_absolute_address();
extern bool_t xdr_absolute_address_t();
extern bool_t xdr_db_absolute_address();
extern bool_t xdr_db_absolute_address_t();
extern bool_t xdr_composite_address();
extern bool_t xdr_composite_address_t();
extern bool_t xdr_positiondesc();
extern bool_t xdr_positiondesc_t();


#endif /* !_HPSSADDR_H_RPCGEN */


hpssmutex.h

HPSS4.5

HPSS6.2

#ifndef hpssmutex_h
#define hpssmutex_h

#include "hpss_types.h"
#include "hpss_errno.h"
#include "pthread.h"

#define HPSS_LOCK_ON 1
#define HPSS_LOCK_OFF 2

<略>

#endif /* hpssmutex_h */

#ifndef hpssmutex_h
#define hpssmutex_h

#include "hpss_types.h"
#include "hpss_errno.h"
#include "hpss_pthread.h"

#define HPSS_LOCK_ON 1
#define HPSS_LOCK_OFF 2

<略>

#endif /* hpssmutex_h */


hpssoid.h

HPSS4.5

HPSS6.2

#ifndef idlhpssoid_v0_0_included
#define idlhpssoid_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif

#define MIN_OBJ (0)
#define NULL_OBJ (0)
#define VV_OBJ (1)
#define SEGMENT_OBJ (2)
#define DIRECTORY_OBJ (3)
#define BITFILE_OBJ (4)
#define SERVER_OBJ (5)
#define DELETED_OBJ (6)
#define MAX_OBJ (6)





typedef struct hpssoid {
uuid_t ObjectID;
unsigned32 ServerDep1;
unsigned16 ServerDep2;
unsigned16 ServerDep3;
idl_byte ServerDep4;
idl_byte ServerDep5;
idl_byte SecurityLevel[2];
idl_byte Reserved[3];

idl_byte Type;
} hpssoid_t;





#ifdef __cplusplus
}


#endif
#endif

#ifndef _HPSSOID_H_RPCGEN
#define _HPSSOID_H_RPCGEN

#include <rpc/rpc.h>
#ifndef _hpssoid_h
#define _hpssoid_h








#include "hpss_types.h"
#define MIN_OBJ 0
#define NULL_OBJ 0
#define VV_OBJ 1
#define SEGMENT_OBJ 2
#define UNUSED_OBJ_1 3
#define BITFILE_OBJ 4
#define UNUSED_OBJ_2 5
#define JUNCTION_OBJ 6
#define EXTRAN_OBJ 7
#define MAX_OBJ 7
#define NO_SUBTYPE 0
#define DISK_SUBTYPE 1
#define TAPE_SUBTYPE 2

struct hpssoid_s {
hpss_uuid_t ObjectID;
unsigned32 ServerDep1;
unsigned16 ServerDep2;
unsigned16 ServerDep3;
byte ServerDep4;
byte ServerDep5;
byte SecurityLevel[2];
byte Reserved[2];
byte SubType;
byte Type;
};
typedef struct hpssoid_s hpssoid_s;

typedef hpssoid_s hpssoid_t;
#endif


extern bool_t xdr_hpssoid_s();
extern bool_t xdr_hpssoid_t();

#endif /* !_HPSSOID_H_RPCGEN */


ls_common.h

HPSS4.5

HPSS6.2

#ifndef ls_common_h
#define ls_common_h



#include "hpsscomm.h"
#include "hpss_rpc_handles.h"
#include "ls_types.h"

typedef enum
{
LS_CONN_UNINITIALIZED = 0, /* never used */
LS_CONN_UNCONNECTED, /* currently freed up */
LS_CONN_CONNECTED, /* valid handle */
LS_CONN_BAD /* used, but needs freeing */
} ls_conn_state_e;

#define LS_CONN_GET_HANDLE_RETRIES (1)

#define LS_CONN_MIN_REBIND_TIME (30)

#define LS_CONN_MAX_TIMES_TO_WAIT (3)

#define LS_CONN_FLAGS_USE_HANDLES (0x00000001)
#define LS_CONN_FLAGS_NO_HANDLES (0x00000002)

#define LS_CONN_MAX_COND_WAIT (20)


#define LS_RETRY(RetryCb, TotalTime) \
for ((RetryCb)->Initted = FALSE; \
ls_RetryCheck((ls_retry_cb_t*)(RetryCb), (TotalTime));)

#define LS_RETRY_MAX_SLEEP (60)

#if defined(LS_DB_MALLOC)
#define LS_MALLOC(size) \
ls_db_Malloc(size, #size, __FILE__, __LINE__, function)
#define LS_FREE(ptr) \
ls_db_Free(ptr, __FILE__, __LINE__, function)
#else
#define LS_MALLOC(size) malloc(size)
#define LS_FREE(ptr) free(ptr)
#endif

#define LS_MAP_ARRAY_SIZE(count) \
(sizeof(ls_map_array_t) + \
(sizeof(ls_map_t) * ((count) - 1)))

typedef int (*ls_sort_routine)(const void *, const void *);

typedef struct ls_rpc_conn_cb {
pthread_mutex_t lock;
pthread_cond_t cond;
signed32 initted;
signed32 error_id;
signed32 refcount;
rpc_master_handle_t rpc_handle;
rpc_binding_handle_t connect_rpc_handle;
hpss_connect_handle_t *connect_handle;
rpc_if_handle_t ifspec;
uuid_t server_uuid;
ls_conn_state_e state;
unsigned32 flags;
char name[HPSS_MAX_DCE_NAME];
time_t conn_time;
signed32 again_count;
unsigned int seed; /* must be unsigned int */
unsigned32 com_timeout;
} ls_rpc_conn_cb_t;

typedef struct ls_rpc_group_list {
structls_rpc_group_list *next;
unsigned_char_t *name;
} ls_rpc_group_list_t;

typedef struct ls_retry_cb
{
unsigned32 Initted;
unsigned32 Sleep;
unsigned32 MaxSleep;
time_t EndTime;
} ls_retry_cb_t;











signed32
ls_LoadRPCGroup(
char *GroupName, /* IN */
char *AvoidName, /* IN */
signed32 *Count, /* OUT */
ls_rpc_group_list_t **GroupList /* OUT */
);

signed32
ls_InitConnection(
rpc_if_handle_t IFSpec,
char *CDSPath,
uuid_t *ServerUuid,
unsigned32 Flags,
ls_rpc_conn_cb_t *Conn
);

signed32
ls_DestroyConnection(
ls_rpc_conn_cb_t *Conn /* IN */
);

signed32
ls_ValidateConnection(ls_rpc_conn_cb_t *Conn,
unsigned32 RpcErr,
unsigned32 WaitForConn);

signed32
ls_BuildConnection(ls_rpc_conn_cb_t *Conn,
unsigned32 LogConnErrors
);

signed32
ls_GrabConnection(ls_rpc_conn_cb_t *Conn);

signed32
ls_GrabLSConnection(ls_rpc_conn_cb_t *Conn,
char *GroupName);






signed32
ls_ReleaseConnection(ls_rpc_conn_cb_t *Conn,
signed32 Error,
unsigned32 RpcErr);

signed32
ls_MakeFullCDSPath(
char *InPath,
char *OutPath
);

signed32
ls_RetryableError(
signed32 Error
);

signed32
ls_RetryCheck(
ls_retry_cb_t *RetryCb,
signed32 TotalTime
);

#if defined(LS_DEBUG) || defined(LSC_DEBUG)

int
ls_db_stop_point(void);

#endif

#endif /* ls_common_h */

#ifndef ls_common_h
#define ls_common_h

#include <netinet/in.h>

#include "hpss_connmgr.h"
#include "hpss_rpc_defs.h"
#include "ls_types.h"

typedef enum
{
LS_CONN_UNINITIALIZED = 0, /* never used */
LS_CONN_UNCONNECTED, /* currently freed up */
LS_CONN_CONNECTED, /* valid handle */
LS_CONN_BAD /* used, but needs freeing */
} ls_conn_state_e;











#define LS_RPC_ENDPOINT_TIMEOUT (600)

#define LS_RETRY(RetryCb, TotalTime) \
for ((RetryCb)->Initted = FALSE; \
ls_RetryCheck((ls_retry_cb_t*)(RetryCb), (TotalTime));)

#define LS_RETRY_MAX_SLEEP (60)

#if defined(LS_DB_MALLOC)
#define LS_MALLOC(size) \
ls_db_Malloc(size, #size, __FILE__, __LINE__, function)
#define LS_FREE(ptr) \
ls_db_Free(ptr, __FILE__, __LINE__, function)
#else
#define LS_MALLOC(size) malloc(size)
#define LS_FREE(ptr) free(ptr)
#endif

#define LS_MAP_ARRAY_SIZE(count) \
(sizeof(ls_map_t) * count)


typedef int (*ls_sort_routine)(const void *, const void *);


























typedef struct ls_retry_cb
{
unsigned32 Initted;
unsigned32 Sleep;
unsigned32 MaxSleep;
time_t EndTime;
} ls_retry_cb_t;

signed32
ls_RefreshEndpoints(
time_t *LastRefreshed,
char *RealmName,
char *SiteName,
hpss_if_handle_t *IfHandle,
hpss_rpc_endpoint_t **EPList,
unsigned32 *EPCount
);




































signed32
ls_GrabLSConnection(
hpss_ConnMgrHandle_t MgrHandle,
hpss_reqid_t RequestId,
hpss_rpc_endpoint_t *EPList,
unsigned32 *EPCount,
hpss_ConnMgrEntry_t **Conn
);












signed32
ls_RetryableError(
signed32 Error
);

signed32
ls_RetryCheck(
ls_retry_cb_t *RetryCb,
signed32 TotalTime
);

#if defined(LS_DEBUG) || defined(LSC_DEBUG)

int
ls_db_stop_point(void);

#endif

#endif /* ls_common_h */


ls_internal.h

HPSS4.5

HPSS6.2

#ifndef ls_internal_h
#define ls_internal_h

#include <pthread.h>
#include <time.h>
#include <errno.h>
#include <string.h>
#include <memory.h>
#include <stdio.h>

#include <dce/binding.h>

#include <tc/tc.h>
#include <tc/rpc/tc_trpc.h>

#include "u_signed64.h"

#include "hpss_limits.h"
#include "hpss_trpc_handles.h"
#include "hpsscomm.h"
#include "ls_types.h"
#include "ls_logging.h"
#include "ls_common.h"

#define LS_MAXU64 (bld64m(0xffffffff, 0xffffffff))

#define LS_CONN_MAX_FAIL (3)
#define LS_CONN_PING_INTERVAL (40)

#define LS_STARTUP_CONN_PERIOD (180)

#define LS_SHUTDOWN_ABORT (1)
#define LS_SHUTDOWN_QUICKLY (2)
#define LS_SHUTDOWN_SLOWLY (3)

#define LS_SHUTDOWN_MAX_WAIT (15)

#define LS_SSM_NOTIFY_MAX_WAIT (3)

#define LS_SHUTDOWN_BG_DELAY (LS_SSM_NOTIFY_MAX_WAIT + 3)

#define LS_MAX_REINIT_WAIT (30)

#define LS_MM_RETRY_TIME (60)

#define LS_MAX_MM_MSG_SIZE (128)

#define LS_BG_STARTUP_THRESHOLD (3)
#define LS_BG_WARNING_THRESHOLD (5)
#define LS_BG_CRITICAL_THRESHOLD (10)

#define LS_BUSY_MSG_INTERVAL (180)

#define LS_HPSSIF_VERSION (hpssIF_v1_0_c_ifspec)

#define LS_SRV_CONNECT (0x00000001)

#define LS_INITTED_NOTHING (0x00000000)
#define LS_INITTED_ATTRSLOCK (0x00000001)
#define LS_INITTED_LOGGER (0x00000002)
#define LS_INITTED_TC (0x00000004)
#define LS_INITTED_OFDS (0x00000008)
#define LS_INITTED_SIGHANDLER (0x00000010)
#define LS_INITTED_SSMNOTIFY (0x00000020)
#define LS_INITTED_INTERFACE (0x00000040)
#define LS_INITTED_EVERYTHING (0xffffffff)

#define LS_DUP_MAX_MSGS (3)
#define LS_DUP_MIN_TIME (60)

#define LS_THREAD_NAME_LENGTH (64)

<略>

typedef struct ls_thread_state
{
#ifdef LS_DEBUG
unsigned32 Magic;
#endif
unsigned32 Flags;
signed32 RequestId;
} ls_thread_state_t;

typedef signed32 (*ls_thread_proc_t)(ls_thread_t *);

<略>

void
ls_ThreadDataDestructor(
ls_thread_state_t *Data
);

signed32
ls_GetThreadState(
ls_thread_state_t **ThreadState
);

idl_void_p_t
ls_RpcSSAllocate(idl_size_t size);

signed32
ls_SpawnThread(
ls_thread_t *TCb,
ls_thread_proc_t Routine,
char *Name
);

<略>

#endif /* ls_internal_h */

#ifndef ls_internal_h
#define ls_internal_h


#include <time.h>
#include <errno.h>
#include <string.h>
#include <memory.h>
#include <stdio.h>






#include "u_signed64.h"
#include "hpss_pthread.h"
#include "hpss_limits.h"


#include "ls_types.h"
#include "ls_logging.h"
#include "ls_common.h"

#define LS_MAXU64 (bld64m(0xffffffff, 0xffffffff))

#define LS_CONN_MAX_FAIL (3)
#define LS_CONN_PING_INTERVAL (40)

#define LS_STARTUP_CONN_PERIOD (180)

#define LS_SHUTDOWN_ABORT (1)
#define LS_SHUTDOWN_QUICKLY (2)
#define LS_SHUTDOWN_SLOWLY (3)

#define LS_SHUTDOWN_MAX_WAIT (15)

#define LS_SSM_NOTIFY_MAX_WAIT (3)

#define LS_SHUTDOWN_BG_DELAY (LS_SSM_NOTIFY_MAX_WAIT + 3)

#define LS_MAX_REINIT_WAIT (30)

#define LS_MM_RETRY_TIME (60)

#define LS_MAX_MM_MSG_SIZE (128)

#define LS_BG_STARTUP_THRESHOLD (3)
#define LS_BG_WARNING_THRESHOLD (5)
#define LS_BG_CRITICAL_THRESHOLD (10)

#define LS_BUSY_MSG_INTERVAL (180)

#define LS_HPSSIF_VERSION (hpssIF_v1_0_c_ifspec)



#define LS_INITTED_NOTHING (0x00000000)
#define LS_INITTED_ATTRSLOCK (0x00000001)
#define LS_INITTED_LOGGER (0x00000002)

#define LS_INITTED_DB (0x00000008)
#define LS_INITTED_SIGHANDLER (0x00000010)
#define LS_INITTED_SSMNOTIFY (0x00000020)
#define LS_INITTED_INTERFACE (0x00000040)
#define LS_INITTED_EVERYTHING (0xffffffff)

#define LS_DUP_MAX_MSGS (3)
#define LS_DUP_MIN_TIME (60)

#define LS_THREAD_NAME_LENGTH (64)

<略>

typedef struct ls_thread_state
{
#ifdef LS_DEBUG
unsigned32 Magic;
#endif
unsigned32 Flags;
hpss_reqid_t RequestId;
} ls_thread_state_t;

typedef signed32 (*ls_thread_proc_t)(ls_thread_t *);

<略>

void *
ls_ThreadDataDestructor(
ls_thread_state_t *Data
);

signed32
ls_GetThreadState(
ls_thread_state_t **ThreadState
);




signed32
ls_SpawnThread(
ls_thread_t *TCb,
ls_thread_proc_t Routine,
char *Name
);

<略>

#endif /* ls_internal_h */


ls_logging.h

HPSS4.5

HPSS6.2

#ifndef ls_logging_h
#define ls_logging_h

#include <stdio.h>
#include <errno.h>

#include "hpss_types.h"
#include "hpss_errno.h"
#include "cs_Log.h"
#include "ls_types.h"




#ifdef LS_SERVER
#define LS_MSG_ID CS_LOG_MNEMONIC_LSRV
#define LS_LOGGING
#else
#define LS_MSG_ID CS_LOG_MNEMONIC_LCLI
#endif

#define LS_MSG_CLASS CS_LOG_MSG_CLASS_LS
#define LS_MSGCAT_SETNUMBER CS_LOG_MSGCAT_SETNUMBER_LS

#define LS_ENTER() \
LS_DETAIL(ENTERING, 0, function)

#define LS_RETURN(retval) { \

signed32 eno = (retval); \
LS_DETAIL(LEAVING, eno, function); \
return eno; \
}

#ifdef LS_LOGGING

#define LS_CHECK( errchk, msg, errnum, extra ) \
if (errchk) \
{ \
ls_Check((signed32)(errchk), LS_MSG_##msg, \
LS_DEF_##msg, (signed32)(errnum), \
(char*)(extra), (char*)function); \
}









#define LS_ALARM(msg, sev, errtype, errnum, rqstid, erridptr, extra) \
ls_LogMsg(CS_ALARM, LS_MSG_##msg, LS_DEF_##msg, sev, \
errtype, errnum, rqstid, function, erridptr, \
(char*)extra)



















#define LS_CLEAR(msg, erridptr, rqstid, extra) \
ls_LogMsg(CS_ALARM, LS_MSG_##msg, LS_DEF_##msg, CLEARED, \
SOFTWARE_ERROR, HPSS_E_NOERROR, rqstid, function, \
erridptr, (char*)extra)

#if defined(LS_DEBUG) || defined(LSC_DEBUG)
#define LS_DB_STOP_POINT ls_db_stop_point()
#else
#define LS_DB_STOP_POINT (1)
#endif

#define LS_ASSERT( expr ) { \
if (!(expr)) { \
LS_ALARM(ASSERTION_FAILED, CRITICAL, SOFTWARE_ERROR, \
HPSS_ESYSTEM, 0, NULL, #expr); \
LS_DB_STOP_POINT; \
} \
}

#define LS_EVENT(msg, msgtype, requestid, extra) \
ls_LogMsg(CS_EVENT, LS_MSG_##msg, LS_DEF_##msg, NONE, (msgtype), \
0, (requestid), function, NULL, (char*)(extra))

#define LS_REQUEST(msg, errnum, requestid, extra) \
ls_LogMsg(CS_REQUEST, LS_MSG_##msg, LS_DEF_##msg, NONE, \
TEXT_REQUEST, errnum, (requestid), function, NULL, \
(char*)(extra))

#define LS_TRACE(msg, extra) \
ls_LogMsg(CS_TRACE, LS_MSG_##msg, LS_DEF_##msg, NONE, \
TEXT_REQUEST, 0, 0, function, NULL, \
(char*)(extra))

#if defined(LS_LOG_DETAILS)
#define LS_DETAIL(msg, errnum, extra) { \
if (LS_LOG_DETAILS) { \
ls_LogMsg(CS_TRACE, LS_MSG_##msg, LS_DEF_##msg, NONE, \
TEXT_REQUEST, (errnum), 0, function, NULL, \
(char*)(extra)); \
} \
}
#else
#define LS_DETAIL(msg, errnum, extra)
#endif

#define LS_DBMSG(msg, extra) \
ls_LogMsg(CS_DEBUG, LS_MSG_##msg, LS_DEF_##msg, NONE, \
TEXT_REQUEST, 0, 0, function, NULL, \
(char*)(extra))













#else

#define LS_CHECK( errchk, msg, errnum, extra )
#define LS_ALARM(msg, severity, errtype, errnum, requestid, erroridptr, extra)






#define LS_CLEAR(msg, erridptr, rqstid, extra)
#define LS_ASSERT( expr )
#define LS_EVENT(msg, msgtype, requestid, extra)
#define LS_REQUEST(msg, errnum, requestid, fname)
#define LS_TRACE(msg, extra)
#define LS_DETAIL(msg, errnum, extra)
#define LS_DBMSG(msg, extra)



#endif

#if defined(LS_LOGGING) && defined(LS_DEFINE_MSG)
#define MSG(number, name, text) \
const int LS_MSG_##name = (number); \
const char LS_DEF_##name##[] = text;

#elif defined(LS_LOGGING)
#define MSG(number, name, text) \
extern const int LS_MSG_##name; \
extern const char LS_DEF_##name##[];

#else
#define MSG(number, name, text)
#endif

#ifdef LS_SERVER
#define MSGLS(number, name, text) MSG(number, name, text)
#else
#define MSGLS(number, name, text)
#endif

#ifdef LS_CLIENT
#define MSGCL(number, name, text) MSG(number, name, text)
#else
#define MSGCL(number, name, text)
#endif

#define MSGCM(number, name, text) MSG(number, name, text)

MSGLS(100, INTERNAL_ERROR, "Internal Error (%s)")
MSGLS(101, SIG_INIT, "Failed to initialize signals (%s)")
MSGLS(102, PRE_INIT_CONN, "Failed to pre-initialize connections (%s)")
MSGLS(103, PRE_REG_SERVICE, "Failed to pre-register interface (%s)")

MSGLS(104, OFD_INIT, "Failed to initialize OFD manager (%s)")
MSGLS(105, CONFIG_INIT, "Failed to initialize configuration (%s)")

MSGLS(106, REGISTER_INIT, "Failed to register interfaces (%s)")
MSGLS(107, REG_SERVICE, "Failed to register interface (%s)")

MSGLS(108, CONN_INIT, "Failed to initialize connections (%s)")

MSGLS(109, HSEC_INIT, "Failed to initialize Security service (%s)")
MSGLS(110, HSEC_AUTHVECT, "Failed to initialize Authorization Vector (%s)")
MSGLS(111, LOCK_READ, "Fatal error during read lock (%s)")
MSGLS(112, LOCK_WRITE, "Fatal error during write lock (%s)")
MSGCM(113, OUT_OF_MEMORY, "Out of memory (object: %s)")
MSGCM(114, INVALID_CONN_STATE, "Invalid connection state (%s)")
MSGCM(115, COND_INIT, "Failed to initialize a pthread cond var (%s)")
MSGCM(116, COND_DESTROY, "Failed to destroy a pthread cond var (%s)")
MSGLS(117, COND_SIGNAL, "Failed to signal a pthread cond variable (%s)")
MSGCM(118, COND_BROADCAST, "Failed to broadcast on a cond var (%s)")
MSGLS(119, TIMEDWAIT_FATAL, "Failure waiting on a timed cond var (%s)")
MSGCM(120, MUTEX_INIT, "Failed to initialize a pthread mutex (%s)")
MSGCM(121, MUTEX_DESTROY, "Failed to destroy a pthread mutex (%s)")
MSGCM(122, MUTEX_LOCK, "Failed to lock a pthread mutex (%s)")

MSGCM(123, MUTEX_UNLOCK, "Failed to unlock a pthread mutex (%s)")
MSGLS(124, THREAD_CREATE, "Failed to create a new thread (%s)")
MSGCM(125, GET_EXPIRE_FATAL, "Failed to setup a timed interval (%s)")
MSGLS(126, THREAD_JOIN, "Failed to join with a thread (%s)")
MSGLS(127, THREAD_DETACH, "Failed to detach a thread (%s)")
MSGLS(128, INVALID_CONTROL, "Invalid Request control block (%s)")
MSGLS(129, BAD_REQ_TYPE, "Invalid Request Type (%s)")
MSGLS(130, INVALID_LOCK_PTR, "Invalid Lock Pointer (%s)")
MSGLS(131, BAD_SITEID, "Invalid HPSS Installation UUID (%s)")
MSGLS(132, BAD_UUID_IN_CACHE, "Invalid UUID in cache (%s)")
MSGLS(133, LOCMAPINIT_FAILED, "Failed to initialize location map (%s)")
MSGLS(134, CANT_READ_MAPS_AT_STARTUP, "Failed to read locmaps at startup (%s)")
MSGLS(135, LS_ABORTING, "SERVER ABORTING DUE TO PREVIOUS FATAL ERROR (%s)")
MSGLS(136, TCELL_TABLE_CORRUPT, "Trusted cell table is inconsistent (%s)")
MSGLS(137, CANT_READ_POLICY, "Failed to read policy info (%s)")

MSGLS(138, CANT_ADD_TO_GROUP, "Can't add server to rpcgroup (%s)")
MSGLS(139, LOCMAPS_CHANGED, "Inconsistent LocMap Table (%s)")
MSGLS(140, SERVER_LISTEN_FAILED, "Server listen routine failed (%s)")
MSGLS(141, CANT_REMOVE_SITES, "Can't destroy site table (%s)")

MSGCM(142, CANT_FREE_STR, "Can't free rpc string (%s)")
MSGCM(143, RANDOM_LS_FAILED, "Couldn't locate a random LS, coding error (%s)")
MSGLS(144, BAD_DEFAULT_UUID, "Invalid SiteId for this site (%s)")

MSGLS(145, NIL_DEFAULT_UUID, "SiteId for this site is NIL (%s)")
MSGLS(147, LONG_REQUEST, "Long outstanding request. Reinit Failed (%s)")
MSGLS(148, REINIT_AUTHV_REL, "Can't release auth vector. Reinit Failed (%s)")
MSGLS(149, BAD_ROOTNS_CONFIG, "Exiting due to bad Root NS configuration (%s)")
MSGCM(150, MUTEX_ATTR_CREATE, "Failed to create mutex attributes (%s)")
MSGCM(151, MUTEX_ATTR_SETKIND, "Failed to set non-recursive mutex attrs (%s)")
MSGLS(152, INIT_SERVER_FAILED, "Failed to initialize server (%s)")

MSGLS(153, KEYCREATE_FAILED, "Failed to set thread specific data key (%s)")
MSGLS(154, TCELL_TABLE_FATAL, "Can't get trusted cell local info (%s)")


MSGLS(155, SRVSTATE_INIT, "Can't initialize server state service (%s)")
MSGLS(156, BAD_LSPOLICY_GROUP, "Invalid LS Policy Group Name (%s)")
MSGLS(157, BAD_SERVER_NAME, "Invalid Server Name format (%s)")
MSGLS(158, BAD_ROOTNS_ENV, "Invalid Root NS environment variable format (%s)")





#define LS_ALARM_FIRST_INCONSISTENCY (300)
#define LS_ALARM_LAST_INCONSISTENCY (325)

MSGCM(300, ASSERTION_FAILED, "Assertion Failed: %s")
MSGLS(301, API_EXCEPTION, "Exception caught during request (%s)")
MSGLS(302, LOCK_TIMEOUT, "A lock timed out (%s)")
MSGLS(303, BAD_SERVER_UUID_IN_MD, "Invalid Server UUID in Config MData (%s)")
MSGLS(304, NIL_SERVER_UUID_IN_MD, "Nil Server UUID in Config Metadata (%s)")
MSGLS(305, INVALID_REMOTE_UUID, "Bad UUID returned from remote LS server (%s)")
MSGLS(306, CANT_REMOVE_FROM_GROUP, "Can't remove LS from rpcgroup (%s)")
MSGLS(307, BAD_CDSPATH_IN_MD, "Invalid Server Path in Config MData (%s)")
MSGLS(309, BAD_REMOTE_MAP_HASH, "Inconsistent hash of remote map (%s)")
MSGLS(310, BAD_LOCAL_CELL_ID, "Zero local cell id, remote sites ignored (%s)")
MSGLS(311, INVALID_REMOTE_CELLID, "Remote LS returned invalid CellId (%s)")
MSGLS(312, TCELL_TABLE_ERROR, "Can't get trusted cell info for %s")
MSGLS(313, BAD_SITE_CELL_ID, "Invalid cell id from trusted cell for %s")

#define LS_ALARM_FIRST_THRESHOLD (326)
#define LS_ALARM_LAST_THRESHOLD (350)

MSGLS(326, CANT_READ_MAPS, "Having trouble reading local maps (%s)")
MSGLS(327, MAPS_READ_OK, "Reading local maps problem cleared (%s)")
MSGLS(328, LS_PEGGED, "Server is under heavy load (%s)")
MSGLS(329, LS_PEGGED_CLEARED, "Cleared heavy load condition (%s)")

MSGCM(400, MBR_INQ_BEGIN, "Failed to open a DCE rpcgroup (%s)")
MSGCM(401, MBR_INQ_DONE, "Failed to close a DCE rpcgroup (%s)")
MSGCM(402, RPC_GROUP_ERROR, "Failure trying to access an rpcgroup entry (%s)")
MSGLS(403, BAD_CONNECTION, "Bad connection context (%s)")
MSGCM(404, TIMEDWAIT, "Failed to perform timedwait on a cond var (%s)")
MSGLS(405, GET_EXPIRE, "Failed to set up a timed interval (%s)")

MSGLS(406, SSM_CONNECT, "Trouble connecting to SSM (%s)")
MSGLS(407, LEAVE_CONNECT, "Could not leave a request connection (%s)")
MSGLS(408, NIL_PATH_IN_MD, "Found a NULL Server Name in Config Metadata (%s)")
MSGCM(409, BAD_UUID, "A bad UUID was received (%s)")
MSGLS(410, CANT_GET_OFD, "Failed to open a metadata file (%s)")

MSGLS(411, CANT_FREE_OFD, "Failed to close a metadata file (%s)")
MSGLS(412, CANT_READ_LOCS, "Can't read location maps from metadata (%s)")
MSGLS(413, GET_MAPS_FAILED, "Can't get maps from remote location server (%s)")
MSGLS(414, GET_MAPS_CLEARED, "Cleared get maps problem with remote LS (%s)")
MSGLS(415, MULTIPLE_ROOTNS, "Too many Root NSs in config metadata (%s)")
MSGLS(416, NO_ROOTNS, "No local Root NS found in config metadata (%s)")
MSGLS(417, NO_BG_MAP_THREADS, "Can't create any background map threads (%s)")
MSGLS(418, MAP_THREAD, "A background map thread returned an error (%s)")
MSGLS(419, CANT_UNREG_SERVICE, "Can't unregister interface (%s)")
MSGLS(420, SIGWAIT_FAILED, "Call to sigwait() failed (%s)")
MSGLS(421, BAD_SIGNAL, "Unknown signal ignored (%s)")
MSGLS(422, OLD_SITE_BUSY, "Site still in use, will retry removal (%s)")
MSGCM(423, OPEN_CONN, "Failed to open a connection (%s)")
MSGCM(424, GET_RPC_HANDLE, "Failed to get an rpc handle (%s)")
MSGCM(425, CANT_FIND_SERVICE, "Can't find rpc service (%s)")
MSGLS(426, INVALID_AD_STATE, "Invalid Admin State received from SSM (%s)")
MSGLS(427, CANT_READ_SITE_MD, "Can't read site metadata file (%s)")
MSGLS(428, BAD_UUID_ON_INSERT, "Can't insert LocMap. Bad server UUID. (%s)")
MSGLS(429, BAD_SITEID_ON_INSERT, "Can't insert LocMap. Bad HPSS id. (%s)")
MSGLS(430, LOCMAP_UPD_TIMEDOUT, "Background LocMap update timed out (%s)")
MSGLS(431, BAD_SITE_MD, "An invalid site has been configured (site %s)")
MSGLS(432, CONN_CLEARED, "Re-established communication to %s")
MSGCM(433, RELEASED_BAD_CONN, "Released bad connection (%s)")
MSGLS(434, LOCMAP_TIMEOUT_CLR, "Cleared previous LocMap timeout problem (%s)")
MSGLS(435, LOCMAP_MD_CLEARED, "Locmap metadata inconsistency cleared (%s)")
MSGLS(436, ROOTNS_OK, "Cleared NS metadata inconsistency (%s)")
MSGLS(437, SITE_MD_CLEARED, "Cleared Site table problem (%s)")
MSGLS(438, BAD_LOCAL_SITE_MD, "Local site does not match LS Policy (%s)")
MSGCM(439, BAD_CONN_TIMEDOUT, "Failed to cleanup a bad connection (%s)")
MSGCM(440, RPC_EXCEPTION, "Exception caught during RPC (%s)")
MSGCM(441, RPC_GROUP_NOT_FOUND, "RPC group does not exist (%s)")
MSGCM(442, RPC_GROUP_INVALID, "RPC group is configured improperly (%s)")
MSGLS(443, STARTUP_NO_LS, "One or more remote LSs are down since startup (%s)")
MSGLS(444, STARTUP_NO_LS_CLR, "Cleared startup remote LS comm problem (%s)")
MSGLS(445, BAD_AUTHZ_SVC, "Bad authorization service in binding (%s)")
MSGLS(446, NO_REMOTE_MAPS, "No remote maps returned (%s)")






MSGLS(501, INIT_SERVER_START, "Initializing Location Server (%s)")
MSGLS(502, INIT_SERVER_DONE, "Location Server is ready (%s)")
MSGLS(503, REINIT_SERVER_START, "Server reinitialization started (%s)")
MSGLS(504, REINIT_SERVER_DONE, "Server reinitialization complete (%s)")
MSGLS(505, LS_HALTING, "Server Halting quickly (%s)")
MSGLS(506, LS_SHUTTING_DOWN, "Starting slow shutdown (%s)")
MSGLS(507, LS_SHUTDOWN_COMPLETE, "Server Shutdown Complete (%s)")
MSGLS(508, ZERO_CELL_ID, "Local cell id is zero in trusted cell table (%s)")
MSGLS(509, LOADING_MAP_INFO, "Loading initial map information (%s)")

MSGCM(600, API_ENTERING, "Entering API: %s")
MSGCM(601, API_LEAVING, "Leaving API: %s")

MSGLS(700, READING_MAPS, "Reading Remote Maps (%s)")
MSGLS(701, NEW_LS_CONN, "New Remote LS Connection (%s)")
MSGLS(702, SITE_REMOVED, "Removing %s from site table")
MSGCM(703, ENTERING, "Entering: %s")
MSGCM(704, LEAVING, "Leaving: %s")
MSGLS(705, BUILDING_LOCMAPS, "LocMap Information: %s")
MSGLS(706, BAD_BINDING, "Bad request binding received (%s)")
MSGLS(707, BAD_AUTH_LEVEL, "Bad authentication level in request binding (%s)")
MSGLS(708, CANT_GET_PRIN, "Can't get principal name from registry (%s)")

MSGCL(900, INVALID_LS_CDS, "Invalid LS Environment Variable (%s)")




MSGCL(901, NO_LS_CDS, "No LS Environment variable, default used (%s)")
MSGCL(902, INVALID_LOCAL_SITEID, "Invalid site id returned from LS (%s)")

signed32
ls_LogMsg(signed32 LogType,
signed32 MsgNum,
const char *MsgText,
signed32 Severity,
signed32 ErrType,
signed32 ErrNum,
signed32 RequestId,
char *Function,
signed32 *ErrorIdPtr,
char *Extra);


signed32
ls_Check(signed32 errchk,
signed32 msgnum,
const char *msgtxt,
signed32 errnum,
char *extra,
char *function);

#endif /* ls_logging_h */

#ifndef ls_logging_h
#define ls_logging_h

#include <stdio.h>
#include <errno.h>

#include "hpss_types.h"
#include "hpss_errno.h"
#include "hpss_logging.h"
#include "ls_types.h"
#include "u_signed64.h"

#define LS_FAKE_ID (0)

#ifdef LS_SERVER
# define LS_MSG_ID CS_LOG_MNEMONIC_LSRV
# define LS_LOGGING
#else
# define LS_MSG_ID CS_LOG_MNEMONIC_LCLI
#endif

#define LS_MSG_CLASS CS_LOG_MSG_CLASS_LS
#define LS_MSGCAT_SETNUMBER CS_LOG_MSGCAT_SETNUMBER_LS


#define LS_ENTER() \
LS_DETAIL(ENTERING, 0, function)

#define LS_RETURN(retval) \
{ \
signed32 eno = retval; \
LS_DETAIL(LEAVING, eno, function); \
return eno; \
}

#ifdef LS_LOGGING

#define LS_CHECK( errchk, msg, errnum, extra ) \
if (errchk) \
{ \
ls_Check((signed32)(errchk), LS_MSG_##msg, \
LS_DEF_##msg, (signed32)(errnum), \
(char*)(extra), (char*)function); \
}

#define HPSS_CHECK( errchk, msg, errnum, extra ) \
if (errchk) \
{ \
ls_Check((signed32)(errchk), HPSS_MSG_##msg, \
HPSS_DEF_##msg, (signed32)(errnum), \
(char*)(extra), (char*)function); \
}

#define LS_ALARM(msg, sev, errtype, errnum, rqstid, erridptr, extra) \
ls_LogMsg(CS_ALARM, LS_MSG_##msg, LS_DEF_##msg, sev, \
errtype, errnum, rqstid, function, erridptr, \
(char*)extra)

#define HPSS_ALARM1(msg, sev, errtype, errnum, rqstid, erridptr, extra) \
ls_LogMsg(CS_ALARM, HPSS_MSG_##msg, HPSS_DEF_##msg, sev, \
errtype, errnum, rqstid, function, erridptr, \
(char*)extra)

#define HPSS_ALARM2(msg, sev, errtype, errnum, rqstid, erridptr, extra1, extra2) \
ls_LogMsg(CS_ALARM, HPSS_MSG_##msg, HPSS_DEF_##msg, sev, \
errtype, errnum, rqstid, function, erridptr, extra1, extra2)

#define HPSS_ALARM3(msg, sev, errtype, errnum, rqstid, erridptr, extra1, extra2, extra3) \
ls_LogMsg(CS_ALARM, HPSS_MSG_##msg, HPSS_DEF_##msg, sev, \
errtype, errnum, rqstid, function, erridptr, extra1, extra2, extra3)

#define LS_CLEAR(msg, erridptr, rqstid, extra) \
ls_LogMsg(CS_ALARM, LS_MSG_##msg, LS_DEF_##msg, CLEARED, \
SOFTWARE_ERROR, HPSS_E_NOERROR, rqstid, function, \
erridptr, (char*)extra)

#if defined(LS_DEBUG) || defined(LSC_DEBUG)
#define LS_DB_STOP_POINT ls_db_stop_point()
#else
#define LS_DB_STOP_POINT (1)
#endif

#define LS_ASSERT( expr ) { \
if (!(expr)) { \
LS_ALARM(ASSERTION_FAILED, CRITICAL, SOFTWARE_ERROR, \
HPSS_ESYSTEM, LS_FAKE_ID, NULL, #expr); \
LS_DB_STOP_POINT; \
} \
}

#define LS_EVENT(msg, msgtype, requestid, extra) \
ls_LogMsg(CS_EVENT, LS_MSG_##msg, LS_DEF_##msg, NONE, (msgtype), \

0, (requestid), function, NULL, (char*)(extra))

#define LS_REQUEST(msg, errnum, requestid, extra) \
ls_LogMsg(CS_REQUEST, LS_MSG_##msg, LS_DEF_##msg, NONE, \
TEXT_REQUEST, errnum, (requestid), function, NULL, \
(char*)(extra))

#define LS_TRACE(msg, extra) \
ls_LogMsg(CS_TRACE, LS_MSG_##msg, LS_DEF_##msg, NONE, \
TEXT_REQUEST, 0, LS_FAKE_ID, function, NULL, \
(char*)(extra))

#if defined(LS_LOG_DETAILS)
#define LS_DETAIL(msg, errnum, extra) { \
if (LS_LOG_DETAILS) { \
ls_LogMsg(CS_TRACE, LS_MSG_##msg, LS_DEF_##msg, NONE, \
TEXT_REQUEST, (errnum), LS_FAKE_ID, function, \
NULL, (char*)(extra)); \
} \
}
#else
#define LS_DETAIL(msg, errnum, extra)
#endif

#define LS_DBMSG(msg, extra) \
ls_LogMsg(CS_DEBUG, LS_MSG_##msg, LS_DEF_##msg, NONE, \
TEXT_REQUEST, 0, LS_FAKE_ID, function, NULL, \
(char*)(extra))

#define HPSS_DBMSG1(msg, extra) \
ls_LogMsg(CS_DEBUG, HPSS_MSG_##msg, HPSS_DEF_##msg, NONE, \
TEXT_REQUEST, 0, LS_FAKE_ID, function, NULL, \
(char*)(extra))

#define HPSS_DBMSG2(msg, extra1, extra2) \
ls_LogMsg(CS_DEBUG, HPSS_MSG_##msg, HPSS_DEF_##msg, NONE, \
TEXT_REQUEST, 0, LS_FAKE_ID, function, NULL, \
extra1, extra2)

#else

#define LS_CHECK( errchk, msg, errnum, extra )
#define LS_ALARM(msg, severity, errtype, errnum, requestid, erroridptr, extra)
#define HPSS_ALARM1(msg, sev, errtype, errnum, rqstid, erridptr, extra)
#define HPSS_ALARM2(msg, sev, errtype, errnum, rqstid, erridptr, extra1, extra2)
#define HPSS_ALARM3(msg, sev, errtype, errnum, rqstid, erridptr, extra1, extra2, extra3)
#define LS_CLEAR(msg, erridptr, rqstid, extra)
#define LS_ASSERT( expr )
#define LS_EVENT(msg, msgtype, requestid, extra)
#define LS_REQUEST(msg, errnum, requestid, fname)
#define LS_TRACE(msg, extra)
#define LS_DETAIL(msg, errnum, extra)
#define LS_DBMSG(msg, extra)
#define HPSS_DBMSG1(msg, extra)
#define HPSS_DBMSG2(msg, extra1, extra2)

#endif

#if defined(LS_LOGGING) && defined(LS_DEFINE_MSG)
#define MSG(number, name, text) \
const int LS_MSG_##name = (number); \
const char LS_DEF_##name[] = text;

#elif defined(LS_LOGGING)
#define MSG(number, name, text) \
extern const int LS_MSG_##name; \
extern const char LS_DEF_##name[];

#else
#define MSG(number, name, text)
#endif

#ifdef LS_SERVER
#define MSGLS(number, name, text) MSG(number, name, text)
#else
#define MSGLS(number, name, text)
#endif

#ifdef LS_CLIENT
#define MSGCL(number, name, text) MSG(number, name, text)
#else
#define MSGCL(number, name, text)
#endif

#define MSGCM(number, name, text) MSG(number, name, text)


MSGLS(100, SIG_INIT, "Failed to initialize signals (%s)")




MSGLS(101, DB_INIT, "Failed to initialize DB manager (%s)")

MSGLS(102, CONFIG_INIT, "Failed to initialize configuration (%s)")
MSGLS(103, REGISTER_INIT, "Failed to register interfaces (%s)")
MSGLS(104, REG_SERVICE, "Failed to register interface (%s)")
MSGLS(105, CONN_INIT, "Failed to initialize RPC connections (%s)")
MSGLS(106, CONN_MGR_INIT, "Failed to initialize connection manager (%s)")




MSGLS(107, LOCK_READ, "Fatal error during read lock (%s)")
MSGLS(108, LOCK_WRITE, "Fatal error during write lock (%s)")
MSGCM(109, OUT_OF_MEMORY, "Out of memory (object: %s)")


MSGCM(110, COND_INIT, "Failed to initialize a pthread cond var (%s)")
MSGCM(111, COND_DESTROY, "Failed to destroy a pthread cond var (%s)")
MSGLS(112, COND_SIGNAL, "Failed to signal a pthread cond variable (%s)")
MSGCM(113, COND_BROADCAST, "Failed to broadcast on a cond var (%s)")
MSGLS(114, TIMEDWAIT_FATAL, "Failure waiting on a timed cond var (%s)")
MSGCM(115, MUTEX_INIT, "Failed to initialize a pthread mutex (%s)")
MSGCM(116, MUTEX_DESTROY, "Failed to destroy a pthread mutex (%s)")
MSGCM(117, MUTEX_LOCK, "Failed to lock a pthread mutex (%s)")
MSGCM(118, MUTEX_UNLOCK, "Failed to unlock a pthread mutex (%s)")
MSGLS(119, THREAD_CREATE, "Failed to create a new thread (%s)")
MSGCM(120, GET_EXPIRE_FATAL, "Failed to setup a timed interval (%s)")
MSGLS(121, THREAD_JOIN, "Failed to join with a thread (%s)")
MSGLS(122, THREAD_DETACH, "Failed to detach a thread (%s)")
MSGLS(123, INVALID_CONTROL, "Invalid Request control block (%s)")
MSGLS(124, BAD_REQ_TYPE, "Invalid Request Type (%s)")
MSGLS(125, INVALID_LOCK_PTR, "Invalid Lock Pointer (%s)")
MSGLS(126, BAD_SITEID, "Invalid HPSS Installation UUID (%s)")
MSGLS(127, BAD_UUID_IN_CACHE, "Invalid UUID in cache (%s)")
MSGLS(128, LOCMAPINIT_FAILED, "Failed to initialize location map (%s)")
MSGLS(129, CANT_READ_MAPS_AT_STARTUP, "Failed to read locmaps at startup (%s)")
MSGLS(130, LS_ABORTING, "SERVER ABORTING DUE TO PREVIOUS FATAL ERROR (%s)")


MSGLS(131, CANT_READ_POLICY, "Failed to read policy info (%s)")
MSGLS(132, CANT_ADD_TO_GROUP, "Can't add server to rpc group (%s)")
MSGLS(133, LOCMAPS_CHANGED, "Inconsistent LocMap Table (%s)")


MSGLS(134, CANT_REMOVE_SITES, "Can't destroy site table (%s)")




MSGLS(135, BAD_DEFAULT_UUID, "Invalid SiteId for this site (%s)")
MSGLS(136, NIL_DEFAULT_UUID, "SiteId for this site is NIL (%s)")
MSGLS(137, LONG_REQUEST, "Long outstanding request. Reinit Failed (%s)")


MSGLS(138, BAD_ROOTCS_CONFIG, "Exiting due to bad Root CS configuration (%s)")
MSGCM(139, MUTEX_ATTR_CREATE, "Failed to create mutex attributes (%s)")
MSGCM(140, MUTEX_ATTR_SETKIND, "Failed to set non-recursive mutex attrs (%s)")
MSGLS(141, INIT_SERVER_FAILED, "Failed to initialize server (%s)")
MSGLS(142, KEYCREATE_FAILED, "Failed to set thread specific data key (%s)")


MSGLS(143, GET_LOCAL_REALM, "Can't get local realm info (%s)")
MSGLS(144, SRVSTATE_INIT, "Can't initialize server state service (%s)")







MSGLS(145, CANT_GET_ENDPOINTS, "Can't get LS endpoints (%s)")
MSGLS(146, GETHOSTNAME_FAILED, "Can't get hostname (%s)")


#define LS_ALARM_FIRST_INCONSISTENCY (300)
#define LS_ALARM_LAST_INCONSISTENCY (325)

MSGCM(300, ASSERTION_FAILED, "Assertion Failed: %s")


MSGLS(301, LOCK_TIMEOUT, "A lock timed out (%s)")
MSGLS(302, BAD_SERVER_UUID_IN_MD, "Invalid Server UUID in Config MData (%s)")
MSGLS(303, NIL_SERVER_UUID_IN_MD, "Nil Server UUID in Config Metadata (%s)")
MSGLS(304, INVALID_REMOTE_UUID, "Bad UUID returned from remote LS server (%s)")
MSGLS(305, CANT_REMOVE_FROM_GROUP, "Can't remove LS from rpcgroup in realm (%s)")


MSGLS(306, BAD_REMOTE_MAP_HASH, "Inconsistent hash of remote map (%s)")
MSGLS(307, BAD_LOCAL_REALM_ID, "Zero local realm id, remote sites ignored (%s)")
MSGLS(308, INVALID_REMOTE_REALMID, "Remote LS returned invalid RealmId (%s)")
MSGLS(309, TREALM_TABLE_ERROR, "Can't get trusted realm info for %s")
MSGLS(310, BAD_SITE_REALM_ID, "Invalid realm id from trusted realm for %s")


#define LS_ALARM_FIRST_THRESHOLD (326)
#define LS_ALARM_LAST_THRESHOLD (350)

MSGLS(326, CANT_READ_MAPS, "Having trouble reading local maps (%s)")

MSGLS(327, MAPS_READ_OK, "Reading local maps problem cleared (%s)")

MSGLS(328, LS_PEGGED, "Server is under heavy load (%s)")
MSGLS(329, LS_PEGGED_CLEARED, "Cleared heavy load condition (%s)")











MSGLS(400, GET_EXPIRE, "Failed to set up a timed interval (%s)")
MSGLS(401, SSM_CONNECT, "Trouble connecting to SSM (%s)")




MSGCM(402, BAD_UUID, "A bad UUID was received (%s)")
MSGLS(403, CANT_GET_TRANH, "Failed to get a database transaction handle (%s)")
MSGLS(404, CANT_FREE_TRANH, "Failed to free a database transaction handle (%s)")
MSGLS(405, CANT_READ_LOCS, "Can't read location maps from metadata (%s)")
MSGLS(406, GET_MAPS_FAILED, "Can't get maps from remote location server (%s)")
MSGLS(407, GET_MAPS_CLEARED, "Cleared get maps problem with remote LS (%s)")
MSGLS(408, MULTIPLE_ROOTCS, "Too many Root CSs in config metadata (%s)")
MSGLS(409, NO_ROOTCS, "No local Root CS found in config metadata (%s)")
MSGLS(410, NO_BG_MAP_THREADS, "Can't create any background map threads (%s)")
MSGLS(411, MAP_THREAD, "A background map thread returned an error (%s)")


MSGLS(412, SIGWAIT_FAILED, "Call to sigwait() failed (%s)")
MSGLS(413, BAD_SIGNAL, "Unknown signal ignored (%s)")
MSGLS(414, OLD_SITE_BUSY, "Site still in use, will retry removal (%s)")




MSGLS(415, INVALID_AD_STATE, "Invalid Admin State received from SSM (%s)")
MSGLS(416, CANT_READ_SITE_MD, "Can't read site metadata file (%s)")
MSGLS(417, BAD_UUID_ON_INSERT, "Can't insert LocMap. Bad server UUID. (%s)")
MSGLS(418, BAD_SITEID_ON_INSERT, "Can't insert LocMap. Bad HPSS id. (%s)")
MSGLS(419, LOCMAP_UPD_TIMEDOUT, "Background LocMap update timed out (%s)")
MSGLS(420, BAD_SITE_MD, "An invalid site has been configured (site %s)")
MSGLS(421, CONN_CLEARED, "Re-established communication to %s")


MSGLS(422, LOCMAP_TIMEOUT_CLR, "Cleared previous LocMap timeout problem (%s)")
MSGLS(423, LOCMAP_MD_CLEARED, "Locmap metadata inconsistency cleared (%s)")
MSGLS(424, ROOTCS_OK, "Cleared Root CS metadata inconsistency (%s)")
MSGLS(425, SITE_MD_CLEARED, "Cleared Site table problem (%s)")
MSGLS(426, BAD_LOCAL_SITE_MD, "Local site does not match LS Policy (%s)")








MSGLS(427, STARTUP_NO_LS, "One or more remote LSs are down since startup (%s)")
MSGLS(428, STARTUP_NO_LS_CLR, "Cleared startup remote LS comm problem (%s)")


MSGLS(429, NO_REMOTE_MAPS, "No remote maps returned (%s)")
MSGLS(430, CANT_CLOSE_CURSOR, "Failed to close a cursor in metadata table (%s)")
MSGLS(431, SELECT_FAILED, "Select statement failed in metadata table (%s)")


MSGLS(501, INIT_SERVER_START, "Initializing Location Server (%s)")

MSGLS(502, INIT_SERVER_DONE, "Location Server is ready (%s)")
MSGLS(503, REINIT_SERVER_START, "Server reinitialization started (%s)")

MSGLS(504, REINIT_SERVER_DONE, "Server reinitialization complete (%s)")
MSGLS(505, LS_HALTING, "Server Halting quickly (%s)")
MSGLS(506, LS_SHUTTING_DOWN, "Starting slow shutdown (%s)")
MSGLS(507, LS_SHUTDOWN_COMPLETE, "Server Shutdown Complete (%s)")
MSGLS(508, ZERO_REALM_ID, "Local realm id is zero in trusted realm table (%s)")
MSGLS(508, LOADING_MAP_INFO, "Loading initial map information (%s)")

MSGCM(600, API_ENTERING, "Entering API: %s")
MSGCM(601, API_LEAVING, "Leaving API: %s")

MSGLS(700, READING_MAPS, "Reading Remote Maps (%s)")
MSGLS(701, NEW_LS_CONN, "New Remote LS Connection (%s)")
MSGLS(702, SITE_REMOVED, "Removing %s from site table")


MSGLS(703, BUILDING_LOCMAPS, "LocMap Information: %s")
MSGLS(704, BAD_PROT_LEVEL, "Bad rpc protection level (%s)")
MSGLS(705, BAD_CONNECT_CONTEXT, "Bad connection context received (%s)")



MSGCL(900, INVALID_LS_ENV, "Invalid LS Environment Variable (%s)")
MSGCL(901, INVALID_LS_PROT_LEVEL, "Invalid rpc protection level (%s)")
MSGCL(902, INVALID_LS_AUTHN_MECH, "Invalid authentication mechanism (%s)")


MSGCL(903, INVALID_LOCAL_SITEID, "Invalid site id returned from LS (%s)")

signed32
ls_LogMsg(signed32 LogType,
signed32 MsgNum,
const char *MsgText,
signed32 Severity,
signed32 ErrType,
signed32 ErrNum,
hpss_reqid_t RequestId,
char *Function,
unsigned32 *ErrorIdPtr,

...);

signed32
ls_Check(signed32 errchk,
signed32 msgnum,
const char *msgtxt,
signed32 errnum,
char *extra,
char *function);

#endif /* ls_logging_h */


ls_types.h

HPSS4.5

HPSS6.2

#ifndef hpss_ls_v0_0_included
#define hpss_ls_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif
#ifndef hpss_idl_types_v0_0_included
#include <hpss_idl_types.h>
#endif
#ifndef mm_idl_types_v0_0_included
#include <mm_idl_types.h>
#endif


#define LS_CDS_PARTIAL_PREFIX "/.:/"
#define LS_CDS_FULL_PREFIX "/.../"
#define LS_ENV_LS_NAME "HPSS_LS_NAME"
#define LS_MAP_ROOT_NS (1)
#define LS_MAP_IS_LOCAL (2)
#define LS_MAP_RPCGROUP (4)
#define LS_MAP_PERM (8)


typedef struct ls_map {
uuid_t ServerId;
uuid_t SiteId;
idl_char CDSPath[128];


unsigned32 ServerType;
unsigned32 CellId;
unsigned32 SubsystemId;
unsigned32 Flags;
} ls_map_t;




typedef struct ls_map_array {
unsigned32 Count;
ls_map_t Loc[1];
} ls_map_array_t;






typedef ls_map_array_t *ls_map_array_ptr_t;



#define LS_STAT_REQPERMIN (0)
#define LS_STAT_REQERRORS (1)
#define LS_STAT_LOCMAPREQ (2)
#define LS_STAT_LOCMAPUPD (3)
#define LS_STAT_LOCMAPTIMEOUTS (4)
#define LS_STAT_MINLOCMAPUPD (5)
#define LS_STAT_AVGLOCMAPUPD (6)
#define LS_STAT_MAXLOCMAPUPD (7)
#define LS_STAT_REGISTERBITMAP (8)

typedef struct ls_server_stats {
u_signed64 RegisterBitmap;
unsigned32 RequestsPerMinute;
unsigned32 RequestErrors;
unsigned32 LocMapRequests;
unsigned32 LocMapUpdates;
unsigned32 LocMapUpdTimeouts;
unsigned32 MinLocMapUpdate;
unsigned32 AvgLocMapUpdate;
unsigned32 MaxLocMapUpdate;
} ls_server_stats_t;




#ifdef __cplusplus
}







#endif
#endif

#ifndef _LS_TYPES_H_RPCGEN
#define _LS_TYPES_H_RPCGEN

#include <rpc/rpc.h>
#ifndef _ls_types_h
#define _ls_types_h








#include "hpss_types.h"




#include "hpss_limits.h"
#include "hpss_rpc.h"



#define LS_MAP_ROOT_CS 0x00000001
#define LS_MAP_IS_LOCAL 0x00000002
#define LS_MAP_RPCGROUP 0x00000004
#define LS_MAP_PERM 0x00000008
#define LS_ENV_SITE_NAME "HPSS_SITE_NAME"

struct ls_map {
hpss_uuid_t ServerId;
hpss_uuid_t SiteId;

unsigned32 NumEndpoints;
hpss_rpc_endpoint_t Endpoint[HPSS_MAX_SRVR_INTERFACES];
unsigned32 ServerType;
unsigned32 RealmId;
unsigned32 SubsystemId;
unsigned32 Flags;
};
typedef struct ls_map ls_map;

typedef ls_map ls_map_t;

struct ls_map_array {
struct {
u_int Loc_len;
ls_map_t *Loc_val;
} Loc;
};
typedef struct ls_map_array ls_map_array;

typedef ls_map_array ls_map_array_t;

typedef ls_map_array_t *ls_map_array_ptr_t;

#define LS_GETMAPS_REMOTE 0x00000001
#define LS_GETMAPS_LOCAL 0x00000002
#define LS_STAT_REQPERMIN 0
#define LS_STAT_REQERRORS 1
#define LS_STAT_LOCMAPREQ 2
#define LS_STAT_LOCMAPUPD 3
#define LS_STAT_LOCMAPTIMEOUTS 4
#define LS_STAT_MINLOCMAPUPD 5
#define LS_STAT_AVGLOCMAPUPD 6
#define LS_STAT_MAXLOCMAPUPD 7
#define LS_STAT_REGISTERBITMAP 8

struct ls_server_stats {
u_signed64 RegisterBitmap;
unsigned32 RequestsPerMinute;
unsigned32 RequestErrors;
unsigned32 LocMapRequests;
unsigned32 LocMapUpdates;
unsigned32 LocMapUpdTimeouts;
unsigned32 MinLocMapUpdate;
unsigned32 AvgLocMapUpdate;
unsigned32 MaxLocMapUpdate;
};
typedef struct ls_server_stats ls_server_stats;

typedef ls_server_stats ls_server_stats_t;
#endif


extern bool_t xdr_ls_map();
extern bool_t xdr_ls_map_t();
extern bool_t xdr_ls_map_array();
extern bool_t xdr_ls_map_array_t();
extern bool_t xdr_ls_map_array_ptr_t();
extern bool_t xdr_ls_server_stats();
extern bool_t xdr_ls_server_stats_t();


#endif /* !_LS_TYPES_H_RPCGEN */


lsc_config.h

HPSS4.5

HPSS6.2

#ifndef lsc_config_h
#define lsc_config_h

#include <nl_types.h>

typedef struct ls_lib_config
{
char LSGroupName[HPSS_MAX_DCE_NAME];
nl_catd MasterCatFD;
unsigned32 LocMapCount;
unsigned32 LocMapLifetime;
unsigned32 SiteCount;
unsigned32 SiteLifetime;
unsigned32 Flags;
unsigned32 ConnectTimeout;


} ls_lib_config_t;

#define LSC_CONFIG_FLAGS_NONE (0x00000000)
#define LSC_CONFIG_FLAGS_USE_HANDLES (0x00000001)
#define LSC_CONFIG_FLAGS_USE_LOGGING (0x00000002)

#define LSC_DEFAULT_LSGROUP_NAME "/.:/hpss/ls/group"
#define LSC_DEFAULT_MASTER_CAT_FD (NULL)
#define LSC_DEFAULT_LOCMAP_COUNT (20)
#define LSC_DEFAULT_LOCMAP_LIFETIME (120)
#define LSC_DEFAULT_SITE_COUNT (5)
#define LSC_DEFAULT_SITE_LIFETIME (120)
#define LSC_DEFAULT_FLAGS (LSC_CONFIG_FLAGS_NONE)
#define LSC_DEFAULT_CONN_TIMEOUT (60)

#endif /* lsc_config_h */

#ifndef lsc_config_h
#define lsc_config_h

#include <nl_types.h>

typedef struct ls_lib_config
{

nl_catd MasterCatFD;
unsigned32 LocMapCount;
unsigned32 LocMapLifetime;
unsigned32 SiteCount;
unsigned32 SiteLifetime;
unsigned32 Flags;
unsigned32 ConnectTimeout;
hpss_rpc_prot_level_t ProtectionLevel;
hpss_authn_mech_t AuthnMechanism;
} ls_lib_config_t;

#define LSC_CONFIG_FLAGS_NONE (0x00000000)
#define LSC_CONFIG_FLAGS_USE_HANDLES (0x00000001)
#define LSC_CONFIG_FLAGS_USE_LOGGING (0x00000002)


#define LSC_DEFAULT_MASTER_CAT_FD (NULL)
#define LSC_DEFAULT_LOCMAP_COUNT (20)
#define LSC_DEFAULT_LOCMAP_LIFETIME (120)
#define LSC_DEFAULT_SITE_COUNT (5)
#define LSC_DEFAULT_SITE_LIFETIME (120)
#define LSC_DEFAULT_FLAGS (LSC_CONFIG_FLAGS_NONE)
#define LSC_DEFAULT_CONN_TIMEOUT (60)

#endif /* lsc_config_h */


lsc_internal.h

HPSS4.5

HPSS6.2

#ifndef lsc_internal_h
#define lsc_internal_h

#include "pthread.h"
#include "u_signed64.h"
#include "ls_common.h"
#include "ls_logging.h"

<略>

typedef struct lsc_site_data {
uuid_t site; /* id of site */
char name[HPSS_MAX_DESC_NAME]; /* descriptive name */
} lsc_site_data_t;

typedef struct lsc_cache_elem {
void *data; /* data returned */
signed32 result; /* result code from call */
time_t inserted; /* time elem inserted */
signed32 hit; /* how many times hit */
} lsc_cache_elem_t;

typedef signed32 (*lsc_cache_match_proc_t)(lsc_cache_elem_t *, void *);

typedef struct lsc_cache {
pthread_mutex_t lock; /* protects this struct */
lsc_cache_elem_t *element; /* Ptr to element array */
signed32 maxcount; /* element array size */
signed32 count; /* array slots in use */
signed32 staletime; /* Stale lifetime */
signed32 invaltime; /* Ancient lifetime */
lsc_cache_match_proc_t match_proc; /* proc to check if equal */
signed32 hits; /* Number of hits found */
signed32 lookups; /* Total lookups made */
signed32 updates; /* Total updates made */
} lsc_cache_t;

static signed32
lsc_GetServerByUUID(
signed32 RequestId, /* IN */
uuid_t *ServerId, /* IN */
char *Function, /* IN */
ls_map_t *Location /* OUT */
);

static signed32
lsc_LocateSite(
signed32 RequestId, /* IN */
signed32 BySite, /* IN */
char *Function, /* IN */
uuid_t *SiteId, /* IN/OUT */
char *SiteName /* IN/OUT */
);

<略>

#ifndef lsc_internal_h
#define lsc_internal_h

#include "hpss_pthread.h"
#include "u_signed64.h"
#include "ls_common.h"
#include "ls_logging.h"

<略>

typedef struct lsc_site_data {
hpss_uuid_t site; /* id of site */
char name[HPSS_MAX_SITE_NAME]; /* descriptive name */
} lsc_site_data_t;

typedef struct lsc_cache_elem {
void *data; /* data returned */
signed32 result; /* result code from call */
time_t inserted; /* time elem inserted */
signed32 hit; /* how many times hit */
} lsc_cache_elem_t;

typedef signed32 (*lsc_cache_match_proc_t)(lsc_cache_elem_t *, void *);

typedef struct lsc_cache {
pthread_mutex_t lock; /* protects this struct */
lsc_cache_elem_t *element; /* Ptr to element array */
signed32 maxcount; /* element array size */
signed32 count; /* array slots in use */
signed32 staletime; /* Stale lifetime */
signed32 invaltime; /* Ancient lifetime */
lsc_cache_match_proc_t match_proc; /* proc to check if equal */
signed32 hits; /* Number of hits found */
signed32 lookups; /* Total lookups made */
signed32 updates; /* Total updates made */
} lsc_cache_t;

static signed32
lsc_GetServerByUUID(
hpss_reqid_t RequestId, /* IN */
hpss_uuid_t *ServerId, /* IN */
char *Function, /* IN */
ls_map_t *Location /* OUT */
);

static signed32
lsc_LocateSite(
hpss_reqid_t RequestId, /* IN */
signed32 BySite, /* IN */
char *Function, /* IN */
hpss_uuid_t *SiteId, /* IN/OUT */
char *SiteName /* IN/OUT */
);

<略>


mvr_asyncio.h

HPSS4.5

HPSS6.2

#ifndef mvr_asyncio_h
#define mvr_asyncio_h

#include <sys/types.h>
#if defined(LINUX)




#include <features.h>
#include <linux/aio.h>

#else
#include <aio.h>
#endif
#include "hpss_iod.h"
#include "mvr_shmem.h"

#if defined(IPI3_SUPPORT)
#include <sys/uio.h>
#include "ipi3.h"
#include "ipi3defs.h"
#include "ipi3struct.h"
#include "ipi3data.h"
#include "ipi3drvr.h"
#include "ipi3rc.h"

typedef struct ipi3Request {
int ipi3Pd;
int ipi3Fd;
int ipi3Td;
unsigned long ipi3Tid;
long ipi3Refid;
u_signed64 ipi3Offset;
IPI3_INTERFACE_STRUCT2 ipi3Ifs;
} ipi3Request_t;

#endif







#if defined(_LARGE_FILES) && defined(__sgi)
#define aio_read aio_read64
#define aio_write aio_write64
#define aio_cancel aio_cancel64
#endif








































typedef struct asyncio_cb {
v_devicedesc_t *DevicePtr; /* which device is in use */
v_mvrreqdesc_t *RequestPtr; /* current request slot */
long Function; /* current operation */
long Flags; /* EOS for write... */
long Error; /* if non-zero, error encountered */
long DevErrno; /* errno returned by device */
char *BufPtr; /* start of transfer w/in buf */
u_signed64 Offset; /* device offset */
u_signed64 Length; /* length remaining */
u_signed64 NBytes; /* number of bytes moved */
u_signed64 DevNotifyFlags; /* device attr value changes */
union asyncio_u {
struct aiocb Aiocb; /* aio control block */

#if defined(IPI3_SUPPORT)
ipi3Request_t Ipi3cb; /* ipi3 control block */
#endif
} Asyncio_u;
} asyncio_cb_t;

#define ASYNCIO_READ 1
#define ASYNCIO_WRITE 2
#define ASYNCIO_IPI3_READ 3
#define ASYNCIO_IPI3_WRITE 4



<略>

#endif /* mvr_asyncio_h */

#ifndef mvr_asyncio_h
#define mvr_asyncio_h

#include <sys/types.h>
#if defined(LINUX)
#if !defined(LINUX_KAIO)
#include <signal.h>
#include <libaio.h>
#else
#include <features.h>
#include <linux/aio.h>
#endif
#else
#include <aio.h>
#endif
#include "hpss_iod.h"
#include "mvr_shmem.h"

#if defined(IPI3_SUPPORT)
#include <sys/uio.h>
#include "ipi3.h"
#include "ipi3defs.h"
#include "ipi3struct.h"
#include "ipi3data.h"
#include "ipi3drvr.h"
#include "ipi3rc.h"

typedef struct ipi3Request {
int ipi3Pd;
int ipi3Fd;
int ipi3Td;
unsigned long ipi3Tid;
long ipi3Refid;
u_signed64 ipi3Offset;
IPI3_INTERFACE_STRUCT2 ipi3Ifs;
} ipi3Request_t;

#endif

#include "san3p_msgdefs.h"
typedef struct san3pRequest {
long controlFd; /* FD control socket */
san3p_devaddr_t san3p_deviceaddr; /* device address */
} san3pRequest_t;

#if defined(_LARGE_FILES) && defined(__sgi)
#define aio_read aio_read64
#define aio_write aio_write64
#define aio_cancel aio_cancel64
#endif

#if defined(LINUX) && !defined(LINUX_KAIO)
typedef struct aiocb {
int aio_fildes; /* File descriptor to perform aio */
void *aio_buf; /* User's data buffer */
size_t aio_nbytes; /* No. of bytes in transfer */
#if defined(__USE_FILE_OFFSET64)
loff_t aio_offset;
#else
off_t aio_offset; /* File position to begin transfer */
char __aio_pad[sizeof(loff_t) - sizeof(off_t)];
#endif
sigevent_t aio_sigevent; /* Notification Options */
pid_t notify_pid; /* Process to notify on completion */
unsigned int flags; /* Processing flags */
struct iocb iocb; /* libaio control block */
unsigned long res; /* libaio result codes */
unsigned long res2;
} aiocb_t;

typedef struct aiocb64 {
int aio_fildes; /* File descriptor to perform aio */
void *aio_buf; /* User's data buffer */
size_t aio_nbytes; /* No. of bytes in transfer */
loff_t aio_offset;
sigevent_t aio_sigevent; /* Notification Options */
pid_t notify_pid; /* Process to notify on completion */
unsigned int flags; /* Processing flags */
struct iocb iocb; /* libaio control block */
unsigned long res; /* libaio result codes */
unsigned long res2;
} aiocb64_t;

#define AIO_ST_BIT (0x00000001)

#define AIO_CANCELED 1
#define AIO_NOTCANCELED 2
#define AIO_ALLDONE 3
#endif /* defined(LINUX) && !defined(LINUX_KAIO) */


typedef struct asyncio_cb {
v_devicedesc_t *DevicePtr; /* which device is in use */
v_mvrreqdesc_t *RequestPtr; /* current request slot */
long Function; /* current operation */
long Flags; /* EOS for write... */
long Error; /* if non-zero, error encountered */
long DevErrno; /* errno returned by device */
char *BufPtr; /* start of transfer w/in buf */
u_signed64 Offset; /* device offset */
u_signed64 Length; /* length remaining */
u_signed64 NBytes; /* number of bytes moved */
u_signed64 DevNotifyFlags; /* device attr value changes */
union asyncio_u {
struct aiocb Aiocb; /* aio control block */
san3pRequest_t San3pcb; /* san3p control block */
#if defined(IPI3_SUPPORT)
ipi3Request_t Ipi3cb; /* ipi3 control block */
#endif
} Asyncio_u;
} asyncio_cb_t;

#define ASYNCIO_READ 1
#define ASYNCIO_WRITE 2
#define ASYNCIO_IPI3_READ 3
#define ASYNCIO_IPI3_WRITE 4
#define ASYNCIO_SAN3P_READ 5
#define ASYNCIO_SAN3P_WRITE 6

<略>

#endif /* mvr_asyncio_h */


mvr_clientif.h

HPSS4.5

HPSS6.2

#ifndef mvr_clientif_h
#define mvr_clientif_h

#include <sys/select.h>
#include "mvr_shmem.h"

#include "hpss_netopt.h"


typedef struct client_conn {
address_t ListenAddr;
long ConnectDesc;
long Flags;
netopt_entry_t *NetoptPtr;
long LFTPerms;
struct client_conn *Next;
} client_conn_t;

typedef struct data_desc_elem {
long DataDesc;
address_t PeerAddr;
struct data_desc_elem *Next;
} data_desc_elem_t;

typedef struct data_port {
address_t ListenAddr;
long ListenDesc;
long NumDataDesc;
fd_set RdList,WrtList,ExcList;
data_desc_elem_t *DataDescList;
netopt_entry_t *NetoptPtr;
struct data_port *Next;
} data_port_t;



















<略>

long
InitiatorSendData(
v_mvrreqdesc_t *RequestPtr,
data_port_t *DataPortPtr,
u_signed64 AddrOffset,
u_signed64 Length,

char *Buffer,
u_signed64 *RetBytesSent);

long
InitiatorRecvData(
v_mvrreqdesc_t *RequestPtr,
data_port_t *DataPortPtr,
u_signed64 AddrOffset,
u_signed64 Length,

char *Buffer,
u_signed64 *RetBytesRcvd);


























#endif /* mvr_clientif_h */

#ifndef mvr_clientif_h
#define mvr_clientif_h

#include <sys/select.h>
#include "mvr_shmem.h"
#include "pdata.h"
#include "hpss_netopt.h"


typedef struct client_conn {
address_t ListenAddr;
long ConnectDesc;
long Flags;
netopt_entry_t *NetoptPtr;
long LFTPerms;
struct client_conn *Next;
} client_conn_t;

typedef struct data_desc_elem {
long DataDesc;
address_t PeerAddr;
struct data_desc_elem *Next;
} data_desc_elem_t;

typedef struct data_port {
address_t ListenAddr;
long ListenDesc;
long NumDataDesc;
fd_set RdList,WrtList,ExcList;
data_desc_elem_t *DataDescList;
netopt_entry_t *NetoptPtr;
struct data_port *Next;
} data_port_t;

typedef struct push_data {
pdata_hdr_t PDataHdr;
data_desc_elem_t *DataDescElem;
struct push_data *Next;
} push_data_t;

typedef struct ctl_connect_info {
long ControlDesc;
unsigned32 Flags;
u_signed64 Offset;
u_signed64 InitialOffset;
u_signed64 Length;
u_signed64 TotalLength;
address_t Address;
address_t PeerCtlAddr;
struct ctl_connect_info *Next;
} ctl_connect_info_t;


<略>

long
InitiatorSendData(
v_mvrreqdesc_t *RequestPtr,
data_port_t *DataPortPtr,
u_signed64 AddrOffset,
u_signed64 Length,
int ControlFd,
char *Buffer,
u_signed64 *RetBytesSent);

long
InitiatorRecvData(
v_mvrreqdesc_t *RequestPtr,
data_port_t *DataPortPtr,
u_signed64 AddrOffset,
u_signed64 Length,
int ControlFd,
char *Buffer,
u_signed64 *RetBytesRcvd);

long
InitPushData(
v_mvrreqdesc_t *RequestPtr,
address_t *ReplyAddr,
long Flags,
signed32 RequestID,
signed32 ListLength,
srcsinkdesc_t *DevSidePtr,
data_port_t **RetDataPortPtr);

long
RecvClientPushData(
v_mvrreqdesc_t *RequestPtr,
data_port_t *DataPortPtr,
u_signed64 AddrOffset,
u_signed64 Length,
char *Buffer,
push_data_t **PushDataPtr,
u_signed64 *BytesRcvd);

long
CleanupPushData(
data_port_t *DataPortPtr,
push_data_t *PushDataPtr);


#endif /* mvr_clientif_h */


mvr_config.h

HPSS4.5

HPSS6.2

#ifndef mvr_config_v0_0_included
#define mvr_config_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif
#ifndef hpss_idl_types_v0_0_included
#include <hpss_idl_types.h>
#endif
#ifndef hpss_limits_v0_0_included
#include <hpss_limits.h>
#endif

typedef struct mvr_config {
uuid_t MvrID;
u_signed64 MoverRegisterBitmap;
u_signed64 GenericDeviceRegisterBitmap;
u_signed64 EncryptionKey;
signed32 MvrBufferSize;
unsigned32 Reserved1;
idl_char MvrTcpPathName[1024];
idl_char MvrHostname[64];
idl_char MvrDataHostname[64];
unsigned16 MvrTcpPort;
unsigned16 MvrStartPortRange;
unsigned16 MvrEndPortRange;
unsigned16 Reserved2;
} mvr_config_t;




#ifdef __cplusplus
}


#endif
#endif

#ifndef _MVR_CONFIG_H_RPCGEN
#define _MVR_CONFIG_H_RPCGEN

#include <rpc/rpc.h>
#ifndef _mvr_config_h
#define _mvr_config_h








#include "hpss_types.h"


#include "hpss_limits.h"


struct mvr_config {
hpss_uuid_t MvrID;
u_signed64 MoverRegisterBitmap;
u_signed64 GenericDeviceRegisterBitmap;
u_signed64 EncryptionKey;
signed32 MvrBufferSize;

char MvrTcpPathName[HPSS_MAX_PATH_NAME];
char MvrHostname[HPSS_MAX_HOST_NAME];
char MvrDataHostname[HPSS_MAX_HOST_NAME];
unsigned16 MvrTcpPort;
unsigned16 MvrStartPortRange;
unsigned16 MvrEndPortRange;

};
typedef struct mvr_config mvr_config;

typedef mvr_config mvr_config_t;
#endif


extern bool_t xdr_mvr_config();
extern bool_t xdr_mvr_config_t();

#endif /* !_MVR_CONFIG_H_RPCGEN */


mvr_devdesc.h

HPSS4.5

HPSS6.2

#ifndef mvr_devdesc_v0_0_included
#define mvr_devdesc_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif
#ifndef hpss_idl_types_v0_0_included
#include <hpss_idl_types.h>
#endif
#ifndef hpss_media_type_v0_0_included
#include <hpss_media_type.h>
#endif
#ifndef idlreladdr_v0_0_included
#include <hpssaddr.h>
#endif
#define MVR_MAXDEVNAME (64)
#define MVR_MAXDEVTASK (64)
#define MVR_GENERIC_DEVICE_ID (0)

typedef struct device_desc_md {
signed32 Version;
signed32 Reserved1;
idl_char DeviceName[64];
media_type_t DeviceType;
unsigned32 DeviceID;
unsigned32 Flags;
unsigned32 SecurityLabel;
unsigned32 MediaBlockSize;
signed32 OperationalState;
signed32 UsageState;
signed32 AdministrativeState;


signed32 Reserved2;
u_signed64 RegisterBitmap;
u_signed64 NumberOfBytes;
u_signed64 StartOffset;
u_signed64 Reserved3;
uuid_t MvrID;
} device_desc_md_t;




typedef struct device_desc_record {
unsigned32 State;
unsigned32 SetState;
unsigned32 VolFlags;
unsigned32 NumberOfErrors;
unsigned32 BlockSize;
unsigned32 AuxAddrInfo;


signed32 DeviceFD;
signed32 TaskID[64];
idl_char VolumeID[8];
u_signed64 BytesRead;
u_signed64 BytesWritten;
positiondesc_t Position;
} device_desc_record_t;




typedef struct devdesc_attr {
device_desc_md_t DevDescMetaData;
device_desc_record_t DevDescRecord;
} devdesc_attr_t;



#define MVR_DEVATTR_VERSION (0)
#define MVR_DEVATTR_DEVICENAME (1)
#define MVR_DEVATTR_DEVICEID (2)
#define MVR_DEVATTR_TYPE (3)
#define MVR_DEVATTR_FLAGS (4)
#define MVR_DEVATTR_OPERATIONALSTATE (5)
#define MVR_DEVATTR_USAGESTATE (6)
#define MVR_DEVATTR_ADMINSTATE (7)
#define MVR_DEVATTR_SECURITYLABEL (8)
#define MVR_DEVATTR_MEDIABLOCKSIZE (9)
#define MVR_DEVATTR_REGISTERBITMAP (10)
#define MVR_DEVATTR_NUMBEROFBYTES (11)
#define MVR_DEVATTR_STATE (12)
#define MVR_DEVATTR_SETSTATE (13)
#define MVR_DEVATTR_VOLFLAGS (14)
#define MVR_DEVATTR_NUMBEROFERRORS (15)
#define MVR_DEVATTR_BLOCKSIZE (16)
#define MVR_DEVATTR_AUXADDRINFO (17)


#define MVR_DEVATTR_DEVICEFD (18)
#define MVR_DEVATTR_TASKID (19)
#define MVR_DEVATTR_VOLUMEID (20)
#define MVR_DEVATTR_BYTESREAD (21)
#define MVR_DEVATTR_BYTESWRITTEN (22)
#define MVR_DEVATTR_POSITION (23)
#define MVR_DEVATTR_STARTOFFSET (24)
#define MVR_DEVATTR_ALL_ATTRS (24)
#define MVR_DEV_READ_ALLOWED (1)
#define MVR_DEV_WRITE_ALLOWED (2)
#define MVR_DEV_MOUNTABLE (4)
#define MVR_DEV_LOCATE_SUPP (8)
#define MVR_DEV_WTM_ZERO_TO_SYNC (16)
#define MVR_DEV_NDELAY_SUPP (32)
#define MVR_DEV_IPI3_SUPP (64)
#define MVR_DEV_SHARED_USE (128)
#define MVR_DEV_SCSI2_LBA_SUPP (256)

#define MVR_DEV_FLAGS_VALIDMASK (511)
#define MVR_DEV_MOUNTED (1)
#define MVR_DEV_OPEN_READ (2)
#define MVR_DEV_OPEN_WRITE (4)
#define MVR_DEV_INUSE (8)
#define MVR_DEV_ERROR (16)
#define MVR_DEV_EOT (32)
#define MVR_DEV_MIDBLOCK (64)
#define MVR_DEV_UNSYNCED (128)
#define MVR_DEV_READLASTOP (256)
#define MVR_DEV_BLKID_SUPP (512)
#define MVR_DEV_HPSS_VOL (0)
#define MVR_DEV_UNITREE_VOL (1)
#define MVR_DEV_CFS_VOL (2)
#define MVR_DEV_STD_VOL (3)
#define MVR_DEV_VOL_MASK (65535)
#define MVR_DEV_VOL_TYPE_MASK (65535)
#define MVR_DEV_VOL_FLAG_MASK (-65536)
#define MVR_DEV_VOL_USE_BLK_HDRS (65536)
#define MVR_DEV_TOGGLE_READ (1)
#define MVR_DEV_TOGGLE_WRITE (2)
#define MVR_DEV_TOGGLE_INUSE (4)
#define MVR_DEV_RESET_NUMERRORS (8)
#define MVR_DEV_RESET_BYTESREAD (16)
#define MVR_DEV_RESET_BYTESWRITTEN (32)
#define MVR_DEV_LOCKED (64)
#define MVR_DEV_UNLOCKED (128)
#define MVR_DEV_REPAIRED (256)
#define MVR_DEV_SETSTATE_VALIDMASK (7)

#ifdef __cplusplus
}






#endif
#endif

#ifndef _MVR_DEVDESC_H_RPCGEN
#define _MVR_DEVDESC_H_RPCGEN

#include <rpc/rpc.h>
#ifndef _mvr_devdesc_h
#define _mvr_devdesc_h








#include "hpss_types.h"


#include "hpss_media_type.h"


#include "hpssaddr.h"

#define MVR_MAXDEVNAME 64
#define MVR_MAXDEVTASK 64
#define MVR_GENERIC_DEVICE_ID 0

struct device_desc_md {
signed32 Version;
signed32 Reserved1;
char DeviceName[MVR_MAXDEVNAME];
media_type_t DeviceType;
unsigned32 DeviceID;
unsigned32 Flags;
unsigned32 SecurityLabel;
unsigned32 MediaBlockSize;
unsigned32 OperationalState;
unsigned32 UsageState;
unsigned32 AdministrativeState;
unsigned32 SanID;
unsigned32 DiskSynchInc;

u_signed64 RegisterBitmap;
u_signed64 NumberOfBytes;
u_signed64 StartOffset;
u_signed64 Reserved3;
hpss_uuid_t MvrID;
};
typedef struct device_desc_md device_desc_md;

typedef device_desc_md device_desc_md_t;

struct device_desc_record {
unsigned32 State;
unsigned32 SetState;
unsigned32 VolFlags;
unsigned32 NumberOfErrors;
unsigned32 BlockSize;
unsigned32 AuxAddrInfo;
unsigned32 AuxAddrInfo2;
unsigned32 AuxAddrInfo3;
signed32 DeviceFD;
signed32 TaskID[MVR_MAXDEVTASK];
char VolumeID[8];
u_signed64 BytesRead;
u_signed64 BytesWritten;
positiondesc_t Position;
};
typedef struct device_desc_record device_desc_record;

typedef device_desc_record device_desc_record_t;

struct devdesc_attr {
device_desc_md_t DevDescMetaData;
device_desc_record_t DevDescRecord;
};
typedef struct devdesc_attr devdesc_attr;

typedef devdesc_attr devdesc_attr_t;
#define MVR_DEVATTR_VERSION 0
#define MVR_DEVATTR_DEVICENAME 1
#define MVR_DEVATTR_DEVICEID 2
#define MVR_DEVATTR_TYPE 3
#define MVR_DEVATTR_FLAGS 4
#define MVR_DEVATTR_OPERATIONALSTATE 5
#define MVR_DEVATTR_USAGESTATE 6
#define MVR_DEVATTR_ADMINSTATE 7
#define MVR_DEVATTR_SECURITYLABEL 8
#define MVR_DEVATTR_MEDIABLOCKSIZE 9
#define MVR_DEVATTR_REGISTERBITMAP 10
#define MVR_DEVATTR_NUMBEROFBYTES 11
#define MVR_DEVATTR_STATE 12
#define MVR_DEVATTR_SETSTATE 13
#define MVR_DEVATTR_VOLFLAGS 14
#define MVR_DEVATTR_NUMBEROFERRORS 15
#define MVR_DEVATTR_BLOCKSIZE 16
#define MVR_DEVATTR_AUXADDRINFO 17
#define MVR_DEVATTR_AUXADDRINFO2 18
#define MVR_DEVATTR_AUXADDRINFO3 19
#define MVR_DEVATTR_DEVICEFD 20
#define MVR_DEVATTR_TASKID 21
#define MVR_DEVATTR_VOLUMEID 22
#define MVR_DEVATTR_BYTESREAD 23
#define MVR_DEVATTR_BYTESWRITTEN 24
#define MVR_DEVATTR_POSITION 25
#define MVR_DEVATTR_STARTOFFSET 26
#define MVR_DEVATTR_ALL_ATTRS 26
#define MVR_DEV_READ_ALLOWED 0x00000001
#define MVR_DEV_WRITE_ALLOWED 0x00000002
#define MVR_DEV_MOUNTABLE 0x00000004
#define MVR_DEV_LOCATE_SUPP 0x00000008
#define MVR_DEV_WTM_ZERO_TO_SYNC 0x00000010
#define MVR_DEV_NDELAY_SUPP 0x00000020
#define MVR_DEV_IPI3_SUPP 0x00000040
#define MVR_DEV_SHARED_USE 0x00000080
#define MVR_DEV_SCSI2_LBA_SUPP 0x00000100
#define MVR_DEV_SAN3P_SUPP 0x00000200
#define MVR_DEV_FLAGS_VALIDMASK 0x000003FF
#define MVR_DEV_MOUNTED 0x00000001
#define MVR_DEV_OPEN_READ 0x00000002
#define MVR_DEV_OPEN_WRITE 0x00000004
#define MVR_DEV_INUSE 0x00000008
#define MVR_DEV_ERROR 0x00000010
#define MVR_DEV_EOT 0x00000020
#define MVR_DEV_MIDBLOCK 0x00000040
#define MVR_DEV_UNSYNCED 0x00000080
#define MVR_DEV_READLASTOP 0x00000100
#define MVR_DEV_BLKID_SUPP 0x00000200
#define MVR_DEV_HPSS_VOL 0x00000000
#define MVR_DEV_UNITREE_VOL 0x00000001
#define MVR_DEV_CFS_VOL 0x00000002
#define MVR_DEV_STD_VOL 0x00000003
#define MVR_DEV_VOL_MASK 0x0000FFFF
#define MVR_DEV_VOL_TYPE_MASK 0x0000FFFF
#define MVR_DEV_VOL_FLAG_MASK 0xFFFF0000
#define MVR_DEV_VOL_USE_BLK_HDRS 0x00010000
#define MVR_DEV_TOGGLE_READ 0x00000001
#define MVR_DEV_TOGGLE_WRITE 0x00000002
#define MVR_DEV_TOGGLE_INUSE 0x00000004
#define MVR_DEV_RESET_NUMERRORS 0x00000008
#define MVR_DEV_RESET_BYTESREAD 0x00000010
#define MVR_DEV_RESET_BYTESWRITTEN 0x00000020
#define MVR_DEV_LOCKED 0x00000040
#define MVR_DEV_UNLOCKED 0x00000080
#define MVR_DEV_REPAIRED 0x00000100
#define MVR_DEV_SETSTATE_VALIDMASK 0x00000007
#endif


extern bool_t xdr_device_desc_md();
extern bool_t xdr_device_desc_md_t();
extern bool_t xdr_device_desc_record();
extern bool_t xdr_device_desc_record_t();
extern bool_t xdr_devdesc_attr();
extern bool_t xdr_devdesc_attr_t();


#endif /* !_MVR_DEVDESC_H_RPCGEN */


mvr_device.h

HPSS4.5

HPSS6.2

#ifndef mvr_device_h
#define mvr_device_h

#include "mvr_tape.h"
#include "mvr_disk.h"
#include "mvr_asyncio.h"

#define MVR_IO_THIRDPARTY 0x00000001 /* direct to client */
#define MVR_IO_RMW 0x00000002 /* read-modify-write */
#define MVR_IO_SYNC 0x00000004 /* synchronous i/o */
#define MVR_IO_XFEROPT_IP 0x00000008 /* tcp/ip capable */
#define MVR_IO_XFEROPT_IPI3 0x00000010 /* ipi-3 capable */
#define MVR_IO_LASTFLAG 0x00000020 /* last piece in xfer */
#define MVR_IO_SHMEM 0x00000040 /* write from shmem */
#define MVR_IO_RMW_SHORT_XFER 0x00000080 /* RMW if short recv */
#define MVR_IO_WRITELABEL 0x00000100 /* writing disk label */
#define MVR_IO_READLABEL 0x00000200 /* reading disk label */



<略>

signed32
DeviceRead(
v_devicedesc_t *DevicePtr, /* [IN] ID of Tape to read */
v_mvrreqdesc_t *RequestPtr, /* [IN] ptr to current request slot */
char *Buffer, /* [IN] Data to read */
u_signed64 BufLength, /* [IN] Number of bytes to read into buffer */

address_t *ClientAddr, /* [IN] Client address, may be 3rd party */
u_signed64 TransferOffset, /* [IN] Current transfer offset, 3rd party */
long Flags, /* [IN] flags to alter read behavior */
u_signed64 *DevNotifyFlags);/* [OUT] Updated device descriptor values */

signed32
DeviceWrite(
v_devicedesc_t *DevicePtr, /* [IN] ID of Tape to write */
v_mvrreqdesc_t *RequestPtr, /* [IN] ptr to current request slot */
char *Buffer, /* [IN] Data to write */
u_signed64 BufLength, /* [IN] Number of bytes to read into buffer */

address_t *ClientAddr, /* [IN] Client address, may be 3rd party */
u_signed64 TransferOffset, /* [IN] Current transfer offset, 3rd party */
long Flags, /* [IN] flags to alter write behavior */
u_signed64 *DevNotifyFlags);/* [OUT] Updated device descriptor values */

<略>

long
DetermineTransportType(
unsigned32 Flags,
address_t *AddrPtr);







#define MVR_DEVCTL_OPEN 0x00000001
#define MVR_DEVCTL_WAIT 0x00000002
#define MVR_DEVCTL_POSITION 0x00000004
#define MVR_DEVCTL_WRITE 0x00000008

#endif /* mvr_device_h */

#ifndef mvr_device_h
#define mvr_device_h

#include "mvr_tape.h"
#include "mvr_disk.h"
#include "mvr_asyncio.h"

#define MVR_IO_THIRDPARTY 0x00000001 /* direct to client */
#define MVR_IO_RMW 0x00000002 /* read-modify-write */
#define MVR_IO_SYNC 0x00000004 /* synchronous i/o */
#define MVR_IO_XFEROPT_IP 0x00000008 /* tcp/ip capable */
#define MVR_IO_XFEROPT_IPI3 0x00000010 /* ipi-3 capable */
#define MVR_IO_LASTFLAG 0x00000020 /* last piece in xfer */
#define MVR_IO_SHMEM 0x00000040 /* write from shmem */
#define MVR_IO_RMW_SHORT_XFER 0x00000080 /* RMW if short recv */

#define MVR_IO_WRITELABEL 0x00000100 /* writing disk label */
#define MVR_IO_READLABEL 0x00000200 /* reading disk label */
#define MVR_IO_XFEROPT_SAN3P 0x00000400 /* 3PSAN-xfer capable */

<略>

signed32
DeviceRead(
v_devicedesc_t *DevicePtr, /* [IN] ID of Tape to read */
v_mvrreqdesc_t *RequestPtr, /* [IN] ptr to current request slot */
char *Buffer, /* [IN] Data to read */
u_signed64 BufLength, /* [IN] Number of bytes to read into buffer */

int ClientCtlFd, /* [IN] Client control socket FD */
address_t *ClientAddr, /* [IN] Client address, may be 3rd party */
u_signed64 TransferOffset, /* [IN] Current transfer offset, 3rd party */

long Flags, /* [IN] flags to alter read behavior */
u_signed64 *DevNotifyFlags);/* [OUT] Updated device descriptor values */


signed32
DeviceWrite(
v_devicedesc_t *DevicePtr, /* [IN] ID of Tape to write */
v_mvrreqdesc_t *RequestPtr, /* [IN] ptr to current request slot */
char *Buffer, /* [IN] Data to write */
u_signed64 BufLength, /* [IN] Number of bytes to read into buffer */

int ClientCtlFd, /* [IN] Client control socket FD */
address_t *ClientAddr, /* [IN] Client address, may be 3rd party */
u_signed64 TransferOffset, /* [IN] Current transfer offset, 3rd party */

long Flags, /* [IN] flags to alter write behavior */
u_signed64 *DevNotifyFlags);/* [OUT] Updated device descriptor values */


<略>

long
DetermineTransportType(
unsigned32 Flags,
address_t *AddrPtr);

void
DeviceDisableDirectPos(
v_devicedesc_t *DevicePtr, /* [IN] ID of the unit holding the tape */
positiondesc_t *PositionPtr); /* [IN] Where to position device */

#define MVR_DEVCTL_OPEN 0x00000001
#define MVR_DEVCTL_WAIT 0x00000002
#define MVR_DEVCTL_POSITION 0x00000004
#define MVR_DEVCTL_WRITE 0x00000008

#endif /* mvr_device_h */


mvr_disk.h

HPSS4.5

HPSS6.2

#ifndef mvr_disk_h
#define mvr_disk_h

#include "hpssaddr.h"
#include "mvr_shmem.h"
#include "mvr_tape.h"



















typedef struct dk_vol1{
char LabelID[3]; /* "VOL" */
char LabelNo; /* "1" */
char VolumeID[6]; /* Volume ID = "??????" */
char Accessibility; /* space = 0x20 = " " */
char Reserved1[26]; /* set to 0x00 */
char OwnerID[14]; /* "HPSS V2.0" */
char Reserved2[28]; /* set to 0x00 */
char LabelStandardLabel; /* "3" */
long BlockSize; /* disk block size */
long BlockCount; /* number of blocks */
long StartBlock; /* first block to use for data */
char Reserved3[4]; /* to make label 96 bytes */
} dk_vol1_t;

long
dk_open_hpss(
v_devicedesc_t *DevicePtr,
v_mvrreqdesc_t *RequestPtr,
char *VolID,
long Format,
long Flags,
long Classification,
u_signed64 *DevNotifyFlags);

long
dk_close_hpss(
v_devicedesc_t *DevicePtr,
v_mvrreqdesc_t *RequestPtr,
long Flags,
u_signed64 *DevNotifyFlags);

long
dk_init_hpss(
v_devicedesc_t *DevicePtr,
v_mvrreqdesc_t *RequestPtr,
char *NewVolID,
long BlockSize,
long NumBlocks,
long StartBlock,
long Format,
long Classification,
u_signed64 *DevNotifyFlags);

long
dk_rdlbl_hpss(
v_devicedesc_t *DevicePtr,
v_mvrreqdesc_t *RequestPtr,
char *RetVolID,
long *FlagsOut,
u_signed64 *DevNotifyFlags);

long
dk_write_hpss(
v_devicedesc_t *DevicePtr,
v_mvrreqdesc_t *RequestPtr,
char *Buffer,
u_signed64 Length,

address_t *ClientAddr,
u_signed64 TransferOffset,
long Flags,
u_signed64 *DevNotifyFlags);

long
dk_write_sync_hpss(
v_devicedesc_t *DevicePtr,
v_mvrreqdesc_t *RequestPtr,
char *Buffer,
u_signed64 Length,
long Flags,
u_signed64 *RetLength,
u_signed64 *DevNotifyFlags);

long
dk_read_hpss(
v_devicedesc_t *DevicePtr,
v_mvrreqdesc_t *RequestPtr,
char *Buffer,
u_signed64 Length,

address_t *ClientAddr,
u_signed64 TransferOffset,
long Flags,
u_signed64 *DevNotifyFlags);

long
dk_read_sync_hpss(
v_devicedesc_t *DevicePtr,
v_mvrreqdesc_t *RequestPtr,
char *Buffer,
u_signed64 Length,
long Flags,
u_signed64 *RetLength,
u_signed64 *DevNotifyFlags);

long
dk_clear_hpss(
v_devicedesc_t *DevicePtr,
v_mvrreqdesc_t *RequestPtr,
u_signed64 Count,
u_signed64 *DevNotifyFlags);









#endif /* mvr_disk_h */

#ifndef mvr_disk_h
#define mvr_disk_h

#include "hpssaddr.h"
#include "mvr_shmem.h"
#include "mvr_tape.h"

#if defined(LINUX)
#include <asm/ioctl.h>

struct rzft_sync {
loff_t offset;
unsigned long bytes;
unsigned long reserved[3];
};

#define RZFT_SYNC _IO('f',0x91)
#define BLKBSZGET _IOR(0x12,112,sizeof(int))
#define BLKBSZSET _IOW(0x12,113,sizeof(int))
#endif /* defined(LINUX) */

#if defined(LINUX)
#define O_DIRECT 040000
#endif


typedef struct dk_vol1{
char LabelID[3]; /* "VOL" */
char LabelNo; /* "1" */
char VolumeID[6]; /* Volume ID = "??????" */
char Accessibility; /* space = 0x20 = " " */
char Reserved1[26]; /* set to 0x00 */
char OwnerID[14]; /* "HPSS V2.0" */
char Reserved2[28]; /* set to 0x00 */
char LabelStandardLabel; /* "3" */
long BlockSize; /* disk block size */
long BlockCount; /* number of blocks */
long StartBlock; /* first block to use for data */
char Reserved3[4]; /* to make label 96 bytes */
} dk_vol1_t;

long
dk_open_hpss(
v_devicedesc_t *DevicePtr,
v_mvrreqdesc_t *RequestPtr,
char *VolID,
long Format,
long Flags,
long Classification,
u_signed64 *DevNotifyFlags);

long
dk_close_hpss(
v_devicedesc_t *DevicePtr,
v_mvrreqdesc_t *RequestPtr,
long Flags,
u_signed64 *DevNotifyFlags);

long
dk_init_hpss(
v_devicedesc_t *DevicePtr,
v_mvrreqdesc_t *RequestPtr,
char *NewVolID,
long BlockSize,
long NumBlocks,
long StartBlock,
long Format,
long Classification,
u_signed64 *DevNotifyFlags);

long
dk_rdlbl_hpss(
v_devicedesc_t *DevicePtr,
v_mvrreqdesc_t *RequestPtr,
char *RetVolID,
long *FlagsOut,
u_signed64 *DevNotifyFlags);

long
dk_write_hpss(
v_devicedesc_t *DevicePtr,
v_mvrreqdesc_t *RequestPtr,
char *Buffer,
u_signed64 Length,
int ClientCtlFd,
address_t *ClientAddr,
u_signed64 TransferOffset,
long Flags,
u_signed64 *DevNotifyFlags);

long
dk_write_sync_hpss(
v_devicedesc_t *DevicePtr,
v_mvrreqdesc_t *RequestPtr,
char *Buffer,
u_signed64 Length,
long Flags,
u_signed64 *RetLength,
u_signed64 *DevNotifyFlags);

long
dk_read_hpss(
v_devicedesc_t *DevicePtr,
v_mvrreqdesc_t *RequestPtr,
char *Buffer,
u_signed64 Length,
int ClientCtlFd,
address_t *ClientAddr,
u_signed64 TransferOffset,
long Flags,
u_signed64 *DevNotifyFlags);

long
dk_read_sync_hpss(
v_devicedesc_t *DevicePtr,
v_mvrreqdesc_t *RequestPtr,
char *Buffer,
u_signed64 Length,
long Flags,
u_signed64 *RetLength,
u_signed64 *DevNotifyFlags);

long
dk_clear_hpss(
v_devicedesc_t *DevicePtr,
v_mvrreqdesc_t *RequestPtr,
u_signed64 Count,
u_signed64 *DevNotifyFlags);

long
dk_sync_hpss(
v_devicedesc_t *DevicePtr,
v_mvrreqdesc_t *RequestPtr,
u_signed64 Offset,
unsigned32 Length,
u_signed64 *DevNotifyFlags);


#endif /* mvr_disk_h */


mvr_ipc.h

HPSS4.5

HPSS6.2

#ifndef _MVR_IPC_H
#define _MVR_IPC_H

#include <mvr_shmem.h>
#include <cs_Log.h>

#define MVRIPC_SHMEM_XDRSIZE (sizeof(mvr_shmem_t) * 4)
#define MVRIPC_LOGSHMEM_XDRSIZE (sizeof(LogSharedMem_t) * 4)
#define MVRIPC_NOTIFY_XDRSIZE (sizeof(notify_req_t) * 4)
#define MVRIPC_REQTAB_XDRSIZE \
(sizeof(v_mvrreqdesc_t) * MVR_MAX_REQUESTS * 4)


<略>

#endif /* ifndef _MVR_IPC_H */

#ifndef _MVR_IPC_H
#define _MVR_IPC_H

#include <mvr_shmem.h>
#include <cs_Log.h>

#define MVRIPC_SHMEM_XDRSIZE (sizeof(mvr_shmem_t) * 4)
#define MVRIPC_LOGSHMEM_XDRSIZE (sizeof(LogSharedMem_t) * 4)
#define MVRIPC_NOTIFY_XDRSIZE (sizeof(notify_req_t) * 4)
#define MVRIPC_REQTAB_XDRSIZE \
(sizeof(v_mvrreqdesc_t) * MVR_MAX_REQUESTS * 4)
#define MVRIPC_XFER_TIMEOUT (300)

<略>

#endif /* ifndef _MVR_IPC_H */


mvr_log.h

HPSS4.5

HPSS6.2

#ifndef mvr_log_h
#define mvr_log_h

#include <nl_types.h>
#include <cs_Log.h>
#include <string.h>

#define SERVER_CLASS CS_LOG_MSG_CLASS_SERVER
#define MOVER_CLASS CS_LOG_MSG_CLASS_MOVER
#define DEVICE_CLASS CS_LOG_MSG_CLASS_DEVICE
#define SECURITY_CLASS CS_LOG_MSG_CLASS_SECURITY

#define MAX_MSG_LENGTH 256

#define MVR_MSGCAT_SETNUMBER CS_LOG_MSGCAT_SETNUMBER_MVR

#define MVR_MSG_BASE 1
#define MVR_REQUEST_BASE 1001
#define MVR_EVENT_BASE 2001

#define MVR_MSG_AIO_READ_ERROR 1
#define MVR_MSG_AIO_WRITE_ERROR 2
#define MVR_MSG_DEVICEID_RANGE_ERROR 3
#define MVR_MSG_DEVICE_CONFIG_ERROR 4
#define MVR_MSG_INVALID_SELECTIONFLAGS_ERROR 5
#define MVR_MSG_DEV_UNSETTABLE_ATTR_ERROR 6
#define MVR_MSG_DEV_INVALID_ATTR_VALUE_ERROR 7
#define MVR_MSG_BAD_REQUEST_INFO_TYPE_ERROR 8
#define MVR_MSG_BAD_DEVSPEC_SUBTYPE_ERROR 9
#define MVR_MSG_DEVICE_NOTREADY_ERROR 10
#define MVR_MSG_IO_READ_ERROR 11
#define MVR_MSG_IO_WRITE_ERROR 12
#define MVR_MSG_TAPE_WRITE_POSITION_ERROR 13
#define MVR_MSG_TAPE_READ_POSITION_ERROR 14
#define MVR_MSG_ABS_ADDR_SUPPORT_ERROR 15
#define MVR_MSG_DEVFILE_OPEN_ERROR 16
#define MVR_MSG_TAPE_REWIND_ERROR 17
#define MVR_MSG_TAPE_READLABEL_ERROR 18
#define MVR_MSG_TAPE_VERIFYLABEL_ERROR 19
#define MVR_MSG_TAPE_UNLOAD_ERROR 20
#define MVR_MSG_TAPE_FSF_ERROR 21
#define MVR_MSG_TAPE_RSF_ERROR 22
#define MVR_MSG_TAPE_READHEADER_ERROR 23
#define MVR_MSG_TAPE_FSR_ERROR 24
#define MVR_MSG_TAPE_WRITELABEL_ERROR 25
#define MVR_MSG_TAPE_WRITEHEADER_ERROR 26
#define MVR_MSG_TAPE_WEOF_ERROR 27
#define MVR_MSG_GET_EXPIR_ERROR 28
#define MVR_MSG_DD2_SET_BLOCKSIZE_ERROR 29
#define MVR_MSG_DD2_GET_POSITION_ERROR 30
#define MVR_MSG_DD2_SET_POSITION_ERROR 31
#define MVR_MSG_HPSSTAPE_GET_ABSPOS_ERROR 32
#define MVR_MSG_IPI3_SLAVE_ASYNC_IO_ERROR 33
#define MVR_MSG_IPI3_NOT_SUPPORTED_ERROR 34
#define MVR_MSG_PIOFS_CHGVIEW_ERROR 35
#define MVR_MSG_PIOFS_NOT_SUPPORTED_ERROR 36
#define MVR_MSG_BAD_REPLY_LIST_ERROR 37
#define MVR_MSG_BAD_REQSPECREPLY_ERROR 38
#define MVR_MSG_BAD_IOD_FUNCTION_ERROR 39
#define MVR_MSG_BAD_SHMID_ERROR 40
#define MVR_MSG_BIND_ERROR 41
#define MVR_MSG_NO_REQ_SLOT_ERROR 42
#define MVR_MSG_RECV_IOD_ERROR 43
#define MVR_MSG_SEND_IOR_ERROR 44
#define MVR_MSG_ALLOC_IOR_ERROR 45
#define MVR_MSG_BAD_REQ_SLOT_ERROR 46
#define MVR_MSG_BAD_IP_PORT_ERROR 47
#define MVR_MSG_SRCSINK_MISMATCH_ERROR 48
#define MVR_MSG_BAD_STRIPE_ADDR_ERROR 49
#define MVR_MSG_BAD_ADDR_TYPE_ERROR 50
#define MVR_MSG_BAD_SRCSINK_LIST_LEN_ERROR 51
#define MVR_MSG_ZERO_SRCSINK_LEN_ERROR 52
#define MVR_MSG_DEV_STRIPE_LIST_LEN_ERROR 53
#define MVR_MSG_STRIPE_PARM_RANGE_ERROR 54
#define MVR_MSG_END_OF_SRCSINK_LIST_ERROR 55
#define MVR_MSG_IOD_VERIFY_ERROR 56
#define MVR_MSG_OBTAIN_DEVICE_ERROR 57
#define MVR_MSG_HPSSTAPE_OPEN_ERROR 58
#define MVR_MSG_HPSSTAPE_CLOSE_ERROR 59
#define MVR_MSG_HPSSTAPE_POSITION_ERROR 60
#define MVR_MSG_HPSSTAPE_READ_ERROR 61
#define MVR_MSG_HPSSTAPE_WRITE_ERROR 62
#define MVR_MSG_NEXT_OFFS_ERROR 63
#define MVR_MSG_GET_CLIENT_ADDR_ERROR 64
#define MVR_MSG_SEND_CLIENT_DATA_ERROR 65
#define MVR_MSG_RECV_CLIENT_DATA_ERROR 66
#define MVR_MSG_ASYNC_TAPE_IO_ERROR 67
#define MVR_MSG_DEV_IO_LENGTH_ERROR 68
#define MVR_MSG_BLOCKSIZE_MISMATCH_ERROR 69
#define MVR_MSG_HPSSTAPE_BEGIN_SECTION_ERROR 70
#define MVR_MSG_HPSSTAPE_END_SECTION_ERROR 71
#define MVR_MSG_ENTER_CONN_ERROR 72
#define MVR_MSG_GET_TRANS_DESC_ERROR 73
#define MVR_MSG_SEND_BUFFER_ERROR 74
#define MVR_MSG_GET_BUFFER_ERROR 75
#define MVR_MSG_OPEN_CONN_ERROR 76
#define MVR_MSG_SOCK_OPEN_ERROR 77
#define MVR_MSG_BLOCK_SIGNAL_ERROR 78
#define MVR_MSG_UNBLOCK_SIGNAL_ERROR 79
#define MVR_MSG_NULL_REQSPECINFO_ERROR 80
#define MVR_MSG_BAD_REQSPECINFO_TYPE_ERROR 81
#define MVR_MSG_HPSSTAPE_RDLBL_ERROR 82
#define MVR_MSG_BAD_SECTION_ERROR 83
#define MVR_MSG_BAD_BLOCKSIZE_ERROR 84
#define MVR_MSG_HPSSTAPE_VOL1_BUILD_ERROR 85
#define MVR_MSG_HPSSTAPE_HDR1_BUILD_ERROR 86
#define MVR_MSG_HPSSTAPE_HDR2_BUILD_ERROR 87
#define MVR_MSG_HPSSTAPE_INIT_ERROR 88
#define MVR_MSG_ASYNC_READ_ERROR 89
#define MVR_MSG_ASYNC_WRITE_ERROR 90
#define MVR_MSG_SERVER_NOTIFY_ERROR 91
#define MVR_MSG_MOVER_NOTIFY_ERROR 92
#define MVR_MSG_DEVICE_NOTIFY_ERROR 93
#define MVR_MSG_SEND_NOTIFY_REQ_ERROR 94
#define MVR_MSG_END_OF_STRIPE_LIST_ERROR 95
#define MVR_MSG_VOLUMEID_MISMATCH_ERROR 96
#define MVR_MSG_BAD_BLOCKSPERFILE_ERROR 97
#define MVR_MSG_SFS_OPEN_ERROR 98
#define MVR_MSG_SFS_CLOSE_ERROR 99
#define MVR_MSG_MM_READSERVERCONFIG_ERROR 100
#define MVR_MSG_MM_READMVRCONFIG_ERROR 101
#define MVR_MSG_MM_READDEVCONFIG_ERROR 102
#define MVR_MSG_SRCSINK_LIST_LENGTH_ERROR 103
#define MVR_MSG_STRIPE_LIST_LENGTH_ERROR 104
#define MVR_MSG_REGISTER_SERVICE_ERROR 105
#define MVR_MSG_UNREGISTER_SERVICE_ERROR 106
#define MVR_MSG_READ_MVR_CONFIG_ERROR 107
#define MVR_MSG_INIT_MVR_STATE_ERROR 108
#define MVR_MSG_INIT_DEVDESC_ERROR 109
#define MVR_MSG_MVR_TCPPROC_EXIT_ERROR 110
#define MVR_MSG_NON_BOUNDARY_WRITE_ERROR 111
#define MVR_MSG_IGNORE_SIGNAL_ERROR 112
#define MVR_MSG_DEVICE_MD_READY_ERROR 113
#define MVR_MSG_DEVICE_MD_READ_ERROR 114
#define MVR_MSG_DEVICE_MD_WRITE_ERROR 115
#define MVR_MSG_PTHREAD_ATTR_INIT_ERROR 116
#define MVR_MSG_DEVICE_OPEN_READ_ERROR 117
#define MVR_MSG_DEVICE_OPEN_WRITE_ERROR 118
#define MVR_MSG_SOCKETCLOSECONN_ERROR 119
#define MVR_MSG_CLOSECLIENTCONN_ERROR 120
#define MVR_MSG_TAPE_MIDBLOCK_ERROR 121
#define MVR_MSG_DEVICE_CONTROL_ERROR 122
#define MVR_MSG_CHILD_EXIT_ERROR 123
#define MVR_MSG_INIT_CONNECTION_ERROR 124
#define MVR_MSG_DEV_TABLE_OVERFLOW_ERROR 125
#define MVR_MSG_PREREGISTER_SERVICE_ERROR 126
#define MVR_MSG_HSEC_INIT_ERROR 127
#define MVR_MSG_INIT_AUTHZ_VECTOR_ERROR 128
#define MVR_MSG_HSEC_ADD_AUTHZ_VECTOR_ERROR 129
#define MVR_MSG_HSEC_CALLER_AUTHZ_ERROR 130
#define MVR_MSG_CALLER_NOT_AUTHZ_ERROR 131
#define MVR_MSG_HSEC_AUDIT_ERROR 132
#define MVR_MSG_INIT_RPC_HANDLE_ERROR 133
#define MVR_MSG_FREE_RPC_HANDLE_ERROR 134
#define MVR_MSG_BAD_HOSTNAME_ERROR 135
#define MVR_MSG_MVR_UNSETTABLE_ATTR_ERROR 136
#define MVR_MSG_SRVR_UNSETTABLE_ATTR_ERROR 137
#define MVR_MSG_MVR_INVALID_ATTR_VALUE_ERROR 138
#define MVR_MSG_SRVR_INVALID_ATTR_VALUE_ERROR 139
#define MVR_MSG_DD2_GETLABEL_ERROR 140
#define MVR_MSG_COMPLETE_SHMEM_INIT_ERROR 141
#define MVR_MSG_3490_GETPOS_ERROR 142
#define MVR_MSG_3490_SETPOS_ERROR 143
#define MVR_MSG_3490_SYNC_ERROR 144
#define MVR_MSG_3490_DISPLAY_ERROR 145
#define MVR_MSG_3490_GETPARM_ERROR 146
#define MVR_MSG_3490_SETPARM_ERROR 147
#define MVR_MSG_HPSSTAPE_SYNC_ERROR 148
#define MVR_MSG_HPSSTAPE_DISPLAY_ERROR 149
#define MVR_MSG_PIOFS_OPEN_ERROR 150
#define MVR_MSG_PIOFS_CLOSE_ERROR 151
#define MVR_MSG_PIOFS_READ_ERROR 152
#define MVR_MSG_PIOFS_WRITE_ERROR 153
#define MVR_MSG_PIOFS_LSEEK_ERROR 154
#define MVR_MSG_DCEPROC_EXIT_ERROR 155
#define MVR_MSG_SIGEMPTYSET_ERROR 156
#define MVR_MSG_SIGADDSET_ERROR 157
#define MVR_MSG_SIGPROCMASK_ERROR 158
#define MVR_MSG_SIGSUSPEND_ERROR 159
#define MVR_MSG_SIGACTION_ERROR 160
#define MVR_MSG_AIO_CANCEL_ERROR 161
#define MVR_MSG_MALLOC_ERROR 162
#define MVR_MSG_SOCKET_ERROR 163
#define MVR_MSG_CONNECT_ERROR 164
#define MVR_MSG_SETSOCKOPT_ERROR 165
#define MVR_MSG_CLOSE_ERROR 166
#define MVR_MSG_IPI3_SLAVE_OPEN_ERROR 167
#define MVR_MSG_IPI3_SLAVE_CLOSE_ERROR 168
#define MVR_MSG_GETTIMEOFDAY_ERROR 169
#define MVR_MSG_SOCKET_READ_ERROR 170
#define MVR_MSG_SOCKET_WRITE_ERROR 171
#define MVR_MSG_SELECT_ERROR 172
#define MVR_MSG_ACCEPT_ERROR 173
#define MVR_MSG_LISTEN_ERROR 174
#define MVR_MSG_UNIXDOM_BIND_ERROR 175
#define MVR_MSG_SHMAT_ERROR 176
#define MVR_MSG_SHMDT_ERROR 177
#define MVR_MSG_SHMCTL_ERROR 178
#define MVR_MSG_SHMGET_ERROR 179
#define MVR_MSG_SEMCTL_ERROR 180
#define MVR_MSG_SEMOP_ERROR 181
#define MVR_MSG_SEMGET_ERROR 182
#define MVR_MSG_TRDCE_SRVRLISTEN_ERROR 183
#define MVR_MSG_PTHREAD_CREATE_ERROR 184
#define MVR_MSG_MUTEX_INIT_ERROR 185
#define MVR_MSG_MUTEX_LOCK_ERROR 186
#define MVR_MSG_MUTEX_UNLOCK_ERROR 187
#define MVR_MSG_COND_INIT_ERROR 188
#define MVR_MSG_COND_WAIT_ERROR 189
#define MVR_MSG_COND_SIGNAL_ERROR 190
#define MVR_MSG_SIGWAIT_ERROR 191
#define MVR_MSG_FORK_ERROR 192
#define MVR_MSG_EXEC_ERROR 193
#define MVR_MSG_KILL_ERROR 194
#define MVR_MSG_WAIT_ERROR 195
#define MVR_MSG_SETPGID_ERROR 196
#define MVR_MSG_LOCALTIME_ERROR 197
#define MVR_MSG_BUFFERSIZE_ERROR 198
#define MVR_MSG_PASSIVE_INIT_ERROR 199
#define MVR_MSG_PASSIVE_WAIT_ERROR 200
#define MVR_MSG_PASSIVE_REPLY_ERROR 201
#define MVR_MSG_PASSIVE_SENDCOMP_ERROR 202
#define MVR_MSG_ACTIVE_HANDSHAKE_ERROR 203
#define MVR_MSG_ACTIVE_SENDCOMP_ERROR 204
#define MVR_MSG_DEV_OPEN_ERROR 205
#define MVR_MSG_DEV_READ_ERROR 206
#define MVR_MSG_DEV_WRITE_ERROR 207
#define MVR_MSG_DEV_WAIT_IO_ERROR 208
#define MVR_MSG_DEV_GET_ABSPOS_ERROR 209
#define MVR_MSG_DEV_POSITION_ERROR 210

<略>

#define MVR_MSG_MVRSOCK_SEND_REQ_ERROR 275
#define MVR_MSG_MVRSOCK_RECV_ERROR 276
#define MVR_MSG_IPI3_SLAVE_WAIT_ERROR 277
#define MVR_MSG_PASSIVE_DESC_BUSY_ERROR 278
#define MVR_MSG_MVR_SOCKOPT_ERROR 279
#define MVR_MSG_MVR_SOCKINIT_ERROR 280
#define MVR_MSG_NOT_CTLADDR_ERROR 281
#define MVR_MSG_PROT_PASS_LENGTH_ERROR 282
#define MVR_MSG_WRITE_SELECT_ERROR 283
#define MVR_MSG_READ_SELECT_ERROR 284
#define MVR_MSG_SELECT_ALL_ERROR 285
#define MVR_MSG_PROCESS_ABORT_ERROR 286
#define MVR_MSG_INIT_SERVER_ERROR 287
#define MVR_MSG_BAD_VOL_TYPE_ERROR 288
#define MVR_MSG_UT_BLKNUM_ERROR 289
#define MVR_MSG_VALIDATE_CTX_ERROR 290
#define MVR_MSG_DEVICE_TYPE_ERROR 291
#define MVR_MSG_PROT_RECV_SHMADDR_ERROR 292
#define MVR_MSG_PROT_SEND_SHMADDR_ERROR 293
#define MVR_MSG_PASSIVE_RECVCOMP_ERROR 294
#define MVR_MSG_ACTIVE_RECVCOMP_ERROR 295
#define MVR_MSG_SSM_FIND_SERVICE_ERROR 296
#define MVR_MSG_SSM_OPEN_CONN_ERROR 297
#define MVR_MSG_SHM_BOUNDS_ERROR 298
#define MVR_MSG_TRANIOD_INIT_ERROR 299
#define MVR_MSG_INVAL_DEVID_ERROR 300
#define MVR_MSG_INVAL_DEVTYPE_ERROR 301
#define MVR_MSG_INVAL_MEDIABS_ERROR 302
#define MVR_MSG_INVAL_DEVFLAGS_ERROR 303
#define MVR_MSG_UUID_MISMATCH_ERROR 304
#define MVR_MSG_MM_CREATE_DEVICE_ERROR 305
#define MVR_MSG_MM_DELETE_DEVICE_ERROR 306
#define MVR_MSG_SELECT_TIMEOUT_ERROR 307
#define MVR_MSG_DD2_MISMATCH_ERROR 308
#define MVR_MSG_ABSADDR_MISMATCH_ERROR 309
#define MVR_MSG_INIT_PORT_RANGE_ERROR 310
#define MVR_MSG_BAD_PORT_RANGE_ERROR 311
#define MVR_MSG_PORT_RANGE_END_ERROR 312
#define MVR_MSG_BUFFER_OVERRUN_ERROR 313
#define MVR_MSG_MVR_READ_FAIL_ERROR 314
#define MVR_MSG_MVR_WRITE_FAIL_ERROR 315
#define MVR_MSG_PROT_PASS_TYPE_ERROR 316
#define MVR_MSG_START_OFFSET_ERROR 317
#define MVR_MSG_DEV_SHARED_USE_ERROR 318
#define MVR_MSG_SYSCONF_ERROR 319
#define MVR_MSG_SEND_NOTIFY_TO_TCP_ERROR 320
#define MVR_MSG_TCP_DEV_GETATTRS_ERROR 321
#define MVR_MSG_TCP_DEV_SETATTRS_ERROR 322
#define MVR_MSG_TCP_DEV_CREATE_ERROR 323
#define MVR_MSG_TCP_DEV_DELETE_ERROR 324
#define MVR_MSG_TCP_MVR_GETATTRS_ERROR 325
#define MVR_MSG_TCP_MVR_SETATTRS_ERROR 326
#define MVR_MSG_TCP_SRVR_GETATTRS_ERROR 327
#define MVR_MSG_TCP_SRVR_SETATTRS_ERROR 328
#define MVR_MSG_SEND_NOTIFY_INFO_ERROR 329
#define MVR_MSG_RECV_NOTIFY_INFO_ERROR 330
#define MVR_MSG_SSCANF_ERROR 331
#define MVR_MSG_TRANIOD_SERVER_INIT_ERROR 332
#define MVR_MSG_TRANIOD_EST_CTXT_ERROR 333
#define MVR_MSG_GET_LOGPOLICY_ERROR 334
#define MVR_MSG_SEND_LOGINFO_ERROR 335
#define MVR_MSG_MM_READ_ALL_SERVERCFG_ERROR 336
#define MVR_MSG_CREATE_LISTENPORT_ERROR 337
#define MVR_MSG_HPSS_SEND_DATA_ERROR 338
#define MVR_MSG_HPSS_RECV_DATA_ERROR 339
#define MVR_MSG_INVAL_NOTIFY_CLASS_ERROR 340
#define MVR_MSG_CONVERT_STRING_TO_IPADDR_ERROR 341
#define MVR_MSG_SEND_SHMEM_INFO_ERROR 342
#define MVR_MSG_INVAL_TCP_PORT_ERROR 343
#define MVR_MSG_RECV_LOGINFO_ERROR 344
#define MVR_MSG_DST_SET_BLOCKSIZE_ERROR 345
#define MVR_MSG_DST_GET_BLOCKSIZE_ERROR 346
#define MVR_MSG_DST_GET_POSITION_ERROR 347
#define MVR_MSG_DST_VALID_BITS_ERROR 348
#define MVR_MSG_DST_SET_POSITION_ERROR 349
#define MVR_MSG_DST_GET_LABEL_ERROR 350
#define MVR_MSG_DST_LABEL_VALID_ERROR 351
#define MVR_MSG_DST_UNLOAD_ERROR 352
#define MVR_MSG_SHARED_TAPE_ERROR 353
#define MVR_MSG_DST_OPEN_INIT_ERROR 354
#define MVR_MSG_DST_SETNOFLUSH_ERROR 355
#define MVR_MSG_DST_STATUS_ERROR 356
#define MVR_MSG_DST_RESULT_INFO 357
#define MVR_MSG_DST_GET_BUFDATA_ERROR 358
#define MVR_MSG_DST_GET_STATE_ERROR 359
#define MVR_MSG_ASYNC_INIT_ERROR 360
#define MVR_MSG_LABEL_OVERWRITE_ERROR 361
#define MVR_MSG_PRE_LABEL_WRITE_ERROR 362
#define MVR_MSG_LABEL_READFORIO_ERROR 363
#define MVR_MSG_PRE_LABEL_READ_ERROR 364
#define MVR_MSG_EST_CTXT_STALE_ERROR 365
#define MVR_MSG_EST_CTXT_ACCES_ERROR 366
#define MVR_MSG_ZERO_TPPOS_BS_ERROR 367
#define MVR_MSG_DEVICE_DISABLED_ERROR 368
#define MVR_MSG_PT_SET_DETACHSTATE_ERROR 369
#define MVR_MSG_LFT_NOT_SUPPORTED_ERROR 370
#define MVR_MSG_LFT_OPEN_ERROR 371
#define MVR_MSG_LFT_CLOSE_ERROR 372
#define MVR_MSG_LFT_READ_ERROR 373
#define MVR_MSG_LFT_WRITE_ERROR 374
#define MVR_MSG_LFT_LSEEK_ERROR 375
#define MVR_MSG_LFT_NOUNIXFILE_ERROR 376
#define MVR_MSG_LFT_BADUNIXFILE_ERROR 377
#define MVR_MSG_LFT_UNIXFILEFORMAT_ERROR 378
#define MVR_MSG_LFT_NOUNIXFILEPATH_ERROR 379
#define MVR_MSG_SEND_REQTABLE_ERROR 380
#define MVR_MSG_RECV_REQTABLE_ERROR 381
#define MVR_MSG_RPC_SS_ALLOC_ERROR 382
#define MVR_MSG_RTM_PREINIT_ERROR 383
#define MVR_MSG_RTM_INIT_ERROR 384
#define MVR_MSG_RTM_SHUTDOWN_ERROR 385

<略>

#define MVR_MSG_EXIT_WRITELABEL_REQ 1035
#define MVR_MSG_EXIT_READ_REQ 1036
#define MVR_MSG_EXIT_WRITE_REQ 1037
#define MVR_MSG_DEVSPEC_CLEAR_REQUEST 1038
#define MVR_MSG_EXIT_CLEAR_REQ 1039
#define MVR_MSG_ABORT_REQUEST 1040
#define MVR_MSG_CREATEDEV_REQUEST 1041
#define MVR_MSG_EXIT_CREATEDEV_REQ 1042
#define MVR_MSG_DELETEDEV_REQUEST 1043
#define MVR_MSG_EXIT_DELETEDEV_REQ 1044
#define MVR_MSG_ISSUE_LOCATE_TRACE 1045
#define MVR_MSG_ISSUE_REWIND_TRACE 1046
#define MVR_MSG_ACCEPT_CTX_TRACE 1047
#define MVR_MSG_TAPE_POSITION_TRACE 1048

#define MVR_MSG_EOM_EVENT 2001
#define MVR_MSG_TERMINATING_EVENT 2002
#define MVR_MSG_REINITIALIZING_EVENT 2003
#define MVR_MSG_EXCEPTION_EVENT 2004
#define MVR_MSG_SIGNAL_RECV_EVENT 2005
#define MVR_MSG_INITIALIZED_EVENT 2006
#define MVR_MSG_DISABLING_DEVICE_EVENT 2007

<略>

#ifndef mvr_log_h
#define mvr_log_h

#include <nl_types.h>
#include <cs_Log.h>
#include <string.h>

#define SERVER_CLASS CS_LOG_MSG_CLASS_SERVER
#define MOVER_CLASS CS_LOG_MSG_CLASS_MOVER
#define DEVICE_CLASS CS_LOG_MSG_CLASS_DEVICE
#define SECURITY_CLASS CS_LOG_MSG_CLASS_INFRA

#define MAX_MSG_LENGTH 256

#define MVR_MSGCAT_SETNUMBER CS_LOG_MSGCAT_SETNUMBER_MVR

#define MVR_MSG_BASE 1
#define MVR_REQUEST_BASE 1001
#define MVR_EVENT_BASE 2001

#define MVR_MSG_AIO_READ_ERROR 1
#define MVR_MSG_AIO_WRITE_ERROR 2
#define MVR_MSG_DEVICEID_RANGE_ERROR 3
#define MVR_MSG_DEVICE_CONFIG_ERROR 4
#define MVR_MSG_INVALID_SELECTIONFLAGS_ERROR 5
#define MVR_MSG_DEV_UNSETTABLE_ATTR_ERROR 6
#define MVR_MSG_DEV_INVALID_ATTR_VALUE_ERROR 7
#define MVR_MSG_BAD_REQUEST_INFO_TYPE_ERROR 8
#define MVR_MSG_BAD_DEVSPEC_SUBTYPE_ERROR 9
#define MVR_MSG_DEVICE_NOTREADY_ERROR 10
#define MVR_MSG_IO_READ_ERROR 11
#define MVR_MSG_IO_WRITE_ERROR 12
#define MVR_MSG_TAPE_WRITE_POSITION_ERROR 13
#define MVR_MSG_TAPE_READ_POSITION_ERROR 14
#define MVR_MSG_ABS_ADDR_SUPPORT_ERROR 15
#define MVR_MSG_DEVFILE_OPEN_ERROR 16
#define MVR_MSG_TAPE_REWIND_ERROR 17
#define MVR_MSG_TAPE_READLABEL_ERROR 18
#define MVR_MSG_TAPE_VERIFYLABEL_ERROR 19
#define MVR_MSG_TAPE_UNLOAD_ERROR 20
#define MVR_MSG_TAPE_FSF_ERROR 21
#define MVR_MSG_TAPE_RSF_ERROR 22
#define MVR_MSG_TAPE_READHEADER_ERROR 23
#define MVR_MSG_TAPE_FSR_ERROR 24
#define MVR_MSG_TAPE_WRITELABEL_ERROR 25
#define MVR_MSG_TAPE_WRITEHEADER_ERROR 26
#define MVR_MSG_TAPE_WEOF_ERROR 27
#define MVR_MSG_GET_EXPIR_ERROR 28
#define MVR_MSG_DD2_SET_BLOCKSIZE_ERROR 29
#define MVR_MSG_DD2_GET_POSITION_ERROR 30
#define MVR_MSG_DD2_SET_POSITION_ERROR 31
#define MVR_MSG_HPSSTAPE_GET_ABSPOS_ERROR 32
#define MVR_MSG_IPI3_SLAVE_ASYNC_IO_ERROR 33
#define MVR_MSG_IPI3_NOT_SUPPORTED_ERROR 34
#define MVR_MSG_HPSSDISK_SYNC_ERROR 35
#define MVR_MSG_RZ_SYNC_ERROR 36
#define MVR_MSG_BAD_REPLY_LIST_ERROR 37
#define MVR_MSG_BAD_REQSPECREPLY_ERROR 38
#define MVR_MSG_BAD_IOD_FUNCTION_ERROR 39
#define MVR_MSG_BAD_SHMID_ERROR 40
#define MVR_MSG_BIND_ERROR 41
#define MVR_MSG_NO_REQ_SLOT_ERROR 42
#define MVR_MSG_RECV_IOD_ERROR 43
#define MVR_MSG_SEND_IOR_ERROR 44
#define MVR_MSG_ALLOC_IOR_ERROR 45
#define MVR_MSG_BAD_REQ_SLOT_ERROR 46
#define MVR_MSG_BAD_IP_PORT_ERROR 47
#define MVR_MSG_SRCSINK_MISMATCH_ERROR 48
#define MVR_MSG_BAD_STRIPE_ADDR_ERROR 49
#define MVR_MSG_BAD_ADDR_TYPE_ERROR 50
#define MVR_MSG_BAD_SRCSINK_LIST_LEN_ERROR 51
#define MVR_MSG_ZERO_SRCSINK_LEN_ERROR 52
#define MVR_MSG_DEV_STRIPE_LIST_LEN_ERROR 53
#define MVR_MSG_STRIPE_PARM_RANGE_ERROR 54
#define MVR_MSG_END_OF_SRCSINK_LIST_ERROR 55
#define MVR_MSG_IOD_VERIFY_ERROR 56
#define MVR_MSG_OBTAIN_DEVICE_ERROR 57
#define MVR_MSG_HPSSTAPE_OPEN_ERROR 58
#define MVR_MSG_HPSSTAPE_CLOSE_ERROR 59
#define MVR_MSG_HPSSTAPE_POSITION_ERROR 60
#define MVR_MSG_HPSSTAPE_READ_ERROR 61
#define MVR_MSG_HPSSTAPE_WRITE_ERROR 62
#define MVR_MSG_NEXT_OFFS_ERROR 63
#define MVR_MSG_GET_CLIENT_ADDR_ERROR 64
#define MVR_MSG_SEND_CLIENT_DATA_ERROR 65
#define MVR_MSG_RECV_CLIENT_DATA_ERROR 66
#define MVR_MSG_MM_INITIALIZE_ERROR 67
#define MVR_MSG_DEV_IO_LENGTH_ERROR 68
#define MVR_MSG_BLOCKSIZE_MISMATCH_ERROR 69
#define MVR_MSG_HPSSTAPE_BEGIN_SECTION_ERROR 70
#define MVR_MSG_HPSSTAPE_END_SECTION_ERROR 71
#define MVR_MSG_RZ_GET_BLK_SZ_ERROR 72
#define MVR_MSG_GET_TRANS_DESC_ERROR 73
#define MVR_MSG_SEND_BUFFER_ERROR 74
#define MVR_MSG_PUSH_INIT_ERROR 75
#define MVR_MSG_OPEN_CONN_ERROR 76
#define MVR_MSG_SOCK_OPEN_ERROR 77
#define MVR_MSG_BLOCK_SIGNAL_ERROR 78
#define MVR_MSG_UNBLOCK_SIGNAL_ERROR 79
#define MVR_MSG_NULL_REQSPECINFO_ERROR 80
#define MVR_MSG_BAD_REQSPECINFO_TYPE_ERROR 81
#define MVR_MSG_HPSSTAPE_RDLBL_ERROR 82
#define MVR_MSG_BAD_SECTION_ERROR 83
#define MVR_MSG_BAD_BLOCKSIZE_ERROR 84
#define MVR_MSG_HPSSTAPE_VOL1_BUILD_ERROR 85
#define MVR_MSG_HPSSTAPE_HDR1_BUILD_ERROR 86
#define MVR_MSG_HPSSTAPE_HDR2_BUILD_ERROR 87
#define MVR_MSG_HPSSTAPE_INIT_ERROR 88
#define MVR_MSG_ASYNC_READ_ERROR 89
#define MVR_MSG_ASYNC_WRITE_ERROR 90
#define MVR_MSG_SERVER_NOTIFY_ERROR 91
#define MVR_MSG_MOVER_NOTIFY_ERROR 92
#define MVR_MSG_DEVICE_NOTIFY_ERROR 93
#define MVR_MSG_SEND_NOTIFY_REQ_ERROR 94
#define MVR_MSG_END_OF_STRIPE_LIST_ERROR 95
#define MVR_MSG_VOLUMEID_MISMATCH_ERROR 96
#define MVR_MSG_BAD_BLOCKSPERFILE_ERROR 97
#define MVR_MSG_MM_SELECT_SRVR_TYPE_ERROR 98
#define MVR_MSG_MM_READ_LOG_POLICY_ERROR 99
#define MVR_MSG_MM_READ_LOGC_CFG_ERROR 100
#define MVR_MSG_MM_READ_MVR_DEVICE_ERROR 101
#define MVR_MSG_MM_SELECT_MVR_DEVICE_ERROR 102
#define MVR_MSG_SRCSINK_LIST_LENGTH_ERROR 103
#define MVR_MSG_STRIPE_LIST_LENGTH_ERROR 104
#define MVR_MSG_RZ_SET_BLK_SZ_ERROR 105
#define MVR_MSG_SAN3P_WAIT_IO_ERROR 106
#define MVR_MSG_READ_MVR_CONFIG_ERROR 107
#define MVR_MSG_INIT_MVR_STATE_ERROR 108
#define MVR_MSG_INIT_DEVDESC_ERROR 109
#define MVR_MSG_MVR_TCPPROC_EXIT_ERROR 110
#define MVR_MSG_NON_BOUNDARY_WRITE_ERROR 111
#define MVR_MSG_IGNORE_SIGNAL_ERROR 112
#define MVR_MSG_DEVICE_MD_READY_ERROR 113
#define MVR_MSG_DEVICE_MD_READ_ERROR 114
#define MVR_MSG_DEVICE_MD_WRITE_ERROR 115
#define MVR_MSG_PTHREAD_ATTR_INIT_ERROR 116
#define MVR_MSG_DEVICE_OPEN_READ_ERROR 117
#define MVR_MSG_DEVICE_OPEN_WRITE_ERROR 118
#define MVR_MSG_SOCKETCLOSECONN_ERROR 119
#define MVR_MSG_CLOSECLIENTCONN_ERROR 120
#define MVR_MSG_TAPE_MIDBLOCK_ERROR 121
#define MVR_MSG_DEVICE_CONTROL_ERROR 122
#define MVR_MSG_CHILD_EXIT_ERROR 123
#define MVR_MSG_PROT_SEND_SAN3PADDR_ERROR 124
#define MVR_MSG_DEV_TABLE_OVERFLOW_ERROR 125
#define MVR_MSG_MM_CREATE_HANDLE_ERROR 126
#define MVR_MSG_PROT_RECV_SAN3PADDR_ERROR 127
#define MVR_MSG_NOTUSED_128 128
#define MVR_MSG_SAN3P_CFGOPEN_ERROR 129
#define MVR_MSG_SEC_CALLER_AUTHZ_ERROR 130
#define MVR_MSG_CALLER_NOT_AUTHZ_ERROR 131
#define MVR_MSG_SAN3P_CFG_PARSE_ERROR 132
#define MVR_MSG_SAN3P_CFG_HOST_LOOKUP_ERROR 133
#define MVR_MSG_SAN3P_MISSING_DEV_ERROR 134
#define MVR_MSG_BAD_HOSTNAME_ERROR 135
#define MVR_MSG_MVR_UNSETTABLE_ATTR_ERROR 136
#define MVR_MSG_SRVR_UNSETTABLE_ATTR_ERROR 137
#define MVR_MSG_MVR_INVALID_ATTR_VALUE_ERROR 138
#define MVR_MSG_SRVR_INVALID_ATTR_VALUE_ERROR 139
#define MVR_MSG_DD2_GETLABEL_ERROR 140
#define MVR_MSG_COMPLETE_SHMEM_INIT_ERROR 141
#define MVR_MSG_3490_GETPOS_ERROR 142
#define MVR_MSG_3490_SETPOS_ERROR 143
#define MVR_MSG_3490_SYNC_ERROR 144
#define MVR_MSG_3490_DISPLAY_ERROR 145
#define MVR_MSG_RECV_PDATA_HEADER_ERROR 146
#define MVR_MSG_PUSH_LIST_ERROR 147
#define MVR_MSG_HPSSTAPE_SYNC_ERROR 148
#define MVR_MSG_HPSSTAPE_DISPLAY_ERROR 149
#define MVR_MSG_SAN3P_BAD_ADDR_ERROR 150
#define MVR_MSG_SAN3P_SET_POS_ERROR 151
#define MVR_MSG_SAN3P_DEV_OPEN_ERROR 152
#define MVR_MSG_SAN3P_BAD_LABEL 153
#define MVR_MSG_SAN3P_IO_ERROR 154
#define MVR_MSG_ADMINPROC_EXIT_ERROR 155
#define MVR_MSG_SIGEMPTYSET_ERROR 156
#define MVR_MSG_SIGADDSET_ERROR 157
#define MVR_MSG_SIGPROCMASK_ERROR 158
#define MVR_MSG_SIGSUSPEND_ERROR 159
#define MVR_MSG_SIGACTION_ERROR 160
#define MVR_MSG_AIO_CANCEL_ERROR 161
#define MVR_MSG_MALLOC_ERROR 162
#define MVR_MSG_SOCKET_ERROR 163
#define MVR_MSG_CONNECT_ERROR 164
#define MVR_MSG_SETSOCKOPT_ERROR 165
#define MVR_MSG_CLOSE_ERROR 166
#define MVR_MSG_IPI3_SLAVE_OPEN_ERROR 167
#define MVR_MSG_IPI3_SLAVE_CLOSE_ERROR 168
#define MVR_MSG_GETTIMEOFDAY_ERROR 169
#define MVR_MSG_PUSH_AND_MVRPROT_ERROR 170
#define MVR_MSG_PUSH_INVALID_ERROR 171
#define MVR_MSG_SELECT_ERROR 172
#define MVR_MSG_ACCEPT_ERROR 173
#define MVR_MSG_LISTEN_ERROR 174
#define MVR_MSG_UNIXDOM_BIND_ERROR 175
#define MVR_MSG_SHMAT_ERROR 176
#define MVR_MSG_SHMDT_ERROR 177
#define MVR_MSG_SHMCTL_ERROR 178
#define MVR_MSG_SHMGET_ERROR 179
#define MVR_MSG_SEMCTL_ERROR 180
#define MVR_MSG_SEMOP_ERROR 181
#define MVR_MSG_SEMGET_ERROR 182
#define MVR_MSG_SAN3P_SEND_INITMSG_ERROR 183
#define MVR_MSG_PTHREAD_CREATE_ERROR 184
#define MVR_MSG_MUTEX_INIT_ERROR 185
#define MVR_MSG_MUTEX_LOCK_ERROR 186
#define MVR_MSG_MUTEX_UNLOCK_ERROR 187
#define MVR_MSG_COND_INIT_ERROR 188
#define MVR_MSG_COND_WAIT_ERROR 189
#define MVR_MSG_COND_SIGNAL_ERROR 190
#define MVR_MSG_SIGWAIT_ERROR 191
#define MVR_MSG_FORK_ERROR 192
#define MVR_MSG_EXEC_ERROR 193
#define MVR_MSG_KILL_ERROR 194
#define MVR_MSG_WAIT_ERROR 195
#define MVR_MSG_SETPGID_ERROR 196
#define MVR_MSG_LOCALTIME_ERROR 197
#define MVR_MSG_BUFFERSIZE_ERROR 198
#define MVR_MSG_PASSIVE_INIT_ERROR 199
#define MVR_MSG_PASSIVE_WAIT_ERROR 200
#define MVR_MSG_PASSIVE_REPLY_ERROR 201
#define MVR_MSG_PASSIVE_SENDCOMP_ERROR 202
#define MVR_MSG_ACTIVE_HANDSHAKE_ERROR 203
#define MVR_MSG_ACTIVE_SENDCOMP_ERROR 204
#define MVR_MSG_DEV_OPEN_ERROR 205
#define MVR_MSG_DEV_READ_ERROR 206
#define MVR_MSG_DEV_WRITE_ERROR 207
#define MVR_MSG_DEV_WAIT_IO_ERROR 208
#define MVR_MSG_SAN3P_RECV_INITMSG_ERROR 209
#define MVR_MSG_DEV_POSITION_ERROR 210

<略>

#define MVR_MSG_MVRSOCK_SEND_REQ_ERROR 275
#define MVR_MSG_MVRSOCK_RECV_ERROR 276
#define MVR_MSG_IPI3_SLAVE_WAIT_ERROR 277
#define MVR_MSG_SAN3P_CANCEL_ERROR 278
#define MVR_MSG_MVR_SOCKOPT_ERROR 279
#define MVR_MSG_MVR_SOCKINIT_ERROR 280
#define MVR_MSG_NOT_CTLADDR_ERROR 281
#define MVR_MSG_PROT_PASS_LENGTH_ERROR 282
#define MVR_MSG_WRITE_SELECT_ERROR 283
#define MVR_MSG_READ_SELECT_ERROR 284
#define MVR_MSG_SELECT_ALL_ERROR 285
#define MVR_MSG_MM_TRANSACTION_ERROR 286
#define MVR_MSG_INIT_SERVER_ERROR 287
#define MVR_MSG_BAD_VOL_TYPE_ERROR 288
#define MVR_MSG_UT_BLKNUM_ERROR 289
#define MVR_MSG_VALIDATE_CTX_ERROR 290
#define MVR_MSG_DEVICE_TYPE_ERROR 291
#define MVR_MSG_PROT_RECV_SHMADDR_ERROR 292
#define MVR_MSG_PROT_SEND_SHMADDR_ERROR 293
#define MVR_MSG_PASSIVE_RECVCOMP_ERROR 294
#define MVR_MSG_ACTIVE_RECVCOMP_ERROR 295
#define MVR_MSG_SAN3P_SEND_DEVADDR_ERROR 296
#define MVR_MSG_SAN3P_RECV_DEVADDR_ERROR 297
#define MVR_MSG_SHM_BOUNDS_ERROR 298
#define MVR_MSG_NOTUSED_299 299
#define MVR_MSG_INVAL_DEVID_ERROR 300
#define MVR_MSG_INVAL_DEVTYPE_ERROR 301
#define MVR_MSG_INVAL_MEDIABS_ERROR 302
#define MVR_MSG_INVAL_DEVFLAGS_ERROR 303
#define MVR_MSG_UUID_MISMATCH_ERROR 304
#define MVR_MSG_MM_CREATE_DEVICE_ERROR 305
#define MVR_MSG_MM_DELETE_DEVICE_ERROR 306
#define MVR_MSG_SELECT_TIMEOUT_ERROR 307
#define MVR_MSG_DD2_MISMATCH_ERROR 308
#define MVR_MSG_SAN3P_RECV_COMP_ERROR 309
#define MVR_MSG_SAN3P_SEND_COMP_ERROR 310
#define MVR_MSG_BAD_PORT_RANGE_ERROR 311
#define MVR_MSG_PORT_RANGE_END_ERROR 312
#define MVR_MSG_BUFFER_OVERRUN_ERROR 313
#define MVR_MSG_MVR_READ_FAIL_ERROR 314
#define MVR_MSG_MVR_WRITE_FAIL_ERROR 315
#define MVR_MSG_PROT_PASS_TYPE_ERROR 316
#define MVR_MSG_START_OFFSET_ERROR 317
#define MVR_MSG_DEV_SHARED_USE_ERROR 318
#define MVR_MSG_SYSCONF_ERROR 319
#define MVR_MSG_SEND_NOTIFY_TO_TCP_ERROR 320
#define MVR_MSG_TCP_DEV_GETATTRS_ERROR 321
#define MVR_MSG_TCP_DEV_SETATTRS_ERROR 322
#define MVR_MSG_TCP_DEV_CREATE_ERROR 323
#define MVR_MSG_TCP_DEV_DELETE_ERROR 324
#define MVR_MSG_TCP_MVR_GETATTRS_ERROR 325
#define MVR_MSG_TCP_MVR_SETATTRS_ERROR 326
#define MVR_MSG_TCP_SRVR_GETATTRS_ERROR 327
#define MVR_MSG_TCP_SRVR_SETATTRS_ERROR 328
#define MVR_MSG_SEND_NOTIFY_INFO_ERROR 329
#define MVR_MSG_RECV_NOTIFY_INFO_ERROR 330
#define MVR_MSG_SSCANF_ERROR 331
#define MVR_MSG_TRANIOD_INIT_ERROR 332
#define MVR_MSG_TRANIOD_EST_CTXT_ERROR 333
#define MVR_MSG_GET_LOGPOLICY_ERROR 334
#define MVR_MSG_SEND_LOGINFO_ERROR 335
#define MVR_MSG_NOTUSED_336 336
#define MVR_MSG_CREATE_LISTENPORT_ERROR 337
#define MVR_MSG_HPSS_SEND_DATA_ERROR 338
#define MVR_MSG_HPSS_RECV_DATA_ERROR 339
#define MVR_MSG_INVAL_NOTIFY_CLASS_ERROR 340
#define MVR_MSG_CONVERT_STRING_TO_IPADDR_ERROR 341
#define MVR_MSG_SEND_SHMEM_INFO_ERROR 342
#define MVR_MSG_INVAL_TCP_PORT_ERROR 343
#define MVR_MSG_RECV_LOGINFO_ERROR 344
#define MVR_MSG_DST_SET_BLOCKSIZE_ERROR 345
#define MVR_MSG_DST_GET_BLOCKSIZE_ERROR 346
#define MVR_MSG_DST_GET_POSITION_ERROR 347
#define MVR_MSG_DST_VALID_BITS_ERROR 348
#define MVR_MSG_DST_SET_POSITION_ERROR 349
#define MVR_MSG_DST_GET_LABEL_ERROR 350
#define MVR_MSG_NOTUSED_351 351
#define MVR_MSG_DST_UNLOAD_ERROR 352
#define MVR_MSG_SHARED_TAPE_ERROR 353
#define MVR_MSG_DST_OPEN_INIT_ERROR 354
#define MVR_MSG_DST_SETNOFLUSH_ERROR 355
#define MVR_MSG_DST_STATUS_ERROR 356
#define MVR_MSG_DST_RESULT_INFO 357
#define MVR_MSG_DST_GET_BUFDATA_ERROR 358
#define MVR_MSG_NOTUSED_359 359
#define MVR_MSG_ASYNC_INIT_ERROR 360
#define MVR_MSG_LABEL_OVERWRITE_ERROR 361
#define MVR_MSG_PRE_LABEL_WRITE_ERROR 362
#define MVR_MSG_LABEL_READFORIO_ERROR 363
#define MVR_MSG_PRE_LABEL_READ_ERROR 364
#define MVR_MSG_EST_CTXT_STALE_ERROR 365
#define MVR_MSG_EST_CTXT_ACCES_ERROR 366
#define MVR_MSG_ZERO_TPPOS_BS_ERROR 367
#define MVR_MSG_DEVICE_DISABLED_ERROR 368
#define MVR_MSG_PT_SET_DETACHSTATE_ERROR 369
#define MVR_MSG_LFT_NOT_SUPPORTED_ERROR 370
#define MVR_MSG_LFT_OPEN_ERROR 371
#define MVR_MSG_LFT_CLOSE_ERROR 372
#define MVR_MSG_LFT_READ_ERROR 373
#define MVR_MSG_LFT_WRITE_ERROR 374
#define MVR_MSG_LFT_LSEEK_ERROR 375
#define MVR_MSG_LFT_NOUNIXFILE_ERROR 376
#define MVR_MSG_LFT_BADUNIXFILE_ERROR 377
#define MVR_MSG_LFT_UNIXFILEFORMAT_ERROR 378
#define MVR_MSG_LFT_NOUNIXFILEPATH_ERROR 379
#define MVR_MSG_SEND_REQTABLE_ERROR 380
#define MVR_MSG_RECV_REQTABLE_ERROR 381
#define MVR_MSG_SAN3P_INIT_RECV_ERROR 382
#define MVR_MSG_SAN3P_INIT_SEND_ERROR 383
#define MVR_MSG_RTM_INIT_ERROR 384
#define MVR_MSG_RTM_SHUTDOWN_ERROR 385

<略>

#define MVR_MSG_EXIT_WRITELABEL_REQ 1035
#define MVR_MSG_EXIT_READ_REQ 1036
#define MVR_MSG_EXIT_WRITE_REQ 1037
#define MVR_MSG_DEVSPEC_CLEAR_REQUEST 1038
#define MVR_MSG_EXIT_CLEAR_REQ 1039
#define MVR_MSG_NOTUSED_1040 1040
#define MVR_MSG_CREATEDEV_REQUEST 1041
#define MVR_MSG_EXIT_CREATEDEV_REQ 1042
#define MVR_MSG_DELETEDEV_REQUEST 1043
#define MVR_MSG_EXIT_DELETEDEV_REQ 1044
#define MVR_MSG_ISSUE_LOCATE_TRACE 1045
#define MVR_MSG_ISSUE_REWIND_TRACE 1046
#define MVR_MSG_ACCEPT_CTX_TRACE 1047
#define MVR_MSG_TAPE_POSITION_TRACE 1048

#define MVR_MSG_EOM_EVENT 2001
#define MVR_MSG_TERMINATING_EVENT 2002
#define MVR_MSG_REINITIALIZING_EVENT 2003
#define MVR_MSG_NOTUSED_2004 2004
#define MVR_MSG_SIGNAL_RECV_EVENT 2005
#define MVR_MSG_INITIALIZED_EVENT 2006
#define MVR_MSG_DISABLING_DEVICE_EVENT 2007

<略>


mvr_misc.h

HPSS4.5

HPSS6.2

#ifndef mvr_misc_h
#define mvr_misc_h

#include <signal.h>
#include <sys/select.h>
#include <unistd.h>

#include "mvr_shmem.h"

#define MVR_SOCKOPT_RECVBUF (0x00000001)
#define MVR_SOCKOPT_SENDBUF (0x00000002)
#define MVR_SOCKOPT_REUSEADDR (0x00000004)
#define MVR_SOCKOPT_KEEPALIVE (0x00000008)
#define MVR_SOCKOPT_TCPNODELAY (0x00000010)
#define MVR_SOCKOPT_FIONBIO (0x00000020)
#define MVR_SOCKOPT_RFC1323 (0x00000040)

#define MVR_SOCKOPT_PERFOPTS (MVR_SOCKOPT_RECVBUF | \
MVR_SOCKOPT_SENDBUF | \
MVR_SOCKOPT_RFC1323)

#define MVR_SOCK_LISTEN (1)
#define MVR_SOCK_CONNECT (2)

#define MVR_PORT_REPLY_SIZE (4)

#define MVR_CLIENT_TIMEOUT (15 * 60) /* client timeout */
#define MVR_COMP_TIMEOUT (15 * 60) /* completion timeout */
#define MVR_PASSIVE_TIMEOUT (6 * 60 * 60) /* timeout on passive wait */










<略>

#ifndef mvr_misc_h
#define mvr_misc_h

#include <signal.h>
#include <sys/select.h>
#include <unistd.h>

#include "mvr_shmem.h"

#define MVR_SOCKOPT_RECVBUF (0x00000001)
#define MVR_SOCKOPT_SENDBUF (0x00000002)
#define MVR_SOCKOPT_REUSEADDR (0x00000004)
#define MVR_SOCKOPT_KEEPALIVE (0x00000008)
#define MVR_SOCKOPT_TCPNODELAY (0x00000010)
#define MVR_SOCKOPT_FIONBIO (0x00000020)
#define MVR_SOCKOPT_RFC1323 (0x00000040)

#define MVR_SOCKOPT_PERFOPTS (MVR_SOCKOPT_RECVBUF | \
MVR_SOCKOPT_SENDBUF | \
MVR_SOCKOPT_RFC1323)

#define MVR_SOCK_LISTEN (1)
#define MVR_SOCK_CONNECT (2)

#define MVR_PORT_REPLY_SIZE (4)

#define MVR_CLIENT_TIMEOUT (15 * 60) /* client timeout */
#define MVR_COMP_TIMEOUT (15 * 60) /* completion timeout */
#define MVR_PASSIVE_TIMEOUT (6 * 60 * 60) /* timeout on passive wait */

#if !defined(LINUX_THREADS)
#define MVR_SIG_SHUTDOWN SIGUSR1
#define MVR_SIG_HALT SIGUSR2
#else

#define MVR_SIG_SHUTDOWN (35) /* SIGRTMIN+3 */
#define MVR_SIG_HALT (36) /* SIGRTMIN+4 */
#endif


<略>


mvr_mvrstate.h

HPSS4.5

HPSS6.2

#ifndef mvr_mvrstate_v0_0_included
#define mvr_mvrstate_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif
#ifndef hpss_idl_types_v0_0_included
#include <hpss_idl_types.h>
#endif
typedef struct mover_attr {

unsigned32 NumberOfRequestTasks;
unsigned32 NumberOfActiveRequests;
unsigned32 NumberOfRequestsProcessed;
unsigned32 NumberOfDataTransfers;
unsigned32 NumberOfRequestErrors;
signed32 BufferSize;
u_signed64 NumberOfBytesMoved;
u_signed64 RegisterBitmap;
timestamp_t TotalMoveTime;
timestamp_t TimeOfLastGetState;
timestamp_t TimeOfLastStatReset;
} mover_attr_t;



#define MVRATTR_NUMREQUESTTASKS (0)
#define MVRATTR_NUMACTIVEREQUESTS (1)
#define MVRATTR_NUMREQUESTSPROCESSED (2)
#define MVRATTR_NUMDATATRANSFERS (3)
#define MVRATTR_NUMREQUESTERRORS (4)
#define MVRATTR_REGISTERBITMAP (5)
#define MVRATTR_NUMBYTESMOVED (6)
#define MVRATTR_TOTALMOVETIME (7)
#define MVRATTR_TIMEOFLASTGETSTATE (8)
#define MVRATTR_TIMEOFLASTSTATRESET (9)
#define MVRATTR_BUFFERSIZE (10)

#define MVRATTR_ALLATTRS (10)

#ifdef __cplusplus
}


#endif
#endif

#ifndef _MVR_MVRSTATE_H_RPCGEN
#define _MVR_MVRSTATE_H_RPCGEN

#include <rpc/rpc.h>
#ifndef _mvr_mvrstate_h
#define _mvr_mvrstate_h








#include "hpss_types.h"

struct mover_attr {
unsigned32 EnableSan3p;
unsigned32 NumberOfRequestTasks;
unsigned32 NumberOfActiveRequests;
unsigned32 NumberOfRequestsProcessed;
unsigned32 NumberOfDataTransfers;
unsigned32 NumberOfRequestErrors;
signed32 BufferSize;
u_signed64 NumberOfBytesMoved;
u_signed64 RegisterBitmap;
timestamp_t TotalMoveTime;
timestamp_t TimeOfLastGetState;
timestamp_t TimeOfLastStatReset;
};
typedef struct mover_attr mover_attr;

typedef mover_attr mover_attr_t;
#define MVRATTR_NUMREQUESTTASKS 0
#define MVRATTR_NUMACTIVEREQUESTS 1
#define MVRATTR_NUMREQUESTSPROCESSED 2
#define MVRATTR_NUMDATATRANSFERS 3
#define MVRATTR_NUMREQUESTERRORS 4
#define MVRATTR_REGISTERBITMAP 5
#define MVRATTR_NUMBYTESMOVED 6
#define MVRATTR_TOTALMOVETIME 7
#define MVRATTR_TIMEOFLASTGETSTATE 8
#define MVRATTR_TIMEOFLASTSTATRESET 9
#define MVRATTR_BUFFERSIZE 10
#define MVRATTR_ENABLESAN3P 11
#define MVRATTR_ALLATTRS 11
#endif


extern bool_t xdr_mover_attr();
extern bool_t xdr_mover_attr_t();

#endif /* !_MVR_MVRSTATE_H_RPCGEN */


mvr_protint.h

HPSS4.5

HPSS6.2

#ifndef MVR_PROTINT_H
#define MVR_PROTINT_H

#include "mvr_protocol.h"


typedef struct ctl_connect_info {
long ControlDesc;
unsigned32 Flags;
u_signed64 Offset;
u_signed64 InitialOffset;
u_signed64 Length;
u_signed64 TotalLength;
address_t Address;
address_t PeerCtlAddr;
struct ctl_connect_info *Next;
} ctl_connect_info_t;

long
MvrProtActiveHandshake(
v_mvrreqdesc_t *RequestPtr,
address_t *AddrIn,
unsigned32 AddrFlags,
initiator_msg_t *InitMsgIn,

initiator_msg_t *RetInitMsg,
address_t *RetAddr);

<略>

long
MvrProtPassiveInit(
v_mvrreqdesc_t *RequestPtr,
address_t *ReplyAddr,

long Flags,
signed32 RequestID,
signed32 ListLength,
srcsinkdesc_t *DevSidePtr,
int *RetReplySock);

void
MvrProtPassiveCleanUp(void);

void
UpdatePassiveLowOffset(
ctl_connect_info_t *ControlPtr,
u_signed64 Length,
unsigned32 ResponderFlag);

signed32
mvr_SendCompletion(
v_mvrreqdesc_t *RequestPtr, /* IN */
unsigned32 IODFlags, /* IN */
signed32 Error, /* IN */
u_signed64 BytesMoved, /* IN */
completion_msg_t *CompletionPtr, /* IN */
initiator_msg_t *PassiveInitPtr, /* IN */
ctl_connect_info_t *CtlConnPtr, /* IN */
address_t *CtlAddrPtr, /* IN */
signed32 CtlFlags, /* IN */
unsigned32 *HSCompPtr); /* OUT */

#endif /* ifndef MVR_PROTINT_H */

#ifndef MVR_PROTINT_H
#define MVR_PROTINT_H

#include "mvr_protocol.h"
#include "mvr_clientif.h"













long
MvrProtActiveHandshake(
v_mvrreqdesc_t *RequestPtr,
address_t *AddrIn,
unsigned32 AddrFlags,
initiator_msg_t *InitMsgIn,
int *ControlSockFd,
initiator_msg_t *RetInitMsg,
address_t *RetAddr);

<略>

long
MvrProtPassiveInit(
v_mvrreqdesc_t *RequestPtr,
v_devicedesc_t *DevicePtr,
address_t *ReplyAddr,
long Flags,
signed32 RequestID,
signed32 ListLength,
srcsinkdesc_t *DevSidePtr,
int *RetReplySock);

void
MvrProtPassiveCleanUp(void);

void
UpdatePassiveLowOffset(
ctl_connect_info_t *ControlPtr,
u_signed64 Length,
unsigned32 ResponderFlag);

signed32
mvr_SendCompletion(
v_mvrreqdesc_t *RequestPtr, /* IN */
unsigned32 IODFlags, /* IN */
signed32 Error, /* IN */
u_signed64 BytesMoved, /* IN */
completion_msg_t *CompletionPtr, /* IN */
initiator_msg_t *PassiveInitPtr, /* IN */
ctl_connect_info_t *CtlConnPtr, /* IN */
address_t *CtlAddrPtr, /* IN */
signed32 CtlFlags, /* IN */
unsigned32 *HSCompPtr); /* OUT */

#endif /* ifndef MVR_PROTINT_H */


mvr_protocol.h

HPSS4.5

HPSS6.2

#ifndef MVR_PROTOCOL_H
#define MVR_PROTOCOL_H



#if defined(NO_DCE) && !defined(hpss_iod_v0_0_included) && !defined(_hpss_iod_h)

#define NET_ADDRESS 1
#define IPI_ADDRESS 2
#define VESTA_ADDRESS 3
#define FILE_ADDRESS 4
#define SSEG_ADDRESS 5
#define VVOL_ADDRESS 6
#define PVOL_ADDRESS 7
#define DEVICE_ADDRESS 8
#define STRIPE_ADDRESS 9
#define MEMORY_ADDRESS 10
#define CLIENTFILE_ADDRESS 11

typedef struct shmaddress {
unsigned32 Flags;
unsigned32 ShmID;
unsigned32 ShmOffset;
} shmaddress_t;

typedef struct netaddress {
u_signed64 SockTransferID;
struct {
unsigned32 addr;
unsigned16 port;
unsigned16 family;
} SockAddr;
u_signed64 SockOffset;
} netaddress_t;

typedef struct ipiaddress {
unsigned32 IPI3TransferID;
struct {
signed16 Interface;
signed16 Pad1;
char Name[32];
} IPI3Addr;
u_signed64 IPI3Offset;
} ipiaddress_t;

#else /* NODCE */

#include "hpss_iod.h"

#endif /* NODCE */

#define MVRPROT_TICKET_LENGTH (8)

typedef struct initiator_msg {
u_signed64 Delimiter;
unsigned32 Flags;
unsigned32 Type;
u_signed64 Offset;
u_signed64 Length;
u_signed64 BlockSize;
u_signed64 StripeWidth;
u_signed64 Stride;
u_signed64 TotalLength;
char SecurityTicket[MVRPROT_TICKET_LENGTH];
u_signed64 CheckSum;
} initiator_msg_t;

#define MVRPROT_DELIM_OFFSET (0)

#define MVRPROT_FLAGS_OFFSET (8)

#define MVRPROT_INIT_TYPE_OFFSET (12)
#define MVRPROT_INIT_OFFS_OFFSET (16)
#define MVRPROT_INIT_LEN_OFFSET (24)
#define MVRPROT_INIT_BLKSZ_OFFSET (32)
#define MVRPROT_INIT_STRW_OFFSET (40)
#define MVRPROT_INIT_STRIDE_OFFSET (48)
#define MVRPROT_INIT_TOTLEN_OFFSET (56)
#define MVRPROT_INIT_SECTKT_OFFSET (64)
#define MVRPROT_INIT_CHKSUM_OFFSET (72)


#define MVRPROT_RESPONDER 0x00000001 /* request responder */
#define MVRPROT_ADDR_FOLLOWS 0x00000002 /* address follows msg */
#define MVRPROT_COMP_REPLY 0x00000004 /* send completion reply */
#define MVRPROT_HOLD_RESOURCES 0x00000008 /* don't close connection */

typedef struct initiator_ipaddr {
u_signed64 Delimiter;
unsigned32 Flags;
netaddress_t IpAddr;
char SecurityTicket[MVRPROT_TICKET_LENGTH];
u_signed64 CheckSum;
} initiator_ipaddr_t;

#define MVRPROT_IPADDR_XFERID_OFFSET (12)
#define MVRPROT_IPADDR_ADDR_OFFSET (20)
#define MVRPROT_IPADDR_PORT_OFFSET (24)
#define MVRPROT_IPADDR_FAMILY_OFFSET (28)
#define MVRPROT_IPADDR_OFFS_OFFSET (32)
#define MVRPROT_IPADDR_SECTKT_OFFSET (40)
#define MVRPROT_IPADDR_CHKSUM_OFFSET (48)

typedef struct initiator_ipi3addr {
u_signed64 Delimiter;
unsigned32 Flags;
ipiaddress_t Ipi3Addr;
char SecurityTicket[MVRPROT_TICKET_LENGTH];
u_signed64 CheckSum;
} initiator_ipi3addr_t;

#define MVRPROT_IPIADDR_XFERID_OFFSET (12)
#define MVRPROT_IPIADDR_INTRFC_OFFSET (16)
#define MVRPROT_IPIADDR_NAME_OFFSET (18)
#define MVRPROT_IPIADDR_OFFS_OFFSET (50)
#define MVRPROT_IPIADDR_SECTKT_OFFSET (58)
#define MVRPROT_IPIADDR_CHKSUM_OFFSET (66)














typedef struct initiator_shmaddr {
u_signed64 Delimiter;
unsigned32 Flags;
shmaddress_t ShmAddr;
char SecurityTicket[MVRPROT_TICKET_LENGTH];
u_signed64 CheckSum;
} initiator_shmaddr_t;

#define MVRPROT_SHMADDR_FLAGS_OFFSET (12)
#define MVRPROT_SHMADDR_SHMID_OFFSET (16)
#define MVRPROT_SHMADDR_OFFS_OFFSET (20)
#define MVRPROT_SHMADDR_SECTKT_OFFSET (24)
#define MVRPROT_SHMADDR_CHKSUM_OFFSET (32)

typedef struct completion_msg {
u_signed64 Delimiter;
unsigned32 Flags;
unsigned32 Status;
u_signed64 BytesMoved;
char SecurityTicket[MVRPROT_TICKET_LENGTH];
u_signed64 CheckSum;
} completion_msg_t;

#define MVRPROT_COMP_STATUS_OFFSET (12)
#define MVRPROT_COMP_BMOVED_OFFSET (16)
#define MVRPROT_COMP_SECTKT_OFFSET (24)
#define MVRPROT_COMP_CHKSUM_OFFSET (32)



#define MVRPROT_BUILDDELIM(d) \
((d) = bld64m(0x01234567,0x89ABCDEF))

#define MVRPROT_CHECKDELIM(d) \
(neq64m((d),bld64m(0x01234567,0x89ABCDEF)))

#define MVRPROT_INITMSG_SIZE (80)
#define MVRPROT_COMPMSG_SIZE (40)
#define MVRPROT_IPADDR_SIZE (56)
#define MVRPROT_IPI3ADDR_SIZE (74)


#define MVRPROT_SHMADDR_SIZE (40)

<略>

long
mvrprot_send_ipi3addr_timeout(
int SockFD,
initiator_ipi3addr_t *InitIpi3Ptr,
int SecTimeout);













































long
mvrprot_recv_shmaddr(
int SockFD,
initiator_shmaddr_t *ShmAddrPtr);

<略>

#endif /* ifndef MVR_PROTOCOL_H */

#ifndef MVR_PROTOCOL_H
#define MVR_PROTOCOL_H

#include "hpssclntaddr.h"
#include "san3p_msgdefs.h"















































#define MVRPROT_TICKET_LENGTH (8)

typedef struct initiator_msg {
u_signed64 Delimiter;
unsigned32 Flags;
unsigned32 Type;
u_signed64 Offset;
u_signed64 Length;
u_signed64 BlockSize;
u_signed64 StripeWidth;
u_signed64 Stride;
u_signed64 TotalLength;
char SecurityTicket[MVRPROT_TICKET_LENGTH];
u_signed64 CheckSum;
} initiator_msg_t;

#define MVRPROT_DELIM_OFFSET (0)
#define MVRPROT_DELIM_SIZE (8)
#define MVRPROT_FLAGS_OFFSET (8)

#define MVRPROT_INIT_TYPE_OFFSET (12)
#define MVRPROT_INIT_OFFS_OFFSET (16)
#define MVRPROT_INIT_LEN_OFFSET (24)
#define MVRPROT_INIT_BLKSZ_OFFSET (32)
#define MVRPROT_INIT_STRW_OFFSET (40)
#define MVRPROT_INIT_STRIDE_OFFSET (48)
#define MVRPROT_INIT_TOTLEN_OFFSET (56)
#define MVRPROT_INIT_SECTKT_OFFSET (64)
#define MVRPROT_INIT_CHKSUM_OFFSET (72)


#define MVRPROT_RESPONDER 0x00000001 /* request responder */
#define MVRPROT_ADDR_FOLLOWS 0x00000002 /* address follows msg */
#define MVRPROT_COMP_REPLY 0x00000004 /* send completion reply */
#define MVRPROT_HOLD_RESOURCES 0x00000008 /* don't close connection */

typedef struct initiator_ipaddr {
u_signed64 Delimiter;
unsigned32 Flags;
netaddress_t IpAddr;
char SecurityTicket[MVRPROT_TICKET_LENGTH];
u_signed64 CheckSum;
} initiator_ipaddr_t;

#define MVRPROT_IPADDR_XFERID_OFFSET (12)
#define MVRPROT_IPADDR_ADDR_OFFSET (20)
#define MVRPROT_IPADDR_PORT_OFFSET (24)
#define MVRPROT_IPADDR_FAMILY_OFFSET (28)
#define MVRPROT_IPADDR_OFFS_OFFSET (32)
#define MVRPROT_IPADDR_SECTKT_OFFSET (40)
#define MVRPROT_IPADDR_CHKSUM_OFFSET (48)

typedef struct initiator_ipi3addr {
u_signed64 Delimiter;
unsigned32 Flags;
ipiaddress_t Ipi3Addr;
char SecurityTicket[MVRPROT_TICKET_LENGTH];
u_signed64 CheckSum;
} initiator_ipi3addr_t;

#define MVRPROT_IPIADDR_XFERID_OFFSET (12)
#define MVRPROT_IPIADDR_INTRFC_OFFSET (16)
#define MVRPROT_IPIADDR_NAME_OFFSET (18)
#define MVRPROT_IPIADDR_OFFS_OFFSET (50)
#define MVRPROT_IPIADDR_SECTKT_OFFSET (58)
#define MVRPROT_IPIADDR_CHKSUM_OFFSET (66)

typedef struct initiator_san3paddr {
u_signed64 Delimiter;
unsigned32 Flags;
san3paddress_t San3pAddr;
char SecurityTicket[MVRPROT_TICKET_LENGTH];
u_signed64 CheckSum;
} initiator_san3paddr_t;

#define MVRPROT_SAN3PADDR_XFERID_OFFSET (12)
#define MVRPROT_SAN3PADDR_SECTOKEN_OFFSET (16)
#define MVRPROT_SAN3PADDR_SECTKT_OFFSET (48)
#define MVRPROT_SAN3PADDR_CHKSUM_OFFSET (56)


typedef struct initiator_shmaddr {
u_signed64 Delimiter;
unsigned32 Flags;
shmaddress_t ShmAddr;
char SecurityTicket[MVRPROT_TICKET_LENGTH];
u_signed64 CheckSum;
} initiator_shmaddr_t;

#define MVRPROT_SHMADDR_FLAGS_OFFSET (12)
#define MVRPROT_SHMADDR_SHMID_OFFSET (16)
#define MVRPROT_SHMADDR_OFFS_OFFSET (20)
#define MVRPROT_SHMADDR_SECTKT_OFFSET (24)
#define MVRPROT_SHMADDR_CHKSUM_OFFSET (32)

typedef struct completion_msg {
u_signed64 Delimiter;
unsigned32 Flags;
unsigned32 Status;
u_signed64 BytesMoved;
char SecurityTicket[MVRPROT_TICKET_LENGTH];
u_signed64 CheckSum;
} completion_msg_t;

#define MVRPROT_COMP_STATUS_OFFSET (12)
#define MVRPROT_COMP_BMOVED_OFFSET (16)
#define MVRPROT_COMP_SECTKT_OFFSET (24)
#define MVRPROT_COMP_CHKSUM_OFFSET (32)

#define MVRPROTOCOL_MSG_TYPE 0x01

#define MVRPROT_BUILDDELIM(d) \
((d) = bld64m(0x89ABCDEF,0x01234567))

#define MVRPROT_CHECKDELIM(d) \
(neq64m((d),bld64m(0x89ABCDEF,0x01234567)))

#define MVRPROT_INITMSG_SIZE (80)
#define MVRPROT_COMPMSG_SIZE (40)
#define MVRPROT_IPADDR_SIZE (56)
#define MVRPROT_IPI3ADDR_SIZE (74)
#define MVRPROT_SAN3PADDR_SIZE (64)
#define MVRPROT_SAN3PDEVADDR_SIZE (156)
#define MVRPROT_SHMADDR_SIZE (40)

<略>

long
mvrprot_send_ipi3addr_timeout(
int SockFD,
initiator_ipi3addr_t *InitIpi3Ptr,
int SecTimeout);

long
mvrprot_recv_san3paddr(
int SockFD,
initiator_san3paddr_t *InitSan3pPtr);

long
mvrprot_recv_san3paddr_timeout(
int SockFD,
initiator_san3paddr_t *InitSan3pPtr,
int SecTimeout);

long
mvrprot_send_san3paddr(
int SockFD,
initiator_san3paddr_t *InitSan3pPtr);

long
mvrprot_send_san3paddr_timeout(
int SockFD,
initiator_san3paddr_t *InitSan3pPtr,
int SecTimeout);

long
mvrprot_recv_san3p_devaddr(
int SockFD,
san3p_devaddr_t *San3pDevAddrPtr);

long
mvrprot_recv_san3p_devaddr_timeout(
int SockFD,
san3p_devaddr_t *San3pDevAddrPtr,
int SecTimeout);

long
mvrprot_send_san3p_devaddr(
int SockFD,
san3p_devaddr_t *San3pDevAddrPtr);

long
mvrprot_send_san3p_devaddr_timeout(
int SockFD,
san3p_devaddr_t *San3pDevAddrPtr,
int SecTimeout);


long
mvrprot_recv_shmaddr(
int SockFD,
initiator_shmaddr_t *ShmAddrPtr);

<略>

#endif /* ifndef MVR_PROTOCOL_H */


mvr_reqdesc.h

HPSS4.5

HPSS6.2

#ifndef mvr_reqdesc_v0_0_included
#define mvr_reqdesc_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif
#ifndef hpss_idl_types_v0_0_included
#include <hpss_idl_types.h>
#endif
#ifndef rtm_interface_def_v0_0_included
#include <rtm_interface_def.h>
#endif











typedef struct mvrreqdesc {
hpss_reqid_t RequestID;
rtm_request_code_t ReqCode;
rtm_state_t State;
rtm_wait_reason_t WaitReason;
unsigned32 ShmBufID;
unsigned32 TaskPid;
signed32 ControlSocket;
rtm_wait_resource_t WaitResource;
rtm_mvr_req_attr_t ReqAttr;
timestamp_sec_t StartTime;
timestamp_sec_t UpdateTime;

struct {
unsigned8 len;
unsigned8 family;
unsigned8 path[108];
unsigned8 reserved[2];
} ControlAddr;
} mvrreqdesc_t;




#define MVR_REQUEST_INUSE (1)
#define MVR_REQUEST_INITIALIZING (2)
#define MVR_REQUEST_PROCESSING (4)
#define MVR_REQUEST_SUSPENDED (8)
#define MVR_REQUEST_ABORTING (16)
#define MVR_REQUEST_SUSPEND (1)
#define MVR_REQUEST_RESUME (2)
#define MVR_REQUEST_ABORT (4)

#ifdef __cplusplus
}




#endif
#endif

#ifndef _MVR_REQDESC_H_RPCGEN
#define _MVR_REQDESC_H_RPCGEN

#include <rpc/rpc.h>
#ifndef _mvr_reqdesc_h
#define _mvr_reqdesc_h








#include "hpss_types.h"


#include "rtm_interface_def.h"


struct mvrreq_cntrl_addr {
unsigned8 len;
unsigned8 family;
unsigned8 path[108];
unsigned8 reserved[2];
};
typedef struct mvrreq_cntrl_addr mvrreq_cntrl_addr;

typedef mvrreq_cntrl_addr mvrreq_cntrl_addr_t;

struct mvrreqdesc {
hpss_reqid_t RequestID;
rtm_request_code_t ReqCode;
rtm_state_t State;
rtm_wait_reason_t WaitReason;
unsigned32 ShmBufID;
unsigned32 TaskPid;
signed32 ControlSocket;
rtm_wait_resource_t WaitResource;
rtm_mvr_req_attr_t ReqAttr;
timestamp_sec_t StartTime;
timestamp_sec_t UpdateTime;
mvrreq_cntrl_addr_t ControlAddr;






};
typedef struct mvrreqdesc mvrreqdesc;

typedef mvrreqdesc mvrreqdesc_t;

#define MVR_REQUEST_INUSE 0x00000001
#define MVR_REQUEST_INITIALIZING 0x00000002
#define MVR_REQUEST_PROCESSING 0x00000004
#define MVR_REQUEST_SUSPENDED 0x00000008
#define MVR_REQUEST_ABORTING 0x00000010
#define MVR_REQUEST_SUSPEND 0x00000001
#define MVR_REQUEST_RESUME 0x00000002
#define MVR_REQUEST_ABORT 0x00000004
#endif


extern bool_t xdr_mvrreq_cntrl_addr();
extern bool_t xdr_mvrreq_cntrl_addr_t();
extern bool_t xdr_mvrreqdesc();
extern bool_t xdr_mvrreqdesc_t();

#endif /* !_MVR_REQDESC_H_RPCGEN */


mvr_shmem.h

HPSS4.5

HPSS6.2





#ifndef mvr_shmem_h
#define mvr_shmem_h
#include <sys/un.h>
#include <netinet/in.h>
#include "hpss_server_attr.h"
#include "mvr_mvrstate.h"
#include "mvr_devdesc.h"
#include "mvr_reqdesc.h"
#include "mvr_config.h"


typedef struct v_moverstate {
int Lock;
hpss_server_attrib_t CommonState;
mover_attr_t MoverState;
} v_moverstate_t;




typedef struct v_devicedesc {
int Lock;
int InUseSem;
int WaitCount;
int MaxConnections;
devdesc_attr_t DeviceDesc;
} v_devicedesc_t;




typedef struct v_mvrreqdesc {
int Lock;
mvrreqdesc_t RequestDesc;
} v_mvrreqdesc_t;



#define MVR_DEV_TABLE_SIZE (64)
#define MVR_SHMEM_DEV_TABLE_SIZE (65)
#define MVR_MAX_REQUESTS (128)
#define MVR_NUM_SEMAPHORES \
((2 * MVR_SHMEM_DEV_TABLE_SIZE) + MVR_MAX_REQUESTS + 3)












#define MVR_SADDR_INET (1)
#define MVR_SADDR_UNIX (2)
#define MVR_MAX_STRING_ADDR_LENGTH (64)

typedef struct mvr_shmem {
int SystemSemaphoreID;
int DeviceTableLock;
int RequestTableLock;
int MoverIPCType;
char MoverDescriptiveName[HPSS_MAX_DESC_NAME];
mvr_config_t MoverConfig;
char ControlAddr[MVR_MAX_STRING_ADDR_LENGTH];
char SSMNotifyAddr[MVR_MAX_STRING_ADDR_LENGTH];
char ParentHostName[HPSS_MAX_HOST_NAME];

v_moverstate_t MoverState;
v_devicedesc_t DevDescTable[MVR_SHMEM_DEV_TABLE_SIZE];
v_mvrreqdesc_t ReqDescTable[MVR_MAX_REQUESTS];
} mvr_shmem_t;







typedef struct attrib_union_s {
unsigned32 ObjectClass;
union {
hpss_server_attrib_t serverattr;
mover_attr_t moverattr;
devdesc_attr_t deviceattr;
} attrib_union_u;
} attrib_union_t;




typedef struct notify_req {
unsigned32 Flags;
unsigned32 RequestID;
signed32 Status;
u_signed64 NotifyFlags;
long ObjectID;
attrib_union_t AttrUnion;
} notify_req_t;



#define MVR_NOTIFY_GET_ATTRS (0x00000001)
#define MVR_NOTIFY_SET_ATTRS (0x00000002)
#define MVR_NOTIFY_CREATE (0x00000004)
#define MVR_NOTIFY_DELETE (0x00000008)
#define MVR_NOTIFY_REPLY (0x00000010)
#define MVR_NOTIFY_NOTIFYREQ (0x00000020)
#define MVR_NOTIFY_GET_REQTABLE (0x00000040)
#define MVR_NOTIFY_DCEPROC (0x00010000)
#define MVR_NOTIFY_NOREPLY (0x00020000)
extern v_devicedesc_t MVR_LocalDevDesc[];

long
InitDeviceDesc(
mvr_config_t *MoverConfigPtr,
v_devicedesc_t *DevDescPtr);


















#endif /* mvr_shmem_h */

#ifndef _MVR_SHMEM_H_RPCGEN
#define _MVR_SHMEM_H_RPCGEN

#include <rpc/rpc.h>
#ifndef _mvr_shmem_h
#define _mvr_shmem_h
#include <sys/un.h>
#include <netinet/in.h>
#include "hpss_server_attr.h"
#include "mvr_mvrstate.h"
#include "mvr_devdesc.h"
#include "mvr_reqdesc.h"
#include "mvr_config.h"
#include "san3p_msgdefs.h"

struct v_moverstate {
int Lock;
hpss_server_attrib_t CommonState;
mover_attr_t MoverState;
};
typedef struct v_moverstate v_moverstate;

typedef v_moverstate v_moverstate_t;

struct v_devicedesc {
int Lock;
int InUseSem;
int WaitCount;
int MaxConnections;
devdesc_attr_t DeviceDesc;
};
typedef struct v_devicedesc v_devicedesc;

typedef v_devicedesc v_devicedesc_t;

struct v_mvrreqdesc {
int Lock;
mvrreqdesc_t RequestDesc;
};
typedef struct v_mvrreqdesc v_mvrreqdesc;

typedef v_mvrreqdesc v_mvrreqdesc_t;
#define MVR_DEV_TABLE_SIZE 64
#define MVR_SHMEM_DEV_TABLE_SIZE 65
#define MVR_MAX_REQUESTS 128
#define MVR_NUM_SEMAPHORES ((2 * MVR_SHMEM_DEV_TABLE_SIZE) + MVR_MAX_REQUESTS + 4)

#define MVR_SHMEM_SAN_DEV_CACHE (64)

struct v_cached_san_devid {
long hash;
unsigned32 timeStamp;
unsigned32 hitcount;
char deviceName[SAN3P_DEVADDR_DEVNAME_LEN];
char deviceID[SAN3P_DEVADDR_DEVICEID_LEN];
};
typedef struct v_cached_san_devid v_cached_san_devid;


typedef v_cached_san_devid v_cached_san_devid_t;
#define MVR_SADDR_INET (1)
#define MVR_SADDR_UNIX (2)
#define MVR_MAX_STRING_ADDR_LENGTH 64

struct mvr_shmem {
int SystemSemaphoreID;
int DeviceTableLock;
int RequestTableLock;
int MoverIPCType;
char MoverDescriptiveName[HPSS_MAX_DESC_NAME];
mvr_config_t MoverConfig;
char ControlAddr[MVR_MAX_STRING_ADDR_LENGTH];
char SSMNotifyAddr[MVR_MAX_STRING_ADDR_LENGTH];
char ParentHostName[HPSS_MAX_HOST_NAME];
int San3PDevCacheLock;
v_cached_san_devid_t SanDevIdCache[MVR_SHMEM_SAN_DEV_CACHE];
v_moverstate_t MoverState;
v_devicedesc_t DevDescTable[MVR_SHMEM_DEV_TABLE_SIZE];
v_mvrreqdesc_t ReqDescTable[MVR_MAX_REQUESTS];
};
typedef struct mvr_shmem mvr_shmem;

typedef mvr_shmem mvr_shmem_t;
#define NOTIFY_CLASS_SERVER 1
#define NOTIFY_CLASS_MOVER 2
#define NOTIFY_CLASS_DEVICE 3

struct attrib_union {
unsigned32 ObjectClass;
union {
hpss_server_attrib_t serverattr;
mover_attr_t moverattr;
devdesc_attr_t deviceattr;
} attrib_union_u;
};
typedef struct attrib_union attrib_union;

typedef attrib_union attrib_union_t;

struct notify_req {
unsigned32 Flags;
unsigned32 RequestID;
signed32 Status;
u_signed64 NotifyFlags;
long ObjectID;
attrib_union_t AttrUnion;
};
typedef struct notify_req notify_req;

typedef notify_req notify_req_t;
#define MVR_NOTIFY_GET_ATTRS (0x00000001)
#define MVR_NOTIFY_SET_ATTRS (0x00000002)
#define MVR_NOTIFY_CREATE (0x00000004)
#define MVR_NOTIFY_DELETE (0x00000008)
#define MVR_NOTIFY_REPLY (0x00000010)
#define MVR_NOTIFY_NOTIFYREQ (0x00000020)
#define MVR_NOTIFY_GET_REQTABLE (0x00000040)
#define MVR_NOTIFY_ADMINPROC (0x00010000)
#define MVR_NOTIFY_NOREPLY (0x00020000)
extern v_devicedesc_t MVR_LocalDevDesc[];

long
InitDeviceDesc(
mvr_config_t *MoverConfigPtr,
v_devicedesc_t *DevDescPtr,
char *GlobalDBName);
#endif

extern bool_t xdr_v_moverstate();
extern bool_t xdr_v_moverstate_t();
extern bool_t xdr_v_devicedesc();
extern bool_t xdr_v_devicedesc_t();
extern bool_t xdr_v_mvrreqdesc();
extern bool_t xdr_v_mvrreqdesc_t();
extern bool_t xdr_v_cached_san_devid();
extern bool_t xdr_v_cached_san_devid_t();
extern bool_t xdr_mvr_shmem();
extern bool_t xdr_mvr_shmem_t();
extern bool_t xdr_attrib_union();
extern bool_t xdr_attrib_union_t();
extern bool_t xdr_notify_req();
extern bool_t xdr_notify_req_t();


#endif /* !_MVR_SHMEM_H_RPCGEN */


mvr_tape.h

HPSS4.5

HPSS6.2

#ifndef mvr_tape_h
#define mvr_tape_h

#if defined(SSD_DEVDRVR)
#if defined(_IBMR2)
#include <sys/Atape.h>
#elif defined(__SVR4) /* if defined(_IBMR2) */
#include <sys/ioccom.h>
#include <sys/st.h>
#endif /* elif defined(__SVR4) */
#elif defined(SSD_BMUX_DEVDRVR)
#include <sys/mtio.h>
#elif defined(OMI_DEVDRVR)
#include <sys/atdd.h>
#endif /* defined(OMI_DEVDRVR) */

#include "hpssaddr.h"
#include "mvr_shmem.h"
#include "mvr_dstfuncs.h"

#if !defined(_IBMR2)
#define STIOCTOP MTIOCTOP



#define STOFFL MTOFFL
#define STREW MTREW
#define STWEOF MTWEOF
#define STFSF MTFSF
#define STRSF MTBSF
#define STFSR MTFSR
#define STRSR MTBSR
#if defined(__sgi)
#define STUNLOAD MTUNLOAD
#endif




#define stop mtop
#define stget mtget
#define stpos mtpos
#define st_op mt_op
#define st_count mt_count
#define st_blkno mt_blkno


#if defined(__sgi)
#define st_stat mt_dposn
#define GMT_ONLINE(x) ((x) & MT_ONL)
#define GMT_BOT(x) ((x) & MT_BOT)
#define GMT_WR_PROT(x) ((x) & MT_WPROT)
#elif defined(LINUX)
#define st_stat mt_gstat


#endif

#endif

<略>

long
tp_display_hpss(
v_devicedesc_t *DevicePtr,
v_mvrreqdesc_t *RequestPtr,
char *DisplayMsg,
u_signed64 *DevNotifyFlags);






#endif /* mvr_tape_h */

#ifndef mvr_tape_h
#define mvr_tape_h

#if defined(SSD_DEVDRVR)
#if defined(_IBMR2)
#include <sys/Atape.h>
#elif defined(__SVR4) /* if defined(_IBMR2) */
#include <sys/ioccom.h>
#include <sys/st.h>
#endif /* elif defined(__SVR4) */
#elif defined(SSD_BMUX_DEVDRVR)
#include <sys/mtio.h>
#elif defined(OMI_DEVDRVR)
#include <sys/atdd.h>
#endif /* defined(OMI_DEVDRVR) */

#include "hpssaddr.h"
#include "mvr_shmem.h"
#include "mvr_dstfuncs.h"

#if !defined(_IBMR2)
#define STIOCTOP MTIOCTOP
#define STIOCGET MTIOCGET
#define STIOCGETEXT MTIOCGETEXT

#define STOFFL MTOFFL
#define STREW MTREW
#define STWEOF MTWEOF
#define STFSF MTFSF
#define STRSF MTBSF
#define STFSR MTFSR
#define STRSR MTBSR
#if defined(__sgi)
#define STUNLOAD MTUNLOAD
#endif
#define STSETBLK MTSETBLK
#define STSETDRVBUFFER MTSETDRVBUFFER
#define STSEEK MTSEEK

#define stop mtop
#define stget mtget
#define stpos mtpos
#define st_op mt_op
#define st_count mt_count
#define st_blkno mt_blkno
#define stgetext_t mtgetext_t

#if defined(__sgi)
#define st_stat mt_dposn
#define GMT_ONLINE(x) ((x) & MT_ONL)
#define GMT_BOT(x) ((x) & MT_BOT)
#define GMT_WR_PROT(x) ((x) & MT_WPROT)
#elif defined(LINUX)
#define st_stat mt_gstat
#define ST_BLK_SZ(x) \
((MT_ST_BLKSIZE_MASK & (x).mt_dsreg) >> MT_ST_BLKSIZE_SHIFT)
#endif

#endif

<略>

long
tp_display_hpss(
v_devicedesc_t *DevicePtr,
v_mvrreqdesc_t *RequestPtr,
char *DisplayMsg,
u_signed64 *DevNotifyFlags);

unsigned32
tp_find_section_id(
v_devicedesc_t *DevicePtr, /* [IN] ID of device */
positiondesc_t *PositionPtr); /* [IN] Where to position tape */

#endif /* mvr_tape_h */


ns_Constants.h

HPSS4.5

HPSS6.2

#ifndef ns_constants_h
#define ns_constants_h

#include "hpss_options.h"

#define NS_VERSION_3V2 (1)
#define NS_VERSION_NUMBER (NS_VERSION_3V2)

#define NS_NBPB (8)
#define NS_NBPW (sizeof(int) * NS_NBPB)

#define NS_MAX_COMMAND_LINE_PARAMS (7)

#define NS_MAX_CONFIGS_TO_READ (10)

#define NS_MAX_LOG_MSG_LENGTH (HPSS_MAX_PATH_NAME + 128)

#define NS_GET_FILE_PERMS (1)
#define NS_GET_DIR_PERMS (2)
#define NS_GET_USER_PERMS (3)
#define NS_GET_GROUP_PERMS (4)
#define NS_GET_OTHER_PERMS (5)

#define NS_NOT_CONNECTED (0) /* No SSM connection */
#define NS_RECONNECTING (1) /* initializing connection */
#define NS_CONNECTED (2) /* Connected to the SSM */

#define NS_NOTIFY_SSM_STATE (0)
#define NS_NOTIFY_SSM_CONFIG_MO (1)

#define NS_INCREMENT_STAT (0)
#define NS_DECREMENT_STAT (1)

#define NS_BITFILE_ID (1) /* Value is a bitfile id. */
#define NS_OBJ_HANDLE (2) /* Value is an object handle. */
#define NS_OBJ_ID (3) /* Value is an object id. */

#define NS_DELETE_ANYTHING (0)
#define NS_ONLY_DELETE_DIR (1)
#define NS_DONT_DELETE_DIR (2)

#define NS_CONN_USER_IS_BFS (0x00000001)
#define NS_CONN_USER_IS_SSM (0x00000002)

#define NS_NO_PARENT_ID (-1)

#define NS_MAX_ACL_BLOCKS_TO_READ (1)

#define NS_MAX_BLOCKS_TO_READ (50)

#define NS_TRAVERSAL_NO_OPTION (0x00000000)
#define NS_TRAVERSAL_DONT_BACKUP (0x00000001)
#define NS_TRAVERSAL_BREAK_ON_SYMLINK (0x00000002)

#define NS_ERECURSION_LIMIT (-100)
#define NS_TRAVERSE_PATH_RECURSION_LIMIT (5)

#define NS_UPDATE (1)
#define NS_CREATE (2)

#define NS_GET_BY_NAME (1)
#define NS_GET_BY_FILESET_ID (2)

#define NS_LOG_EVERYTHING (0x00000000)
#define NS_DONT_LOG_END_OF_KEY_RANGE (0x00000001)
#define NS_DONT_LOG_NO_SUCH_KEY_VALUE (0x00000002)

#define NS_UPDATE_STATS_FIELDS (1)
#define NS_DONT_UPDATE_STATS_FIELDS (0)

#define NS_STATS_DONT_REINIT_STATISTICS (0x00000000)
#define NS_STATS_REINIT_STATISTICS (0x00000001)

#define NS_EXIT_STATUS_ZERO (0)
#define NS_EXIT_STATUS_NON_ZERO (1)

#define NS_SHORT_MASK (0xffff)

#define NS_MAX_THRESHOLD_MSGS (3)

#define NS_ROOT_ENTRY (0)
#define NS_ROOT_DOT_ENTRY (1)
#define NS_ROOT_DOT_DOT_ENTRY (2)


#define NS_MAX_BUFFER_SIZE_ALLOWED (65536)


#define NS_MAX_HARD_LINK_VALUE (0xffff)













#define NS_NUMBER_OF_CONNECTION_THREADS (3)

#define NS_ADMIN_REINIT_FS_CACHE (0x00000001)
#define NS_ADMIN_PRINT_ALL_LOG_MSGS (0x00000002)
#define NS_ADMIN_PRINT_ALARM_LOG_MSGS (0x00000004)
#define NS_ADMIN_PRINT_EVENT_LOG_MSGS (0x00000008)
#define NS_ADMIN_PRINT_DEBUG_LOG_MSGS (0x00000010)
#define NS_ADMIN_PRINT_REQUEST_LOG_MSGS (0x00000020)
#define NS_ADMIN_PRINT_TRACE_LOG_MSGS (0x00000040)
#define NS_ADMIN_PRINT_TRACE_DETAIL_LOG_MSGS (0x00000080)
#define NS_ADMIN_PRINT_SECURITY_LOG_MSGS (0x00000100)
#define NS_ADMIN_DONT_PRINT_LOG_MSGS (0x00000200)
#define NS_ADMIN_CLEAR_ALL_SIGNAL_FLAGS (0x00000400)
#define NS_ADMIN_DUMP_PATH_NAME_CACHE (0x00000800)
#define NS_ADMIN_CLEAR_PATH_NAME_CACHE (0x00001000)
#define NS_ADMIN_DEL_PATH_NAME_CACHE_ENTRY (0x00002000)






#define NS_ADMIN_ILLEGAL_BITS (0xffffc000)

#define NS_OPT_SHARED_LOCK (0x00001) /* Get shared lock (r/o) */
#define NS_OPT_EXCLUSIVE_LOCK (0x00002) /* Get exclusive lock (r/w) */
#define NS_OPT_EXCLUSIVE_RANGE_LOCK (0x00004) /* Get exclusive lock (r/w) */
#define NS_OPT_CONTINUE_PREV (0x00008) /* Get next object */
#define NS_OPT_SELECT_RANGE (0x00010) /* Select a range of records */
#define NS_OPT_DONT_UPDATE_TLR (0x00020) /* Don't do TimeLastRead */
#define NS_OPT_DONT_UPDATE_TLW (0x00040) /* Don't do TimeLastWritten */
#define NS_OPT_FILESET_ATTRS_ID_KEY (0x00080) /* Use Fileset Attrs file */
#define NS_OPT_GLOBAL_FILESET_ID_KEY (0x00100) /* Use Global Fileset file */
#define NS_OPT_FILESET_NAME_KEY (0x00200) /* Global FS file Name field */
#define NS_OPT_NAME_SERVER_UUID_KEY (0x00400) /* Global FS file NS UUID */
#define NS_OPT_GATEWAY_UUID_KEY (0x00800) /* Global FS file GW UUID */
#define NS_OPT_HASH_KEY (0x01000) /* Key is a hash of a Name */
#define NS_OPT_BITFILE_ID_KEY (0x02000) /* Key is a bitfile id */
#define NS_OPT_ORIGIN_ENTRY_KEY (0x04000) /* Key is a member id */
#define NS_OPT_DELETED_OBJ_KEY (0x08000) /* Key is to del obj rec. */
#define NS_OPT_ACL_GROUP_KEY (0x10000) /* Key is to an ACL rec. */
#define NS_OPT_DONT_LOG_ENOENT (0x20000) /* Don't log ENOENT errors. */

#define NS_READ_G_FS_ALL (0)
#define NS_READ_G_FS_BY_GW_UUID (1)
#define NS_READ_G_FS_BY_NS_UUID (2)

#define NS_INVALID_ORIGIN (0xffffffff)
#define NS_INVALID_RSN (0xffffffff)

#define NS_COUNT_ALL_ENTRIES (1)
#define NS_ONLY_COUNT_ONE_ENTRY (2)

#define NS_OBJECT_BLOCK (0x80)
#define NS_FILE_OBJECT (0x81)
#define NS_SYM_LINK_OBJECT (0x82)
#define NS_HARD_LINK_OBJECT (0x83)
#define NS_DIRECTORY_OBJECT (0x84)
#define NS_JUNCTION_OBJECT (0x85)
#define NS_FILESET_ROOT_OBJECT (0x86)

#define NS_TEXT_FILE_EXT (0)
#define NS_ACL_OBJ_EXT (1)
#define NS_COMMENT_EXT (2)
#define NS_SYM_LINK_EXT (3)
#define NS_NAME_EXT (4)
#define NS_GLOBAL_FILESET_EXT (5)
#define NS_FILESET_ATTRS_EXT (6)
#define NS_ACL_FILE_EXT (7)
#define NS_ACL_IC_EXT (8)
#define NS_ACL_IO_EXT (9)




#define NS_SPECIFIC_CONFIG_FILE (50)

#define NS_BITFILE_ID_LENGTH (32) /* bitfile identifier length */
#define NS_IHASH_KEY_LENGTH (8) /* len of internal hash key */
#define NS_MAX_OBJ_NAME_LENGTH (23) /* max len of Name in OBlock */
#define NS_MAX_TEXT_LENGTH (1024) /* max length of text */

#define NS_CL_PERMS (0x01) /* Control */
#define NS_DL_PERMS (0x04) /* Directory delete (w/wr permission) */
#define NS_IN_PERMS (0x08) /* Directory insert (w/wr permission) */
#define NS_RD_PERMS (0x20) /* Read */
#define NS_WR_PERMS (0x40) /* Write */
#define NS_XS_PERMS (0x80) /* Exec/Search */

#define NS_ILLEGAL_PERMS_MASK (0x12) /* Turn on the illegal bits. */

#define NS_ILLEGAL_ACL_OPTIONS_MASK (0xffffffc0)

#define NS_ILLEGAL_ACL_ENTRY_TYPE (0xff)
#define NS_EMPTY_ACL_ENTRY (0)

#define ACL_MINIMUM (0) /* Can't have EntryType < 0. */
#define ACL_USER_OBJ (0) /* implied user object */
#define ACL_GROUP_OBJ (1) /* implied group object */
#define ACL_OTHER_OBJ (2) /* non-user and non-group object */
#define ACL_USER (3) /* eid = uid */
#define ACL_GROUP (4) /* eid = gid */

#define ACL_MASK_OBJ (5) /* mask to apply. */

#define ACL_FOREIGN_USER (6) /* eid = uid + foreign realm */

#define ACL_FOREIGN_GROUP (7) /* eid = gid + foreign realm */
#define ACL_FOREIGN_OTHER (8)
#define ACL_UNAUTHENTICATED_MASK (9) /* apply to unauthenticated users. */

#define ACL_ANY_OTHER (10)

#define ACL_USER_OBJ_DELEGATE (11) /* object's owner */
#define ACL_USER_DELEGATE (12)
#define ACL_FOREIGN_USER_DELEGATE (13)
*/
#define ACL_GROUP_OBJ_DELEGATE (14) /* object's group owner */
#define ACL_GROUP_DELEGATE (15)
#define ACL_FOREIGN_GROUP_DELEGATE (16)
#define ACL_OTHER_OBJ_DELEGATE (17) /* any principal in local cell */
#define ACL_FOREIGN_OTHER_DELEGATE (18) /* any other in local cell */

#define ACL_ANY_OTHER_DELEGATE (19) /* any principal in any cell */
#define ACL_MAXIMUM (19) /* The largest EntryType value. */


#define NS_FS_TYPE_HPSS_ONLY (0) /* HPSS-specific */
#define NS_FS_TYPE_ARCHIVED (1) /* DFS-specific */
#define NS_FS_TYPE_DFS_ONLY (2) /* DFS only */
#define NS_FS_TYPE_MIRRORED (3) /* DFS-specific */

#define NS_FS_TYPE_INVALID (0xffffffff)

#define NS_FS_STATE_READ (0x0001)
#define NS_FS_STATE_WRITE (0x0002)
#define NS_FS_STATE_DESTROYED (0x0004)

#define NS_FS_STATE_READ_WRITE (0x0003)
#define NS_FS_STATE_COMBINED (0x0007)

#define NS_FS_MAX_ENTRIES_TO_RETURN (100)

#define NS_FS_MAX_FS_NAME_LENGTH (128)

#define NS_FS_CALLBACK_CREATE (1)
#define NS_FS_CALLBACK_UPDATE (2)

#define NS_FS_DELETE_FILESETID (1)
#define NS_FS_DELETE_RSN (2)
#define NS_FS_DELETE_BOTH (3)

#define NS_MAX_FS_STRING_LENGTH (80)

#define NS_CHECK_GATEWAY (1)
#define NS_DONT_CHECK_GATEWAY (0)

#define NS_JUNCTION_BFID_TYPE (DELETED_OBJ)

#define NS_COPY_FROM_FS_CACHE (0)
#define NS_COPY_TO_FS_CACHE (1)

#endif /* ns_Constants_h */

#ifndef ns_constants_h
#define ns_constants_h

#include "hpss_acl_cons.h"

#define NS_VERSION_5v1 (1)
#define NS_VERSION_NUMBER (NS_VERSION_5v1)

#define NS_NBPB (8)
#define NS_NBPW (sizeof(int) * NS_NBPB)

#define NS_MAX_COMMAND_LINE_PARAMS (7)



#define NS_MAX_LOG_MSG_LENGTH (HPSS_MAX_PATH_NAME + 128)















#define NS_INCREMENT_STAT (0)
#define NS_DECREMENT_STAT (1)












#define NS_NO_PARENT_ID (bld64m(0xffffffff,0xffffffff))


#define NS_MAX_RECORDS_TO_READ (200)

#define NS_NUM_SERV_CONF_RECS_TO_READ (5)




#define NS_ERECURSION_LIMIT (-100)
#define NS_TRAVERSE_PATH_RECURSION_LIMIT (5)

#define NS_UPDATE (1)
#define NS_CREATE (2)








#define NS_UPDATE_STATS_FIELDS (1)
#define NS_DONT_UPDATE_STATS_FIELDS (0)








#define NS_MAX_MAC_SEC_LABEL_VALUE (0xffff)


#define NS_ROOT_ENTRY (bld64m(0,1))

#define NS_ROOT_DOT_DOT_ENTRY (bld64m(0,2))

#define NS_MAX_RDDIR_ENTRIES_PER_BUFFER (5000)
#define NS_MAX_BUFFER_SIZE_ALLOWED (sizeof(ns_DirEntry_t) \ * NS_MAX_RDDIR_ENTRIES_PER_BUFFER)

#define NS_MAX_HARD_LINK_VALUE (0xffff)

#define NS_LENGTH_OF_RAND_BOGUS_NAME (128)

#define NS_NUM_ACL_REC_ENTRIES (500)

#define GENERATION_NUM_MASK (0xFFFF)

#define NS_ILLEGAL_ACL_OPTION_FLAGS (0xffffffc0)

#define NS_LOCK_MUTEX (1)
#define NS_DONT_LOCK_MUTEX (0)

#define NS_CBLIST_ARRAY_LEN (20)


#define NS_ADMIN_REINIT_FS_CACHE (0x00000001)
#define NS_ADMIN_PRINT_ALL_LOG_MSGS (0x00000002)
#define NS_ADMIN_PRINT_ALARM_LOG_MSGS (0x00000004)
#define NS_ADMIN_PRINT_EVENT_LOG_MSGS (0x00000008)
#define NS_ADMIN_PRINT_DEBUG_LOG_MSGS (0x00000010)
#define NS_ADMIN_PRINT_REQUEST_LOG_MSGS (0x00000020)
#define NS_ADMIN_PRINT_TRACE_LOG_MSGS (0x00000040)
#define NS_ADMIN_PRINT_TRACE_DETAIL_LOG_MSGS (0x00000080)

#define NS_ADMIN_PRINT_SECURITY_LOG_MSGS (0x00000100)
#define NS_ADMIN_DONT_PRINT_LOG_MSGS (0x00000200)
#define NS_ADMIN_CLEAR_ALL_SIGNAL_FLAGS (0x00000400)
#define NS_ADMIN_DUMP_PATH_NAME_CACHE (0x00000800)
#define NS_ADMIN_CLEAR_PATH_NAME_CACHE (0x00001000)
#define NS_ADMIN_DEL_PATH_NAME_CACHE_ENTRY (0x00002000)

#define NS_ADMIN_HALT_THE_CORE_SERVER (0x00004000)
#define NS_ADMIN_SET_OPERATIONAL_STATE (0x00010000)
#define NS_ADMIN_SET_SOFTWARE_STATE (0x00020000)
#define NS_ADMIN_SET_COMMUNICATION_STATE (0x00040000)
#define NS_ADMIN_DUMP_DISK_MAPS (0x00080000)

#define NS_ADMIN_ILLEGAL_BITS (0xfff00000)










































#define NS_INVALID_ORIGIN (bld64m(0,0))


#define NS_COUNT_ALL_ENTRIES (1)
#define NS_ONLY_COUNT_ONE_ENTRY (2)

#define NS_OBJECT_TYPE (0x80)
#define NS_OBJECT_TYPE_FILE (0x81)
#define NS_OBJECT_TYPE_SYM_LINK (0x82)
#define NS_OBJECT_TYPE_HARD_LINK (0x83)
#define NS_OBJECT_TYPE_DIRECTORY (0x84)
#define NS_OBJECT_TYPE_JUNCTION (0x85)
#define NS_OBJECT_TYPE_FILESET_ROOT (0x86)

#define NS_TEXT_TYPE_COMMENT (2)


#define NS_TEXT_TYPE_SYM_LINK (3)



#define NS_ACL_TYPE_OBJECT (7)
#define NS_ACL_TYPE_IC (8)
#define NS_ACL_TYPE_IO (9)

#define NS_GLOBAL_FILESET_TYPE (5)
#define NS_FILESET_ATTRS_TYPE (6)



#define NS_BITFILE_ID_LENGTH (32) /* bitfile identifier length */





#define NS_MAX_SYM_LINK_LENGTH (1024) /* max length of text */


#define NS_PERMS_CL (0x01) /* Control */
#define NS_PERMS_DL (0x04) /* Directory delete (w/wr permission) */
#define NS_PERMS_IN (0x08) /* Directory insert (w/wr permission) */

#define NS_PERMS_RD (0x20) /* Read */
#define NS_PERMS_WR (0x40) /* Write */
#define NS_PERMS_XS (0x80) /* Exec/Search */

#define NS_PERMS_ILLEGAL_MASK (0x12) /* Turn on the illegal bits. */

#define NS_ILLEGAL_ACL_OPTIONS_MASK (0xffffffc0)


#define NS_FS_MAX_ENTRIES_TO_RETURN (100)


























































#define NS_FS_CALLBACK_CREATE (1)
#define NS_FS_CALLBACK_UPDATE (2)

#define NS_FS_DELETE_FILESETID (1)
#define NS_FS_DELETE_OBJECT_ID (2)
#define NS_FS_DELETE_BOTH (3)

#define NS_MAX_FS_STRING_LENGTH (80)

#define NS_CHECK_GATEWAY (1)
#define NS_DONT_CHECK_GATEWAY (0)



#define NS_COPY_FROM_FS_CACHE (0)
#define NS_COPY_TO_FS_CACHE (1)

#endif /* ns_Constants_h */


pdata.h

HPSS4.5

HPSS6.2

#ifndef pdata_h
#define pdata_h



#define PDATA_TICKET_LENGTH (8)
#define PDATA_HDR_SIZE (48)

typedef struct pdata_hdr{
u_signed64 PdataDelimiter; /* Field for packet boundry */
u_signed64 XferID; /* Transfer ID for this packet */
u_signed64 Offset; /* Byte offset into transfer */
u_signed64 Length; /* # of bytes to transfer */
char SecurityTicket[PDATA_TICKET_LENGTH];
/* kerberos style ticket */
u_signed64 CheckSum; /* Packet check sum */
}pdata_hdr_t;

#define PDATA_DELIM_OFFSET (0)

#define PDATA_XFERID_OFFSET (8)
#define PDATA_OFFS_OFFSET (16)
#define PDATA_LENGTH_OFFSET (24)
#define PDATA_SECTKT_OFFSET (32)
#define PDATA_CHKSUM_OFFSET (40)



#if defined(unicos) || defined(__ALPHA__)
#define SETPDATADELIMITER(PD) ((PD) = (0x0123456789ABCDEF))
#define CHECKPDATADELIMITER(PD) (((PD) == 0x0123456789ABCDEF))
#else /* unicos || __ALPHA__ */
#define SETPDATADELIMITER(PD) ((PD) = bld64m(0x01234567,0x89ABCDEF))
#define CHECKPDATADELIMITER(PD) (((PD).high == 0x01234567)&&((PD).low == 0x89ABCDEF))
#endif /* unicos || __ALPHA__ */







extern int
pdata_recv_hdr(
int SocketDescriptor, /* socket to receive the header */
pdata_hdr_t *PdataHeaderPtr /* Memory to receive the header */
);

<略>

extern int
pdata_send_hdr_and_data_timeout_size(
int SocketDescriptor, /* socket to send the header */
pdata_hdr_t *PdataHeaderPtr, /* Memory location of the header */
char *DataBuffer, /* Data location */
int DataLength, /* # of bytes to send */
int SecTimeout, /* socket timeout in seconds */
int WriteSize /* amount of individual writes */
);




















int
mover_socket_send_buffer(
int SD, /* socket for data transfer */
u_signed64 XferID, /* transfer ID that identifies the data */
u_signed64 Offset, /* offset of the data into the transfer */
char *Buffer, /* data to be sent */
int Length, /* # bytes to be transferred */
char *Ticket /* kerberos style ticket for security */
);

<略>

int
mover_socket_get_buffer_timeout(
int SD, /* socket for data transfer */
u_signed64 XferID, /* transfer ID that identifies the data */
u_signed64 Offset, /* offset of the data into the transfer */
char *Buffer, /* where data is to be received */
int Length, /* # bytes to be transferred */
char *Ticket, /* kerberos style ticket for security */
int SecTimeout /* socket timeout in seconds */
);
















int
mover_socket_recv_data(
int SD, /* socket for data transfer */
u_signed64 XferID, /* transfer ID that identifies the data */
u_signed64 Offset, /* offset of the data into the transfer */
char *Buffer, /* where data is to be received */
int BufSize, /* Size of the buffer */
int *BytesRecvd, /* # bytes received (0 <= BytesRecvd <= BufSize) */
int NumOfPackets /* # of packets to receive before return */
);

<略>

int
mover_waitfor_requests_timeout(
int SD, /* Socket we are listening on */
u_signed64 XferID, /* ID of the transfer */
u_signed64 Offset, /* Start of transfer offset */
char *Buffer, /* where to receive data */
int BufSize, /* # of bytes to expect */
int *BytesMoved, /* return value of bytes moved */
int SecTimeout /* socket timeout in seconds */
);


















#endif

#ifndef pdata_h
#define pdata_h

#include "mvr_protocol.h"

#define PDATA_TICKET_LENGTH (8)
#define PDATA_HDR_SIZE (48)

typedef struct pdata_hdr{
u_signed64 PdataDelimiter; /* Field for packet boundry */
u_signed64 XferID; /* Transfer ID for this packet */
u_signed64 Offset; /* Byte offset into transfer */
u_signed64 Length; /* # of bytes to transfer */
char SecurityTicket[PDATA_TICKET_LENGTH];
/* kerberos style ticket */
u_signed64 CheckSum; /* Packet check sum */
}pdata_hdr_t;

#define PDATA_DELIM_OFFSET (0)
#define PDATA_DELIM_SIZE (8)
#define PDATA_XFERID_OFFSET (8)
#define PDATA_OFFS_OFFSET (16)
#define PDATA_LENGTH_OFFSET (24)
#define PDATA_SECTKT_OFFSET (32)
#define PDATA_CHKSUM_OFFSET (40)

#define PDATA_MSG_TYPE 0x02

#if defined(__ALPHA__)
#define SETPDATADELIMITER(PD) ((PD) = (0x0123456789ABCDEF))
#define CHECKPDATADELIMITER(PD) (((PD) == 0x0123456789ABCDEF))
#else /* __ALPHA__ */
#define SETPDATADELIMITER(PD) ((PD) = bld64m(0x01234567,0x89ABCDEF))
#define CHECKPDATADELIMITER(PD) (((PD).high == 0x01234567)&&((PD).low == 0x89ABCDEF))
#endif /* __ALPHA__ */

extern void
pdata_build_checksum(
pdata_hdr_t *PDHdr, /* where to receive the header */
u_signed64 *CheckSum /* return checksum */
);

extern int
pdata_recv_hdr(
int SocketDescriptor, /* socket to receive the header */
pdata_hdr_t *PdataHeaderPtr /* Memory to receive the header */
);

<略>

extern int
pdata_send_hdr_and_data_timeout_size(
int SocketDescriptor, /* socket to send the header */
pdata_hdr_t *PdataHeaderPtr, /* Memory location of the header */
char *DataBuffer, /* Data location */
int DataLength, /* # of bytes to send */
int SecTimeout, /* socket timeout in seconds */
int WriteSize /* amount of individual writes */
);

int
mover_socket_recv_protmsg(
int SD, /* ocket for data transfer */
u_signed64 XferID, /* transfer ID to identify the data */
int *ProtocolType, /* protocol msg header type received */
initiator_msg_t *InitPtr, /* ptr to returned initiator message */
pdata_hdr_t *PdataPtr /* pointer to returned pdata header */
);

int
mover_socket_recv_protmsg_timeout(
int SD, /* ocket for data transfer */
u_signed64 XferID, /* transfer ID to identify the data */
int *ProtocolType, /* type of protocol message received */
initiator_msg_t *InitPtr, /* ptr to returned initiator message */
pdata_hdr_t *PdataPtr, /* pointer to returned pdata header */
int SecTimeout /* socket timeout in seconds */
);


int
mover_socket_send_buffer(
int SD, /* socket for data transfer */
u_signed64 XferID, /* transfer ID that identifies the data */
u_signed64 Offset, /* offset of the data into the transfer */
char *Buffer, /* data to be sent */
int Length, /* # bytes to be transferred */
char *Ticket /* kerberos style ticket for security */
);

<略>

int
mover_socket_get_buffer_timeout(
int SD, /* socket for data transfer */
u_signed64 XferID, /* transfer ID that identifies the data */
u_signed64 Offset, /* offset of the data into the transfer */
char *Buffer, /* where data is to be received */
int Length, /* # bytes to be transferred */
char *Ticket, /* kerberos style ticket for security */
int SecTimeout /* socket timeout in seconds */
);

int
mover_socket_read_data(
int SD, /* socket for data transfer */
char *Buffer, /* where data is to be received */
int Length /* Size of the buffer */
);

int
mover_socket_read_data_timeout(
int SD, /* socket for data transfer */
char *Buffer, /* where data is to be received */
int BufSize, /* Size of the buffer */
int SecTimeout /* socket timeout in seconds */
);


int
mover_socket_recv_data(
int SD, /* socket for data transfer */
u_signed64 XferID, /* transfer ID that identifies the data */
u_signed64 Offset, /* offset of the data into the transfer */
char *Buffer, /* where data is to be received */
int BufSize, /* Size of the buffer */
int *BytesRecvd, /* # bytes received (0 <= BytesRecvd <= BufSize) */

int NumOfPackets /* # of packets to receive before return */
);

<略>

int
mover_waitfor_requests_timeout(
int SD, /* Socket we are listening on */
u_signed64 XferID, /* ID of the transfer */
u_signed64 Offset, /* Start of transfer offset */
char *Buffer, /* where to receive data */
int BufSize, /* # of bytes to expect */
int *BytesMoved, /* return value of bytes moved */
int SecTimeout /* socket timeout in seconds */
);

int
mover_socket_recv_data_only(
int SD, /* socket for data transfer */
u_signed64 Offset, /* offset of the data into the transfer */
char *Buffer, /* where data is to be received */
int Length /* length data to receive */
);

int
mover_socket_recv_data_only_timeout(
int SD, /* socket for data transfer */
u_signed64 Offset, /* offset of the data into the transfer */
char *Buffer, /* where data is to be received */
int Length, /* length data to receive */
int SecTimeout /* socket timeout in seconds */
);


#endif


pvl_definitions.h

HPSS4.5

HPSS6.2

#ifndef pvl_definitions_v0_0_included
#define pvl_definitions_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif
#ifndef hpss_idl_types_v0_0_included
#include <hpss_idl_types.h>
#endif
#ifndef hpss_media_type_v0_0_included
#include <hpss_media_type.h>
#endif
#ifndef hpss_limits_v0_0_included
#include <hpss_limits.h>
#endif
#define PVL_VERSION (2)
#define PVL_ASYNC_MOUNT (1)
#define PVL_EXPORT (3)
#define PVL_MOVE (4)
#define PVL_RELABEL (5)
#define PVL_SYNC_MOUNT (6)
#define PVL_IMPORT_DEFAULT (7)
#define PVL_IMPORT_SCRATCH (8)
#define PVL_DEFER_DISMOUNTS (9)
#define PVL_CHECKIN (10)
#define PVL_CHECKOUT (11)
#define PVL_SHELF_STAT (12)
#define PVL_IMPORT_OVERWRITE (13)
#define PVL_ACT_NULL (0)
#define PVL_ACT_UNCOMMITTED (1)
#define PVL_ACT_CART_WAIT (2)
#define PVL_ACT_CART_ASSIGNED (3)
#define PVL_ACT_DRIVE_WAIT (5)
#define PVL_ACT_MOUNT_PENDING (7)
#define PVL_ACT_MOUNT_FAILED (8)
#define PVL_ACT_MOUNTED (9)
#define PVL_ACT_DISMOUNT_PENDING (10)
#define PVL_ACT_INJECT (11)
#define PVL_ACT_EJECT (12)
#define PVL_ACT_READING_LABEL (13)
#define PVL_ACT_UNLOAD_PENDING (14)
#define PVL_ACT_DISMOUNTED (15)
#define PVL_ACT_CHECKIN (16)
#define PVL_ACT_CHECKOUT (17)
#define PVL_ACT_SHELF_STAT (18)
#define PVL_LABEL_NONE (1)
#define PVL_LABEL_FOREIGN (2)
#define PVL_LABEL_HPSS (3)
#define PVL_LABEL_DATA (4)
#define PVL_LABEL_NON_ANSI (5)
#define PVL_LABEL_NSL (6)
#define PVL_LABEL_UNKNOWN (7)
#define PVL_ALLOCATED (1)
#define PVL_UNALLOCATED (2)
#define PVL_ALLOCATED_BUT_ON_SHELF (3)
#define PVL_UNLABELED (4)

#define PVL_INCLUDE (1)
#define PVL_EXCLUDE (2)
#define PVL_ANY (3)
#define PVL_MAX_DRIVES_PER_PVR (256)
#define PVL_DO_EJECT (1)
#define CART_LABEL_SIZE (6)
#define CART_LABEL_LENGTH (8)

typedef struct {
idl_char Cart[8];
} cart_t;




typedef signed32 side_t;
#define SIDE_LABEL_SIZE (2)
#define VOL_LABEL_SIZE (8)

typedef struct {
idl_char Vol[12];
} vol_t;



#define DRIVE_ADDR_SIZE (64)

typedef struct {
idl_char Drive[64];
} drive_addr_t;



#define IOPORT_ADDR_SIZE (64)

typedef struct {
idl_char IOPort[64];
} ioport_addr_t;




typedef uuid_t client_t;
typedef signed32 job_id_t;
typedef signed32 drive_t;
typedef signed32 controller_t;






#define DRIVELIST_DISK (57)
#define DRIVELIST_TAPE (58)
#define DRIVELIST_BOTH (59)



#ifdef __cplusplus
}














#endif
#endif

#ifndef _PVL_DEFINITIONS_H_RPCGEN
#define _PVL_DEFINITIONS_H_RPCGEN

#include <rpc/rpc.h>
#ifndef _pvl_definitions_h
#define _pvl_definitions_h








#include "hpss_types.h"


#include "hpss_media_type.h"


#include "hpss_limits.h"

#define PVL_VERSION 2
#define PVL_ASYNC_MOUNT 1
#define PVL_EXPORT 3
#define PVL_MOVE 4
#define PVL_RELABEL 5
#define PVL_SYNC_MOUNT 6
#define PVL_IMPORT_DEFAULT 7
#define PVL_IMPORT_SCRATCH 8
#define PVL_DEFER_DISMOUNTS 9
#define PVL_CHECKIN 10
#define PVL_CHECKOUT 11
#define PVL_SHELF_STAT 12
#define PVL_IMPORT_OVERWRITE 13
#define PVL_ACT_NULL 0
#define PVL_ACT_UNCOMMITTED 1
#define PVL_ACT_CART_WAIT 2
#define PVL_ACT_CART_ASSIGNED 3
#define PVL_ACT_DRIVE_WAIT 5
#define PVL_ACT_MOUNT_PENDING 7
#define PVL_ACT_MOUNT_FAILED 8
#define PVL_ACT_MOUNTED 9
#define PVL_ACT_DISMOUNT_PENDING 10
#define PVL_ACT_INJECT 11
#define PVL_ACT_EJECT 12
#define PVL_ACT_READING_LABEL 13
#define PVL_ACT_UNLOAD_PENDING 14
#define PVL_ACT_DISMOUNTED 15
#define PVL_ACT_CHECKIN 16
#define PVL_ACT_CHECKOUT 17
#define PVL_ACT_SHELF_STAT 18
#define PVL_LABEL_NONE 1
#define PVL_LABEL_FOREIGN 2
#define PVL_LABEL_HPSS 3
#define PVL_LABEL_DATA 4
#define PVL_LABEL_NON_ANSI 5
#define PVL_LABEL_NSL 6
#define PVL_LABEL_UNKNOWN 7
#define PVL_ALLOCATED 1
#define PVL_UNALLOCATED 2
#define PVL_ALLOCATED_BUT_ON_SHELF 3
#define PVL_UNLABELED 4
#define PVL_ALLOCATED_NO_SHELF_INFO 5
#define PVL_INCLUDE 1
#define PVL_EXCLUDE 2
#define PVL_ANY 3
#define PVL_MAX_DRIVES_PER_PVR 256
#define PVL_DO_EJECT 0x00000001
#define CART_LABEL_SIZE 6
#define CART_LABEL_LENGTH 8

struct pvl_cart_struct {
char Cart[CART_LABEL_LENGTH];
};
typedef struct pvl_cart_struct pvl_cart_struct;

typedef pvl_cart_struct cart_t;

typedef signed32 side_t;
#define SIDE_LABEL_SIZE 2
#define VOL_LABEL_SIZE 8

struct pvl_vol_struct {
char Vol[HPSS_PV_NAME_SIZE];
};
typedef struct pvl_vol_struct pvl_vol_struct;

typedef pvl_vol_struct vol_t;
#define DRIVE_ADDR_SIZE 64

struct pvl_drive_addr {
char Drive[DRIVE_ADDR_SIZE];
};
typedef struct pvl_drive_addr pvl_drive_addr;

typedef pvl_drive_addr drive_addr_t;
#define IOPORT_ADDR_SIZE 64

struct pvl_ioport_addr {
char IOPort[IOPORT_ADDR_SIZE];
};
typedef struct pvl_ioport_addr pvl_ioport_addr;

typedef pvl_ioport_addr ioport_addr_t;

typedef hpss_uuid_t client_t;
typedef signed32 job_id_t;
typedef signed32 drive_t;

typedef struct {
u_int drive_array_t_len;
drive_t *drive_array_t_val;
} drive_array_t;

typedef signed32 controller_t;
#define DRIVELIST_DISK 57
#define DRIVELIST_TAPE 58
#define DRIVELIST_BOTH 59
#define SHELF_STATUS_ON 0
#define SHELF_STATUS_OFF 5
#endif


extern bool_t xdr_pvl_cart_struct();
extern bool_t xdr_cart_t();
extern bool_t xdr_side_t();
extern bool_t xdr_pvl_vol_struct();
extern bool_t xdr_vol_t();
extern bool_t xdr_pvl_drive_addr();
extern bool_t xdr_drive_addr_t();
extern bool_t xdr_pvl_ioport_addr();
extern bool_t xdr_ioport_addr_t();
extern bool_t xdr_client_t();
extern bool_t xdr_job_id_t();
extern bool_t xdr_drive_t();
extern bool_t xdr_drive_array_t();
extern bool_t xdr_controller_t();


#endif /* !_PVL_DEFINITIONS_H_RPCGEN */


pvl_drive_attr.h

HPSS4.5

HPSS6.2

#ifndef pvl_drive_attr_v0_0_included
#define pvl_drive_attr_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif
#ifndef hpss_idl_types_v0_0_included
#include <hpss_idl_types.h>
#endif
#ifndef hpss_limits_v0_0_included
#include <hpss_limits.h>
#endif
#ifndef pvl_definitions_v0_0_included
#include <pvl_definitions.h>
#endif
typedef struct {
drive_t DriveID;
unsigned32 Version;
u_signed64 RegisterBitmap;
uuid_t PVR;
drive_addr_t DriveAddress;
media_type_t DriveType;
unsigned32 Controller;
signed32 PollingInterval;
timestamp_t MaintenanceDate;
vol_t MountedVolume;
unsigned32 DriveFlag;
unsigned32 MountsSinceLastMaint;
unsigned32 OperationalState;
unsigned32 UsageState;
unsigned32 AdministrativeState;
unsigned32 DriveState;
unsigned32 DriveErrorCount;
unsigned32 PhysicalDriveCount;
uuid_t MvrID;
} drive_data_t;




typedef struct {
drive_t DriveID;
drive_addr_t DriveAddress;
vol_t MountedVolume;
uuid_t MvrID;
unsigned32 DriveState;
job_id_t JobID;
} pvl_drive_list_t;




typedef struct {
signed32 DriveCount;
pvl_drive_list_t DriveList[1];
} api_pvl_drive_list_t;





#define PVL_GENERIC_DRIVE_ID (0)
#define PVL_NULL_DRIVE_ID (0)
#define PVL_DRIVE_IN_USE (1)
#define PVL_DRIVE_FREE (2)
#define PVL_DRIVE_DISMOUNT_PENDING (3)
#define PVL_FLAG_DRIVE_MODIFIED (1)
#define PVL_DRIVE_DRIVE_ID (0)
#define PVL_DRIVE_VERSION (1)
#define PVL_DRIVE_REGISTER_BITMAP (2)
#define PVL_DRIVE_PVR (3)
#define PVL_DRIVE_DRIVE_ADDRESS (4)
#define PVL_DRIVE_CONTROLLER (5)
#define PVL_DRIVE_MAINTENANCE_DATE (6)
#define PVL_DRIVE_POLLING_INTERVAL (7)
#define PVL_DRIVE_MOUNTED_VOLUME (8)
#define PVL_DRIVE_MOUNTS_SINCE_MAINT (9)
#define PVL_DRIVE_OPERATIONAL_STATE (10)
#define PVL_DRIVE_USAGE_STATE (11)
#define PVL_DRIVE_ADMINISTRATIVE_STATE (12)
#define PVL_DRIVE_DRIVE_STATE (13)
#define PVL_DRIVE_DRIVE_TYPE (14)
#define PVL_DRIVE_MOVER (15)
#define PVL_DRIVE_ERROR_COUNT (16)
#define PVL_DRIVE_PHYSICAL_COUNT (17)
#define PVL_DRIVE_FLAG (18)

#ifdef __cplusplus
}






#endif
#endif

#ifndef _PVL_DRIVE_ATTR_H_RPCGEN
#define _PVL_DRIVE_ATTR_H_RPCGEN

#include <rpc/rpc.h>
#ifndef _pvl_drive_attr_h
#define _pvl_drive_attr_h








#include "hpss_types.h"


#include "hpss_limits.h"


#include "pvl_definitions.h"

struct drive_data {
drive_t DriveID;
unsigned32 Version;
u_signed64 RegisterBitmap;
hpss_uuid_t PVR;
drive_addr_t DriveAddress;
media_type_t DriveType;
unsigned32 Controller;
signed32 PollingInterval;
timestamp_t MaintenanceDate;
vol_t MountedVolume;
unsigned32 DriveFlag;
unsigned32 MountsSinceLastMaint;
unsigned32 OperationalState;
unsigned32 UsageState;
unsigned32 AdministrativeState;
unsigned32 DriveState;
unsigned32 DriveErrorCount;
unsigned32 PhysicalDriveCount;
hpss_uuid_t MvrID;
};
typedef struct drive_data drive_data;

typedef drive_data drive_data_t;

struct pvl_drive_list {
drive_t DriveID;
drive_addr_t DriveAddress;
vol_t MountedVolume;
hpss_uuid_t MvrID;
unsigned32 DriveState;
job_id_t JobID;
};
typedef struct pvl_drive_list pvl_drive_list;

typedef pvl_drive_list pvl_drive_list_t;

struct api_pvl_drive_list {
struct {
u_int DriveList_len;
pvl_drive_list_t *DriveList_val;
} DriveList;
};
typedef struct api_pvl_drive_list api_pvl_drive_list;

typedef api_pvl_drive_list api_pvl_drive_list_t;
#define PVL_GENERIC_DRIVE_ID 0
#define PVL_NULL_DRIVE_ID 0
#define PVL_DRIVE_IN_USE 1
#define PVL_DRIVE_FREE 2
#define PVL_DRIVE_DISMOUNT_PENDING 3
#define PVL_FLAG_DRIVE_MODIFIED 1
#define PVL_DRIVE_DRIVE_ID 0
#define PVL_DRIVE_VERSION 1
#define PVL_DRIVE_REGISTER_BITMAP 2
#define PVL_DRIVE_PVR 3
#define PVL_DRIVE_DRIVE_ADDRESS 4
#define PVL_DRIVE_CONTROLLER 5
#define PVL_DRIVE_MAINTENANCE_DATE 6
#define PVL_DRIVE_POLLING_INTERVAL 7
#define PVL_DRIVE_MOUNTED_VOLUME 8
#define PVL_DRIVE_MOUNTS_SINCE_MAINT 9
#define PVL_DRIVE_OPERATIONAL_STATE 10
#define PVL_DRIVE_USAGE_STATE 11
#define PVL_DRIVE_ADMINISTRATIVE_STATE 12
#define PVL_DRIVE_DRIVE_STATE 13
#define PVL_DRIVE_DRIVE_TYPE 14
#define PVL_DRIVE_MOVER 15
#define PVL_DRIVE_ERROR_COUNT 16
#define PVL_DRIVE_PHYSICAL_COUNT 17
#define PVL_DRIVE_FLAG 18
#endif


extern bool_t xdr_drive_data();
extern bool_t xdr_drive_data_t();
extern bool_t xdr_pvl_drive_list();
extern bool_t xdr_pvl_drive_list_t();
extern bool_t xdr_api_pvl_drive_list();
extern bool_t xdr_api_pvl_drive_list_t();

#endif /* !_PVL_DRIVE_ATTR_H_RPCGEN */


rtm_interface_def.h

HPSS4.5

HPSS6.2





#ifndef rtm_interface_def_v0_0_included
#define rtm_interface_def_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif
#ifndef hpss_idl_types_v0_0_included
#include <hpss_idl_types.h>
#endif
#ifndef hpss_iod_v0_0_included
#include <hpss_iod.h>
#endif
#ifndef nsConfig_v0_0_included
#include <ns_Config.h>
#endif
#ifndef mm_idl_types_v0_0_included
#include <mm_idl_types.h>
#endif



#define RTM_NUMBER_OF_THREADS (4)
#define RTM_COMMENT_LEN (128)
#define RTM_SHORT_PVNAME_LEN (6)
#define RTM_BFS_DEFAULT_REQLIST (1)
#define RTM_BFS_SECONDARY_REQLIST (2)
#define RTM_SS_DEFAULT_REQLIST (1)
#define RTM_MVR_DEFAULT_REQLIST (1)
#define RTM_GK_DEFAULT_REQLIST (1)

typedef enum {
RTM_REQ_INVALID=0,
RTM_REQ_INITIALIZING=1,
RTM_REQ_QUEUED=2,
RTM_REQ_IN_PROGRESS=3,
RTM_REQ_BLOCKED=4,
RTM_REQ_SUSPENDED=5,
RTM_REQ_ERROR_STATE=6,
RTM_REQ_COMPLETED=7,
RTM_REQ_NOT_INUSE=8} rtm_state_t;





typedef enum {
RTM_INVALID_REQ=0,
RTM_BFS_CREATE_REQ=1,
RTM_BFS_OPEN_REQ=2,
RTM_BFS_CLOSE_REQ=3,
RTM_BFS_UNLINK_REQ=4,
RTM_BFS_READ_REQ=5,
RTM_BFS_WRITE_REQ=6,
RTM_BFS_SET_ATTRIB_BF_REQ=7,
RTM_BFS_SET_ATTRIB_BF_O_REQ=8,
RTM_BFS_GET_ATTRIB_BF_REQ=9,
RTM_BFS_GET_ATTRIB_BF_O_REQ=10,
RTM_BFS_MIGRATE_REQ=11,
RTM_BFS_STAGE_REQ=12,
RTM_BFS_STAGE_BACKG_REQ=13,
RTM_BFS_CLEAR_REQ=14,
RTM_BFS_PURGE_REQ=15,
RTM_BFS_MODIFY_REQ=16,
RTM_BFS_COPYFILE_REQ=17,
RTM_SS_TAPE_WRITE_REQ=18,
RTM_SS_TAPE_READ_REQ=19,
RTM_SS_TAPE_MOVE_SEG_REQ=20,
RTM_SS_TAPE_POSITION_REQ=21,
RTM_SS_TAPE_CREATE_RESOURCE_REQ=22,
RTM_SS_TAPE_DELETE_RESOURCE_REQ=23,
RTM_SS_TAPE_WTM=24,
RTM_SS_TAPE_SET_ATTRS_REQ=25,
RTM_SS_TAPE_GET_ATTRS_REQ=26,
RTM_SS_TAPE_MOUNT_REQ=27,
RTM_SS_TAPE_DISMOUNT_REQ=28,
RTM_SS_TAPE_STARTMOUNT_REQ=29,
RTM_SS_DISK_WRITE_REQ=30,
RTM_SS_DISK_READ_REQ=31,
RTM_SS_DISK_MOVE_SEG_REQ=32,
RTM_SS_DISK_CREATE_RESOURCE_REQ=33,
RTM_SS_DISK_DELETE_RESOURCE_REQ=34,
RTM_SS_DISK_SET_ATTRS_REQ=35,
RTM_SS_DISK_GET_ATTRS_REQ=36,
RTM_SS_DISK_MOUNT_REQ=37,
RTM_SS_DISK_DISMOUNT_REQ=38,
RTM_SS_PVL_VERIFY_REQ=39,
RTM_SS_SHUTDOWN_REQ=40,
RTM_SS_PVL_DISMOUNT_HANDLER_REQ=41,
RTM_SS_OPEN_CONNECTION_REQ=42,
RTM_SS_CLOSE_CONNECTION_REQ=43,
RTM_SS_BEGIN_SESSION_REQ=44,
RTM_SS_END_SESSION_REQ=45,
RTM_SS_SSM_CONNECT_REQ=46,
RTM_SS_SSM_NOTIFICATION_REQ=47,
RTM_SS_SIGNAL_HANDLER_REQ=48,
RTM_SS_SERVER_GET_ATTR_REQ=49,
RTM_SS_SERVER_SET_ATTR_REQ=50,
RTM_SS_SERVER_INIT_REQ=51,
RTM_SS_GET_SCSTATS_REQ=52,
RTM_SS_RESET_MAPS_REQ=53,
RTM_SS_CACHE_FLUSH_REQ=54,
RTM_SS_PVL_CALLBACK_REQ=55,
RTM_SS_PING_SSM_REQ=56,





RTM_MVR_READ_REQ=57,
RTM_MVR_WRITE_REQ=58,
RTM_MVR_DEV_GETATTR_REQ=59,
RTM_MVR_DEV_SETATTR_REQ=60,
RTM_MVR_UNLOAD_REQ=61,
RTM_MVR_FLUSH_REQ=62,
RTM_MVR_WRITETM_REQ=63,
RTM_MVR_READLABEL_REQ=64,
RTM_MVR_WRITELABEL_REQ=65,
RTM_MVR_CLEAR_REQ=66,
RTM_MVR_LOAD_REQ=67,
RTM_MVR_LOADDISPLAY_REQ=68,
RTM_GK_OPEN_REQ=69,
RTM_GK_CLOSE_REQ=70,
RTM_GK_CREATE_REQ=71,
RTM_GK_CREATE_COMPLETE_REQ=72,
RTM_GK_STAGE_REQ=73,
RTM_GK_STAGE_COMPLETE_REQ=74,
RTM_GK_CLEAN_UP_CLIENT_REQ=75,
RTM_GK_MONITOR_REQ=76,
RTM_GK_PASS_THRU_REQ=77,
RTM_GK_QUERY_REQ=78,
RTM_GK_READ_POLICY_REQ=79,
RTM_GK_CLOSE_CONNECTION_REQ=80,
RTM_GK_TERM_CONNECT_THREAD_REQ=81,
RTM_GK_OPEN_CONNECTION_REQ=82,
RTM_GK_GET_ATTR_REQ=83,
RTM_GK_SET_ATTR_REQ=84,
RTM_GK_SRVR_GET_ATTR_REQ=85,
RTM_GK_SRVR_SET_ATTR_REQ=86,
RTM_GK_SSM_CONNECT_REQ=87,
RTM_GK_INITIALIZE_REQ=88,
RTM_GK_SIGNALTHREAD_REQ=89,
RTM_GK_SHUTDOWN_REQ=90} rtm_request_code_t;





typedef enum {
RTM_WAIT_REASON_INVALID=0,
RTM_WAIT_BFS_SS_CREATE=1,
RTM_WAIT_BFS_SS_DELETE=2,
RTM_WAIT_BFS_SS_DELETELIST=3,
RTM_WAIT_BFS_SS_READ=4,
RTM_WAIT_BFS_SS_WRITE=5,
RTM_WAIT_BFS_SS_GETATTRS=6,
RTM_WAIT_BFS_SS_SETATTRS=7,
RTM_WAIT_BFS_SS_SCLASS_STATS=8,
RTM_WAIT_BFS_SS_BEGINSESS=9,
RTM_WAIT_BFS_SS_ENDSESS=10,
RTM_WAIT_BFS_SS_STARTMNT=11,
RTM_WAIT_BFS_NS_GETFSATTRS=12,
RTM_WAIT_BFS_NS_GETNAME=13,
RTM_WAIT_BFS_NS_SETATTRS=14,
RTM_WAIT_BFS_FOR_FILE=15,
RTM_WAIT_BFS_MOVER_REPLY=16,
RTM_WAIT_BFS_ASYNCH_SCHDL=17,
RTM_WAIT_SS_PVL_MOUNT=18,
RTM_WAIT_SS_PVL_RESERVED_3=19,
RTM_WAIT_SS_PVL_GETATTRS=20,
RTM_WAIT_SS_PVL_ALLOCATE=21,
RTM_WAIT_SS_PVL_DEALLOCATE=22,
RTM_WAIT_SS_PVL_CONNECT=23,
RTM_WAIT_SS_PVL_CLOSE_CONNECT=24,
RTM_WAIT_SS_PVL_RESERVED_2=25,
RTM_WAIT_SS_PVL_CANCEL_JOBS=26,
RTM_WAIT_SS_PVL_DISMOUNT=27,
RTM_WAIT_SS_PVL_MOUNT_NEW=28,
RTM_WAIT_SS_PVL_MOUNT_ADD=29,
RTM_WAIT_SS_PVL_MOUNT_COMMIT=30,
RTM_WAIT_SS_PVL_MOUNT_COMPLETE=31,
RTM_WAIT_SS_PVL_Q_GET_ATTRS=32,
RTM_WAIT_SS_PVL_VOL_GET_ATTRS=33,
RTM_WAIT_SS_PVL_RESERVED_1=34,
RTM_WAIT_SS_MVR_READ_DATA=35,
RTM_WAIT_SS_MVR_WRITE_DATA=36,
RTM_WAIT_SS_MVR_WRITE_TM=37,
RTM_WAIT_SS_MVR_POSITION=38,
RTM_WAIT_SS_MVR_ASSIGN_IP=39,
RTM_WAIT_SS_MVR_RESERVED_1=40,
RTM_WAIT_SS_SESSION_RESERVED_1=41,
RTM_WAIT_SS_SESSION_BUSY=42,
RTM_WAIT_SS_SESSION_ASSIGN_VV=43,
RTM_WAIT_SS_SSM_CONNECT=44,
RTM_WAIT_SS_SSM_NOTIFICATION=45,
RTM_WAIT_SS_SEG_CACHE_ENTRY=46,
RTM_WAIT_SS_VV_CACHE_ENTRY=47,

RTM_WAIT_SS_PV_CACHE_ENTRY=48,
RTM_WAIT_SS_MAP_CACHE_ENTRY=49,
RTM_WAIT_SS_PV_HANDOFF=50,
RTM_WAIT_SS_TX_SHUTDOWN=51,
RTM_WAIT_SS_UNREGISTER_SERVICE=52,
RTM_WAIT_SS_OFD_MANAGER=53,
RTM_WAIT_SS_PV_REFERENCE=54,
RTM_WAIT_SS_PV_DISMOUNT=55,
RTM_WAIT_SS_SEG_FREE=56,
RTM_WAIT_SS_RESERVED_2=57,
RTM_WAIT_SS_RESERVED_3=58,
RTM_WAIT_MVR_DEVICE_AVAIL=59,
RTM_WAIT_MVR_DEVICE_OPEN=60,
RTM_WAIT_MVR_DEVICE_IO=61,
RTM_WAIT_MVR_DEVICE_POS=62,
RTM_WAIT_MVR_DEVICE_GET_ABSPOS=63,
RTM_WAIT_MVR_DEVICE_SYNC=64,
RTM_WAIT_MVR_DEVICE_WTM=65,
RTM_WAIT_MVR_DEVICE_CLOSE=66,
RTM_WAIT_MVR_DEVICE_REWIND=67,
RTM_WAIT_MVR_DEVICE_UNLOAD=68,
RTM_WAIT_MVR_DEVICE_DISPLAY=69,
RTM_WAIT_MVR_CLIENT_CONN=70,
RTM_WAIT_MVR_CLIENT_SEND=71,
RTM_WAIT_MVR_CLIENT_RECV=72,
RTM_WAIT_MVR_CLIENT_CLOSE=73,
RTM_WAIT_MVR_PROT_RECV=74,
RTM_WAIT_MVR_PROT_SEND=75,
RTM_WAIT_MVR_ACTIVE_INFO=76,
RTM_WAIT_MVR_IOR_SEND=77,
RTM_WAIT_MVR_IOD_RECV=78,
RTM_WAIT_GK_SITE_OPEN=79,
RTM_WAIT_GK_SITE_OPEN_STATS=80,
RTM_WAIT_GK_SITE_CLOSE=81,
RTM_WAIT_GK_SITE_CREATE=82,
RTM_WAIT_GK_SITE_CREATE_STATS=83,
RTM_WAIT_GK_SITE_CREATE_COMPLET=84,
RTM_WAIT_GK_SITE_STAGE=85,
RTM_WAIT_GK_SITE_STAGE_STATS=86,
RTM_WAIT_GK_SITE_STAGE_COMPLETE=87,
RTM_WAIT_GK_SITE_MONITOR=88,
RTM_WAIT_GK_SITE_PASS_THRU=89,
RTM_WAIT_GK_SITE_READ_POLICY=90,
RTM_WAIT_GK_SITE_SHUTDOWN=91,
RTM_WAIT_GK_RETRY=92,
RTM_WAIT_GK_ASYNC_QUEUE=93,
RTM_WAIT_GK_MO_LOCK=94,
RTM_WAIT_GK_SRVR_STATE_LOCK=95,
RTM_WAIT_GK_SSM_BINDING=96,
RTM_WAIT_GK_SSM_CONNECT=97,
RTM_WAIT_GK_SSM_NOTIFICATION=98,
RTM_WAIT_GK_SIGNAL=99,
RTM_WAIT_GK_SHUTDOWN=100,
RTM_WAIT_GK_SHUTDOWN_GK_IF=101,
RTM_WAIT_GK_SHUTDOWN_ADMIN_IF=102,
RTM_WAIT_GK_SHUTDOWN_AVAL_IF=103,
RTM_WAIT_GK_SHUTDOWN_TX=104} rtm_wait_reason_t;




typedef enum {
RTM_WAIT_INVALID=0,
RTM_WAIT_NONE=1,
RTM_WAIT_COMMENT=2,
RTM_WAIT_SERVER=3,
RTM_WAIT_SOID=4,
RTM_WAIT_NAME=5,
RTM_WAIT_JOB=6,
RTM_WAIT_ID=7,
RTM_WAIT_ADDRESS=8,
RTM_WAIT_MAXVALUE=9} rtm_wait_type_t;




#define RTM_NAME_LEN (1024)
#define RTM_FLAG_ONE_REQUEST (1)
#define RTM_FLAG_ALL_REQUESTS (2)
#define RTM_FLAG_OBJECT (4)

typedef enum {
RTM_OBJECT_INVALID=0,
RTM_OBJECT_BFID=1,
RTM_OBJECT_PVNAME=2} rtm_objectname_t;





typedef struct {
rtm_objectname_t ObjectName;
union {
unsigned32 one;
hpssoid_t BfId;
idl_char PVName[12];
} objects_u;
} rtm_object_t;



#define RTM_BFS_SUBSYTEMID_BIT (0)
#define RTM_BFS_CELLID_BIT (1)
#define RTM_BFS_FILESETID_BIT (2)
#define RTM_BFS_FILESETNAME_BIT (3)
#define RTM_BFS_BFID_BIT (4)
#define RTM_BFS_BFPATHNAME_BIT (5)
#define RTM_BFS_USERID_BIT (6)
#define RTM_BFS_USERGID_BIT (7)
#define RTM_BFS_COSID_BIT (8)
#define RTM_BFS_SCLASSID_BIT (9)
#define RTM_BFS_BYTESREQUESTED_BIT (10)
#define RTM_BFS_BYTESMOVED_BIT (11)
















typedef struct rtm_bfs_req_attr {
unsigned32 Bf_bitlist;
unsigned32 Flags;
unsigned32 SubsystemId;
unsigned32 UserCellId;
unsigned32 FilesetId;
idl_char *FilesetName;
hpssoid_t BfId;
idl_char *BfPathname;
unsigned32 UserId;
unsigned32 UserGId;
unsigned32 COSId;
unsigned32 SClassId;
u_signed64 BytesRequested;
u_signed64 BytesMoved;













} rtm_bfs_req_attr_t;



#define RTM_SS_PVLJOBID_BIT (0)
#define RTM_SS_MVRID_BIT (1)
#define RTM_SS_DEVICEID_BIT (2)
#define RTM_SS_SEGMENT_BIT (3)
#define RTM_SS_VV_BIT (4)
#define RTM_SS_PVNAME_BIT (5)
#define RTM_SS_BYTESREQUESTED_BIT (6)
#define RTM_SS_BYTESMOVED_BIT (7)
#define RTM_SS_CURRENTRELPOS_BIT (8)
#define RTM_SS_CURRENTABSPOS_BIT (9)
#define RTM_SS_EXCESSVVS_BIT (10)
#define RTM_SS_SCLASSID_BIT (11)
#define RTM_SS_FAMILYID_BIT (12)

typedef struct rtm_ss_req_attr {
unsigned32 Ss_bitlist;
unsigned32 Flags;
signed32 PVLJobId;
uuid_t MvrId;
signed32 DeviceId;
hpssoid_t Segment;
hpssoid_t VV;
idl_char PVName[12];
u_signed64 BytesRequested;
u_signed64 BytesMoved;
relative_address_t CurrentRelPosition;
absolute_address_t CurrentAbsPosition;
signed32 ExcessVVsInUse;
unsigned32 SClassId;
unsigned32 FamilyId;
} rtm_ss_req_attr_t;
#define RTM_MVR_INITIALXFEROFFSET_BIT (0)
#define RTM_MVR_CURRENTXFEROFFSET_BIT (1)
#define RTM_MVR_DEVICEID_BIT (2)
#define RTM_MVR_VOLUMEID_BIT (3)
#define RTM_MVR_BYTESREQUESTED_BIT (4)
#define RTM_MVR_BYTESMOVED_BIT (5)

typedef struct rtm_mvr_req_attr {
unsigned32 Mvr_bitlist;
unsigned32 Flags;
u_signed64 InitialTransferOffset;
u_signed64 CurrentTransferOffset;
idl_long_int DeviceId;
idl_char VolumeId[8];
u_signed64 BytesRequested;
u_signed64 BytesMoved;
} rtm_mvr_req_attr_t;



#define RTM_GK_AUTHORIZEDCALLER_BIT (0)
#define RTM_GK_BITFILEID_BIT (1)
#define RTM_GK_CLIENTCONNECTID_BIT (2)
#define RTM_GK_CONNECTIONID_BIT (3)
#define RTM_GK_CONTROLNO_BIT (4)
#define RTM_GK_DCECELLID_BIT (5)
#define RTM_GK_GROUPID_BIT (6)
#define RTM_GK_HOSTADDR_BIT (7)
#define RTM_GK_OFLAG_BIT (8)
#define RTM_GK_REQUESTTYPE_BIT (9)
#define RTM_GK_STAGEFLAGS_BIT (10)
#define RTM_GK_STAGELENGTH_BIT (11)
#define RTM_GK_STAGEOFFSET_BIT (12)
#define RTM_GK_STAGESTORAGELEVEL_BIT (13)
#define RTM_GK_USERID_BIT (14)
#define RTM_GK_WAITTIME_BIT (15)

typedef struct rtm_gk_req_attr {
unsigned32 Gk_bitlist;
unsigned32 Flags;
unsigned32 AuthorizedCaller;
hpssoid_t BitFileId;
uuid_t ConnectionId;
uuid_t ClientConnectId;
uuid_t ControlNo;
unsigned32 DCECellId;
unsigned32 GroupId;
hsec_sockaddr_t HostAddr;
unsigned32 OFlag;
unsigned32 RequestType;
unsigned32 StageFlags;
u_signed64 StageLength;
u_signed64 StageOffset;
unsigned32 StageStorageLevel;
unsigned32 UserId;
unsigned32 WaitTime;
} rtm_gk_req_attr_t;




typedef enum {
RTM_SERVER_INVALID=0,
RTM_BFS_SERVER=1,
RTM_SS_SERVER=2,
RTM_MVR_SERVER=3,
RTM_GK_SERVER=4,
RTM_SERVER_MAXVALUE=5} rtm_server_type_t;





typedef struct {
rtm_server_type_t ServerType;
union {
idl_char RTMComment[128];
rtm_bfs_req_attr_t BFSReqInfo;
rtm_ss_req_attr_t SSReqInfo;
rtm_mvr_req_attr_t MVRReqInfo;
rtm_gk_req_attr_t GKReqInfo;
} Attribs_u;
} rtm_serverspecific_t;




typedef struct {
rtm_wait_type_t WaitType;
union {
idl_char RTMComment[128];
idl_char NOcomment[255];
idl_char Comment[255];
uuid_t ServerId;
hpssoid_t Soid;
idl_char Name[1024];
unsigned32 PvlJob;
unsigned32 ID;
address_t Address;
} WaitResource_u;
} rtm_wait_resource_t;




typedef struct req_array_entry {
hpss_reqid_t ReqId;
rtm_request_code_t ReqCode;
rtm_state_t ReqState;
idl_char ServerDescName[32];
uuid_t ServerId;
timestamp_sec_t StartTime;
timestamp_sec_t UpdateTime;
rtm_serverspecific_t ServerSpecific;
unsigned32 ThreadId;
unsigned32 ProcessId;
rtm_wait_reason_t WaitReason;
rtm_wait_resource_t WaitResource;
} rtm_req_array_entry_t;




typedef struct req_array {
unsigned32 Size;
rtm_req_array_entry_t ReqArray[1];
} rtm_req_array_t;






#ifdef __cplusplus
}




























#endif
#endif

#ifndef _RTM_INTERFACE_DEF_H_RPCGEN
#define _RTM_INTERFACE_DEF_H_RPCGEN

#include <rpc/rpc.h>
#ifndef _rtm_interface_def_h
#define _rtm_interface_def_h












#include "hpss_types.h"


#include "hpss_iod.h"







#include "hpss_limits.h"
#include "hpssoid.h"
#include "hpss_sec_info.h"
#define RTM_NUMBER_OF_THREADS 4
#define RTM_COMMENT_LEN 128
#define RTM_SHORT_PVNAME_LEN 6
#define RTM_CORE_DEFAULT_REQLIST 1
#define RTM_CORE_SECONDARY_REQLIST 2

#define RTM_MVR_DEFAULT_REQLIST 1
#define RTM_GK_DEFAULT_REQLIST 1

enum rtm_state {
RTM_REQ_INVALID = 0,
RTM_REQ_INITIALIZING = 1,
RTM_REQ_QUEUED = 2,
RTM_REQ_IN_PROGRESS = 3,
RTM_REQ_BLOCKED = 4,
RTM_REQ_SUSPENDED = 5,
RTM_REQ_ERROR_STATE = 6,
RTM_REQ_COMPLETED = 7,
RTM_REQ_NOT_INUSE = 8
};
typedef enum rtm_state rtm_state;

typedef rtm_state rtm_state_t;

enum rtm_request_code {
RTM_INVALID_REQ = 0,
RTM_CORE_CREATE_REQ = 1,
RTM_CORE_OPEN_REQ = 2,
RTM_CORE_CLOSE_REQ = 3,
RTM_CORE_UNLINK_REQ = 4,
RTM_CORE_READ_REQ = 5,
RTM_CORE_WRITE_REQ = 6,
RTM_CORE_SET_ATTRIB_BF_REQ = 7,
RTM_CORE_SET_ATTRIB_BF_O_REQ = 8,
RTM_CORE_GET_ATTRIB_BF_REQ = 9,
RTM_CORE_GET_ATTRIB_BF_O_REQ = 10,
RTM_CORE_MIGRATE_REQ = 11,
RTM_CORE_STAGE_REQ = 12,
RTM_CORE_STAGE_BACKG_REQ = 13,
RTM_CORE_CLEAR_REQ = 14,
RTM_CORE_PURGE_REQ = 15,
RTM_CORE_MODIFY_REQ = 16,
RTM_CORE_COPYFILE_REQ = 17,
RTM_CORE_TAPE_WRITE_REQ = 18,
RTM_CORE_TAPE_READ_REQ = 19,
RTM_CORE_TAPE_MOVE_SEG_REQ = 20,
RTM_CORE_TAPE_POSITION_REQ = 21,
RTM_CORE_TAPE_CREATE_RSRC_REQ = 22,
RTM_CORE_TAPE_DELETE_RSRC_REQ = 23,
RTM_CORE_TAPE_WTM = 24,
RTM_CORE_TAPE_SET_ATTRS_REQ = 25,
RTM_CORE_TAPE_GET_ATTRS_REQ = 26,
RTM_CORE_TAPE_MOUNT_REQ = 27,
RTM_CORE_TAPE_DISMOUNT_REQ = 28,
RTM_CORE_TAPE_STARTMOUNT_REQ = 29,
RTM_CORE_DISK_WRITE_REQ = 30,
RTM_CORE_DISK_READ_REQ = 31,
RTM_CORE_DISK_MOVE_SEG_REQ = 32,
RTM_CORE_DISK_CREATE_RSRC_REQ = 33,
RTM_CORE_DISK_DELETE_RSRC_REQ = 34,
RTM_CORE_DISK_SET_ATTRS_REQ = 35,
RTM_CORE_DISK_GET_ATTRS_REQ = 36,
RTM_CORE_DISK_MOUNT_REQ = 37,
RTM_CORE_DISK_DISMOUNT_REQ = 38,
RTM_CORE_PVL_VERIFY_REQ = 39,
RTM_CORE_SHUTDOWN_REQ = 40,
RTM_CORE_PVL_DISMNT_HANDLER_REQ = 41,
RTM_CORE_OPEN_CONNECTION_REQ = 42,
RTM_CORE_CLOSE_CONNECTION_REQ = 43,
RTM_CORE_BEGIN_SESSION_REQ = 44,
RTM_CORE_END_SESSION_REQ = 45,
RTM_CORE_SSM_CONNECT_REQ = 46,
RTM_CORE_SSM_NOTIFICATION_REQ = 47,
RTM_CORE_SIGNAL_HANDLER_REQ = 48,
RTM_CORE_SERVER_GET_ATTR_REQ = 49,
RTM_CORE_SERVER_SET_ATTR_REQ = 50,
RTM_CORE_SERVER_INIT_REQ = 51,
RTM_CORE_GET_SCSTATS_REQ = 52,
RTM_CORE_RESET_MAPS_REQ = 53,
RTM_CORE_CACHE_FLUSH_REQ = 54,
RTM_CORE_PVL_CALLBACK_REQ = 55,
RTM_CORE_PING_SSM_REQ = 56,
RTM_CORE_GET_VV_COND_REQ = 57,
RTM_CORE_SET_VV_COND_REQ = 58,
RTM_CORE_GET_PV_SOID_REQ = 59,
RTM_CORE_RESERVED_1 = 60,
RTM_CORE_RESERVED_2 = 61,
RTM_MVR_READ_REQ = 62,
RTM_MVR_WRITE_REQ = 63,
RTM_MVR_DEV_GETATTR_REQ = 64,
RTM_MVR_DEV_SETATTR_REQ = 65,
RTM_MVR_UNLOAD_REQ = 66,
RTM_MVR_FLUSH_REQ = 67,
RTM_MVR_WRITETM_REQ = 68,
RTM_MVR_READLABEL_REQ = 69,
RTM_MVR_WRITELABEL_REQ = 70,
RTM_MVR_CLEAR_REQ = 71,
RTM_MVR_LOAD_REQ = 72,
RTM_MVR_LOADDISPLAY_REQ = 73,
RTM_GK_OPEN_REQ = 74,
RTM_GK_CLOSE_REQ = 75,
RTM_GK_CREATE_REQ = 76,
RTM_GK_CREATE_COMPLETE_REQ = 77,
RTM_GK_STAGE_REQ = 78,
RTM_GK_STAGE_COMPLETE_REQ = 79,
RTM_GK_CLEAN_UP_CLIENT_REQ = 80,
RTM_GK_MONITOR_REQ = 81,
RTM_GK_PASS_THRU_REQ = 82,
RTM_GK_QUERY_REQ = 83,
RTM_GK_READ_POLICY_REQ = 84,
RTM_GK_CLOSE_CONNECTION_REQ = 85,
RTM_GK_TERM_CONNECT_THREAD_REQ = 86,
RTM_GK_OPEN_CONNECTION_REQ = 87,
RTM_GK_GET_ATTR_REQ = 88,
RTM_GK_SET_ATTR_REQ = 89,
RTM_GK_SRVR_GET_ATTR_REQ = 90,
RTM_GK_SRVR_SET_ATTR_REQ = 91,
RTM_GK_SSM_CONNECT_REQ = 92,
RTM_GK_INITIALIZE_REQ = 93,
RTM_GK_SIGNALTHREAD_REQ = 94,
RTM_GK_SHUTDOWN_REQ = 95

};
typedef enum rtm_request_code rtm_request_code;

typedef rtm_request_code rtm_request_code_t;

enum rtm_wait_reason {
RTM_WAIT_REASON_INVALID = 0,
RTM_WAIT_CORE_SS_CREATE = 1,
RTM_WAIT_CORE_SS_DELETE = 2,
RTM_WAIT_CORE_SS_DELETELIST = 3,
RTM_WAIT_CORE_SS_READ = 4,
RTM_WAIT_CORE_SS_WRITE = 5,
RTM_WAIT_CORE_SS_GETATTRS = 6,
RTM_WAIT_CORE_SS_SETATTRS = 7,
RTM_WAIT_CORE_SS_SCLASS_STATS = 8,
RTM_WAIT_CORE_SS_BEGINSESS = 9,
RTM_WAIT_CORE_SS_ENDSESS = 10,
RTM_WAIT_CORE_SS_STARTMNT = 11,
RTM_WAIT_CORE_NS_GETFSATTRS = 12,
RTM_WAIT_CORE_NS_GETNAME = 13,
RTM_WAIT_CORE_NS_SETATTRS = 14,
RTM_WAIT_CORE_FOR_FILE = 15,
RTM_WAIT_CORE_MOVER_REPLY = 16,
RTM_WAIT_CORE_ASYNCH_SCHDL = 17,
RTM_WAIT_CORE_PVL_MOUNT = 18,
RTM_WAIT_CORE_PVL_RESERVED_3 = 19,
RTM_WAIT_CORE_PVL_GETATTRS = 20,
RTM_WAIT_CORE_PVL_ALLOCATE = 21,
RTM_WAIT_CORE_PVL_DEALLOCATE = 22,
RTM_WAIT_CORE_PVL_CONNECT = 23,
RTM_WAIT_CORE_PVL_CLOSE_CONNECT = 24,
RTM_WAIT_CORE_PVL_RESERVED_2 = 25,
RTM_WAIT_CORE_PVL_CANCEL_JOBS = 26,
RTM_WAIT_CORE_PVL_DISMOUNT = 27,
RTM_WAIT_CORE_PVL_MOUNT_NEW = 28,
RTM_WAIT_CORE_PVL_MOUNT_ADD = 29,
RTM_WAIT_CORE_PVL_MOUNT_COMMIT = 30,
RTM_WAIT_CORE_PVL_MNT_COMPLETE = 31,
RTM_WAIT_CORE_PVL_Q_GET_ATTRS = 32,
RTM_WAIT_CORE_PVL_VOL_GET_ATTRS = 33,
RTM_WAIT_CORE_PVL_RESERVED_1 = 34,
RTM_WAIT_CORE_MVR_READ_DATA = 35,
RTM_WAIT_CORE_MVR_WRITE_DATA = 36,
RTM_WAIT_CORE_MVR_WRITE_TM = 37,
RTM_WAIT_CORE_MVR_POSITION = 38,
RTM_WAIT_CORE_MVR_ASSIGN_IP = 39,
RTM_WAIT_CORE_MVR_RESERVED_1 = 40,
RTM_WAIT_CORE_SESSION_RESV_1 = 41,
RTM_WAIT_CORE_SESSION_BUSY = 42,
RTM_WAIT_CORE_SESSION_ASSIGN_VV = 43,
RTM_WAIT_CORE_SSM_CONNECT = 44,
RTM_WAIT_CORE_SSM_NOTIFICATION = 45,
RTM_WAIT_CORE_SEG_CACHE_ENTRY = 46,
RTM_WAIT_CORE_VV_CACHE_ENTRY = 47,
RTM_WAIT_CORE_VV_GETATTRS = 48,
RTM_WAIT_CORE_PV_CACHE_ENTRY = 49,
RTM_WAIT_CORE_MAP_CACHE_ENTRY = 50,
RTM_WAIT_CORE_PV_HANDOFF = 51,
RTM_WAIT_CORE_RESERVED_5 = 52,
RTM_WAIT_CORE_UNREG_SERVICE = 53,
RTM_WAIT_CORE_RESERVED_4 = 54,
RTM_WAIT_CORE_PV_REFERENCE = 55,
RTM_WAIT_CORE_PV_DISMOUNT = 56,
RTM_WAIT_CORE_SEG_FREE = 57,
RTM_WAIT_CORE_RESERVED_2 = 58,
RTM_WAIT_CORE_RESERVED_3 = 59,
RTM_WAIT_MVR_DEVICE_AVAIL = 60,
RTM_WAIT_MVR_DEVICE_OPEN = 61,
RTM_WAIT_MVR_DEVICE_IO = 62,
RTM_WAIT_MVR_DEVICE_POS = 63,
RTM_WAIT_MVR_DEVICE_GET_ABSPOS = 64,
RTM_WAIT_MVR_DEVICE_SYNC = 65,
RTM_WAIT_MVR_DEVICE_WTM = 66,
RTM_WAIT_MVR_DEVICE_CLOSE = 67,
RTM_WAIT_MVR_DEVICE_REWIND = 68,
RTM_WAIT_MVR_DEVICE_UNLOAD = 69,
RTM_WAIT_MVR_DEVICE_DISPLAY = 70,
RTM_WAIT_MVR_CLIENT_CONN = 71,
RTM_WAIT_MVR_CLIENT_SEND = 72,
RTM_WAIT_MVR_CLIENT_RECV = 73,
RTM_WAIT_MVR_CLIENT_CLOSE = 74,
RTM_WAIT_MVR_PROT_RECV = 75,
RTM_WAIT_MVR_PROT_SEND = 76,
RTM_WAIT_MVR_ACTIVE_INFO = 77,
RTM_WAIT_MVR_IOR_SEND = 78,
RTM_WAIT_MVR_IOD_RECV = 79,
RTM_WAIT_GK_SITE_OPEN = 80,
RTM_WAIT_GK_SITE_OPEN_STATS = 81,
RTM_WAIT_GK_SITE_CLOSE = 82,
RTM_WAIT_GK_SITE_CREATE = 83,
RTM_WAIT_GK_SITE_CREATE_STATS = 84,
RTM_WAIT_GK_SITE_CREATE_COMPLET = 85,
RTM_WAIT_GK_SITE_STAGE = 86,
RTM_WAIT_GK_SITE_STAGE_STATS = 87,
RTM_WAIT_GK_SITE_STAGE_COMPLETE = 88,
RTM_WAIT_GK_SITE_MONITOR = 89,
RTM_WAIT_GK_SITE_PASS_THRU = 90,
RTM_WAIT_GK_SITE_READ_POLICY = 91,
RTM_WAIT_GK_SITE_SHUTDOWN = 92,
RTM_WAIT_GK_RETRY = 93,
RTM_WAIT_GK_ASYNC_QUEUE = 94,
RTM_WAIT_GK_MO_LOCK = 95,
RTM_WAIT_GK_SRVR_STATE_LOCK = 96,
RTM_WAIT_GK_SSM_BINDING = 97,
RTM_WAIT_GK_SSM_CONNECT = 98,
RTM_WAIT_GK_SSM_NOTIFICATION = 99,
RTM_WAIT_GK_SIGNAL = 100,
RTM_WAIT_GK_SHUTDOWN = 101,
RTM_WAIT_GK_SHUTDOWN_GK_IF = 102,
RTM_WAIT_GK_SHUTDOWN_ADMIN_IF = 103,
RTM_WAIT_GK_SHUTDOWN_AVAL_IF = 104

};
typedef enum rtm_wait_reason rtm_wait_reason;

typedef rtm_wait_reason rtm_wait_reason_t;

enum rtm_wait_type {
RTM_WAIT_INVALID = 0,
RTM_WAIT_NONE = 1,
RTM_WAIT_COMMENT = 2,
RTM_WAIT_SERVER = 3,
RTM_WAIT_SOID = 4,
RTM_WAIT_NAME = 5,
RTM_WAIT_JOB = 6,
RTM_WAIT_ID = 7,
RTM_WAIT_ADDRESS = 8,
RTM_WAIT_MAXVALUE = 9
};
typedef enum rtm_wait_type rtm_wait_type;

typedef rtm_wait_type rtm_wait_type_t;
#define RTM_NAME_LEN 1024
#define RTM_FLAG_ONE_REQUEST 0x1
#define RTM_FLAG_ALL_REQUESTS 0x2
#define RTM_FLAG_OBJECT 0x4

enum rtm_objectname {
RTM_OBJECT_INVALID = 0,
RTM_OBJECT_BFID = 1,
RTM_OBJECT_PVNAME = 2
};
typedef enum rtm_objectname rtm_objectname;

typedef rtm_objectname rtm_objectname_t;

struct rtm_object {
rtm_objectname_t ObjectName;
union {
unsigned32 one;
hpssoid_t BfId;
char PVName[HPSS_PV_NAME_SIZE];
} rtm_object_u;
};
typedef struct rtm_object rtm_object;

typedef rtm_object rtm_object_t;
#define RTM_CORE_SUBSYTEMID_BIT 0
#define RTM_CORE_REALMID_BIT 1
#define RTM_CORE_FILESETID_BIT 2
#define RTM_CORE_FILESETNAME_BIT 3
#define RTM_CORE_BFID_BIT 4
#define RTM_CORE_BFPATHNAME_BIT 5
#define RTM_CORE_USERID_BIT 6
#define RTM_CORE_USERGID_BIT 7
#define RTM_CORE_COSID_BIT 8
#define RTM_CORE_BFS_SCLASSID_BIT 9
#define RTM_CORE_BFS_BYTESREQUESTED_BIT 10
#define RTM_CORE_BFS_BYTESMOVED_BIT 11
#define RTM_CORE_PVLJOBID_BIT 12
#define RTM_CORE_MVRID_BIT 13
#define RTM_CORE_DEVICEID_BIT 14
#define RTM_CORE_SEGMENT_BIT 15
#define RTM_CORE_VV_BIT 16
#define RTM_CORE_PVNAME_BIT 17
#define RTM_CORE_CURRENTRELPOS_BIT 18
#define RTM_CORE_CURRENTABSPOS_BIT 19
#define RTM_CORE_EXCESSVVS_BIT 20
#define RTM_CORE_FAMILYID_BIT 21
#define RTM_CORE_SS_SCLASSID_BIT 22
#define RTM_CORE_SS_BYTESREQUESTED_BIT 23
#define RTM_CORE_SS_BYTESMOVED_BIT 24
#define RTM_FILESET_NAME_LENGTH 32
#define RTM_BF_PATHNAME_LENGTH 128


struct rtm_core_req_attr {
unsigned32 CoreServer_bitlist;
unsigned32 Flags;
unsigned32 SubsystemId;
unsigned32 UserRealmId;
u_signed64 FilesetId;
char FilesetName[RTM_FILESET_NAME_LENGTH];
hpssoid_t BfId;
char BfPathname[RTM_BF_PATHNAME_LENGTH];
unsigned32 UserId;
unsigned32 UserGId;
unsigned32 COSId;
unsigned32 BFS_SClassId;
u_signed64 BFS_BytesRequested;
u_signed64 BFS_BytesMoved;
signed32 PVLJobId;
hpss_uuid_t MvrId;
signed32 DeviceId;
hpssoid_t Segment;
hpssoid_t VV;
char PVName[HPSS_PV_NAME_SIZE];
relative_address_t CurrentRelPosition;
absolute_address_t CurrentAbsPosition;
signed32 ExcessVVsInUse;
unsigned32 FamilyId;
unsigned32 SS_SClassId;
u_signed64 SS_BytesRequested;
u_signed64 SS_BytesMoved;

};
typedef struct rtm_core_req_attr rtm_core_req_attr;

typedef rtm_core_req_attr rtm_core_req_attr_t;































#define RTM_MVR_INITIALXFEROFFSET_BIT 0
#define RTM_MVR_CURRENTXFEROFFSET_BIT 1
#define RTM_MVR_DEVICEID_BIT 2
#define RTM_MVR_VOLUMEID_BIT 3
#define RTM_MVR_BYTESREQUESTED_BIT 4
#define RTM_MVR_BYTESMOVED_BIT 5

struct rtm_mvr_req_attr {
unsigned32 Mvr_bitlist;
unsigned32 Flags;
u_signed64 InitialTransferOffset;
u_signed64 CurrentTransferOffset;
long DeviceId;
char VolumeId[HPSS_PV_NAME_LENGTH];
u_signed64 BytesRequested;
u_signed64 BytesMoved;
};
typedef struct rtm_mvr_req_attr rtm_mvr_req_attr;

typedef rtm_mvr_req_attr rtm_mvr_req_attr_t;
#define RTM_GK_AUTHORIZEDCALLER_BIT 0
#define RTM_GK_BITFILEID_BIT 1
#define RTM_GK_CLIENTCONNECTID_BIT 2
#define RTM_GK_CONNECTIONID_BIT 3
#define RTM_GK_CONTROLNO_BIT 4
#define RTM_GK_REALMID_BIT 5
#define RTM_GK_GROUPID_BIT 6
#define RTM_GK_HOSTADDR_BIT 7
#define RTM_GK_OFLAG_BIT 8
#define RTM_GK_REQUESTTYPE_BIT 9
#define RTM_GK_STAGEFLAGS_BIT 10
#define RTM_GK_STAGELENGTH_BIT 11
#define RTM_GK_STAGEOFFSET_BIT 12
#define RTM_GK_STAGESTORAGELEVEL_BIT 13
#define RTM_GK_USERID_BIT 14
#define RTM_GK_WAITTIME_BIT 15

struct rtm_gk_req_attr {
unsigned32 Gk_bitlist;
unsigned32 Flags;
unsigned32 AuthorizedCaller;
hpssoid_t BitFileId;
hpss_uuid_t ConnectionId;
hpss_uuid_t ClientConnectId;
hpss_uuid_t ControlNo;
unsigned32 RealmId;
unsigned32 GroupId;
hpss_sec_sockaddr_t HostAddr;
unsigned32 OFlag;
unsigned32 RequestType;
unsigned32 StageFlags;
u_signed64 StageLength;
u_signed64 StageOffset;
unsigned32 StageStorageLevel;
unsigned32 UserId;
unsigned32 WaitTime;
};
typedef struct rtm_gk_req_attr rtm_gk_req_attr;

typedef rtm_gk_req_attr rtm_gk_req_attr_t;

enum rtm_server_type {
RTM_SERVER_INVALID = 0,
RTM_CORE_SERVER = 1,

RTM_MVR_SERVER = 2,
RTM_GK_SERVER = 3,
RTM_SERVER_MAXVALUE = 4
};
typedef enum rtm_server_type rtm_server_type;

typedef rtm_server_type rtm_server_type_t;

struct rtm_serverspecific {
rtm_server_type_t ServerType;
union {
char RTMComment[RTM_COMMENT_LEN];
rtm_core_req_attr_t COREReqInfo;

rtm_mvr_req_attr_t MVRReqInfo;
rtm_gk_req_attr_t GKReqInfo;
} rtm_serverspecific_u;
};
typedef struct rtm_serverspecific rtm_serverspecific;

typedef rtm_serverspecific rtm_serverspecific_t;

struct rtm_wait_resource {
rtm_wait_type_t WaitType;
union {
char RTMComment[RTM_COMMENT_LEN];
char NOcomment[HPSS_MAX_COMMENT_LENGTH];
char Comment[HPSS_MAX_COMMENT_LENGTH];
hpss_uuid_t ServerId;
hpssoid_t Soid;
char Name[RTM_NAME_LEN];
unsigned32 PvlJob;
unsigned32 ID;
address_t Address;
} rtm_wait_resource_u;
};
typedef struct rtm_wait_resource rtm_wait_resource;

typedef rtm_wait_resource rtm_wait_resource_t;

struct req_array_entry {
hpss_reqid_t ReqId;
rtm_request_code_t ReqCode;
rtm_state_t ReqState;
char ServerDescName[HPSS_MAX_DESC_NAME];
hpss_uuid_t ServerId;
timestamp_sec_t StartTime;
timestamp_sec_t UpdateTime;
rtm_serverspecific_t ServerSpecific;
unsigned32 ThreadId;
unsigned32 ProcessId;
rtm_wait_reason_t WaitReason;
rtm_wait_resource_t WaitResource;
};
typedef struct req_array_entry req_array_entry;

typedef req_array_entry rtm_req_array_entry_t;

struct req_array {
struct {
u_int ReqArray_len;
rtm_req_array_entry_t *ReqArray_val;
} ReqArray;
};
typedef struct req_array req_array;

typedef req_array rtm_req_array_t;
#endif


extern bool_t xdr_rtm_state();
extern bool_t xdr_rtm_state_t();
extern bool_t xdr_rtm_request_code();
extern bool_t xdr_rtm_request_code_t();
extern bool_t xdr_rtm_wait_reason();
extern bool_t xdr_rtm_wait_reason_t();
extern bool_t xdr_rtm_wait_type();
extern bool_t xdr_rtm_wait_type_t();
extern bool_t xdr_rtm_objectname();
extern bool_t xdr_rtm_objectname_t();
extern bool_t xdr_rtm_object();
extern bool_t xdr_rtm_object_t();
extern bool_t xdr_rtm_core_req_attr();
extern bool_t xdr_rtm_core_req_attr_t();
extern bool_t xdr_rtm_mvr_req_attr();
extern bool_t xdr_rtm_mvr_req_attr_t();
extern bool_t xdr_rtm_gk_req_attr();
extern bool_t xdr_rtm_gk_req_attr_t();
extern bool_t xdr_rtm_server_type();
extern bool_t xdr_rtm_server_type_t();
extern bool_t xdr_rtm_serverspecific();
extern bool_t xdr_rtm_serverspecific_t();
extern bool_t xdr_rtm_wait_resource();
extern bool_t xdr_rtm_wait_resource_t();
extern bool_t xdr_req_array_entry();
extern bool_t xdr_rtm_req_array_entry_t();
extern bool_t xdr_req_array();
extern bool_t xdr_rtm_req_array_t();


#endif /* !_RTM_INTERFACE_DEF_H_RPCGEN */


ss_pvlist.h

HPSS4.5

HPSS6.2

#ifndef ss_pvlist_v0_0_included
#define ss_pvlist_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif

#ifndef hpss_limits_v0_0_included
#include <hpss_limits.h>
#endif

#define PV_MOUNT_SUCCESS (1)
#define PV_UNMOUNT_NOENT (2)
#define PV_UNMOUNT_SUCCESS (4)
#define PV_ON_SHELF (8)

typedef struct pv_list_element {
idl_char Name[12];
unsigned32 Flags;
} pv_list_element_t;




typedef struct pv_list {
signed32 Length;
pv_list_element_t List[1];
} pv_list_t;






#ifdef __cplusplus
}




#endif
#endif

#ifndef _SS_PVLIST_H_RPCGEN
#define _SS_PVLIST_H_RPCGEN

#include <rpc/rpc.h>
#ifndef _ss_pvlist_h
#define _ss_pvlist_h







#include "hpss_types.h"

#include "hpss_limits.h"


#define PV_MOUNT_SUCCESS 0x00000001
#define PV_UNMOUNT_NOENT 0x00000002
#define PV_UNMOUNT_SUCCESS 0x00000004
#define PV_ON_SHELF 0x00000008

struct pv_list_element {
char Name[HPSS_PV_NAME_SIZE];
unsigned32 Flags;
};
typedef struct pv_list_element pv_list_element;

typedef pv_list_element pv_list_element_t;

struct pv_list {
struct {
u_int List_len;
pv_list_element_t *List_val;
} List;
};
typedef struct pv_list pv_list;

typedef pv_list pv_list_t;
#endif


extern bool_t xdr_pv_list_element();
extern bool_t xdr_pv_list_element_t();
extern bool_t xdr_pv_list();
extern bool_t xdr_pv_list_t();


#endif /* !_SS_PVLIST_H_RPCGEN */


ss_types.h

HPSS4.5

HPSS6.2

#ifndef ss_types_v0_0_included
#define ss_types_v0_0_included
#ifndef IDLBASE_H
#include <dce/idlbase.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef nbase_v0_0_included
#include <dce/nbase.h>
#endif

#ifndef idlreladdr_v0_0_included
#include <hpssaddr.h>
#endif
#ifndef idlhpssoid_v0_0_included
#include <hpssoid.h>
#endif
#ifndef hpss_iod_v0_0_included
#include <hpss_iod.h>
#endif
#ifndef idlowner_v0_0_included
#include <owner.h>
#endif
#ifndef acct_idl_v0_0_included
#include <acct_hpss.h>
#endif
#ifndef idlsecurity_v0_0_included
#include <security.h>
#endif

#ifndef hpss_server_attr_v0_0_included
#include <hpss_server_attr.h>
#endif

#ifndef ss_pvlist_v0_0_included
#include <ss_pvlist.h>
#endif

#define DEVICE_READ (1)
#define DEVICE_WRITE (2)
#define DEVICE_ACTIVE (4)
#define MVR_IP_SIZE (8)
typedef struct device_table_record {
signed32 MountId;
signed32 DeviceID;
signed32 MvrFd;
uuid_t MvrId;
idl_char MvrHostName[64];
idl_char MvrIP[8];
idl_char PVName[12];
} device_table_record_t;
#define SET_PV_UNUSED1 (63)
#define SET_PV_ACCT (62)
#define SET_PV_TYPE (61)
#define SET_PV_BLOCKSIZE (60)
#define SET_PV_MINTMBLOCKS (59)
#define SET_PV_MAXTMBLOCKS (58)
#define SET_PV_FLAGS (57)
#define SET_PV_ESTIMATEDSIZE (56)
#define SET_PV_ACTUALSIZE (55)
#define SET_PV_NEXTWRITEADDR (54)
#define SET_PV_NEXTABSOLUTEWRITEADDR (53)
#define SET_PV_CREATIONTIME (52)
#define SET_PV_UPDATETIME (51)
#define SET_PV_LASTREAD (50)
#define SET_PV_LASTWRITE (49)
#define SET_PV_LASTMAINT (48)
#define SET_PV_INSERVICE (47)
#define SET_PV_SECURITY (46)
#define SET_PV_SERVICEMOUNTCNT (45)
#define SET_PV_MAINTMOUNTCNT_FIELD (44)
#define SET_PV_VVSEQUENCE (43)
#define SET_PV_REFCNT (42)
#define SET_PV_VVID (41)
#define SET_PV_CURRENTRELADDR (40)
#define SET_PV_CURRENTABSADDR (39)
#define SET_PV_MOVERINFO (38)
#define SET_PV_OPERATIONALSTATE (37)
#define SET_PV_USAGESTATE (36)
#define SET_PV_ADMINISTRATIVESTATE (35)
#define SET_PV_PVSTATE (34)
#define SET_PV_REGISTERBITMAP (33)
#define SET_PV_FORMAT_FLAGS (32)
#define SET_PV_FAMILYID (31)
#define PV_ALL_FIELDS_LOWER (-1)
#define PV_ALL_FIELDS_UPPER (1)
#define PV_WRITE_PROTECT (1)
#define PV_EOM (2)
#define PV_ABSADDR (4)
#define PV_OFFLINE (8)
#define PV_ABS_ADDR_IS_LBA (16)
#define VOL_NULL (0)
#define VOL_SCRATCH (1)
#define VOL_ALLOCATED (2)
#define VOL_FOREIGN (3)
#define VOL_HPSS_IMPORT (4)
#define VOL_ALLOCATED_AND_FULL (5)
#define GENERIC_PV_ID "GENPV000"
typedef struct physical_volume_md {
idl_char Name[12];
media_type_t Type;
unsigned32 BlockSize;
unsigned32 MinTMBlocks;
unsigned32 MaxTMBlocks;
unsigned32 FormatFlags;
unsigned32 Flags;
signed32 OperationalState;
signed32 UsageState;
signed32 AdministrativeState;
signed32 PVState;
signed32 MountCntSinceService;
signed32 MountCntSinceMaint;
signed32 VVSequence;
signed32 RefCnt;
acct_rec_t Acct;
u_signed64 EstimatedSize;
u_signed64 ActualSize;
relative_address_t NextWriteAddr;
old_absolute_address_t NextAbsoluteWriteAddr;
timestamp_sec_t Creation;
timestamp_sec_t Update;
timestamp_sec_t LastRead;
timestamp_sec_t LastWrite;
timestamp_sec_t LastMaint;
timestamp_sec_t InService;
security_t Security;
hpssoid_t VVID;
unsigned32 FamilyId;
unsigned32 Unused[7];
} physical_volume_md_t;



typedef struct pv_attr {
physical_volume_md_t MD;
u_signed64 RegisterBitMap;
relative_address_t CurrentRelativeAddr;
absolute_address_t CurrentAbsoluteAddr;
device_table_record_t DeviceTable;
} pv_attr_t;
#define SET_VV_ENDSECTION (63)
#define SET_VV_VV_ID (62)
#define SET_VV_ACCT (61)
#define SET_VV_SCLASSID (60)
#define SET_VV_FORM (59)
#define SET_VV_BLKSZ (58)
#define SET_VV_STRIPEWIDTH (57)
#define SET_VV_STRIPELENGTH (56)
#define SET_VV_ESTIMATEDSIZE (55)
#define SET_VV_ACTUALSIZE (54)
#define SET_VV_NEXTBYTEADDR (53)
#define SET_VV_NEXTABSOLUTEADDR (52)
#define SET_VV_REFCNT (51)
#define SET_VV_OWNERS (50)
#define SET_VV_SECURITY (49)
#define SET_VV_FLAGS (48)
#define SET_VV_PVLIST (47)
#define SET_VV_CURRENTRELATIVEADDR (46)
#define SET_VV_CURRENTABSOLUTEADDR (45)
#define SET_VV_OPERATIONALSTATE (44)
#define SET_VV_USAGESTATE (43)
#define SET_VV_ADMINISTRATIVESTATE (42)
#define SET_VV_VVSTATE (41)
#define SET_VV_REGISTERBITMAP (40)
#define SET_VV_LASTREAD (39)
#define SET_VV_LASTWRITE (38)
#define SET_VV_CREATION (37)
#define SET_VV_UPDATE (36)
#define SET_VV_NUMWRITES (35)
#define SET_VV_NUMREADS (34)
#define SET_VV_FAMILYID (33)
#define VV_ALL_FIELDS_LOWER (2147483647)
#define VV_ALL_FIELDS_UPPER (0)
#define VV_WRITE_PROTECT (1)
#define VV_EOM (2)


#define VV_OFFLINE (4)
#define STRIPED (1)
#define CONCATENATED (2)
#define PARITYSTRIPED (3)
#define MIRRORED (4)

typedef struct virtual_volume_md {
hpssoid_t VVID;
acct_rec_t Acct;
unsigned32 SClassId;
unsigned32 Form;
unsigned32 BlkSz;
unsigned32 StripeWidth;
unsigned32 Flags;
signed32 RefCnt;
signed32 NumReads;
signed32 NumWrites;
signed32 OperationalState;
signed32 UsageState;
signed32 AdministrativeState;
signed32 VVState;
u_signed64 StripeLength;
u_signed64 EstimatedSize;
u_signed64 ActualSize;
relative_address_t NextByteAddr;
old_composite_address_t NextAbsoluteAddr;
owner_rec_t Owners;
security_t Security;
timestamp_sec_t LastRead;
timestamp_sec_t LastWrite;
timestamp_sec_t Creation;
timestamp_sec_t Update;
unsigned32 FamilyId;
unsigned32 NAAFlags;
unsigned32 Unused[7];
} virtual_volume_md_t;



typedef struct vv_attr {
virtual_volume_md_t MD;
u_signed64 RegisterBitMap;
pv_list_t *PVList;
relative_address_t CurrentRelativeAddr;
composite_address_t CurrentAbsoluteAddr;
} vv_attr_t;
#define SET_MAP_BITMAP (63)
#define SET_MAP_VVID (62)
#define SET_MAP_OPERATIONAL_STATE (61)
#define SET_MAP_USAGE_STATE (60)
#define SET_MAP_ADMINISTRATIVE_STATE (59)
#define SET_MAP_MAP_STATE (58)
#define SET_MAP_REGISTER_BITMAP (57)
#define SET_MAP_FLAGS (56)
#define SET_MAP_TAPESZ (55)
#define SET_MAP_USABLE_LENGTH (55)
#define SET_MAP_ESTSZ (54)
#define SET_MAP_ACTUAL_LENGTH (54)
#define SET_MAP_BLKSZ (53)
#define SET_MAP_SPACE_LEFT (52)
#define SET_MAP_FREE_SPACE (52)
#define SET_MAP_SCLASSID (51)
#define SET_MAP_NUMBER_SEGMENTS (50)
#define SET_MAP_CURRENT_SSID (49)
#define SET_MAP_FAMILYID (48)
#define SET_MAP_CLUSTER_LENGTH (47)
#define MAP_ALL_FIELDS_LOWER (131071)
#define MAP_ALL_FIELDS_UPPER (0)
#define MAP_NULL (0)
#define MAP_FREE (1)
#define MAP_ALLOCATED (2)
#define MAP_EOM (3)
#define MAP_EMPTY (4)
#define MAP_TALLY (5)
#define MAP_RETIRED (6)

#define MAP_NEVER_WRITTEN_FLAG (1)
#define MAP_OFFLINE (2)
#define MAP_STAT_FREE (4)
#define MAP_STAT_PARTIAL (8)
#define MAP_DISK_MAP (16)




typedef struct storage_map_md {
hpssoid_t VVID;
hpssoid_t CurrentSSID;
signed32 NumActiveSegments;
signed32 OperationalState;
signed32 UsageState;
signed32 AdministrativeState;
signed32 MapState;
unsigned32 SClassId;
unsigned32 Flags;
unsigned32 BlkSz;
u_signed64 TapeSz;
u_signed64 EstSz;
u_signed64 SpaceLeft;
unsigned32 FamilyId;
unsigned32 Unused_0;
u_signed64 ClusterLength;
unsigned32 Unused[4];
} storage_map_md_t;




#define MAX_ALLOC_BITMAP_SIZE (2048)
#define NUM_MAP_BITS (16384)
typedef struct disk_storage_map_md {
hpssoid_t VVID;
signed32 NumActiveSegments;
signed32 OperationalState;
signed32 UsageState;
signed32 AdministrativeState;
signed32 MapState;
unsigned32 SClassId;
unsigned32 Flags;
unsigned32 BlkSz;
u_signed64 UsableLength;
u_signed64 ActualLength;
u_signed64 FreeSpace;
u_signed64 ClusterLength;
unsigned32 Unused[2];
idl_byte BitMap[2048];
} disk_storage_map_md_t;




typedef struct ss_map_attr {
storage_map_md_t MD;
u_signed64 RegisterBitMap;
} ss_map_attr_t;
































































































































































#define SET_SS_BLOCKSIZE (63)
#define SET_SS_SSID (62)
#define SET_SS_VVID (61)
#define SET_SS_ACCT (60)
#define SET_SS_SCLASSID (59)
#define SET_SS_REFCNT (58)
#define SET_SS_NUMREADS (57)
#define SET_SS_NUMWRITES (56)
#define SET_SS_OPERATIONAL_STATE (55)
#define SET_SS_USAGE_STATE (54)
#define SET_SS_ADMINISTRATIVE_STATE (53)
#define SET_SS_SS_STATE (52)
#define SET_SS_REGISTER_BITMAP (51)

#define SET_SS_ALLOCATED_LENGTH (50)
#define SET_SS_WRITTEN_LENGTH (49)
#define SET_SS_ABSOLUTE_START_ADDR (48)
#define SET_SS_RELATIVE_START_ADDR (47)
#define SET_SS_RELATIVE_NEXTBYTEADDR (46)
#define SET_SS_OWNERS (45)
#define SET_SS_SECURITY (44)
#define SET_SS_LAST_READ (43)
#define SET_SS_LAST_WRITE (42)
#define SET_SS_CREATION (41)
#define SET_SS_UPDATE (40)
#define SS_ALL_FIELDS_LOWER (16777215)
#define SS_ALL_FIELDS_UPPER (0)
#define SEG_NULL (0)
#define SEG_ALLOCATED (1)
#define SEG_LENGTH_FIXED (2)

typedef struct storage_segment_md {
hpssoid_t SSID;
hpssoid_t VVID;
acct_rec_t Acct;
unsigned32 SClassId;
signed32 RefCnt;
signed32 NumReads;
signed32 NumWrites;
signed32 OperationalState;
signed32 UsageState;
signed32 AdministrativeState;
signed32 SSState;
unsigned32 BlockSize;
u_signed64 AllocatedLength;
u_signed64 WrittenLength;
old_composite_address_t AbsoluteStartAddr;
relative_address_t RelativeStartAddr;
relative_address_t RelativeNextByteAddr;
owner_rec_t Owners;
security_t Security;
timestamp_sec_t LastRead;
timestamp_sec_t LastWrite;
timestamp_sec_t Creation;
timestamp_sec_t Update;
unsigned32 ASAFlags;
unsigned32 Unused[7];
} storage_segment_md_t;




typedef struct ss_attr {
storage_segment_md_t MD;
u_signed64 RegisterBitMap;
} ss_attr_t;




typedef struct ssrv_attr {
uuid_t ServerID;
u_signed64 RegisterBitMap;
u_signed64 TotalVirtualVolumes;
u_signed64 TotalAllocatedVolumes;
u_signed64 TotalBytes;
u_signed64 UsedBytes;
u_signed64 FreeBytes;
idl_char SS_MAP_MetaData_Name[128];
idl_char SS_SS_MetaData_Name[128];
idl_char SS_VV_MetaData_Name[128];
idl_char SS_PV_MetaData_Name[128];
signed32 ReadDrives;
signed32 WriteDrives;
} ssrv_attr_t;
#define SET_SERVER_REGISTER_BITMAP (63)
#define SET_SERVER_TOTAL_VVS (62)
#define SET_SERVER_ALLOC_VVS (61)
#define SET_SERVER_TOTAL_BYTES (60)
#define SET_SERVER_USED_BYTES (59)
#define SET_SERVER_FREE_BYTES (58)













typedef struct ss_segment_array {
signed32 Length;
hpssoid_t Array[1];
} ss_segment_array_t;






typedef struct ss_delete_segment {
hpssoid_t SSID;
signed32 *Error;
} ss_delete_segment_t;




typedef struct ss_delete_segment_array {
signed32 Length;
ss_delete_segment_t Array[1];
} ss_delete_segment_array_t;






typedef struct ss_sclass {
unsigned32 SClassId;
u_signed64 TotalSpace;
u_signed64 FreeSpace;
u_signed64 PartiallyFilledVVs;
} ss_sclass_t;




typedef struct ss_sclass_array {
signed32 Length;
ss_sclass_t Array[1];
} ss_sclass_array_t;





#define K_EVENT_STRINGS (40)
typedef struct ss_event_rec {
signed32 ReqstID;
idl_char RoutineName[40];
idl_char EventName[40];
unsigned32 SerialNumber;
unsigned32 Flags;
unsigned32 tv_sec;
unsigned32 tv_usec;
} ss_event_rec_t;
typedef struct ss_event_array {
signed32 Length;
ss_event_rec_t Array[1];
} ss_event_array_t;
#define SS_FORCE_TAPE_DISMOUNT (1)
#define SS_CREATE_HINT_MANDATORY (1)

#ifdef __cplusplus
}


































#endif
#endif

#ifndef _SS_TYPES_H_RPCGEN
#define _SS_TYPES_H_RPCGEN

#include <rpc/rpc.h>
#ifndef _ss_types_h
#define _ss_types_h







#include "hpss_types.h"

#include "hpssaddr.h"


#include "hpssoid.h"


#include "hpss_iod.h"





#include "acct_hpss.h"




#include "hpss_obj_handle.h"

#include "hpss_server_attr.h"

#include "hpss_media_type.h"

#include "ss_pvlist.h"















#define PV_UNUSED_1 0x00000001
#define PV_UNUSED_2 0x00000002
#define PV_UNUSED_3 0x00000004
#define PV_OFFLINE 0x00000008




































#define VOL_NULL 0
#define VOL_SCRATCH 1
#define VOL_ALLOCATED 2
#define VOL_FOREIGN 3
#define VOL_HPSS_IMPORT 4
#define VOL_ALLOCATED_AND_FULL 5

struct physical_volume_md {
char Name[HPSS_PV_NAME_SIZE];
media_type_t Type;
unsigned32 BlockSize;

unsigned32 MaxTMBlocks;
unsigned32 FormatFlags;
unsigned32 Flags;



signed32 PVState;
signed32 MountCntSinceService;
signed32 MountCntSinceMaint;
signed32 VVSequence;


u_signed64 EstimatedSize;
u_signed64 ActualSize;
relative_address_t NextWriteAddr;
absolute_address_t NextAbsoluteWriteAddr;
timestamp_sec_t Creation;
timestamp_sec_t Update;
timestamp_sec_t LastRead;
timestamp_sec_t LastWrite;
timestamp_sec_t LastMaint;
timestamp_sec_t InService;

hpssoid_t VVID;
unsigned32 FamilyId;

};
typedef struct physical_volume_md physical_volume_md;

typedef physical_volume_md physical_volume_md_t;










































#define VV_UNUSED_1 0x00000001
#define VV_UNUSED_2 0x00000002
#define VV_OFFLINE 0x00000004
#define STRIPED 1
#define CONCATENATED 2
#define PARITYSTRIPED 3
#define MIRRORED 4

struct virtual_volume_md {
hpssoid_t VVID;

unsigned32 SClassId;
unsigned32 Form;
unsigned32 BlkSz;
unsigned32 StripeWidth;
unsigned32 Flags;

signed32 NumReads;
signed32 NumWrites;


unsigned32 AdministrativeState;
signed32 VVState;

u_signed64 EstimatedSize;
u_signed64 ActualSize;
relative_address_t NextByteAddr;
composite_address_t NextAbsoluteAddr;


timestamp_sec_t LastRead;
timestamp_sec_t LastWrite;
timestamp_sec_t Creation;
timestamp_sec_t Update;
unsigned32 FamilyId;


};
typedef struct virtual_volume_md virtual_volume_md;

typedef virtual_volume_md virtual_volume_md_t;






























#define MAP_FREE 1
#define MAP_ALLOCATED 2
#define MAP_EOM 3
#define MAP_EMPTY 4


#define MAP_DENY 5
#define MAP_VV_NEVER_WRITTEN 0x1
#define MAP_OFFLINE 0x2
#define MAP_STAT_FREE 0x4
#define MAP_STAT_PARTIAL 0x8

#define MAP_TO_DENY 0x10
#define MAP_VV_RETIRED 0x20
#define MAP_CHANGING_STATE 0x40

struct tape_storage_map_md {
hpssoid_t VVID;
hpssoid_t CurrentSSID;
signed32 NumActiveSegments;



signed32 MapState;
unsigned32 SClassId;
unsigned32 Flags;

u_signed64 TapeSz;
u_signed64 EstSz;
u_signed64 SpaceLeft;
unsigned32 FamilyId;



};
typedef struct tape_storage_map_md tape_storage_map_md;

typedef tape_storage_map_md tape_storage_map_md_t;



struct disk_storage_map_md {
hpssoid_t VVID;
signed32 NumActiveSegments;



signed32 MapState;
unsigned32 SClassId;
unsigned32 Flags;
unsigned32 BlkSz;
u_signed64 UsableLength;
u_signed64 ActualLength;
u_signed64 FreeSpace;
u_signed64 ClusterLength;


};
typedef struct disk_storage_map_md disk_storage_map_md;

typedef disk_storage_map_md disk_storage_map_md_t;





struct disk_allocation_map_entry {
hpssoid_t VVID;
signed32 StartAddr;
signed32 Length;
signed32 NextAddr;
};
typedef struct disk_allocation_map_entry disk_allocation_map_entry;

typedef disk_allocation_map_entry disk_allocation_map_entry_t;
#define SS_DISK_NAME 63
#define SS_DISK_VVID 62
#define SS_DISK_NAS 61
#define SS_DISK_SCLASS 60
#define SS_DISK_MAP_FLAGS 59
#define SS_DISK_USABLE_LENGTH 58
#define SS_DISK_ACTUAL_LENGTH 57
#define SS_DISK_FREE_SPACE 56
#define SS_DISK_PVSIZE 55
#define SS_DISK_CLUSTER_LENGTH 54
#define SS_DISK_VV_CONDITION 53
#define SS_DISK_RETIRED 52
#define SS_DISK_VVBLOCK_SIZE 51
#define SS_DISK_PVBLOCK_SIZE 50
#define SS_DISK_STRIPE_WIDTH 49
#define SS_DISK_VVFLAGS 48
#define SS_DISK_LASTREAD 47
#define SS_DISK_LASTWRITE 46
#define SS_DISK_CREATION 45
#define SS_DISK_PVL_JOB_ID 44
#define SS_DISK_REGISTER_BIT_MAP 43
#define SS_DISK_PVATTR 42
#define MVR_IP_SIZE 6

struct disk_pv_attr {
char PVName[HPSS_PV_NAME_SIZE];
media_type_t Type;
unsigned32 PVFlags;
signed32 DeviceID;
u_char MvrIP[MVR_IP_SIZE];
hpss_uuid_t MvrId;
char MvrHostName[HPSS_MAX_HOST_NAME];
};
typedef struct disk_pv_attr disk_pv_attr;

typedef disk_pv_attr disk_pv_attr_t;

struct disk_volume_attr {
char Name[HPSS_PV_NAME_SIZE];
hpssoid_t VVID;
signed32 NumActiveSegments;
unsigned32 SClassId;
unsigned32 MapFlags;
u_signed64 ActualLength;
u_signed64 UsableLength;
u_signed64 FreeSpace;
u_signed64 PVSize;
u_signed64 ClusterLength;
unsigned32 VVCondition;
unsigned32 Retired;
unsigned32 VVBlockSize;
unsigned32 PVBlockSize;
unsigned32 StripeWidth;
unsigned32 VVFlags;
timestamp_sec_t LastRead;
timestamp_sec_t LastWrite;
timestamp_sec_t Creation;
signed32 PVLJobId;
u_signed64 RegisterBitMap;
struct {
u_int PVAttr_len;
disk_pv_attr_t *PVAttr_val;
} PVAttr;
};
typedef struct disk_volume_attr disk_volume_attr;

typedef disk_volume_attr disk_volume_attr_t;
#define SS_TAPE_NAME 63
#define SS_TAPE_VVID 62
#define SS_TAPE_CURRENT_SSID 61
#define SS_TAPE_NAS 60
#define SS_TAPE_MAP_STATE 59
#define SS_TAPE_SCLASS 58
#define SS_TAPE_MAP_FLAGS 57
#define SS_TAPE_ACTIVE_LENGTH 56
#define SS_TAPE_MAX_WRITTEN 55
#define SS_TAPE_ESTIMATED_LENGTH 54
#define SS_TAPE_SPACELEFT 53
#define SS_TAPE_FAMILY 52
#define SS_TAPE_VV_CONDITION 51
#define SS_TAPE_RETIRED 50
#define SS_TAPE_VVBLOCK_SIZE 49
#define SS_TAPE_PVBLOCK_SIZE 48
#define SS_TAPE_MAX_TM_BLOCKS 47
#define SS_TAPE_STRIPE_WIDTH 46
#define SS_TAPE_NUMREADS 45
#define SS_TAPE_NUMWRITES 44
#define SS_TAPE_NEXT_WRITE_ADDR 43
#define SS_TAPE_CURRENT_POSITION 42
#define SS_TAPE_LASTREAD 41
#define SS_TAPE_LASTWRITE 40
#define SS_TAPE_CREATION 39
#define SS_TAPE_PVL_JOB_ID 38
#define SS_TAPE_REGISTER_BIT_MAP 37
#define SS_TAPE_PVATTR 36

struct tape_pv_attr {
char PVName[HPSS_PV_NAME_SIZE];
media_type_t Type;
signed32 DeviceID;
u_char MvrIP[MVR_IP_SIZE];
hpss_uuid_t MvrId;
char MvrHostName[HPSS_MAX_HOST_NAME];
};
typedef struct tape_pv_attr tape_pv_attr;

typedef tape_pv_attr tape_pv_attr_t;

struct tape_volume_attr {
char Name[HPSS_PV_NAME_SIZE];
hpssoid_t VVID;
hpssoid_t CurrentWritingSegment;
signed32 NumActiveSegments;
signed32 MapState;
unsigned32 SClassId;
unsigned32 MapFlags;
u_signed64 MaxWrittenLength;
u_signed64 ActiveLength;
u_signed64 EstimatedSize;
u_signed64 SpaceLeft;
unsigned32 FamilyId;
unsigned32 VVCondition;
unsigned32 Retired;
unsigned32 VVBlockSize;
unsigned32 PVBlockSize;
unsigned32 MaxTMBlocks;
unsigned32 StripeWidth;
signed32 NumReads;
signed32 NumWrites;
relative_address_t NextWriteAddress;
relative_address_t CurrentPosition;
timestamp_sec_t LastRead;
timestamp_sec_t LastWrite;
timestamp_sec_t Creation;
signed32 PVLJobId;
u_signed64 RegisterBitMap;
struct {
u_int PVAttr_len;
tape_pv_attr_t *PVAttr_val;
} PVAttr;
};
typedef struct tape_volume_attr tape_volume_attr;

typedef tape_volume_attr tape_volume_attr_t;
#define VV_UNKNOWN 0
#define VV_RWC 1
#define VV_RW 2
#define VV_RO 3
#define VV_EOM 4
#define VV_EMPTY 5
#define VV_DOWN 6


#define SET_SS_VVID 63

#define SET_SS_SCLASSID 62

#define SET_SS_NUMREADS 61
#define SET_SS_NUMWRITES 60


#define SET_SS_ADMINISTRATIVE_STATE 59
#define SET_SS_SS_STATE 58

#define SET_SS_BLOCKSIZE 57
#define SET_SS_ALLOCATED_LENGTH 56
#define SET_SS_WRITTEN_LENGTH 55
#define SET_SS_ABSOLUTE_START_ADDR 54
#define SET_SS_RELATIVE_START_ADDR 53
#define SET_SS_RELATIVE_NEXTBYTEADDR 52
#define SET_SS_OWNER 51
#define SET_SS_LAST_READ 50
#define SET_SS_LAST_WRITE 49
#define SET_SS_CREATION 48
#define SET_SS_UPDATE 47
#define SET_SS_REGISTER_BITMAP 46
#define SS_ALL_FIELDS_LOWER 0x0003ffff

#define SS_ALL_FIELDS_UPPER 0x00000000
#define SEG_NULL 0
#define SEG_ALLOCATED 1
#define SEG_LENGTH_FIXED 2

struct storage_segment_md {
hpssoid_t SSID;
hpssoid_t VVID;

unsigned32 SClassId;

signed32 NumReads;
signed32 NumWrites;


unsigned32 AdministrativeState;
signed32 SSState;
unsigned32 BlockSize;
u_signed64 AllocatedLength;
u_signed64 WrittenLength;
composite_address_t AbsoluteStartAddr;
relative_address_t RelativeStartAddr;
relative_address_t RelativeNextByteAddr;
hpssoid_t Owner;

timestamp_sec_t LastRead;
timestamp_sec_t LastWrite;
timestamp_sec_t Creation;
timestamp_sec_t Update;


};
typedef struct storage_segment_md storage_segment_md;

typedef storage_segment_md storage_segment_md_t;

struct ss_attr {
storage_segment_md_t MD;
u_signed64 RegisterBitMap;
};
typedef struct ss_attr ss_attr;

typedef ss_attr ss_attr_t;






















struct ss_statistics {
unsigned32 SClassId;
u_signed64 ActiveBytes;
u_signed64 FreeBytes;
signed32 TotalVVs;
signed32 PartialVVs;
signed32 FreeVVs;
struct ss_statistics *Next;
};
typedef struct ss_statistics ss_statistics;

typedef ss_statistics ss_statistics_t;

struct ss_segment_array {
struct {
u_int Array_len;
hpssoid_t *Array_val;
} Array;
};
typedef struct ss_segment_array ss_segment_array;

typedef ss_segment_array ss_segment_array_t;

struct ss_delete_segment {
hpssoid_t SSID;
signed32 *ErrorP;
};
typedef struct ss_delete_segment ss_delete_segment;

typedef ss_delete_segment ss_delete_segment_t;

struct ss_delete_segment_array {
struct {
u_int Array_len;
ss_delete_segment_t *Array_val;
} Array;
};
typedef struct ss_delete_segment_array ss_delete_segment_array;

typedef ss_delete_segment_array ss_delete_segment_array_t;

struct ss_sclass {
unsigned32 SClassId;
u_signed64 TotalSpace;
u_signed64 FreeSpace;
u_signed64 PartiallyFilledVVs;
};
typedef struct ss_sclass ss_sclass;

typedef ss_sclass ss_sclass_t;

struct ss_sclass_array {
struct {
u_int Array_len;
ss_sclass_t *Array_val;
} Array;
};
typedef struct ss_sclass_array ss_sclass_array;

typedef ss_sclass_array ss_sclass_array_t;














#define SS_FORCE_TAPE_DISMOUNT 0x00000001

#endif


extern bool_t xdr_physical_volume_md();
extern bool_t xdr_physical_volume_md_t();
extern bool_t xdr_virtual_volume_md();
extern bool_t xdr_virtual_volume_md_t();
extern bool_t xdr_tape_storage_map_md();
extern bool_t xdr_tape_storage_map_md_t();
extern bool_t xdr_disk_storage_map_md();
extern bool_t xdr_disk_storage_map_md_t();
extern bool_t xdr_disk_allocation_map_entry();
extern bool_t xdr_disk_allocation_map_entry_t();
extern bool_t xdr_disk_pv_attr();
extern bool_t xdr_disk_pv_attr_t();
extern bool_t xdr_disk_volume_attr();
extern bool_t xdr_disk_volume_attr_t();
extern bool_t xdr_tape_pv_attr();
extern bool_t xdr_tape_pv_attr_t();
extern bool_t xdr_tape_volume_attr();
extern bool_t xdr_tape_volume_attr_t();
extern bool_t xdr_storage_segment_md();
extern bool_t xdr_storage_segment_md_t();
extern bool_t xdr_ss_attr();
extern bool_t xdr_ss_attr_t();
extern bool_t xdr_ss_statistics();
extern bool_t xdr_ss_statistics_t();
extern bool_t xdr_ss_segment_array();
extern bool_t xdr_ss_segment_array_t();
extern bool_t xdr_ss_delete_segment();
extern bool_t xdr_ss_delete_segment_t();
extern bool_t xdr_ss_delete_segment_array();
extern bool_t xdr_ss_delete_segment_array_t();
extern bool_t xdr_ss_sclass();
extern bool_t xdr_ss_sclass_t();
extern bool_t xdr_ss_sclass_array();
extern bool_t xdr_ss_sclass_array_t();


#endif /* !_SS_TYPES_H_RPCGEN */


traniod.h

HPSS4.5

HPSS6.2

#ifndef traniod_h
#define traniod_h

#include <netinet/in.h>

#include "hpss_iod.h"

#define TRANIOD_XFER_TIMEOUT (900)

int
send_iod(
int SD, /* Socket descriptor */
IOD_t *IODPtr); /* Ptr to IOD to send */

int
send_ior(
int SD, /* Socket descriptor */
IOR_t *IORPtr); /* Ptr to IOR to send */

int
recv_iod(
int SD, /* Socket descriptor */
IOD_t *IODPtr); /* Ptr to IOD for received data */

int
recv_ior(
int SD, /* Socket descriptor */
IOR_t *IORPtr); /* Ptr to IOR for received data */

void
free_iod_mem(
IOD_t *IODPtr); /* Ptr to IOD to release */

void
free_ior_mem(
IOR_t *IORPtr); /* Ptr to IOR to release */








signed32
traniod_establish_context(
int Socket, /* Connected socket descriptor */
u_signed64 EncryptionKey); /* Mover encryption key */

signed32
traniod_validate_context(
int Socket, /* Connected socket descriptor */
struct sockaddr_in *PeerSaddrPtr, /* Peer TCP address */
u_signed64 EncryptionKey); /* Mover encryption key */

signed32
traniod_server_init(void);

signed32
traniod_mover_init(void);

#endif

#ifndef traniod_h
#define traniod_h

#include <netinet/in.h>

#include "hpss_iod.h"

#define TRANIOD_XFER_TIMEOUT (900)

int
send_iod(
int SD, /* Socket descriptor */
IOD_t *IODPtr); /* Ptr to IOD to send */

int
send_ior(
int SD, /* Socket descriptor */
IOR_t *IORPtr); /* Ptr to IOR to send */

int
recv_iod(
int SD, /* Socket descriptor */
IOD_t *IODPtr); /* Ptr to IOD for received data */

int
recv_ior(
int SD, /* Socket descriptor */
IOR_t *IORPtr); /* Ptr to IOR for received data */

void
free_iod_mem(
IOD_t *IODPtr); /* Ptr to IOD to release */

void
free_ior_mem(
IOR_t *IORPtr); /* Ptr to IOR to release */

signed32
traniod_client_init(void);

signed32
traniod_mover_init(
u_signed64 EncryptionKey); /* Mover encryption key */

signed32
traniod_establish_context(
int Socket, /* Connected socket descriptor */
u_signed64 EncryptionKey); /* Mover encryption key */

signed32
traniod_validate_context(
int Socket, /* Connected socket descriptor */
struct sockaddr_in *PeerSaddrPtr); /* Peer TCP address */








#endif


u_signed64.h

HPSS4.5

HPSS6.2

#ifndef _VESTA_ARITH64_H
#define _VESTA_ARITH64_H

#include "hpss_types.h"

#define CS_DEC64_LEN 20
#if !defined(BYTE8INT)

<略>

#else /* BYTE8INT */

#if !defined(unicos) && !defined(__ALPHA__)


typedef unsigned long u_signed64;
#endif /* unicos && __ALPHA__ */



#define CONVERT_LONGLONG_TO_U64(LL, U64) ( (U64)=bld64m( ( (LL)>>32) & 0xFFFFFFFF,\
(LL) & 0xFFFFFFFF) )






#endif /* _VESTA_ARITH64_H */

#ifndef _VESTA_ARITH64_H
#define _VESTA_ARITH64_H

#include "hpss_types.h"

#define CS_DEC64_LEN 20
#if !defined(BYTE8INT)

<略>

#else /* BYTE8INT */

#if !defined(__ALPHA__) && !defined(__ia64__) && !defined(__nec__) && \
!defined(LINUX)
typedef unsigned long u_signed64;
#endif /* __ALPHA__ && __ia64__ && __nec__ && LINUX */

<略>

#define CONVERT_LONGLONG_TO_U64(LL, U64) ( (U64)=bld64m( ( (LL)>>32) & 0xFFFFFFFF,\
(LL) & 0xFFFFFFFF) )

int u64_to_decchar(u_signed64 data, char *string);
int decchar_to_u64(char *string, u_signed64 *u64, int length);
unsigned32 atobytes(char *s);
u_signed64 atobytes64(char *s, int *ret_code);

#endif /* _VESTA_ARITH64_H */


util_bbtree.h

HPSS4.5

HPSS6.2

#if !defined(hpss_util_bbtree_h)
#define hpss_util_bbtree_h

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <dce/rpc.h>

#include "hpss_errno.h"

typedef struct util_bbtree_node
{
struct util_bbtree_node *left;
struct util_bbtree_node *right;
void *object;
int red;
} util_bbtree_node_t;

typedef struct util_bbtree
{
int (*compare)();
int (*output)();
void (*free)(void *);
int allow_dup;
util_bbtree_node_t *head;
util_bbtree_node_t *bottom;
} util_bbtree_t;

util_bbtree_t *util_bbtree_init ( int (*compare)(),
int (*output)(),
void (*free)(void *),
int dup_flag );
void util_bbtree_free ( util_bbtree_t **tree );
unsigned32 util_bbtree_add ( util_bbtree_t *tree,
void *object);
void util_bbtree_print ( util_bbtree_t *tree );
void *util_bbtree_find ( util_bbtree_t *tree,
void *object );

#endif

#ifndef hpss_util_bbtree_h
#define hpss_util_bbtree_h

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#include "hpss_types.h"
#include "hpss_errno.h"

typedef struct util_bbtree_node
{
struct util_bbtree_node *left;
struct util_bbtree_node *right;
void *object;
int red;
} util_bbtree_node_t;

typedef struct util_bbtree
{
int (*compare)();
int (*output)();
void (*destroy)(void *);
int allow_dup;
util_bbtree_node_t *head;
util_bbtree_node_t *bottom;
} util_bbtree_t;

util_bbtree_t *util_bbtree_init ( int (*compare)(),
int (*output)(),
void (*destroy)(void *),
int dup_flag );
void util_bbtree_free ( util_bbtree_t **tree );
unsigned32 util_bbtree_add ( util_bbtree_t *tree,
void *object);
void util_bbtree_print ( util_bbtree_t *tree );
void *util_bbtree_find ( util_bbtree_t *tree,
void *object );

#endif


上記のようなヘッダーの変更に伴い、以下のソースに変更を加える必要があります。変更箇所は太字で示している”HPSS51”が含まれる部分です。 この変更はHPSS5.1で行われたものであり、HPSS6.2も同じソースを使用しているため、”HPSS51”という表記になっております。ソース ファイルは、各ワークサーバの/opt/hpss/kek/examplesディレクトリを参照ください。

hpssls.c

変換前

変換後

#include <stdio.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/param.h>
#include <errno.h>
#include "hpss_api.h"
#include "u_signed64.h"
#include "tools.h"




main(argc,argv)
int argc; char *argv[];
{
int dir_handle;
struct hpss_dirent *ent;
char ent_buf[sizeof(struct hpss_dirent)+HPSS_MAX_FILE_NAME+1];



ns_Attrs_t AttrOut;

char path[512];
int arg = 1;
int aflag = 0;
int lflag = 0;
int lastdir = 0;
int numarg;
int i, rc;

<略>

for ( ; arg < argc ; arg++ )
{
if ((rc = hpss_GetListAttrs(argv[arg], &AttrOut)) < 0)
{
fprintf(stderr, "hpss_GetListAttrs(): %s\n", strerror(-rc));
continue;
}



if (AttrOut.Type != NS_DIRECTORY_OBJECT)

{
if (lastdir) printf("\n");
lastdir = 0;
if (lflag)
printline(argv[arg], argv[arg], &AttrOut);
else
printf("%s\n", argv[arg]);
continue;
}

<略>

}
exit(0);
}

static char *modestr[] = { "---","--x","-w-","-wx",
"r--","r-x","rw-","rwx" };
static char *setid_modestr[] = { "--s","--s","-ws","-ws",
"r-s","r-s","rws","rws" };

printline(path, name, AttrOut)
char *path;
char *name;



ns_Attrs_t *AttrOut;

{
time_t ltime;
char *timeptr, filesize[256];
char **owner_modestr, **group_modestr;
int res;
int TIME;
int i;
int cosid, acct;
mode_t posix_mode;

API_ConvertModeToPosixMode(AttrOut, &posix_mode);

<略>

if (((posix_mode & S_IFMT) == S_IFDIR)
||
((posix_mode & S_IFMT) == S_IFLNK))
{
printf("NS NS NS ");
}
else
{



cosid = AttrOut->ClassOfService;

acct = AttrOut->Account;
printf("%-3d %-3d %-3d ", cosid, acct, AttrOut->FamilyId);
}




ltime = (time_t)AttrOut->TimeOfMetadataUpdate;

timeptr = (char *)ctime(&ltime);
TIME = time(0);



if (u64_to_decchar(AttrOut->FileSize, filesize) < 0)

{
perror("u64_to_decchar");
exit(1);
}





if ((TIME < AttrOut->TimeOfMetadataUpdate)
||
((TIME - AttrOut->TimeOfMetadataUpdate) > (60 * 60 * 24 * 180)))

{
printf("%10s %--7.7s %-4.4s %s", filesize,
timeptr + 4, timeptr + 20, name);
}
else
{
printf("%10s %-12.12s %s", filesize, timeptr + 4, name);
}

<略>

printf("\n");
fflush(stdout);
}

usage()
{
fprintf(stderr,"Usage: ls [-al] <dir>\n");
exit(1);
}

#include <stdio.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/param.h>
#include <errno.h>
#include "hpss_api.h"
#include "u_signed64.h"
#include "tools.h"
#ifdef HPSS51
#include "ns_Constants.h"
#endif

main(argc,argv)
int argc; char *argv[];
{
int dir_handle;
struct hpss_dirent *ent;
char ent_buf[sizeof(struct hpss_dirent)+HPSS_MAX_FILE_NAME+1];
#ifdef HPSS51
hpss_Attrs_t AttrOut;
#else
ns_Attrs_t AttrOut;
#endif
char path[512];
int arg = 1;
int aflag = 0;
int lflag = 0;
int lastdir = 0;
int numarg;
int i, rc;

<略>

for ( ; arg < argc ; arg++ )
{
if ((rc = hpss_GetListAttrs(argv[arg], &AttrOut)) < 0)
{
fprintf(stderr, "hpss_GetListAttrs(): %s\n", strerror(-rc));
continue;
}
#ifdef HPSS51
if (AttrOut.Type != NS_OBJECT_TYPE_DIRECTORY)
#else
if (AttrOut.Type != NS_DIRECTORY_OBJECT)
#endif
{
if (lastdir) printf("\n");
lastdir = 0;
if (lflag)
printline(argv[arg], argv[arg], &AttrOut);
else
printf("%s\n", argv[arg]);
continue;
}

<略>

}
exit(0);
}

static char *modestr[] = { "---","--x","-w-","-wx",
"r--","r-x","rw-","rwx" };
static char *setid_modestr[] = { "--s","--s","-ws","-ws",
"r-s","r-s","rws","rws" };

printline(path, name, AttrOut)
char *path;
char *name;
#ifdef HPSS51
hpss_Attrs_t *AttrOut;
#else
ns_Attrs_t *AttrOut;
#endif
{
time_t ltime;
char *timeptr, filesize[256];
char **owner_modestr, **group_modestr;
int res;
int TIME;
int i;
int cosid, acct;
mode_t posix_mode;

API_ConvertModeToPosixMode(AttrOut, &posix_mode);

<略>

if (((posix_mode & S_IFMT) == S_IFDIR)
||
((posix_mode & S_IFMT) == S_IFLNK))
{
printf("NS NS NS ");
}
else
{
#ifdef HPSS51
cosid = AttrOut->COSId;
#else
cosid = AttrOut->ClassOfService;
#endif
acct = AttrOut->Account;
printf("%-3d %-3d %-3d ", cosid, acct, AttrOut->FamilyId);
}

#ifdef HPSS51
ltime = (time_t)AttrOut->TimeModified;
#else
ltime = (time_t)AttrOut->TimeOfMetadataUpdate;
#endif
timeptr = (char *)ctime(&ltime);
TIME = time(0);
#ifdef HPSS51
if (u64_to_decchar(AttrOut->DataLength, filesize) < 0)
#else
if (u64_to_decchar(AttrOut->FileSize, filesize) < 0)
#endif
{
perror("u64_to_decchar");
exit(1);
}
#ifdef HPSS51
if ((TIME < AttrOut->TimeModified)
||
((TIME - AttrOut->TimeModified) > (60 * 60 * 24 * 180)))
#else
if ((TIME < AttrOut->TimeOfMetadataUpdate)
||
((TIME - AttrOut->TimeOfMetadataUpdate) > (60 * 60 * 24 * 180)))
#endif
{
printf("%10s %--7.7s %-4.4s %s", filesize,
timeptr + 4, timeptr + 20, name);
}
else
{
printf("%10s %-12.12s %s", filesize, timeptr + 4, name);
}

<略>

printf("\n");
fflush(stdout);
}

usage()
{
fprintf(stderr,"Usage: ls [-al] <dir>\n");
exit(1);
}


hpsspurge.c

変換前

変換後

#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include "hpss_api.h"
#include "u_signed64.h"
#include "tools.h"

extern int errno;

int main(int argc, char *argv[])
{
hpss_xfileattr_t bitfile_xattrs;
u_signed64 bytes_purged;
int error;
int fd;
int i, arg_use;
char *filename;

if (argc < 2) usage();

authenticate();

arg_use = 0;
while (argv[++arg_use])
{
filename = argv[arg_use];

error = hpss_FileGetXAttributes(filename, API_GET_STATS_FOR_LEVEL, 0, &bitfile_xattrs);

if (error)
{
fprintf(stderr, "can't get attributes for %s, error %d\n", filename, error);
continue;
}





if (bitfile_xattrs.BFSAttr.SCAttrib[0].Flags & BFS_BFATTRS_DATAEXISTS_AT_LEVEL)

{

<略>

}
else
{
printf("no data to purge for %s\n", filename);
}
fflush(stdout);
}
exit(0);
}

usage()
{
fprintf(stderr, "Usage: hpsspurge <file> [ <file> ... ]\n");
exit(1);
}

#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include "hpss_api.h"
#include "u_signed64.h"
#include "tools.h"

extern int errno;

int main(int argc, char *argv[])
{
hpss_xfileattr_t bitfile_xattrs;
u_signed64 bytes_purged;
int error;
int fd;
int i, arg_use;
char *filename;

if (argc < 2) usage();

authenticate();

arg_use = 0;
while (argv[++arg_use])
{
filename = argv[arg_use];

error = hpss_FileGetXAttributes(filename, API_GET_STATS_FOR_LEVEL, 0, &bitfile_xattrs);

if (error)
{
fprintf(stderr, "can't get attributes for %s, error %d\n", filename, error);
continue;
}

#ifdef HPSS51
if (bitfile_xattrs.SCAttrib[0].Flags & BFS_BFATTRS_DATAEXISTS_AT_LEVEL)
#else
if (bitfile_xattrs.BFSAttr.SCAttrib[0].Flags & BFS_BFATTRS_DATAEXISTS_AT_LEVEL)
#endif
{

<略>

}
else
{
printf("no data to purge for %s\n", filename);
}
fflush(stdout);
}
exit(0);
}

usage()
{
fprintf(stderr, "Usage: hpsspurge <file> [ <file> ... ]\n");
exit(1);
}


support.c

変換前

変換後

#include "support.h"
#include <netinet/tcp.h>
#include "hpss_errno.h"
#include "u_signed64.h"
#include "hpss_cos.h"
#include "hpss_netopt.h"

#define S_IAMB 0000777

<略>

typedef struct {
int status;
char *string;
} mapping_t;

mapping_t mappings[] = {
{ -EPERM, "-EPERM" },
<略>
{ HPSS_ENOTSEQ, "HPSS_ENOTSEQ" },







{ HPSS_EMUTEX, "HPSS_EMUTEX" },





{ HPSS_ECOND, "HPSS_ECOND" },
<略>
{ 0, "ZERO" }
};

<略>

void print_hpss_fileattr (FILE *fd, hpss_fileattr_t *attrs)
{



print_ns_Attrs (fd, &(attrs->NSAttr));
print_bf_attrib (fd, &(attrs->BFSAttr));

}















































<略>

#include "support.h"
#include <netinet/tcp.h>
#include "hpss_errno.h"
#include "u_signed64.h"
#include "hpss_cos.h"
#include "hpss_netopt.h"

#define S_IAMB 0000777

<略>

typedef struct {
int status;
char *string;
} mapping_t;

mapping_t mappings[] = {
{ -EPERM, "-EPERM" },
<略>
{ HPSS_ENOTSEQ, "HPSS_ENOTSEQ" },
#ifndef HPSS51
{ HPSS_EMMDELETE, "HPSS_EMMDELETE" },
{ HPSS_EMMUPDATE, "HPSS_EMMUPDATE" },
{ HPSS_EMMINSERT, "HPSS_EMMINSERT" },
{ HPSS_EMMREAD, "HPSS_EMMREAD" },
{ HPSS_E_OFD_ALLOC, "HPSS_E_OFD_ALLOC" },
#endif
{ HPSS_EMUTEX, "HPSS_EMUTEX" },
#ifndef HPSS51
{ HPSS_EMDATA, "HPSS_EMDATA" },
{ HPSS_EOFDGET, "HPSS_EOFDGET" },
{ HPSS_EOFDFREE, "HPSS_EOFDFREE" },
#endif
{ HPSS_ECOND, "HPSS_ECOND" },
<略>
{ 0, "ZERO" }
};

<略>

void print_hpss_fileattr (FILE *fd, hpss_fileattr_t *attrs)
{
#ifdef HPSS51
printf ("ToDo\n");
#else
print_ns_Attrs (fd, &(attrs->NSAttr));
print_bf_attrib (fd, &(attrs->BFSAttr));
#endif
}

#ifndef HPSS51
void print_ns_Attrs (FILE *fd, ns_Attrs_t *data)
{
}

void print_bf_attrib (FILE *fd, bf_attrib_t *data)
{
fprintf (fd, "%-30.30s: ", "Current Position");
print_u_signed64 (data->CurrentPosition);
fputc('\n', fd);

fprintf (fd, "%-30.30s: %ld\n", "Open Count", data->OpenCount);

fprintf (fd, "%-30.30s: ", "Data Length");
print_bytes64 (data->BfAttribMd.DataLen);
fputc('\n', fd);

fprintf (fd, "%-30.30s: %ld\n", "Read Count",
data->BfAttribMd.ReadCount);

fprintf (fd, "%-30.30s: %ld\n", "Write Count",
data->BfAttribMd.WriteCount);

fprintf (fd, "%-30.30s: %ld\n", "Link Count",
data->BfAttribMd.LinkCount);

fprintf (fd, "%-30.30s: ", "Create Time");
print_timestamp_sec (fd, data->BfAttribMd.CreateTime);
fputc('\n', fd);

fprintf (fd, "%-30.30s: ", "Modify Time");
print_timestamp_sec (fd, data->BfAttribMd.ModifyTime);
fputc('\n', fd);

fprintf (fd, "%-30.30s: ", "Write Time");
print_timestamp_sec (fd, data->BfAttribMd.WriteTime);
fputc('\n', fd);

fprintf (fd, "%-30.30s: ", "Read Time");
print_timestamp_sec (fd, data->BfAttribMd.ReadTime);
fputc('\n', fd);

fprintf (fd, "%-30.30s: %lu\n", "COS Id", data->BfAttribMd.COSId);

}
#endif
<略>