blob: 7cb95f4ad210e7cdc96cc0277399b0643f0a2c30 [file] [log] [blame]
Zhi Huange818b6e2018-02-22 15:26:27 -08001/*
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 09:11:00 -080011#ifndef PC_TRANSPORT_STATS_H_
12#define PC_TRANSPORT_STATS_H_
Zhi Huange818b6e2018-02-22 15:26:27 -080013
14#include <string>
15#include <vector>
16
Steve Anton10542f22019-01-11 09:11:00 -080017#include "p2p/base/dtls_transport_internal.h"
Jonas Oreland149dc722019-08-28 08:10:27 +020018#include "p2p/base/ice_transport_internal.h"
Zhi Huange818b6e2018-02-22 15:26:27 -080019#include "p2p/base/port.h"
Steve Anton10542f22019-01-11 09:11:00 -080020#include "rtc_base/ssl_stream_adapter.h"
Zhi Huange818b6e2018-02-22 15:26:27 -080021
22namespace cricket {
23
24struct TransportChannelStats {
25 TransportChannelStats();
26 TransportChannelStats(const TransportChannelStats&);
27 ~TransportChannelStats();
28
29 int component = 0;
Harald Alvestrand5cb78072019-10-28 09:51:17 +010030 int ssl_version_bytes = 0;
Zhi Huange818b6e2018-02-22 15:26:27 -080031 int srtp_crypto_suite = rtc::SRTP_INVALID_CRYPTO_SUITE;
32 int ssl_cipher_suite = rtc::TLS_NULL_WITH_NULL_NULL;
33 DtlsTransportState dtls_state = DTLS_TRANSPORT_NEW;
Jonas Oreland149dc722019-08-28 08:10:27 +020034 IceTransportStats ice_transport_stats;
Zhi Huange818b6e2018-02-22 15:26:27 -080035};
36
37// Information about all the channels of a transport.
38// TODO(hta): Consider if a simple vector is as good as a map.
39typedef std::vector<TransportChannelStats> TransportChannelStatsList;
40
41// Information about the stats of a transport.
42struct TransportStats {
Zhi Huange818b6e2018-02-22 15:26:27 -080043 std::string transport_name;
44 TransportChannelStatsList channel_stats;
45};
46
47} // namespace cricket
48
Steve Anton10542f22019-01-11 09:11:00 -080049#endif // PC_TRANSPORT_STATS_H_