• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* automatically generated by tools/bindgen-all-the-things */
2 
3 #![allow(clippy::missing_safety_doc)]
4 #![allow(clippy::upper_case_acronyms)]
5 #![allow(non_upper_case_globals)]
6 #![allow(non_camel_case_types)]
7 #![allow(non_snake_case)]
8 #![allow(dead_code)]
9 
10 use libc::sockaddr;
11 
12 #[repr(C)]
13 #[derive(Debug, Default, Copy, Clone)]
14 pub struct sync_serial_settings {
15     pub clock_rate: ::std::os::raw::c_uint,
16     pub clock_type: ::std::os::raw::c_uint,
17     pub loopback: ::std::os::raw::c_ushort,
18 }
19 #[repr(C)]
20 #[derive(Debug, Default, Copy, Clone)]
21 pub struct te1_settings {
22     pub clock_rate: ::std::os::raw::c_uint,
23     pub clock_type: ::std::os::raw::c_uint,
24     pub loopback: ::std::os::raw::c_ushort,
25     pub slot_map: ::std::os::raw::c_uint,
26 }
27 #[repr(C)]
28 #[derive(Debug, Default, Copy, Clone)]
29 pub struct raw_hdlc_proto {
30     pub encoding: ::std::os::raw::c_ushort,
31     pub parity: ::std::os::raw::c_ushort,
32 }
33 #[repr(C)]
34 #[derive(Debug, Default, Copy, Clone)]
35 pub struct fr_proto {
36     pub t391: ::std::os::raw::c_uint,
37     pub t392: ::std::os::raw::c_uint,
38     pub n391: ::std::os::raw::c_uint,
39     pub n392: ::std::os::raw::c_uint,
40     pub n393: ::std::os::raw::c_uint,
41     pub lmi: ::std::os::raw::c_ushort,
42     pub dce: ::std::os::raw::c_ushort,
43 }
44 #[repr(C)]
45 #[derive(Debug, Default, Copy, Clone)]
46 pub struct fr_proto_pvc {
47     pub dlci: ::std::os::raw::c_uint,
48 }
49 #[repr(C)]
50 #[derive(Debug, Default, Copy, Clone)]
51 pub struct fr_proto_pvc_info {
52     pub dlci: ::std::os::raw::c_uint,
53     pub master: [::std::os::raw::c_char; 16usize],
54 }
55 #[repr(C)]
56 #[derive(Debug, Default, Copy, Clone)]
57 pub struct cisco_proto {
58     pub interval: ::std::os::raw::c_uint,
59     pub timeout: ::std::os::raw::c_uint,
60 }
61 #[repr(C)]
62 #[derive(Debug, Default, Copy, Clone)]
63 pub struct x25_hdlc_proto {
64     pub dce: ::std::os::raw::c_ushort,
65     pub modulo: ::std::os::raw::c_uint,
66     pub window: ::std::os::raw::c_uint,
67     pub t1: ::std::os::raw::c_uint,
68     pub t2: ::std::os::raw::c_uint,
69     pub n2: ::std::os::raw::c_uint,
70 }
71 impl net_device_flags {
72     pub const IFF_UP: net_device_flags = net_device_flags(1);
73 }
74 impl net_device_flags {
75     pub const IFF_BROADCAST: net_device_flags = net_device_flags(2);
76 }
77 impl net_device_flags {
78     pub const IFF_DEBUG: net_device_flags = net_device_flags(4);
79 }
80 impl net_device_flags {
81     pub const IFF_LOOPBACK: net_device_flags = net_device_flags(8);
82 }
83 impl net_device_flags {
84     pub const IFF_POINTOPOINT: net_device_flags = net_device_flags(16);
85 }
86 impl net_device_flags {
87     pub const IFF_NOTRAILERS: net_device_flags = net_device_flags(32);
88 }
89 impl net_device_flags {
90     pub const IFF_RUNNING: net_device_flags = net_device_flags(64);
91 }
92 impl net_device_flags {
93     pub const IFF_NOARP: net_device_flags = net_device_flags(128);
94 }
95 impl net_device_flags {
96     pub const IFF_PROMISC: net_device_flags = net_device_flags(256);
97 }
98 impl net_device_flags {
99     pub const IFF_ALLMULTI: net_device_flags = net_device_flags(512);
100 }
101 impl net_device_flags {
102     pub const IFF_MASTER: net_device_flags = net_device_flags(1024);
103 }
104 impl net_device_flags {
105     pub const IFF_SLAVE: net_device_flags = net_device_flags(2048);
106 }
107 impl net_device_flags {
108     pub const IFF_MULTICAST: net_device_flags = net_device_flags(4096);
109 }
110 impl net_device_flags {
111     pub const IFF_PORTSEL: net_device_flags = net_device_flags(8192);
112 }
113 impl net_device_flags {
114     pub const IFF_AUTOMEDIA: net_device_flags = net_device_flags(16384);
115 }
116 impl net_device_flags {
117     pub const IFF_DYNAMIC: net_device_flags = net_device_flags(32768);
118 }
119 impl net_device_flags {
120     pub const IFF_LOWER_UP: net_device_flags = net_device_flags(65536);
121 }
122 impl net_device_flags {
123     pub const IFF_DORMANT: net_device_flags = net_device_flags(131072);
124 }
125 impl net_device_flags {
126     pub const IFF_ECHO: net_device_flags = net_device_flags(262144);
127 }
128 impl ::std::ops::BitOr<net_device_flags> for net_device_flags {
129     type Output = Self;
130     #[inline]
bitor(self, other: Self) -> Self131     fn bitor(self, other: Self) -> Self {
132         net_device_flags(self.0 | other.0)
133     }
134 }
135 impl ::std::ops::BitOrAssign for net_device_flags {
136     #[inline]
bitor_assign(&mut self, rhs: net_device_flags)137     fn bitor_assign(&mut self, rhs: net_device_flags) {
138         self.0 |= rhs.0;
139     }
140 }
141 impl ::std::ops::BitAnd<net_device_flags> for net_device_flags {
142     type Output = Self;
143     #[inline]
bitand(self, other: Self) -> Self144     fn bitand(self, other: Self) -> Self {
145         net_device_flags(self.0 & other.0)
146     }
147 }
148 impl ::std::ops::BitAndAssign for net_device_flags {
149     #[inline]
bitand_assign(&mut self, rhs: net_device_flags)150     fn bitand_assign(&mut self, rhs: net_device_flags) {
151         self.0 &= rhs.0;
152     }
153 }
154 #[repr(transparent)]
155 #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
156 pub struct net_device_flags(pub ::std::os::raw::c_uint);
157 #[repr(C)]
158 #[derive(Debug, Default, Copy, Clone)]
159 pub struct ifmap {
160     pub mem_start: ::std::os::raw::c_ulong,
161     pub mem_end: ::std::os::raw::c_ulong,
162     pub base_addr: ::std::os::raw::c_ushort,
163     pub irq: ::std::os::raw::c_uchar,
164     pub dma: ::std::os::raw::c_uchar,
165     pub port: ::std::os::raw::c_uchar,
166 }
167 #[repr(C)]
168 #[derive(Copy, Clone)]
169 pub struct if_settings {
170     pub type_: ::std::os::raw::c_uint,
171     pub size: ::std::os::raw::c_uint,
172     pub ifs_ifsu: if_settings__bindgen_ty_1,
173 }
174 #[repr(C)]
175 #[derive(Copy, Clone)]
176 pub union if_settings__bindgen_ty_1 {
177     pub raw_hdlc: *mut raw_hdlc_proto,
178     pub cisco: *mut cisco_proto,
179     pub fr: *mut fr_proto,
180     pub fr_pvc: *mut fr_proto_pvc,
181     pub fr_pvc_info: *mut fr_proto_pvc_info,
182     pub x25: *mut x25_hdlc_proto,
183     pub sync: *mut sync_serial_settings,
184     pub te1: *mut te1_settings,
185 }
186 impl Default for if_settings__bindgen_ty_1 {
default() -> Self187     fn default() -> Self {
188         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
189         unsafe {
190             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
191             s.assume_init()
192         }
193     }
194 }
195 impl Default for if_settings {
default() -> Self196     fn default() -> Self {
197         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
198         unsafe {
199             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
200             s.assume_init()
201         }
202     }
203 }
204 #[repr(C)]
205 #[derive(Copy, Clone)]
206 pub struct ifreq {
207     pub ifr_ifrn: ifreq__bindgen_ty_1,
208     pub ifr_ifru: ifreq__bindgen_ty_2,
209 }
210 #[repr(C)]
211 #[derive(Copy, Clone)]
212 pub union ifreq__bindgen_ty_1 {
213     pub ifrn_name: [::std::os::raw::c_char; 16usize],
214 }
215 impl Default for ifreq__bindgen_ty_1 {
default() -> Self216     fn default() -> Self {
217         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
218         unsafe {
219             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
220             s.assume_init()
221         }
222     }
223 }
224 #[repr(C)]
225 #[derive(Copy, Clone)]
226 pub union ifreq__bindgen_ty_2 {
227     pub ifru_addr: sockaddr,
228     pub ifru_dstaddr: sockaddr,
229     pub ifru_broadaddr: sockaddr,
230     pub ifru_netmask: sockaddr,
231     pub ifru_hwaddr: sockaddr,
232     pub ifru_flags: ::std::os::raw::c_short,
233     pub ifru_ivalue: ::std::os::raw::c_int,
234     pub ifru_mtu: ::std::os::raw::c_int,
235     pub ifru_map: ifmap,
236     pub ifru_slave: [::std::os::raw::c_char; 16usize],
237     pub ifru_newname: [::std::os::raw::c_char; 16usize],
238     pub ifru_data: *mut ::std::os::raw::c_void,
239     pub ifru_settings: if_settings,
240 }
241 impl Default for ifreq__bindgen_ty_2 {
default() -> Self242     fn default() -> Self {
243         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
244         unsafe {
245             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
246             s.assume_init()
247         }
248     }
249 }
250 impl Default for ifreq {
default() -> Self251     fn default() -> Self {
252         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
253         unsafe {
254             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
255             s.assume_init()
256         }
257     }
258 }
259