]> git.proxmox.com Git - mirror_iproute2.git/blame - devlink/mnlg.h
devlink: Support get port function state
[mirror_iproute2.git] / devlink / mnlg.h
CommitLineData
a3c4b484
JP
1/*
2 * mnlg.h Generic Netlink helpers for libmnl
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *
9 * Authors: Jiri Pirko <jiri@mellanox.com>
10 */
11
12#ifndef _MNLG_H_
13#define _MNLG_H_
14
15#include <libmnl/libmnl.h>
16
17struct mnlg_socket;
18
19struct nlmsghdr *mnlg_msg_prepare(struct mnlg_socket *nlg, uint8_t cmd,
20 uint16_t flags);
21int mnlg_socket_send(struct mnlg_socket *nlg, const struct nlmsghdr *nlh);
22int mnlg_socket_recv_run(struct mnlg_socket *nlg, mnl_cb_t data_cb, void *data);
23int mnlg_socket_group_add(struct mnlg_socket *nlg, const char *group_name);
24struct mnlg_socket *mnlg_socket_open(const char *family_name, uint8_t version);
25void mnlg_socket_close(struct mnlg_socket *nlg);
9b13cddf 26int mnlg_socket_get_fd(struct mnlg_socket *nlg);
a3c4b484
JP
27
28#endif /* _MNLG_H_ */