summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-netlink/netlink-message.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-netlink/netlink-message.c')
-rw-r--r--src/libsystemd/sd-netlink/netlink-message.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/libsystemd/sd-netlink/netlink-message.c b/src/libsystemd/sd-netlink/netlink-message.c
index 87324fc2f7..601124cc05 100644
--- a/src/libsystemd/sd-netlink/netlink-message.c
+++ b/src/libsystemd/sd-netlink/netlink-message.c
@@ -236,7 +236,7 @@ int sd_netlink_message_append_string(sd_netlink_message *m, unsigned short type,
assert_return(!m->sealed, -EPERM);
assert_return(data, -EINVAL);
- r = message_attribute_has_type(m, type, NLA_STRING);
+ r = message_attribute_has_type(m, type, NETLINK_TYPE_STRING);
if (r < 0)
return r;
else
@@ -262,7 +262,7 @@ int sd_netlink_message_append_u8(sd_netlink_message *m, unsigned short type, uin
assert_return(m, -EINVAL);
assert_return(!m->sealed, -EPERM);
- r = message_attribute_has_type(m, type, NLA_U8);
+ r = message_attribute_has_type(m, type, NETLINK_TYPE_U8);
if (r < 0)
return r;
@@ -280,7 +280,7 @@ int sd_netlink_message_append_u16(sd_netlink_message *m, unsigned short type, ui
assert_return(m, -EINVAL);
assert_return(!m->sealed, -EPERM);
- r = message_attribute_has_type(m, type, NLA_U16);
+ r = message_attribute_has_type(m, type, NETLINK_TYPE_U16);
if (r < 0)
return r;
@@ -297,7 +297,7 @@ int sd_netlink_message_append_u32(sd_netlink_message *m, unsigned short type, ui
assert_return(m, -EINVAL);
assert_return(!m->sealed, -EPERM);
- r = message_attribute_has_type(m, type, NLA_U32);
+ r = message_attribute_has_type(m, type, NETLINK_TYPE_U32);
if (r < 0)
return r;
@@ -315,7 +315,7 @@ int sd_netlink_message_append_in_addr(sd_netlink_message *m, unsigned short type
assert_return(!m->sealed, -EPERM);
assert_return(data, -EINVAL);
- r = message_attribute_has_type(m, type, NLA_IN_ADDR);
+ r = message_attribute_has_type(m, type, NETLINK_TYPE_IN_ADDR);
if (r < 0)
return r;
@@ -333,7 +333,7 @@ int sd_netlink_message_append_in6_addr(sd_netlink_message *m, unsigned short typ
assert_return(!m->sealed, -EPERM);
assert_return(data, -EINVAL);
- r = message_attribute_has_type(m, type, NLA_IN_ADDR);
+ r = message_attribute_has_type(m, type, NETLINK_TYPE_IN_ADDR);
if (r < 0)
return r;
@@ -351,7 +351,7 @@ int sd_netlink_message_append_ether_addr(sd_netlink_message *m, unsigned short t
assert_return(!m->sealed, -EPERM);
assert_return(data, -EINVAL);
- r = message_attribute_has_type(m, type, NLA_ETHER_ADDR);
+ r = message_attribute_has_type(m, type, NETLINK_TYPE_ETHER_ADDR);
if (r < 0)
return r;
@@ -369,7 +369,7 @@ int sd_netlink_message_append_cache_info(sd_netlink_message *m, unsigned short t
assert_return(!m->sealed, -EPERM);
assert_return(info, -EINVAL);
- r = message_attribute_has_type(m, type, NLA_CACHE_INFO);
+ r = message_attribute_has_type(m, type, NETLINK_TYPE_CACHE_INFO);
if (r < 0)
return r;
@@ -388,12 +388,12 @@ int sd_netlink_message_open_container(sd_netlink_message *m, unsigned short type
assert_return(!m->sealed, -EPERM);
assert_return(m->n_containers < RTNL_CONTAINER_DEPTH, -ERANGE);
- r = message_attribute_has_type(m, type, NLA_NESTED);
+ r = message_attribute_has_type(m, type, NETLINK_TYPE_NESTED);
if (r < 0) {
const NLTypeSystemUnion *type_system_union;
int family;
- r = message_attribute_has_type(m, type, NLA_UNION);
+ r = message_attribute_has_type(m, type, NETLINK_TYPE_UNION);
if (r < 0)
return r;
size = (size_t) r;
@@ -499,7 +499,7 @@ int sd_netlink_message_read_string(sd_netlink_message *m, unsigned short type, c
assert_return(m, -EINVAL);
- r = message_attribute_has_type(m, type, NLA_STRING);
+ r = message_attribute_has_type(m, type, NETLINK_TYPE_STRING);
if (r < 0)
return r;
@@ -521,7 +521,7 @@ int sd_netlink_message_read_u8(sd_netlink_message *m, unsigned short type, uint8
assert_return(m, -EINVAL);
- r = message_attribute_has_type(m, type, NLA_U8);
+ r = message_attribute_has_type(m, type, NETLINK_TYPE_U8);
if (r < 0)
return r;
@@ -543,7 +543,7 @@ int sd_netlink_message_read_u16(sd_netlink_message *m, unsigned short type, uint
assert_return(m, -EINVAL);
- r = message_attribute_has_type(m, type, NLA_U16);
+ r = message_attribute_has_type(m, type, NETLINK_TYPE_U16);
if (r < 0)
return r;
@@ -565,7 +565,7 @@ int sd_netlink_message_read_u32(sd_netlink_message *m, unsigned short type, uint
assert_return(m, -EINVAL);
- r = message_attribute_has_type(m, type, NLA_U32);
+ r = message_attribute_has_type(m, type, NETLINK_TYPE_U32);
if (r < 0)
return r;
@@ -587,7 +587,7 @@ int sd_netlink_message_read_ether_addr(sd_netlink_message *m, unsigned short typ
assert_return(m, -EINVAL);
- r = message_attribute_has_type(m, type, NLA_ETHER_ADDR);
+ r = message_attribute_has_type(m, type, NETLINK_TYPE_ETHER_ADDR);
if (r < 0)
return r;
@@ -609,7 +609,7 @@ int sd_netlink_message_read_cache_info(sd_netlink_message *m, unsigned short typ
assert_return(m, -EINVAL);
- r = message_attribute_has_type(m, type, NLA_CACHE_INFO);
+ r = message_attribute_has_type(m, type, NETLINK_TYPE_CACHE_INFO);
if (r < 0)
return r;
@@ -631,7 +631,7 @@ int sd_netlink_message_read_in_addr(sd_netlink_message *m, unsigned short type,
assert_return(m, -EINVAL);
- r = message_attribute_has_type(m, type, NLA_IN_ADDR);
+ r = message_attribute_has_type(m, type, NETLINK_TYPE_IN_ADDR);
if (r < 0)
return r;
@@ -653,7 +653,7 @@ int sd_netlink_message_read_in6_addr(sd_netlink_message *m, unsigned short type,
assert_return(m, -EINVAL);
- r = message_attribute_has_type(m, type, NLA_IN_ADDR);
+ r = message_attribute_has_type(m, type, NETLINK_TYPE_IN_ADDR);
if (r < 0)
return r;
@@ -685,13 +685,13 @@ int sd_netlink_message_enter_container(sd_netlink_message *m, unsigned short typ
if (r < 0)
return r;
- if (nl_type->type == NLA_NESTED) {
+ if (nl_type->type == NETLINK_TYPE_NESTED) {
r = type_system_get_type_system(m->container_type_system[m->n_containers],
&type_system,
type);
if (r < 0)
return r;
- } else if (nl_type->type == NLA_UNION) {
+ } else if (nl_type->type == NETLINK_TYPE_UNION) {
const NLTypeSystemUnion *type_system_union;
r = type_system_get_type_system_union(m->container_type_system[m->n_containers],
@@ -871,7 +871,7 @@ int sd_netlink_message_rewind(sd_netlink_message *m) {
if (r < 0)
return r;
- if (type->type == NLA_NESTED) {
+ if (type->type == NETLINK_TYPE_NESTED) {
const NLTypeSystem *type_system = type->type_system;
assert(type_system);