xref: /aosp_15_r20/external/cronet/net/third_party/quiche/src/quiche/quic/qbone/bonnet/qbone_tunnel_info.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
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