Refactor host validation and parsing, move methods out of tr_util.[ch]
authorJennifer Richards <jennifer@painless-security.com>
Wed, 30 May 2018 04:58:13 +0000 (00:58 -0400)
committerJennifer Richards <jennifer@painless-security.com>
Wed, 30 May 2018 04:58:13 +0000 (00:58 -0400)
commita3818d823167fd02fe29c0e53998aee4197b7969
tree7811ca53b14ec8c469009382d14ec77f595f926d
parent161678443e6aa3ab6cc4828e7f1874e078ee9bf3
Refactor host validation and parsing, move methods out of tr_util.[ch]

  * Limit hostname validation to avoiding ambiguity about whether a port
    is part of the string
  * Refactor hostname/port parsing
    - new function is tr_parse_host() in tr_inet_util.c
    - handles both hostname and port
    - works with strings, not TR_NAME
  * Move hostname related methods out of tr_util.c

Changes to make the rest of the codebase work with these updates will be
in the next commit.
common/tr_inet_util.c
common/tr_util.c
include/tr_inet_util.h
include/tr_util.h