summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-rtnl/rtnl-internal.h
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-03-23 21:45:46 +0100
committerTom Gundersen <teg@jklm.no>2014-03-24 16:59:30 +0100
commit3dd215e056ee9ff23175eca66686ff9b7a566dbf (patch)
treeaf3b74f8d0dc50f4f537f5986996264f74ff6c7f /src/libsystemd/sd-rtnl/rtnl-internal.h
parent48791a98be997ed22e8c45a89d8d728a2151c074 (diff)
sd-rtnl: add sd_rtnl_message_enter_container()
Extend rta_offset_tb into a stack of offset tables, one for each parent of the current container, and make sd_rtnl_message_{enter,exit}_container() pop/push to this stack. Also make sd_rtnl_message_rewind() parse the top-level container, and use this when reading a message from the socket. This changes the API by dropping the now redundant sd_rtnl_message_read() method.
Diffstat (limited to 'src/libsystemd/sd-rtnl/rtnl-internal.h')
-rw-r--r--src/libsystemd/sd-rtnl/rtnl-internal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsystemd/sd-rtnl/rtnl-internal.h b/src/libsystemd/sd-rtnl/rtnl-internal.h
index f011dbeecb..21a270aecd 100644
--- a/src/libsystemd/sd-rtnl/rtnl-internal.h
+++ b/src/libsystemd/sd-rtnl/rtnl-internal.h
@@ -94,8 +94,8 @@ struct sd_rtnl_message {
size_t container_offsets[RTNL_CONTAINER_DEPTH]; /* offset from hdr to each container's start */
unsigned n_containers; /* number of containers */
size_t next_rta_offset; /* offset from hdr to next rta */
- size_t *rta_offset_tb;
- unsigned short rta_tb_size;
+ size_t *rta_offset_tb[RTNL_CONTAINER_DEPTH];
+ unsigned short rta_tb_size[RTNL_CONTAINER_DEPTH];
bool sealed:1;
};