1 /*****************************************************************************\
2  **  tree.h - PMI tree communication handling code
3  *****************************************************************************
4  *  Copyright (C) 2011-2012 National University of Defense Technology.
5  *  Written by Hongjia Cao <hjcao@nudt.edu.cn>.
6  *  All rights reserved.
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 _TREE_H
39 #define _TREE_H
40 
41 enum {
42 	TREE_CMD_KVS_FENCE,
43 	TREE_CMD_KVS_FENCE_RESP,
44 	TREE_CMD_SPAWN,
45 	TREE_CMD_SPAWN_RESP,
46 	TREE_CMD_NAME_PUBLISH,
47 	TREE_CMD_NAME_UNPUBLISH,
48 	TREE_CMD_NAME_LOOKUP,
49 	TREE_CMD_RING,
50 	TREE_CMD_RING_RESP,
51 	TREE_CMD_COUNT
52 };
53 
54 
55 extern int handle_tree_cmd(int fd);
56 extern int tree_msg_to_srun(uint32_t len, char *msg);
57 extern int tree_msg_to_srun_with_resp(uint32_t len, char *msg, Buf *resp_ptr);
58 extern int tree_msg_to_spawned_sruns(uint32_t len, char *msg);
59 
60 
61 
62 #endif	/* _TREE_H */
63