]> git.proxmox.com Git - mirror_iproute2.git/commit
lib: Extract from devlink/mnlg a helper, mnlu_msg_prepare()
authorPetr Machata <me@pmachata.org>
Thu, 12 Nov 2020 22:24:42 +0000 (23:24 +0100)
committerDavid Ahern <dsahern@gmail.com>
Sat, 14 Nov 2020 02:43:15 +0000 (19:43 -0700)
commitdd78dfc7be696b3d9066b5dd58e9dafaa1f2a195
treec84b645fabe7b7c67e891afd4e0b41aac7cfcf5d
parent72858c7b77d0fc2b6bd6d0afe115e31ce53d6a1b
lib: Extract from devlink/mnlg a helper, mnlu_msg_prepare()

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>
devlink/mnlg.c
include/mnl_utils.h
lib/mnl_utils.c