Expand description
Candidates as the agent holds them: priority, foundation and base (RFC 8445 §5.1.1.3, §5.1.2.1, §7.1.1; spec §4, §5).
sipx_sdp::ice::Candidate is the a=candidate line. It is what crosses the wire and it
knows nothing about which socket a check would leave from, because sipx-sdp owns no sockets.
The two types here add exactly that: a LocalCandidate carries the LocalBase the driver
bound, and a RemoteCandidate carries a foundation that a peer-reflexive candidate can also
have — §7.3.1.3 gives one “an arbitrary value, different from the foundations of all other
remote candidates”, which is not a value any a=candidate line ever supplied.
Structs§
- Candidate
Ids - Allocates the identities of
LocalCandidates andRemoteCandidates. - Foundations
- Allocates foundations over the candidates as they are gathered (§5.1.1.3).
- Gathered
- A candidate the driver gathered, before the agent has priced it.
- Local
Base - Which socket the driver bound, named so the agent never has to hold one.
- Local
Candidate - A local candidate: what the driver gathered, plus what §5.1.1.3 and §5.1.2.1 make of it.
- Local
Foundation - A local candidate’s foundation (§5.1.1.3).
- LocalId
- A local candidate’s identity.
- Pair
Foundation - A candidate pair’s foundation: §6.1.2.6’s “combination of the foundations of the local and remote candidates in the pair”.
- Remote
Candidate - A remote candidate: one the peer signalled, or one §7.3.1.3 learned from a check.
- Remote
Id - A remote candidate’s identity, allocated and stable — see
LocalId.
Enums§
- Remote
Foundation - A remote candidate’s foundation.
Constants§
- HOST_
PREFERENCE - Type preference for a host candidate (§5.1.2.2’s recommended value; spec §4).
- MAX_
TYPE_ PREFERENCE - The largest type preference §5.1.2.1 admits: “an integer from 0 … to 126 … inclusive”.
- PEER_
REFLEXIVE_ PREFERENCE - Type preference for a peer-reflexive candidate. §5.1.2.1 makes it a MUST that this is higher
than the server-reflexive one, and it is the preference every
PRIORITYattribute uses whatever the candidate actually is (§7.1.1,check_priority). - RELAYED_
PREFERENCE - Type preference for a relayed candidate: last resort, because it costs a relay’s bandwidth.
- SERVER_
REFLEXIVE_ PREFERENCE - Type preference for a server-reflexive candidate (§5.1.2.2’s recommended value).
- SINGLE_
ADDRESS_ PREFERENCE - The local preference for a candidate that is the only one of its type for its component. §5.1.2.1: “When there is only a single IP address, this value SHOULD be set to 65535.”
Functions§
- assign_
local_ preferences - Assign §5.1.2.1’s local preferences across a gathered set, and price every candidate.
- check_
priority - The
PRIORITYa connectivity check carries (§7.1.1). - find_
local - The local candidate with this identity, if it is still known.
- find_
remote - The remote candidate with this identity, if it is still known.
- pair_
priority - §6.1.2.3’s pair priority, with
controllingthe priority of the controlling agent’s candidate andcontrolledthe controlled agent’s: - priority
- §5.1.2.1’s formula, exactly as it is printed:
- type_
preference - §5.1.2.2’s recommended type preference for a candidate of this type (spec §4’s table).