Skip to content

Add support for batching NfNetlink messages - #45

Merged
cathay4t merged 2 commits into
rust-netlink:mainfrom
Toorero:feature/nfnetlink_batch
Aug 13, 2026
Merged

Add support for batching NfNetlink messages#45
cathay4t merged 2 commits into
rust-netlink:mainfrom
Toorero:feature/nfnetlink_batch

Conversation

@Toorero

@Toorero Toorero commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

This MR should resolve #43.

It introduces a new ConnectionHandle::request_batch method that supports sending multiple messages per request (and datagram by extension).

Example Usage

mod_set_entry_proto.rs

@cathay4t cathay4t left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes to netlink-proto are forcing other rust-netlink crates to bump their API version and other external users might need to change their working code.

Can we somehow create new API instead changing API?

@Toorero

Toorero commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

Can you further elaborate on your concern?

  1. The changes are backwards compatible. So external crates don't need to change their working code. The public facing API is only extended by ConnectionHandle::request_batch.
  2. Why would other rust-netlink crates need to change their API version? Do they export ConnectionHandle::request_batch?

@cathay4t

Copy link
Copy Markdown
Member

Can you further elaborate on your concern?

1. The changes are backwards compatible. So external crates don't need to change their working code. The public facing API is only extended by `ConnectionHandle::request_batch`.

2. Why would other rust-netlink crates need to change their API version? Do they export `ConnectionHandle::request_batch`?

My bad. The mut changes is not API breaking. Approved now. Thanks for the contribution!

@cathay4t
cathay4t enabled auto-merge (rebase) August 13, 2026 01:05
auto-merge was automatically disabled August 13, 2026 01:12

Head branch was pushed to by a user without write access

@Toorero
Toorero force-pushed the feature/nfnetlink_batch branch from 081e631 to d420291 Compare August 13, 2026 01:12
@Toorero

Toorero commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

Pipeline (rustfmt, minimal supported Rust version) fixed.

@cathay4t
cathay4t enabled auto-merge (rebase) August 13, 2026 01:24
@cathay4t
cathay4t merged commit 90d8797 into rust-netlink:main Aug 13, 2026
4 checks passed
@Toorero
Toorero deleted the feature/nfnetlink_batch branch August 14, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support multiple messages in a single Netlink frame (batching)

2 participants