@@ -496,6 +496,22 @@ s! {
496496 pub flag: * mut :: c_int,
497497 pub val: :: c_int,
498498 }
499+
500+ pub struct __c_anonymous_ifru_map {
501+ pub mem_start: :: c_ulong,
502+ pub mem_end: :: c_ulong,
503+ pub base_addr: :: c_ushort,
504+ pub irq: :: c_uchar,
505+ pub dma: :: c_uchar,
506+ pub port: :: c_uchar,
507+ }
508+
509+ pub struct in6_ifreq {
510+ pub ifr6_addr: :: in6_addr,
511+ pub ifr6_prefixlen: u32 ,
512+ pub ifr6_ifindex: :: c_int,
513+ }
514+
499515}
500516
501517s_no_extra_traits ! {
@@ -591,6 +607,50 @@ s_no_extra_traits! {
591607 __serial: :: c_uint,
592608 __value: [ [ :: c_char; 4 ] ; 23 ] ,
593609 }
610+
611+ #[ cfg( libc_union) ]
612+ pub union __c_anonymous_ifr_ifru {
613+ pub ifru_addr: :: sockaddr,
614+ pub ifru_dstaddr: :: sockaddr,
615+ pub ifru_broadaddr: :: sockaddr,
616+ pub ifru_netmask: :: sockaddr,
617+ pub ifru_hwaddr: :: sockaddr,
618+ pub ifru_flags: :: c_short,
619+ pub ifru_ifindex: :: c_int,
620+ pub ifru_metric: :: c_int,
621+ pub ifru_mtu: :: c_int,
622+ pub ifru_map: __c_anonymous_ifru_map,
623+ pub ifru_slave: [ :: c_char; :: IFNAMSIZ ] ,
624+ pub ifru_newname: [ :: c_char; :: IFNAMSIZ ] ,
625+ pub ifru_data: * mut :: c_char,
626+ }
627+
628+ pub struct ifreq {
629+ /// interface name, e.g. "en0"
630+ pub ifr_name: [ :: c_char; :: IFNAMSIZ ] ,
631+ #[ cfg( libc_union) ]
632+ pub ifr_ifru: __c_anonymous_ifr_ifru,
633+ #[ cfg( not( libc_union) ) ]
634+ pub ifr_ifru: :: sockaddr,
635+ }
636+
637+ #[ cfg( libc_union) ]
638+ pub union __c_anonymous_ifc_ifcu {
639+ pub ifcu_buf: * mut :: c_char,
640+ pub ifcu_req: * mut :: ifreq,
641+ }
642+
643+ /* Structure used in SIOCGIFCONF request. Used to retrieve interface
644+ configuration for machine (useful for programs which must know all
645+ networks accessible). */
646+ pub struct ifconf {
647+ pub ifc_len: :: c_int, /* Size of buffer. */
648+ #[ cfg( libc_union) ]
649+ pub ifc_ifcu: __c_anonymous_ifc_ifcu,
650+ #[ cfg( not( libc_union) ) ]
651+ pub ifc_ifcu: * mut :: ifreq,
652+ }
653+
594654}
595655
596656cfg_if ! {
@@ -938,6 +998,53 @@ cfg_if! {
938998 }
939999 }
9401000
1001+ #[ cfg( libc_union) ]
1002+ impl :: fmt:: Debug for __c_anonymous_ifr_ifru {
1003+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
1004+ f. debug_struct( "ifr_ifru" )
1005+ . field( "ifru_addr" , unsafe { & self . ifru_addr } )
1006+ . field( "ifru_dstaddr" , unsafe { & self . ifru_dstaddr } )
1007+ . field( "ifru_broadaddr" , unsafe { & self . ifru_broadaddr } )
1008+ . field( "ifru_netmask" , unsafe { & self . ifru_netmask } )
1009+ . field( "ifru_hwaddr" , unsafe { & self . ifru_hwaddr } )
1010+ . field( "ifru_flags" , unsafe { & self . ifru_flags } )
1011+ . field( "ifru_ifindex" , unsafe { & self . ifru_ifindex } )
1012+ . field( "ifru_metric" , unsafe { & self . ifru_metric } )
1013+ . field( "ifru_mtu" , unsafe { & self . ifru_mtu } )
1014+ . field( "ifru_map" , unsafe { & self . ifru_map } )
1015+ . field( "ifru_slave" , unsafe { & self . ifru_slave } )
1016+ . field( "ifru_newname" , unsafe { & self . ifru_newname } )
1017+ . field( "ifru_data" , unsafe { & self . ifru_data } )
1018+ . finish( )
1019+ }
1020+ }
1021+ impl :: fmt:: Debug for ifreq {
1022+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
1023+ f. debug_struct( "ifreq" )
1024+ . field( "ifr_name" , & self . ifr_name)
1025+ . field( "ifr_ifru" , & self . ifr_ifru)
1026+ . finish( )
1027+ }
1028+ }
1029+
1030+ #[ cfg( libc_union) ]
1031+ impl :: fmt:: Debug for __c_anonymous_ifc_ifcu {
1032+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
1033+ f. debug_struct( "ifr_ifru" )
1034+ . field( "ifcu_buf" , unsafe { & self . ifcu_buf } )
1035+ . field( "ifcu_req" , unsafe { & self . ifcu_req } )
1036+ . finish( )
1037+ }
1038+ }
1039+ impl :: fmt:: Debug for ifconf {
1040+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
1041+ f. debug_struct( "ifconf" )
1042+ . field( "ifc_len" , & self . ifc_len)
1043+ . field( "ifc_ifcu" , & self . ifc_ifcu)
1044+ . finish( )
1045+ }
1046+ }
1047+
9411048 #[ allow( deprecated) ]
9421049 impl af_alg_iv {
9431050 fn as_slice( & self ) -> & [ u8 ] {
@@ -2715,6 +2822,7 @@ pub const NFEA_DONT_REFRESH: ::c_ushort = 2;
27152822
27162823pub const SIOCADDRT : :: c_ulong = 0x0000890B ;
27172824pub const SIOCDELRT : :: c_ulong = 0x0000890C ;
2825+ pub const SIOCRTMSG : :: c_ulong = 0x0000890D ;
27182826pub const SIOCGIFNAME : :: c_ulong = 0x00008910 ;
27192827pub const SIOCSIFLINK : :: c_ulong = 0x00008911 ;
27202828pub const SIOCGIFCONF : :: c_ulong = 0x00008912 ;
@@ -2734,6 +2842,7 @@ pub const SIOCGIFMEM: ::c_ulong = 0x0000891F;
27342842pub const SIOCSIFMEM : :: c_ulong = 0x00008920 ;
27352843pub const SIOCGIFMTU : :: c_ulong = 0x00008921 ;
27362844pub const SIOCSIFMTU : :: c_ulong = 0x00008922 ;
2845+ pub const SIOCSIFNAME : :: c_ulong = 0x00008923 ;
27372846pub const SIOCSIFHWADDR : :: c_ulong = 0x00008924 ;
27382847pub const SIOCGIFENCAP : :: c_ulong = 0x00008925 ;
27392848pub const SIOCSIFENCAP : :: c_ulong = 0x00008926 ;
@@ -2742,6 +2851,24 @@ pub const SIOCGIFSLAVE: ::c_ulong = 0x00008929;
27422851pub const SIOCSIFSLAVE : :: c_ulong = 0x00008930 ;
27432852pub const SIOCADDMULTI : :: c_ulong = 0x00008931 ;
27442853pub const SIOCDELMULTI : :: c_ulong = 0x00008932 ;
2854+ pub const SIOCGIFINDEX : :: c_ulong = 0x00008933 ;
2855+ pub const SIOGIFINDEX : :: c_ulong = SIOCGIFINDEX ;
2856+ pub const SIOCSIFPFLAGS : :: c_ulong = 0x00008934 ;
2857+ pub const SIOCGIFPFLAGS : :: c_ulong = 0x00008935 ;
2858+ pub const SIOCDIFADDR : :: c_ulong = 0x00008936 ;
2859+ pub const SIOCSIFHWBROADCAST : :: c_ulong = 0x00008937 ;
2860+ pub const SIOCGIFCOUNT : :: c_ulong = 0x00008938 ;
2861+ pub const SIOCGIFBR : :: c_ulong = 0x00008940 ;
2862+ pub const SIOCSIFBR : :: c_ulong = 0x00008941 ;
2863+ pub const SIOCGIFTXQLEN : :: c_ulong = 0x00008942 ;
2864+ pub const SIOCSIFTXQLEN : :: c_ulong = 0x00008943 ;
2865+ pub const SIOCETHTOOL : :: c_ulong = 0x00008946 ;
2866+ pub const SIOCGMIIPHY : :: c_ulong = 0x00008947 ;
2867+ pub const SIOCGMIIREG : :: c_ulong = 0x00008948 ;
2868+ pub const SIOCSMIIREG : :: c_ulong = 0x00008949 ;
2869+ pub const SIOCWANDEV : :: c_ulong = 0x0000894A ;
2870+ pub const SIOCOUTQNSD : :: c_ulong = 0x0000894B ;
2871+ pub const SIOCGSKNS : :: c_ulong = 0x0000894C ;
27452872pub const SIOCDARP : :: c_ulong = 0x00008953 ;
27462873pub const SIOCGARP : :: c_ulong = 0x00008954 ;
27472874pub const SIOCSARP : :: c_ulong = 0x00008955 ;
@@ -2750,6 +2877,24 @@ pub const SIOCGRARP: ::c_ulong = 0x00008961;
27502877pub const SIOCSRARP : :: c_ulong = 0x00008962 ;
27512878pub const SIOCGIFMAP : :: c_ulong = 0x00008970 ;
27522879pub const SIOCSIFMAP : :: c_ulong = 0x00008971 ;
2880+ pub const SIOCADDDLCI : :: c_ulong = 0x00008980 ;
2881+ pub const SIOCDELDLCI : :: c_ulong = 0x00008981 ;
2882+ pub const SIOCGIFVLAN : :: c_ulong = 0x00008982 ;
2883+ pub const SIOCSIFVLAN : :: c_ulong = 0x00008983 ;
2884+ pub const SIOCBONDENSLAVE : :: c_ulong = 0x00008990 ;
2885+ pub const SIOCBONDRELEASE : :: c_ulong = 0x00008991 ;
2886+ pub const SIOCBONDSETHWADDR : :: c_ulong = 0x00008992 ;
2887+ pub const SIOCBONDSLAVEINFOQUERY : :: c_ulong = 0x00008993 ;
2888+ pub const SIOCBONDINFOQUERY : :: c_ulong = 0x00008994 ;
2889+ pub const SIOCBONDCHANGEACTIVE : :: c_ulong = 0x00008995 ;
2890+ pub const SIOCBRADDBR : :: c_ulong = 0x000089a0 ;
2891+ pub const SIOCBRDELBR : :: c_ulong = 0x000089a1 ;
2892+ pub const SIOCBRADDIF : :: c_ulong = 0x000089a2 ;
2893+ pub const SIOCBRDELIF : :: c_ulong = 0x000089a3 ;
2894+ pub const SIOCSHWTSTAMP : :: c_ulong = 0x000089b0 ;
2895+ pub const SIOCGHWTSTAMP : :: c_ulong = 0x000089b1 ;
2896+ pub const SIOCDEVPRIVATE : :: c_ulong = 0x000089F0 ;
2897+ pub const SIOCPROTOPRIVATE : :: c_ulong = 0x000089E0 ;
27532898
27542899// linux/module.h
27552900pub const MODULE_INIT_IGNORE_MODVERSIONS : :: c_uint = 0x0001 ;
0 commit comments