diff options
Diffstat (limited to 'rustables/src/batch.rs')
-rw-r--r-- | rustables/src/batch.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/rustables/src/batch.rs b/rustables/src/batch.rs index 2af1a7c..3cdd52b 100644 --- a/rustables/src/batch.rs +++ b/rustables/src/batch.rs @@ -10,6 +10,7 @@ use thiserror::Error; #[error("Error while communicating with netlink")] pub struct NetlinkError(()); +#[cfg(feature = "query")] /// Check if the kernel supports batched netlink messages to netfilter. pub fn batch_is_supported() -> std::result::Result<bool, NetlinkError> { match unsafe { sys::nftnl_batch_is_supported() } { @@ -22,9 +23,9 @@ pub fn batch_is_supported() -> std::result::Result<bool, NetlinkError> { /// A batch of netfilter messages to be performed in one atomic operation. Corresponds to /// `nftnl_batch` in libnftnl. pub struct Batch { - batch: *mut sys::nftnl_batch, - seq: u32, - is_empty: bool, + pub(crate) batch: *mut sys::nftnl_batch, + pub(crate) seq: u32, + pub(crate) is_empty: bool, } impl Batch { |