| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 |
| 11 #ifndef WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_H_ | 11 #ifndef WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_H_ |
| 12 #define WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_H_ | 12 #define WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_H_ |
| 13 | 13 |
| 14 #include "webrtc/common_types.h" | 14 #include "webrtc/common_types.h" |
| 15 #include "webrtc/transport.h" |
| 15 #include "webrtc/typedefs.h" | 16 #include "webrtc/typedefs.h" |
| 16 | 17 |
| 17 /* | 18 /* |
| 18 * WARNING | 19 * WARNING |
| 19 * This code is not use in production/testing and might have security issues | 20 * This code is not use in production/testing and might have security issues |
| 20 * for example: http://code.google.com/p/webrtc/issues/detail?id=1028 | 21 * for example: http://code.google.com/p/webrtc/issues/detail?id=1028 |
| 21 * | 22 * |
| 22 */ | 23 */ |
| 23 | 24 |
| 24 #define SS_MAXSIZE 128 | 25 #define SS_MAXSIZE 128 |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 uint16_t portnr = 0, | 289 uint16_t portnr = 0, |
| 289 const char* ip = NULL) = 0; | 290 const char* ip = NULL) = 0; |
| 290 | 291 |
| 291 // Send RTP data with size length to the address specified by to. | 292 // Send RTP data with size length to the address specified by to. |
| 292 virtual int32_t SendRTPPacketTo(const int8_t* data, | 293 virtual int32_t SendRTPPacketTo(const int8_t* data, |
| 293 size_t length, | 294 size_t length, |
| 294 const SocketAddress& to) = 0; | 295 const SocketAddress& to) = 0; |
| 295 | 296 |
| 296 | 297 |
| 297 // Send RTCP data with size length to the address specified by to. | 298 // Send RTCP data with size length to the address specified by to. |
| 298 virtual int32_t SendRTCPPacketTo(const int8_t* data, | 299 virtual int32_t SendRtcpTo(const int8_t* data, |
| 299 size_t length, | 300 size_t length, |
| 300 const SocketAddress& to) = 0; | 301 const SocketAddress& to) = 0; |
| 301 | 302 |
| 302 // Send RTP data with size length to ip:rtpPort where ip is the ip set by | 303 // Send RTP data with size length to ip:rtpPort where ip is the ip set by |
| 303 // the InitializeSendSockets(..) call. | 304 // the InitializeSendSockets(..) call. |
| 304 virtual int32_t SendRTPPacketTo(const int8_t* data, | 305 virtual int32_t SendRTPPacketTo(const int8_t* data, |
| 305 size_t length, | 306 size_t length, |
| 306 uint16_t rtpPort) = 0; | 307 uint16_t rtpPort) = 0; |
| 307 | 308 |
| 308 | 309 |
| 309 // Send RTCP data with size length to ip:rtcpPort where ip is the ip set by | 310 // Send RTCP data with size length to ip:rtcpPort where ip is the ip set by |
| 310 // the InitializeSendSockets(..) call. | 311 // the InitializeSendSockets(..) call. |
| 311 virtual int32_t SendRTCPPacketTo(const int8_t* data, | 312 virtual int32_t SendRtcpTo(const int8_t* data, |
| 312 size_t length, | 313 size_t length, |
| 313 uint16_t rtcpPort) = 0; | 314 uint16_t rtcpPort) = 0; |
| 314 | 315 |
| 315 // Set the IP address to which packets are sent to ipaddr. | 316 // Set the IP address to which packets are sent to ipaddr. |
| 316 virtual int32_t SetSendIP( | 317 virtual int32_t SetSendIP( |
| 317 const char ipaddr[kIpAddressVersion6Length]) = 0; | 318 const char ipaddr[kIpAddressVersion6Length]) = 0; |
| 318 | 319 |
| 319 // Set the send RTP and RTCP port to rtpPort and rtcpPort respectively. | 320 // Set the send RTP and RTCP port to rtpPort and rtcpPort respectively. |
| 320 virtual int32_t SetSendPorts(const uint16_t rtpPort, | 321 virtual int32_t SetSendPorts(const uint16_t rtpPort, |
| 321 const uint16_t rtcpPort = 0) = 0; | 322 const uint16_t rtcpPort = 0) = 0; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 // Return true if ipaddr is a valid IP address. | 372 // Return true if ipaddr is a valid IP address. |
| 372 // If ipV6 is false ipaddr is interpreted as an IPv4 address otherwise it | 373 // If ipV6 is false ipaddr is interpreted as an IPv4 address otherwise it |
| 373 // is interptreted as IPv6. | 374 // is interptreted as IPv6. |
| 374 static bool IsIpAddressValid(const char* ipaddr, const bool ipV6); | 375 static bool IsIpAddressValid(const char* ipaddr, const bool ipV6); |
| 375 }; | 376 }; |
| 376 | 377 |
| 377 } // namespace test | 378 } // namespace test |
| 378 } // namespace webrtc | 379 } // namespace webrtc |
| 379 | 380 |
| 380 #endif // WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_H_ | 381 #endif // WEBRTC_TEST_CHANNEL_TRANSPORT_UDP_TRANSPORT_H_ |
| OLD | NEW |