From: Mira Limbeck <m.limbeck@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v3 conntrack-tool 4/4] add additional bindings
Date: Tue, 16 Feb 2021 17:56:42 +0100 [thread overview]
Message-ID: <20210216165642.16600-4-m.limbeck@proxmox.com> (raw)
In-Reply-To: <20210216165642.16600-1-m.limbeck@proxmox.com>
Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
---
v3:
- unchanged
v2:
- new addition, can be ignored as it only adds batch and print function
bindings which are not used in the code currently
src/mnl.rs | 31 +++++++++++++++++++++++++++++--
1 file changed, 29 insertions(+), 2 deletions(-)
diff --git a/src/mnl.rs b/src/mnl.rs
index 737f59a..fa2b5fb 100644
--- a/src/mnl.rs
+++ b/src/mnl.rs
@@ -66,6 +66,12 @@ extern "C" {
size: libc::size_t,
) -> *mut libc::c_void;
pub fn mnl_nlmsg_get_payload(nlh: *const libc::nlmsghdr) -> *mut libc::c_void;
+ pub fn mnl_nlmsg_fprintf(
+ fd: *mut libc::FILE,
+ data: *const libc::c_void,
+ datalen: libc::size_t,
+ extra_header_size: libc::size_t,
+ );
pub fn mnl_cb_run(
buf: *const libc::c_void,
@@ -76,6 +82,17 @@ extern "C" {
data: *mut libc::c_void,
) -> libc::c_int;
+ pub fn mnl_cb_run2(
+ buf: *const libc::c_void,
+ numbytes: libc::size_t,
+ seq: libc::c_uint,
+ portid: libc::c_uint,
+ cb_data: Option<mnl_cb_t>,
+ data: *const libc::c_void,
+ cb_ctl_array: *const *const mnl_cb_t,
+ cb_ctl_array_len: libc::c_uint,
+ ) -> libc::c_int;
+
pub fn mnl_attr_parse(
nlh: *const libc::nlmsghdr,
offset: libc::c_uint,
@@ -85,16 +102,26 @@ extern "C" {
pub fn mnl_attr_get_type(attr: *const libc::nlattr) -> u16;
pub fn mnl_attr_type_valid(attr: *const libc::nlattr, maxtype: u16) -> libc::c_int;
- pub fn mnl_nlmsg_batch_start(buf: *mut libc::c_void, limit: libc::size_t) -> *mut mnl_nlmsg_batch;
+ pub fn mnl_nlmsg_batch_start(
+ buf: *mut libc::c_void,
+ limit: libc::size_t,
+ ) -> *mut mnl_nlmsg_batch;
pub fn mnl_nlmsg_batch_stop(b: *mut mnl_nlmsg_batch);
pub fn mnl_nlmsg_batch_next(b: *mut mnl_nlmsg_batch) -> bool;
pub fn mnl_nlmsg_batch_current(b: *mut mnl_nlmsg_batch) -> *mut libc::c_void;
pub fn mnl_nlmsg_batch_head(b: *mut mnl_nlmsg_batch) -> *mut libc::c_void;
pub fn mnl_nlmsg_batch_size(b: *mut mnl_nlmsg_batch) -> libc::size_t;
+ pub fn mnl_nlmsg_batch_reset(b: *mut mnl_nlmsg_batch);
+ pub fn mnl_nlmsg_batch_is_empty(b: *mut mnl_nlmsg_batch) -> bool;
+
+ pub fn mnl_nlmsg_ok(nlh: *const libc::nlmsghdr, len: libc::c_int) -> bool;
+ pub fn mnl_nlmsg_next(nlh: *const libc::nlmsghdr, len: *mut libc::c_int)
+ -> *mut libc::nlmsghdr;
}
#[allow(non_camel_case_types)]
-pub type mnl_cb_t = extern "C" fn(nlh: *const libc::nlmsghdr, data: *mut libc::c_void) -> libc::c_int;
+pub type mnl_cb_t =
+ extern "C" fn(nlh: *const libc::nlmsghdr, data: *mut libc::c_void) -> libc::c_int;
#[allow(non_camel_case_types)]
pub type mnl_attr_cb_t =
extern "C" fn(attr: *const libc::nlattr, data: *mut libc::c_void) -> libc::c_int;
--
2.20.1
next prev parent reply other threads:[~2021-02-16 16:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-16 16:56 [pve-devel] [PATCH v3 conntrack-tool 1/4] initial commit Mira Limbeck
2021-02-16 16:56 ` [pve-devel] [PATCH v3 conntrack-tool 2/4] add packaging support Mira Limbeck
2021-02-16 16:56 ` [pve-devel] [PATCH v3 conntrack-tool 3/4] add expectation support Mira Limbeck
2021-02-16 16:56 ` Mira Limbeck [this message]
2021-04-06 10:19 ` [pve-devel] [PATCH v3 conntrack-tool 1/4] initial commit Dominic Jäger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210216165642.16600-4-m.limbeck@proxmox.com \
--to=m.limbeck@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox