srtp2_sys

Function srtp_create

Source
pub unsafe extern "C" fn srtp_create(
    session: *mut srtp_t,
    policy: *const srtp_policy_t,
) -> srtp_err_status_t
Expand description

@brief srtp_create() allocates and initializes an SRTP session.

The function call srtp_create(session, policy) allocates and initializes an SRTP session context, applying the given policy.

@param session is a pointer to the SRTP session to which the policy is to be added.

@param policy is the srtp_policy_t struct that describes the policy for the session. The struct may be a single element, or it may be the head of a list, in which case each element of the list is processed. It may also be NULL, in which case streams should be added later using srtp_add_stream(). The final element of the list @b must have its `next’ field set to NULL.

@return

  • srtp_err_status_ok if creation succeded.
  • srtp_err_status_alloc_fail if allocation failed.
  • srtp_err_status_init_fail if initialization failed.