feat(datatype): add DiameterIdentity.Valid
DiameterIdentity syntax is checked in two places: base message validation
in diam/internal/base, and peer discovery in dnsdiam, which as a nested
module cannot import an internal package. Export the check as
DiameterIdentity.Valid so that both can share it, and use it for base
messages.
Valid accepts one or more labels of ASCII letters, digits and interior
hyphens, separated by dots, with an optional final root dot. Each label is
1–63 octets and the name without the root dot at most 253. It checks
neither that the name is a host or realm nor IDNA validity: a label that
looks like an A-label is checked as plain ASCII. Base validation decides
exactly as before; a 55-case table and a fuzz target cover the rule.
Refs #132.
Summary by cubic
Exports DiameterIdentity syntax validation as DiameterIdentity.Valid and reuses it for base message validation, which decides exactly as before.
The exported method lets dnsdiam, a nested module that cannot import diam/internal/base, share the same check. Valid accepts ASCII labels of letters, digits, and interior hyphens with an optional root dot; it does not verify host/realm meaning or IDNA validity. A 55-case table test and a fuzz target cover the rule. Refs #132.