henrike@webrtc.org | 269fb4b | 2014-10-28 22:20:11 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2004 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 | |
Steve Anton | 10542f2 | 2019-01-11 09:11:00 -0800 | [diff] [blame] | 11 | #ifndef P2P_BASE_P2P_CONSTANTS_H_ |
| 12 | #define P2P_BASE_P2P_CONSTANTS_H_ |
henrike@webrtc.org | 269fb4b | 2014-10-28 22:20:11 +0000 | [diff] [blame] | 13 | |
Yves Gerey | 3e70781 | 2018-11-28 16:47:49 +0100 | [diff] [blame] | 14 | #include <stddef.h> |
| 15 | #include <stdint.h> |
henrike@webrtc.org | 269fb4b | 2014-10-28 22:20:11 +0000 | [diff] [blame] | 16 | |
Mirko Bonadei | ac19414 | 2018-10-22 17:08:37 +0200 | [diff] [blame] | 17 | #include "rtc_base/system/rtc_export.h" |
| 18 | |
henrike@webrtc.org | 269fb4b | 2014-10-28 22:20:11 +0000 | [diff] [blame] | 19 | namespace cricket { |
| 20 | |
henrike@webrtc.org | 269fb4b | 2014-10-28 22:20:11 +0000 | [diff] [blame] | 21 | // CN_ == "content name". When we initiate a session, we choose the |
| 22 | // name, and when we receive a Gingle session, we provide default |
| 23 | // names (since Gingle has no content names). But when we receive a |
| 24 | // Jingle call, the content name can be anything, so don't rely on |
| 25 | // these values being the same as the ones received. |
| 26 | extern const char CN_AUDIO[]; |
| 27 | extern const char CN_VIDEO[]; |
| 28 | extern const char CN_DATA[]; |
| 29 | extern const char CN_OTHER[]; |
pthatcher@webrtc.org | 5ad4178 | 2014-12-23 22:14:15 +0000 | [diff] [blame] | 30 | |
henrike@webrtc.org | 269fb4b | 2014-10-28 22:20:11 +0000 | [diff] [blame] | 31 | // GN stands for group name |
| 32 | extern const char GROUP_TYPE_BUNDLE[]; |
| 33 | |
Mirko Bonadei | 66e7679 | 2019-04-02 11:33:59 +0200 | [diff] [blame] | 34 | RTC_EXPORT extern const int ICE_UFRAG_LENGTH; |
Mirko Bonadei | ac19414 | 2018-10-22 17:08:37 +0200 | [diff] [blame] | 35 | RTC_EXPORT extern const int ICE_PWD_LENGTH; |
henrike@webrtc.org | 269fb4b | 2014-10-28 22:20:11 +0000 | [diff] [blame] | 36 | extern const size_t ICE_UFRAG_MIN_LENGTH; |
| 37 | extern const size_t ICE_PWD_MIN_LENGTH; |
| 38 | extern const size_t ICE_UFRAG_MAX_LENGTH; |
| 39 | extern const size_t ICE_PWD_MAX_LENGTH; |
pthatcher@webrtc.org | 5ad4178 | 2014-12-23 22:14:15 +0000 | [diff] [blame] | 40 | |
Mirko Bonadei | 66e7679 | 2019-04-02 11:33:59 +0200 | [diff] [blame] | 41 | RTC_EXPORT extern const int ICE_CANDIDATE_COMPONENT_RTP; |
| 42 | RTC_EXPORT extern const int ICE_CANDIDATE_COMPONENT_RTCP; |
henrike@webrtc.org | 269fb4b | 2014-10-28 22:20:11 +0000 | [diff] [blame] | 43 | extern const int ICE_CANDIDATE_COMPONENT_DEFAULT; |
| 44 | |
henrike@webrtc.org | 269fb4b | 2014-10-28 22:20:11 +0000 | [diff] [blame] | 45 | // RFC 4145, SDP setup attribute values. |
| 46 | extern const char CONNECTIONROLE_ACTIVE_STR[]; |
| 47 | extern const char CONNECTIONROLE_PASSIVE_STR[]; |
| 48 | extern const char CONNECTIONROLE_ACTPASS_STR[]; |
| 49 | extern const char CONNECTIONROLE_HOLDCONN_STR[]; |
| 50 | |
Qingsi Wang | fdf54f2 | 2019-10-18 15:51:40 -0700 | [diff] [blame] | 51 | // RFC 6762, the .local pseudo-top-level domain used for mDNS names. |
| 52 | extern const char LOCAL_TLD[]; |
| 53 | |
Qingsi Wang | 866e08d | 2018-03-22 17:54:23 -0700 | [diff] [blame] | 54 | // Constants for time intervals are in milliseconds unless otherwise stated. |
| 55 | // |
| 56 | // Most of the following constants are the default values of IceConfig |
| 57 | // paramters. See IceConfig for detailed definition. |
| 58 | // |
| 59 | // Default value of IceConfig.receiving_timeout. |
| 60 | extern const int RECEIVING_TIMEOUT; |
| 61 | // Default value IceConfig.ice_check_min_interval. |
| 62 | extern const int MIN_CHECK_RECEIVING_INTERVAL; |
| 63 | // The next two ping intervals are at the ICE transport level. |
| 64 | // |
| 65 | // STRONG_PING_INTERVAL is applied when the selected connection is both |
| 66 | // writable and receiving. |
| 67 | // |
| 68 | // Default value of IceConfig.ice_check_interval_strong_connectivity. |
| 69 | extern const int STRONG_PING_INTERVAL; |
| 70 | // WEAK_PING_INTERVAL is applied when the selected connection is either |
| 71 | // not writable or not receiving. |
| 72 | // |
| 73 | // Defaul value of IceConfig.ice_check_interval_weak_connectivity. |
| 74 | extern const int WEAK_PING_INTERVAL; |
| 75 | // The next two ping intervals are at the candidate pair level. |
| 76 | // |
| 77 | // Writable candidate pairs are pinged at a slower rate once they are stabilized |
| 78 | // and the channel is strongly connected. |
| 79 | extern const int STRONG_AND_STABLE_WRITABLE_CONNECTION_PING_INTERVAL; |
| 80 | // Writable candidate pairs are pinged at a faster rate while the connections |
| 81 | // are stabilizing or the channel is weak. |
| 82 | extern const int WEAK_OR_STABILIZING_WRITABLE_CONNECTION_PING_INTERVAL; |
| 83 | // Default value of IceConfig.backup_connection_ping_interval |
| 84 | extern const int BACKUP_CONNECTION_PING_INTERVAL; |
| 85 | // Defualt value of IceConfig.receiving_switching_delay. |
| 86 | extern const int RECEIVING_SWITCHING_DELAY; |
| 87 | // Default value of IceConfig.regather_on_failed_networks_interval. |
| 88 | extern const int REGATHER_ON_FAILED_NETWORKS_INTERVAL; |
| 89 | // Default vaule of IceConfig.ice_unwritable_timeout. |
| 90 | extern const int CONNECTION_WRITE_CONNECT_TIMEOUT; |
| 91 | // Default vaule of IceConfig.ice_unwritable_min_checks. |
| 92 | extern const uint32_t CONNECTION_WRITE_CONNECT_FAILURES; |
Jiawei Ou | 9d4fd555 | 2018-12-06 23:30:17 -0800 | [diff] [blame] | 93 | // Default value of IceConfig.ice_inactive_timeout; |
| 94 | extern const int CONNECTION_WRITE_TIMEOUT; |
Qingsi Wang | 866e08d | 2018-03-22 17:54:23 -0700 | [diff] [blame] | 95 | // Default value of IceConfig.stun_keepalive_interval; |
| 96 | extern const int STUN_KEEPALIVE_INTERVAL; |
| 97 | |
| 98 | // The following constants are used at the candidate pair level to determine the |
| 99 | // state of a candidate pair. |
| 100 | // |
| 101 | // The timeout duration when a connection does not receive anything. |
| 102 | extern const int WEAK_CONNECTION_RECEIVE_TIMEOUT; |
| 103 | // A connection will be declared dead if it has not received anything for this |
| 104 | // long. |
| 105 | extern const int DEAD_CONNECTION_RECEIVE_TIMEOUT; |
Qingsi Wang | 866e08d | 2018-03-22 17:54:23 -0700 | [diff] [blame] | 106 | // This is the length of time that we wait for a ping response to come back. |
| 107 | extern const int CONNECTION_RESPONSE_TIMEOUT; |
| 108 | // The minimum time we will wait before destroying a connection after creating |
| 109 | // it. |
| 110 | extern const int MIN_CONNECTION_LIFETIME; |
Mirko Bonadei | 5f4d47b | 2018-08-22 17:41:22 +0000 | [diff] [blame] | 111 | |
henrike@webrtc.org | 269fb4b | 2014-10-28 22:20:11 +0000 | [diff] [blame] | 112 | } // namespace cricket |
| 113 | |
Steve Anton | 10542f2 | 2019-01-11 09:11:00 -0800 | [diff] [blame] | 114 | #endif // P2P_BASE_P2P_CONSTANTS_H_ |