sd-netlink: move definitions of RTA_TYPE() and RTA_FLAGS() to netlink-util.h

This commit is contained in:
Yu Watanabe
2024-01-03 04:21:28 +09:00
parent e40a67809b
commit 8f8b39c86b
3 changed files with 3 additions and 5 deletions
@@ -17,9 +17,6 @@
#define GET_CONTAINER(m, i) ((struct rtattr*)((uint8_t*)(m)->hdr + (m)->containers[i].offset))
#define RTA_TYPE(rta) ((rta)->rta_type & NLA_TYPE_MASK)
#define RTA_FLAGS(rta) ((rta)->rta_type & ~NLA_TYPE_MASK)
int message_new_empty(sd_netlink *nl, sd_netlink_message **ret) {
sd_netlink_message *m;
+3
View File
@@ -10,6 +10,9 @@
#include "ordered-set.h"
#include "socket-util.h"
#define RTA_FLAGS(rta) ((rta)->rta_type & ~NLA_TYPE_MASK)
#define RTA_TYPE(rta) ((rta)->rta_type & NLA_TYPE_MASK)
/* See struct rtvia in rtnetlink.h */
typedef struct RouteVia {
uint16_t family;
-2
View File
@@ -267,8 +267,6 @@ int bridge_vlan_set_message(Link *link, sd_netlink_message *m, bool is_set) {
return 0;
}
#define RTA_TYPE(rta) ((rta)->rta_type & NLA_TYPE_MASK)
int link_update_bridge_vlan(Link *link, sd_netlink_message *m) {
_cleanup_free_ void *data = NULL;
size_t len;