[][src]Struct srtp2_sys::srtp_policy_t

#[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,
}

@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_tnum_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

impl Clone for srtp_policy_t[src]

impl Copy for srtp_policy_t[src]

impl Debug for srtp_policy_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]