From 4c641e99fa1b32385b941cccccb566f5ddc9daed Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Tue, 23 Jun 2015 13:13:20 +0200 Subject: sd-netlink: respect attribute type flags Though currently unused by us, netlink attribute types support embedding flags to indicate if the type is encoded in network byte-order and if it is a nested attribute. Read out these flags when parsing the message. We will now swap the byteorder in case it is non-native when reading out integers (though this is not needed by any of the types we currently support). We do not enforce the NESTED flag, as the kernel gets this wrong in many cases. --- src/libsystemd/sd-netlink/netlink-internal.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libsystemd/sd-netlink/netlink-internal.h') diff --git a/src/libsystemd/sd-netlink/netlink-internal.h b/src/libsystemd/sd-netlink/netlink-internal.h index b8a3668bfc..4aa7583d03 100644 --- a/src/libsystemd/sd-netlink/netlink-internal.h +++ b/src/libsystemd/sd-netlink/netlink-internal.h @@ -94,6 +94,8 @@ struct sd_netlink { struct netlink_attribute { size_t offset; /* offset from hdr to attirubte */ + bool nested:1; + bool net_byteorder:1; }; struct netlink_container { -- cgit v1.2.3-54-g00ecf