summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-netlink/netlink-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-netlink/netlink-internal.h')
-rw-r--r--src/libsystemd/sd-netlink/netlink-internal.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/libsystemd/sd-netlink/netlink-internal.h b/src/libsystemd/sd-netlink/netlink-internal.h
index 4aa7583d0..6b83764e5 100644
--- a/src/libsystemd/sd-netlink/netlink-internal.h
+++ b/src/libsystemd/sd-netlink/netlink-internal.h
@@ -72,6 +72,10 @@ struct sd_netlink {
unsigned rqueue_partial_size;
size_t rqueue_partial_allocated;
+ sd_netlink_message **wqueue;
+ unsigned wqueue_size;
+ size_t wqueue_allocated;
+
struct nlmsghdr *rbuffer;
size_t rbuffer_allocated;
@@ -94,8 +98,6 @@ struct sd_netlink {
struct netlink_attribute {
size_t offset; /* offset from hdr to attirubte */
- bool nested:1;
- bool net_byteorder:1;
};
struct netlink_container {
@@ -113,6 +115,7 @@ struct sd_netlink_message {
struct nlmsghdr *hdr;
struct netlink_container containers[RTNL_CONTAINER_DEPTH];
unsigned n_containers; /* number of containers */
+ size_t next_rta_offset; /* offset from hdr to next rta */
bool sealed:1;
bool broadcast:1;
@@ -120,17 +123,21 @@ struct sd_netlink_message {
};
int message_new(sd_netlink *rtnl, sd_netlink_message **ret, uint16_t type);
-int message_new_empty(sd_netlink *rtnl, sd_netlink_message **ret);
-int socket_open(int family);
-int socket_bind(sd_netlink *nl);
-int socket_join_broadcast_group(sd_netlink *nl, unsigned group);
int socket_write_message(sd_netlink *nl, sd_netlink_message *m);
int socket_read_message(sd_netlink *nl);
int rtnl_rqueue_make_room(sd_netlink *rtnl);
int rtnl_rqueue_partial_make_room(sd_netlink *rtnl);
+int rtnl_message_read_internal(sd_netlink_message *m, unsigned short type, void **data);
+int rtnl_message_parse(sd_netlink_message *m,
+ size_t **rta_offset_tb,
+ unsigned short *rta_tb_size,
+ int max,
+ struct rtattr *rta,
+ unsigned int rt_len);
+
/* Make sure callbacks don't destroy the rtnl connection */
#define RTNL_DONT_DESTROY(rtnl) \
_cleanup_netlink_unref_ _unused_ sd_netlink *_dont_destroy_##rtnl = sd_netlink_ref(rtnl)