Tomáš Pecka | f10b930 | 2021-02-23 19:02:02 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2021 CESNET, https://photonics.cesnet.cz/ |
| 3 | * |
| 4 | * Written by Tomáš Pecka <tomas.pecka@cesnet.cz> |
| 5 | * |
| 6 | */ |
| 7 | #pragma once |
| 8 | |
| 9 | #include <sysrepo-cpp/Session.hpp> |
| 10 | #include "utils/log-fwd.h" |
| 11 | |
| 12 | struct rtnl_link; |
| 13 | |
| 14 | namespace velia::system { |
| 15 | |
| 16 | class Rtnetlink; |
| 17 | |
| 18 | class IETFInterfaces { |
| 19 | public: |
| 20 | explicit IETFInterfaces(std::shared_ptr<::sysrepo::Session> srSess); |
| 21 | |
| 22 | private: |
| 23 | void onLinkUpdate(rtnl_link* link, int action); |
| 24 | |
| 25 | std::shared_ptr<::sysrepo::Session> m_srSession; |
| 26 | velia::Log m_log; |
| 27 | std::shared_ptr<Rtnetlink> m_rtnetlink; // first to destroy, because the callback to rtnetlink uses m_srSession and m_log |
| 28 | }; |
| 29 | } |