|
1 | | -use libc::{c_int, c_uint, c_ulong, c_char, timeval, ssize_t}; |
| 1 | +use libc::{c_int, c_uint, c_ulong, c_char, timeval, ssize_t, IF_NAMESIZE}; |
2 | 2 |
|
3 | | -pub const IF_NAMESIZE: usize = 16; |
4 | 3 | pub const IFNAMSIZ: usize = IF_NAMESIZE; |
5 | 4 |
|
6 | 5 | pub const NETMAP_API: c_int = 11; |
@@ -47,6 +46,7 @@ pub struct netmap_ring { |
47 | 46 |
|
48 | 47 | pub ts: timeval, |
49 | 48 |
|
| 49 | + _padding: [u8; 72], |
50 | 50 | pub sem: [u8; 128], // FIXME __attribute__((__aligned__(NM_CACHE_ALIGN))) |
51 | 51 |
|
52 | 52 | pub slot: [netmap_slot; 0], // FIXME Check struct size/field alignment |
@@ -79,8 +79,6 @@ pub struct netmap_if { |
79 | 79 |
|
80 | 80 | pub const NI_PRIV_MEM: c_int = 0x1; |
81 | 81 |
|
82 | | -pub const SIZEOF_NR_NAME: usize = IFNAMSIZ; |
83 | | - |
84 | 82 | #[repr(C)] |
85 | 83 | #[derive(Clone, Copy)] |
86 | 84 | pub struct nmreq { |
@@ -142,9 +140,9 @@ pub const NIOCGINFO: c_ulong = 3225184657; |
142 | 140 | #[cfg(target_os = "linux")] |
143 | 141 | pub const NIOCREGIF: c_ulong = 3225184658; |
144 | 142 | #[cfg(target_os = "linux")] |
145 | | -pub const NIOTXSYNC: c_uint = 27028; |
| 143 | +pub const NIOCTXSYNC: c_uint = 27028; |
146 | 144 | #[cfg(target_os = "linux")] |
147 | | -pub const NIORXSYNC: c_uint = 27029; |
| 145 | +pub const NIOCRXSYNC: c_uint = 27029; |
148 | 146 | #[cfg(target_os = "linux")] |
149 | 147 | pub const NIOCCONFIG: c_ulong = 3239078294; |
150 | 148 |
|
|
0 commit comments