@@ -1381,6 +1381,15 @@ s_no_extra_traits! {
1381
1381
pub struct os_unfair_lock_s {
1382
1382
_os_unfair_lock_opaque: u32 ,
1383
1383
}
1384
+
1385
+ #[ cfg_attr( libc_packedN, repr( packed( 1 ) ) ) ]
1386
+ pub struct sockaddr_vm {
1387
+ pub svm_len: :: c_uchar,
1388
+ pub svm_family: :: sa_family_t,
1389
+ pub svm_reserved1: :: c_ushort,
1390
+ pub svm_port: :: c_uint,
1391
+ pub svm_cid: :: c_uint,
1392
+ }
1384
1393
}
1385
1394
1386
1395
impl siginfo_t {
@@ -2683,6 +2692,52 @@ cfg_if! {
2683
2692
self . _os_unfair_lock_opaque. hash( state) ;
2684
2693
}
2685
2694
}
2695
+
2696
+ impl PartialEq for sockaddr_vm {
2697
+ fn eq( & self , other: & sockaddr_vm) -> bool {
2698
+ self . svm_len == other. svm_len
2699
+ && self . svm_family == other. svm_family
2700
+ && self . svm_reserved1 == other. svm_reserved1
2701
+ && self . svm_port == other. svm_port
2702
+ && self . svm_cid == other. svm_cid
2703
+ }
2704
+ }
2705
+
2706
+ impl Eq for sockaddr_vm { }
2707
+
2708
+ impl :: fmt:: Debug for sockaddr_vm {
2709
+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
2710
+ let svm_len = self . svm_len;
2711
+ let svm_family = self . svm_family;
2712
+ let svm_reserved1 = self . svm_reserved1;
2713
+ let svm_port = self . svm_port;
2714
+ let svm_cid = self . svm_cid;
2715
+
2716
+ f. debug_struct( "sockaddr_vm" )
2717
+ . field( "svm_len" , & svm_len)
2718
+ . field( "svm_family" , & svm_family)
2719
+ . field( "svm_reserved1" , & svm_reserved1)
2720
+ . field( "svm_port" , & svm_port)
2721
+ . field( "svm_cid" , & svm_cid)
2722
+ . finish( )
2723
+ }
2724
+ }
2725
+
2726
+ impl :: hash:: Hash for sockaddr_vm {
2727
+ fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
2728
+ let svm_len = self . svm_len;
2729
+ let svm_family = self . svm_family;
2730
+ let svm_reserved1 = self . svm_reserved1;
2731
+ let svm_port = self . svm_port;
2732
+ let svm_cid = self . svm_cid;
2733
+
2734
+ svm_len. hash( state) ;
2735
+ svm_family. hash( state) ;
2736
+ svm_reserved1. hash( state) ;
2737
+ svm_port. hash( state) ;
2738
+ svm_cid. hash( state) ;
2739
+ }
2740
+ }
2686
2741
}
2687
2742
}
2688
2743
@@ -3644,6 +3699,9 @@ pub const AF_SYSTEM: ::c_int = 32;
3644
3699
pub const AF_NETBIOS : :: c_int = 33 ;
3645
3700
pub const AF_PPP : :: c_int = 34 ;
3646
3701
pub const pseudo_AF_HDRCMPLT: :: c_int = 35 ;
3702
+ pub const AF_IEEE80211 : :: c_int = 37 ;
3703
+ pub const AF_UTUN : :: c_int = 38 ;
3704
+ pub const AF_VSOCK : :: c_int = 40 ;
3647
3705
pub const AF_SYS_CONTROL : :: c_int = 2 ;
3648
3706
3649
3707
pub const SYSPROTO_EVENT : :: c_int = 1 ;
@@ -3685,6 +3743,7 @@ pub const PF_NATM: ::c_int = AF_NATM;
3685
3743
pub const PF_SYSTEM : :: c_int = AF_SYSTEM ;
3686
3744
pub const PF_NETBIOS : :: c_int = AF_NETBIOS ;
3687
3745
pub const PF_PPP : :: c_int = AF_PPP ;
3746
+ pub const PF_VSOCK : :: c_int = AF_VSOCK ;
3688
3747
3689
3748
pub const NET_RT_DUMP : :: c_int = 1 ;
3690
3749
pub const NET_RT_FLAGS : :: c_int = 2 ;
@@ -5002,6 +5061,13 @@ pub const SSTOP: u32 = 4;
5002
5061
/// Awaiting collection by parent.
5003
5062
pub const SZOMB : u32 = 5 ;
5004
5063
5064
+ // sys/vsock.h
5065
+ pub const VMADDR_CID_ANY : :: c_uint = 0xFFFFFFFF ;
5066
+ pub const VMADDR_CID_HYPERVISOR : :: c_uint = 0 ;
5067
+ pub const VMADDR_CID_RESERVED : :: c_uint = 1 ;
5068
+ pub const VMADDR_CID_HOST : :: c_uint = 2 ;
5069
+ pub const VMADDR_PORT_ANY : :: c_uint = 0xFFFFFFFF ;
5070
+
5005
5071
cfg_if ! {
5006
5072
if #[ cfg( libc_const_extern_fn) ] {
5007
5073
const fn __DARWIN_ALIGN32( p: usize ) -> usize {
0 commit comments