1 /* SPDX-License-Identifier: LGPL-2.1+ */
5 This file is part of systemd.
7 Copyright 2010-2015 Lennart Poettering
15 #if 0 /// UNNEEDED by elogind
16 bool hostname_is_set(void);
19 char* gethostname_malloc(void);
20 #if 0 /// UNNEEDED by elogind
21 int gethostname_strict(char **ret);
24 bool hostname_is_valid(const char *s, bool allow_trailing_dot) _pure_;
25 #if 0 /// UNNEEDED by elogind
26 char* hostname_cleanup(char *s);
29 #define machine_name_is_valid(s) hostname_is_valid(s, false)
31 bool is_localhost(const char *hostname);
32 #if 0 /// UNNEEDED by elogind
33 bool is_gateway_hostname(const char *hostname);
35 int sethostname_idempotent(const char *s);
38 int shorten_overlong(const char *s, char **ret);
40 int read_etc_hostname_stream(FILE *f, char **ret);
41 int read_etc_hostname(const char *path, char **ret);