00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #if !defined(SafMGR_H)
00024 #define SafMGR_H
00025
00026 static const char *SafMGR_Hsccsid =
00027 "@(#)safmgr.h $Revision: 621664 $ built " __DATE__ " " __TIME__ ;
00028
00037
00038
00039
00040
00041
00042
00043
00816
00817 #include "saf-version.h"
00818
00819
00820
00821
00822
00823
00824
00825
00826
00827
00828
00836 #define SafESM_MAX 8
00837
00838
00839
00840
00841
00842
00843
00844 struct cas_saf_config_internal;
00845 struct cas_esm_config_internal;
00846
00847
00848
00849
00850
00851
00852 struct safpb_parameter_block;
00853
00854
00902 struct SafInit
00903 {
00904 mf_uns32 Version;
00905 #define SafMGR_API_VER 1
00907 mf_uns32 Environment;
00926 #define SafENV_CAS 0
00927 #define SafENV_MFDS (1<< 0)
00928 #define SafENV_CICS (1<< 1)
00929 #define SafENV_IMS (1<< 2)
00930 #define SafENV_JES (1<< 3)
00931 #define SafENV_SOLO (1ul<<31)
00932 #define SafENV_MTOMASK 0x0eul
00945 mf_uns32 Reason;
00946
00949 #define SafMGR_FAIL_NONE 0
00950 #define SafMGR_FAIL_GENERAL 1
00951 #define SafMGR_FAIL_RESOURCE 2
00952 #define SafMGR_FAIL_MGRCFG 3
00953 #define SafMGR_FAIL_LOAD 4
00954 #define SafMGR_FAIL_ESMCFG 5
00955 #define SafMGR_FAIL_ESMENTRY 100
00956 #define SafMGR_FAIL_ESM 101
00957 #define SafMGR_FAIL_ENV 200
00997 mf_uns32 Detail;
00998
00999 char ServerName[8];
01001 char Reserved[8];
01016 int (*CasMsgF)();
01017
01029 int (*CasTmpF)();
01030
01041 int (*CasLockF)();
01042
01057 int (*FailAudit)(const struct safpb_parameter_block *);
01058
01059 struct cas_saf_config_internal
01060 *Config;
01061 mf_uns32 ESMCnt;
01064 struct cas_esm_config_internal
01065 *ESMCfg[SafESM_MAX];
01067 };
01068
01069
01070
01071
01072
01075 #define SafINIT_OK 0
01076 #define SafINIT_NULL 1
01077 #define SafINIT_VER 2
01078 #define SafINIT_BAD_CB 3
01079 #define SafINIT_ENV 4
01080 #define SafINIT_CFG 5
01081 #define SafINIT_CNT 6
01082 #define SafINIT_ESMCFG 7
01083 #define SafINIT_RESRCE 8
01084 #define SafINIT_OTHER 15
01085 #define SafINIT_FAIL 16
01093 #define SafINIT_BADENV 128
01094 #define SafINIT_INTERNAL 129
01095 #define SafINIT_MODNAME 130
01096 #define SafINIT_MODLOAD 131
01097 #define SafINIT_ENVFUNC 132
01098 #define SafINIT_EXTERNAL 133
01110 typedef enum SafRet
01111 {
01112 SafR_OK = 0,
01113 SafR_PARAM = 1,
01114 SafR_RESOURCE = 2,
01115 SafR_EXFAIL = 3,
01116 SafR_STATE = 4,
01117 SafR_INTERNAL = 5,
01118 SafR_NOTFOUND = 6,
01119 SafR_TRUNCATED = 7,
01120 SafR_NOMORE = 8,
01121 SafR_INVALID = 9,
01122 SafR_ESM = 10,
01123 SafR_END = 11,
01124 SafR_NOTIMPL = 12,
01125 SafR_Invalid,
01126 SafR_Sizer = (1<<30)
01127 } SafRet;
01128
01129
01130
01131
01132
01133 mf_uns32 safmgr(struct SafInit *Init);
01134 mf_uns32 safterm(mf_uns32 What, void *Reserved);
01135 mf_uns32 safcfg(struct SafInit *Init, void *Reserved);
01136 mf_uns32 safcfgesm(int Index, struct cas_esm_config_internal *Config,
01137 void *Reserved);
01138
01139
01142 #define SafTERM_THREAD 0
01143 #define SafTERM_PROCESS 1
01144 #define SafTERM_ESF 2
01146
01147
01148
01149
01150
01151 int SafStrcmpCI(const char *, const char *);
01152 int SafStrcmpCIN(const char *, const char *, size_t);
01153 char *SafDupStr(const char *);
01154
01160 #define SafSTRCMP(s1, op, s2) (strcmp((s1),(s2)) op 0)
01161
01162
01168 #define SafSTRCMP_N(s1, op, s2, n) (strncmp((s1),(s2),(n)) op 0)
01169
01170
01176 #define SafSTRCMP_CI(s1, op, s2) (SafStrcmpCI((s1),(s2)) op 0)
01177
01178
01184 #define SafSTRCMP_CIN(s1, op, s2, n) (SafStrcmpCIN((s1),(s2),(n)) op 0)
01185
01186
01187
01188 #define SafDO_STR(x) #x
01189
01193 #define SafSTRING(x) SafDO_STR(x)
01194
01195
01196
01197
01198 mf_uns32 SafNative32u(mf_uns32 NetValue);
01199 int SafState(void);
01200 SafRet SafQueryCfg(const char *Class, const char *Name, char **ValueP);
01201
01202
01203
01204
01205
01206
01207
01208 #if !defined SafLOG_ALL
01209 #define SafLOG_ALL 0
01210 #endif
01211
01212 #endif
01213
01214
01215