Zhi Huang | 942bc2e | 2017-11-13 13:26:07 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017 The WebRTC Project Authors. All rights reserved. |
| 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
Steve Anton | 10542f2 | 2019-01-11 09:11:00 -0800 | [diff] [blame] | 10 | #ifndef RTC_BASE_NET_HELPER_H_ |
| 11 | #define RTC_BASE_NET_HELPER_H_ |
Zhi Huang | 942bc2e | 2017-11-13 13:26:07 -0800 | [diff] [blame] | 12 | |
Zhi Huang | 942bc2e | 2017-11-13 13:26:07 -0800 | [diff] [blame] | 13 | #include <string> |
| 14 | |
| 15 | // This header contains helper functions and constants used by different types |
| 16 | // of transports. |
| 17 | namespace cricket { |
| 18 | |
| 19 | extern const char UDP_PROTOCOL_NAME[]; |
| 20 | extern const char TCP_PROTOCOL_NAME[]; |
| 21 | extern const char SSLTCP_PROTOCOL_NAME[]; |
| 22 | extern const char TLS_PROTOCOL_NAME[]; |
| 23 | |
| 24 | // Get the network layer overhead per packet based on the IP address family. |
| 25 | int GetIpOverhead(int addr_family); |
| 26 | |
| 27 | // Get the transport layer overhead per packet based on the protocol. |
| 28 | int GetProtocolOverhead(const std::string& protocol); |
| 29 | |
| 30 | } // namespace cricket |
| 31 | |
Steve Anton | 10542f2 | 2019-01-11 09:11:00 -0800 | [diff] [blame] | 32 | #endif // RTC_BASE_NET_HELPER_H_ |