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