transport_stats.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  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. #ifndef PC_TRANSPORT_STATS_H_
  11. #define PC_TRANSPORT_STATS_H_
  12. #include <string>
  13. #include <vector>
  14. #include "p2p/base/dtls_transport_internal.h"
  15. #include "p2p/base/ice_transport_internal.h"
  16. #include "p2p/base/port.h"
  17. #include "rtc_base/ssl_stream_adapter.h"
  18. namespace cricket {
  19. struct TransportChannelStats {
  20. TransportChannelStats();
  21. TransportChannelStats(const TransportChannelStats&);
  22. ~TransportChannelStats();
  23. int component = 0;
  24. int ssl_version_bytes = 0;
  25. int srtp_crypto_suite = rtc::SRTP_INVALID_CRYPTO_SUITE;
  26. int ssl_cipher_suite = rtc::TLS_NULL_WITH_NULL_NULL;
  27. DtlsTransportState dtls_state = DTLS_TRANSPORT_NEW;
  28. IceTransportStats ice_transport_stats;
  29. };
  30. // Information about all the channels of a transport.
  31. // TODO(hta): Consider if a simple vector is as good as a map.
  32. typedef std::vector<TransportChannelStats> TransportChannelStatsList;
  33. // Information about the stats of a transport.
  34. struct TransportStats {
  35. std::string transport_name;
  36. TransportChannelStatsList channel_stats;
  37. };
  38. } // namespace cricket
  39. #endif // PC_TRANSPORT_STATS_H_