OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 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_RTC_BASE_NATSOCKETFACTORY_H_ | 11 #ifndef WEBRTC_RTC_BASE_NATSOCKETFACTORY_H_ |
12 #define WEBRTC_RTC_BASE_NATSOCKETFACTORY_H_ | 12 #define WEBRTC_RTC_BASE_NATSOCKETFACTORY_H_ |
13 | 13 |
14 #include <string> | 14 #include <string> |
15 #include <map> | 15 #include <map> |
16 #include <memory> | 16 #include <memory> |
17 #include <set> | 17 #include <set> |
18 | 18 |
19 #include "webrtc/base/constructormagic.h" | 19 #include "webrtc/rtc_base/constructormagic.h" |
20 #include "webrtc/base/natserver.h" | 20 #include "webrtc/rtc_base/natserver.h" |
21 #include "webrtc/base/socketaddress.h" | 21 #include "webrtc/rtc_base/socketaddress.h" |
22 #include "webrtc/base/socketserver.h" | 22 #include "webrtc/rtc_base/socketserver.h" |
23 | 23 |
24 namespace rtc { | 24 namespace rtc { |
25 | 25 |
26 const size_t kNATEncodedIPv4AddressSize = 8U; | 26 const size_t kNATEncodedIPv4AddressSize = 8U; |
27 const size_t kNATEncodedIPv6AddressSize = 20U; | 27 const size_t kNATEncodedIPv6AddressSize = 20U; |
28 | 28 |
29 // Used by the NAT socket implementation. | 29 // Used by the NAT socket implementation. |
30 class NATInternalSocketFactory { | 30 class NATInternalSocketFactory { |
31 public: | 31 public: |
32 virtual ~NATInternalSocketFactory() {} | 32 virtual ~NATInternalSocketFactory() {} |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 }; | 159 }; |
160 | 160 |
161 // Free-standing NAT helper functions. | 161 // Free-standing NAT helper functions. |
162 size_t PackAddressForNAT(char* buf, size_t buf_size, | 162 size_t PackAddressForNAT(char* buf, size_t buf_size, |
163 const SocketAddress& remote_addr); | 163 const SocketAddress& remote_addr); |
164 size_t UnpackAddressFromNAT(const char* buf, size_t buf_size, | 164 size_t UnpackAddressFromNAT(const char* buf, size_t buf_size, |
165 SocketAddress* remote_addr); | 165 SocketAddress* remote_addr); |
166 } // namespace rtc | 166 } // namespace rtc |
167 | 167 |
168 #endif // WEBRTC_RTC_BASE_NATSOCKETFACTORY_H_ | 168 #endif // WEBRTC_RTC_BASE_NATSOCKETFACTORY_H_ |
OLD | NEW |