Skip to content

Commit 4f4e81a

Browse files
committed
Auto merge of #1409 - jbaublitz:nl-const-rtm-pr, r=gnzlbg
Add RTM_* constants to linux/mod.rs for rtnetlink There is one last set of constants I'm looking to get added to libc for rtnetlink support in my netlink library. I'm going to follow this up with a release PR once this PR is merged.
2 parents 40c73a6 + 7705d07 commit 4f4e81a

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

src/unix/linux_like/linux/gnu/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,11 @@ pub const TCA_DUMP_INVISIBLE: ::c_ushort = 10;
564564
pub const TCA_CHAIN: ::c_ushort = 11;
565565
pub const TCA_HW_OFFLOAD: ::c_ushort = 12;
566566

567+
pub const RTM_DELNETCONF: u16 = 81;
568+
pub const RTM_NEWSTATS: u16 = 92;
569+
pub const RTM_GETSTATS: u16 = 94;
570+
pub const RTM_NEWCACHEREPORT: u16 = 96;
571+
567572
pub const RTM_F_LOOKUP_TABLE: ::c_uint = 0x1000;
568573
pub const RTM_F_FIB_MATCH: ::c_uint = 0x2000;
569574

src/unix/linux_like/linux/mod.rs

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1908,6 +1908,55 @@ pub const TCA_FCNT: ::c_ushort = 6;
19081908
pub const TCA_STATS2: ::c_ushort = 7;
19091909
pub const TCA_STAB: ::c_ushort = 8;
19101910

1911+
pub const RTM_NEWLINK: u16 = 16;
1912+
pub const RTM_DELLINK: u16 = 17;
1913+
pub const RTM_GETLINK: u16 = 18;
1914+
pub const RTM_SETLINK: u16 = 19;
1915+
pub const RTM_NEWADDR: u16 = 20;
1916+
pub const RTM_DELADDR: u16 = 21;
1917+
pub const RTM_GETADDR: u16 = 22;
1918+
pub const RTM_NEWROUTE: u16 = 24;
1919+
pub const RTM_DELROUTE: u16 = 25;
1920+
pub const RTM_GETROUTE: u16 = 26;
1921+
pub const RTM_NEWNEIGH: u16 = 28;
1922+
pub const RTM_DELNEIGH: u16 = 29;
1923+
pub const RTM_GETNEIGH: u16 = 30;
1924+
pub const RTM_NEWRULE: u16 = 32;
1925+
pub const RTM_DELRULE: u16 = 33;
1926+
pub const RTM_GETRULE: u16 = 34;
1927+
pub const RTM_NEWQDISC: u16 = 36;
1928+
pub const RTM_DELQDISC: u16 = 37;
1929+
pub const RTM_GETQDISC: u16 = 38;
1930+
pub const RTM_NEWTCLASS: u16 = 40;
1931+
pub const RTM_DELTCLASS: u16 = 41;
1932+
pub const RTM_GETTCLASS: u16 = 42;
1933+
pub const RTM_NEWTFILTER: u16 = 44;
1934+
pub const RTM_DELTFILTER: u16 = 45;
1935+
pub const RTM_GETTFILTER: u16 = 46;
1936+
pub const RTM_NEWACTION: u16 = 48;
1937+
pub const RTM_DELACTION: u16 = 49;
1938+
pub const RTM_GETACTION: u16 = 50;
1939+
pub const RTM_NEWPREFIX: u16 = 52;
1940+
pub const RTM_GETMULTICAST: u16 = 58;
1941+
pub const RTM_GETANYCAST: u16 = 62;
1942+
pub const RTM_NEWNEIGHTBL: u16 = 64;
1943+
pub const RTM_GETNEIGHTBL: u16 = 66;
1944+
pub const RTM_SETNEIGHTBL: u16 = 67;
1945+
pub const RTM_NEWNDUSEROPT: u16 = 68;
1946+
pub const RTM_NEWADDRLABEL: u16 = 72;
1947+
pub const RTM_DELADDRLABEL: u16 = 73;
1948+
pub const RTM_GETADDRLABEL: u16 = 74;
1949+
pub const RTM_GETDCB: u16 = 78;
1950+
pub const RTM_SETDCB: u16 = 79;
1951+
pub const RTM_NEWNETCONF: u16 = 80;
1952+
pub const RTM_GETNETCONF: u16 = 82;
1953+
pub const RTM_NEWMDB: u16 = 84;
1954+
pub const RTM_DELMDB: u16 = 85;
1955+
pub const RTM_GETMDB: u16 = 86;
1956+
pub const RTM_NEWNSID: u16 = 88;
1957+
pub const RTM_DELNSID: u16 = 89;
1958+
pub const RTM_GETNSID: u16 = 90;
1959+
19111960
pub const RTM_F_NOTIFY: ::c_uint = 0x100;
19121961
pub const RTM_F_CLONED: ::c_uint = 0x200;
19131962
pub const RTM_F_EQUALIZE: ::c_uint = 0x400;

0 commit comments

Comments
 (0)