Skip to content

Commit 0d0a7a0

Browse files
committed
Add netlink protocol values to socket consts
Signed-off-by: Jana Radhakrishnan <mrjana@gmail.com>
1 parent 7c0570d commit 0d0a7a0

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/sys/socket/consts.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,30 @@ mod os {
109109

110110
// Ancillary message types
111111
pub const SCM_RIGHTS: c_int = 1;
112+
113+
// Netlink protocol types
114+
pub const NETLINK_ROUTE: c_int = 0;
115+
pub const NETLINK_UNUSED: c_int = 1;
116+
pub const NETLINK_USERSOCK: c_int = 2;
117+
pub const NETLINK_FIREWALL: c_int = 3;
118+
pub const NETLINK_SOCK_DIAG: c_int = 4;
119+
pub const NETLINK_NFLOG: c_int = 5;
120+
pub const NETLINK_XFRM: c_int = 6;
121+
pub const NETLINK_SELINUX: c_int = 7;
122+
pub const NETLINK_ISCSI: c_int = 8;
123+
pub const NETLINK_AUDIT: c_int = 9;
124+
pub const NETLINK_FIB_LOOKUP: c_int = 10;
125+
pub const NETLINK_CONNECTOR: c_int = 11;
126+
pub const NETLINK_NETFILTER: c_int = 12;
127+
pub const NETLINK_IP6_FW: c_int = 13;
128+
pub const NETLINK_DNRTMSG: c_int = 14;
129+
pub const NETLINK_KOBJECT_UEVENT: c_int = 15;
130+
pub const NETLINK_GENERIC: c_int = 16;
131+
pub const NETLINK_SCSITRANSPORT: c_int = 18;
132+
pub const NETLINK_ECRYPTFS: c_int = 19;
133+
pub const NETLINK_RDMA: c_int = 20;
134+
pub const NETLINK_CRYPTO: c_int = 21;
135+
pub const NETLINK_INET_DIAG: c_int = NETLINK_SOCK_DIAG;
112136
}
113137

114138
// Not all of these constants exist on freebsd

0 commit comments

Comments
 (0)