blob: e5543859540cc61a14e2e69a044ccc69533c551b [file] [log] [blame]
Zhi Huange818b6e2018-02-22 23:26:271/*
2 * Copyright 2018 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 Anton10542f22019-01-11 17:11:0011#ifndef PC_TRANSPORT_STATS_H_
12#define PC_TRANSPORT_STATS_H_
Zhi Huange818b6e2018-02-22 23:26:2713
14#include <string>
15#include <vector>
16
Mirko Bonadei9f6808b2021-05-21 18:46:0917#include "api/dtls_transport_interface.h"
Steve Anton10542f22019-01-11 17:11:0018#include "p2p/base/dtls_transport_internal.h"
Jonas Oreland149dc722019-08-28 06:10:2719#include "p2p/base/ice_transport_internal.h"
Zhi Huange818b6e2018-02-22 23:26:2720#include "p2p/base/port.h"
Steve Anton10542f22019-01-11 17:11:0021#include "rtc_base/ssl_stream_adapter.h"
Zhi Huange818b6e2018-02-22 23:26:2722
23namespace cricket {
24
25struct TransportChannelStats {
26 TransportChannelStats();
27 TransportChannelStats(const TransportChannelStats&);
28 ~TransportChannelStats();
29
30 int component = 0;
Harald Alvestrand5cb78072019-10-28 08:51:1731 int ssl_version_bytes = 0;
Mirko Bonadei7750d802021-07-26 15:27:4232 int srtp_crypto_suite = rtc::kSrtpInvalidCryptoSuite;
33 int ssl_cipher_suite = rtc::kTlsNullWithNullNull;
Philipp Hancke69c1df22022-04-22 13:46:2434 absl::optional<rtc::SSLRole> dtls_role;
Mirko Bonadei9f6808b2021-05-21 18:46:0935 webrtc::DtlsTransportState dtls_state = webrtc::DtlsTransportState::kNew;
Jonas Oreland149dc722019-08-28 06:10:2736 IceTransportStats ice_transport_stats;
Zhi Huange818b6e2018-02-22 23:26:2737};
38
39// Information about all the channels of a transport.
40// TODO(hta): Consider if a simple vector is as good as a map.
41typedef std::vector<TransportChannelStats> TransportChannelStatsList;
42
43// Information about the stats of a transport.
44struct TransportStats {
Zhi Huange818b6e2018-02-22 23:26:2745 std::string transport_name;
46 TransportChannelStatsList channel_stats;
47};
48
49} // namespace cricket
50
Steve Anton10542f22019-01-11 17:11:0051#endif // PC_TRANSPORT_STATS_H_