2 * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
4 * Contact: Mateusz Malicki <m.malicki2@samsung.com>
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License
21 * @author Mateusz Malicki (m.malicki2@samsung.com)
22 * @brief Netlink class declaration
25 #ifndef COMMON_NETLINK_NETLINK_HPP
26 #define COMMON_NETLINK_NETLINK_HPP
28 #include <linux/netlink.h>
33 * Netlink class is responsible for communicating
34 * with kernel through netlink interface
41 Netlink(const Netlink& other) = delete;
42 Netlink& operator=(const Netlink& other) = delete;
57 * It is not thread safe and even you shouldn't call this function on
58 * different instances at the same time
60 * @param nlmsg pointer to message
62 void send(const nlmsghdr *nlmsg);
67 * It is not thread safe and even you shouldn't call this function on
68 * different instances at the same time
70 * @param answer pointer to answer buffer
72 int rcv(nlmsghdr *answer);
79 #endif /* COMMON_NETLINK_NETLINK_HPP */