"Fossies" - the Fresh Open Source Software Archive

Member "opensaf-5.21.09/src/imm/common/immsv_evt_model.h" (14 Sep 2021, 9038 Bytes) of package /linux/misc/opensaf-5.21.09.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "immsv_evt_model.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 5.21.06_vs_5.21.09.

    1 /*      -*- OpenSAF  -*-
    2  *
    3  * (C) Copyright 2008 The OpenSAF Foundation
    4  *
    5  * This program is distributed in the hope that it will be useful, but
    6  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
    7  * or FITNESS FOR A PARTICULAR PURPOSE. This file and program are licensed
    8  * under the GNU Lesser General Public License Version 2.1, February 1999.
    9  * The complete license can be accessed from the following location:
   10  * http://opensource.org/licenses/lgpl-license.php
   11  * See the Copying file included with the OpenSAF distribution for full
   12  * licensing terms.
   13  *
   14  * Author(s): Ericsson AB
   15  *
   16  */
   17 
   18 #ifndef IMM_COMMON_IMMSV_EVT_MODEL_H_
   19 #define IMM_COMMON_IMMSV_EVT_MODEL_H_
   20 #include <saImm.h>
   21 #include <saImmOm.h>
   22 #include <saImmOi.h>
   23 
   24 #ifdef __cplusplus
   25 extern "C" {
   26 #endif
   27 
   28 /* BUGBUG ABT types converted from ASN1 to OpenSaf (transport over MDS). */
   29 
   30 typedef struct immsv_octet_string {
   31   SaUint32T size; /* Size of the buffer */
   32   char *buf;      /* Buffer with consecutive OCTET_STRING bits */
   33 } IMMSV_OCTET_STRING;
   34 
   35 /* BUGBUG ABT remove the EDU/edu from the name! */
   36 
   37 typedef struct immsv_edu_attr_val {
   38   union {
   39     SaInt32T saint32;
   40     SaUint32T sauint32;
   41     SaInt64T saint64;
   42     SaUint64T sauint64;
   43     SaTimeT satime;
   44     SaFloatT safloat;
   45     SaDoubleT sadouble;
   46     IMMSV_OCTET_STRING x;  // SaNameT, SaStringT, SaAnyT.
   47   } val;
   48 } IMMSV_EDU_ATTR_VAL;
   49 
   50 typedef struct immsv_edu_attr_val_list {
   51   IMMSV_EDU_ATTR_VAL n;
   52   struct immsv_edu_attr_val_list *next;
   53 } IMMSV_EDU_ATTR_VAL_LIST;
   54 
   55 typedef struct ImmsvAttrValues {
   56   IMMSV_OCTET_STRING attrName;  // Should perhaps be a char* ??
   57   long attrValuesNumber;        // If zero => NO VALUE !!!
   58   IMMSV_EDU_ATTR_VAL attrValue;
   59   long attrValueType;
   60   IMMSV_EDU_ATTR_VAL_LIST *attrMoreValues;
   61 } IMMSV_ATTR_VALUES;
   62 
   63 typedef struct immsv_attr_values_list {
   64   IMMSV_ATTR_VALUES n;
   65   struct immsv_attr_values_list *next;
   66 } IMMSV_ATTR_VALUES_LIST;
   67 
   68 typedef struct immsv_attr_mods_list {
   69   SaUint32T attrModType;
   70   IMMSV_ATTR_VALUES attrValue;
   71   struct immsv_attr_mods_list *next;
   72 } IMMSV_ATTR_MODS_LIST;
   73 
   74 typedef struct ImmsvOmRspSearchNext {
   75   IMMSV_OCTET_STRING objectName;
   76   IMMSV_ATTR_VALUES_LIST *attrValuesList;
   77 } IMMSV_OM_RSP_SEARCH_NEXT;
   78 
   79 typedef struct ImmsvOmRspSearchBundleNext {
   80   SaUint32T resultSize;
   81   IMMSV_OM_RSP_SEARCH_NEXT **searchResult;
   82 } IMMSV_OM_RSP_SEARCH_BUNDLE_NEXT;
   83 
   84 typedef struct ImmsvOmRspSearchRemote {
   85   SaAisErrorT result;
   86   SaUint32T requestNodeId;
   87   SaUint32T remoteNodeId;
   88   SaUint32T searchId;
   89   IMMSV_OM_RSP_SEARCH_NEXT runtimeAttrs;
   90 } IMMSV_OM_RSP_SEARCH_REMOTE;
   91 
   92 typedef struct ImmsvAdminOperationParam {
   93   IMMSV_OCTET_STRING paramName;
   94   long paramType;
   95   IMMSV_EDU_ATTR_VAL paramBuffer;
   96   struct ImmsvAdminOperationParam *next;
   97 } IMMSV_ADMIN_OPERATION_PARAM;
   98 
   99 typedef struct ImmsvOmAdminOperationInvoke {
  100   SaUint32T adminOwnerId;
  101   SaInt32T invocation;  // Negative => asyncronous admop
  102   SaUint64T operationId;
  103   SaUint64T continuationId;
  104   SaTimeT timeout;
  105   IMMSV_OCTET_STRING objectName;
  106   IMMSV_ADMIN_OPERATION_PARAM *params;
  107 } IMMSV_OM_ADMIN_OP_INVOKE;
  108 
  109 typedef struct immsv_oi_admin_op_rsp {
  110   SaImmOiHandleT oi_client_hdl;
  111   SaInvocationT invocation;  // Negative => async invocation
  112   SaAisErrorT result;
  113   SaAisErrorT error;
  114   IMMSV_ADMIN_OPERATION_PARAM *parms;
  115 } IMMSV_OI_ADMIN_OP_RSP;
  116 
  117 typedef struct ImmsvAttrDefinition {
  118   IMMSV_OCTET_STRING attrName;
  119   SaUint32T attrValueType;
  120   SaUint64T attrFlags;
  121   SaUint32T attrNtfId;
  122   IMMSV_EDU_ATTR_VAL *attrDefaultValue;  // CHANGED !!!
  123 } IMMSV_ATTR_DEFINITION;
  124 
  125 typedef struct ImmsvAttrDefList {
  126   IMMSV_ATTR_DEFINITION d;
  127   struct ImmsvAttrDefList *next;
  128 } IMMSV_ATTR_DEF_LIST;
  129 
  130 typedef struct ImmsvOmClassDescr {
  131   IMMSV_OCTET_STRING className;
  132   SaUint32T classCategory;
  133   IMMSV_ATTR_DEF_LIST *attrDefinitions;
  134 } IMMSV_OM_CLASS_DESCR;
  135 
  136 typedef struct ImmsvOmAdminOwnerInitialize {
  137   SaNameT adminOwnerName;
  138   bool releaseOwnershipOnFinalize;
  139 } IMMSV_OM_ADMIN_OWNER_INITIALIZE;
  140 
  141 typedef struct ImmsvOmCcbInitialize {
  142   SaUint32T adminOwnerId;
  143   SaUint64T ccbFlags;
  144   SaImmHandleT client_hdl;  // odd to put client_hdl here..
  145 } IMMSV_OM_CCB_INITIALIZE;
  146 
  147 typedef struct ImmsvOmCcbObjectCreate {
  148   SaUint32T ccbId;
  149   SaUint32T adminOwnerId;
  150   IMMSV_OCTET_STRING className;
  151   IMMSV_OCTET_STRING
  152       parentOrObjectDn;  // used for parent name and object name in _o3
  153   IMMSV_ATTR_VALUES_LIST *attrValues;
  154   SaUint64T immHandle;  // only used for the ND->A up-call (use seprt msg?)
  155 } IMMSV_OM_CCB_OBJECT_CREATE;
  156 
  157 typedef struct ImmsvOmCcbObjectModify {
  158   SaUint32T ccbId;
  159   SaUint32T adminOwnerId;
  160   IMMSV_OCTET_STRING objectName;
  161   IMMSV_ATTR_MODS_LIST *attrMods;
  162   SaUint64T immHandle;  // Used for the ND->A up-call in OM(use seprt msg?)
  163   /* Used for first hop A->ND in OiRtUpdate. */
  164 } IMMSV_OM_CCB_OBJECT_MODIFY;
  165 
  166 typedef struct ImmsvOmCcbObjectDelete {
  167   SaUint32T ccbId;
  168   SaUint32T adminOwnerId;  // Rename? used for both adminOwnerId &
  169                            // continuationId
  170   IMMSV_OCTET_STRING objectName;
  171   SaUint64T immHandle;  // only used for the ND->A up-call
  172 } IMMSV_OM_CCB_OBJECT_DELETE;
  173 
  174 typedef struct ImmsvOmCcbCompleted {
  175   SaUint32T ccbId;
  176   SaUint32T implId;
  177   SaUint32T invocation;
  178   SaUint64T immHandle;  // only used for the ND->A up-call
  179 } IMMSV_OM_CCB_COMPLETED;
  180 
  181 typedef struct ImmsvOmSearchOneAttr {
  182   IMMSV_OCTET_STRING attrName;
  183   SaUint32T attrValueType;
  184   IMMSV_EDU_ATTR_VAL attrValue;
  185 } IMMSV_OM_SEARCH_ONE_ATTR;
  186 
  187 typedef enum {
  188   ImmOmSearchParameter_PR_NOTHING = 1, /* No components present */
  189   ImmOmSearchParameter_PR_oneAttrParam = 2,
  190   ImmOmSearchParameter_PR_nonExtendedName_NOTHING = 3,
  191   ImmOmSearchParameter_PR_nonExtendedName_oneAttrParam = 4,
  192 } ImmsvOmSearchParm_PR;
  193 
  194 typedef struct ImmsvSearchParam {
  195   ImmsvOmSearchParm_PR present;
  196   union ImmsvOmSearchParameter_u {
  197     IMMSV_OM_SEARCH_ONE_ATTR oneAttrParam;
  198   } choice;
  199 } IMMSV_SEARCH_PARAM;
  200 
  201 typedef struct ImmsvAttrNameList {
  202   IMMSV_OCTET_STRING name;
  203   struct ImmsvAttrNameList *next;
  204 } IMMSV_ATTR_NAME_LIST;
  205 
  206 typedef struct ImmsvOmSearchInit {
  207   SaImmHandleT client_hdl;
  208   IMMSV_OCTET_STRING rootName;
  209   SaUint32T scope;
  210   SaUint64T searchOptions;
  211   IMMSV_SEARCH_PARAM searchParam;
  212   IMMSV_ATTR_NAME_LIST *attributeNames;
  213   SaUint32T ccbId; /* Only for saImmOmCcbObjectRead */
  214 } IMMSV_OM_SEARCH_INIT;
  215 
  216 typedef struct ImmsvOmSearchRemote {
  217   SaImmHandleT client_hdl;
  218   SaUint32T requestNodeId;
  219   SaUint32T remoteNodeId;
  220   SaUint32T searchId;
  221   IMMSV_OCTET_STRING objectName;
  222   IMMSV_ATTR_NAME_LIST *attributeNames;
  223 } IMMSV_OM_SEARCH_REMOTE;
  224 
  225 typedef struct ImmsvOmObjectSync {
  226   IMMSV_OCTET_STRING className;
  227   IMMSV_OCTET_STRING objectName;
  228   IMMSV_ATTR_VALUES_LIST *attrValues;
  229   struct ImmsvOmObjectSync *next;
  230 } IMMSV_OM_OBJECT_SYNC;
  231 
  232 typedef struct ImmsvObjNameList {
  233   IMMSV_OCTET_STRING name;
  234   struct ImmsvObjNameList *next;
  235 } IMMSV_OBJ_NAME_LIST;
  236 
  237 typedef struct ImmsvAdmoList {
  238   SaUint32T id;
  239   SaUint32T nodeId;
  240   IMMSV_OCTET_STRING adminOwnerName;
  241   bool releaseOnFinalize;
  242   bool isDying;
  243   IMMSV_OBJ_NAME_LIST *touchedObjects;
  244   struct ImmsvAdmoList *next;
  245 } IMMSV_ADMO_LIST;
  246 
  247 typedef struct ImmsvImplList {
  248   SaUint32T id;
  249   SaUint32T nodeId;
  250   IMMSV_OCTET_STRING implementerName;
  251   SaUint64T mds_dest;
  252   struct ImmsvImplList *next;
  253 } IMMSV_IMPL_LIST;
  254 
  255 typedef struct ImmsvClassList {
  256   IMMSV_OCTET_STRING className;
  257   IMMSV_OCTET_STRING classImplName;
  258   SaUint32T nrofInstances;
  259   struct ImmsvClassList *next;
  260 } IMMSV_CLASS_LIST;
  261 
  262 typedef struct ImmsvCcbOutcomeList {
  263   SaUint32T ccbId;
  264   SaUint32T ccbState;
  265   struct ImmsvCcbOutcomeList *next;
  266 } IMMSV_CCB_OUTCOME_LIST;
  267 
  268 typedef struct ImmsvOmFinalizeSync {
  269   SaUint32T lastContinuationId;
  270   IMMSV_ADMO_LIST *adminOwners;
  271   IMMSV_IMPL_LIST *implementers;
  272   IMMSV_CLASS_LIST *classes;
  273   IMMSV_CCB_OUTCOME_LIST *ccbResults;
  274 } IMMSV_OM_FINALIZE_SYNC;
  275 
  276 typedef struct ImmsvOiImplSetReq  // used for both implSet & classImplSet
  277 {
  278   SaImmOiHandleT client_hdl;
  279   IMMSV_OCTET_STRING impl_name; /*and className and objName */
  280   SaUint32T impl_id;
  281   SaUint32T scope;      /*Only for obj impl set/rel */
  282   SaUint32T oi_timeout; /* Timeout for OI callbacks */
  283 } IMMSV_OI_IMPLSET_REQ;
  284 
  285 typedef struct immsv_oi_ccb_upcall_rsp {
  286   SaImmOiHandleT oi_client_hdl;  // needed ?? does not seem like it
  287   SaUint32T ccbId;
  288   SaUint32T implId;
  289   SaUint32T inv;
  290   SaAisErrorT result;
  291   SaNameT name;
  292   IMMSV_OCTET_STRING errorString;
  293 } IMMSV_OI_CCB_UPCALL_RSP;
  294 
  295 typedef struct ImmsvSyncFevsBase {
  296   SaUint64T fevsBase;
  297   SaImmHandleT client_hdl;  // odd to put client_hdl here..
  298 } IMMSV_SYNC_FEVS_BASE;
  299 
  300 typedef struct ImmaSyncrTimeoutUpdate {
  301   SaUint64T immHandle;
  302   SaTimeT syncrTimeout;
  303 } IMMA_SYNCR_TIMEOUT_UPDATE;
  304 
  305 /* Macros to pack and unpack imm handles */
  306 #define m_IMMSV_PACK_HANDLE(high, low) \
  307   ((((SaUint64T)high) << 32) | ((SaUint32T)low))
  308 #define m_IMMSV_UNPACK_HANDLE_HIGH(imm_handle) (SaUint32T)((imm_handle) >> 32)
  309 #define m_IMMSV_UNPACK_HANDLE_LOW(imm_handle) \
  310   (SaUint32T)((imm_handle)&0x00000000ffffffff)
  311 
  312 #ifdef __cplusplus
  313 }
  314 #endif
  315 
  316 #endif  // IMM_COMMON_IMMSV_EVT_MODEL_H_