@@ -341,38 +341,6 @@ s! {
341341 pub int_n_sign_posn: c_char,
342342 }
343343
344- pub struct if_data {
345- pub ifi_type: c_uchar,
346- pub ifi_addrlen: c_uchar,
347- pub ifi_hdrlen: c_uchar,
348- pub ifi_link_state: c_int,
349- pub ifi_mtu: u64 ,
350- pub ifi_metric: u64 ,
351- pub ifi_baudrate: u64 ,
352- pub ifi_ipackets: u64 ,
353- pub ifi_ierrors: u64 ,
354- pub ifi_opackets: u64 ,
355- pub ifi_oerrors: u64 ,
356- pub ifi_collisions: u64 ,
357- pub ifi_ibytes: u64 ,
358- pub ifi_obytes: u64 ,
359- pub ifi_imcasts: u64 ,
360- pub ifi_omcasts: u64 ,
361- pub ifi_iqdrops: u64 ,
362- pub ifi_noproto: u64 ,
363- pub ifi_lastchange: crate :: timespec,
364- }
365-
366- pub struct if_msghdr {
367- pub ifm_msglen: c_ushort,
368- pub ifm_version: c_uchar,
369- pub ifm_type: c_uchar,
370- pub ifm_addrs: c_int,
371- pub ifm_flags: c_int,
372- pub ifm_index: c_ushort,
373- pub ifm_data: if_data,
374- }
375-
376344 pub struct sockcred {
377345 pub sc_pid: crate :: pid_t,
378346 pub sc_uid: crate :: uid_t,
@@ -684,15 +652,6 @@ s! {
684652 pub descr_str: [ c_char; 1 ] ,
685653 }
686654
687- pub struct ifreq {
688- pub _priv: [ [ c_char; 6 ] ; 24 ] ,
689- }
690-
691- pub struct ifconf {
692- pub ifc_len: c_int,
693- pub ifc_ifcu: __c_anonymous_ifc_ifcu,
694- }
695-
696655 pub struct tcp_info {
697656 pub tcpi_state: u8 ,
698657 pub __tcpi_ca_state: u8 ,
@@ -796,11 +755,6 @@ s_no_extra_traits! {
796755 pub open: __c_anonymous_posix_spawn_fae_open,
797756 pub dup2: __c_anonymous_posix_spawn_fae_dup2,
798757 }
799-
800- pub union __c_anonymous_ifc_ifcu {
801- pub ifcu_buf: * mut c_void,
802- pub ifcu_req: * mut ifreq,
803- }
804758}
805759
806760cfg_if ! {
@@ -819,21 +773,6 @@ cfg_if! {
819773 }
820774 }
821775 }
822-
823- impl Eq for __c_anonymous_ifc_ifcu { }
824- impl PartialEq for __c_anonymous_ifc_ifcu {
825- fn eq( & self , other: & __c_anonymous_ifc_ifcu) -> bool {
826- unsafe { self . ifcu_buf == other. ifcu_buf || self . ifcu_req == other. ifcu_req }
827- }
828- }
829- impl hash:: Hash for __c_anonymous_ifc_ifcu {
830- fn hash<H : hash:: Hasher >( & self , state: & mut H ) {
831- unsafe {
832- self . ifcu_buf. hash( state) ;
833- self . ifcu_req. hash( state) ;
834- }
835- }
836- }
837776 }
838777}
839778
@@ -999,21 +938,6 @@ pub const LOCAL_PEEREID: c_int = 0x0003; // get peer identification
999938pub const LOCAL_CREDS : c_int = 0x0004 ; // pass credentials to receiver
1000939
1001940// https://github.com/NetBSD/src/blob/trunk/sys/net/if.h#L373
1002- pub const IFF_UP : c_int = 0x0001 ; // interface is up
1003- pub const IFF_BROADCAST : c_int = 0x0002 ; // broadcast address valid
1004- pub const IFF_DEBUG : c_int = 0x0004 ; // turn on debugging
1005- pub const IFF_LOOPBACK : c_int = 0x0008 ; // is a loopback net
1006- pub const IFF_POINTOPOINT : c_int = 0x0010 ; // interface is point-to-point link
1007- pub const IFF_RUNNING : c_int = 0x0040 ; // resources allocated
1008- pub const IFF_NOARP : c_int = 0x0080 ; // no address resolution protocol
1009- pub const IFF_PROMISC : c_int = 0x0100 ; // receive all packets
1010- pub const IFF_ALLMULTI : c_int = 0x0200 ; // receive all multicast packets
1011- pub const IFF_OACTIVE : c_int = 0x0400 ; // transmission in progress
1012- pub const IFF_SIMPLEX : c_int = 0x0800 ; // can't hear own transmissions
1013- pub const IFF_LINK0 : c_int = 0x1000 ; // per link layer defined bit
1014- pub const IFF_LINK1 : c_int = 0x2000 ; // per link layer defined bit
1015- pub const IFF_LINK2 : c_int = 0x4000 ; // per link layer defined bit
1016- pub const IFF_MULTICAST : c_int = 0x8000 ; // supports multicast
1017941
1018942// sys/netinet/in.h
1019943// Protocols (RFC 1700)
0 commit comments