chiark / gitweb /
sd-netlink: make NLType internal
authorDavid Herrmann <dh.herrmann@gmail.com>
Tue, 23 Jun 2015 09:03:10 +0000 (11:03 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:04:18 +0000 (10:04 +0100)
commitfb080b98edb9b1e106cd4b5315cb9d7ecaf20ad9
treea55b5b8323bbb6d3630f70040102b5a1a8a4ce63
parentbe00b784a382b68bc225cae8b2a6664882362a7e
sd-netlink: make NLType internal

If we extend NLType to support arrays and further extended types, we
really want to avoid hard-coding the type-layout outside of
netlink-types.c. We already avoid accessing nl_type->type_system outside
of netlink-types.c, extend this to also avoid accessing any other fields.

Provide accessor functions for nl_type->type and nl_type->size and then
move NLType away from the type-system header.

With this in place, follow-up patches can safely turn "type_system" and
"type_system_union" into a real "union { }", and then add another type for
arrays.
src/libsystemd/sd-netlink/netlink-message.c
src/libsystemd/sd-netlink/netlink-types.c
src/libsystemd/sd-netlink/netlink-types.h