Expand description
§rice-proto
A sans-IO implementation of the ICE protocol as specified in RFC8445.
§Why sans-io?
A few reasons: reusability, testability, and composability.
Without being bogged down in the details of how IO happens, the same sans-IO implementation can be used without prescribing the IO pattern that an application must follow. Instead, the application (or parent library) has much more freedom in how bytes are transferred between peers. It is possible to use a sans-IO library in either a synchronous environment or within an asynchronous runtime.
A sans-IO design also allows easy testing of any specific state the sans-IO implementation might find itself in. Combined with a comprehensive test-suite, this provides assurance that the implementation behaves as expected under all circumstances.
For other examples of sans-IO implementations, take a look at:
- stun-proto: A sans-IO implementation of a STUN agent (client or server).
- turn-proto: A sans-IO implementation of a TURN client or server.
- https://sans-io.readthedocs.io/
§Relevant standards
- RFC5245: Interactive Connectivity Establishment (ICE): A Protocol for Network Address Translator (NAT) Traversal for Offer/Answer Protocols
- RFC5389: Session Traversal Utilities for NAT (STUN)
- RFC5766: Traversal Using Relays around NAT (TURN): Relay Extensions to Session Traversal Utilities for NAT (STUN)
- RFC5769: Test Vectors for Session Traversal Utilities for NAT (STUN)
- RFC6062: Traversal Using Relays around NAT (TURN) Extensions for TCP Allocations
- RFC6156: Traversal Using Relays around NAT (TURN) Extension for IPv6
- RFC6544: TCP Candidates with Interactive Connectivity Establishment (ICE)
- RFC7675: Session Traversal Utilities for NAT (STUN) Usage for Consent Freshness
- RFC8445: Interactive Connectivity Establishment (ICE): A Protocol for Network Address Translator (NAT) Traversal
- RFC8489: Session Traversal Utilities for NAT (STUN)
- RFC8656: Traversal Using Relays around NAT (TURN): Relay Extensions to Session Traversal Utilities for NAT (STUN)
- RFC8838: Trickle ICE: Incremental Provisioning of Candidates for the Interactive Connectivity Establishment (ICE) Protocol
§Building a C library
rice-proto uses cargo-c to build and install a compatible C library, headers and
pkg-config file.
Once cargo-c has been installed (e.g. with cargo install cargo-c), then installation of
rice-proto can be achieved using:
cargo install cinstall --prefix $PREFIXand can be used by any build sytem that can retrieve compilation flags from pkg-config files.
Modules§
- agent
- ICE Agent implementation as specified in RFC 8445
- candidate
- ICE Candidates
- component
- A
Componentin an ICEStream - stream
- A
Streamin an ICEAgent - turn
- TURN module.
Enums§
- Address
Family - The address family of a socket
Functions§
- random_
string - Generate a random sequence of characters suitable for username fragments and passwords.