]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/hostname-util.h
Add SPDX license identifiers to source files under the LGPL
[thirdparty/systemd.git] / src / basic / hostname-util.h
index 6f2b5b66ff0bd8eb8c62f14dcd35ec110de1ec20..a7d09c910b5d02ed3a80bb2d9e0d3546b439ba39 100644 (file)
@@ -1,5 +1,4 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
+/* SPDX-License-Identifier: LGPL-2.1+ */
 #pragma once
 
 /***
 bool hostname_is_set(void);
 
 char* gethostname_malloc(void);
+int gethostname_strict(char **ret);
 
-bool hostname_is_valid(const char *s, bool relax) _pure_;
+bool hostname_is_valid(const char *s, bool allow_trailing_dot) _pure_;
 char* hostname_cleanup(char *s);
 
+#define machine_name_is_valid(s) hostname_is_valid(s, false)
+
 bool is_localhost(const char *hostname);
+bool is_gateway_hostname(const char *hostname);
 
 int sethostname_idempotent(const char *s);