blob: 9085480caa5c4a72c1a884d19d4305b9bd4313c4 [file] [log] [blame]
/* automatically generated by rust-bindgen */
#![allow(non_snake_case)]
#[repr(C)]
#[derive(Default)]
pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>);
impl <T> __IncompleteArrayField<T> {
#[inline]
pub fn new() -> Self {
__IncompleteArrayField(::std::marker::PhantomData)
}
#[inline]
pub unsafe fn as_ptr(&self) -> *const T { ::std::mem::transmute(self) }
#[inline]
pub unsafe fn as_mut_ptr(&mut self) -> *mut T {
::std::mem::transmute(self)
}
#[inline]
pub unsafe fn as_slice(&self, len: usize) -> &[T] {
::std::slice::from_raw_parts(self.as_ptr(), len)
}
#[inline]
pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
}
}
impl <T> ::std::fmt::Debug for __IncompleteArrayField<T> {
fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
fmt.write_str("__IncompleteArrayField")
}
}
impl <T> ::std::clone::Clone for __IncompleteArrayField<T> {
#[inline]
fn clone(&self) -> Self { Self::new() }
}
impl <T> ::std::marker::Copy for __IncompleteArrayField<T> { }
#[repr(C)]
#[derive(Debug, Copy)]
pub struct rte_kni_fifo {
/**< Next position to be written*/
pub write: ::std::os::raw::c_uint,
/**< Next position to be read */
pub read: ::std::os::raw::c_uint,
/**< Circular buffer length */
pub len: ::std::os::raw::c_uint,
/**< Pointer size - for 32/64 bit OS */
pub elem_size: ::std::os::raw::c_uint,
/**< The buffer contains mbuf pointers */
pub buffer: __IncompleteArrayField<*mut ::std::os::raw::c_void>,
pub __bindgen_align: [u64; 0usize],
}
#[test]
fn bindgen_test_layout_rte_kni_fifo() {
assert_eq!(::std::mem::size_of::<rte_kni_fifo>() , 16usize , concat ! (
"Size of: " , stringify ! ( rte_kni_fifo ) ));
assert_eq! (::std::mem::align_of::<rte_kni_fifo>() , 8usize , concat ! (
"Alignment of " , stringify ! ( rte_kni_fifo ) ));
}
impl Clone for rte_kni_fifo {
fn clone(&self) -> Self { *self }
}
impl Default for rte_kni_fifo {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
#[derive(Debug, Default, Copy)]
pub struct rte_eth_link {
/**< ETH_SPEED_NUM_ */
pub link_speed: u32,
pub _bitfield_1: u8,
pub __bindgen_padding_0: [u8; 3usize],
pub __bindgen_align: [u64; 0usize],
}
#[test]
fn bindgen_test_layout_rte_eth_link() {
assert_eq!(::std::mem::size_of::<rte_eth_link>() , 8usize , concat ! (
"Size of: " , stringify ! ( rte_eth_link ) ));
assert_eq! (::std::mem::align_of::<rte_eth_link>() , 8usize , concat ! (
"Alignment of " , stringify ! ( rte_eth_link ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rte_eth_link ) ) . link_speed as * const
_ as usize } , 0usize , concat ! (
"Alignment of field: " , stringify ! ( rte_eth_link ) , "::" ,
stringify ! ( link_speed ) ));
}
impl Clone for rte_eth_link {
fn clone(&self) -> Self { *self }
}