00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #if !defined(SafMGR_H)
00025 #define SafMGR_H
00026
00027 static const char *SafMGR_Hsccsid =
00028 "@(#)safmgr.h $Revision: 448919 $ built " __DATE__ " " __TIME__ ;
00029
00038
00039
00040
00041
00042
00043
00044
00817
00818 #include "saf-version.h"
00819
00820
00821
00829 #define SafESM_MAX 8
00830
00831
00832
00833
00834
00835
00836
00837 struct cas_saf_config_internal;
00838 struct cas_esm_config_internal;
00839
00840
00841
00842
00843
00844
00845 struct safpb_parameter_block;
00846
00847
00895 struct SafInit
00896 {
00897 mf_uns32 Version;
00898 #define SafMGR_API_VER 1
00900 mf_uns32 Environment;
00919 #define SafENV_CAS 0
00920 #define SafENV_MFDS (1<< 0)
00921 #define SafENV_CICS (1<< 1)
00922 #define SafENV_IMS (1<< 2)
00923 #define SafENV_JES (1<< 3)
00924 #define SafENV_SOLO (1ul<<31)
00925 #define SafENV_MTOMASK 0x0eul
00938 mf_uns32 Reason;
00939
00942 #define SafMGR_FAIL_NONE 0
00943 #define SafMGR_FAIL_GENERAL 1
00944 #define SafMGR_FAIL_RESOURCE 2
00945 #define SafMGR_FAIL_MGRCFG 3
00946 #define SafMGR_FAIL_LOAD 4
00947 #define SafMGR_FAIL_ESMCFG 5
00948 #define SafMGR_FAIL_ESMENTRY 100
00949 #define SafMGR_FAIL_ESM 101
00950 #define SafMGR_FAIL_ENV 200
00990 mf_uns32 Detail;
00991
00992 char ServerName[8];
00994 char Reserved[8];
01009 int (*CasMsgF)();
01010
01022 int (*CasTmpF)();
01023
01034 int (*CasLockF)();
01035
01050 int (*FailAudit)(const struct safpb_parameter_block *);
01051
01052 struct cas_saf_config_internal
01053 *Config;
01054 mf_uns32 ESMCnt;
01057 struct cas_esm_config_internal
01058 *ESMCfg[SafESM_MAX];
01060 };
01061
01062
01063
01064
01065
01068 #define SafINIT_OK 0
01069 #define SafINIT_NULL 1
01070 #define SafINIT_VER 2
01071 #define SafINIT_BAD_CB 3
01072 #define SafINIT_ENV 4
01073 #define SafINIT_CFG 5
01074 #define SafINIT_CNT 6
01075 #define SafINIT_ESMCFG 7
01076 #define SafINIT_RESRCE 8
01077 #define SafINIT_OTHER 15
01078 #define SafINIT_FAIL 16
01086 #define SafINIT_BADENV 128
01087 #define SafINIT_INTERNAL 129
01088 #define SafINIT_MODNAME 130
01089 #define SafINIT_MODLOAD 131
01090 #define SafINIT_ENVFUNC 132
01091 #define SafINIT_EXTERNAL 133
01103 typedef enum SafRet
01104 {
01105 SafR_OK = 0,
01106 SafR_PARAM = 1,
01107 SafR_RESOURCE = 2,
01108 SafR_EXFAIL = 3,
01109 SafR_STATE = 4,
01110 SafR_INTERNAL = 5,
01111 SafR_NOTFOUND = 6,
01112 SafR_TRUNCATED = 7,
01113 SafR_NOMORE = 8,
01114 SafR_INVALID = 9,
01115 SafR_ESM = 10,
01116 SafR_END = 11,
01117 SafR_NOTIMPL = 12,
01118 SafR_Invalid,
01119 SafR_Sizer = (1<<30)
01120 } SafRet;
01121
01122
01123
01124
01125
01126 mf_uns32 safmgr(struct SafInit *Init);
01127 mf_uns32 safterm(mf_uns32 What, void *Reserved);
01128 mf_uns32 safcfg(struct SafInit *Init, void *Reserved);
01129 mf_uns32 safcfgesm(int Index, struct cas_esm_config_internal *Config,
01130 void *Reserved);
01131
01132
01135 #define SafTERM_THREAD 0
01136 #define SafTERM_PROCESS 1
01137 #define SafTERM_ESF 2
01139
01140
01141
01142
01143
01149 #define SafSTRCMP(s1, op, s2) (strcmp((s1),(s2)) op 0)
01150
01151
01157 #define SafSTRCMP_N(s1, op, s2, n) (strncmp((s1),(s2),(n)) op 0)
01158
01159
01165 #define SafSTRCMP_CI(s1, op, s2) (SafStrcmpCI((s1),(s2)) op 0)
01166
01167
01173 #define SafSTRCMP_CIN(s1, op, s2, n) (SafStrcmpCIN((s1),(s2),(n)) op 0)
01174
01175
01176
01177 #define SafDO_STR(x) #x
01178
01182 #define SafSTRING(x) SafDO_STR(x)
01183
01184
01185 mf_uns32 SafNative32u(mf_uns32 NetValue);
01186 int SafState(void);
01187 SafRet SafQueryCfg(const char *Class, const char *Name, char **ValueP);
01188
01189
01190
01191
01192
01193
01194
01195 #if !defined SafLOG_ALL
01196 #define SafLOG_ALL 0
01197 #endif
01198
01199 #endif
01200
01201
01202