blob: 905541821b1b1e0006b3afd4fb0db427d4e7851d [file] [log] [blame]
Tomáš Peckaf10b9302021-02-23 19:02:02 +01001/*
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
12struct rtnl_link;
13
14namespace velia::system {
15
16class Rtnetlink;
17
18class IETFInterfaces {
19public:
20 explicit IETFInterfaces(std::shared_ptr<::sysrepo::Session> srSess);
21
22private:
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}