diff options
author | Thomas Haller <thaller@redhat.com> | 2019-02-18 10:33:38 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-02-21 21:02:51 +0100 |
commit | cacd6fd0bec9afc66b2afba39d82d585a0d1ab51 (patch) | |
tree | 2f71572bed203d488ab696e1a0df2f944a85a824 | |
parent | 8c655e3dd14acd6773717d5a9d80ec19c6158172 (diff) | |
download | NetworkManager-cacd6fd0bec9afc66b2afba39d82d585a0d1ab51.tar.gz |
platform/netlink: add nla_get_be64() helper
-rw-r--r-- | src/platform/nm-netlink.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/platform/nm-netlink.h b/src/platform/nm-netlink.h index 840e56d8e4..d9ba93738e 100644 --- a/src/platform/nm-netlink.h +++ b/src/platform/nm-netlink.h @@ -211,6 +211,14 @@ nla_get_u64 (const struct nlattr *nla) return unaligned_read_ne64 (nla_data (nla)); } +static inline uint64_t +nla_get_be64 (const struct nlattr *nla) +{ + nm_assert (nla_len (nla) >= sizeof (uint64_t)); + + return unaligned_read_be64 (nla_data (nla)); +} + static inline char * nla_get_string (const struct nlattr *nla) { |