diff options
| author | Jakub Kicinski <[email protected]> | 2025-04-29 15:46:56 +0000 |
|---|---|---|
| committer | Paolo Abeni <[email protected]> | 2025-05-02 10:41:02 +0000 |
| commit | fe7d57e040f7d189e3bd030f311bb2011a0cc35a (patch) | |
| tree | 27b55363409030a8df3aee9c77088ed8ebe60109 /tools/net/ynl/lib/ynl.c | |
| parent | tools: ynl-gen: fill in missing empty attr lists (diff) | |
| download | kernel-fe7d57e040f7d189e3bd030f311bb2011a0cc35a.tar.gz kernel-fe7d57e040f7d189e3bd030f311bb2011a0cc35a.zip | |
tools: ynl: let classic netlink requests specify extra nlflags
Classic netlink makes extensive use of flags. Support specifying
them the same way as attributes are specified (using a helper),
for example:
rt_link_newlink_req_set_nlflags(req, NLM_F_CREATE | NLM_F_ECHO);
Wrap the code up in a RenderInfo predicate. I think that some
genetlink families may want this, too. It should be easy to
add a spec property later.
Reviewed-by: Donald Hunter <[email protected]>
Reviewed-by: Jacob Keller <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'tools/net/ynl/lib/ynl.c')
| -rw-r--r-- | tools/net/ynl/lib/ynl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/net/ynl/lib/ynl.c b/tools/net/ynl/lib/ynl.c index 70f899a54007..c16f01372ca3 100644 --- a/tools/net/ynl/lib/ynl.c +++ b/tools/net/ynl/lib/ynl.c @@ -451,9 +451,9 @@ ynl_gemsg_start(struct ynl_sock *ys, __u32 id, __u16 flags, return nlh; } -struct nlmsghdr *ynl_msg_start_req(struct ynl_sock *ys, __u32 id) +struct nlmsghdr *ynl_msg_start_req(struct ynl_sock *ys, __u32 id, __u16 flags) { - return ynl_msg_start(ys, id, NLM_F_REQUEST | NLM_F_ACK); + return ynl_msg_start(ys, id, NLM_F_REQUEST | NLM_F_ACK | flags); } struct nlmsghdr *ynl_msg_start_dump(struct ynl_sock *ys, __u32 id) |
