76. Hostname

Hostname manipulation routines

76.1. Summary of Module Globals

List of Global Functions

  • Check - Check syntax of hostname entry (that is a domain name component, unqualified, without dots)

  • CheckDomain - Check syntax of domain entry

  • CheckFQ - Check syntax of fully qualified hostname

  • MergeFQ - Merge short hostname and domain to full-qualified host name

  • SplitFQ - Split FQ hostname to hostname and domain name

  • ValidDomain - describe a valid domain name

  • ValidFQ - describe a valid FQ host name

  • ValidHost - describe a valid host name

List of Global Variables

  • ValidChars - i18n characters in domain names are still not allowed

76.2. Global Functions

76.2.1. Check

Check syntax of hostname entry (that is a domain name component, unqualified, without dots)

Function parameters

  • string host

Return value

  • boolean - true if correct

76.2.2. CheckDomain

Check syntax of domain entry

Function parameters

  • string domain

Return value

  • boolean - true if correct

76.2.3. CheckFQ

Check syntax of fully qualified hostname

Function parameters

  • string host

Return value

  • boolean - true if correct

76.2.4. MergeFQ

Merge short hostname and domain to full-qualified host name

Function parameters

  • string hostname

  • string domain

Return value

  • string - FQ hostname

76.2.5. SplitFQ

Split FQ hostname to hostname and domain name

Function parameters

  • string fqhostname

Return value

  • list<string> - of hostname and domain name

Example 3. 

 Hostname::SplitFQ("ftp.suse.cz") -> ["ftp", "suse.cz"]
 Hostname::SplitFQ("ftp") -> ["ftp"]


76.2.6. ValidDomain

describe a valid domain name

Return value

  • string - description

76.2.7. ValidFQ

describe a valid FQ host name

Return value

  • string - describe a valid FQ host name

76.2.8. ValidHost

describe a valid host name

Return value

  • string - description

76.3. Global Variables

76.3.1. ValidChars

i18n characters in domain names are still not allowed

76.4. Module Requirements

76.4.1. Module Imports

  • IP

76.4.2. Module Includes