1 // Copyright © 2015, Peter Atashian
2 // Licensed under the MIT License <LICENSE.md>
3 //! IPv4 Internet address
4 STRUCT!{struct in_addr_S_un_b {
5     s_b1: ::UCHAR,
6     s_b2: ::UCHAR,
7     s_b3: ::UCHAR,
8     s_b4: ::UCHAR,
9 }}
10 STRUCT!{struct in_addr_S_un_w {
11     s_w1: ::USHORT,
12     s_w2: ::USHORT,
13 }}
14 STRUCT!{struct in_addr {
15     S_un: ::ULONG,
16 }}
17 UNION!(in_addr, S_un, S_un_b, S_un_b_mut, in_addr_S_un_b);
18 UNION!(in_addr, S_un, S_un_w, S_un_w_mut, in_addr_S_un_w);
19 UNION!(in_addr, S_un, S_addr, S_addr_mut, ::ULONG);
20 pub type IN_ADDR = in_addr;
21 pub type PIN_ADDR = *mut in_addr;
22 pub type LPIN_ADDR = *mut in_addr;
23