A data structure for storing a hierarchical set of domain labels from TLD down, supporting wildcards.
Data structure is mutually recursive with
LabelEntry, and each level
of the tree supports a static assignment for a hostname such as:
Or a wildcard assignment for a hostname such as:
Or a wildcard assignment with a set of teptions, for example:
And lastly, empty labels are supported so that, of course, an assignment for example.com does not necessarily have any subdomains available. As an example suppose we have the following assigned domains:
example.com foo.example.com *.bar.example.com *.qux.example.com baz.qux.example.com
This will resolve to the following value, with some loose pseudocode notation.
Static (map) 'com' -> Unassigned Static (map) 'example' -> Assigned a (map) 'foo' -> Assigned a EmptyLabelMap 'bar' -> Unassigned (Wildcard (Assigned a EmptyLabelMap) 'qux' -> Unassigned (WildcardExcept (Assigned a (map))) 'baz' -> Assigned a EmptyLabelMap
Note that the hostname bar.example.com is unassigned, only the wildcard was set.