1 // Licensed under the Apache License, Version 2.0
2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4 // All files in the project carrying such notice may not be copied, modified, or distributed
5 // except according to those terms.
6 //! IPv4 Internet address, 'on-wire' format structure.
7 use shared::minwindef::{UCHAR, ULONG, USHORT};
8 STRUCT!{struct in_addr_S_un_b {
9     s_b1: UCHAR,
10     s_b2: UCHAR,
11     s_b3: UCHAR,
12     s_b4: UCHAR,
13 }}
14 STRUCT!{struct in_addr_S_un_w {
15     s_w1: USHORT,
16     s_w2: USHORT,
17 }}
18 UNION!{union in_addr_S_un {
19     [u32; 1],
20     S_un_b S_un_b_mut: in_addr_S_un_b,
21     S_un_w S_un_w_mut: in_addr_S_un_w,
22     S_addr S_addr_mut: ULONG,
23 }}
24 STRUCT!{struct in_addr {
25     S_un: in_addr_S_un,
26 }}
27 pub type IN_ADDR = in_addr;
28 pub type PIN_ADDR = *mut in_addr;
29 pub type LPIN_ADDR = *mut in_addr;
30