• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

safmgr.h

Go to the documentation of this file.
00001 /*
00002  *
00003  * Copyright (C) Micro Focus 2006-2014.  All rights reserved.
00004  *
00005  * The software and information contained herein are proprietary to, and
00006  * comprise valuable trade secrets of, Micro Focus International Ltd., 
00007  * which intends to preserve as trade secrets such software and 
00008  * information. This software is an unpublished copyright of Micro Focus  
00009  * and may not be used, copied, transmitted, or stored in any manner.  
00010  * This software and information or any other copies thereof may not be
00011  * provided or otherwise made available to any other person.
00012  *
00013  *      Enterprise Server SAF (Security) Manager
00014  *      Manager Startup and Control
00015  *
00016  *      @(#)safmgr.h    $Revision: 621664 $     
00017  *
00018  *      $Date: 2014-08-11 20:08:36 -0400 (Mon, 11 Aug 2014) $
00019  *
00020  ****************************************************************************/
00021 
00022 /* Start of source module safmgr.h */
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 Doxygen Note: There's a Doxygen bug that prevents resolving references
00039 to files with hyphens in their names in Dot diagrams. That means we
00040 cannot add eg -- URL="\ref saf-env.c" -- to the diagrams below, where a
00041 box would logically link to the page for a saf-*.c file.
00042 ***/
00043 
00816 /* SAF Manager Version */
00817 #include "saf-version.h"
00818 
00819 
00820 
00821 /***
00822 NOTE: Some of these structures have equivalent COBOL definitions in safmgr.cpy.
00823 Changes MUST be reflected there, and the CAS team must be notified to update
00824 their externals.
00825 ***/
00826 
00827 
00828 
00836 #define SafESM_MAX 8
00837 
00838 /*
00839 Opaque declarations for the structures that contain configuration
00840 information for the SAF Manager and for ESM modules.  See
00841 COMMS/mfds/1.05/mdsa/mdsa_internal.h for contents.
00842 */
00843 
00844 struct cas_saf_config_internal;
00845 struct cas_esm_config_internal;
00846 
00847 /*
00848 Opaque declaration for the SAF API structure, in case safapi.h has
00849 not been included yet.
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 /* SAF Manager API */
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 /* Helper APIs */
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 /* Helper for SafSTRING */
01188 #define SafDO_STR(x) #x
01189 
01193 #define SafSTRING(x) SafDO_STR(x)
01194 
01195 
01196 /* Internal APIs */
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 SafLOG_ALL can be defined in the build to log more information for each
01205 request. This currently requires editing common.mak.
01206 ***/
01207 
01208 #if !defined SafLOG_ALL
01209    #define SafLOG_ALL 0
01210 #endif
01211 
01212 #endif
01213 
01214 /* End of safmgr.h */
01215