Skip to content

Commit c244d16

Browse files
committed
Move structs into no_extra_traits macro
1 parent 400b741 commit c244d16

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

src/new/nto/net/if_.rs

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
use crate::prelude::*;
22

3-
s! {
4-
pub struct ifreq {
5-
/// if name, e.g. "en0"
6-
pub ifr_name: [c_char; crate::IFNAMSIZ],
7-
pub ifr_ifru: __c_anonymous_ifr_ifru,
8-
}
9-
pub struct ifreq_buffer {
10-
pub length: size_t,
11-
pub buffer: *mut c_void,
12-
}
13-
}
14-
153
s_no_extra_traits! {
164
pub union __c_anonymous_ifr_ifru {
175
pub ifru_addr: crate::sockaddr,
@@ -30,4 +18,15 @@ s_no_extra_traits! {
3018
pub ifru_fib: c_uint,
3119
pub ifru_vlan_pcp: c_uchar,
3220
}
21+
22+
pub struct ifreq {
23+
/// if name, e.g. "en0"
24+
pub ifr_name: [c_char; crate::IFNAMSIZ],
25+
pub ifr_ifru: __c_anonymous_ifr_ifru,
26+
}
27+
28+
pub struct ifreq_buffer {
29+
pub length: size_t,
30+
pub buffer: *mut c_void,
31+
}
3332
}

0 commit comments

Comments
 (0)