1
/****************************************************************************\
2
* slurm_hostname.c - wrapper functions to allow for systems that
3
* don't allow strong alias'
4
*****************************************************************************
5
* Copyright (C) 2009 Lawrence Livermore National Security.
6
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
7
* Written by Danny Auble <da@llnl.gov>.
10
* This file is part of SLURM, a resource management program.
11
* For details, see <https://computing.llnl.gov/linux/slurm/>.
12
* Please also read the included file: DISCLAIMER.
14
* SLURM is free software; you can redistribute it and/or modify it under
15
* the terms of the GNU General Public License as published by the Free
16
* Software Foundation; either version 2 of the License, or (at your option)
19
* In addition, as a special exception, the copyright holders give permission
20
* to link the code of portions of this program with the OpenSSL library under
21
* certain conditions as described in each individual source file, and
22
* distribute linked combinations including the two. You must obey the GNU
23
* General Public License in all respects for all of the code used other than
24
* OpenSSL. If you modify file(s) with this exception, you may extend this
25
* exception to your version of the file(s), but you are not obligated to do
26
* so. If you do not wish to do so, delete this exception statement from your
27
* version. If you delete this exception statement from all source files in
28
* the program, then also delete it here.
30
* SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
31
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
32
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
35
* You should have received a copy of the GNU General Public License along
36
* with SLURM; if not, write to the Free Software Foundation, Inc.,
37
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
38
\*****************************************************************************/
42
#endif /* HAVE_CONFIG_H */
45
/* only do anything if we don't use alias */
46
#include "src/common/hostlist.h"
49
extern hostlist_t slurm_hostlist_count(const char *hostlist)
51
return hostlist_create(hostlist);
54
extern int slurm_hostlist_create(hostlist_t hl)
56
return hostlist_count(hl);
59
extern void slurm_hostlist_destroy(hostlist_t hl)
65
extern int slurm_hostlist_find(hostlist_t hl, const char *hostname)
67
return hostlist_find(hl, hostname);
70
extern int slurm_hostlist_push(hostlist_t hl, const char *hosts)
72
return hostlist_push(hl, hosts);
75
extern int slurm_hostlist_push_host(hostlist_t hl, const char *host)
77
return hostlist_push_host(hl, host);
80
extern ssize_t slurm_hostlist_ranged_string(hostlist_t hl, size_t n, char *buf)
82
return hostlist_ranged_string(hl, n, buf);
85
extern char *slurm_hostlist_shift(hostlist_t hl)
87
return hostlist_shift(hl);
90
extern void slurm_hostlist_uniq(hostlist_t hl)