1 // Copyright (c) 2020 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef QUICHE_QUIC_QBONE_BONNET_QBONE_TUNNEL_INFO_H_ 6 #define QUICHE_QUIC_QBONE_BONNET_QBONE_TUNNEL_INFO_H_ 7 8 #include "quiche/quic/platform/api/quic_ip_address.h" 9 #include "quiche/quic/qbone/platform/netlink_interface.h" 10 11 namespace quic { 12 13 class QboneTunnelInfo { 14 public: QboneTunnelInfo(std::string ifname,NetlinkInterface * netlink)15 QboneTunnelInfo(std::string ifname, NetlinkInterface* netlink) 16 : ifname_(std::move(ifname)), netlink_(netlink) {} 17 18 // Returns the current QBONE tunnel address. Callers must use IsInitialized() 19 // to ensure the returned address is valid. 20 QuicIpAddress GetAddress(); 21 22 private: 23 const std::string ifname_; 24 NetlinkInterface* netlink_; 25 }; 26 27 } // namespace quic 28 29 #endif // QUICHE_QUIC_QBONE_BONNET_QBONE_TUNNEL_INFO_H_ 30