diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2010-12-04 19:52:55 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2010-12-17 12:38:42 +0100 |
commit | 494f4855ae7e9a53442a2ece42f11e28247f4f06 (patch) | |
tree | fcd999c645206d538f6b5877c7dbee5bd04e12ee /include/libmnl | |
parent | fb4edf5aff5f19543836d5467029c164b3620efb (diff) | |
download | libmnl-494f4855ae7e9a53442a2ece42f11e28247f4f06.tar.gz libmnl-494f4855ae7e9a53442a2ece42f11e28247f4f06.zip |
nlmsg: add new message batching infrastructure
This patch adds the new message batching infrastructure that allows to
store several messages into one single datagram.
This patch includes an example for ctnetlink.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/libmnl')
-rw-r--r-- | include/libmnl/libmnl.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/libmnl/libmnl.h b/include/libmnl/libmnl.h index 1232e1a..78fd0c4 100644 --- a/include/libmnl/libmnl.h +++ b/include/libmnl/libmnl.h @@ -68,6 +68,17 @@ extern void *mnl_nlmsg_get_payload_tail(const struct nlmsghdr *nlh); /* Netlink message printer */ extern void mnl_nlmsg_fprintf(FILE *fd, const void *data, size_t datalen, size_t extra_header_size); +/* Message batch helpers */ +struct mnl_nlmsg_batch; +extern struct mnl_nlmsg_batch *mnl_nlmsg_batch_start(void *buf, size_t bufsiz); +extern bool mnl_nlmsg_batch_next(struct mnl_nlmsg_batch *b); +extern void mnl_nlmsg_batch_stop(struct mnl_nlmsg_batch *b); +extern size_t mnl_nlmsg_batch_size(struct mnl_nlmsg_batch *b); +extern void mnl_nlmsg_batch_reset(struct mnl_nlmsg_batch *b); +extern void *mnl_nlmsg_batch_head(struct mnl_nlmsg_batch *b); +extern void *mnl_nlmsg_batch_current(struct mnl_nlmsg_batch *b); +extern bool mnl_nlmsg_batch_is_empty(struct mnl_nlmsg_batch *b); + /* * Netlink attributes API */ |