srtp_policy_t Struct Reference
Secure RTP

represents the policy for an SRTP session. More...

## Data Fields

srtp_ssrc_t | ssrc
srtp_crypto_policy_t | rtp
srtp_crypto_policy_t | rtcp
unsigned char * | key
unsigned long | num_master_keys
srtp_ekt_policy_t | ekt
unsigned long | window_size
int | allow_repeat_tx
int * | enc_xtn_hdr
int | enc_xtn_hdr_count
struct srtp_policy_t * | next

## Detailed Description

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 must have its `next' pointer set to NULL.

## Field Documentation

## allow_repeat_tx

int srtp_policy_t::allow_repeat_tx

Whether retransmissions of packets with the same sequence number are allowed. (Note that such repeated transmissions must have the same RTP payload, or a severe security weakness is introduced!)

## ekt

srtp_ekt_policy_t srtp_policy_t::ekt

Number of master keys Pointer to the EKT policy structure for this stream (if any)

## enc_xtn_hdr

int* srtp_policy_t::enc_xtn_hdr

List of header ids to encrypt.

## enc_xtn_hdr_count

int srtp_policy_t::enc_xtn_hdr_count

Number of entries in list of header ids.

## key

unsigned char* srtp_policy_t::key

Pointer to the SRTP master key for this stream.

## next

struct srtp_policy_t* srtp_policy_t::next

Pointer to next stream policy.

## num_master_keys

unsigned long srtp_policy_t::num_master_keys

Array of Master Key structures

## rtcp

srtp_crypto_policy_t srtp_policy_t::rtcp

SRTCP crypto policy.

## rtp

srtp_crypto_policy_t srtp_policy_t::rtp

SRTP crypto policy.

## ssrc

srtp_ssrc_t srtp_policy_t::ssrc

The SSRC value of stream, or the flags SSRC_ANY_INBOUND or SSRC_ANY_OUTBOUND if key sharing is used for this policy element.

## window_size

unsigned long srtp_policy_t::window_size

The window size to use for replay protection.

The documentation for this struct was generated from the following file:

- srtp.h