From bfaa3536c5aaf8f64441f538e4bf92b6a1a41635 Mon Sep 17 00:00:00 2001 From: Aaro Altonen Date: Thu, 22 Apr 2021 12:39:07 +0300 Subject: [PATCH] crypto: Add 192/256-bit key support for SRTP --- CMakeLists.txt | 2 +- docs/html/classuvgrtp_1_1media__stream.html | 4 +- docs/html/globals.html | 6 + docs/html/globals_eval.html | 6 + docs/html/media__stream_8hh_source.html | 194 ++++++++++---------- docs/html/search/all_7.js | 68 +++---- docs/html/search/all_8.js | 10 +- docs/html/search/all_9.js | 4 +- docs/html/search/all_a.js | 2 +- docs/html/search/classes_0.js | 2 +- docs/html/search/classes_1.js | 2 +- docs/html/search/classes_2.js | 2 +- docs/html/search/classes_3.js | 2 +- docs/html/search/enums_0.js | 10 +- docs/html/search/enumvalues_0.js | 84 ++++----- docs/html/search/files_0.js | 2 +- docs/html/search/functions_0.js | 2 +- docs/html/search/functions_1.js | 8 +- docs/html/search/functions_2.js | 4 +- docs/html/search/functions_3.js | 2 +- docs/html/search/functions_4.js | 10 +- docs/html/search/functions_5.js | 4 +- docs/html/search/functions_6.js | 8 +- docs/html/search/functions_7.js | 2 +- docs/html/search/pages_0.js | 2 +- docs/html/util_8hh.html | 10 +- docs/html/util_8hh_source.html | 170 ++++++++--------- include/media_stream.hh | 8 +- include/srtp/base.hh | 36 ++-- include/util.hh | 8 +- src/srtp/base.cc | 116 +++++++++--- src/srtp/srtcp.cc | 8 +- src/srtp/srtp.cc | 20 +- 33 files changed, 466 insertions(+), 352 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f2ddce..82f76fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,7 +74,7 @@ if (CRYPTOPP_PATH AND NOT DISABLE_CRYPTO) endif (CRYPTOPP_PATH AND NOT DISABLE_CRYPTO) if (UNIX) - set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wuninitialized -Wshadow -O2 -std=c++17 -march=native -DNDEBUG") + set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wuninitialized -Wshadow -O2 -g -std=c++17 -march=native -DNDEBUG") if (DISABLE_CRYPTO) string(APPEND CMAKE_CXX_FLAGS " -D__RTP_NO_CRYPTO__") diff --git a/docs/html/classuvgrtp_1_1media__stream.html b/docs/html/classuvgrtp_1_1media__stream.html index be7a306..7a9087a 100644 --- a/docs/html/classuvgrtp_1_1media__stream.html +++ b/docs/html/classuvgrtp_1_1media__stream.html @@ -135,12 +135,10 @@ Public Member Functions

Add keying information for user-managed SRTP session.

For user-managed SRTP session, the media stream is not started until SRTP key has been added and all calls to push_frame() will fail

-

Currently uvgRTP only supports key length of 16 bytes (128 bits) and salt length of 14 bytes (112 bits).

-

If the key or salt is longer, it is implicitly truncated to correct length and if the key or salt is shorter, a memory violation may occur

Notice that if user-managed SRTP has been enabled during media stream creation, this function must be called before anything else. All calls to other functions will fail with RTP_NOT_INITIALIZED until the SRTP context has been specified

Parameters
- +
key128-bit long key
keySRTP master key, default is 128-bit long
salt112-bit long salt
diff --git a/docs/html/globals.html b/docs/html/globals.html index afa5030..785edb3 100644 --- a/docs/html/globals.html +++ b/docs/html/globals.html @@ -106,6 +106,12 @@ $(function() {
  • RCE_SRTP_INPLACE_ENCRYPTION : util.hh
  • +
  • RCE_SRTP_KEYSIZE_192 +: util.hh +
  • +
  • RCE_SRTP_KEYSIZE_256 +: util.hh +
  • RCE_SRTP_KMNGMNT_USER : util.hh
  • diff --git a/docs/html/globals_eval.html b/docs/html/globals_eval.html index 9ea8bcb..2a87f40 100644 --- a/docs/html/globals_eval.html +++ b/docs/html/globals_eval.html @@ -106,6 +106,12 @@ $(function() {
  • RCE_SRTP_INPLACE_ENCRYPTION : util.hh
  • +
  • RCE_SRTP_KEYSIZE_192 +: util.hh +
  • +
  • RCE_SRTP_KEYSIZE_256 +: util.hh +
  • RCE_SRTP_KMNGMNT_USER : util.hh
  • diff --git a/docs/html/media__stream_8hh_source.html b/docs/html/media__stream_8hh_source.html index ab71ac1..b839387 100644 --- a/docs/html/media__stream_8hh_source.html +++ b/docs/html/media__stream_8hh_source.html @@ -112,110 +112,110 @@ $(function() {
    42  * Other error return codes are defined in {conn,writer,reader,srtp}.hh */
    43  rtp_error_t init(uvgrtp::zrtp *zrtp);
    45 
    -
    71  rtp_error_t add_srtp_ctx(uint8_t *key, uint8_t *salt);
    -
    72 
    -
    95  rtp_error_t push_frame(uint8_t *data, size_t data_len, int flags);
    -
    96 
    -
    119  rtp_error_t push_frame(std::unique_ptr<uint8_t[]> data, size_t data_len, int flags);
    -
    120 
    -
    150  rtp_error_t push_frame(uint8_t *data, size_t data_len, uint32_t ts, int flags);
    -
    151 
    -
    181  rtp_error_t push_frame(std::unique_ptr<uint8_t[]> data, size_t data_len, uint32_t ts, int flags);
    -
    182 
    -
    191  uvgrtp::frame::rtp_frame *pull_frame();
    -
    192 
    -
    204  uvgrtp::frame::rtp_frame *pull_frame(size_t timeout);
    -
    205 
    -
    224  rtp_error_t install_receive_hook(void *arg, void (*hook)(void *, uvgrtp::frame::rtp_frame *));
    -
    225 
    -
    227  /* If system call dispatcher is enabled and calling application has special requirements
    -
    228  * for the deallocation of a frame, it may install a deallocation hook which is called
    -
    229  * when SCD has processed the frame
    -
    230  *
    -
    231  * Return RTP_OK on success
    -
    232  * Return RTP_INVALID_VALUE if "hook" is nullptr */
    -
    233  rtp_error_t install_deallocation_hook(void (*hook)(void *));
    -
    234 
    -
    235  /* If needed, a notification hook can be installed to uvgRTP that can be used as
    -
    236  * an information side channel to the internal state of the library.
    +
    65  rtp_error_t add_srtp_ctx(uint8_t *key, uint8_t *salt);
    +
    66 
    +
    89  rtp_error_t push_frame(uint8_t *data, size_t data_len, int flags);
    +
    90 
    +
    113  rtp_error_t push_frame(std::unique_ptr<uint8_t[]> data, size_t data_len, int flags);
    +
    114 
    +
    144  rtp_error_t push_frame(uint8_t *data, size_t data_len, uint32_t ts, int flags);
    +
    145 
    +
    175  rtp_error_t push_frame(std::unique_ptr<uint8_t[]> data, size_t data_len, uint32_t ts, int flags);
    +
    176 
    +
    185  uvgrtp::frame::rtp_frame *pull_frame();
    +
    186 
    +
    198  uvgrtp::frame::rtp_frame *pull_frame(size_t timeout);
    +
    199 
    +
    218  rtp_error_t install_receive_hook(void *arg, void (*hook)(void *, uvgrtp::frame::rtp_frame *));
    +
    219 
    +
    221  /* If system call dispatcher is enabled and calling application has special requirements
    +
    222  * for the deallocation of a frame, it may install a deallocation hook which is called
    +
    223  * when SCD has processed the frame
    +
    224  *
    +
    225  * Return RTP_OK on success
    +
    226  * Return RTP_INVALID_VALUE if "hook" is nullptr */
    +
    227  rtp_error_t install_deallocation_hook(void (*hook)(void *));
    +
    228 
    +
    229  /* If needed, a notification hook can be installed to uvgRTP that can be used as
    +
    230  * an information side channel to the internal state of the library.
    +
    231  *
    +
    232  * When uvgRTP encouters a situation it doesn't know how to react to,
    +
    233  * it calls the notify hook with certain notify reason number (src/util.hh).
    +
    234  * Upon receiving a notification, application may ignore it or act on it somehow
    +
    235  *
    +
    236  * Currently only one notification type is supported and only receiver uses notifications
    237  *
    -
    238  * When uvgRTP encouters a situation it doesn't know how to react to,
    -
    239  * it calls the notify hook with certain notify reason number (src/util.hh).
    -
    240  * Upon receiving a notification, application may ignore it or act on it somehow
    -
    241  *
    -
    242  * Currently only one notification type is supported and only receiver uses notifications
    -
    243  *
    -
    244  * "arg" is optional argument that is passed to hook when it is called. It may be nullptr
    -
    245  *
    -
    246  * Return RTP_OK on success
    -
    247  * Return RTP_INVALID_VALUE if "hook" is nullptr */
    -
    248  rtp_error_t install_notify_hook(void *arg, void (*hook)(void *, int));
    -
    250 
    -
    261  rtp_error_t configure_ctx(int flag, ssize_t value);
    -
    262 
    -
    264  /* Setter and getter for media-specific config that can be used f.ex with Opus */
    -
    265  void set_media_config(void *config);
    -
    266  void *get_media_config();
    -
    267 
    -
    268  /* Get unique key of the media stream
    -
    269  * Used by session to index media streams */
    -
    270  uint32_t get_key();
    -
    272 
    - +
    238  * "arg" is optional argument that is passed to hook when it is called. It may be nullptr
    +
    239  *
    +
    240  * Return RTP_OK on success
    +
    241  * Return RTP_INVALID_VALUE if "hook" is nullptr */
    +
    242  rtp_error_t install_notify_hook(void *arg, void (*hook)(void *, int));
    +
    244 
    +
    255  rtp_error_t configure_ctx(int flag, ssize_t value);
    +
    256 
    +
    258  /* Setter and getter for media-specific config that can be used f.ex with Opus */
    +
    259  void set_media_config(void *config);
    +
    260  void *get_media_config();
    +
    261 
    +
    262  /* Get unique key of the media stream
    +
    263  * Used by session to index media streams */
    +
    264  uint32_t get_key();
    +
    266 
    + +
    280 
    +
    281  private:
    +
    282  /* Initialize the connection by initializing the socket
    +
    283  * and binding ourselves to specified interface and creating
    +
    284  * an outgoing address */
    +
    285  rtp_error_t init_connection();
    286 
    -
    287  private:
    -
    288  /* Initialize the connection by initializing the socket
    -
    289  * and binding ourselves to specified interface and creating
    -
    290  * an outgoing address */
    -
    291  rtp_error_t init_connection();
    +
    287  /* Create the media object for the stream */
    +
    288  rtp_error_t create_media(rtp_format_t fmt);
    +
    289 
    +
    290  /* free all allocated resources */
    +
    291  rtp_error_t free_resources(rtp_error_t ret);
    292 
    -
    293  /* Create the media object for the stream */
    -
    294  rtp_error_t create_media(rtp_format_t fmt);
    -
    295 
    -
    296  /* free all allocated resources */
    -
    297  rtp_error_t free_resources(rtp_error_t ret);
    -
    298 
    -
    299  uint32_t key_;
    +
    293  uint32_t key_;
    +
    294 
    +
    295  uvgrtp::srtp *srtp_;
    +
    296  uvgrtp::srtcp *srtcp_;
    +
    297  uvgrtp::socket *socket_;
    +
    298  uvgrtp::rtp *rtp_;
    +
    299  uvgrtp::rtcp *rtcp_;
    300 
    -
    301  uvgrtp::srtp *srtp_;
    -
    302  uvgrtp::srtcp *srtcp_;
    -
    303  uvgrtp::socket *socket_;
    -
    304  uvgrtp::rtp *rtp_;
    -
    305  uvgrtp::rtcp *rtcp_;
    -
    306 
    -
    307  sockaddr_in addr_out_;
    -
    308  std::string addr_;
    -
    309  std::string laddr_;
    -
    310  int src_port_;
    -
    311  int dst_port_;
    -
    312  rtp_format_t fmt_;
    -
    313  int flags_;
    +
    301  sockaddr_in addr_out_;
    +
    302  std::string addr_;
    +
    303  std::string laddr_;
    +
    304  int src_port_;
    +
    305  int dst_port_;
    +
    306  rtp_format_t fmt_;
    +
    307  int flags_;
    +
    308 
    +
    309  /* Media context config (SCD etc.) */
    +
    310  rtp_ctx_conf_t ctx_config_;
    +
    311 
    +
    312  /* Media config f.ex. for Opus */
    +
    313  void *media_config_;
    314 
    -
    315  /* Media context config (SCD etc.) */
    -
    316  rtp_ctx_conf_t ctx_config_;
    +
    315  /* Has the media stream been initialized */
    +
    316  bool initialized_;
    317 
    -
    318  /* Media config f.ex. for Opus */
    -
    319  void *media_config_;
    -
    320 
    -
    321  /* Has the media stream been initialized */
    -
    322  bool initialized_;
    -
    323 
    -
    324  /* Primary handler keys for the RTP packet dispatcher */
    -
    325  uint32_t rtp_handler_key_;
    -
    326  uint32_t zrtp_handler_key_;
    +
    318  /* Primary handler keys for the RTP packet dispatcher */
    +
    319  uint32_t rtp_handler_key_;
    +
    320  uint32_t zrtp_handler_key_;
    +
    321 
    +
    322  /* RTP packet dispatcher for the receiver */
    +
    323  uvgrtp::pkt_dispatcher *pkt_dispatcher_;
    +
    324 
    +
    325  /* Media object associated with this media stream. */
    +
    326  uvgrtp::formats::media *media_;
    327 
    -
    328  /* RTP packet dispatcher for the receiver */
    -
    329  uvgrtp::pkt_dispatcher *pkt_dispatcher_;
    -
    330 
    -
    331  /* Media object associated with this media stream. */
    -
    332  uvgrtp::formats::media *media_;
    -
    333 
    -
    334  /* Thread that keeps the holepunched connection open for unidirectional streams */
    -
    335  uvgrtp::holepuncher *holepuncher_;
    -
    336  };
    -
    337 };
    -
    338 
    -
    339 namespace uvg_rtp = uvgrtp;
    +
    328  /* Thread that keeps the holepunched connection open for unidirectional streams */
    +
    329  uvgrtp::holepuncher *holepuncher_;
    +
    330  };
    +
    331 };
    +
    332 
    +
    333 namespace uvg_rtp = uvgrtp;
    Definition: media_stream.hh:18
    rtp_error_t add_srtp_ctx(uint8_t *key, uint8_t *salt)
    Add keying information for user-managed SRTP session.
    uvgrtp::rtcp * get_rtcp()
    Get pointer to the RTCP object of the media stream.
    diff --git a/docs/html/search/all_7.js b/docs/html/search/all_7.js index bcdfbbc..33f6729 100644 --- a/docs/html/search/all_7.js +++ b/docs/html/search/all_7.js @@ -14,37 +14,39 @@ var searchData= ['rce_5fsrtp_27',['RCE_SRTP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaf235cba606675b9c38284ee1a491696b',1,'util.hh']]], ['rce_5fsrtp_5fauthenticate_5frtp_28',['RCE_SRTP_AUTHENTICATE_RTP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa820625b96886d955bc42e0cbc52cdd1e',1,'util.hh']]], ['rce_5fsrtp_5finplace_5fencryption_29',['RCE_SRTP_INPLACE_ENCRYPTION',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa38c61eb2382a39b82fdacb7ae832bdd8',1,'util.hh']]], - ['rce_5fsrtp_5fkmngmnt_5fuser_30',['RCE_SRTP_KMNGMNT_USER',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa4722105b4fd34467a56b8aca8fc03773',1,'util.hh']]], - ['rce_5fsrtp_5fkmngmnt_5fzrtp_31',['RCE_SRTP_KMNGMNT_ZRTP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa40a3deab3893524daf7e057c6dfdaa75',1,'util.hh']]], - ['rce_5fsrtp_5fnull_5fcipher_32',['RCE_SRTP_NULL_CIPHER',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa4ddec7d182cec161d6b582589bc9baba',1,'util.hh']]], - ['rce_5fsrtp_5freplay_5fprotection_33',['RCE_SRTP_REPLAY_PROTECTION',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaddd5fdb170d7cc194e4165d3f9e9a1c1',1,'util.hh']]], - ['rtcp_34',['rtcp',['../classuvgrtp_1_1rtcp.html',1,'uvgrtp']]], - ['rtp_5fauth_5ftag_5fmismatch_35',['RTP_AUTH_TAG_MISMATCH',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba6d62ec0a7250a3db7c0f3a13280ecc65',1,'util.hh']]], - ['rtp_5fbind_5ferror_36',['RTP_BIND_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba000c0166a0c38686389fc2eba0ddc458',1,'util.hh']]], - ['rtp_5fcopy_37',['RTP_COPY',['../util_8hh.html#af03a75996471fc531742cd640c7caf2dab1d5797a23c37a33168046a2ae6aef6a',1,'util.hh']]], - ['rtp_5fctx_5fconfiguration_5fflags_38',['RTP_CTX_CONFIGURATION_FLAGS',['../util_8hh.html#aa98d9238629e33567e73af0d239e587f',1,'util.hh']]], - ['rtp_5fctx_5fenable_5fflags_39',['RTP_CTX_ENABLE_FLAGS',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2af',1,'util.hh']]], - ['rtp_5ferror_40',['RTP_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387b',1,'util.hh']]], - ['rtp_5fflags_41',['RTP_FLAGS',['../util_8hh.html#af03a75996471fc531742cd640c7caf2d',1,'util.hh']]], - ['rtp_5fformat_42',['RTP_FORMAT',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96',1,'util.hh']]], - ['rtp_5fformat_5fgeneric_43',['RTP_FORMAT_GENERIC',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96ad4b1be929d880baa2c2ca85c614f61b9',1,'util.hh']]], - ['rtp_5fformat_5fh264_44',['RTP_FORMAT_H264',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96ad785025a8de9a53f17dc84ec3eed85bd',1,'util.hh']]], - ['rtp_5fformat_5fh265_45',['RTP_FORMAT_H265',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a4ee0ab7d51bf50f8f5a5cb995ecc407b',1,'util.hh']]], - ['rtp_5fformat_5fh266_46',['RTP_FORMAT_H266',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a0e3d0414b29804783324399c8a42c85d',1,'util.hh']]], - ['rtp_5fformat_5fopus_47',['RTP_FORMAT_OPUS',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a4e6ef095b4645cdc8aef241aad1f974b',1,'util.hh']]], - ['rtp_5fgeneric_5ferror_48',['RTP_GENERIC_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bafde486de26be732acf472480e3693b19',1,'util.hh']]], - ['rtp_5finitialized_49',['RTP_INITIALIZED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0759e9bb74c7a15ef09513547ed5cc2a',1,'util.hh']]], - ['rtp_5finvalid_5fvalue_50',['RTP_INVALID_VALUE',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba4cdd3c5db294a4f05294b264afbf678b',1,'util.hh']]], - ['rtp_5fmemory_5ferror_51',['RTP_MEMORY_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bac54e582250aec15bf2aea189ccbb0348',1,'util.hh']]], - ['rtp_5fno_5fflags_52',['RTP_NO_FLAGS',['../util_8hh.html#af03a75996471fc531742cd640c7caf2da084c095dae54bbbc6d9509568c58f9a6',1,'util.hh']]], - ['rtp_5fnot_5ffound_53',['RTP_NOT_FOUND',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0a18f9856d2dd5890bb6ec25e4acf631',1,'util.hh']]], - ['rtp_5fnot_5finitialized_54',['RTP_NOT_INITIALIZED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba32d67254c4da35568e7007ec3825f98a',1,'util.hh']]], - ['rtp_5fnot_5fsupported_55',['RTP_NOT_SUPPORTED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba756d5cd372b045f069a493ed2f2cfa22',1,'util.hh']]], - ['rtp_5fok_56',['RTP_OK',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0d701531b2bb1c027f5e5bcc64ed29e1',1,'util.hh']]], - ['rtp_5frecv_5ferror_57',['RTP_RECV_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387baa499befa487c22503360adffc590f33b',1,'util.hh']]], - ['rtp_5fsend_5ferror_58',['RTP_SEND_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba6c47e86944dbed4d33531236a6e28079',1,'util.hh']]], - ['rtp_5fslice_59',['RTP_SLICE',['../util_8hh.html#af03a75996471fc531742cd640c7caf2dada7e8bc5f5542554ad7de9d74967616f',1,'util.hh']]], - ['rtp_5fsocket_5ferror_60',['RTP_SOCKET_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bab392a7774c551eed903855248760ad06',1,'util.hh']]], - ['rtp_5fssrc_5fcollision_61',['RTP_SSRC_COLLISION',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba80aa5b74c1e252c2ef49e0796d4183d3',1,'util.hh']]], - ['rtp_5ftimeout_62',['RTP_TIMEOUT',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bacb40716d1ab0663c0cce56f6d03f0902',1,'util.hh']]] + ['rce_5fsrtp_5fkeysize_5f192_30',['RCE_SRTP_KEYSIZE_192',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaedeac11cc80833b61b51ae32f787db73',1,'util.hh']]], + ['rce_5fsrtp_5fkeysize_5f256_31',['RCE_SRTP_KEYSIZE_256',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa163744fe7c054b8396a4a07ae82a80c0',1,'util.hh']]], + ['rce_5fsrtp_5fkmngmnt_5fuser_32',['RCE_SRTP_KMNGMNT_USER',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa4722105b4fd34467a56b8aca8fc03773',1,'util.hh']]], + ['rce_5fsrtp_5fkmngmnt_5fzrtp_33',['RCE_SRTP_KMNGMNT_ZRTP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa40a3deab3893524daf7e057c6dfdaa75',1,'util.hh']]], + ['rce_5fsrtp_5fnull_5fcipher_34',['RCE_SRTP_NULL_CIPHER',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa4ddec7d182cec161d6b582589bc9baba',1,'util.hh']]], + ['rce_5fsrtp_5freplay_5fprotection_35',['RCE_SRTP_REPLAY_PROTECTION',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaddd5fdb170d7cc194e4165d3f9e9a1c1',1,'util.hh']]], + ['rtcp_36',['rtcp',['../classuvgrtp_1_1rtcp.html',1,'uvgrtp']]], + ['rtp_5fauth_5ftag_5fmismatch_37',['RTP_AUTH_TAG_MISMATCH',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba6d62ec0a7250a3db7c0f3a13280ecc65',1,'util.hh']]], + ['rtp_5fbind_5ferror_38',['RTP_BIND_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba000c0166a0c38686389fc2eba0ddc458',1,'util.hh']]], + ['rtp_5fcopy_39',['RTP_COPY',['../util_8hh.html#af03a75996471fc531742cd640c7caf2dab1d5797a23c37a33168046a2ae6aef6a',1,'util.hh']]], + ['rtp_5fctx_5fconfiguration_5fflags_40',['RTP_CTX_CONFIGURATION_FLAGS',['../util_8hh.html#aa98d9238629e33567e73af0d239e587f',1,'util.hh']]], + ['rtp_5fctx_5fenable_5fflags_41',['RTP_CTX_ENABLE_FLAGS',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2af',1,'util.hh']]], + ['rtp_5ferror_42',['RTP_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387b',1,'util.hh']]], + ['rtp_5fflags_43',['RTP_FLAGS',['../util_8hh.html#af03a75996471fc531742cd640c7caf2d',1,'util.hh']]], + ['rtp_5fformat_44',['RTP_FORMAT',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96',1,'util.hh']]], + ['rtp_5fformat_5fgeneric_45',['RTP_FORMAT_GENERIC',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96ad4b1be929d880baa2c2ca85c614f61b9',1,'util.hh']]], + ['rtp_5fformat_5fh264_46',['RTP_FORMAT_H264',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96ad785025a8de9a53f17dc84ec3eed85bd',1,'util.hh']]], + ['rtp_5fformat_5fh265_47',['RTP_FORMAT_H265',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a4ee0ab7d51bf50f8f5a5cb995ecc407b',1,'util.hh']]], + ['rtp_5fformat_5fh266_48',['RTP_FORMAT_H266',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a0e3d0414b29804783324399c8a42c85d',1,'util.hh']]], + ['rtp_5fformat_5fopus_49',['RTP_FORMAT_OPUS',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a4e6ef095b4645cdc8aef241aad1f974b',1,'util.hh']]], + ['rtp_5fgeneric_5ferror_50',['RTP_GENERIC_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bafde486de26be732acf472480e3693b19',1,'util.hh']]], + ['rtp_5finitialized_51',['RTP_INITIALIZED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0759e9bb74c7a15ef09513547ed5cc2a',1,'util.hh']]], + ['rtp_5finvalid_5fvalue_52',['RTP_INVALID_VALUE',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba4cdd3c5db294a4f05294b264afbf678b',1,'util.hh']]], + ['rtp_5fmemory_5ferror_53',['RTP_MEMORY_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bac54e582250aec15bf2aea189ccbb0348',1,'util.hh']]], + ['rtp_5fno_5fflags_54',['RTP_NO_FLAGS',['../util_8hh.html#af03a75996471fc531742cd640c7caf2da084c095dae54bbbc6d9509568c58f9a6',1,'util.hh']]], + ['rtp_5fnot_5ffound_55',['RTP_NOT_FOUND',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0a18f9856d2dd5890bb6ec25e4acf631',1,'util.hh']]], + ['rtp_5fnot_5finitialized_56',['RTP_NOT_INITIALIZED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba32d67254c4da35568e7007ec3825f98a',1,'util.hh']]], + ['rtp_5fnot_5fsupported_57',['RTP_NOT_SUPPORTED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba756d5cd372b045f069a493ed2f2cfa22',1,'util.hh']]], + ['rtp_5fok_58',['RTP_OK',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0d701531b2bb1c027f5e5bcc64ed29e1',1,'util.hh']]], + ['rtp_5frecv_5ferror_59',['RTP_RECV_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387baa499befa487c22503360adffc590f33b',1,'util.hh']]], + ['rtp_5fsend_5ferror_60',['RTP_SEND_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba6c47e86944dbed4d33531236a6e28079',1,'util.hh']]], + ['rtp_5fslice_61',['RTP_SLICE',['../util_8hh.html#af03a75996471fc531742cd640c7caf2dada7e8bc5f5542554ad7de9d74967616f',1,'util.hh']]], + ['rtp_5fsocket_5ferror_62',['RTP_SOCKET_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bab392a7774c551eed903855248760ad06',1,'util.hh']]], + ['rtp_5fssrc_5fcollision_63',['RTP_SSRC_COLLISION',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba80aa5b74c1e252c2ef49e0796d4183d3',1,'util.hh']]], + ['rtp_5ftimeout_64',['RTP_TIMEOUT',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bacb40716d1ab0663c0cce56f6d03f0902',1,'util.hh']]] ]; diff --git a/docs/html/search/all_8.js b/docs/html/search/all_8.js index 4811be5..0177af0 100644 --- a/docs/html/search/all_8.js +++ b/docs/html/search/all_8.js @@ -1,8 +1,8 @@ var searchData= [ - ['send_5fapp_5fpacket_63',['send_app_packet',['../classuvgrtp_1_1rtcp.html#ad70c9ccdde9075e45a453f00591a522b',1,'uvgrtp::rtcp']]], - ['send_5fbye_5fpacket_64',['send_bye_packet',['../classuvgrtp_1_1rtcp.html#a2b831698320212e382e3d565e62d31c4',1,'uvgrtp::rtcp']]], - ['send_5fsdes_5fpacket_65',['send_sdes_packet',['../classuvgrtp_1_1rtcp.html#aa7499b5ea9797a7a55727c3699dc7df6',1,'uvgrtp::rtcp']]], - ['session_66',['session',['../classuvgrtp_1_1session.html',1,'uvgrtp']]], - ['set_5fts_5finfo_67',['set_ts_info',['../classuvgrtp_1_1rtcp.html#a5d0d06f9b4b7779d96d8d60938627316',1,'uvgrtp::rtcp']]] + ['send_5fapp_5fpacket_65',['send_app_packet',['../classuvgrtp_1_1rtcp.html#ad70c9ccdde9075e45a453f00591a522b',1,'uvgrtp::rtcp']]], + ['send_5fbye_5fpacket_66',['send_bye_packet',['../classuvgrtp_1_1rtcp.html#a2b831698320212e382e3d565e62d31c4',1,'uvgrtp::rtcp']]], + ['send_5fsdes_5fpacket_67',['send_sdes_packet',['../classuvgrtp_1_1rtcp.html#aa7499b5ea9797a7a55727c3699dc7df6',1,'uvgrtp::rtcp']]], + ['session_68',['session',['../classuvgrtp_1_1session.html',1,'uvgrtp']]], + ['set_5fts_5finfo_69',['set_ts_info',['../classuvgrtp_1_1rtcp.html#a5d0d06f9b4b7779d96d8d60938627316',1,'uvgrtp::rtcp']]] ]; diff --git a/docs/html/search/all_9.js b/docs/html/search/all_9.js index 7a68e2c..107221e 100644 --- a/docs/html/search/all_9.js +++ b/docs/html/search/all_9.js @@ -1,5 +1,5 @@ var searchData= [ - ['util_2ehh_68',['util.hh',['../util_8hh.html',1,'']]], - ['uvgrtp_20public_20api_20documentation_69',['uvgRTP public API documentation',['../index.html',1,'']]] + ['util_2ehh_70',['util.hh',['../util_8hh.html',1,'']]], + ['uvgrtp_20public_20api_20documentation_71',['uvgRTP public API documentation',['../index.html',1,'']]] ]; diff --git a/docs/html/search/all_a.js b/docs/html/search/all_a.js index acf2874..2a64092 100644 --- a/docs/html/search/all_a.js +++ b/docs/html/search/all_a.js @@ -1,4 +1,4 @@ var searchData= [ - ['_7econtext_70',['~context',['../classuvgrtp_1_1context.html#a652a201ae11685961267455ab823eb60',1,'uvgrtp::context']]] + ['_7econtext_72',['~context',['../classuvgrtp_1_1context.html#a652a201ae11685961267455ab823eb60',1,'uvgrtp::context']]] ]; diff --git a/docs/html/search/classes_0.js b/docs/html/search/classes_0.js index a67fbe6..82e6389 100644 --- a/docs/html/search/classes_0.js +++ b/docs/html/search/classes_0.js @@ -1,4 +1,4 @@ var searchData= [ - ['context_71',['context',['../classuvgrtp_1_1context.html',1,'uvgrtp']]] + ['context_73',['context',['../classuvgrtp_1_1context.html',1,'uvgrtp']]] ]; diff --git a/docs/html/search/classes_1.js b/docs/html/search/classes_1.js index 6a20311..f1f2add 100644 --- a/docs/html/search/classes_1.js +++ b/docs/html/search/classes_1.js @@ -1,4 +1,4 @@ var searchData= [ - ['media_5fstream_72',['media_stream',['../classuvgrtp_1_1media__stream.html',1,'uvgrtp']]] + ['media_5fstream_74',['media_stream',['../classuvgrtp_1_1media__stream.html',1,'uvgrtp']]] ]; diff --git a/docs/html/search/classes_2.js b/docs/html/search/classes_2.js index 6f2e26e..ebc2f9e 100644 --- a/docs/html/search/classes_2.js +++ b/docs/html/search/classes_2.js @@ -1,4 +1,4 @@ var searchData= [ - ['rtcp_73',['rtcp',['../classuvgrtp_1_1rtcp.html',1,'uvgrtp']]] + ['rtcp_75',['rtcp',['../classuvgrtp_1_1rtcp.html',1,'uvgrtp']]] ]; diff --git a/docs/html/search/classes_3.js b/docs/html/search/classes_3.js index f2daca1..8ed7f79 100644 --- a/docs/html/search/classes_3.js +++ b/docs/html/search/classes_3.js @@ -1,4 +1,4 @@ var searchData= [ - ['session_74',['session',['../classuvgrtp_1_1session.html',1,'uvgrtp']]] + ['session_76',['session',['../classuvgrtp_1_1session.html',1,'uvgrtp']]] ]; diff --git a/docs/html/search/enums_0.js b/docs/html/search/enums_0.js index 48cb011..4f1f7f2 100644 --- a/docs/html/search/enums_0.js +++ b/docs/html/search/enums_0.js @@ -1,8 +1,8 @@ var searchData= [ - ['rtp_5fctx_5fconfiguration_5fflags_96',['RTP_CTX_CONFIGURATION_FLAGS',['../util_8hh.html#aa98d9238629e33567e73af0d239e587f',1,'util.hh']]], - ['rtp_5fctx_5fenable_5fflags_97',['RTP_CTX_ENABLE_FLAGS',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2af',1,'util.hh']]], - ['rtp_5ferror_98',['RTP_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387b',1,'util.hh']]], - ['rtp_5fflags_99',['RTP_FLAGS',['../util_8hh.html#af03a75996471fc531742cd640c7caf2d',1,'util.hh']]], - ['rtp_5fformat_100',['RTP_FORMAT',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96',1,'util.hh']]] + ['rtp_5fctx_5fconfiguration_5fflags_98',['RTP_CTX_CONFIGURATION_FLAGS',['../util_8hh.html#aa98d9238629e33567e73af0d239e587f',1,'util.hh']]], + ['rtp_5fctx_5fenable_5fflags_99',['RTP_CTX_ENABLE_FLAGS',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2af',1,'util.hh']]], + ['rtp_5ferror_100',['RTP_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387b',1,'util.hh']]], + ['rtp_5fflags_101',['RTP_FLAGS',['../util_8hh.html#af03a75996471fc531742cd640c7caf2d',1,'util.hh']]], + ['rtp_5fformat_102',['RTP_FORMAT',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96',1,'util.hh']]] ]; diff --git a/docs/html/search/enumvalues_0.js b/docs/html/search/enumvalues_0.js index 048f556..a3ccc84 100644 --- a/docs/html/search/enumvalues_0.js +++ b/docs/html/search/enumvalues_0.js @@ -1,44 +1,46 @@ var searchData= [ - ['rcc_5fdyn_5fpayload_5ftype_101',['RCC_DYN_PAYLOAD_TYPE',['../util_8hh.html#aa98d9238629e33567e73af0d239e587fac758a522806ada30386b262660f30617',1,'util.hh']]], - ['rcc_5fmtu_5fsize_102',['RCC_MTU_SIZE',['../util_8hh.html#aa98d9238629e33567e73af0d239e587fa7667fb72b42a2c11991b4879619f9f83',1,'util.hh']]], - ['rcc_5fpkt_5fmax_5fdelay_103',['RCC_PKT_MAX_DELAY',['../util_8hh.html#aa98d9238629e33567e73af0d239e587fa5ac1245e18a420489083adddfa97b135',1,'util.hh']]], - ['rcc_5fudp_5frcv_5fbuf_5fsize_104',['RCC_UDP_RCV_BUF_SIZE',['../util_8hh.html#aa98d9238629e33567e73af0d239e587fac52afca9d1a8c24b1a788bc5b8524663',1,'util.hh']]], - ['rcc_5fudp_5fsnd_5fbuf_5fsize_105',['RCC_UDP_SND_BUF_SIZE',['../util_8hh.html#aa98d9238629e33567e73af0d239e587fad4eba6c62183db35dd4bd0e09ddd107b',1,'util.hh']]], - ['rce_5ffragment_5fgeneric_106',['RCE_FRAGMENT_GENERIC',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa5b0a8dbb22c20ebe8c0711541fb68a79',1,'util.hh']]], - ['rce_5fh26x_5fprepend_5fsc_107',['RCE_H26X_PREPEND_SC',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa75a655a9170ae88e07e993c1dd7ca4f7',1,'util.hh']]], - ['rce_5fholepunch_5fkeepalive_108',['RCE_HOLEPUNCH_KEEPALIVE',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa8e66f45819774772a0156647d3788a95',1,'util.hh']]], - ['rce_5fno_5fh26x_5fintra_5fdelay_109',['RCE_NO_H26X_INTRA_DELAY',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa5e9f19a63c964806ac9ff4ee089745e0',1,'util.hh']]], - ['rce_5fno_5fsystem_5fcall_5fclustering_110',['RCE_NO_SYSTEM_CALL_CLUSTERING',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afac03160668b92662fcb8d5b27bca3fbb0',1,'util.hh']]], - ['rce_5frtcp_111',['RCE_RTCP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afab1342138e5af3f03d6eaf1378382bf3d',1,'util.hh']]], - ['rce_5fsrtp_112',['RCE_SRTP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaf235cba606675b9c38284ee1a491696b',1,'util.hh']]], - ['rce_5fsrtp_5fauthenticate_5frtp_113',['RCE_SRTP_AUTHENTICATE_RTP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa820625b96886d955bc42e0cbc52cdd1e',1,'util.hh']]], - ['rce_5fsrtp_5finplace_5fencryption_114',['RCE_SRTP_INPLACE_ENCRYPTION',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa38c61eb2382a39b82fdacb7ae832bdd8',1,'util.hh']]], - ['rce_5fsrtp_5fkmngmnt_5fuser_115',['RCE_SRTP_KMNGMNT_USER',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa4722105b4fd34467a56b8aca8fc03773',1,'util.hh']]], - ['rce_5fsrtp_5fkmngmnt_5fzrtp_116',['RCE_SRTP_KMNGMNT_ZRTP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa40a3deab3893524daf7e057c6dfdaa75',1,'util.hh']]], - ['rce_5fsrtp_5fnull_5fcipher_117',['RCE_SRTP_NULL_CIPHER',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa4ddec7d182cec161d6b582589bc9baba',1,'util.hh']]], - ['rce_5fsrtp_5freplay_5fprotection_118',['RCE_SRTP_REPLAY_PROTECTION',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaddd5fdb170d7cc194e4165d3f9e9a1c1',1,'util.hh']]], - ['rtp_5fauth_5ftag_5fmismatch_119',['RTP_AUTH_TAG_MISMATCH',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba6d62ec0a7250a3db7c0f3a13280ecc65',1,'util.hh']]], - ['rtp_5fbind_5ferror_120',['RTP_BIND_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba000c0166a0c38686389fc2eba0ddc458',1,'util.hh']]], - ['rtp_5fcopy_121',['RTP_COPY',['../util_8hh.html#af03a75996471fc531742cd640c7caf2dab1d5797a23c37a33168046a2ae6aef6a',1,'util.hh']]], - ['rtp_5fformat_5fgeneric_122',['RTP_FORMAT_GENERIC',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96ad4b1be929d880baa2c2ca85c614f61b9',1,'util.hh']]], - ['rtp_5fformat_5fh264_123',['RTP_FORMAT_H264',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96ad785025a8de9a53f17dc84ec3eed85bd',1,'util.hh']]], - ['rtp_5fformat_5fh265_124',['RTP_FORMAT_H265',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a4ee0ab7d51bf50f8f5a5cb995ecc407b',1,'util.hh']]], - ['rtp_5fformat_5fh266_125',['RTP_FORMAT_H266',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a0e3d0414b29804783324399c8a42c85d',1,'util.hh']]], - ['rtp_5fformat_5fopus_126',['RTP_FORMAT_OPUS',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a4e6ef095b4645cdc8aef241aad1f974b',1,'util.hh']]], - ['rtp_5fgeneric_5ferror_127',['RTP_GENERIC_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bafde486de26be732acf472480e3693b19',1,'util.hh']]], - ['rtp_5finitialized_128',['RTP_INITIALIZED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0759e9bb74c7a15ef09513547ed5cc2a',1,'util.hh']]], - ['rtp_5finvalid_5fvalue_129',['RTP_INVALID_VALUE',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba4cdd3c5db294a4f05294b264afbf678b',1,'util.hh']]], - ['rtp_5fmemory_5ferror_130',['RTP_MEMORY_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bac54e582250aec15bf2aea189ccbb0348',1,'util.hh']]], - ['rtp_5fno_5fflags_131',['RTP_NO_FLAGS',['../util_8hh.html#af03a75996471fc531742cd640c7caf2da084c095dae54bbbc6d9509568c58f9a6',1,'util.hh']]], - ['rtp_5fnot_5ffound_132',['RTP_NOT_FOUND',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0a18f9856d2dd5890bb6ec25e4acf631',1,'util.hh']]], - ['rtp_5fnot_5finitialized_133',['RTP_NOT_INITIALIZED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba32d67254c4da35568e7007ec3825f98a',1,'util.hh']]], - ['rtp_5fnot_5fsupported_134',['RTP_NOT_SUPPORTED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba756d5cd372b045f069a493ed2f2cfa22',1,'util.hh']]], - ['rtp_5fok_135',['RTP_OK',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0d701531b2bb1c027f5e5bcc64ed29e1',1,'util.hh']]], - ['rtp_5frecv_5ferror_136',['RTP_RECV_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387baa499befa487c22503360adffc590f33b',1,'util.hh']]], - ['rtp_5fsend_5ferror_137',['RTP_SEND_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba6c47e86944dbed4d33531236a6e28079',1,'util.hh']]], - ['rtp_5fslice_138',['RTP_SLICE',['../util_8hh.html#af03a75996471fc531742cd640c7caf2dada7e8bc5f5542554ad7de9d74967616f',1,'util.hh']]], - ['rtp_5fsocket_5ferror_139',['RTP_SOCKET_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bab392a7774c551eed903855248760ad06',1,'util.hh']]], - ['rtp_5fssrc_5fcollision_140',['RTP_SSRC_COLLISION',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba80aa5b74c1e252c2ef49e0796d4183d3',1,'util.hh']]], - ['rtp_5ftimeout_141',['RTP_TIMEOUT',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bacb40716d1ab0663c0cce56f6d03f0902',1,'util.hh']]] + ['rcc_5fdyn_5fpayload_5ftype_103',['RCC_DYN_PAYLOAD_TYPE',['../util_8hh.html#aa98d9238629e33567e73af0d239e587fac758a522806ada30386b262660f30617',1,'util.hh']]], + ['rcc_5fmtu_5fsize_104',['RCC_MTU_SIZE',['../util_8hh.html#aa98d9238629e33567e73af0d239e587fa7667fb72b42a2c11991b4879619f9f83',1,'util.hh']]], + ['rcc_5fpkt_5fmax_5fdelay_105',['RCC_PKT_MAX_DELAY',['../util_8hh.html#aa98d9238629e33567e73af0d239e587fa5ac1245e18a420489083adddfa97b135',1,'util.hh']]], + ['rcc_5fudp_5frcv_5fbuf_5fsize_106',['RCC_UDP_RCV_BUF_SIZE',['../util_8hh.html#aa98d9238629e33567e73af0d239e587fac52afca9d1a8c24b1a788bc5b8524663',1,'util.hh']]], + ['rcc_5fudp_5fsnd_5fbuf_5fsize_107',['RCC_UDP_SND_BUF_SIZE',['../util_8hh.html#aa98d9238629e33567e73af0d239e587fad4eba6c62183db35dd4bd0e09ddd107b',1,'util.hh']]], + ['rce_5ffragment_5fgeneric_108',['RCE_FRAGMENT_GENERIC',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa5b0a8dbb22c20ebe8c0711541fb68a79',1,'util.hh']]], + ['rce_5fh26x_5fprepend_5fsc_109',['RCE_H26X_PREPEND_SC',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa75a655a9170ae88e07e993c1dd7ca4f7',1,'util.hh']]], + ['rce_5fholepunch_5fkeepalive_110',['RCE_HOLEPUNCH_KEEPALIVE',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa8e66f45819774772a0156647d3788a95',1,'util.hh']]], + ['rce_5fno_5fh26x_5fintra_5fdelay_111',['RCE_NO_H26X_INTRA_DELAY',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa5e9f19a63c964806ac9ff4ee089745e0',1,'util.hh']]], + ['rce_5fno_5fsystem_5fcall_5fclustering_112',['RCE_NO_SYSTEM_CALL_CLUSTERING',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afac03160668b92662fcb8d5b27bca3fbb0',1,'util.hh']]], + ['rce_5frtcp_113',['RCE_RTCP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afab1342138e5af3f03d6eaf1378382bf3d',1,'util.hh']]], + ['rce_5fsrtp_114',['RCE_SRTP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaf235cba606675b9c38284ee1a491696b',1,'util.hh']]], + ['rce_5fsrtp_5fauthenticate_5frtp_115',['RCE_SRTP_AUTHENTICATE_RTP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa820625b96886d955bc42e0cbc52cdd1e',1,'util.hh']]], + ['rce_5fsrtp_5finplace_5fencryption_116',['RCE_SRTP_INPLACE_ENCRYPTION',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa38c61eb2382a39b82fdacb7ae832bdd8',1,'util.hh']]], + ['rce_5fsrtp_5fkeysize_5f192_117',['RCE_SRTP_KEYSIZE_192',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaedeac11cc80833b61b51ae32f787db73',1,'util.hh']]], + ['rce_5fsrtp_5fkeysize_5f256_118',['RCE_SRTP_KEYSIZE_256',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa163744fe7c054b8396a4a07ae82a80c0',1,'util.hh']]], + ['rce_5fsrtp_5fkmngmnt_5fuser_119',['RCE_SRTP_KMNGMNT_USER',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa4722105b4fd34467a56b8aca8fc03773',1,'util.hh']]], + ['rce_5fsrtp_5fkmngmnt_5fzrtp_120',['RCE_SRTP_KMNGMNT_ZRTP',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa40a3deab3893524daf7e057c6dfdaa75',1,'util.hh']]], + ['rce_5fsrtp_5fnull_5fcipher_121',['RCE_SRTP_NULL_CIPHER',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afa4ddec7d182cec161d6b582589bc9baba',1,'util.hh']]], + ['rce_5fsrtp_5freplay_5fprotection_122',['RCE_SRTP_REPLAY_PROTECTION',['../util_8hh.html#a15b2d6364db6065a482c99827f4bd2afaddd5fdb170d7cc194e4165d3f9e9a1c1',1,'util.hh']]], + ['rtp_5fauth_5ftag_5fmismatch_123',['RTP_AUTH_TAG_MISMATCH',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba6d62ec0a7250a3db7c0f3a13280ecc65',1,'util.hh']]], + ['rtp_5fbind_5ferror_124',['RTP_BIND_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba000c0166a0c38686389fc2eba0ddc458',1,'util.hh']]], + ['rtp_5fcopy_125',['RTP_COPY',['../util_8hh.html#af03a75996471fc531742cd640c7caf2dab1d5797a23c37a33168046a2ae6aef6a',1,'util.hh']]], + ['rtp_5fformat_5fgeneric_126',['RTP_FORMAT_GENERIC',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96ad4b1be929d880baa2c2ca85c614f61b9',1,'util.hh']]], + ['rtp_5fformat_5fh264_127',['RTP_FORMAT_H264',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96ad785025a8de9a53f17dc84ec3eed85bd',1,'util.hh']]], + ['rtp_5fformat_5fh265_128',['RTP_FORMAT_H265',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a4ee0ab7d51bf50f8f5a5cb995ecc407b',1,'util.hh']]], + ['rtp_5fformat_5fh266_129',['RTP_FORMAT_H266',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a0e3d0414b29804783324399c8a42c85d',1,'util.hh']]], + ['rtp_5fformat_5fopus_130',['RTP_FORMAT_OPUS',['../util_8hh.html#a313c6640ac5ed9384184a94ec57a9a96a4e6ef095b4645cdc8aef241aad1f974b',1,'util.hh']]], + ['rtp_5fgeneric_5ferror_131',['RTP_GENERIC_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bafde486de26be732acf472480e3693b19',1,'util.hh']]], + ['rtp_5finitialized_132',['RTP_INITIALIZED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0759e9bb74c7a15ef09513547ed5cc2a',1,'util.hh']]], + ['rtp_5finvalid_5fvalue_133',['RTP_INVALID_VALUE',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba4cdd3c5db294a4f05294b264afbf678b',1,'util.hh']]], + ['rtp_5fmemory_5ferror_134',['RTP_MEMORY_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bac54e582250aec15bf2aea189ccbb0348',1,'util.hh']]], + ['rtp_5fno_5fflags_135',['RTP_NO_FLAGS',['../util_8hh.html#af03a75996471fc531742cd640c7caf2da084c095dae54bbbc6d9509568c58f9a6',1,'util.hh']]], + ['rtp_5fnot_5ffound_136',['RTP_NOT_FOUND',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0a18f9856d2dd5890bb6ec25e4acf631',1,'util.hh']]], + ['rtp_5fnot_5finitialized_137',['RTP_NOT_INITIALIZED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba32d67254c4da35568e7007ec3825f98a',1,'util.hh']]], + ['rtp_5fnot_5fsupported_138',['RTP_NOT_SUPPORTED',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba756d5cd372b045f069a493ed2f2cfa22',1,'util.hh']]], + ['rtp_5fok_139',['RTP_OK',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba0d701531b2bb1c027f5e5bcc64ed29e1',1,'util.hh']]], + ['rtp_5frecv_5ferror_140',['RTP_RECV_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387baa499befa487c22503360adffc590f33b',1,'util.hh']]], + ['rtp_5fsend_5ferror_141',['RTP_SEND_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba6c47e86944dbed4d33531236a6e28079',1,'util.hh']]], + ['rtp_5fslice_142',['RTP_SLICE',['../util_8hh.html#af03a75996471fc531742cd640c7caf2dada7e8bc5f5542554ad7de9d74967616f',1,'util.hh']]], + ['rtp_5fsocket_5ferror_143',['RTP_SOCKET_ERROR',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bab392a7774c551eed903855248760ad06',1,'util.hh']]], + ['rtp_5fssrc_5fcollision_144',['RTP_SSRC_COLLISION',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387ba80aa5b74c1e252c2ef49e0796d4183d3',1,'util.hh']]], + ['rtp_5ftimeout_145',['RTP_TIMEOUT',['../util_8hh.html#aa6dc3f3578923d1afc40045e4cbe387bacb40716d1ab0663c0cce56f6d03f0902',1,'util.hh']]] ]; diff --git a/docs/html/search/files_0.js b/docs/html/search/files_0.js index 0f3d205..a6cf008 100644 --- a/docs/html/search/files_0.js +++ b/docs/html/search/files_0.js @@ -1,4 +1,4 @@ var searchData= [ - ['util_2ehh_75',['util.hh',['../util_8hh.html',1,'']]] + ['util_2ehh_77',['util.hh',['../util_8hh.html',1,'']]] ]; diff --git a/docs/html/search/functions_0.js b/docs/html/search/functions_0.js index 6461a52..d7f4e28 100644 --- a/docs/html/search/functions_0.js +++ b/docs/html/search/functions_0.js @@ -1,4 +1,4 @@ var searchData= [ - ['add_5fsrtp_5fctx_76',['add_srtp_ctx',['../classuvgrtp_1_1media__stream.html#a0950a91bd645cbf842d8218ae4171aed',1,'uvgrtp::media_stream']]] + ['add_5fsrtp_5fctx_78',['add_srtp_ctx',['../classuvgrtp_1_1media__stream.html#a0950a91bd645cbf842d8218ae4171aed',1,'uvgrtp::media_stream']]] ]; diff --git a/docs/html/search/functions_1.js b/docs/html/search/functions_1.js index 5fdac8b..1d07533 100644 --- a/docs/html/search/functions_1.js +++ b/docs/html/search/functions_1.js @@ -1,7 +1,7 @@ var searchData= [ - ['configure_5fctx_77',['configure_ctx',['../classuvgrtp_1_1media__stream.html#addf1cde9cb8c4e4af3160ce24c4288a5',1,'uvgrtp::media_stream']]], - ['context_78',['context',['../classuvgrtp_1_1context.html#a98be18c2848404549cfadf910ba1573a',1,'uvgrtp::context']]], - ['create_5fsession_79',['create_session',['../classuvgrtp_1_1context.html#aa109aa2a419933359d225d19bcf3b2f9',1,'uvgrtp::context::create_session(std::string addr)'],['../classuvgrtp_1_1context.html#a0007eebfd5131bf0930cfedc0c4018e8',1,'uvgrtp::context::create_session(std::string remote_addr, std::string local_addr)']]], - ['create_5fstream_80',['create_stream',['../classuvgrtp_1_1session.html#a71aad1226214b1b0b1ba60a46c048ab2',1,'uvgrtp::session']]] + ['configure_5fctx_79',['configure_ctx',['../classuvgrtp_1_1media__stream.html#addf1cde9cb8c4e4af3160ce24c4288a5',1,'uvgrtp::media_stream']]], + ['context_80',['context',['../classuvgrtp_1_1context.html#a98be18c2848404549cfadf910ba1573a',1,'uvgrtp::context']]], + ['create_5fsession_81',['create_session',['../classuvgrtp_1_1context.html#aa109aa2a419933359d225d19bcf3b2f9',1,'uvgrtp::context::create_session(std::string addr)'],['../classuvgrtp_1_1context.html#a0007eebfd5131bf0930cfedc0c4018e8',1,'uvgrtp::context::create_session(std::string remote_addr, std::string local_addr)']]], + ['create_5fstream_82',['create_stream',['../classuvgrtp_1_1session.html#a71aad1226214b1b0b1ba60a46c048ab2',1,'uvgrtp::session']]] ]; diff --git a/docs/html/search/functions_2.js b/docs/html/search/functions_2.js index 5278c34..3152fd5 100644 --- a/docs/html/search/functions_2.js +++ b/docs/html/search/functions_2.js @@ -1,5 +1,5 @@ var searchData= [ - ['destroy_5fsession_81',['destroy_session',['../classuvgrtp_1_1context.html#a61daf2f3cdcdf2542ee997ab6de5efa9',1,'uvgrtp::context']]], - ['destroy_5fstream_82',['destroy_stream',['../classuvgrtp_1_1session.html#a291629a3bfb910463b88d8edb3984149',1,'uvgrtp::session']]] + ['destroy_5fsession_83',['destroy_session',['../classuvgrtp_1_1context.html#a61daf2f3cdcdf2542ee997ab6de5efa9',1,'uvgrtp::context']]], + ['destroy_5fstream_84',['destroy_stream',['../classuvgrtp_1_1session.html#a291629a3bfb910463b88d8edb3984149',1,'uvgrtp::session']]] ]; diff --git a/docs/html/search/functions_3.js b/docs/html/search/functions_3.js index 0ae8c8c..ed64e91 100644 --- a/docs/html/search/functions_3.js +++ b/docs/html/search/functions_3.js @@ -1,4 +1,4 @@ var searchData= [ - ['get_5frtcp_83',['get_rtcp',['../classuvgrtp_1_1media__stream.html#a1134ff0271ad54bf1e07feed422118c2',1,'uvgrtp::media_stream']]] + ['get_5frtcp_85',['get_rtcp',['../classuvgrtp_1_1media__stream.html#a1134ff0271ad54bf1e07feed422118c2',1,'uvgrtp::media_stream']]] ]; diff --git a/docs/html/search/functions_4.js b/docs/html/search/functions_4.js index b08ff4d..c9b8b13 100644 --- a/docs/html/search/functions_4.js +++ b/docs/html/search/functions_4.js @@ -1,8 +1,8 @@ var searchData= [ - ['install_5fapp_5fhook_84',['install_app_hook',['../classuvgrtp_1_1rtcp.html#a977c99cfaa1442553ab12d4c140bbb0f',1,'uvgrtp::rtcp']]], - ['install_5freceive_5fhook_85',['install_receive_hook',['../classuvgrtp_1_1media__stream.html#a74a558b23866976e52c5903996544a27',1,'uvgrtp::media_stream']]], - ['install_5freceiver_5fhook_86',['install_receiver_hook',['../classuvgrtp_1_1rtcp.html#a04c887fe95173d55294f57d639a1f602',1,'uvgrtp::rtcp']]], - ['install_5fsdes_5fhook_87',['install_sdes_hook',['../classuvgrtp_1_1rtcp.html#ad694a3a869b1c28309e1f2db6d7c2e50',1,'uvgrtp::rtcp']]], - ['install_5fsender_5fhook_88',['install_sender_hook',['../classuvgrtp_1_1rtcp.html#a4a262a814ffa3093ac6829c90b0b3fd1',1,'uvgrtp::rtcp']]] + ['install_5fapp_5fhook_86',['install_app_hook',['../classuvgrtp_1_1rtcp.html#a977c99cfaa1442553ab12d4c140bbb0f',1,'uvgrtp::rtcp']]], + ['install_5freceive_5fhook_87',['install_receive_hook',['../classuvgrtp_1_1media__stream.html#a74a558b23866976e52c5903996544a27',1,'uvgrtp::media_stream']]], + ['install_5freceiver_5fhook_88',['install_receiver_hook',['../classuvgrtp_1_1rtcp.html#a04c887fe95173d55294f57d639a1f602',1,'uvgrtp::rtcp']]], + ['install_5fsdes_5fhook_89',['install_sdes_hook',['../classuvgrtp_1_1rtcp.html#ad694a3a869b1c28309e1f2db6d7c2e50',1,'uvgrtp::rtcp']]], + ['install_5fsender_5fhook_90',['install_sender_hook',['../classuvgrtp_1_1rtcp.html#a4a262a814ffa3093ac6829c90b0b3fd1',1,'uvgrtp::rtcp']]] ]; diff --git a/docs/html/search/functions_5.js b/docs/html/search/functions_5.js index da4eb68..dd0d5cb 100644 --- a/docs/html/search/functions_5.js +++ b/docs/html/search/functions_5.js @@ -1,5 +1,5 @@ var searchData= [ - ['pull_5fframe_89',['pull_frame',['../classuvgrtp_1_1media__stream.html#ae2fe9e8d9b67e25f103a78a25417149f',1,'uvgrtp::media_stream::pull_frame()'],['../classuvgrtp_1_1media__stream.html#a441263e19be4383223884fde8838f736',1,'uvgrtp::media_stream::pull_frame(size_t timeout)']]], - ['push_5fframe_90',['push_frame',['../classuvgrtp_1_1media__stream.html#ab2b7507d5b2c76bef74c9bceec07ba18',1,'uvgrtp::media_stream::push_frame(uint8_t *data, size_t data_len, int flags)'],['../classuvgrtp_1_1media__stream.html#ab2e79cf2f90f81a90ae9c22e0c1fb01e',1,'uvgrtp::media_stream::push_frame(std::unique_ptr< uint8_t[]> data, size_t data_len, int flags)'],['../classuvgrtp_1_1media__stream.html#a18975c5463df0664f1fd8ab495248dcc',1,'uvgrtp::media_stream::push_frame(uint8_t *data, size_t data_len, uint32_t ts, int flags)'],['../classuvgrtp_1_1media__stream.html#a85fed1e02b97326d3b794551f0677e2b',1,'uvgrtp::media_stream::push_frame(std::unique_ptr< uint8_t[]> data, size_t data_len, uint32_t ts, int flags)']]] + ['pull_5fframe_91',['pull_frame',['../classuvgrtp_1_1media__stream.html#ae2fe9e8d9b67e25f103a78a25417149f',1,'uvgrtp::media_stream::pull_frame()'],['../classuvgrtp_1_1media__stream.html#a441263e19be4383223884fde8838f736',1,'uvgrtp::media_stream::pull_frame(size_t timeout)']]], + ['push_5fframe_92',['push_frame',['../classuvgrtp_1_1media__stream.html#ab2b7507d5b2c76bef74c9bceec07ba18',1,'uvgrtp::media_stream::push_frame(uint8_t *data, size_t data_len, int flags)'],['../classuvgrtp_1_1media__stream.html#ab2e79cf2f90f81a90ae9c22e0c1fb01e',1,'uvgrtp::media_stream::push_frame(std::unique_ptr< uint8_t[]> data, size_t data_len, int flags)'],['../classuvgrtp_1_1media__stream.html#a18975c5463df0664f1fd8ab495248dcc',1,'uvgrtp::media_stream::push_frame(uint8_t *data, size_t data_len, uint32_t ts, int flags)'],['../classuvgrtp_1_1media__stream.html#a85fed1e02b97326d3b794551f0677e2b',1,'uvgrtp::media_stream::push_frame(std::unique_ptr< uint8_t[]> data, size_t data_len, uint32_t ts, int flags)']]] ]; diff --git a/docs/html/search/functions_6.js b/docs/html/search/functions_6.js index bd9e6fb..d74a386 100644 --- a/docs/html/search/functions_6.js +++ b/docs/html/search/functions_6.js @@ -1,7 +1,7 @@ var searchData= [ - ['send_5fapp_5fpacket_91',['send_app_packet',['../classuvgrtp_1_1rtcp.html#ad70c9ccdde9075e45a453f00591a522b',1,'uvgrtp::rtcp']]], - ['send_5fbye_5fpacket_92',['send_bye_packet',['../classuvgrtp_1_1rtcp.html#a2b831698320212e382e3d565e62d31c4',1,'uvgrtp::rtcp']]], - ['send_5fsdes_5fpacket_93',['send_sdes_packet',['../classuvgrtp_1_1rtcp.html#aa7499b5ea9797a7a55727c3699dc7df6',1,'uvgrtp::rtcp']]], - ['set_5fts_5finfo_94',['set_ts_info',['../classuvgrtp_1_1rtcp.html#a5d0d06f9b4b7779d96d8d60938627316',1,'uvgrtp::rtcp']]] + ['send_5fapp_5fpacket_93',['send_app_packet',['../classuvgrtp_1_1rtcp.html#ad70c9ccdde9075e45a453f00591a522b',1,'uvgrtp::rtcp']]], + ['send_5fbye_5fpacket_94',['send_bye_packet',['../classuvgrtp_1_1rtcp.html#a2b831698320212e382e3d565e62d31c4',1,'uvgrtp::rtcp']]], + ['send_5fsdes_5fpacket_95',['send_sdes_packet',['../classuvgrtp_1_1rtcp.html#aa7499b5ea9797a7a55727c3699dc7df6',1,'uvgrtp::rtcp']]], + ['set_5fts_5finfo_96',['set_ts_info',['../classuvgrtp_1_1rtcp.html#a5d0d06f9b4b7779d96d8d60938627316',1,'uvgrtp::rtcp']]] ]; diff --git a/docs/html/search/functions_7.js b/docs/html/search/functions_7.js index 73043e3..6fca879 100644 --- a/docs/html/search/functions_7.js +++ b/docs/html/search/functions_7.js @@ -1,4 +1,4 @@ var searchData= [ - ['_7econtext_95',['~context',['../classuvgrtp_1_1context.html#a652a201ae11685961267455ab823eb60',1,'uvgrtp::context']]] + ['_7econtext_97',['~context',['../classuvgrtp_1_1context.html#a652a201ae11685961267455ab823eb60',1,'uvgrtp::context']]] ]; diff --git a/docs/html/search/pages_0.js b/docs/html/search/pages_0.js index 35cdb43..e316020 100644 --- a/docs/html/search/pages_0.js +++ b/docs/html/search/pages_0.js @@ -1,4 +1,4 @@ var searchData= [ - ['uvgrtp_20public_20api_20documentation_142',['uvgRTP public API documentation',['../index.html',1,'']]] + ['uvgrtp_20public_20api_20documentation_146',['uvgRTP public API documentation',['../index.html',1,'']]] ]; diff --git a/docs/html/util_8hh.html b/docs/html/util_8hh.html index 8129951..bca4be3 100644 --- a/docs/html/util_8hh.html +++ b/docs/html/util_8hh.html @@ -190,7 +190,11 @@ Enumerations ,
      RCE_HOLEPUNCH_KEEPALIVE = 1 << 14 ,
    -  RCE_LAST = 1 << 15 +  RCE_SRTP_KEYSIZE_192 = 1 << 15 +,
    +  RCE_SRTP_KEYSIZE_256 = 1 << 16 +,
    +  RCE_LAST = 1 << 17
    }  RTP context enable flags. More...
    @@ -307,6 +311,10 @@ Enumerations RCE_HOLEPUNCH_KEEPALIVE 

    If the Mediastream object is used as a unidirectional stream but holepunching has been enabled, this flag can be used to make uvgRTP periodically send a short UDP datagram to keep the hole in the firewall open

    +RCE_SRTP_KEYSIZE_192 

    Use 192-bit keys with SRTP

    + +RCE_SRTP_KEYSIZE_256 

    Use 256-bit keys with SRTP

    + diff --git a/docs/html/util_8hh_source.html b/docs/html/util_8hh_source.html index 636ad04..d90844b 100644 --- a/docs/html/util_8hh_source.html +++ b/docs/html/util_8hh_source.html @@ -187,89 +187,94 @@ $(function() {
    216 
    222 
    -
    223  RCE_LAST = 1 << 15,
    -
    224 };
    +
    225 
    - -
    234  RCC_NO_FLAGS = 0,
    -
    235 
    - -
    243 
    - -
    251 
    - -
    259 
    - -
    263 
    - -
    273 
    -
    274  RCC_LAST
    -
    275 };
    -
    276 
    -
    278 enum NOTIFY_REASON {
    + +
    228 
    +
    229  RCE_LAST = 1 << 17,
    +
    230 };
    +
    231 
    + +
    240  RCC_NO_FLAGS = 0,
    +
    241 
    + +
    249 
    + +
    257 
    + +
    265 
    + +
    269 
    +
    279 
    -
    280  /* Timer for the active frame has expired and it has been dropped */
    -
    281  NR_FRAME_DROPPED = 0,
    -
    282 };
    -
    283 
    -
    284 /* see src/util.hh for more information */
    -
    285 typedef struct rtp_ctx_conf {
    -
    286  int flags;
    -
    287  ssize_t ctx_values[RCC_LAST];
    -
    288 } rtp_ctx_conf_t;
    +
    280  RCC_LAST
    +
    281 };
    +
    282 
    +
    284 enum NOTIFY_REASON {
    +
    285 
    +
    286  /* Timer for the active frame has expired and it has been dropped */
    +
    287  NR_FRAME_DROPPED = 0,
    +
    288 };
    289 
    -
    290 extern thread_local rtp_error_t rtp_errno;
    -
    291 
    -
    292 #define TIME_DIFF(s, e, u) ((ssize_t)std::chrono::duration_cast<std::chrono::u>(e - s).count())
    -
    293 
    -
    294 #define SET_NEXT_FIELD_32(a, p, v) do { *(uint32_t *)&(a)[p] = (v); p += 4; } while (0)
    -
    295 #define SET_FIELD_32(a, i, v) do { *(uint32_t *)&(a)[i] = (v); } while (0)
    -
    296 
    -
    297 static inline void hex_dump(uint8_t *buf, size_t len)
    -
    298 {
    -
    299  if (!buf)
    -
    300  return;
    -
    301 
    -
    302  for (size_t i = 0; i < len; i += 10) {
    -
    303  fprintf(stderr, "\t");
    -
    304  for (size_t k = i; k < i + 10; ++k) {
    -
    305  fprintf(stderr, "0x%02x ", buf[k]);
    -
    306  }
    -
    307  fprintf(stderr, "\n");
    -
    308  }
    -
    309 }
    -
    310 
    -
    311 static inline void set_bytes(int *ptr, int nbytes)
    -
    312 {
    -
    313  if (ptr)
    -
    314  *ptr = nbytes;
    +
    290 /* see src/util.hh for more information */
    +
    291 typedef struct rtp_ctx_conf {
    +
    292  int flags;
    +
    293  ssize_t ctx_values[RCC_LAST];
    +
    294 } rtp_ctx_conf_t;
    +
    295 
    +
    296 extern thread_local rtp_error_t rtp_errno;
    +
    297 
    +
    298 #define TIME_DIFF(s, e, u) ((ssize_t)std::chrono::duration_cast<std::chrono::u>(e - s).count())
    +
    299 
    +
    300 #define SET_NEXT_FIELD_32(a, p, v) do { *(uint32_t *)&(a)[p] = (v); p += 4; } while (0)
    +
    301 #define SET_FIELD_32(a, i, v) do { *(uint32_t *)&(a)[i] = (v); } while (0)
    +
    302 
    +
    303 static inline void hex_dump(uint8_t *buf, size_t len)
    +
    304 {
    +
    305  if (!buf)
    +
    306  return;
    +
    307 
    +
    308  for (size_t i = 0; i < len; i += 10) {
    +
    309  fprintf(stderr, "\t");
    +
    310  for (size_t k = i; k < i + 10; ++k) {
    +
    311  fprintf(stderr, "0x%02x ", buf[k]);
    +
    312  }
    +
    313  fprintf(stderr, "\n");
    +
    314  }
    315 }
    316 
    -
    317 static inline void *memdup(const void *src, size_t len)
    +
    317 static inline void set_bytes(int *ptr, int nbytes)
    318 {
    -
    319  uint8_t *dst = new uint8_t[len];
    -
    320  std::memcpy(dst, src, len);
    -
    321 
    -
    322  return dst;
    -
    323 }
    -
    324 
    -
    325 static inline std::string generate_string(size_t length)
    -
    326 {
    -
    327  auto randchar = []() -> char
    -
    328  {
    -
    329  const char charset[] =
    -
    330  "0123456789"
    -
    331  "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    -
    332  "abcdefghijklmnopqrstuvwxyz";
    -
    333  const size_t max_index = (sizeof(charset) - 1);
    -
    334  return charset[ rand() % max_index ];
    -
    335  };
    -
    336 
    -
    337  std::string str(length, 0);
    -
    338  std::generate_n(str.begin(), length, randchar);
    -
    339  return str;
    -
    340 }
    +
    319  if (ptr)
    +
    320  *ptr = nbytes;
    +
    321 }
    +
    322 
    +
    323 static inline void *memdup(const void *src, size_t len)
    +
    324 {
    +
    325  uint8_t *dst = new uint8_t[len];
    +
    326  std::memcpy(dst, src, len);
    +
    327 
    +
    328  return dst;
    +
    329 }
    +
    330 
    +
    331 static inline std::string generate_string(size_t length)
    +
    332 {
    +
    333  auto randchar = []() -> char
    +
    334  {
    +
    335  const char charset[] =
    +
    336  "0123456789"
    +
    337  "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    +
    338  "abcdefghijklmnopqrstuvwxyz";
    +
    339  const size_t max_index = (sizeof(charset) - 1);
    +
    340  return charset[ rand() % max_index ];
    +
    341  };
    +
    342 
    +
    343  std::string str(length, 0);
    +
    344  std::generate_n(str.begin(), length, randchar);
    +
    345  return str;
    +
    346 }
    RTP_CTX_ENABLE_FLAGS
    RTP context enable flags.
    Definition: util.hh:118
    +
    @ RCE_SRTP_KEYSIZE_256
    Definition: util.hh:227
    @ RCE_SRTP_INPLACE_ENCRYPTION
    Definition: util.hh:191
    @ RCE_SRTP_KMNGMNT_ZRTP
    Definition: util.hh:135
    @ RCE_SRTP_KMNGMNT_USER
    Definition: util.hh:145
    @@ -282,6 +287,7 @@ $(function() {
    @ RCE_RTCP
    Definition: util.hh:212
    @ RCE_NO_SYSTEM_CALL_CLUSTERING
    Definition: util.hh:194
    @ RCE_SRTP_REPLAY_PROTECTION
    Definition: util.hh:208
    +
    @ RCE_SRTP_KEYSIZE_192
    Definition: util.hh:224
    @ RCE_SRTP
    Definition: util.hh:125
    RTP_FORMAT
    These flags are given to uvgrtp::session::create_stream()
    Definition: util.hh:85
    @ RTP_FORMAT_H266
    H.266/VVC.
    Definition: util.hh:89
    @@ -305,12 +311,12 @@ $(function() {
    @ RTP_MEMORY_ERROR
    Memory allocation failed.
    Definition: util.hh:69
    @ RTP_TIMEOUT
    Operation timed out.
    Definition: util.hh:75
    @ RTP_GENERIC_ERROR
    Generic error condition.
    Definition: util.hh:64
    -
    RTP_CTX_CONFIGURATION_FLAGS
    RTP context configuration flags.
    Definition: util.hh:233
    -
    @ RCC_PKT_MAX_DELAY
    Definition: util.hh:258
    -
    @ RCC_MTU_SIZE
    Definition: util.hh:272
    -
    @ RCC_UDP_RCV_BUF_SIZE
    Definition: util.hh:242
    -
    @ RCC_DYN_PAYLOAD_TYPE
    Definition: util.hh:262
    -
    @ RCC_UDP_SND_BUF_SIZE
    Definition: util.hh:250
    +
    RTP_CTX_CONFIGURATION_FLAGS
    RTP context configuration flags.
    Definition: util.hh:239
    +
    @ RCC_PKT_MAX_DELAY
    Definition: util.hh:264
    +
    @ RCC_MTU_SIZE
    Definition: util.hh:278
    +
    @ RCC_UDP_RCV_BUF_SIZE
    Definition: util.hh:248
    +
    @ RCC_DYN_PAYLOAD_TYPE
    Definition: util.hh:268
    +
    @ RCC_UDP_SND_BUF_SIZE
    Definition: util.hh:256
    RTP_FLAGS
    These flags are given to uvgrtp::media_stream::push_frame() and they can be OR'ed together.
    Definition: util.hh:99
    @ RTP_NO_FLAGS
    Definition: util.hh:101
    @ RTP_COPY
    Definition: util.hh:107
    diff --git a/include/media_stream.hh b/include/media_stream.hh index 683cf9b..7d7a6c1 100644 --- a/include/media_stream.hh +++ b/include/media_stream.hh @@ -50,17 +50,11 @@ namespace uvgrtp { * \details For user-managed SRTP session, the media stream is not started * until SRTP key has been added and all calls to push_frame() will fail * - * Currently uvgRTP only supports key length of 16 bytes (128 bits) - * and salt length of 14 bytes (112 bits). - * - * If the key or salt is longer, it is implicitly truncated to correct length - * and if the key or salt is shorter, a memory violation may occur - * * Notice that if user-managed SRTP has been enabled during media stream creation, * this function must be called before anything else. All calls to other functions * will fail with ::RTP_NOT_INITIALIZED until the SRTP context has been specified * - * \param key 128-bit long key + * \param key SRTP master key, default is 128-bit long * \param salt 112-bit long salt * * \return RTP error code diff --git a/include/srtp/base.hh b/include/srtp/base.hh index c867a58..21163eb 100644 --- a/include/srtp/base.hh +++ b/include/srtp/base.hh @@ -19,9 +19,17 @@ #include "../util.hh" #include "../zrtp.hh" +enum { + AES128_KEY_SIZE = 16, + AES192_KEY_SIZE = 24, + AES256_KEY_SIZE = 32 +}; + #define AES_KEY_LENGTH 16 /* 128 bits */ #define HMAC_KEY_LENGTH 32 /* 256 bits */ #define SALT_LENGTH 14 /* 112 bits */ +#define AUTH_LENGTH 16 +#define IV_LENGTH 16 #define AUTH_TAG_LENGTH 10 #define SRTCP_INDEX_LENGTH 4 @@ -37,6 +45,8 @@ namespace uvgrtp { enum ETYPE { AES_128 = 0, + AES_192 = 1, + AES_256 = 2 }; enum HTYPE { @@ -61,26 +71,26 @@ namespace uvgrtp { /* Keys negotiated by ZRTP */ struct { /* Our master key and salt */ - uint8_t local_key[AES_KEY_LENGTH]; + uint8_t *local_key; uint8_t local_salt[SALT_LENGTH]; /* Remote's master key and salt */ - uint8_t remote_key[AES_KEY_LENGTH]; + uint8_t *remote_key; uint8_t remote_salt[SALT_LENGTH]; } master; /* Used to encrypt/authenticate packets sent by us */ struct { - uint8_t enc_key[AES_KEY_LENGTH]; - uint8_t auth_key[AES_KEY_LENGTH]; - uint8_t salt_key[AES_KEY_LENGTH]; /* TODO: make sure this is correct */ + uint8_t *enc_key; + uint8_t auth_key[AUTH_LENGTH]; + uint8_t salt_key[SALT_LENGTH]; } local; /* Used to decrypt/Authenticate packets sent by remote */ struct { - uint8_t enc_key[AES_KEY_LENGTH]; - uint8_t auth_key[AES_KEY_LENGTH]; - uint8_t salt_key[AES_KEY_LENGTH]; + uint8_t *enc_key; + uint8_t auth_key[AUTH_LENGTH]; + uint8_t salt_key[SALT_LENGTH]; } remote; } srtp_key_ctx_t; @@ -127,8 +137,8 @@ namespace uvgrtp { /* Setup Secure RTP/RTCP connection using user-managed keys * - * Length of "key" must be AES_KEY_LENGTH (16 bytes) - * Length of "salt" must be SALT_LENGTH (14 bytes) + * Length of the "key" must be either 128, 192, or 256 bits + * Length of "salt" must be SALT_LENGTH (14 bytes, 112 bits) * * Return RTP_OK if SRTP setup was successful * Return RTP_INVALID_VALUE if "key" or "salt" is nullptr @@ -158,7 +168,11 @@ namespace uvgrtp { rtp_error_t create_iv(uint8_t *out, uint32_t ssrc, uint64_t index, uint8_t *salt); /* Internal init method that initialize the SRTP context using values in key_ctx_.master */ - rtp_error_t init(int type, int flags); + rtp_error_t init(int type, int flags, size_t key_size); + + /* Allocate space for master/session encryption keys */ + rtp_error_t allocate_crypto_ctx(size_t key_size); + /* SRTP context containing all session information and keys */ srtp_ctx_t *srtp_ctx_; diff --git a/include/util.hh b/include/util.hh index ac881dc..57173e7 100644 --- a/include/util.hh +++ b/include/util.hh @@ -220,7 +220,13 @@ enum RTP_CTX_ENABLE_FLAGS { * in the firewall open */ RCE_HOLEPUNCH_KEEPALIVE = 1 << 14, - RCE_LAST = 1 << 15, + /** Use 192-bit keys with SRTP */ + RCE_SRTP_KEYSIZE_192 = 1 << 15, + + /** Use 256-bit keys with SRTP */ + RCE_SRTP_KEYSIZE_256 = 1 << 16, + + RCE_LAST = 1 << 17, }; /** diff --git a/src/srtp/base.cc b/src/srtp/base.cc index 72fa4fb..b379c57 100644 --- a/src/srtp/base.cc +++ b/src/srtp/base.cc @@ -13,6 +13,11 @@ uvgrtp::base_srtp::base_srtp(): uvgrtp::base_srtp::~base_srtp() { + delete[] srtp_ctx_->key_ctx.master.local_key; + delete[] srtp_ctx_->key_ctx.master.remote_key; + delete[] srtp_ctx_->key_ctx.local.enc_key; + delete[] srtp_ctx_->key_ctx.remote.enc_key; + delete srtp_ctx_; } bool uvgrtp::base_srtp::use_null_cipher() @@ -32,15 +37,18 @@ uvgrtp::srtp_ctx_t *uvgrtp::base_srtp::get_ctx() rtp_error_t uvgrtp::base_srtp::derive_key(int label, uint8_t *key, uint8_t *salt, uint8_t *out, size_t out_len) { - uint8_t input[AES_KEY_LENGTH] = { 0 }; - memcpy(input, salt, SALT_LENGTH); + uint8_t input[IV_LENGTH] = { 0 }; + uint8_t ks[AES128_KEY_SIZE] = { 0 }; - input[7] ^= label; + memcpy(input, salt, SALT_LENGTH); memset(out, 0, out_len); - uvgrtp::crypto::aes::ecb ecb(key, AES_KEY_LENGTH); - ecb.encrypt(out, input, AES_KEY_LENGTH); + input[7] ^= label; + uvgrtp::crypto::aes::ecb ecb(key, srtp_ctx_->n_e); + ecb.encrypt(ks, input, IV_LENGTH); + + memcpy(out, ks, out_len); return RTP_OK; } @@ -52,7 +60,7 @@ rtp_error_t uvgrtp::base_srtp::create_iv(uint8_t *out, uint32_t ssrc, uint64_t i uint8_t buf[8]; int i; - memset(out, 0, AES_KEY_LENGTH); + memset(out, 0, IV_LENGTH); memcpy(&out[4], &ssrc, sizeof(uint32_t)); memcpy(buf, &index, sizeof(uint64_t)); @@ -82,14 +90,27 @@ bool uvgrtp::base_srtp::is_replayed_packet(uint8_t *digest) return false; } -rtp_error_t uvgrtp::base_srtp::init(int type, int flags) +rtp_error_t uvgrtp::base_srtp::init(int type, int flags, size_t key_size) { srtp_ctx_->roc = 0; srtp_ctx_->rts = 0; srtp_ctx_->type = type; - srtp_ctx_->enc = AES_128; srtp_ctx_->hmac = HMAC_SHA1; + switch (key_size) { + case AES128_KEY_SIZE: + srtp_ctx_->enc = AES_128; + break; + + case AES192_KEY_SIZE: + srtp_ctx_->enc = AES_192; + break; + + case AES256_KEY_SIZE: + srtp_ctx_->enc = AES_256; + break; + } + srtp_ctx_->mki_size = 0; srtp_ctx_->mki_present = false; srtp_ctx_->mki = nullptr; @@ -98,7 +119,7 @@ rtp_error_t uvgrtp::base_srtp::init(int type, int flags) srtp_ctx_->master_salt = srtp_ctx_->key_ctx.master.local_salt; srtp_ctx_->mk_cnt = 0; - srtp_ctx_->n_e = AES_KEY_LENGTH; + srtp_ctx_->n_e = key_size; srtp_ctx_->n_a = HMAC_KEY_LENGTH; srtp_ctx_->s_l = 0; @@ -129,14 +150,14 @@ rtp_error_t uvgrtp::base_srtp::init(int type, int flags) srtp_ctx_->key_ctx.master.local_key, srtp_ctx_->key_ctx.master.local_salt, srtp_ctx_->key_ctx.local.enc_key, - AES_KEY_LENGTH + key_size ); (void)derive_key( label_auth, srtp_ctx_->key_ctx.master.local_key, srtp_ctx_->key_ctx.master.local_salt, srtp_ctx_->key_ctx.local.auth_key, - AES_KEY_LENGTH + AUTH_LENGTH ); (void)derive_key( label_salt, @@ -152,14 +173,14 @@ rtp_error_t uvgrtp::base_srtp::init(int type, int flags) srtp_ctx_->key_ctx.master.remote_key, srtp_ctx_->key_ctx.master.remote_salt, srtp_ctx_->key_ctx.remote.enc_key, - AES_KEY_LENGTH + key_size ); (void)derive_key( label_auth, srtp_ctx_->key_ctx.master.remote_key, srtp_ctx_->key_ctx.master.remote_salt, srtp_ctx_->key_ctx.remote.auth_key, - AES_KEY_LENGTH + AUTH_LENGTH ); (void)derive_key( label_salt, @@ -172,6 +193,40 @@ rtp_error_t uvgrtp::base_srtp::init(int type, int flags) return RTP_OK; } +rtp_error_t uvgrtp::base_srtp::allocate_crypto_ctx(size_t key_size) +{ + if (!(srtp_ctx_->key_ctx.master.local_key = new uint8_t[key_size])) { + LOG_ERROR("Failed to allocate space for local master key"); + return RTP_MEMORY_ERROR; + } + + if (!(srtp_ctx_->key_ctx.master.remote_key = new uint8_t[key_size])) { + LOG_ERROR("Failed to allocate space for remote master key"); + + delete[] srtp_ctx_->key_ctx.master.local_key; + return RTP_MEMORY_ERROR; + } + + if (!(srtp_ctx_->key_ctx.local.enc_key = new uint8_t[key_size])) { + LOG_ERROR("Failed to allocate space for local session key"); + + delete[] srtp_ctx_->key_ctx.master.local_key; + delete[] srtp_ctx_->key_ctx.master.remote_key; + return RTP_MEMORY_ERROR; + } + + if (!(srtp_ctx_->key_ctx.remote.enc_key = new uint8_t[key_size])) { + LOG_ERROR("Failed to allocate space for remote session key"); + + delete[] srtp_ctx_->key_ctx.master.local_key; + delete[] srtp_ctx_->key_ctx.master.remote_key; + delete[] srtp_ctx_->key_ctx.local.enc_key; + return RTP_MEMORY_ERROR; + } + + return RTP_OK; +} + rtp_error_t uvgrtp::base_srtp::init_zrtp(int type, int flags, uvgrtp::rtp *rtp, uvgrtp::zrtp *zrtp) { (void)rtp; @@ -179,12 +234,17 @@ rtp_error_t uvgrtp::base_srtp::init_zrtp(int type, int flags, uvgrtp::rtp *rtp, if (!zrtp) return RTP_INVALID_VALUE; + rtp_error_t ret = allocate_crypto_ctx(AES128_KEY_SIZE); + + if (ret != RTP_OK) + return ret; + /* ZRTP key derivation function expects the keys lengths to be given in bits */ - rtp_error_t ret = zrtp->get_srtp_keys( - srtp_ctx_->key_ctx.master.local_key, AES_KEY_LENGTH * 8, - srtp_ctx_->key_ctx.master.remote_key, AES_KEY_LENGTH * 8, - srtp_ctx_->key_ctx.master.local_salt, SALT_LENGTH * 8, - srtp_ctx_->key_ctx.master.remote_salt, SALT_LENGTH * 8 + ret = zrtp->get_srtp_keys( + srtp_ctx_->key_ctx.master.local_key, AES128_KEY_SIZE * 8, + srtp_ctx_->key_ctx.master.remote_key, AES128_KEY_SIZE * 8, + srtp_ctx_->key_ctx.master.local_salt, SALT_LENGTH * 8, + srtp_ctx_->key_ctx.master.remote_salt, SALT_LENGTH * 8 ); if (ret != RTP_OK) { @@ -192,18 +252,30 @@ rtp_error_t uvgrtp::base_srtp::init_zrtp(int type, int flags, uvgrtp::rtp *rtp, return ret; } - return init(type, flags); + return init(type, flags, AES128_KEY_SIZE); } rtp_error_t uvgrtp::base_srtp::init_user(int type, int flags, uint8_t *key, uint8_t *salt) { + rtp_error_t ret; + if (!key || !salt) return RTP_INVALID_VALUE; - memcpy(srtp_ctx_->key_ctx.master.local_key, key, AES_KEY_LENGTH); - memcpy(srtp_ctx_->key_ctx.master.remote_key, key, AES_KEY_LENGTH); + size_t key_size = AES128_KEY_SIZE; + + if (flags & RCE_SRTP_KEYSIZE_192) + key_size = AES192_KEY_SIZE; + else if (flags & RCE_SRTP_KEYSIZE_256) + key_size = AES256_KEY_SIZE; + + if ((ret = allocate_crypto_ctx(key_size)) != RTP_OK) + return ret; + + memcpy(srtp_ctx_->key_ctx.master.local_key, key, key_size); + memcpy(srtp_ctx_->key_ctx.master.remote_key, key, key_size); memcpy(srtp_ctx_->key_ctx.master.local_salt, salt, SALT_LENGTH); memcpy(srtp_ctx_->key_ctx.master.remote_salt, salt, SALT_LENGTH); - return init(type, flags); + return init(type, flags, key_size); } diff --git a/src/srtp/srtcp.cc b/src/srtp/srtcp.cc index d7ed501..0749cef 100644 --- a/src/srtp/srtcp.cc +++ b/src/srtp/srtcp.cc @@ -17,14 +17,14 @@ rtp_error_t uvgrtp::srtcp::encrypt(uint32_t ssrc, uint16_t seq, uint8_t *buffer, if (use_null_cipher_) return RTP_OK; - uint8_t iv[16] = { 0 }; + uint8_t iv[IV_LENGTH] = { 0 }; if (create_iv(iv, ssrc, seq, srtp_ctx_->key_ctx.local.salt_key) != RTP_OK) { LOG_ERROR("Failed to create IV, unable to encrypt the RTP packet!"); return RTP_INVALID_VALUE; } - uvgrtp::crypto::aes::ctr ctr(srtp_ctx_->key_ctx.local.enc_key, sizeof(srtp_ctx_->key_ctx.local.enc_key), iv); + uvgrtp::crypto::aes::ctr ctr(srtp_ctx_->key_ctx.local.enc_key, srtp_ctx_->n_e, iv); ctr.encrypt(buffer, buffer, len); return RTP_OK; @@ -65,14 +65,14 @@ rtp_error_t uvgrtp::srtcp::verify_auth_tag(uint8_t *buffer, size_t len) rtp_error_t uvgrtp::srtcp::decrypt(uint32_t ssrc, uint32_t seq, uint8_t *buffer, size_t size) { - uint8_t iv[16] = { 0 }; + uint8_t iv[IV_LENGTH] = { 0 }; if (create_iv(iv, ssrc, seq, srtp_ctx_->key_ctx.remote.salt_key) != RTP_OK) { LOG_ERROR("Failed to create IV, unable to encrypt the RTP packet!"); return RTP_INVALID_VALUE; } - uvgrtp::crypto::aes::ctr ctr(srtp_ctx_->key_ctx.remote.enc_key, sizeof(srtp_ctx_->key_ctx.remote.enc_key), iv); + uvgrtp::crypto::aes::ctr ctr(srtp_ctx_->key_ctx.remote.enc_key, srtp_ctx_->n_e, iv); /* skip header and sender ssrc */ ctr.decrypt(&buffer[8], &buffer[8], size - 8 - AUTH_TAG_LENGTH - SRTCP_INDEX_LENGTH); diff --git a/src/srtp/srtp.cc b/src/srtp/srtp.cc index 422064f..b450303 100644 --- a/src/srtp/srtp.cc +++ b/src/srtp/srtp.cc @@ -20,7 +20,7 @@ rtp_error_t uvgrtp::srtp::encrypt(uint32_t ssrc, uint16_t seq, uint8_t *buffer, if (use_null_cipher_) return RTP_OK; - uint8_t iv[16] = { 0 }; + uint8_t iv[IV_LENGTH] = { 0 }; uint64_t index = (((uint64_t)srtp_ctx_->roc) << 16) + seq; /* Sequence number has wrapped around, update Roll-over Counter */ @@ -32,7 +32,7 @@ rtp_error_t uvgrtp::srtp::encrypt(uint32_t ssrc, uint16_t seq, uint8_t *buffer, return RTP_INVALID_VALUE; } - uvgrtp::crypto::aes::ctr ctr(srtp_ctx_->key_ctx.local.enc_key, sizeof(srtp_ctx_->key_ctx.local.enc_key), iv); + uvgrtp::crypto::aes::ctr ctr(srtp_ctx_->key_ctx.local.enc_key, srtp_ctx_->n_e, iv); ctr.encrypt(buffer, buffer, len); return RTP_OK; @@ -49,7 +49,7 @@ rtp_error_t uvgrtp::srtp::recv_packet_handler(void *arg, int flags, frame::rtp_f /* Calculate authentication tag for the packet and compare it against the one we received */ if (srtp->authenticate_rtp()) { uint8_t digest[10] = { 0 }; - auto hmac_sha1 = uvgrtp::crypto::hmac::sha1(ctx->key_ctx.remote.auth_key, AES_KEY_LENGTH); + auto hmac_sha1 = uvgrtp::crypto::hmac::sha1(ctx->key_ctx.remote.auth_key, AUTH_LENGTH); hmac_sha1.update(frame->dgram, frame->dgram_size - AUTH_TAG_LENGTH); hmac_sha1.update((uint8_t *)&ctx->roc, sizeof(ctx->roc)); @@ -70,11 +70,11 @@ rtp_error_t uvgrtp::srtp::recv_packet_handler(void *arg, int flags, frame::rtp_f if (srtp->use_null_cipher()) return RTP_PKT_NOT_HANDLED; - uint8_t iv[16] = { 0 }; - uint16_t seq = frame->header.seq; - uint32_t ssrc = frame->header.ssrc; - uint32_t ts = frame->header.timestamp; - uint64_t index = 0; + uint8_t iv[IV_LENGTH] = { 0 }; + uint16_t seq = frame->header.seq; + uint32_t ssrc = frame->header.ssrc; + uint32_t ts = frame->header.timestamp; + uint64_t index = 0; /* as the sequence number approaches 0xffff and is close to wrapping around, * special care must be taken to use correct roll-over counter as it's entirely @@ -103,7 +103,7 @@ rtp_error_t uvgrtp::srtp::recv_packet_handler(void *arg, int flags, frame::rtp_f return RTP_GENERIC_ERROR; } - uvgrtp::crypto::aes::ctr ctr(ctx->key_ctx.remote.enc_key, sizeof(ctx->key_ctx.remote.enc_key), iv); + uvgrtp::crypto::aes::ctr ctr(ctx->key_ctx.remote.enc_key, ctx->n_e, iv); ctr.decrypt(frame->payload, frame->payload, frame->payload_len); return RTP_PKT_MODIFIED; @@ -116,7 +116,7 @@ rtp_error_t uvgrtp::srtp::send_packet_handler(void *arg, uvgrtp::buf_vec& buffer auto ctx = srtp->get_ctx(); auto off = srtp->authenticate_rtp() ? 2 : 1; auto data = buffers.at(buffers.size() - off); - auto hmac_sha1 = uvgrtp::crypto::hmac::sha1(ctx->key_ctx.local.auth_key, AES_KEY_LENGTH); + auto hmac_sha1 = uvgrtp::crypto::hmac::sha1(ctx->key_ctx.local.auth_key, AUTH_LENGTH); rtp_error_t ret = RTP_OK; if (srtp->use_null_cipher())