root/opal/mca/reachable/netlink/reachable_netlink_component.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. reachable_netlink_open
  2. reachable_netlink_close
  3. component_register
  4. reachable_netlink_component_query

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2015 Cisco Systems, Inc.  All rights reserved.
   4  * Copyright (c) 2015      Los Alamos National Security, LLC. All rights
   5  *                         reserved.
   6  * $COPYRIGHT$
   7  *
   8  * Additional copyrights may follow
   9  *
  10  * $HEADER$
  11  *
  12  */
  13 
  14 #include "opal_config.h"
  15 
  16 #include "opal/constants.h"
  17 #include "opal/util/proc.h"
  18 #include "opal/mca/reachable/reachable.h"
  19 #include "reachable_netlink.h"
  20 
  21 /*
  22  * Public string showing the reachable netlink component version number
  23  */
  24 const char *opal_reachable_netlink_component_version_string =
  25     "OPAL netlink reachable MCA component version " OPAL_VERSION;
  26 
  27 /*
  28  * Local function
  29  */
  30 static int reachable_netlink_open(void);
  31 static int reachable_netlink_close(void);
  32 static int reachable_netlink_component_query(mca_base_module_t **module, int *priority);
  33 static int component_register(void);
  34 
  35 
  36 /*
  37  * Instantiate the public struct with all of our public information
  38  * and pointers to our public functions in it
  39  */
  40 
  41 opal_reachable_base_component_t mca_reachable_netlink_component = {
  42 
  43     /* First, the mca_component_t struct containing meta information
  44        about the component itself */
  45 
  46     .base_version = {
  47         /* Indicate that we are a reachable v1.1.0 component (which also
  48            implies a specific MCA version) */
  49 
  50         OPAL_REACHABLE_BASE_VERSION_2_0_0,
  51 
  52         /* Component name and version */
  53 
  54         .mca_component_name = "netlink",
  55         MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION,
  56                               OPAL_RELEASE_VERSION),
  57 
  58         /* Component open and close functions */
  59 
  60         .mca_open_component = reachable_netlink_open,
  61         .mca_close_component = reachable_netlink_close,
  62         .mca_query_component = reachable_netlink_component_query,
  63         .mca_register_component_params = component_register,
  64     },
  65     /* Next the MCA v1.0.0 component meta data */
  66     .base_data = {
  67         /* The component is checkpoint ready */
  68         MCA_BASE_METADATA_PARAM_CHECKPOINT
  69     }
  70 };
  71 
  72 static int reachable_netlink_open(void)
  73 {
  74     /* construct the component fields */
  75 
  76     return OPAL_SUCCESS;
  77 }
  78 
  79 static int reachable_netlink_close(void)
  80 {
  81     return OPAL_SUCCESS;
  82 }
  83 
  84 static int component_register(void)
  85 {
  86     return OPAL_SUCCESS;
  87 }
  88 
  89 static int
  90 reachable_netlink_component_query(mca_base_module_t **module, int *priority)
  91 {
  92     *priority = 50;
  93     *module = (mca_base_module_t *) &opal_reachable_netlink_module;
  94     return OPAL_SUCCESS;
  95 }

/* [<][>][^][v][top][bottom][index][help] */