X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fbasic%2Fhostname-util.h;h=aab3a495b026780c7429968b9e16b0010b5e8e79;hp=c92b19cdc85bb106fd29c3346f5e7d695cd6b950;hb=660d02b554b97fd4ce08d0a30d16487912687a13;hpb=5db0e7adf018c82dd63cd21d31dd313dff5561af diff --git a/src/basic/hostname-util.h b/src/basic/hostname-util.h index c92b19cdc..aab3a495b 100644 --- a/src/basic/hostname-util.h +++ b/src/basic/hostname-util.h @@ -29,10 +29,13 @@ // UNNEEDED char* gethostname_malloc(void); -bool hostname_is_valid(const char *s) _pure_; -char* hostname_cleanup(char *s, bool lowercase); +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); // UNNEEDED int sethostname_idempotent(const char *s);