Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valid hostnames #19

Merged
merged 2 commits into from
Jan 16, 2021
Merged

Valid hostnames #19

merged 2 commits into from
Jan 16, 2021

Conversation

lbussy
Copy link
Owner

@lbussy lbussy commented Jan 16, 2021

Closes #18. Adds new utility methods:

  • bool isMDNS() - (deprecated)
  • bool isMDNS(const char *hostName) - Returns true if hostname is a valid mDNS name
  • bool isValidIP(const char * hostName - Returns true if hostName represents a valid IP address string
  • int labelCount(const char * hostName) - Integer of the number of labels in the hostname
  • bool isANumber(const char * str) - Returns true if string is a valid number
  • bool isValidLabel(const char *label) - Returns true if the string is a valid DNS label
  • bool isValidHostName(const char *hostName) - Return true if the hostname passed is a valid DNS, mDNS or IP hostname

@lbussy lbussy linked an issue Jan 16, 2021 that may be closed by this pull request
@lbussy lbussy merged commit 5fad815 into devel Jan 16, 2021
@lbussy lbussy deleted the valid_hostnames branch January 16, 2021 15:10
@lbussy lbussy mentioned this pull request Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Validity Checks
1 participant