Skip to main content

Module ice

Module ice 

Source
Expand description

ICE (RFC 8445): finding a path for media when both ends are behind NATs.

The SDP half of ICE — the a=candidate, a=ice-ufrag and a=ice-pwd grammar of RFC 8839 §5 — is sipx_sdp::ice, because it is pure parsing and belongs where no clock and no socket can reach it. What lives here is everything else: the STUN profile RFC 8445 §7 runs over the media port, and, as the epic lands, the agent that drives it.

The normative document is docs/specs/ice.md, written before any of this code; §11 is the STUN profile stun implements.

Supported (A-8): calls reach the gathering and selected-pair driver through sipx_call::MediaPolicy. Breaking changes therefore carry a migration note even while sipx is pre-1.0; new enum variants and fields may still be added.

Re-exports§

pub use agent::Agent;
pub use agent::Config;
pub use agent::Input;
pub use agent::Output;
pub use agent::Timer;
pub use candidate::Gathered;
pub use candidate::LocalBase;
pub use candidate::LocalCandidate;
pub use candidate::RemoteCandidate;
pub use checklist::ChecklistState;
pub use checklist::PairState;
pub use checklist::Role;
pub use gather::Gathering;
pub use gather::LocalDescription;
pub use negotiate::ICE_MISMATCH;
pub use negotiate::Negotiation;
pub use negotiate::negotiate;
pub use timing::Timers;

Modules§

agent
The ICE agent: a state machine over events (RFC 8445 §6–§8, §11; spec §2, §6–§10).
candidate
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).
checklist
Checklists: pairing, ordering, pruning and pair state (RFC 8445 §6; spec §6).
gather
Gathering local candidates, and the description they make (RFC 8445 §5.1.1, RFC 8839 §5.1, §13.2; spec §5, §15).
negotiate
Reading a peer’s description: is ICE on for this stream at all (RFC 8839 §5.3, §6; spec §13.2, §13.3)?
stun
STUN as ICE uses it: connectivity checks over the media port (RFC 5389, RFC 8445 §7).
timing
ICE’s timers (RFC 8445 §14, RFC 5389 §7.2.1; spec §9).

Structs§

Local
What this side must put in its next offer or answer for the stream (spec §13.5).

Enums§

IcePath
The candidate path an ICE-backed media session actually selected.