Skip to content

Commit 1aef43f

Browse files
committed
Commit for rtnetlink consts
1 parent caf17a0 commit 1aef43f

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

src/unix/notbsd/linux/mod.rs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,6 +1024,36 @@ pub const IFF_LOWER_UP: ::c_int = 0x10000;
10241024
pub const IFF_DORMANT: ::c_int = 0x20000;
10251025
pub const IFF_ECHO: ::c_int = 0x40000;
10261026

1027+
// linux/if_addr.h
1028+
pub const IFA_UNSPEC: ::c_ushort = 0;
1029+
pub const IFA_ADDRESS: ::c_ushort = 1;
1030+
pub const IFA_LOCAL: ::c_ushort = 2;
1031+
pub const IFA_LABEL: ::c_ushort = 3;
1032+
pub const IFA_BROADCAST: ::c_ushort = 4;
1033+
pub const IFA_ANYCAST: ::c_ushort = 5;
1034+
pub const IFA_CACHEINFO: ::c_ushort = 6;
1035+
pub const IFA_MULTICAST: ::c_ushort = 7;
1036+
1037+
pub const IFA_F_SECONDARY: u32 = 0x01;
1038+
pub const IFA_F_TEMPORARY: u32 = 0x01;
1039+
pub const IFA_F_NODAD: u32 = 0x02;
1040+
pub const IFA_F_OPTIMISTIC: u32 = 0x04;
1041+
pub const IFA_F_DADFAILED: u32 = 0x08;
1042+
pub const IFA_F_HOMEADDRESS: u32 = 0x10;
1043+
pub const IFA_F_DEPRECATED: u32 = 0x20;
1044+
pub const IFA_F_TENTATIVE: u32 = 0x40;
1045+
pub const IFA_F_PERMANENT: u32 = 0x80;
1046+
1047+
// linux/if_link.h
1048+
pub const IFLA_UNSPEC: ::c_ushort = 0;
1049+
pub const IFLA_ADDRESS: ::c_ushort = 1;
1050+
pub const IFLA_BROADCAST: ::c_ushort = 2;
1051+
pub const IFLA_IFNAME: ::c_ushort = 3;
1052+
pub const IFLA_MTU: ::c_ushort = 4;
1053+
pub const IFLA_LINK: ::c_ushort = 5;
1054+
pub const IFLA_QDISC: ::c_ushort = 6;
1055+
pub const IFLA_STATS: ::c_ushort = 7;
1056+
10271057
// linux/if_tun.h
10281058
pub const IFF_TUN: ::c_short = 0x0001;
10291059
pub const IFF_TAP: ::c_short = 0x0002;
@@ -1767,6 +1797,13 @@ pub const RT_CLASS_MAIN: u8 = 254;
17671797
pub const RT_CLASS_LOCAL: u8 = 255;
17681798
pub const RT_CLASS_MAX: u8 = 255;
17691799

1800+
pub const RTM_F_NOTIFY: ::c_uint = 0x100;
1801+
pub const RTM_F_CLONED: ::c_uint = 0x200;
1802+
pub const RTM_F_EQUALIZE: ::c_uint = 0x400;
1803+
pub const RTM_F_PREFIX: ::c_uint = 0x800;
1804+
pub const RTM_F_LOOKUP_TABLE: ::c_uint = 0x1000;
1805+
pub const RTM_F_FIB_MATCH: ::c_uint = 0x2000;
1806+
17701807
pub const RTMSG_OVERRUN: u32 = ::NLMSG_OVERRUN as u32;
17711808
pub const RTMSG_NEWDEVICE: u32 = 0x11;
17721809
pub const RTMSG_DELDEVICE: u32 = 0x12;

src/unix/notbsd/linux/other/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,14 @@ pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
601601
pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
602602
pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
603603

604+
// linux/if_addr.h
605+
pub const IFA_FLAGS: ::c_ushort = 8;
606+
607+
pub const IFA_F_MANAGETEMPADDR: u32 = 0x100;
608+
pub const IFA_F_NOPREFIXROUTE: u32 = 0x200;
609+
pub const IFA_F_MCAUTOJOIN: u32 = 0x400;
610+
pub const IFA_F_STABLE_PRIVACY: u32 = 0x800;
611+
604612
pub const NETLINK_ROUTE: ::c_int = 0;
605613
pub const NETLINK_UNUSED: ::c_int = 1;
606614
pub const NETLINK_USERSOCK: ::c_int = 2;

0 commit comments

Comments
 (0)