WARNING: The online documentation has moved to https://docs.pjsip.org.

Visit the new documentation at https://docs.pjsip.org:

BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJMEDIA Reference

pjmedia_srtp_setting Struct Reference

#include <transport_srtp.h>

Data Fields

pjmedia_srtp_use use
 
pj_bool_t close_member_tp
 
unsigned crypto_count
 
pjmedia_srtp_crypto crypto [PJMEDIA_SRTP_MAX_CRYPTOS]
 
unsigned keying_count
 
pjmedia_srtp_keying_method keying [PJMEDIA_SRTP_KEYINGS_COUNT]
 
pjmedia_srtp_roc rx_roc
 
pjmedia_srtp_roc prev_rx_roc
 
pjmedia_srtp_roc tx_roc
 
pjmedia_srtp_cb cb
 
void * user_data
 

Detailed Description

Settings to be given when creating SRTP transport. Application should call pjmedia_srtp_setting_default() to initialize this structure with its default values.

Field Documentation

◆ use

pjmedia_srtp_use pjmedia_srtp_setting::use

Specify the usage policy. Default is PJMEDIA_SRTP_OPTIONAL.

◆ close_member_tp

pj_bool_t pjmedia_srtp_setting::close_member_tp

Specify whether the SRTP transport should close the member transport when it is destroyed. Default: PJ_TRUE.

◆ crypto_count

unsigned pjmedia_srtp_setting::crypto_count

Specify the number of crypto suite settings. If set to zero, all available cryptos will be enabled. Default: zero.

◆ crypto

pjmedia_srtp_crypto pjmedia_srtp_setting::crypto[PJMEDIA_SRTP_MAX_CRYPTOS]

Specify individual crypto suite setting and its priority order.

Notes for DTLS-SRTP keying:

  • Currently only supports these cryptos: AES_CM_128_HMAC_SHA1_80, AES_CM_128_HMAC_SHA1_32, AEAD_AES_256_GCM, and AEAD_AES_128_GCM.
  • SRTP key is not configurable.

◆ keying_count

unsigned pjmedia_srtp_setting::keying_count

Specify the number of enabled keying methods. If set to zero, all keyings will be enabled. Maximum value is PJMEDIA_SRTP_MAX_KEYINGS.

Default is zero (all keyings are enabled with priority order: SDES, DTLS-SRTP).

◆ keying

Specify enabled keying methods and its priority order. Keying method with higher priority will be given earlier chance to process the SDP, for example as currently only one keying is supported in the SDP offer, keying with first priority will be likely used in the SDP offer.

◆ rx_roc

pjmedia_srtp_roc pjmedia_srtp_setting::rx_roc

RTP sequence rollover counter initialization value for incoming direction. This is useful to maintain ROC after media transport recreation such as in IP change scenario.

◆ prev_rx_roc

pjmedia_srtp_roc pjmedia_srtp_setting::prev_rx_roc

The previous value of RTP sequence rollover counter. This is useful in situations when we expect the remote to reset/maintain ROC but for some reason, they don't. Thus, when we encounter SRTP packet unprotect failure during probation, we will retry to unprotect with this ROC value as well. Set prev_rx_roc.ssrc to 0 to disable this feature.

◆ tx_roc

pjmedia_srtp_roc pjmedia_srtp_setting::tx_roc

RTP sequence rollover counter initialization value for outgoing direction. This is useful to maintain ROC after media transport recreation such as in IP change scenario.

◆ cb

pjmedia_srtp_cb pjmedia_srtp_setting::cb

Specify SRTP callback.

◆ user_data

void* pjmedia_srtp_setting::user_data

Specify SRTP transport user data.


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

 


PJMEDIA small footprint Open Source media stack
Copyright (C) 2006-2008 Teluu Inc.