| 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_BASE_NATSOCKETFACTORY_H_ | 11 #ifndef WEBRTC_BASE_NATSOCKETFACTORY_H_ |
| 12 #define WEBRTC_BASE_NATSOCKETFACTORY_H_ | 12 #define WEBRTC_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/base/natserver.h" | 20 #include "webrtc/base/natserver.h" |
| 20 #include "webrtc/base/socketaddress.h" | 21 #include "webrtc/base/socketaddress.h" |
| 21 #include "webrtc/base/socketserver.h" | 22 #include "webrtc/base/socketserver.h" |
| 22 | 23 |
| 23 namespace rtc { | 24 namespace rtc { |
| 24 | 25 |
| 25 const size_t kNATEncodedIPv4AddressSize = 8U; | 26 const size_t kNATEncodedIPv4AddressSize = 8U; |
| 26 const size_t kNATEncodedIPv6AddressSize = 20U; | 27 const size_t kNATEncodedIPv6AddressSize = 20U; |
| 27 | 28 |
| 28 // Used by the NAT socket implementation. | 29 // Used by the NAT socket implementation. |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 }; | 159 }; |
| 159 | 160 |
| 160 // Free-standing NAT helper functions. | 161 // Free-standing NAT helper functions. |
| 161 size_t PackAddressForNAT(char* buf, size_t buf_size, | 162 size_t PackAddressForNAT(char* buf, size_t buf_size, |
| 162 const SocketAddress& remote_addr); | 163 const SocketAddress& remote_addr); |
| 163 size_t UnpackAddressFromNAT(const char* buf, size_t buf_size, | 164 size_t UnpackAddressFromNAT(const char* buf, size_t buf_size, |
| 164 SocketAddress* remote_addr); | 165 SocketAddress* remote_addr); |
| 165 } // namespace rtc | 166 } // namespace rtc |
| 166 | 167 |
| 167 #endif // WEBRTC_BASE_NATSOCKETFACTORY_H_ | 168 #endif // WEBRTC_BASE_NATSOCKETFACTORY_H_ |
| OLD | NEW |