• 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 IP Development Limited 2006-2011.
00004  * All rights reserved.
00005  *
00006  * The software and information contained herein are proprietary to, and
00007  * comprise valuable trade secrets of, Micro Focus International Ltd., 
00008  * which intends to preserve as trade secrets such software and 
00009  * information. This software is an unpublished copyright of Micro Focus  
00010  * and may not be used, copied, transmitted, or stored in any manner.  
00011  * This software and information or any other copies thereof may not be
00012  * provided or otherwise made available to any other person.
00013  *
00014  *      Enterprise Server SAF (Security) Manager
00015  *      Manager Startup and Control
00016  *
00017  *      @(#)safmgr.h    $Revision: 448919 $     
00018  *
00019  *      $Date: 2011-08-22 18:06:05 +0100 (Mon, 22 Aug 2011) $
00020  *
00021  ****************************************************************************/
00022 
00023 /* Start of source module safmgr.h */
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 Doxygen Note: There's a Doxygen bug that prevents resolving references
00040 to files with hyphens in their names in Dot diagrams. That means we
00041 cannot add eg -- URL="\ref saf-env.c" -- to the diagrams below, where a
00042 box would logically link to the page for a saf-*.c file.
00043 ***/
00044 
00817 /* SAF Manager Version */
00818 #include "saf-version.h"
00819 
00820 
00821 
00829 #define SafESM_MAX 8
00830 
00831 /*
00832 Opaque declarations for the structures that contain configuration
00833 information for the SAF Manager and for ESM modules.  See
00834 COMMS/mfds/1.05/mdsa/mdsa_internal.h for contents.
00835 */
00836 
00837 struct cas_saf_config_internal;
00838 struct cas_esm_config_internal;
00839 
00840 /*
00841 Opaque declaration for the SAF API structure, in case safapi.h has
00842 not been included yet.
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 /* SAF Manager API */
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 /* Internal APIs */
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 /* Helper for SafSTRING */
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 SafLOG_ALL can be defined in the build to log more information for each
01192 request.
01193 ***/
01194 
01195 #if !defined SafLOG_ALL
01196    #define SafLOG_ALL 0
01197 #endif
01198 
01199 #endif
01200 
01201 /* End of safmgr.h */
01202