diff options
Diffstat (limited to 'src/basic/hostname-util.h')
-rw-r--r-- | src/basic/hostname-util.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/basic/hostname-util.h b/src/basic/hostname-util.h index 0c4763cf5a..7af4e6c7ec 100644 --- a/src/basic/hostname-util.h +++ b/src/basic/hostname-util.h @@ -1,5 +1,3 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ - #pragma once /*** @@ -28,11 +26,15 @@ bool hostname_is_set(void); char* gethostname_malloc(void); +int gethostname_strict(char **ret); + +bool hostname_is_valid(const char *s, bool allow_trailing_dot) _pure_; +char* hostname_cleanup(char *s); -bool hostname_is_valid(const char *s) _pure_; -char* hostname_cleanup(char *s, bool lowercase); +#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); |