summaryrefslogtreecommitdiff
path: root/src/systemd/sd-rtnl.h
diff options
context:
space:
mode:
authorSusant Sahani <susant@redhat.com>2014-03-05 20:43:25 +0530
committerTom Gundersen <teg@jklm.no>2014-03-06 19:30:09 +0100
commit44caa5e7dfa2160f7d644d003de2718fd3ca2ee6 (patch)
treeab15cf6cb67b356b2871cccae7b5b5fbcb27737d /src/systemd/sd-rtnl.h
parent6d26dfe11c853d612b84abe858520bbcb62c2e96 (diff)
sd-rtnl:introduce table-based lookup and typesafe read() functions
This patch introduces new netlink attribute parsing logic which is table based lookup and sd_rtnl_message_read_* methods for reading attributes. By doing this user does not have to loop for the attribute values . Only providing the attribute type it gets the attribute values which is optimized and sd_rtnl_message_read_* methods are simplified.
Diffstat (limited to 'src/systemd/sd-rtnl.h')
-rw-r--r--src/systemd/sd-rtnl.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/systemd/sd-rtnl.h b/src/systemd/sd-rtnl.h
index d56c14e58..886a66ec7 100644
--- a/src/systemd/sd-rtnl.h
+++ b/src/systemd/sd-rtnl.h
@@ -103,6 +103,10 @@ int sd_rtnl_message_open_container(sd_rtnl_message *m, unsigned short type);
int sd_rtnl_message_close_container(sd_rtnl_message *m);
int sd_rtnl_message_read(sd_rtnl_message *m, unsigned short *type, void **data);
+int sd_rtnl_message_read_string(sd_rtnl_message *m, unsigned short type, char **data);
+int sd_rtnl_message_read_u8(sd_rtnl_message *m, unsigned short type, uint8_t *data);
+int sd_rtnl_message_read_u16(sd_rtnl_message *m, unsigned short type, uint16_t *data);
+int sd_rtnl_message_read_u32(sd_rtnl_message *m, unsigned short type, uint32_t *data);
int sd_rtnl_message_exit_container(sd_rtnl_message *m);
int sd_rtnl_message_rewind(sd_rtnl_message *m);