@@ -1361,6 +1361,14 @@ s_no_extra_traits! {
1361
1361
pub sdl_data: [ :: c_char; 46 ] ,
1362
1362
}
1363
1363
1364
+ pub struct sockaddr_nl {
1365
+ pub nl_len: :: c_uchar,
1366
+ pub nl_family: :: sa_family_t,
1367
+ nl_pad: :: c_ushort,
1368
+ pub nl_pid: u32 ,
1369
+ pub nl_groups: u32
1370
+ }
1371
+
1364
1372
pub struct mq_attr {
1365
1373
pub mq_flags: :: c_long,
1366
1374
pub mq_maxmsg: :: c_long,
@@ -1774,6 +1782,34 @@ cfg_if! {
1774
1782
}
1775
1783
}
1776
1784
1785
+ impl PartialEq for sockaddr_nl {
1786
+ fn eq( & self , other: & sockaddr_nl) -> bool {
1787
+ self . nl_len == other. nl_len &&
1788
+ self . nl_family == other. nl_family &&
1789
+ self . nl_pid == other. nl_pid &&
1790
+ self . nl_groups == other. nl_groups
1791
+ }
1792
+ }
1793
+ impl Eq for sockaddr_nl { }
1794
+ impl :: fmt:: Debug for sockaddr_nl {
1795
+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
1796
+ f. debug_struct( "sockaddr_nl" )
1797
+ . field( "nl_len" , & self . nl_len)
1798
+ . field( "nl_family" , & self . nl_family)
1799
+ . field( "nl_pid" , & self . nl_pid)
1800
+ . field( "nl_groups" , & self . nl_groups)
1801
+ . finish( )
1802
+ }
1803
+ }
1804
+ impl :: hash:: Hash for sockaddr_nl {
1805
+ fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
1806
+ self . nl_len. hash( state) ;
1807
+ self . nl_family. hash( state) ;
1808
+ self . nl_pid. hash( state) ;
1809
+ self . nl_groups. hash( state) ;
1810
+ }
1811
+ }
1812
+
1777
1813
impl PartialEq for mq_attr {
1778
1814
fn eq( & self , other: & mq_attr) -> bool {
1779
1815
self . mq_flags == other. mq_flags &&
@@ -3027,6 +3063,42 @@ pub const SO_TS_MONOTONIC: ::c_int = 3;
3027
3063
pub const SO_TS_DEFAULT : :: c_int = SO_TS_REALTIME_MICRO ;
3028
3064
pub const SO_TS_CLOCK_MAX : :: c_int = SO_TS_MONOTONIC ;
3029
3065
3066
+ /// netlink constants
3067
+ pub const SOL_NETLINK : :: c_int = 270 ;
3068
+ pub const NETLINK_ADD_MEMBERSHIP : :: c_int = 1 ;
3069
+ pub const NETLINK_DROP_MEMBERSHIP : :: c_int = 2 ;
3070
+ pub const NETLINK_PKTINFO : :: c_int = 3 ;
3071
+ pub const NETLINK_BROADCAST_ERROR : :: c_int = 4 ;
3072
+ pub const NETLINK_NO_ENOBUFS : :: c_int = 5 ;
3073
+ pub const NETLINK_RX_RING : :: c_int = 6 ;
3074
+ pub const NETLINK_TX_RING : :: c_int = 7 ;
3075
+ pub const NETLINK_LISTEN_ALL_NSID : :: c_int = 8 ;
3076
+ pub const NETLINK_LIST_MEMBERSHIPS : :: c_int = 9 ;
3077
+ pub const NETLINK_CAP_ACK : :: c_int = 10 ;
3078
+ pub const NETLINK_EXT_ACK : :: c_int = 11 ;
3079
+ pub const NETLINK_GET_STRICT_CHK : :: c_int = 12 ;
3080
+
3081
+ pub const AF_NETLINK : :: c_int = 38 ;
3082
+ pub const PF_NETLINK : :: c_int = AF_NETLINK ;
3083
+
3084
+ pub const NETLINK_ROUTE : :: c_int = 0 ;
3085
+ pub const NETLINK_UNUSED : :: c_int = 1 ;
3086
+ pub const NETLINK_USERSOCK : :: c_int = 2 ;
3087
+ pub const NETLINK_FIREWALL : :: c_int = 3 ;
3088
+ pub const NETLINK_SOCK_DIAG : :: c_int = 4 ;
3089
+ pub const NETLINK_NFLOG : :: c_int = 5 ;
3090
+ pub const NETLINK_XFRM : :: c_int = 6 ;
3091
+ pub const NETLINK_SELINUX : :: c_int = 7 ;
3092
+ pub const NETLINK_ISCSI : :: c_int = 8 ;
3093
+ pub const NETLINK_AUDIT : :: c_int = 9 ;
3094
+ pub const NETLINK_FIB_LOOKUP : :: c_int = 10 ;
3095
+ pub const NETLINK_CONNECTOR : :: c_int = 11 ;
3096
+ pub const NETLINK_NETFILTER : :: c_int = 12 ;
3097
+ pub const NETLINK_IP6_FW : :: c_int = 13 ;
3098
+ pub const NETLINK_DNRTMSG : :: c_int = 14 ;
3099
+ pub const NETLINK_KOBJECT_UEVENT : :: c_int = 15 ;
3100
+ pub const NETLINK_GENERIC : :: c_int = 16 ;
3101
+
3030
3102
pub const LOCAL_CREDS : :: c_int = 2 ;
3031
3103
pub const LOCAL_CREDS_PERSISTENT : :: c_int = 3 ;
3032
3104
pub const LOCAL_CONNWAIT : :: c_int = 4 ;
0 commit comments