@@ -1024,6 +1024,36 @@ pub const IFF_LOWER_UP: ::c_int = 0x10000;
1024
1024
pub const IFF_DORMANT : :: c_int = 0x20000 ;
1025
1025
pub const IFF_ECHO : :: c_int = 0x40000 ;
1026
1026
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
+
1027
1057
// linux/if_tun.h
1028
1058
pub const IFF_TUN : :: c_short = 0x0001 ;
1029
1059
pub const IFF_TAP : :: c_short = 0x0002 ;
@@ -1767,6 +1797,89 @@ pub const RT_CLASS_MAIN: u8 = 254;
1767
1797
pub const RT_CLASS_LOCAL : u8 = 255 ;
1768
1798
pub const RT_CLASS_MAX : u8 = 255 ;
1769
1799
1800
+ // linux/neighbor.h
1801
+ pub const NUD_NONE : u16 = 0x00 ;
1802
+ pub const NUD_INCOMPLETE : u16 = 0x01 ;
1803
+ pub const NUD_REACHABLE : u16 = 0x02 ;
1804
+ pub const NUD_STALE : u16 = 0x04 ;
1805
+ pub const NUD_DELAY : u16 = 0x08 ;
1806
+ pub const NUD_PROBE : u16 = 0x10 ;
1807
+ pub const NUD_FAILED : u16 = 0x20 ;
1808
+ pub const NUD_NOARP : u16 = 0x40 ;
1809
+ pub const NUD_PERMANENT : u16 = 0x80 ;
1810
+
1811
+ pub const NTF_USE : u8 = 0x01 ;
1812
+ pub const NTF_SELF : u8 = 0x02 ;
1813
+ pub const NTF_MASTER : u8 = 0x04 ;
1814
+ pub const NTF_PROXY : u8 = 0x08 ;
1815
+ pub const NTF_ROUTER : u8 = 0x80 ;
1816
+
1817
+ pub const NDA_UNSPEC : :: c_ushort = 0 ;
1818
+ pub const NDA_DST : :: c_ushort = 1 ;
1819
+ pub const NDA_LLADDR : :: c_ushort = 2 ;
1820
+ pub const NDA_CACHEINFO : :: c_ushort = 3 ;
1821
+ pub const NDA_PROBES : :: c_ushort = 4 ;
1822
+ pub const NDA_VLAN : :: c_ushort = 5 ;
1823
+ pub const NDA_PORT : :: c_ushort = 6 ;
1824
+ pub const NDA_VNI : :: c_ushort = 7 ;
1825
+ pub const NDA_IFINDEX : :: c_ushort = 8 ;
1826
+
1827
+ // linux/rtnetlink.h
1828
+ pub const RTM_F_NOTIFY : :: c_uint = 0x100 ;
1829
+ pub const RTM_F_CLONED : :: c_uint = 0x200 ;
1830
+ pub const RTM_F_EQUALIZE : :: c_uint = 0x400 ;
1831
+ pub const RTM_F_PREFIX : :: c_uint = 0x800 ;
1832
+
1833
+ pub const RTA_UNSPEC : :: c_ushort = 0 ;
1834
+ pub const RTA_DST : :: c_ushort = 1 ;
1835
+ pub const RTA_SRC : :: c_ushort = 2 ;
1836
+ pub const RTA_IIF : :: c_ushort = 3 ;
1837
+ pub const RTA_OIF : :: c_ushort = 4 ;
1838
+ pub const RTA_GATEWAY : :: c_ushort = 5 ;
1839
+ pub const RTA_PRIORITY : :: c_ushort = 6 ;
1840
+ pub const RTA_PREFSRC : :: c_ushort = 7 ;
1841
+ pub const RTA_METRICS : :: c_ushort = 8 ;
1842
+ pub const RTA_MULTIPATH : :: c_ushort = 9 ;
1843
+ pub const RTA_PROTOINFO : :: c_ushort = 10 ; // No longer used
1844
+ pub const RTA_FLOW : :: c_ushort = 11 ;
1845
+ pub const RTA_CACHEINFO : :: c_ushort = 12 ;
1846
+ pub const RTA_SESSION : :: c_ushort = 13 ; // No longer used
1847
+ pub const RTA_MP_ALGO : :: c_ushort = 14 ; // No longer used
1848
+ pub const RTA_TABLE : :: c_ushort = 15 ;
1849
+ pub const RTA_MARK : :: c_ushort = 16 ;
1850
+ pub const RTA_MFC_STATS : :: c_ushort = 17 ;
1851
+
1852
+ pub const RTN_UNSPEC : :: c_uchar = 0 ;
1853
+ pub const RTN_UNICAST : :: c_uchar = 1 ;
1854
+ pub const RTN_LOCAL : :: c_uchar = 2 ;
1855
+ pub const RTN_BROADCAST : :: c_uchar = 3 ;
1856
+ pub const RTN_ANYCAST : :: c_uchar = 4 ;
1857
+ pub const RTN_MULTICAST : :: c_uchar = 5 ;
1858
+ pub const RTN_BLACKHOLE : :: c_uchar = 6 ;
1859
+ pub const RTN_UNREACHABLE : :: c_uchar = 7 ;
1860
+ pub const RTN_PROHIBIT : :: c_uchar = 8 ;
1861
+ pub const RTN_THROW : :: c_uchar = 9 ;
1862
+ pub const RTN_NAT : :: c_uchar = 10 ;
1863
+ pub const RTN_XRESOLVE : :: c_uchar = 11 ;
1864
+
1865
+ pub const RTPROT_UNSPEC : :: c_uchar = 0 ;
1866
+ pub const RTPROT_REDIRECT : :: c_uchar = 1 ;
1867
+ pub const RTPROT_KERNEL : :: c_uchar = 2 ;
1868
+ pub const RTPROT_BOOT : :: c_uchar = 3 ;
1869
+ pub const RTPROT_STATIC : :: c_uchar = 4 ;
1870
+
1871
+ pub const RT_SCOPE_UNIVERSE : :: c_uchar = 0 ;
1872
+ pub const RT_SCOPE_SITE : :: c_uchar = 200 ;
1873
+ pub const RT_SCOPE_LINK : :: c_uchar = 253 ;
1874
+ pub const RT_SCOPE_HOST : :: c_uchar = 254 ;
1875
+ pub const RT_SCOPE_NOWHERE : :: c_uchar = 255 ;
1876
+
1877
+ pub const RT_TABLE_UNSPEC : :: c_uchar = 0 ;
1878
+ pub const RT_TABLE_COMPAT : :: c_uchar = 252 ;
1879
+ pub const RT_TABLE_DEFAULT : :: c_uchar = 253 ;
1880
+ pub const RT_TABLE_MAIN : :: c_uchar = 254 ;
1881
+ pub const RT_TABLE_LOCAL : :: c_uchar = 255 ;
1882
+
1770
1883
pub const RTMSG_OVERRUN : u32 = :: NLMSG_OVERRUN as u32 ;
1771
1884
pub const RTMSG_NEWDEVICE : u32 = 0x11 ;
1772
1885
pub const RTMSG_DELDEVICE : u32 = 0x12 ;
0 commit comments