Skip to content

Commit 183be1b

Browse files
authored
Add NFLOG and generic netlink families (#2092)
* Add NFLOG and generic netlink families * Add netlink sock protocol changes to CHANGELOG
1 parent a0613ba commit 183be1b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1313
(#[1662](https://github.com/nix-rust/nix/pull/1662))
1414
- Added `CanRaw` to `SockProtocol` and `CanBcm` as a separate `SocProtocol` constant.
1515
([#1912](https://github.com/nix-rust/nix/pull/1912))
16+
- Added `Generic` and `NFLOG` to `SockProtocol`.
17+
([#2092](https://github.com/nix-rust/nix/pull/2092))
1618
- Added `mq_timedreceive` to `::nix::mqueue`.
1719
([#1966])(https://github.com/nix-rust/nix/pull/1966)
1820
- Added `LocalPeerPid` to `nix::sys::socket::sockopt` for macOS. ([#1967](https://github.com/nix-rust/nix/pull/1967))

src/sys/socket/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@ pub enum SockProtocol {
158158
#[cfg(any(target_os = "android", target_os = "linux"))]
159159
#[cfg_attr(docsrs, doc(cfg(all())))]
160160
NetlinkSockDiag = libc::NETLINK_SOCK_DIAG,
161+
/// Netfilter/iptables ULOG.
162+
/// ([ref](https://www.man7.org/linux/man-pages/man7/netlink.7.html))
163+
#[cfg(any(target_os = "android", target_os = "linux"))]
164+
#[cfg_attr(docsrs, doc(cfg(all())))]
165+
NetlinkNFLOG = libc::NETLINK_NFLOG,
161166
/// SELinux event notifications.
162167
/// ([ref](https://www.man7.org/linux/man-pages/man7/netlink.7.html))
163168
#[cfg(any(target_os = "android", target_os = "linux"))]
@@ -208,6 +213,11 @@ pub enum SockProtocol {
208213
#[cfg(any(target_os = "android", target_os = "linux"))]
209214
#[cfg_attr(docsrs, doc(cfg(all())))]
210215
NetlinkKObjectUEvent = libc::NETLINK_KOBJECT_UEVENT,
216+
/// Generic netlink family for simplified netlink usage.
217+
/// ([ref](https://www.man7.org/linux/man-pages/man7/netlink.7.html))
218+
#[cfg(any(target_os = "android", target_os = "linux"))]
219+
#[cfg_attr(docsrs, doc(cfg(all())))]
220+
NetlinkGeneric = libc::NETLINK_GENERIC,
211221
/// Netlink interface to request information about ciphers registered with the kernel crypto API as well as allow
212222
/// configuration of the kernel crypto API.
213223
/// ([ref](https://www.man7.org/linux/man-pages/man7/netlink.7.html))

0 commit comments

Comments
 (0)