70. Hostname

Hostname manipulation routines

70.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

    70.2. Global Functions

    70.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

    70.2.2. CheckDomain

    Check syntax of domain entry

    Function parameters

    • string domain

    Return value

    • boolean - true if correct

    70.2.3. CheckFQ

    Check syntax of fully qualified hostname

    Function parameters

    • string host

    Return value

    • boolean - true if correct

    70.2.4. MergeFQ

    Merge short hostname and domain to full-qualified host name

    Function parameters

    • string hostname

    • string domain

    Return value

    • string - FQ hostname

    70.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"]

    70.2.6. ValidDomain

    describe a valid domain name

    Return value

    • string - description

    70.2.7. ValidFQ

    describe a valid FQ host name

    Return value

    • string - describe a valid FQ host name

    70.2.8. ValidHost

    describe a valid host name

    Return value

    • string - description

    70.3. Global Variables

    70.4. Module Requirements

    70.4.1. Module Imports

    • IP

    70.4.2. Module Includes