Skip to content

Commit 81c79c5

Browse files
committed
Add RTA_ const values
1 parent 1aef43f commit 81c79c5

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

src/unix/notbsd/linux/mod.rs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1797,13 +1797,42 @@ pub const RT_CLASS_MAIN: u8 = 254;
17971797
pub const RT_CLASS_LOCAL: u8 = 255;
17981798
pub const RT_CLASS_MAX: u8 = 255;
17991799

1800+
// linux/rtnetlink.h
18001801
pub const RTM_F_NOTIFY: ::c_uint = 0x100;
18011802
pub const RTM_F_CLONED: ::c_uint = 0x200;
18021803
pub const RTM_F_EQUALIZE: ::c_uint = 0x400;
18031804
pub const RTM_F_PREFIX: ::c_uint = 0x800;
18041805
pub const RTM_F_LOOKUP_TABLE: ::c_uint = 0x1000;
18051806
pub const RTM_F_FIB_MATCH: ::c_uint = 0x2000;
18061807

1808+
pub const RTA_UNSPEC: ::c_ushort = 0;
1809+
pub const RTA_DST: ::c_ushort = 1;
1810+
pub const RTA_SRC: ::c_ushort = 2;
1811+
pub const RTA_IIF: ::c_ushort = 3;
1812+
pub const RTA_OIF: ::c_ushort = 4;
1813+
pub const RTA_GATEWAY: ::c_ushort = 5;
1814+
pub const RTA_PRIORITY: ::c_ushort = 6;
1815+
pub const RTA_PREFSRC: ::c_ushort = 7;
1816+
pub const RTA_METRICS: ::c_ushort = 8;
1817+
pub const RTA_MULTIPATH: ::c_ushort = 9;
1818+
pub const RTA_PROTOINFO: ::c_ushort = 10; // No longer used
1819+
pub const RTA_FLOW: ::c_ushort = 11;
1820+
pub const RTA_CACHEINFO: ::c_ushort = 12;
1821+
pub const RTA_SESSION: ::c_ushort = 13; // No longer used
1822+
pub const RTA_MP_ALGO: ::c_ushort = 14; // No longer used
1823+
pub const RTA_TABLE: ::c_ushort = 15;
1824+
pub const RTA_MARK: ::c_ushort = 16;
1825+
pub const RTA_MFC_STATS: ::c_ushort = 17;
1826+
pub const RTA_VIA: ::c_ushort = 18;
1827+
pub const RTA_NEWDST: ::c_ushort = 19;
1828+
pub const RTA_PREF: ::c_ushort = 20;
1829+
pub const RTA_ENCAP_TYPE: ::c_ushort = 21;
1830+
pub const RTA_ENCAP: ::c_ushort = 22;
1831+
pub const RTA_EXPIRES: ::c_ushort = 23;
1832+
pub const RTA_PAD: ::c_ushort = 24;
1833+
pub const RTA_UID: ::c_ushort = 25;
1834+
pub const RTA_TTL_PROPAGATE: ::c_ushort = 26;
1835+
18071836
pub const RTMSG_OVERRUN: u32 = ::NLMSG_OVERRUN as u32;
18081837
pub const RTMSG_NEWDEVICE: u32 = 0x11;
18091838
pub const RTMSG_DELDEVICE: u32 = 0x12;

0 commit comments

Comments
 (0)