Module ffi

Module ffi 

Source
Expand description

FFI module for the raw rice-proto C API.

Structs§

Credentials
RiceAddress
RiceAgent
RiceAgentComponentStateChange
A Component has changed state.
RiceAgentGatheredCandidate
A Component has gathered a candidate.
RiceAgentGatheringComplete
A Component has completed gathering.
RiceAgentPoll
RiceAgentPoll__bindgen_ty_1__bindgen_ty_1
RiceAgentPoll__bindgen_ty_1__bindgen_ty_2
RiceAgentPoll__bindgen_ty_1__bindgen_ty_3
RiceAgentPoll__bindgen_ty_1__bindgen_ty_4
RiceAgentPoll__bindgen_ty_1__bindgen_ty_5
RiceAgentPoll__bindgen_ty_1__bindgen_ty_6
RiceAgentPoll__bindgen_ty_1__bindgen_ty_7
RiceAgentSelectedPair
A new pair has been selected for a component.
RiceAgentSocket
A socket with the specified network 5-tuple.
RiceCandidate
An ICE candidate.
RiceComponent
RiceData
RiceDataImpl
A pointer to a sequence of bytes and the associated size.
RiceData__bindgen_ty_1__bindgen_ty_1
RiceData__bindgen_ty_1__bindgen_ty_2
RiceGatheredCandidate
A local candidate that has been gathered.
RiceStream
RiceStreamIncomingData
Return value for rice_stream_handle_incoming_data().
RiceTlsConfig
RiceTransmit
Transmit the data using the specified 5-tuple.
RiceTurnConfig

Constants§

RICE_ADDRESS_FAMILY_IPV4
IP version 4.
RICE_ADDRESS_FAMILY_IPV6
IP version 6.
RICE_AGENT_POLL_ALLOCATE_SOCKET
Connect from the specified interface to the specified address. Reply (success or failure) should be notified using rice_agent_allocated_socket() with the same parameters.
RICE_AGENT_POLL_CLOSED
The Agent is closed. No further progress will be made.
RICE_AGENT_POLL_COMPONENT_STATE_CHANGE
A Component has changed state.
RICE_AGENT_POLL_GATHERED_CANDIDATE
A Component has gathered a candidate.
RICE_AGENT_POLL_GATHERING_COMPLETE
A Component has completed gathering.
RICE_AGENT_POLL_REMOVE_SOCKET
It is posible to remove the specified 5-tuple. The socket will not be referenced any further.
RICE_AGENT_POLL_SELECTED_PAIR
A new pair has been selected for a component.
RICE_AGENT_POLL_WAIT_UNTIL_NANOS
Wait until the specified Instant has been reached (or an external event)
RICE_CANDIDATE_TYPE_HOST
The candidate is a local network interface
RICE_CANDIDATE_TYPE_PEER_REFLEXIVE
The candidate was discovered from incoming data
RICE_CANDIDATE_TYPE_RELAYED
The candidate will relay all data through an external server (TURN).
RICE_CANDIDATE_TYPE_SERVER_REFLEXIVE
The candidate was discovered by asking an external server (STUN/TURN)
RICE_COMPONENT_CONNECTION_STATE_CONNECTED
A CandidatePair has been selected for this component
RICE_COMPONENT_CONNECTION_STATE_CONNECTING
Connectivity checks are in progress for this candidate
RICE_COMPONENT_CONNECTION_STATE_FAILED
No connection could be found for this Component
RICE_COMPONENT_CONNECTION_STATE_NEW
Component is in initial state and no connectivity checks are in progress.
RICE_DATA_BORROWED
The data is borrowed and will not be freed on destruction.
RICE_DATA_OWNED
The data is owned and will be freed on destruction.
RICE_ERROR_ALREADY_IN_PROGRESS
The operation is already in progress.
RICE_ERROR_FAILED
The operation failed for an unspecified reason.
RICE_ERROR_RESOURCE_NOT_FOUND
A required resource was not found.
RICE_ERROR_SUCCESS
Not an error. The operation was completed successfully.
RICE_PARSE_CANDIDATE_ERROR_BAD_ADDRESS
Invalid network address.
RICE_PARSE_CANDIDATE_ERROR_BAD_CANDIDATE_TYPE
Invalid candidate type.
RICE_PARSE_CANDIDATE_ERROR_BAD_COMPONENT_ID
Invalid component id.
RICE_PARSE_CANDIDATE_ERROR_BAD_EXTENSION
Invalid extension format.
RICE_PARSE_CANDIDATE_ERROR_BAD_FOUNDATION
Invalid foundation value.
RICE_PARSE_CANDIDATE_ERROR_BAD_PRIORITY
Invalid priority value.
RICE_PARSE_CANDIDATE_ERROR_BAD_TRANSPORT_TYPE
Invalid transport type.
RICE_PARSE_CANDIDATE_ERROR_MALFORMED
Data is not well formed.
RICE_PARSE_CANDIDATE_ERROR_NOT_CANDIDATE
Not a candidate message.
RICE_PARSE_CANDIDATE_ERROR_SUCCESS
No error.
RICE_PROTO_MAJOR
RICE_PROTO_MINOR
RICE_PROTO_PATCH
RICE_TCP_TYPE_ACTIVE
The candidate address will connect to a remote address.
RICE_TCP_TYPE_NONE
Not a TCP candidate.
RICE_TCP_TYPE_PASSIVE
The candidate will listen for incominng TCP connections.
RICE_TCP_TYPE_SO
Simultaneous open. The candidate will both listen for incoming connections, and connect to remote addresses.
RICE_TLS_VARIANT_OPENSSL
Openssl.
RICE_TLS_VARIANT_RUSTLS
Rustls.
RICE_TRANSPORT_TYPE_TCP
The TCP transport
RICE_TRANSPORT_TYPE_UDP
The UDP transport

Functions§

rice_address_cmp
Compare whether two RiceAddresses are equal.
rice_address_copy
Copy a RiceAddress.
rice_address_free
Free a RiceAddress.
rice_address_get_address_bytes
Retrieve the bytes of a RiceAddress.
rice_address_get_family
The address family of the RiceAddress.
rice_address_get_port
Retrieve the port of a RiceAddress.
rice_address_new_from_bytes
Construct a RiceAddress from a sequence of bytes.
rice_address_new_from_string
Create a RiceAddress from a string representation of the socket address.
rice_agent_add_stream
Add an ICE stream to the RiceAgent.
rice_agent_add_stun_server
Add a STUN server to this RiceAgent.
rice_agent_close
Close the RiceAgent.
rice_agent_get_controlling
Get the controlling state of the RiceAgent.
rice_agent_get_stream
Retrieve a previously added stream from the RiceAgent.
rice_agent_id
Return the process-local unique id for this agent.
rice_agent_new
Create a new ICE Agent.
rice_agent_poll
Poll the RiceAgent for further progress.
rice_agent_poll_clear
Clear a RiceAgentPoll of any allocated values.
rice_agent_poll_init
Initialize a RiceAgentPoll with a default value.
rice_agent_poll_transmit
Poll the RiceAgent for a transmission to send.
rice_agent_ref
Increase the reference count of the RiceAgent.
rice_agent_unref
Decrease the reference count of the RiceAgent.
rice_candidate_clear
Clear any resources allocated within a RiceCandidate.
rice_candidate_copy
Perform a deep copy of a RiceCandidate.
rice_candidate_copy_into
Perform a deep copy of a RiceCandidate.
rice_candidate_eq
Free a RiceCandidate.
rice_candidate_free
Free a RiceCandidate.
rice_candidate_init
Construct a new RiceCandidate with the provided values.
rice_candidate_init_from_sdp_string
Construct a RiceCandidate from a string as formatted in an SDP and specified in RFC5245 Section 15.1.
rice_candidate_new
Construct a new RiceCandidate with the provided values.
rice_candidate_new_from_sdp_string
Construct a RiceCandidate from a string as formatted in an SDP and specified in RFC5245 Section 15.1.
rice_candidate_set_base_address
Set the base address of a RiceCandidate.
rice_candidate_set_priority
Set the base address of a RiceCandidate.
rice_candidate_set_related_address
Set the related address of a RiceCandidate.
rice_candidate_set_tcp_type
Set the tcp type of a RiceCandidate.
rice_candidate_to_sdp_string
Return a SDP candidate string as specified in RFC5245 Section 15.1.
rice_component_gather_candidates
Start gathering candidates for a component with the provided local socket addresses.
rice_component_get_id
Retrieve the component id of the RiceComponent.
rice_component_get_state
Retrieve the component connection state of the RiceComponent.
rice_component_get_stream
Retrieve the component id of the RiceComponent.
rice_component_ref
Increase the reference count of the RiceComponent.
rice_component_selected_pair
Retrieve the ICE candidates selected pair of the RiceComponent.
rice_component_send
Send data to the connected peer.
rice_component_set_selected_pair
Start gathering candidates for a component with the provided local socket addresses.
rice_component_unref
Decrease the reference count of the RiceComponent.
rice_credentials_copy
Construct a new set of ICE/TURN credentials.
rice_credentials_eq
Compare two sets of Credentials.
rice_credentials_free
Free a set of ICE/TURN credentials.
rice_credentials_get_ufrag_bytes
Retrieve the RiceCandidate ufrag attribute bytes. The pre-allocated array should be 256 bytes at most.
rice_credentials_new
Construct a new set of ICE/TURN credentials.
rice_data_len
The number of bytes in a RiceData.
rice_data_ptr
The data pointer for a RiceData.
rice_free_data
Free allocated data.
rice_random_string
Generate a random sequence of characters suitable for username fragments and passwords.
rice_stream_add_component
Add an ICE component to a RiceStream.
rice_stream_add_local_gathered_candidate
Add a local RiceGatheredCandidate to a RiceStream.
rice_stream_add_remote_candidate
Add a remote candidate to the RiceStream.
rice_stream_component_ids
Return the component ids currently in use by a RiceStream.
rice_stream_end_of_local_candidates
Signal the end of a set of local candidates.
rice_stream_end_of_remote_candidates
Signal the end of a set of remote candidates.
rice_stream_get_agent
Retrieve the RiceAgent of the RiceStream.
rice_stream_get_component
Retrieve a previously added RiceComponent.
rice_stream_get_id
Retrieve the stream id of the RiceStream.
rice_stream_get_local_credentials
Retrieve the local ICE credentials currently set on the RiceStream.
rice_stream_get_remote_credentials
Retrieve the remote ICE credentials currently set on the RiceStream.
rice_stream_handle_allocated_socket
Notify success or failure to create a socket to the RiceStream.
rice_stream_handle_incoming_data
Provide data to the RiceStream for processing.
rice_stream_poll_recv
Poll for further application data that has been received.
rice_stream_ref
Increase the reference count of the RiceStream.
rice_stream_set_local_credentials
Set the local credentials to use for this RiceStream.
rice_stream_set_remote_credentials
Set the remote credentials to use for this RiceStream.
rice_stream_unref
Decrease the reference count of the RiceStream.
rice_string_free
Free an allocated string.
rice_tls_config_new_openssl
Construct a new TLS configuration using Openssl.
rice_tls_config_new_rustls_with_dns
Construct a new TLS configuration using Rustls.
rice_tls_config_new_rustls_with_ip
Construct a new TLS configuration using Rustls.
rice_tls_config_ref
Increase the reference count of the RiceTlsConfig.
rice_tls_config_unref
Decrease the reference count of the RiceTlsConfig.
rice_tls_config_variant
The TLS variant for a RiceTlsConfig
rice_transmit_clear
Free any resources allocated within a RiceTransmit.
rice_transmit_init
Initialize a RiceTransmit with default values.
rice_turn_config_get_addr
The address of the TURN server.
rice_turn_config_get_client_transport
The transport to connect to the TURN server.
rice_turn_config_get_credentials
The credentials to use for accessing the TURN server.
rice_turn_config_get_families
The transport to connect to the TURN server.
rice_turn_config_get_tls_config
The TLS config associated with this TURN configuration.
rice_turn_config_new
Create a new TURN configuration.
rice_turn_config_ref
Increase the reference count of the RiceTurnConfig.
rice_turn_config_unref
Decrease the reference count of aRiceTurnConfig.
rice_version
Query the built version of rice-proto.

Type Aliases§

RiceAddressFamily
RiceAgentPoll_Tag
Return value of rice_agent_poll().
RiceCandidateType
RiceComponentConnectionState
The state of a component
RiceCredentials
ICE/TURN credentials.
RiceData_Tag
A pointer to a sequence of bytes and size.
RiceError
RiceParseCandidateError
RiceTcpType
RiceTlsVariant
RiceTransportType

Unions§

RiceAgentPoll__bindgen_ty_1
RiceData__bindgen_ty_1