candidateparser
candidateparser copied to clipboard
Handle mDNS Addresses
trafficstars
Right now candidateparser only supports IP addresses, but no FQDNs.
According to RFC 5245:
<connection-address>: is taken from RFC 4566 [RFC4566]. It is the
IP address of the candidate, allowing for IPv4 addresses, IPv6
addresses, and fully qualified domain names (FQDNs). When parsing
this field, an agent can differentiate an IPv4 address and an IPv6
address by presence of a colon in its value - the presence of a
colon indicates IPv6. An agent MUST ignore candidate lines that
include candidates with IP address versions that are not supported
or recognized. An IP address SHOULD be used, but an FQDN MAY be
used in place of an IP address. In that case, when receiving an
offer or answer containing an FQDN in an a=candidate attribute,
the FQDN is looked up in the DNS first using an AAAA record
(assuming the agent supports IPv6), and if no result is found or
the agent only supports IPv4, using an A. If the DNS query
returns more than one IP address, one is chosen, and then used for
the remainder of ICE processing.