1 /*****************************************************************************\
2  *  slurm_acct_gather_interconnect.h - implementation-independent job interconnect
3  *  accounting plugin definitions
4  *****************************************************************************
5  *  Copyright (C) 2013 Bull
6  *  Written by Yiannis Georgiou <yiannis.georgiou@bull.net>
7  *
8  *  This file is part of Slurm, a resource management program.
9  *  For details, see <https://slurm.schedmd.com>.
10  *  Please also read the included file: DISCLAIMER.
11  *
12  *  Slurm is free software; you can redistribute it and/or modify it under
13  *  the terms of the GNU General Public License as published by the Free
14  *  Software Foundation; either version 2 of the License, or (at your option)
15  *  any later version.
16  *
17  *  In addition, as a special exception, the copyright holders give permission
18  *  to link the code of portions of this program with the OpenSSL library under
19  *  certain conditions as described in each individual source file, and
20  *  distribute linked combinations including the two. You must obey the GNU
21  *  General Public License in all respects for all of the code used other than
22  *  OpenSSL. If you modify file(s) with this exception, you may extend this
23  *  exception to your version of the file(s), but you are not obligated to do
24  *  so. If you do not wish to do so, delete this exception statement from your
25  *  version.  If you delete this exception statement from all source files in
26  *  the program, then also delete it here.
27  *
28  *  Slurm is distributed in the hope that it will be useful, but WITHOUT ANY
29  *  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
30  *  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
31  *  details.
32  *
33  *  You should have received a copy of the GNU General Public License along
34  *  with Slurm; if not, write to the Free Software Foundation, Inc.,
35  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA.
36 \*****************************************************************************/
37 
38 #ifndef __SLURM_ACCT_GATHER_INTERCONNECT_H__
39 #define __SLURM_ACCT_GATHER_INTERCONNECT_H__
40 
41 #include <inttypes.h>
42 #include <sys/resource.h>
43 #include <sys/types.h>
44 #include <time.h>
45 #include <unistd.h>
46 
47 #include "slurm/slurm.h"
48 #include "slurm/slurmdb.h"
49 
50 #include "src/common/macros.h"
51 #include "src/common/pack.h"
52 #include "src/common/list.h"
53 #include "src/common/xmalloc.h"
54 #include "src/common/slurm_acct_gather.h"
55 #include "src/common/slurm_jobacct_gather.h"
56 
57 extern int acct_gather_interconnect_init(void); /* load the plugin */
58 extern int acct_gather_interconnect_fini(void); /* unload the plugin */
59 extern int acct_gather_interconnect_startpoll(uint32_t frequency);
60 extern int acct_gather_interconnect_g_get_data(acct_gather_data_t *data);
61 
62 extern int acct_gather_interconnect_g_node_update(void);
63 /*
64  * Define plugin local conf for acct_gather.conf
65  *
66  * Parameters
67  *      full_options -- pointer that will receive list of plugin local
68  *                      definitions
69  *      full_options_cnt -- count of plugin local definitions
70  */
71 extern int acct_gather_interconnect_g_conf_options(s_p_options_t **full_options,
72 						   int *full_options_cnt);
73 /*
74  * set plugin local conf from acct_gather.conf into its structure
75  *
76  * Parameters
77  *      tbl - hash table of acct_gather.conf key-values.
78  */
79 extern int acct_gather_interconnect_g_conf_set(s_p_hashtbl_t *tbl);
80 
81 /* Get the values from the plugin that are setup in the .conf
82  * file. This function should most likely only be called from
83  * src/common/slurm_acct_gather.c (acct_gather_get_values())
84  */
85 extern int acct_gather_interconnect_g_conf_values(void *data);
86 
87 #endif /*__SLURM_ACCT_GATHER_INTERCONNECT_H__*/
88