winapi_ui_automation/shared/
inaddr.rs

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.
7use shared::minwindef::{UCHAR, ULONG, USHORT};
8STRUCT!{struct in_addr_S_un_b {
9    s_b1: UCHAR,
10    s_b2: UCHAR,
11    s_b3: UCHAR,
12    s_b4: UCHAR,
13}}
14STRUCT!{struct in_addr_S_un_w {
15    s_w1: USHORT,
16    s_w2: USHORT,
17}}
18UNION!{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}}
24STRUCT!{struct in_addr {
25    S_un: in_addr_S_un,
26}}
27pub type IN_ADDR = in_addr;
28pub type PIN_ADDR = *mut in_addr;
29pub type LPIN_ADDR = *mut in_addr;