OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2009 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 int64_t* index); | 109 int64_t* index); |
110 bool ProtectRtcp(void* data, int in_len, int max_len, int* out_len); | 110 bool ProtectRtcp(void* data, int in_len, int max_len, int* out_len); |
111 // Decrypts/verifies an invidiual RTP/RTCP packet. | 111 // Decrypts/verifies an invidiual RTP/RTCP packet. |
112 // If an HMAC is used, this will decrease the packet size. | 112 // If an HMAC is used, this will decrease the packet size. |
113 bool UnprotectRtp(void* data, int in_len, int* out_len); | 113 bool UnprotectRtp(void* data, int in_len, int* out_len); |
114 bool UnprotectRtcp(void* data, int in_len, int* out_len); | 114 bool UnprotectRtcp(void* data, int in_len, int* out_len); |
115 | 115 |
116 // Returns rtp auth params from srtp context. | 116 // Returns rtp auth params from srtp context. |
117 bool GetRtpAuthParams(uint8_t** key, int* key_len, int* tag_len); | 117 bool GetRtpAuthParams(uint8_t** key, int* key_len, int* tag_len); |
118 | 118 |
| 119 // Returns srtp overhead for rtp packets. |
| 120 bool GetSrtpOverhead(int* srtp_overhead) const; |
| 121 |
119 // Update the silent threshold (in ms) for signaling errors. | 122 // Update the silent threshold (in ms) for signaling errors. |
120 void set_signal_silent_time(int signal_silent_time_in_ms); | 123 void set_signal_silent_time(int signal_silent_time_in_ms); |
121 | 124 |
122 bool ResetParams(); | 125 bool ResetParams(); |
123 | 126 |
124 sigslot::repeater3<uint32_t, Mode, Error> SignalSrtpError; | 127 sigslot::repeater3<uint32_t, Mode, Error> SignalSrtpError; |
125 | 128 |
126 protected: | 129 protected: |
127 bool ExpectOffer(ContentSource source); | 130 bool ExpectOffer(ContentSource source); |
128 bool StoreParams(const std::vector<CryptoParams>& params, | 131 bool StoreParams(const std::vector<CryptoParams>& params, |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 int64_t* index); | 202 int64_t* index); |
200 bool ProtectRtcp(void* data, int in_len, int max_len, int* out_len); | 203 bool ProtectRtcp(void* data, int in_len, int max_len, int* out_len); |
201 // Decrypts/verifies an invidiual RTP/RTCP packet. | 204 // Decrypts/verifies an invidiual RTP/RTCP packet. |
202 // If an HMAC is used, this will decrease the packet size. | 205 // If an HMAC is used, this will decrease the packet size. |
203 bool UnprotectRtp(void* data, int in_len, int* out_len); | 206 bool UnprotectRtp(void* data, int in_len, int* out_len); |
204 bool UnprotectRtcp(void* data, int in_len, int* out_len); | 207 bool UnprotectRtcp(void* data, int in_len, int* out_len); |
205 | 208 |
206 // Helper method to get authentication params. | 209 // Helper method to get authentication params. |
207 bool GetRtpAuthParams(uint8_t** key, int* key_len, int* tag_len); | 210 bool GetRtpAuthParams(uint8_t** key, int* key_len, int* tag_len); |
208 | 211 |
| 212 int GetSrtpOverhead() const; |
| 213 |
209 // Update the silent threshold (in ms) for signaling errors. | 214 // Update the silent threshold (in ms) for signaling errors. |
210 void set_signal_silent_time(int signal_silent_time_in_ms); | 215 void set_signal_silent_time(int signal_silent_time_in_ms); |
211 | 216 |
212 // Calls srtp_shutdown if it's initialized. | 217 // Calls srtp_shutdown if it's initialized. |
213 static void Terminate(); | 218 static void Terminate(); |
214 | 219 |
215 sigslot::repeater3<uint32_t, SrtpFilter::Mode, SrtpFilter::Error> | 220 sigslot::repeater3<uint32_t, SrtpFilter::Mode, SrtpFilter::Error> |
216 SignalSrtpError; | 221 SignalSrtpError; |
217 | 222 |
218 private: | 223 private: |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 std::map<FailureKey, FailureStat> failures_; | 308 std::map<FailureKey, FailureStat> failures_; |
304 // Threshold in ms to silent the signaling errors. | 309 // Threshold in ms to silent the signaling errors. |
305 int signal_silent_time_; | 310 int signal_silent_time_; |
306 | 311 |
307 RTC_DISALLOW_COPY_AND_ASSIGN(SrtpStat); | 312 RTC_DISALLOW_COPY_AND_ASSIGN(SrtpStat); |
308 }; | 313 }; |
309 | 314 |
310 } // namespace cricket | 315 } // namespace cricket |
311 | 316 |
312 #endif // WEBRTC_PC_SRTPFILTER_H_ | 317 #endif // WEBRTC_PC_SRTPFILTER_H_ |
OLD | NEW |