mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-10-04 16:06:38 +00:00

Receiving a message in libmnl is a somewhat involved operation. Devlink's mnlg library has an implementation that is going to be handy for other tools as well. Extract it into a new helper. Signed-off-by: Petr Machata <me@pmachata.org> Signed-off-by: David Ahern <dsahern@gmail.com>
12 lines
425 B
C
12 lines
425 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __MNL_UTILS_H__
|
|
#define __MNL_UTILS_H__ 1
|
|
|
|
struct mnl_socket *mnlu_socket_open(int bus);
|
|
struct nlmsghdr *mnlu_msg_prepare(void *buf, uint32_t nlmsg_type, uint16_t flags,
|
|
void *extra_header, size_t extra_header_size);
|
|
int mnlu_socket_recv_run(struct mnl_socket *nl, unsigned int seq, void *buf, size_t buf_size,
|
|
mnl_cb_t cb, void *data);
|
|
|
|
#endif /* __MNL_UTILS_H__ */
|