blob: e86d126cbf45c6f79ea201515501588d1a583deb [file] [log] [blame]
Zhi Huang942bc2e2017-11-13 13:26:07 -08001/*
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 */
10#ifndef RTC_BASE_NETHELPER_H_
11#define RTC_BASE_NETHELPER_H_
12
13#include <cstdlib>
14#include <string>
15
16// This header contains helper functions and constants used by different types
17// of transports.
18namespace cricket {
19
20extern const char UDP_PROTOCOL_NAME[];
21extern const char TCP_PROTOCOL_NAME[];
22extern const char SSLTCP_PROTOCOL_NAME[];
23extern const char TLS_PROTOCOL_NAME[];
24
25// Get the network layer overhead per packet based on the IP address family.
26int GetIpOverhead(int addr_family);
27
28// Get the transport layer overhead per packet based on the protocol.
29int GetProtocolOverhead(const std::string& protocol);
30
31} // namespace cricket
32
33#endif // RTC_BASE_NETHELPER_H_