"Fossies" - the Fresh Open Source Software Archive

Member "opensaf-5.21.09/src/amf/common/amf_amfparam.h" (31 May 2021, 10771 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 "amf_amfparam.h" see the Fossies "Dox" file reference documentation.

    1 /*      -*- OpenSAF  -*-
    2  *
    3  * (C) Copyright 2008 The OpenSAF Foundation
    4  * Copyright (C) 2017, Oracle and/or its affiliates. All rights reserved.
    5  *
    6  * This program is distributed in the hope that it will be useful, but
    7  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
    8  * or FITNESS FOR A PARTICULAR PURPOSE. This file and program are licensed
    9  * under the GNU Lesser General Public License Version 2.1, February 1999.
   10  * The complete license can be accessed from the following location:
   11  * http://opensource.org/licenses/lgpl-license.php
   12  * See the Copying file included with the OpenSAF distribution for full
   13  * licensing terms.
   14  *
   15  * Author(s): Emerson Network Power
   16  *
   17  */
   18 
   19 /*****************************************************************************
   20 ..............................................................................
   21 
   22 ..............................................................................
   23 
   24   DESCRIPTION:
   25 
   26   This file includes definitions related to AMF APIs.
   27 
   28 ******************************************************************************
   29 */
   30 
   31 #ifndef AMF_COMMON_AMF_AMFPARAM_H_
   32 #define AMF_COMMON_AMF_AMFPARAM_H_
   33 
   34 /* AMF API enums */
   35 typedef enum avsv_amf_api_type {
   36   AVSV_AMF_FINALIZE = 1,
   37   AVSV_AMF_COMP_REG,
   38   AVSV_AMF_COMP_UNREG,
   39   AVSV_AMF_PM_START,
   40   AVSV_AMF_PM_STOP,
   41   AVSV_AMF_HC_START,
   42   AVSV_AMF_HC_STOP,
   43   AVSV_AMF_HC_CONFIRM,
   44   AVSV_AMF_CSI_QUIESCING_COMPLETE,
   45   AVSV_AMF_HA_STATE_GET,
   46   AVSV_AMF_PG_START,
   47   AVSV_AMF_PG_STOP,
   48   AVSV_AMF_ERR_REP,
   49   AVSV_AMF_ERR_CLEAR,
   50   AVSV_AMF_RESP,
   51   AVSV_AMF_INITIALIZE,
   52   AVSV_AMF_SEL_OBJ_GET,
   53   AVSV_AMF_DISPATCH,
   54   AVSV_AMF_COMP_NAME_GET,
   55   AVSV_AMF_COMP_TERM_RSP,
   56   AVSV_AMF_API_MAX
   57 } AVSV_AMF_API_TYPE;
   58 
   59 /* AMF Callback API enums */
   60 typedef enum avsv_amf_cbk_type {
   61   AVSV_AMF_HC = 1,
   62   AVSV_AMF_COMP_TERM,
   63   AVSV_AMF_CSI_SET,
   64   AVSV_AMF_CSI_REM,
   65   AVSV_AMF_PG_TRACK,
   66   AVSV_AMF_PXIED_COMP_INST,
   67   AVSV_AMF_PXIED_COMP_CLEAN,
   68   AVSV_AMF_CSI_ATTR_CHANGE,
   69   AVSV_AMF_SC_STATUS_CHANGE,
   70   AVSV_AMF_CONTAINED_COMP_INST,
   71   AVSV_AMF_CONTAINED_COMP_CLEAN,
   72   AVSV_AMF_CBK_MAX
   73 } AVSV_AMF_CBK_TYPE;
   74 
   75 /*
   76  * API & callback API parameter definitions.
   77  * These definitions are used for
   78  * 1) encoding & decoding messages between AvND & AvA.
   79  * 2) storing the callback parameters in the pending callback
   80  *    list (on AvA & AvND) & overlapping request list (on AvND).
   81  */
   82 
   83 /*** API Parameter definitions ***/
   84 
   85 /* initialize - not reqd */
   86 typedef struct avsv_amf_init_param_tag { void *dummy; } AVSV_AMF_INIT_PARAM;
   87 
   88 /* selection object get - not reqd */
   89 typedef struct avsv_amf_sel_obj_get_param_tag {
   90   void *dummy;
   91 } AVSV_AMF_SEL_OBJ_GET_PARAM;
   92 
   93 /* dispatch  - not reqd */
   94 typedef struct avsv_amf_dispatch_param_tag {
   95   void *dummy;
   96 } AVSV_AMF_DISPATCH_PARAM;
   97 
   98 /* finalize */
   99 typedef struct avsv_amf_finalize_param_tag {
  100   SaAmfHandleT hdl;  /* AMF handle */
  101   SaNameT comp_name; /* comp-name (extra param) */
  102 } AVSV_AMF_FINALIZE_PARAM;
  103 
  104 /* component register */
  105 typedef struct avsv_amf_comp_reg_param_tag {
  106   SaAmfHandleT hdl;        /* AMF handle */
  107   SaNameT comp_name;       /* comp name */
  108   SaNameT proxy_comp_name; /* proxy comp name */
  109   SaVersionT version;      // SAF VERSION of component.
  110 #define AVSV_AMF_CALLBACK_TERMINATE       0x01
  111 #define AVSV_AMF_CALLBACK_CSI_SET         0x02
  112 #define AVSV_AMF_CALLBACK_CSI_REMOVE      0x04
  113 #define AVSV_AMF_CALLBACK_CONTAINED_INST  0x08
  114 #define AVSV_AMF_CALLBACK_CONTAINED_CLEAN 0x10
  115 #define AVSV_AMF_CALLBACK_PROXIED_INST    0x20
  116 #define AVSV_AMF_CALLBACK_PROXIED_CLEAN   0x40
  117   SaUint64T callbacks;
  118 } AVSV_AMF_COMP_REG_PARAM;
  119 
  120 /* component unregister */
  121 typedef struct avsv_amf_comp_unreg_param_tag {
  122   SaAmfHandleT hdl;        /* AMF handle */
  123   SaNameT comp_name;       /* comp name */
  124   SaNameT proxy_comp_name; /* proxy comp name */
  125 } AVSV_AMF_COMP_UNREG_PARAM;
  126 
  127 /* passive monitor start */
  128 typedef struct avsv_amf_pm_start_param_tag {
  129   SaAmfHandleT hdl;         /* AMF handle */
  130   SaNameT comp_name;        /* comp name */
  131   SaUint64T pid;            /* prc id */
  132   SaInt32T desc_tree_depth; /* descendent tree depth */
  133   SaAmfPmErrorsT pm_err;    /* pm errors */
  134   union {
  135     uint32_t raw;
  136     AVSV_ERR_RCVR avsv_ext;
  137     SaAmfRecommendedRecoveryT saf_amf;
  138   } rec_rcvr;
  139 } AVSV_AMF_PM_START_PARAM;
  140 
  141 /* passive monitor stop */
  142 typedef struct avsv_amf_pm_stop_param_tag {
  143   SaAmfHandleT hdl;                /* AMF handle */
  144   SaNameT comp_name;               /* comp name */
  145   SaAmfPmStopQualifierT stop_qual; /* stop qualifier */
  146   SaUint64T pid;                   /* prc id */
  147   SaAmfPmErrorsT pm_err;           /* pm errors */
  148 } AVSV_AMF_PM_STOP_PARAM;
  149 
  150 /* healthcheck start */
  151 typedef struct avsv_amf_hc_start_param_tag {
  152   SaAmfHandleT hdl;                     /* AMF handle */
  153   SaNameT comp_name;                    /* comp name */
  154   SaNameT proxy_comp_name;              /* proxy comp name */
  155   SaAmfHealthcheckKeyT hc_key;          /* healthcheck key */
  156   SaAmfHealthcheckInvocationT inv_type; /* invocation type */
  157   union {
  158     uint32_t raw;
  159     AVSV_ERR_RCVR avsv_ext;
  160     SaAmfRecommendedRecoveryT saf_amf;
  161   } rec_rcvr;
  162 } AVSV_AMF_HC_START_PARAM;
  163 
  164 /* healthcheck stop */
  165 typedef struct avsv_amf_hc_stop_param_tag {
  166   SaAmfHandleT hdl;            /* AMF handle */
  167   SaNameT comp_name;           /* comp name */
  168   SaNameT proxy_comp_name;     /* proxy comp name */
  169   SaAmfHealthcheckKeyT hc_key; /* healthcheck key */
  170 } AVSV_AMF_HC_STOP_PARAM;
  171 
  172 /* healthcheck confirm */
  173 typedef struct avsv_amf_hc_confirm_param_tag {
  174   SaAmfHandleT hdl;            /* AMF handle */
  175   SaNameT comp_name;           /* comp name */
  176   SaNameT proxy_comp_name;     /* proxy comp name */
  177   SaAmfHealthcheckKeyT hc_key; /* healthcheck key */
  178   SaAisErrorT hc_res;          /* healthcheck result */
  179 } AVSV_AMF_HC_CONFIRM_PARAM;
  180 
  181 /* component name get */
  182 typedef struct avsv_amf_comp_name_get_param_tag {
  183   SaAmfHandleT hdl;  /* AMF handle */
  184   SaNameT comp_name; /* comp name */
  185 } AVSV_AMF_COMP_NAME_GET_PARAM;
  186 
  187 /* csi quiescing complete */
  188 typedef struct avsv_amf_csi_quiescing_compl_param_tag {
  189   SaAmfHandleT hdl;  /* AMF handle */
  190   SaInvocationT inv; /* invocation value */
  191   SaAisErrorT err;   /* error */
  192   SaNameT comp_name; /* comp-name (extra param) */
  193 } AVSV_AMF_CSI_QUIESCING_COMPL_PARAM;
  194 
  195 /* ha state get */
  196 typedef struct avsv_amf_ha_get_param_tag {
  197   SaAmfHandleT hdl;  /* AMF handle */
  198   SaNameT comp_name; /* comp name */
  199   SaNameT csi_name;  /* csi name */
  200   SaAmfHAStateT ha;  /* ha state */
  201 } AVSV_AMF_HA_GET_PARAM;
  202 
  203 /* pg start */
  204 typedef struct avsv_amf_pg_start_param_tag {
  205   SaAmfHandleT hdl; /* AMF handle */
  206   SaNameT csi_name; /* csi name */
  207   SaUint8T flags;   /* track flags */
  208   bool is_syn;      /* indicates if the appln synchronously
  209                                waits for the pg members (extra param) */
  210 } AVSV_AMF_PG_START_PARAM;
  211 
  212 /* pg stop */
  213 typedef struct avsv_amf_pg_stop_param_tag {
  214   SaAmfHandleT hdl; /* AMF handle */
  215   SaNameT csi_name; /* csi name */
  216 } AVSV_AMF_PG_STOP_PARAM;
  217 
  218 /* error report */
  219 typedef struct avsv_amf_err_rep_param_tag {
  220   SaAmfHandleT hdl;    /* AMF handle */
  221   SaNameT err_comp;    /* erroneous comp */
  222   SaTimeT detect_time; /* error detect time */
  223   union {
  224     uint32_t raw;
  225     AVSV_ERR_RCVR avsv_ext;
  226     SaAmfRecommendedRecoveryT saf_amf;
  227   } rec_rcvr;
  228 } AVSV_AMF_ERR_REP_PARAM;
  229 
  230 /* error clear */
  231 typedef struct avsv_amf_err_clear_param_tag {
  232   SaAmfHandleT hdl;  /* AMF handle */
  233   SaNameT comp_name; /* comp name */
  234 } AVSV_AMF_ERR_CLEAR_PARAM;
  235 
  236 /* response */
  237 typedef AVSV_AMF_CSI_QUIESCING_COMPL_PARAM AVSV_AMF_RESP_PARAM;
  238 
  239 /*** Callback Parameter definitions ***/
  240 
  241 /* healthcheck */
  242 typedef struct avsv_amf_hc_param_tag {
  243   SaNameT comp_name;           /* comp name */
  244   SaAmfHealthcheckKeyT hc_key; /* healthcheck key */
  245 } AVSV_AMF_HC_PARAM;
  246 
  247 /* component terminate */
  248 typedef struct avsv_amf_comp_term_param_tag {
  249   SaNameT comp_name; /* comp name */
  250 } AVSV_AMF_COMP_TERM_PARAM;
  251 
  252 /* csi set */
  253 typedef struct avsv_amf_csi_set_param_tag {
  254   SaNameT comp_name;            /* comp name */
  255   SaAmfHAStateT ha;             /* ha state */
  256   SaAmfCSIDescriptorT csi_desc; /* csi descriptor */
  257   AVSV_CSI_ATTRS attrs;         /* contains the csi-attr list */
  258 } AVSV_AMF_CSI_SET_PARAM;
  259 
  260 // CSI Attribute callback msg structure from AMFND to AMF agent.
  261 typedef struct avsv_amf_csi_attr_change_param_tag {
  262   SaNameT csi_name;               /* comp name */
  263   AVSV_CSI_ATTRS attrs;           /* contains the csi-attr list internal*/
  264   SaAmfCSIAttributeListT csiAttr; /* contains the csi-attr list SAF compliant*/
  265 } AVSV_AMF_CSI_ATTR_CHANGE_PARAM;
  266 
  267 //SC status change callback msg structure from AMFND to AMF agent.
  268 typedef struct avsv_amf_sc_status_param_tag {
  269   OsafAmfSCStatusT sc_status;
  270 } AVSV_AMF_SC_STATUS_CHANGE_PARAM;
  271 
  272 /* csi remove */
  273 typedef struct avsv_amf_csi_rem_param_tag {
  274   SaNameT comp_name;        /* comp name */
  275   SaNameT csi_name;         /* csi name */
  276   SaAmfCSIFlagsT csi_flags; /* csi flags */
  277 } AVSV_AMF_CSI_REM_PARAM;
  278 
  279 /* pg track */
  280 typedef struct avsv_amf_pg_track_param_tag {
  281   SaNameT csi_name;                            /* csi name */
  282   SaUint32T mem_num;                           /* number of members */
  283   SaAisErrorT err;                             /* error */
  284   SaAmfProtectionGroupNotificationBufferT buf; /* notify buffer */
  285 } AVSV_AMF_PG_TRACK_PARAM;
  286 
  287 /* proxied component instantiate */
  288 typedef struct avsv_amf_pxied_comp_inst_param_tag {
  289   SaNameT comp_name; /* comp name */
  290 } AVSV_AMF_PXIED_COMP_INST_PARAM;
  291 
  292 /* proxied component cleanup */
  293 typedef struct avsv_amf_pxied_comp_clean_param_tag {
  294   SaNameT comp_name; /* comp name */
  295 } AVSV_AMF_PXIED_COMP_CLEAN_PARAM;
  296 
  297 /* contained component instantiate */
  298 typedef struct avsv_amf_contained_comp_inst_param_tag {
  299   SaNameT comp_name; /* comp name */
  300 } AVSV_AMF_CONTAINED_COMP_INST_PARAM;
  301 
  302 /* contained component cleanup */
  303 typedef struct avsv_amf_contained_comp_clean_param_tag {
  304   SaNameT comp_name; /* comp name */
  305 } AVSV_AMF_CONTAINED_COMP_CLEAN_PARAM;
  306 
  307 /* wrapper structure for all the callbacks */
  308 typedef struct avsv_amf_cbk_info_tag {
  309   SaAmfHandleT hdl;       /* AMF handle */
  310   SaInvocationT inv;      /* invocation value */
  311   AVSV_AMF_CBK_TYPE type; /* callback type */
  312   union {
  313     AVSV_AMF_HC_PARAM hc;
  314     AVSV_AMF_COMP_TERM_PARAM comp_term;
  315     AVSV_AMF_CSI_SET_PARAM csi_set;
  316     AVSV_AMF_CSI_REM_PARAM csi_rem;
  317     AVSV_AMF_PG_TRACK_PARAM pg_track;
  318     AVSV_AMF_PXIED_COMP_INST_PARAM pxied_comp_inst;
  319     AVSV_AMF_PXIED_COMP_CLEAN_PARAM pxied_comp_clean;
  320     AVSV_AMF_CSI_ATTR_CHANGE_PARAM csi_attr_change;
  321     AVSV_AMF_SC_STATUS_CHANGE_PARAM sc_status_change;
  322     AVSV_AMF_CONTAINED_COMP_INST_PARAM contained_inst;
  323     AVSV_AMF_CONTAINED_COMP_CLEAN_PARAM contained_clean;
  324   } param;
  325 } AVSV_AMF_CBK_INFO;
  326 
  327 #endif  // AMF_COMMON_AMF_AMFPARAM_H_