Skip to content

Commit c4b609a

Browse files
committed
Auto merge of #1360 - jbaublitz:nl_consts_pr-2, r=gnzlbg
Add final rtnetlink constants This is a follow up to the PR #1351 which is for issue #1059 as it was closed before I realized there's one last set of netlink constants needed for use with rtnetlink. I'm marking this as WIP until I've verified everything's good with CI and that I've included all necessary constants. I'll remove WIP once it's passing CI and it's ready for review.
2 parents 3c9376d + dfb119d commit c4b609a

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/unix/notbsd/linux/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1830,6 +1830,16 @@ pub const NDA_VNI: ::c_ushort = 7;
18301830
pub const NDA_IFINDEX: ::c_ushort = 8;
18311831

18321832
// linux/rtnetlink.h
1833+
pub const TCA_UNSPEC: ::c_ushort = 0;
1834+
pub const TCA_KIND: ::c_ushort = 1;
1835+
pub const TCA_OPTIONS: ::c_ushort = 2;
1836+
pub const TCA_STATS: ::c_ushort = 3;
1837+
pub const TCA_XSTATS: ::c_ushort = 4;
1838+
pub const TCA_RATE: ::c_ushort = 5;
1839+
pub const TCA_FCNT: ::c_ushort = 6;
1840+
pub const TCA_STATS2: ::c_ushort = 7;
1841+
pub const TCA_STAB: ::c_ushort = 8;
1842+
18331843
pub const RTM_F_NOTIFY: ::c_uint = 0x100;
18341844
pub const RTM_F_CLONED: ::c_uint = 0x200;
18351845
pub const RTM_F_EQUALIZE: ::c_uint = 0x400;

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,11 @@ pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
604604
pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
605605

606606
// linux/rtnetlink.h
607+
pub const TCA_PAD: ::c_ushort = 9;
608+
pub const TCA_DUMP_INVISIBLE: ::c_ushort = 10;
609+
pub const TCA_CHAIN: ::c_ushort = 11;
610+
pub const TCA_HW_OFFLOAD: ::c_ushort = 12;
611+
607612
pub const RTM_F_LOOKUP_TABLE: ::c_uint = 0x1000;
608613
pub const RTM_F_FIB_MATCH: ::c_uint = 0x2000;
609614

0 commit comments

Comments
 (0)