Skip to content

Conversation

@shivkr6
Copy link
Contributor

@shivkr6 shivkr6 commented Nov 24, 2025

DEPENDS ON: #14

Implemented the New/IPCTNL_MSG_CT_NEW conntrack message type.

Added a test for adding new TCP/IPv4 conntrack entries.

Implemented the following attributes required to successfully construct a conntrack get request:
* iptuple
* protoinfo
* protoinfotcp
* prototuple
* tcp_flags
* tuple

Signed-off-by: Shivang K Raghuvanshi <[email protected]>
This refactors the crate to use type-safe enums for netfilter subsystems and message types, for a safer and more idiomatic API.

- Introduces a `Subsystem` enum to replace raw `u8` identifiers for `NfLog` and `Conntrack` subsystems.

- Introduces `ULogMessageType` and `ConntrackMessageType` enums to provide type safety for messages within each subsystem.

- Makes the top-level `NetfilterMessage::message_type()` function private to guide users towards the safer pattern of matching on `NetfilterMessageInner`.

- Updates the internal parsing logic in `buffer.rs` to use the new `Subsystem` enum.

Signed-off-by: Shivang K Raghuvanshi <[email protected]>
Add examples/dump_conntrack.rs to demonstrate how to dump connection tracking entries using the NLM_F_DUMP flag.

Signed-off-by: Shivang K Raghuvanshi <[email protected]>
Implemented the `Delete`/`IPCTNL_MSG_CT_DELETE` conntrack message type and the following attributes, which are required to describe a conntrack entry for deletion:

* mark
* status
* timeout
* tuple_reply

Added tests for deleting TCP/IPv4 and UDP/IPv6 conntrack entries.

Added ProtoFamily, an enum that represents a protocol family in the Netfilter header.

The bitflags dependency was also bumped to v2.10.0.

Signed-off-by: Shivang K Raghuvanshi <[email protected]>
Implemented the `New`/`IPCTNL_MSG_CT_NEW` conntrack message type.

Added a test for adding new TCP/IPv4 conntrack entries.

Signed-off-by: Shivang K Raghuvanshi <[email protected]>
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.

1 participant