srtp2_sys

Struct srtp_policy_t

Source
#[repr(C)]
pub struct srtp_policy_t { pub ssrc: srtp_ssrc_t, pub rtp: srtp_crypto_policy_t, pub rtcp: srtp_crypto_policy_t, pub key: *mut c_uchar, pub keys: *mut *mut srtp_master_key_t, pub num_master_keys: c_ulong, pub ekt: srtp_ekt_policy_t, pub window_size: c_ulong, pub allow_repeat_tx: c_int, pub enc_xtn_hdr: *mut c_int, pub enc_xtn_hdr_count: c_int, pub next: *mut srtp_policy_t, }
Expand description

@brief represents the policy for an SRTP session.

A single srtp_policy_t struct represents the policy for a single SRTP stream, and a linked list of these elements represents the policy for an entire SRTP session. Each element contains the SRTP and SRTCP crypto policies for that stream, a pointer to the SRTP master key for that stream, the SSRC describing that stream, or a flag indicating a wildcard' SSRC value, and a next’ field that holds a pointer to the next element in the list of policy elements, or NULL if it is the last element.

The wildcard value SSRC_ANY_INBOUND matches any SSRC from an inbound stream that for which there is no explicit SSRC entry in another policy element. Similarly, the value SSRC_ANY_OUTBOUND will matches any SSRC from an outbound stream that does not appear in another policy element. Note that wildcard SSRCs &b cannot be used to match both inbound and outbound traffic. This restriction is intentional, and it allows libSRTP to ensure that no security lapses result from accidental re-use of SSRC values during key sharing.

@warning The final element of the list @b must have its `next’ pointer set to NULL.

Fields§

§ssrc: srtp_ssrc_t

< The SSRC value of stream, or the */

§rtp: srtp_crypto_policy_t

< SRTP crypto policy.

§rtcp: srtp_crypto_policy_t

< SRTCP crypto policy.

§key: *mut c_uchar

< Pointer to the SRTP master key for */

§keys: *mut *mut srtp_master_key_t§num_master_keys: c_ulong

Array of Master Key structures

§ekt: srtp_ekt_policy_t

< Pointer to the EKT policy structure */

§window_size: c_ulong

< The window size to use for replay */

§allow_repeat_tx: c_int

< Whether retransmissions of */

§enc_xtn_hdr: *mut c_int

< List of header ids to encrypt.

§enc_xtn_hdr_count: c_int

< Number of entries in list of header */

§next: *mut srtp_policy_t

< Pointer to next stream policy.

Trait Implementations§

Source§

impl Clone for srtp_policy_t

Source§

fn clone(&self) -> srtp_policy_t

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for srtp_policy_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for srtp_policy_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.