@@ -496,6 +496,15 @@ s! {
496
496
pub flag: * mut :: c_int,
497
497
pub val: :: c_int,
498
498
}
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
+ }
499
508
}
500
509
501
510
s_no_extra_traits ! {
@@ -591,6 +600,50 @@ s_no_extra_traits! {
591
600
__serial: :: c_uint,
592
601
__value: [ [ :: c_char; 4 ] ; 23 ] ,
593
602
}
603
+
604
+ #[ cfg( libc_union) ]
605
+ pub union __c_anonymous_ifr_ifru {
606
+ pub ifru_addr: :: sockaddr,
607
+ pub ifru_dstaddr: :: sockaddr,
608
+ pub ifru_broadaddr: :: sockaddr,
609
+ pub ifru_netmask: :: sockaddr,
610
+ pub ifru_hwaddr: :: sockaddr,
611
+ pub ifru_flags: :: c_short,
612
+ pub ifru_ifindex: :: c_int,
613
+ pub ifru_metric: :: c_int,
614
+ pub ifru_mtu: :: c_int,
615
+ pub ifru_map: __c_anonymous_ifru_map,
616
+ pub ifru_slave: [ :: c_char; :: IFNAMSIZ ] ,
617
+ pub ifru_newname: [ :: c_char; :: IFNAMSIZ ] ,
618
+ pub ifru_data: * mut :: c_char,
619
+ }
620
+
621
+ pub struct ifreq {
622
+ /// interface name, e.g. "en0"
623
+ pub ifr_name: [ :: c_char; :: IFNAMSIZ ] ,
624
+ #[ cfg( libc_union) ]
625
+ pub ifr_ifru: __c_anonymous_ifr_ifru,
626
+ #[ cfg( not( libc_union) ) ]
627
+ pub ifr_ifru: :: sockaddr,
628
+ }
629
+
630
+ #[ cfg( libc_union) ]
631
+ pub union __c_anonymous_ifc_ifcu {
632
+ pub ifcu_buf: * mut :: c_char,
633
+ pub ifcu_req: * mut :: ifreq,
634
+ }
635
+
636
+ /* Structure used in SIOCGIFCONF request. Used to retrieve interface
637
+ configuration for machine (useful for programs which must know all
638
+ networks accessible). */
639
+ pub struct ifconf {
640
+ pub ifc_len: :: c_int, /* Size of buffer. */
641
+ #[ cfg( libc_union) ]
642
+ pub ifc_ifcu: __c_anonymous_ifc_ifcu,
643
+ #[ cfg( not( libc_union) ) ]
644
+ pub ifc_ifcu: * mut :: ifreq,
645
+ }
646
+
594
647
}
595
648
596
649
cfg_if ! {
@@ -2715,6 +2768,7 @@ pub const NFEA_DONT_REFRESH: ::c_ushort = 2;
2715
2768
2716
2769
pub const SIOCADDRT : :: c_ulong = 0x0000890B ;
2717
2770
pub const SIOCDELRT : :: c_ulong = 0x0000890C ;
2771
+ pub const SIOCRTMSG : :: c_ulong = 0x0000890D ;
2718
2772
pub const SIOCGIFNAME : :: c_ulong = 0x00008910 ;
2719
2773
pub const SIOCSIFLINK : :: c_ulong = 0x00008911 ;
2720
2774
pub const SIOCGIFCONF : :: c_ulong = 0x00008912 ;
@@ -2734,6 +2788,7 @@ pub const SIOCGIFMEM: ::c_ulong = 0x0000891F;
2734
2788
pub const SIOCSIFMEM : :: c_ulong = 0x00008920 ;
2735
2789
pub const SIOCGIFMTU : :: c_ulong = 0x00008921 ;
2736
2790
pub const SIOCSIFMTU : :: c_ulong = 0x00008922 ;
2791
+ pub const SIOCSIFNAME : :: c_ulong = 0x00008923 ;
2737
2792
pub const SIOCSIFHWADDR : :: c_ulong = 0x00008924 ;
2738
2793
pub const SIOCGIFENCAP : :: c_ulong = 0x00008925 ;
2739
2794
pub const SIOCSIFENCAP : :: c_ulong = 0x00008926 ;
@@ -2742,6 +2797,24 @@ pub const SIOCGIFSLAVE: ::c_ulong = 0x00008929;
2742
2797
pub const SIOCSIFSLAVE : :: c_ulong = 0x00008930 ;
2743
2798
pub const SIOCADDMULTI : :: c_ulong = 0x00008931 ;
2744
2799
pub const SIOCDELMULTI : :: c_ulong = 0x00008932 ;
2800
+ pub const SIOCGIFINDEX : :: c_ulong = 0x00008933 ;
2801
+ pub const SIOGIFINDEX : :: c_ulong = SIOCGIFINDEX ;
2802
+ pub const SIOCSIFPFLAGS : :: c_ulong = 0x00008934 ;
2803
+ pub const SIOCGIFPFLAGS : :: c_ulong = 0x00008935 ;
2804
+ pub const SIOCDIFADDR : :: c_ulong = 0x00008936 ;
2805
+ pub const SIOCSIFHWBROADCAST : :: c_ulong = 0x00008937 ;
2806
+ pub const SIOCGIFCOUNT : :: c_ulong = 0x00008938 ;
2807
+ pub const SIOCGIFBR : :: c_ulong = 0x00008940 ;
2808
+ pub const SIOCSIFBR : :: c_ulong = 0x00008941 ;
2809
+ pub const SIOCGIFTXQLEN : :: c_ulong = 0x00008942 ;
2810
+ pub const SIOCSIFTXQLEN : :: c_ulong = 0x00008943 ;
2811
+ pub const SIOCETHTOOL : :: c_ulong = 0x00008946 ;
2812
+ pub const SIOCGMIIPHY : :: c_ulong = 0x00008947 ;
2813
+ pub const SIOCGMIIREG : :: c_ulong = 0x00008948 ;
2814
+ pub const SIOCSMIIREG : :: c_ulong = 0x00008949 ;
2815
+ pub const SIOCWANDEV : :: c_ulong = 0x0000894A ;
2816
+ pub const SIOCOUTQNSD : :: c_ulong = 0x0000894B ;
2817
+ pub const SIOCGSKNS : :: c_ulong = 0x0000894C ;
2745
2818
pub const SIOCDARP : :: c_ulong = 0x00008953 ;
2746
2819
pub const SIOCGARP : :: c_ulong = 0x00008954 ;
2747
2820
pub const SIOCSARP : :: c_ulong = 0x00008955 ;
@@ -2750,6 +2823,24 @@ pub const SIOCGRARP: ::c_ulong = 0x00008961;
2750
2823
pub const SIOCSRARP : :: c_ulong = 0x00008962 ;
2751
2824
pub const SIOCGIFMAP : :: c_ulong = 0x00008970 ;
2752
2825
pub const SIOCSIFMAP : :: c_ulong = 0x00008971 ;
2826
+ pub const SIOCADDDLCI : :: c_ulong = 0x00008980 ;
2827
+ pub const SIOCDELDLCI : :: c_ulong = 0x00008981 ;
2828
+ pub const SIOCGIFVLAN : :: c_ulong = 0x00008982 ;
2829
+ pub const SIOCSIFVLAN : :: c_ulong = 0x00008983 ;
2830
+ pub const SIOCBONDENSLAVE : :: c_ulong = 0x00008990 ;
2831
+ pub const SIOCBONDRELEASE : :: c_ulong = 0x00008991 ;
2832
+ pub const SIOCBONDSETHWADDR : :: c_ulong = 0x00008992 ;
2833
+ pub const SIOCBONDSLAVEINFOQUERY : :: c_ulong = 0x00008993 ;
2834
+ pub const SIOCBONDINFOQUERY : :: c_ulong = 0x00008994 ;
2835
+ pub const SIOCBONDCHANGEACTIVE : :: c_ulong = 0x00008995 ;
2836
+ pub const SIOCBRADDBR : :: c_ulong = 0x000089a0 ;
2837
+ pub const SIOCBRDELBR : :: c_ulong = 0x000089a1 ;
2838
+ pub const SIOCBRADDIF : :: c_ulong = 0x000089a2 ;
2839
+ pub const SIOCBRDELIF : :: c_ulong = 0x000089a3 ;
2840
+ pub const SIOCSHWTSTAMP : :: c_ulong = 0x000089b0 ;
2841
+ pub const SIOCGHWTSTAMP : :: c_ulong = 0x000089b1 ;
2842
+ pub const SIOCDEVPRIVATE : :: c_ulong = 0x000089F0 ;
2843
+ pub const SIOCPROTOPRIVATE : :: c_ulong = 0x000089E0 ;
2753
2844
2754
2845
// linux/module.h
2755
2846
pub const MODULE_INIT_IGNORE_MODVERSIONS : :: c_uint = 0x0001 ;
0 commit comments