mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-10-05 07:43:30 +00:00

Allocation of a new netlink message with the two usual headers is reusable with other netlink netlink message types. Extract it into a helper, mnlu_msg_prepare(). Take the second header as an argument, instead of passing in parameters to initialize it, and copy it in. Signed-off-by: Petr Machata <me@pmachata.org> Signed-off-by: David Ahern <dsahern@gmail.com>
10 lines
301 B
C
10 lines
301 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);
|
|
|
|
#endif /* __MNL_UTILS_H__ */
|