libcsp-rust/clib/bindings.rs

7539 lines
238 KiB
Rust

/* automatically generated by rust-bindgen 0.69.4 */
#[repr(C)]
#[derive(Default)]
pub struct __IncompleteArrayField<T>(::core::marker::PhantomData<T>, [T; 0]);
impl<T> __IncompleteArrayField<T> {
#[inline]
pub const fn new() -> Self {
__IncompleteArrayField(::core::marker::PhantomData, [])
}
#[inline]
pub fn as_ptr(&self) -> *const T {
self as *const _ as *const T
}
#[inline]
pub fn as_mut_ptr(&mut self) -> *mut T {
self as *mut _ as *mut T
}
#[inline]
pub unsafe fn as_slice(&self, len: usize) -> &[T] {
::core::slice::from_raw_parts(self.as_ptr(), len)
}
#[inline]
pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
}
}
impl<T> ::core::fmt::Debug for __IncompleteArrayField<T> {
fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
fmt.write_str("__IncompleteArrayField")
}
}
pub const CSP_ERR_NONE: u32 = 0;
pub const CSP_ERR_NOMEM: i32 = -1;
pub const CSP_ERR_INVAL: i32 = -2;
pub const CSP_ERR_TIMEDOUT: i32 = -3;
pub const CSP_ERR_USED: i32 = -4;
pub const CSP_ERR_NOTSUP: i32 = -5;
pub const CSP_ERR_BUSY: i32 = -6;
pub const CSP_ERR_ALREADY: i32 = -7;
pub const CSP_ERR_RESET: i32 = -8;
pub const CSP_ERR_NOBUFS: i32 = -9;
pub const CSP_ERR_TX: i32 = -10;
pub const CSP_ERR_DRIVER: i32 = -11;
pub const CSP_ERR_AGAIN: i32 = -12;
pub const CSP_ERR_NOSYS: i32 = -38;
pub const CSP_ERR_HMAC: i32 = -100;
pub const CSP_ERR_CRC32: i32 = -102;
pub const CSP_ERR_SFP: i32 = -103;
pub const CSP_POSIX: u32 = 1;
pub const CSP_ZEPHYR: u32 = 0;
pub const CSP_HAVE_STDIO: u32 = 1;
pub const CSP_ENABLE_CSP_PRINT: u32 = 1;
pub const CSP_PRINT_STDIO: u32 = 1;
pub const CSP_REPRODUCIBLE_BUILDS: u32 = 0;
pub const CSP_QFIFO_LEN: u32 = 16;
pub const CSP_PORT_MAX_BIND: u32 = 16;
pub const CSP_CONN_RXQUEUE_LEN: u32 = 16;
pub const CSP_CONN_MAX: u32 = 8;
pub const CSP_BUFFER_SIZE: u32 = 256;
pub const CSP_BUFFER_COUNT: u32 = 15;
pub const CSP_RDP_MAX_WINDOW: u32 = 5;
pub const CSP_RTABLE_SIZE: u32 = 10;
pub const CSP_USE_RDP: u32 = 1;
pub const CSP_USE_HMAC: u32 = 1;
pub const CSP_USE_PROMISC: u32 = 1;
pub const CSP_USE_RTABLE: u32 = 0;
pub const CSP_HAVE_LIBSOCKETCAN: u32 = 0;
pub const CSP_HAVE_LIBZMQ: u32 = 0;
pub const _INTTYPES_H: u32 = 1;
pub const _FEATURES_H: u32 = 1;
pub const _DEFAULT_SOURCE: u32 = 1;
pub const __GLIBC_USE_ISOC2X: u32 = 0;
pub const __USE_ISOC11: u32 = 1;
pub const __USE_ISOC99: u32 = 1;
pub const __USE_ISOC95: u32 = 1;
pub const __USE_POSIX_IMPLICITLY: u32 = 1;
pub const _POSIX_SOURCE: u32 = 1;
pub const _POSIX_C_SOURCE: u32 = 200809;
pub const __USE_POSIX: u32 = 1;
pub const __USE_POSIX2: u32 = 1;
pub const __USE_POSIX199309: u32 = 1;
pub const __USE_POSIX199506: u32 = 1;
pub const __USE_XOPEN2K: u32 = 1;
pub const __USE_XOPEN2K8: u32 = 1;
pub const _ATFILE_SOURCE: u32 = 1;
pub const __WORDSIZE: u32 = 64;
pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
pub const __SYSCALL_WORDSIZE: u32 = 64;
pub const __TIMESIZE: u32 = 64;
pub const __USE_MISC: u32 = 1;
pub const __USE_ATFILE: u32 = 1;
pub const __USE_FORTIFY_LEVEL: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
pub const _STDC_PREDEF_H: u32 = 1;
pub const __STDC_IEC_559__: u32 = 1;
pub const __STDC_IEC_60559_BFP__: u32 = 201404;
pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404;
pub const __STDC_ISO_10646__: u32 = 201706;
pub const __GNU_LIBRARY__: u32 = 6;
pub const __GLIBC__: u32 = 2;
pub const __GLIBC_MINOR__: u32 = 35;
pub const _SYS_CDEFS_H: u32 = 1;
pub const __glibc_c99_flexarr_available: u32 = 1;
pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0;
pub const __HAVE_GENERIC_SELECTION: u32 = 1;
pub const _STDINT_H: u32 = 1;
pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0;
pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0;
pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
pub const _BITS_TYPES_H: u32 = 1;
pub const _BITS_TYPESIZES_H: u32 = 1;
pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
pub const __INO_T_MATCHES_INO64_T: u32 = 1;
pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
pub const __STATFS_MATCHES_STATFS64: u32 = 1;
pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 1;
pub const __FD_SETSIZE: u32 = 1024;
pub const _BITS_TIME64_H: u32 = 1;
pub const _BITS_WCHAR_H: u32 = 1;
pub const _BITS_STDINT_INTN_H: u32 = 1;
pub const _BITS_STDINT_UINTN_H: u32 = 1;
pub const INT8_MIN: i32 = -128;
pub const INT16_MIN: i32 = -32768;
pub const INT32_MIN: i32 = -2147483648;
pub const INT8_MAX: u32 = 127;
pub const INT16_MAX: u32 = 32767;
pub const INT32_MAX: u32 = 2147483647;
pub const UINT8_MAX: u32 = 255;
pub const UINT16_MAX: u32 = 65535;
pub const UINT32_MAX: u32 = 4294967295;
pub const INT_LEAST8_MIN: i32 = -128;
pub const INT_LEAST16_MIN: i32 = -32768;
pub const INT_LEAST32_MIN: i32 = -2147483648;
pub const INT_LEAST8_MAX: u32 = 127;
pub const INT_LEAST16_MAX: u32 = 32767;
pub const INT_LEAST32_MAX: u32 = 2147483647;
pub const UINT_LEAST8_MAX: u32 = 255;
pub const UINT_LEAST16_MAX: u32 = 65535;
pub const UINT_LEAST32_MAX: u32 = 4294967295;
pub const INT_FAST8_MIN: i32 = -128;
pub const INT_FAST16_MIN: i64 = -9223372036854775808;
pub const INT_FAST32_MIN: i64 = -9223372036854775808;
pub const INT_FAST8_MAX: u32 = 127;
pub const INT_FAST16_MAX: u64 = 9223372036854775807;
pub const INT_FAST32_MAX: u64 = 9223372036854775807;
pub const UINT_FAST8_MAX: u32 = 255;
pub const UINT_FAST16_MAX: i32 = -1;
pub const UINT_FAST32_MAX: i32 = -1;
pub const INTPTR_MIN: i64 = -9223372036854775808;
pub const INTPTR_MAX: u64 = 9223372036854775807;
pub const UINTPTR_MAX: i32 = -1;
pub const PTRDIFF_MIN: i64 = -9223372036854775808;
pub const PTRDIFF_MAX: u64 = 9223372036854775807;
pub const SIG_ATOMIC_MIN: i32 = -2147483648;
pub const SIG_ATOMIC_MAX: u32 = 2147483647;
pub const SIZE_MAX: i32 = -1;
pub const WINT_MIN: u32 = 0;
pub const WINT_MAX: u32 = 4294967295;
pub const ____gwchar_t_defined: u32 = 1;
pub const __PRI64_PREFIX: &[u8; 2] = b"l\0";
pub const __PRIPTR_PREFIX: &[u8; 2] = b"l\0";
pub const PRId8: &[u8; 2] = b"d\0";
pub const PRId16: &[u8; 2] = b"d\0";
pub const PRId32: &[u8; 2] = b"d\0";
pub const PRId64: &[u8; 3] = b"ld\0";
pub const PRIdLEAST8: &[u8; 2] = b"d\0";
pub const PRIdLEAST16: &[u8; 2] = b"d\0";
pub const PRIdLEAST32: &[u8; 2] = b"d\0";
pub const PRIdLEAST64: &[u8; 3] = b"ld\0";
pub const PRIdFAST8: &[u8; 2] = b"d\0";
pub const PRIdFAST16: &[u8; 3] = b"ld\0";
pub const PRIdFAST32: &[u8; 3] = b"ld\0";
pub const PRIdFAST64: &[u8; 3] = b"ld\0";
pub const PRIi8: &[u8; 2] = b"i\0";
pub const PRIi16: &[u8; 2] = b"i\0";
pub const PRIi32: &[u8; 2] = b"i\0";
pub const PRIi64: &[u8; 3] = b"li\0";
pub const PRIiLEAST8: &[u8; 2] = b"i\0";
pub const PRIiLEAST16: &[u8; 2] = b"i\0";
pub const PRIiLEAST32: &[u8; 2] = b"i\0";
pub const PRIiLEAST64: &[u8; 3] = b"li\0";
pub const PRIiFAST8: &[u8; 2] = b"i\0";
pub const PRIiFAST16: &[u8; 3] = b"li\0";
pub const PRIiFAST32: &[u8; 3] = b"li\0";
pub const PRIiFAST64: &[u8; 3] = b"li\0";
pub const PRIo8: &[u8; 2] = b"o\0";
pub const PRIo16: &[u8; 2] = b"o\0";
pub const PRIo32: &[u8; 2] = b"o\0";
pub const PRIo64: &[u8; 3] = b"lo\0";
pub const PRIoLEAST8: &[u8; 2] = b"o\0";
pub const PRIoLEAST16: &[u8; 2] = b"o\0";
pub const PRIoLEAST32: &[u8; 2] = b"o\0";
pub const PRIoLEAST64: &[u8; 3] = b"lo\0";
pub const PRIoFAST8: &[u8; 2] = b"o\0";
pub const PRIoFAST16: &[u8; 3] = b"lo\0";
pub const PRIoFAST32: &[u8; 3] = b"lo\0";
pub const PRIoFAST64: &[u8; 3] = b"lo\0";
pub const PRIu8: &[u8; 2] = b"u\0";
pub const PRIu16: &[u8; 2] = b"u\0";
pub const PRIu32: &[u8; 2] = b"u\0";
pub const PRIu64: &[u8; 3] = b"lu\0";
pub const PRIuLEAST8: &[u8; 2] = b"u\0";
pub const PRIuLEAST16: &[u8; 2] = b"u\0";
pub const PRIuLEAST32: &[u8; 2] = b"u\0";
pub const PRIuLEAST64: &[u8; 3] = b"lu\0";
pub const PRIuFAST8: &[u8; 2] = b"u\0";
pub const PRIuFAST16: &[u8; 3] = b"lu\0";
pub const PRIuFAST32: &[u8; 3] = b"lu\0";
pub const PRIuFAST64: &[u8; 3] = b"lu\0";
pub const PRIx8: &[u8; 2] = b"x\0";
pub const PRIx16: &[u8; 2] = b"x\0";
pub const PRIx32: &[u8; 2] = b"x\0";
pub const PRIx64: &[u8; 3] = b"lx\0";
pub const PRIxLEAST8: &[u8; 2] = b"x\0";
pub const PRIxLEAST16: &[u8; 2] = b"x\0";
pub const PRIxLEAST32: &[u8; 2] = b"x\0";
pub const PRIxLEAST64: &[u8; 3] = b"lx\0";
pub const PRIxFAST8: &[u8; 2] = b"x\0";
pub const PRIxFAST16: &[u8; 3] = b"lx\0";
pub const PRIxFAST32: &[u8; 3] = b"lx\0";
pub const PRIxFAST64: &[u8; 3] = b"lx\0";
pub const PRIX8: &[u8; 2] = b"X\0";
pub const PRIX16: &[u8; 2] = b"X\0";
pub const PRIX32: &[u8; 2] = b"X\0";
pub const PRIX64: &[u8; 3] = b"lX\0";
pub const PRIXLEAST8: &[u8; 2] = b"X\0";
pub const PRIXLEAST16: &[u8; 2] = b"X\0";
pub const PRIXLEAST32: &[u8; 2] = b"X\0";
pub const PRIXLEAST64: &[u8; 3] = b"lX\0";
pub const PRIXFAST8: &[u8; 2] = b"X\0";
pub const PRIXFAST16: &[u8; 3] = b"lX\0";
pub const PRIXFAST32: &[u8; 3] = b"lX\0";
pub const PRIXFAST64: &[u8; 3] = b"lX\0";
pub const PRIdMAX: &[u8; 3] = b"ld\0";
pub const PRIiMAX: &[u8; 3] = b"li\0";
pub const PRIoMAX: &[u8; 3] = b"lo\0";
pub const PRIuMAX: &[u8; 3] = b"lu\0";
pub const PRIxMAX: &[u8; 3] = b"lx\0";
pub const PRIXMAX: &[u8; 3] = b"lX\0";
pub const PRIdPTR: &[u8; 3] = b"ld\0";
pub const PRIiPTR: &[u8; 3] = b"li\0";
pub const PRIoPTR: &[u8; 3] = b"lo\0";
pub const PRIuPTR: &[u8; 3] = b"lu\0";
pub const PRIxPTR: &[u8; 3] = b"lx\0";
pub const PRIXPTR: &[u8; 3] = b"lX\0";
pub const SCNd8: &[u8; 4] = b"hhd\0";
pub const SCNd16: &[u8; 3] = b"hd\0";
pub const SCNd32: &[u8; 2] = b"d\0";
pub const SCNd64: &[u8; 3] = b"ld\0";
pub const SCNdLEAST8: &[u8; 4] = b"hhd\0";
pub const SCNdLEAST16: &[u8; 3] = b"hd\0";
pub const SCNdLEAST32: &[u8; 2] = b"d\0";
pub const SCNdLEAST64: &[u8; 3] = b"ld\0";
pub const SCNdFAST8: &[u8; 4] = b"hhd\0";
pub const SCNdFAST16: &[u8; 3] = b"ld\0";
pub const SCNdFAST32: &[u8; 3] = b"ld\0";
pub const SCNdFAST64: &[u8; 3] = b"ld\0";
pub const SCNi8: &[u8; 4] = b"hhi\0";
pub const SCNi16: &[u8; 3] = b"hi\0";
pub const SCNi32: &[u8; 2] = b"i\0";
pub const SCNi64: &[u8; 3] = b"li\0";
pub const SCNiLEAST8: &[u8; 4] = b"hhi\0";
pub const SCNiLEAST16: &[u8; 3] = b"hi\0";
pub const SCNiLEAST32: &[u8; 2] = b"i\0";
pub const SCNiLEAST64: &[u8; 3] = b"li\0";
pub const SCNiFAST8: &[u8; 4] = b"hhi\0";
pub const SCNiFAST16: &[u8; 3] = b"li\0";
pub const SCNiFAST32: &[u8; 3] = b"li\0";
pub const SCNiFAST64: &[u8; 3] = b"li\0";
pub const SCNu8: &[u8; 4] = b"hhu\0";
pub const SCNu16: &[u8; 3] = b"hu\0";
pub const SCNu32: &[u8; 2] = b"u\0";
pub const SCNu64: &[u8; 3] = b"lu\0";
pub const SCNuLEAST8: &[u8; 4] = b"hhu\0";
pub const SCNuLEAST16: &[u8; 3] = b"hu\0";
pub const SCNuLEAST32: &[u8; 2] = b"u\0";
pub const SCNuLEAST64: &[u8; 3] = b"lu\0";
pub const SCNuFAST8: &[u8; 4] = b"hhu\0";
pub const SCNuFAST16: &[u8; 3] = b"lu\0";
pub const SCNuFAST32: &[u8; 3] = b"lu\0";
pub const SCNuFAST64: &[u8; 3] = b"lu\0";
pub const SCNo8: &[u8; 4] = b"hho\0";
pub const SCNo16: &[u8; 3] = b"ho\0";
pub const SCNo32: &[u8; 2] = b"o\0";
pub const SCNo64: &[u8; 3] = b"lo\0";
pub const SCNoLEAST8: &[u8; 4] = b"hho\0";
pub const SCNoLEAST16: &[u8; 3] = b"ho\0";
pub const SCNoLEAST32: &[u8; 2] = b"o\0";
pub const SCNoLEAST64: &[u8; 3] = b"lo\0";
pub const SCNoFAST8: &[u8; 4] = b"hho\0";
pub const SCNoFAST16: &[u8; 3] = b"lo\0";
pub const SCNoFAST32: &[u8; 3] = b"lo\0";
pub const SCNoFAST64: &[u8; 3] = b"lo\0";
pub const SCNx8: &[u8; 4] = b"hhx\0";
pub const SCNx16: &[u8; 3] = b"hx\0";
pub const SCNx32: &[u8; 2] = b"x\0";
pub const SCNx64: &[u8; 3] = b"lx\0";
pub const SCNxLEAST8: &[u8; 4] = b"hhx\0";
pub const SCNxLEAST16: &[u8; 3] = b"hx\0";
pub const SCNxLEAST32: &[u8; 2] = b"x\0";
pub const SCNxLEAST64: &[u8; 3] = b"lx\0";
pub const SCNxFAST8: &[u8; 4] = b"hhx\0";
pub const SCNxFAST16: &[u8; 3] = b"lx\0";
pub const SCNxFAST32: &[u8; 3] = b"lx\0";
pub const SCNxFAST64: &[u8; 3] = b"lx\0";
pub const SCNdMAX: &[u8; 3] = b"ld\0";
pub const SCNiMAX: &[u8; 3] = b"li\0";
pub const SCNoMAX: &[u8; 3] = b"lo\0";
pub const SCNuMAX: &[u8; 3] = b"lu\0";
pub const SCNxMAX: &[u8; 3] = b"lx\0";
pub const SCNdPTR: &[u8; 3] = b"ld\0";
pub const SCNiPTR: &[u8; 3] = b"li\0";
pub const SCNoPTR: &[u8; 3] = b"lo\0";
pub const SCNuPTR: &[u8; 3] = b"lu\0";
pub const SCNxPTR: &[u8; 3] = b"lx\0";
pub const CSP_DBG_ERR_CORRUPT_BUFFER: u32 = 1;
pub const CSP_DBG_ERR_MTU_EXCEEDED: u32 = 2;
pub const CSP_DBG_ERR_ALREADY_FREE: u32 = 3;
pub const CSP_DBG_ERR_REFCOUNT: u32 = 4;
pub const CSP_DBG_ERR_INVALID_RTABLE_ENTRY: u32 = 6;
pub const CSP_DBG_ERR_UNSUPPORTED: u32 = 7;
pub const CSP_DBG_ERR_INVALID_BIND_PORT: u32 = 8;
pub const CSP_DBG_ERR_PORT_ALREADY_IN_USE: u32 = 9;
pub const CSP_DBG_ERR_ALREADY_CLOSED: u32 = 10;
pub const CSP_DBG_ERR_INVALID_POINTER: u32 = 11;
pub const CSP_DBG_ERR_CLOCK_SET_FAIL: u32 = 12;
pub const CSP_DBG_CAN_ERR_FRAME_LOST: u32 = 1;
pub const CSP_DBG_CAN_ERR_RX_OVF: u32 = 2;
pub const CSP_DBG_CAN_ERR_RX_OUT: u32 = 3;
pub const CSP_DBG_CAN_ERR_SHORT_BEGIN: u32 = 4;
pub const CSP_DBG_CAN_ERR_INCOMPLETE: u32 = 5;
pub const CSP_DBG_CAN_ERR_UNKNOWN: u32 = 6;
pub const CSP_DBG_ETH_ERR_FRAME_LOST: u32 = 1;
pub const CSP_DBG_ETH_ERR_RX_OVF: u32 = 2;
pub const CSP_DBG_ETH_ERR_RX_OUT: u32 = 3;
pub const CSP_DBG_ETH_ERR_SHORT_BEGIN: u32 = 4;
pub const CSP_DBG_ETH_ERR_INCOMPLETE: u32 = 5;
pub const CSP_DBG_ETH_ERR_UNKNOWN: u32 = 6;
pub const true_: u32 = 1;
pub const false_: u32 = 0;
pub const __bool_true_false_are_defined: u32 = 1;
pub const CSP_QUEUE_OK: u32 = 0;
pub const CSP_QUEUE_ERROR: i32 = -1;
pub const CSP_ANY: u32 = 255;
pub const CSP_FRES1: u32 = 128;
pub const CSP_FRES2: u32 = 64;
pub const CSP_FRES3: u32 = 32;
pub const CSP_FFRAG: u32 = 16;
pub const CSP_FHMAC: u32 = 8;
pub const CSP_FRDP: u32 = 2;
pub const CSP_FCRC32: u32 = 1;
pub const CSP_SO_NONE: u32 = 0;
pub const CSP_SO_RDPREQ: u32 = 1;
pub const CSP_SO_RDPPROHIB: u32 = 2;
pub const CSP_SO_HMACREQ: u32 = 4;
pub const CSP_SO_HMACPROHIB: u32 = 8;
pub const CSP_SO_CRC32REQ: u32 = 64;
pub const CSP_SO_CRC32PROHIB: u32 = 128;
pub const CSP_SO_CONN_LESS: u32 = 256;
pub const CSP_SO_SAME: u32 = 32768;
pub const CSP_O_NONE: u32 = 0;
pub const CSP_O_RDP: u32 = 1;
pub const CSP_O_NORDP: u32 = 2;
pub const CSP_O_HMAC: u32 = 4;
pub const CSP_O_NOHMAC: u32 = 8;
pub const CSP_O_CRC32: u32 = 64;
pub const CSP_O_NOCRC32: u32 = 128;
pub const CSP_O_SAME: u32 = 32768;
pub const CSP_PACKET_PADDING_BYTES: u32 = 8;
pub const CSP_RDP_HEADER_SIZE: u32 = 5;
pub const CSP_HOSTNAME_LEN: u32 = 20;
pub const CSP_MODEL_LEN: u32 = 30;
pub const CSP_REBOOT_MAGIC: u32 = 2147975175;
pub const CSP_REBOOT_SHUTDOWN_MAGIC: u32 = 3521467034;
pub const CSP_IFLIST_NAME_MAX: u32 = 10;
pub const CSP_NO_VIA_ADDRESS: u32 = 65535;
pub const _STRING_H: u32 = 1;
pub const _BITS_TYPES_LOCALE_T_H: u32 = 1;
pub const _BITS_TYPES___LOCALE_T_H: u32 = 1;
pub const _STRINGS_H: u32 = 1;
pub const CSP_MAX_TIMEOUT: u32 = 4294967295;
pub const CSP_MAX_DELAY: u32 = 4294967295;
pub const CSP_INFINITY: u32 = 4294967295;
pub const CSP_SEMAPHORE_OK: u32 = 0;
pub const CSP_SEMAPHORE_ERROR: i32 = -1;
pub const _SEMAPHORE_H: u32 = 1;
pub const _SYS_TYPES_H: u32 = 1;
pub const __clock_t_defined: u32 = 1;
pub const __clockid_t_defined: u32 = 1;
pub const __time_t_defined: u32 = 1;
pub const __timer_t_defined: u32 = 1;
pub const __BIT_TYPES_DEFINED__: u32 = 1;
pub const _ENDIAN_H: u32 = 1;
pub const _BITS_ENDIAN_H: u32 = 1;
pub const __LITTLE_ENDIAN: u32 = 1234;
pub const __BIG_ENDIAN: u32 = 4321;
pub const __PDP_ENDIAN: u32 = 3412;
pub const _BITS_ENDIANNESS_H: u32 = 1;
pub const __BYTE_ORDER: u32 = 1234;
pub const __FLOAT_WORD_ORDER: u32 = 1234;
pub const LITTLE_ENDIAN: u32 = 1234;
pub const BIG_ENDIAN: u32 = 4321;
pub const PDP_ENDIAN: u32 = 3412;
pub const BYTE_ORDER: u32 = 1234;
pub const _BITS_BYTESWAP_H: u32 = 1;
pub const _BITS_UINTN_IDENTITY_H: u32 = 1;
pub const _SYS_SELECT_H: u32 = 1;
pub const __sigset_t_defined: u32 = 1;
pub const __timeval_defined: u32 = 1;
pub const _STRUCT_TIMESPEC: u32 = 1;
pub const FD_SETSIZE: u32 = 1024;
pub const _BITS_PTHREADTYPES_COMMON_H: u32 = 1;
pub const _THREAD_SHARED_TYPES_H: u32 = 1;
pub const _BITS_PTHREADTYPES_ARCH_H: u32 = 1;
pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 40;
pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 56;
pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 56;
pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 32;
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 4;
pub const __SIZEOF_PTHREAD_COND_T: u32 = 48;
pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 4;
pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8;
pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4;
pub const _THREAD_MUTEX_INTERNAL_H: u32 = 1;
pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 1;
pub const __have_pthread_attr_t: u32 = 1;
pub const __SIZEOF_SEM_T: u32 = 32;
pub const CSP_RDP_CLOSED_BY_USERSPACE: u32 = 1;
pub const CSP_RDP_CLOSED_BY_PROTOCOL: u32 = 2;
pub const CSP_RDP_CLOSED_BY_TIMEOUT: u32 = 4;
pub const CSP_RDP_CLOSED_BY_ALL: u32 = 7;
pub const CSP_IF_LOOPBACK_NAME: &[u8; 5] = b"LOOP\0";
pub const _PTHREAD_H: u32 = 1;
pub const _SCHED_H: u32 = 1;
pub const _BITS_SCHED_H: u32 = 1;
pub const SCHED_OTHER: u32 = 0;
pub const SCHED_FIFO: u32 = 1;
pub const SCHED_RR: u32 = 2;
pub const _BITS_TYPES_STRUCT_SCHED_PARAM: u32 = 1;
pub const _BITS_CPU_SET_H: u32 = 1;
pub const __CPU_SETSIZE: u32 = 1024;
pub const _TIME_H: u32 = 1;
pub const _BITS_TIME_H: u32 = 1;
pub const CLOCK_REALTIME: u32 = 0;
pub const CLOCK_MONOTONIC: u32 = 1;
pub const CLOCK_PROCESS_CPUTIME_ID: u32 = 2;
pub const CLOCK_THREAD_CPUTIME_ID: u32 = 3;
pub const CLOCK_MONOTONIC_RAW: u32 = 4;
pub const CLOCK_REALTIME_COARSE: u32 = 5;
pub const CLOCK_MONOTONIC_COARSE: u32 = 6;
pub const CLOCK_BOOTTIME: u32 = 7;
pub const CLOCK_REALTIME_ALARM: u32 = 8;
pub const CLOCK_BOOTTIME_ALARM: u32 = 9;
pub const CLOCK_TAI: u32 = 11;
pub const TIMER_ABSTIME: u32 = 1;
pub const __struct_tm_defined: u32 = 1;
pub const __itimerspec_defined: u32 = 1;
pub const TIME_UTC: u32 = 1;
pub const _BITS_SETJMP_H: u32 = 1;
pub const __jmp_buf_tag_defined: u32 = 1;
pub const PTHREAD_STACK_MIN: u32 = 16384;
pub const PTHREAD_ONCE_INIT: u32 = 0;
pub const PTHREAD_BARRIER_SERIAL_THREAD: i32 = -1;
pub const _NETINET_IN_H: u32 = 1;
pub const _SYS_SOCKET_H: u32 = 1;
pub const __iovec_defined: u32 = 1;
pub const PF_UNSPEC: u32 = 0;
pub const PF_LOCAL: u32 = 1;
pub const PF_UNIX: u32 = 1;
pub const PF_FILE: u32 = 1;
pub const PF_INET: u32 = 2;
pub const PF_AX25: u32 = 3;
pub const PF_IPX: u32 = 4;
pub const PF_APPLETALK: u32 = 5;
pub const PF_NETROM: u32 = 6;
pub const PF_BRIDGE: u32 = 7;
pub const PF_ATMPVC: u32 = 8;
pub const PF_X25: u32 = 9;
pub const PF_INET6: u32 = 10;
pub const PF_ROSE: u32 = 11;
pub const PF_DECnet: u32 = 12;
pub const PF_NETBEUI: u32 = 13;
pub const PF_SECURITY: u32 = 14;
pub const PF_KEY: u32 = 15;
pub const PF_NETLINK: u32 = 16;
pub const PF_ROUTE: u32 = 16;
pub const PF_PACKET: u32 = 17;
pub const PF_ASH: u32 = 18;
pub const PF_ECONET: u32 = 19;
pub const PF_ATMSVC: u32 = 20;
pub const PF_RDS: u32 = 21;
pub const PF_SNA: u32 = 22;
pub const PF_IRDA: u32 = 23;
pub const PF_PPPOX: u32 = 24;
pub const PF_WANPIPE: u32 = 25;
pub const PF_LLC: u32 = 26;
pub const PF_IB: u32 = 27;
pub const PF_MPLS: u32 = 28;
pub const PF_CAN: u32 = 29;
pub const PF_TIPC: u32 = 30;
pub const PF_BLUETOOTH: u32 = 31;
pub const PF_IUCV: u32 = 32;
pub const PF_RXRPC: u32 = 33;
pub const PF_ISDN: u32 = 34;
pub const PF_PHONET: u32 = 35;
pub const PF_IEEE802154: u32 = 36;
pub const PF_CAIF: u32 = 37;
pub const PF_ALG: u32 = 38;
pub const PF_NFC: u32 = 39;
pub const PF_VSOCK: u32 = 40;
pub const PF_KCM: u32 = 41;
pub const PF_QIPCRTR: u32 = 42;
pub const PF_SMC: u32 = 43;
pub const PF_XDP: u32 = 44;
pub const PF_MCTP: u32 = 45;
pub const PF_MAX: u32 = 46;
pub const AF_UNSPEC: u32 = 0;
pub const AF_LOCAL: u32 = 1;
pub const AF_UNIX: u32 = 1;
pub const AF_FILE: u32 = 1;
pub const AF_INET: u32 = 2;
pub const AF_AX25: u32 = 3;
pub const AF_IPX: u32 = 4;
pub const AF_APPLETALK: u32 = 5;
pub const AF_NETROM: u32 = 6;
pub const AF_BRIDGE: u32 = 7;
pub const AF_ATMPVC: u32 = 8;
pub const AF_X25: u32 = 9;
pub const AF_INET6: u32 = 10;
pub const AF_ROSE: u32 = 11;
pub const AF_DECnet: u32 = 12;
pub const AF_NETBEUI: u32 = 13;
pub const AF_SECURITY: u32 = 14;
pub const AF_KEY: u32 = 15;
pub const AF_NETLINK: u32 = 16;
pub const AF_ROUTE: u32 = 16;
pub const AF_PACKET: u32 = 17;
pub const AF_ASH: u32 = 18;
pub const AF_ECONET: u32 = 19;
pub const AF_ATMSVC: u32 = 20;
pub const AF_RDS: u32 = 21;
pub const AF_SNA: u32 = 22;
pub const AF_IRDA: u32 = 23;
pub const AF_PPPOX: u32 = 24;
pub const AF_WANPIPE: u32 = 25;
pub const AF_LLC: u32 = 26;
pub const AF_IB: u32 = 27;
pub const AF_MPLS: u32 = 28;
pub const AF_CAN: u32 = 29;
pub const AF_TIPC: u32 = 30;
pub const AF_BLUETOOTH: u32 = 31;
pub const AF_IUCV: u32 = 32;
pub const AF_RXRPC: u32 = 33;
pub const AF_ISDN: u32 = 34;
pub const AF_PHONET: u32 = 35;
pub const AF_IEEE802154: u32 = 36;
pub const AF_CAIF: u32 = 37;
pub const AF_ALG: u32 = 38;
pub const AF_NFC: u32 = 39;
pub const AF_VSOCK: u32 = 40;
pub const AF_KCM: u32 = 41;
pub const AF_QIPCRTR: u32 = 42;
pub const AF_SMC: u32 = 43;
pub const AF_XDP: u32 = 44;
pub const AF_MCTP: u32 = 45;
pub const AF_MAX: u32 = 46;
pub const SOL_RAW: u32 = 255;
pub const SOL_DECNET: u32 = 261;
pub const SOL_X25: u32 = 262;
pub const SOL_PACKET: u32 = 263;
pub const SOL_ATM: u32 = 264;
pub const SOL_AAL: u32 = 265;
pub const SOL_IRDA: u32 = 266;
pub const SOL_NETBEUI: u32 = 267;
pub const SOL_LLC: u32 = 268;
pub const SOL_DCCP: u32 = 269;
pub const SOL_NETLINK: u32 = 270;
pub const SOL_TIPC: u32 = 271;
pub const SOL_RXRPC: u32 = 272;
pub const SOL_PPPOL2TP: u32 = 273;
pub const SOL_BLUETOOTH: u32 = 274;
pub const SOL_PNPIPE: u32 = 275;
pub const SOL_RDS: u32 = 276;
pub const SOL_IUCV: u32 = 277;
pub const SOL_CAIF: u32 = 278;
pub const SOL_ALG: u32 = 279;
pub const SOL_NFC: u32 = 280;
pub const SOL_KCM: u32 = 281;
pub const SOL_TLS: u32 = 282;
pub const SOL_XDP: u32 = 283;
pub const SOMAXCONN: u32 = 4096;
pub const _BITS_SOCKADDR_H: u32 = 1;
pub const _SS_SIZE: u32 = 128;
pub const __BITS_PER_LONG: u32 = 64;
pub const FIOSETOWN: u32 = 35073;
pub const SIOCSPGRP: u32 = 35074;
pub const FIOGETOWN: u32 = 35075;
pub const SIOCGPGRP: u32 = 35076;
pub const SIOCATMARK: u32 = 35077;
pub const SIOCGSTAMP_OLD: u32 = 35078;
pub const SIOCGSTAMPNS_OLD: u32 = 35079;
pub const SOL_SOCKET: u32 = 1;
pub const SO_DEBUG: u32 = 1;
pub const SO_REUSEADDR: u32 = 2;
pub const SO_TYPE: u32 = 3;
pub const SO_ERROR: u32 = 4;
pub const SO_DONTROUTE: u32 = 5;
pub const SO_BROADCAST: u32 = 6;
pub const SO_SNDBUF: u32 = 7;
pub const SO_RCVBUF: u32 = 8;
pub const SO_SNDBUFFORCE: u32 = 32;
pub const SO_RCVBUFFORCE: u32 = 33;
pub const SO_KEEPALIVE: u32 = 9;
pub const SO_OOBINLINE: u32 = 10;
pub const SO_NO_CHECK: u32 = 11;
pub const SO_PRIORITY: u32 = 12;
pub const SO_LINGER: u32 = 13;
pub const SO_BSDCOMPAT: u32 = 14;
pub const SO_REUSEPORT: u32 = 15;
pub const SO_PASSCRED: u32 = 16;
pub const SO_PEERCRED: u32 = 17;
pub const SO_RCVLOWAT: u32 = 18;
pub const SO_SNDLOWAT: u32 = 19;
pub const SO_RCVTIMEO_OLD: u32 = 20;
pub const SO_SNDTIMEO_OLD: u32 = 21;
pub const SO_SECURITY_AUTHENTICATION: u32 = 22;
pub const SO_SECURITY_ENCRYPTION_TRANSPORT: u32 = 23;
pub const SO_SECURITY_ENCRYPTION_NETWORK: u32 = 24;
pub const SO_BINDTODEVICE: u32 = 25;
pub const SO_ATTACH_FILTER: u32 = 26;
pub const SO_DETACH_FILTER: u32 = 27;
pub const SO_GET_FILTER: u32 = 26;
pub const SO_PEERNAME: u32 = 28;
pub const SO_ACCEPTCONN: u32 = 30;
pub const SO_PEERSEC: u32 = 31;
pub const SO_PASSSEC: u32 = 34;
pub const SO_MARK: u32 = 36;
pub const SO_PROTOCOL: u32 = 38;
pub const SO_DOMAIN: u32 = 39;
pub const SO_RXQ_OVFL: u32 = 40;
pub const SO_WIFI_STATUS: u32 = 41;
pub const SCM_WIFI_STATUS: u32 = 41;
pub const SO_PEEK_OFF: u32 = 42;
pub const SO_NOFCS: u32 = 43;
pub const SO_LOCK_FILTER: u32 = 44;
pub const SO_SELECT_ERR_QUEUE: u32 = 45;
pub const SO_BUSY_POLL: u32 = 46;
pub const SO_MAX_PACING_RATE: u32 = 47;
pub const SO_BPF_EXTENSIONS: u32 = 48;
pub const SO_INCOMING_CPU: u32 = 49;
pub const SO_ATTACH_BPF: u32 = 50;
pub const SO_DETACH_BPF: u32 = 27;
pub const SO_ATTACH_REUSEPORT_CBPF: u32 = 51;
pub const SO_ATTACH_REUSEPORT_EBPF: u32 = 52;
pub const SO_CNX_ADVICE: u32 = 53;
pub const SCM_TIMESTAMPING_OPT_STATS: u32 = 54;
pub const SO_MEMINFO: u32 = 55;
pub const SO_INCOMING_NAPI_ID: u32 = 56;
pub const SO_COOKIE: u32 = 57;
pub const SCM_TIMESTAMPING_PKTINFO: u32 = 58;
pub const SO_PEERGROUPS: u32 = 59;
pub const SO_ZEROCOPY: u32 = 60;
pub const SO_TXTIME: u32 = 61;
pub const SCM_TXTIME: u32 = 61;
pub const SO_BINDTOIFINDEX: u32 = 62;
pub const SO_TIMESTAMP_OLD: u32 = 29;
pub const SO_TIMESTAMPNS_OLD: u32 = 35;
pub const SO_TIMESTAMPING_OLD: u32 = 37;
pub const SO_TIMESTAMP_NEW: u32 = 63;
pub const SO_TIMESTAMPNS_NEW: u32 = 64;
pub const SO_TIMESTAMPING_NEW: u32 = 65;
pub const SO_RCVTIMEO_NEW: u32 = 66;
pub const SO_SNDTIMEO_NEW: u32 = 67;
pub const SO_DETACH_REUSEPORT_BPF: u32 = 68;
pub const SO_PREFER_BUSY_POLL: u32 = 69;
pub const SO_BUSY_POLL_BUDGET: u32 = 70;
pub const SO_NETNS_COOKIE: u32 = 71;
pub const SO_BUF_LOCK: u32 = 72;
pub const SO_TIMESTAMP: u32 = 29;
pub const SO_TIMESTAMPNS: u32 = 35;
pub const SO_TIMESTAMPING: u32 = 37;
pub const SO_RCVTIMEO: u32 = 20;
pub const SO_SNDTIMEO: u32 = 21;
pub const SCM_TIMESTAMP: u32 = 29;
pub const SCM_TIMESTAMPNS: u32 = 35;
pub const SCM_TIMESTAMPING: u32 = 37;
pub const __osockaddr_defined: u32 = 1;
pub const __USE_KERNEL_IPV6_DEFS: u32 = 0;
pub const IP_OPTIONS: u32 = 4;
pub const IP_HDRINCL: u32 = 3;
pub const IP_TOS: u32 = 1;
pub const IP_TTL: u32 = 2;
pub const IP_RECVOPTS: u32 = 6;
pub const IP_RETOPTS: u32 = 7;
pub const IP_MULTICAST_IF: u32 = 32;
pub const IP_MULTICAST_TTL: u32 = 33;
pub const IP_MULTICAST_LOOP: u32 = 34;
pub const IP_ADD_MEMBERSHIP: u32 = 35;
pub const IP_DROP_MEMBERSHIP: u32 = 36;
pub const IP_UNBLOCK_SOURCE: u32 = 37;
pub const IP_BLOCK_SOURCE: u32 = 38;
pub const IP_ADD_SOURCE_MEMBERSHIP: u32 = 39;
pub const IP_DROP_SOURCE_MEMBERSHIP: u32 = 40;
pub const IP_MSFILTER: u32 = 41;
pub const MCAST_JOIN_GROUP: u32 = 42;
pub const MCAST_BLOCK_SOURCE: u32 = 43;
pub const MCAST_UNBLOCK_SOURCE: u32 = 44;
pub const MCAST_LEAVE_GROUP: u32 = 45;
pub const MCAST_JOIN_SOURCE_GROUP: u32 = 46;
pub const MCAST_LEAVE_SOURCE_GROUP: u32 = 47;
pub const MCAST_MSFILTER: u32 = 48;
pub const IP_MULTICAST_ALL: u32 = 49;
pub const IP_UNICAST_IF: u32 = 50;
pub const MCAST_EXCLUDE: u32 = 0;
pub const MCAST_INCLUDE: u32 = 1;
pub const IP_ROUTER_ALERT: u32 = 5;
pub const IP_PKTINFO: u32 = 8;
pub const IP_PKTOPTIONS: u32 = 9;
pub const IP_PMTUDISC: u32 = 10;
pub const IP_MTU_DISCOVER: u32 = 10;
pub const IP_RECVERR: u32 = 11;
pub const IP_RECVTTL: u32 = 12;
pub const IP_RECVTOS: u32 = 13;
pub const IP_MTU: u32 = 14;
pub const IP_FREEBIND: u32 = 15;
pub const IP_IPSEC_POLICY: u32 = 16;
pub const IP_XFRM_POLICY: u32 = 17;
pub const IP_PASSSEC: u32 = 18;
pub const IP_TRANSPARENT: u32 = 19;
pub const IP_ORIGDSTADDR: u32 = 20;
pub const IP_RECVORIGDSTADDR: u32 = 20;
pub const IP_MINTTL: u32 = 21;
pub const IP_NODEFRAG: u32 = 22;
pub const IP_CHECKSUM: u32 = 23;
pub const IP_BIND_ADDRESS_NO_PORT: u32 = 24;
pub const IP_RECVFRAGSIZE: u32 = 25;
pub const IP_RECVERR_RFC4884: u32 = 26;
pub const IP_PMTUDISC_DONT: u32 = 0;
pub const IP_PMTUDISC_WANT: u32 = 1;
pub const IP_PMTUDISC_DO: u32 = 2;
pub const IP_PMTUDISC_PROBE: u32 = 3;
pub const IP_PMTUDISC_INTERFACE: u32 = 4;
pub const IP_PMTUDISC_OMIT: u32 = 5;
pub const SOL_IP: u32 = 0;
pub const IP_DEFAULT_MULTICAST_TTL: u32 = 1;
pub const IP_DEFAULT_MULTICAST_LOOP: u32 = 1;
pub const IP_MAX_MEMBERSHIPS: u32 = 20;
pub const IPV6_ADDRFORM: u32 = 1;
pub const IPV6_2292PKTINFO: u32 = 2;
pub const IPV6_2292HOPOPTS: u32 = 3;
pub const IPV6_2292DSTOPTS: u32 = 4;
pub const IPV6_2292RTHDR: u32 = 5;
pub const IPV6_2292PKTOPTIONS: u32 = 6;
pub const IPV6_CHECKSUM: u32 = 7;
pub const IPV6_2292HOPLIMIT: u32 = 8;
pub const IPV6_NEXTHOP: u32 = 9;
pub const IPV6_AUTHHDR: u32 = 10;
pub const IPV6_UNICAST_HOPS: u32 = 16;
pub const IPV6_MULTICAST_IF: u32 = 17;
pub const IPV6_MULTICAST_HOPS: u32 = 18;
pub const IPV6_MULTICAST_LOOP: u32 = 19;
pub const IPV6_JOIN_GROUP: u32 = 20;
pub const IPV6_LEAVE_GROUP: u32 = 21;
pub const IPV6_ROUTER_ALERT: u32 = 22;
pub const IPV6_MTU_DISCOVER: u32 = 23;
pub const IPV6_MTU: u32 = 24;
pub const IPV6_RECVERR: u32 = 25;
pub const IPV6_V6ONLY: u32 = 26;
pub const IPV6_JOIN_ANYCAST: u32 = 27;
pub const IPV6_LEAVE_ANYCAST: u32 = 28;
pub const IPV6_MULTICAST_ALL: u32 = 29;
pub const IPV6_ROUTER_ALERT_ISOLATE: u32 = 30;
pub const IPV6_RECVERR_RFC4884: u32 = 31;
pub const IPV6_IPSEC_POLICY: u32 = 34;
pub const IPV6_XFRM_POLICY: u32 = 35;
pub const IPV6_HDRINCL: u32 = 36;
pub const IPV6_RECVPKTINFO: u32 = 49;
pub const IPV6_PKTINFO: u32 = 50;
pub const IPV6_RECVHOPLIMIT: u32 = 51;
pub const IPV6_HOPLIMIT: u32 = 52;
pub const IPV6_RECVHOPOPTS: u32 = 53;
pub const IPV6_HOPOPTS: u32 = 54;
pub const IPV6_RTHDRDSTOPTS: u32 = 55;
pub const IPV6_RECVRTHDR: u32 = 56;
pub const IPV6_RTHDR: u32 = 57;
pub const IPV6_RECVDSTOPTS: u32 = 58;
pub const IPV6_DSTOPTS: u32 = 59;
pub const IPV6_RECVPATHMTU: u32 = 60;
pub const IPV6_PATHMTU: u32 = 61;
pub const IPV6_DONTFRAG: u32 = 62;
pub const IPV6_RECVTCLASS: u32 = 66;
pub const IPV6_TCLASS: u32 = 67;
pub const IPV6_AUTOFLOWLABEL: u32 = 70;
pub const IPV6_ADDR_PREFERENCES: u32 = 72;
pub const IPV6_MINHOPCOUNT: u32 = 73;
pub const IPV6_ORIGDSTADDR: u32 = 74;
pub const IPV6_RECVORIGDSTADDR: u32 = 74;
pub const IPV6_TRANSPARENT: u32 = 75;
pub const IPV6_UNICAST_IF: u32 = 76;
pub const IPV6_RECVFRAGSIZE: u32 = 77;
pub const IPV6_FREEBIND: u32 = 78;
pub const IPV6_ADD_MEMBERSHIP: u32 = 20;
pub const IPV6_DROP_MEMBERSHIP: u32 = 21;
pub const IPV6_RXHOPOPTS: u32 = 54;
pub const IPV6_RXDSTOPTS: u32 = 59;
pub const IPV6_PMTUDISC_DONT: u32 = 0;
pub const IPV6_PMTUDISC_WANT: u32 = 1;
pub const IPV6_PMTUDISC_DO: u32 = 2;
pub const IPV6_PMTUDISC_PROBE: u32 = 3;
pub const IPV6_PMTUDISC_INTERFACE: u32 = 4;
pub const IPV6_PMTUDISC_OMIT: u32 = 5;
pub const SOL_IPV6: u32 = 41;
pub const SOL_ICMPV6: u32 = 58;
pub const IPV6_RTHDR_LOOSE: u32 = 0;
pub const IPV6_RTHDR_STRICT: u32 = 1;
pub const IPV6_RTHDR_TYPE_0: u32 = 0;
pub const IN_CLASSA_NET: u32 = 4278190080;
pub const IN_CLASSA_NSHIFT: u32 = 24;
pub const IN_CLASSA_HOST: u32 = 16777215;
pub const IN_CLASSA_MAX: u32 = 128;
pub const IN_CLASSB_NET: u32 = 4294901760;
pub const IN_CLASSB_NSHIFT: u32 = 16;
pub const IN_CLASSB_HOST: u32 = 65535;
pub const IN_CLASSB_MAX: u32 = 65536;
pub const IN_CLASSC_NET: u32 = 4294967040;
pub const IN_CLASSC_NSHIFT: u32 = 8;
pub const IN_CLASSC_HOST: u32 = 255;
pub const IN_LOOPBACKNET: u32 = 127;
pub const INET_ADDRSTRLEN: u32 = 16;
pub const INET6_ADDRSTRLEN: u32 = 46;
pub type __u_char = ::core::ffi::c_uchar;
pub type __u_short = ::core::ffi::c_ushort;
pub type __u_int = ::core::ffi::c_uint;
pub type __u_long = ::core::ffi::c_ulong;
pub type __int8_t = ::core::ffi::c_schar;
pub type __uint8_t = ::core::ffi::c_uchar;
pub type __int16_t = ::core::ffi::c_short;
pub type __uint16_t = ::core::ffi::c_ushort;
pub type __int32_t = ::core::ffi::c_int;
pub type __uint32_t = ::core::ffi::c_uint;
pub type __int64_t = ::core::ffi::c_long;
pub type __uint64_t = ::core::ffi::c_ulong;
pub type __int_least8_t = __int8_t;
pub type __uint_least8_t = __uint8_t;
pub type __int_least16_t = __int16_t;
pub type __uint_least16_t = __uint16_t;
pub type __int_least32_t = __int32_t;
pub type __uint_least32_t = __uint32_t;
pub type __int_least64_t = __int64_t;
pub type __uint_least64_t = __uint64_t;
pub type __quad_t = ::core::ffi::c_long;
pub type __u_quad_t = ::core::ffi::c_ulong;
pub type __intmax_t = ::core::ffi::c_long;
pub type __uintmax_t = ::core::ffi::c_ulong;
pub type __dev_t = ::core::ffi::c_ulong;
pub type __uid_t = ::core::ffi::c_uint;
pub type __gid_t = ::core::ffi::c_uint;
pub type __ino_t = ::core::ffi::c_ulong;
pub type __ino64_t = ::core::ffi::c_ulong;
pub type __mode_t = ::core::ffi::c_uint;
pub type __nlink_t = ::core::ffi::c_ulong;
pub type __off_t = ::core::ffi::c_long;
pub type __off64_t = ::core::ffi::c_long;
pub type __pid_t = ::core::ffi::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __fsid_t {
pub __val: [::core::ffi::c_int; 2usize],
}
#[test]
fn bindgen_test_layout___fsid_t() {
const UNINIT: ::core::mem::MaybeUninit<__fsid_t> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<__fsid_t>(),
8usize,
concat!("Size of: ", stringify!(__fsid_t))
);
assert_eq!(
::core::mem::align_of::<__fsid_t>(),
4usize,
concat!("Alignment of ", stringify!(__fsid_t))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__val) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__fsid_t),
"::",
stringify!(__val)
)
);
}
pub type __clock_t = ::core::ffi::c_long;
pub type __rlim_t = ::core::ffi::c_ulong;
pub type __rlim64_t = ::core::ffi::c_ulong;
pub type __id_t = ::core::ffi::c_uint;
pub type __time_t = ::core::ffi::c_long;
pub type __useconds_t = ::core::ffi::c_uint;
pub type __suseconds_t = ::core::ffi::c_long;
pub type __suseconds64_t = ::core::ffi::c_long;
pub type __daddr_t = ::core::ffi::c_int;
pub type __key_t = ::core::ffi::c_int;
pub type __clockid_t = ::core::ffi::c_int;
pub type __timer_t = *mut ::core::ffi::c_void;
pub type __blksize_t = ::core::ffi::c_long;
pub type __blkcnt_t = ::core::ffi::c_long;
pub type __blkcnt64_t = ::core::ffi::c_long;
pub type __fsblkcnt_t = ::core::ffi::c_ulong;
pub type __fsblkcnt64_t = ::core::ffi::c_ulong;
pub type __fsfilcnt_t = ::core::ffi::c_ulong;
pub type __fsfilcnt64_t = ::core::ffi::c_ulong;
pub type __fsword_t = ::core::ffi::c_long;
pub type __ssize_t = ::core::ffi::c_long;
pub type __syscall_slong_t = ::core::ffi::c_long;
pub type __syscall_ulong_t = ::core::ffi::c_ulong;
pub type __loff_t = __off64_t;
pub type __caddr_t = *mut ::core::ffi::c_char;
pub type __intptr_t = ::core::ffi::c_long;
pub type __socklen_t = ::core::ffi::c_uint;
pub type __sig_atomic_t = ::core::ffi::c_int;
pub type int_least8_t = __int_least8_t;
pub type int_least16_t = __int_least16_t;
pub type int_least32_t = __int_least32_t;
pub type int_least64_t = __int_least64_t;
pub type uint_least8_t = __uint_least8_t;
pub type uint_least16_t = __uint_least16_t;
pub type uint_least32_t = __uint_least32_t;
pub type uint_least64_t = __uint_least64_t;
pub type int_fast8_t = ::core::ffi::c_schar;
pub type int_fast16_t = ::core::ffi::c_long;
pub type int_fast32_t = ::core::ffi::c_long;
pub type int_fast64_t = ::core::ffi::c_long;
pub type uint_fast8_t = ::core::ffi::c_uchar;
pub type uint_fast16_t = ::core::ffi::c_ulong;
pub type uint_fast32_t = ::core::ffi::c_ulong;
pub type uint_fast64_t = ::core::ffi::c_ulong;
pub type intmax_t = __intmax_t;
pub type uintmax_t = __uintmax_t;
pub type __gwchar_t = ::core::ffi::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct imaxdiv_t {
pub quot: ::core::ffi::c_long,
pub rem: ::core::ffi::c_long,
}
#[test]
fn bindgen_test_layout_imaxdiv_t() {
const UNINIT: ::core::mem::MaybeUninit<imaxdiv_t> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<imaxdiv_t>(),
16usize,
concat!("Size of: ", stringify!(imaxdiv_t))
);
assert_eq!(
::core::mem::align_of::<imaxdiv_t>(),
8usize,
concat!("Alignment of ", stringify!(imaxdiv_t))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).quot) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(imaxdiv_t),
"::",
stringify!(quot)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).rem) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(imaxdiv_t),
"::",
stringify!(rem)
)
);
}
extern "C" {
pub fn imaxabs(__n: intmax_t) -> intmax_t;
}
extern "C" {
pub fn imaxdiv(__numer: intmax_t, __denom: intmax_t) -> imaxdiv_t;
}
extern "C" {
pub fn strtoimax(
__nptr: *const ::core::ffi::c_char,
__endptr: *mut *mut ::core::ffi::c_char,
__base: ::core::ffi::c_int,
) -> intmax_t;
}
extern "C" {
pub fn strtoumax(
__nptr: *const ::core::ffi::c_char,
__endptr: *mut *mut ::core::ffi::c_char,
__base: ::core::ffi::c_int,
) -> uintmax_t;
}
extern "C" {
pub fn wcstoimax(
__nptr: *const __gwchar_t,
__endptr: *mut *mut __gwchar_t,
__base: ::core::ffi::c_int,
) -> intmax_t;
}
extern "C" {
pub fn wcstoumax(
__nptr: *const __gwchar_t,
__endptr: *mut *mut __gwchar_t,
__base: ::core::ffi::c_int,
) -> uintmax_t;
}
extern "C" {
#[doc = " Error counters"]
pub static mut csp_dbg_buffer_out: u8;
}
extern "C" {
pub static mut csp_dbg_conn_out: u8;
}
extern "C" {
pub static mut csp_dbg_conn_ovf: u8;
}
extern "C" {
pub static mut csp_dbg_conn_noroute: u8;
}
extern "C" {
pub static mut csp_dbg_inval_reply: u8;
}
extern "C" {
pub static mut csp_dbg_errno: u8;
}
extern "C" {
pub static mut csp_dbg_can_errno: u8;
}
extern "C" {
pub static mut csp_dbg_eth_errno: u8;
}
extern "C" {
pub static mut csp_dbg_rdp_print: u8;
}
extern "C" {
pub static mut csp_dbg_packet_print: u8;
}
extern "C" {
pub fn csp_print_func(fmt: *const ::core::ffi::c_char, ...);
}
pub type wchar_t = ::core::ffi::c_int;
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct max_align_t {
pub __clang_max_align_nonce1: ::core::ffi::c_longlong,
pub __bindgen_padding_0: u64,
pub __clang_max_align_nonce2: u128,
}
#[test]
fn bindgen_test_layout_max_align_t() {
const UNINIT: ::core::mem::MaybeUninit<max_align_t> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<max_align_t>(),
32usize,
concat!("Size of: ", stringify!(max_align_t))
);
assert_eq!(
::core::mem::align_of::<max_align_t>(),
16usize,
concat!("Alignment of ", stringify!(max_align_t))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__clang_max_align_nonce1) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(max_align_t),
"::",
stringify!(__clang_max_align_nonce1)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__clang_max_align_nonce2) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(max_align_t),
"::",
stringify!(__clang_max_align_nonce2)
)
);
}
pub type csp_queue_handle_t = *mut ::core::ffi::c_void;
pub type csp_static_queue_t = *mut ::core::ffi::c_void;
extern "C" {
pub fn csp_queue_create_static(
length: ::core::ffi::c_int,
item_size: usize,
buffer: *mut ::core::ffi::c_char,
queue: *mut csp_static_queue_t,
) -> csp_queue_handle_t;
}
extern "C" {
#[doc = " Enqueue (back) value.\n\n @param[in] handle queue.\n @param[in] value value to add (by copy)\n @param[in] timeout timeout, time to wait for free space\n @return #CSP_QUEUE_OK on success, otherwise a queue error code."]
pub fn csp_queue_enqueue(
handle: csp_queue_handle_t,
value: *const ::core::ffi::c_void,
timeout: u32,
) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Enqueue (back) value from ISR.\n\n @param[in] handle queue.\n @param[in] value value to add (by copy)\n @param[out] pxTaskWoken Valid reference if called from ISR, otherwise NULL!\n @return #CSP_QUEUE_OK on success, otherwise a queue error code."]
pub fn csp_queue_enqueue_isr(
handle: csp_queue_handle_t,
value: *const ::core::ffi::c_void,
pxTaskWoken: *mut ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Dequeue value (front).\n\n @param[in] handle queue.\n @param[out] buf extracted element (by copy).\n @param[in] timeout timeout, time to wait for element in queue.\n @return #CSP_QUEUE_OK on success, otherwise a queue error code."]
pub fn csp_queue_dequeue(
handle: csp_queue_handle_t,
buf: *mut ::core::ffi::c_void,
timeout: u32,
) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Dequeue value (front) from ISR.\n\n @param[in] handle queue.\n @param[out] buf extracted element (by copy).\n @param[out] pxTaskWoken Valid reference if called from ISR, otherwise NULL!\n @return #CSP_QUEUE_OK on success, otherwise a queue error code."]
pub fn csp_queue_dequeue_isr(
handle: csp_queue_handle_t,
buf: *mut ::core::ffi::c_void,
pxTaskWoken: *mut ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Queue size.\n\n @param[in] handle handle queue.\n @return Number of elements in the queue."]
pub fn csp_queue_size(handle: csp_queue_handle_t) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Queue size from ISR.\n\n @param[in] handle handle queue.\n @return Number of elements in the queue."]
pub fn csp_queue_size_isr(handle: csp_queue_handle_t) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Free queue object (handle).\n\n @param[in] handle handle queue."]
pub fn csp_queue_free(handle: csp_queue_handle_t) -> ::core::ffi::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct csp_timestamp_t {
pub tv_sec: u32,
pub tv_nsec: u32,
}
#[test]
fn bindgen_test_layout_csp_timestamp_t() {
const UNINIT: ::core::mem::MaybeUninit<csp_timestamp_t> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<csp_timestamp_t>(),
8usize,
concat!("Size of: ", stringify!(csp_timestamp_t))
);
assert_eq!(
::core::mem::align_of::<csp_timestamp_t>(),
4usize,
concat!("Alignment of ", stringify!(csp_timestamp_t))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(csp_timestamp_t),
"::",
stringify!(tv_sec)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(csp_timestamp_t),
"::",
stringify!(tv_nsec)
)
);
}
pub const csp_service_port_t_CSP_CMP: csp_service_port_t = 0;
pub const csp_service_port_t_CSP_PING: csp_service_port_t = 1;
pub const csp_service_port_t_CSP_PS: csp_service_port_t = 2;
pub const csp_service_port_t_CSP_MEMFREE: csp_service_port_t = 3;
pub const csp_service_port_t_CSP_REBOOT: csp_service_port_t = 4;
pub const csp_service_port_t_CSP_BUF_FREE: csp_service_port_t = 5;
pub const csp_service_port_t_CSP_UPTIME: csp_service_port_t = 6;
#[doc = " Reserved ports for CSP services."]
pub type csp_service_port_t = ::core::ffi::c_uint;
#[doc = "!< Critical"]
pub const csp_prio_t_CSP_PRIO_CRITICAL: csp_prio_t = 0;
#[doc = "!< High"]
pub const csp_prio_t_CSP_PRIO_HIGH: csp_prio_t = 1;
#[doc = "!< Normal (default)"]
pub const csp_prio_t_CSP_PRIO_NORM: csp_prio_t = 2;
#[doc = "!< Low"]
pub const csp_prio_t_CSP_PRIO_LOW: csp_prio_t = 3;
#[doc = "Message priority."]
pub type csp_prio_t = ::core::ffi::c_uint;
#[doc = "CSP identifier/header."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __packed {
pub pri: u8,
pub flags: u8,
pub src: u16,
pub dst: u16,
pub dport: u8,
pub sport: u8,
}
#[test]
fn bindgen_test_layout___packed() {
const UNINIT: ::core::mem::MaybeUninit<__packed> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<__packed>(),
8usize,
concat!("Size of: ", stringify!(__packed))
);
assert_eq!(
::core::mem::align_of::<__packed>(),
2usize,
concat!("Alignment of ", stringify!(__packed))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).pri) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__packed),
"::",
stringify!(pri)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(__packed),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).src) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(__packed),
"::",
stringify!(src)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).dst) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(__packed),
"::",
stringify!(dst)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).dport) as usize - ptr as usize },
6usize,
concat!(
"Offset of field: ",
stringify!(__packed),
"::",
stringify!(dport)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).sport) as usize - ptr as usize },
7usize,
concat!(
"Offset of field: ",
stringify!(__packed),
"::",
stringify!(sport)
)
);
}
#[doc = "CSP identifier/header."]
pub type csp_id_t = __packed;
#[doc = " CSP Packet.\n\n This structure is constructed to fit with all interface and protocols to prevent the\n need to copy data (zero copy).\n\n .. note:: In most cases a CSP packet cannot be reused in case of send failure, because the\n \t\t\t lower layers may add additional data causing increased length (e.g. CRC32), convert\n \t\t\t the CSP id to different endian (e.g. I2C), etc.\n"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct csp_packet_s {
pub __bindgen_anon_1: csp_packet_s__bindgen_ty_1,
pub length: u16,
pub id: csp_id_t,
pub next: *mut csp_packet_s,
#[doc = " Additional header bytes, to prepend packed data before transmission\n This must be minimum 6 bytes to accomodate CSP 2.0. But some implementations\n require much more scratch working area for encryption for example.\n\n Ultimately after csp_id_pack() this area will be filled with the CSP header"]
pub header: [u8; 8usize],
pub __bindgen_anon_2: csp_packet_s__bindgen_ty_2,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union csp_packet_s__bindgen_ty_1 {
pub __bindgen_anon_1: csp_packet_s__bindgen_ty_1__bindgen_ty_1,
pub __bindgen_anon_2: csp_packet_s__bindgen_ty_1__bindgen_ty_2,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct csp_packet_s__bindgen_ty_1__bindgen_ty_1 {
pub rdp_quarantine: u32,
pub timestamp_tx: u32,
pub timestamp_rx: u32,
pub conn: *mut csp_conn_s,
}
#[test]
fn bindgen_test_layout_csp_packet_s__bindgen_ty_1__bindgen_ty_1() {
const UNINIT: ::core::mem::MaybeUninit<csp_packet_s__bindgen_ty_1__bindgen_ty_1> =
::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<csp_packet_s__bindgen_ty_1__bindgen_ty_1>(),
24usize,
concat!(
"Size of: ",
stringify!(csp_packet_s__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::core::mem::align_of::<csp_packet_s__bindgen_ty_1__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(csp_packet_s__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).rdp_quarantine) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(csp_packet_s__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(rdp_quarantine)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).timestamp_tx) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(csp_packet_s__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(timestamp_tx)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).timestamp_rx) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(csp_packet_s__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(timestamp_rx)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).conn) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(csp_packet_s__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(conn)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct csp_packet_s__bindgen_ty_1__bindgen_ty_2 {
pub rx_count: u16,
pub remain: u16,
pub cfpid: u32,
pub last_used: u32,
pub frame_begin: *mut u8,
pub frame_length: u16,
}
#[test]
fn bindgen_test_layout_csp_packet_s__bindgen_ty_1__bindgen_ty_2() {
const UNINIT: ::core::mem::MaybeUninit<csp_packet_s__bindgen_ty_1__bindgen_ty_2> =
::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<csp_packet_s__bindgen_ty_1__bindgen_ty_2>(),
32usize,
concat!(
"Size of: ",
stringify!(csp_packet_s__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
::core::mem::align_of::<csp_packet_s__bindgen_ty_1__bindgen_ty_2>(),
8usize,
concat!(
"Alignment of ",
stringify!(csp_packet_s__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).rx_count) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(csp_packet_s__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(rx_count)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).remain) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(csp_packet_s__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(remain)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).cfpid) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(csp_packet_s__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(cfpid)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).last_used) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(csp_packet_s__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(last_used)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).frame_begin) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(csp_packet_s__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(frame_begin)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).frame_length) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(csp_packet_s__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(frame_length)
)
);
}
#[test]
fn bindgen_test_layout_csp_packet_s__bindgen_ty_1() {
assert_eq!(
::core::mem::size_of::<csp_packet_s__bindgen_ty_1>(),
32usize,
concat!("Size of: ", stringify!(csp_packet_s__bindgen_ty_1))
);
assert_eq!(
::core::mem::align_of::<csp_packet_s__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(csp_packet_s__bindgen_ty_1))
);
}
#[doc = " Data part of packet:"]
#[repr(C)]
#[derive(Copy, Clone)]
pub union csp_packet_s__bindgen_ty_2 {
pub data: [u8; 256usize],
pub data16: [u16; 128usize],
pub data32: [u32; 64usize],
}
#[test]
fn bindgen_test_layout_csp_packet_s__bindgen_ty_2() {
const UNINIT: ::core::mem::MaybeUninit<csp_packet_s__bindgen_ty_2> =
::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<csp_packet_s__bindgen_ty_2>(),
256usize,
concat!("Size of: ", stringify!(csp_packet_s__bindgen_ty_2))
);
assert_eq!(
::core::mem::align_of::<csp_packet_s__bindgen_ty_2>(),
4usize,
concat!("Alignment of ", stringify!(csp_packet_s__bindgen_ty_2))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(csp_packet_s__bindgen_ty_2),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).data16) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(csp_packet_s__bindgen_ty_2),
"::",
stringify!(data16)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).data32) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(csp_packet_s__bindgen_ty_2),
"::",
stringify!(data32)
)
);
}
#[test]
fn bindgen_test_layout_csp_packet_s() {
const UNINIT: ::core::mem::MaybeUninit<csp_packet_s> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<csp_packet_s>(),
320usize,
concat!("Size of: ", stringify!(csp_packet_s))
);
assert_eq!(
::core::mem::align_of::<csp_packet_s>(),
8usize,
concat!("Alignment of ", stringify!(csp_packet_s))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).length) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(csp_packet_s),
"::",
stringify!(length)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).id) as usize - ptr as usize },
34usize,
concat!(
"Offset of field: ",
stringify!(csp_packet_s),
"::",
stringify!(id)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).next) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(csp_packet_s),
"::",
stringify!(next)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).header) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(csp_packet_s),
"::",
stringify!(header)
)
);
}
#[doc = " CSP Packet.\n\n This structure is constructed to fit with all interface and protocols to prevent the\n need to copy data (zero copy).\n\n .. note:: In most cases a CSP packet cannot be reused in case of send failure, because the\n \t\t\t lower layers may add additional data causing increased length (e.g. CRC32), convert\n \t\t\t the CSP id to different endian (e.g. I2C), etc.\n"]
pub type csp_packet_t = csp_packet_s;
#[doc = " Forward declaration of CSP interface, see #csp_iface_s for details."]
pub type csp_iface_t = csp_iface_s;
pub type csp_callback_t = ::core::option::Option<unsafe extern "C" fn(packet: *mut csp_packet_t)>;
#[doc = " @brief Connection struct"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct csp_socket_s {
pub rx_queue: csp_queue_handle_t,
pub rx_queue_static: csp_static_queue_t,
pub rx_queue_static_data: [::core::ffi::c_char; 128usize],
pub opts: u32,
}
#[test]
fn bindgen_test_layout_csp_socket_s() {
const UNINIT: ::core::mem::MaybeUninit<csp_socket_s> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<csp_socket_s>(),
152usize,
concat!("Size of: ", stringify!(csp_socket_s))
);
assert_eq!(
::core::mem::align_of::<csp_socket_s>(),
8usize,
concat!("Alignment of ", stringify!(csp_socket_s))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).rx_queue) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(csp_socket_s),
"::",
stringify!(rx_queue)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).rx_queue_static) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(csp_socket_s),
"::",
stringify!(rx_queue_static)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).rx_queue_static_data) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(csp_socket_s),
"::",
stringify!(rx_queue_static_data)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).opts) as usize - ptr as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(csp_socket_s),
"::",
stringify!(opts)
)
);
}
#[doc = " Forward declaration of socket structure"]
pub type csp_socket_t = csp_socket_s;
#[doc = " Forward declaration of connection structure"]
pub type csp_conn_t = csp_conn_s;
#[doc = " Memory pointer"]
pub type csp_memptr_t = *mut ::core::ffi::c_void;
#[doc = " Const memory pointer"]
pub type csp_const_memptr_t = *const ::core::ffi::c_void;
#[doc = " Platform specific memory copy function."]
pub type csp_memcpy_fnc_t = ::core::option::Option<
unsafe extern "C" fn(arg1: csp_memptr_t, arg2: csp_const_memptr_t, arg3: usize) -> csp_memptr_t,
>;
extern "C" {
#[doc = " Get free buffer from task context.\n\n @param[in] unused OBSOLETE ignored field, csp packets have a fixed size now\n @return Buffer pointer to #csp_packet_t or NULL if no buffers available"]
pub fn csp_buffer_get(unused: usize) -> *mut csp_packet_t;
}
extern "C" {
#[doc = " Get free buffer (from ISR context).\n\n @param[in] unused OBSOLETE ignored field, csp packets have a fixed size now\n @return Buffer pointer to #csp_packet_t or NULL if no buffers available"]
pub fn csp_buffer_get_isr(unused: usize) -> *mut csp_packet_t;
}
extern "C" {
#[doc = " Free buffer (from task context).\n\n @param[in] buffer buffer to free. NULL is handled gracefully."]
pub fn csp_buffer_free(buffer: *mut ::core::ffi::c_void);
}
extern "C" {
#[doc = " Free buffer (from ISR context).\n\n @param[in] buffer buffer to free. NULL is handled gracefully."]
pub fn csp_buffer_free_isr(buffer: *mut ::core::ffi::c_void);
}
extern "C" {
#[doc = " Clone an existing buffer.\n The existing \\a buffer content is copied to the new buffer.\n\n @param[in] buffer buffer to clone.\n @return cloned buffer on success, or NULL on failure."]
pub fn csp_buffer_clone(buffer: *mut ::core::ffi::c_void) -> *mut ::core::ffi::c_void;
}
extern "C" {
#[doc = " Return number of remaining/free buffers.\n The number of buffers is set by csp_init().\n\n @return number of remaining/free buffers"]
pub fn csp_buffer_remaining() -> ::core::ffi::c_int;
}
extern "C" {
pub fn csp_buffer_init();
}
extern "C" {
#[doc = " Increase reference counter of buffer.\n Use csp_buffer_free() to decrement\n @param[in] buffer buffer to increment. NULL is handled gracefully."]
pub fn csp_buffer_refc_inc(buffer: *mut ::core::ffi::c_void);
}
#[doc = " Interface Tx function.\n\n @return #CSP_ERR_NONE on success, otherwise an error code."]
pub type nexthop_t = ::core::option::Option<
unsafe extern "C" fn(
iface: *mut csp_iface_t,
via: u16,
packet: *mut csp_packet_t,
from_me: ::core::ffi::c_int,
) -> ::core::ffi::c_int,
>;
#[doc = " This struct is referenced in documentation.\n Update doc when you change this."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct csp_iface_s {
#[doc = "< Host address on this subnet"]
pub addr: u16,
#[doc = "< Subnet mask"]
pub netmask: u16,
#[doc = "< Name, max compare length is #CSP_IFLIST_NAME_MAX"]
pub name: *const ::core::ffi::c_char,
#[doc = "< Interface data, only known/used by the interface layer, e.g. state information."]
pub interface_data: *mut ::core::ffi::c_void,
#[doc = "< Driver data, only known/used by the driver layer, e.g. device/channel references."]
pub driver_data: *mut ::core::ffi::c_void,
#[doc = "< Next hop (Tx) function"]
pub nexthop: nexthop_t,
#[doc = "< Set default IF flag (CSP supports multiple defaults)"]
pub is_default: u8,
#[doc = "< Successfully transmitted packets"]
pub tx: u32,
#[doc = "< Successfully received packets"]
pub rx: u32,
#[doc = "< Transmit errors (packets)"]
pub tx_error: u32,
#[doc = "< Receive errors, e.g. too large message"]
pub rx_error: u32,
#[doc = "< Dropped packets"]
pub drop: u32,
#[doc = "< Authentication errors (packets)"]
pub autherr: u32,
#[doc = "< Frame format errors (packets)"]
pub frame: u32,
#[doc = "< Transmitted bytes"]
pub txbytes: u32,
#[doc = "< Received bytes"]
pub rxbytes: u32,
#[doc = "< Interrupts"]
pub irq: u32,
pub next: *mut csp_iface_s,
}
#[test]
fn bindgen_test_layout_csp_iface_s() {
const UNINIT: ::core::mem::MaybeUninit<csp_iface_s> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<csp_iface_s>(),
96usize,
concat!("Size of: ", stringify!(csp_iface_s))
);
assert_eq!(
::core::mem::align_of::<csp_iface_s>(),
8usize,
concat!("Alignment of ", stringify!(csp_iface_s))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).addr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(csp_iface_s),
"::",
stringify!(addr)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).netmask) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(csp_iface_s),
"::",
stringify!(netmask)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(csp_iface_s),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).interface_data) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(csp_iface_s),
"::",
stringify!(interface_data)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).driver_data) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(csp_iface_s),
"::",
stringify!(driver_data)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).nexthop) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(csp_iface_s),
"::",
stringify!(nexthop)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).is_default) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(csp_iface_s),
"::",
stringify!(is_default)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).tx) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(csp_iface_s),
"::",
stringify!(tx)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).rx) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(csp_iface_s),
"::",
stringify!(rx)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).tx_error) as usize - ptr as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(csp_iface_s),
"::",
stringify!(tx_error)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).rx_error) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(csp_iface_s),
"::",
stringify!(rx_error)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).drop) as usize - ptr as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(csp_iface_s),
"::",
stringify!(drop)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).autherr) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(csp_iface_s),
"::",
stringify!(autherr)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).frame) as usize - ptr as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(csp_iface_s),
"::",
stringify!(frame)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).txbytes) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(csp_iface_s),
"::",
stringify!(txbytes)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).rxbytes) as usize - ptr as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(csp_iface_s),
"::",
stringify!(rxbytes)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).irq) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(csp_iface_s),
"::",
stringify!(irq)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).next) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(csp_iface_s),
"::",
stringify!(next)
)
);
}
extern "C" {
#[doc = " Inputs a new packet into the system.\n\n This function can be called from interface drivers (ISR) or tasks, to route and accept packets.\n\n .. note:: EXTREMELY IMPORTANT: \\a pxTaskWoken must ALWAYS be NULL if called from task, and ALWAYS\n\t\t\t be NON NULL if called from ISR. If this condition is met, this call is completely thread-safe\n\n This function is fire and forget, it returns void, meaning that the \\a packet will always be\n either accepted or dropped, so the memory will always be freed.\n\n @param[in] packet A pointer to the incoming packet\n @param[in] iface A pointer to the incoming interface TX function.\n @param[in] pxTaskWoken Valid reference if called from ISR, otherwise NULL!\n"]
pub fn csp_qfifo_write(
packet: *mut csp_packet_t,
iface: *mut csp_iface_t,
pxTaskWoken: *mut ::core::ffi::c_void,
);
}
extern "C" {
#[doc = " Add interface to the list.\n\n @param[in] iface The interface must remain valid as long as the application is running.\n @return #CSP_ERR_NONE on success, otherwise an error code."]
pub fn csp_iflist_add(iface: *mut csp_iface_t) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Remove interface from the list.\n\n @param[in] ifc Interface to remove. NULL will be gracefully handled."]
pub fn csp_iflist_remove(ifc: *mut csp_iface_t);
}
extern "C" {
pub fn csp_iflist_get_by_name(name: *const ::core::ffi::c_char) -> *mut csp_iface_t;
}
extern "C" {
pub fn csp_iflist_get_by_addr(addr: u16) -> *mut csp_iface_t;
}
extern "C" {
pub fn csp_iflist_get_by_subnet(addr: u16, from: *mut csp_iface_t) -> *mut csp_iface_t;
}
extern "C" {
pub fn csp_iflist_get_by_isdfl(ifc: *mut csp_iface_t) -> *mut csp_iface_t;
}
extern "C" {
pub fn csp_iflist_get_by_index(idx: ::core::ffi::c_int) -> *mut csp_iface_t;
}
extern "C" {
pub fn csp_iflist_is_within_subnet(addr: u16, ifc: *mut csp_iface_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn csp_iflist_get() -> *mut csp_iface_t;
}
extern "C" {
#[doc = " Convert bytes to readable string"]
pub fn csp_bytesize(
bytes: ::core::ffi::c_ulong,
postfix: *mut ::core::ffi::c_char,
) -> ::core::ffi::c_ulong;
}
extern "C" {
#[doc = " Runs over the list of interfaces, and if no default interface is found\n set default on ALL interfaces"]
pub fn csp_iflist_check_dfl();
}
extern "C" {
pub fn csp_iflist_print();
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct csp_route_s {
pub address: u16,
pub netmask: u16,
pub via: u16,
pub iface: *mut csp_iface_t,
}
#[test]
fn bindgen_test_layout_csp_route_s() {
const UNINIT: ::core::mem::MaybeUninit<csp_route_s> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<csp_route_s>(),
16usize,
concat!("Size of: ", stringify!(csp_route_s))
);
assert_eq!(
::core::mem::align_of::<csp_route_s>(),
8usize,
concat!("Alignment of ", stringify!(csp_route_s))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).address) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(csp_route_s),
"::",
stringify!(address)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).netmask) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(csp_route_s),
"::",
stringify!(netmask)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).via) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(csp_route_s),
"::",
stringify!(via)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).iface) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(csp_route_s),
"::",
stringify!(iface)
)
);
}
pub type csp_route_t = csp_route_s;
extern "C" {
#[doc = " Loop through routes backwards and find routes that match on addr and mask from start_route"]
pub fn csp_rtable_search_backward(start_route: *mut csp_route_t) -> *mut csp_route_t;
}
extern "C" {
pub fn csp_rtable_find_route(dest_address: u16) -> *mut csp_route_t;
}
extern "C" {
#[doc = " Set route to destination address/node.\n\n @param[in] dest_address destination address.\n @param[in]mask number of bits in netmask (set to -1 for maximum number of bits)\n @param[in] ifc interface.\n @param[in] via assosicated via address.\n @return #CSP_ERR_NONE on success, or an error code."]
pub fn csp_rtable_set(
dest_address: u16,
netmask: ::core::ffi::c_int,
ifc: *mut csp_iface_t,
via: u16,
) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Save routing table as a string (readable format).\n @see csp_rtable_load() for additional information, e.g. format.\n\n @param[out] buffer user supplied buffer.\n @param[in] buffer_size size of \\a buffer.\n @return #CSP_ERR_NONE on success, or an error code."]
pub fn csp_rtable_save(
buffer: *mut ::core::ffi::c_char,
buffer_size: usize,
) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Load routing table from a string.\n Table will be loaded on-top of existing routes, possibly overwriting existing entries.\n Format: \\<address\\>[/mask] \\<interface\\> [via][, next entry]\n Example: \"0/0 CAN, 8 KISS, 10 I2C 10\", same as \"0/0 CAN, 8/5 KISS, 10/5 I2C 10\".\n @see csp_rtable_save(), csp_rtable_clear(), csp_rtable_free()\n\n @param[in] rtable routing table (nul terminated)\n @return CSP_ERR or number of entries."]
pub fn csp_rtable_load(rtable: *const ::core::ffi::c_char) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Check string for valid routing elements.\n\n @param[in] rtable routing table (nul terminated)\n @return CSP_ERR or number of entries."]
pub fn csp_rtable_check(rtable: *const ::core::ffi::c_char) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Clear routing table and add loopback route.\n @see csp_rtable_free()"]
pub fn csp_rtable_clear();
}
extern "C" {
#[doc = " Clear/free all entries in the routing table."]
pub fn csp_rtable_free();
}
#[doc = " Iterator for looping through the routing table."]
pub type csp_rtable_iterator_t = ::core::option::Option<
unsafe extern "C" fn(ctx: *mut ::core::ffi::c_void, route: *mut csp_route_t) -> bool,
>;
extern "C" {
#[doc = " Iterate routing table."]
pub fn csp_rtable_iterate(iter: csp_rtable_iterator_t, ctx: *mut ::core::ffi::c_void);
}
extern "C" {
#[doc = " Print routing table"]
pub fn csp_rtable_print();
}
extern "C" {
pub fn memcpy(
__dest: *mut ::core::ffi::c_void,
__src: *const ::core::ffi::c_void,
__n: ::core::ffi::c_ulong,
) -> *mut ::core::ffi::c_void;
}
extern "C" {
pub fn memmove(
__dest: *mut ::core::ffi::c_void,
__src: *const ::core::ffi::c_void,
__n: ::core::ffi::c_ulong,
) -> *mut ::core::ffi::c_void;
}
extern "C" {
pub fn memccpy(
__dest: *mut ::core::ffi::c_void,
__src: *const ::core::ffi::c_void,
__c: ::core::ffi::c_int,
__n: ::core::ffi::c_ulong,
) -> *mut ::core::ffi::c_void;
}
extern "C" {
pub fn memset(
__s: *mut ::core::ffi::c_void,
__c: ::core::ffi::c_int,
__n: ::core::ffi::c_ulong,
) -> *mut ::core::ffi::c_void;
}
extern "C" {
pub fn memcmp(
__s1: *const ::core::ffi::c_void,
__s2: *const ::core::ffi::c_void,
__n: ::core::ffi::c_ulong,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn __memcmpeq(
__s1: *const ::core::ffi::c_void,
__s2: *const ::core::ffi::c_void,
__n: usize,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn memchr(
__s: *const ::core::ffi::c_void,
__c: ::core::ffi::c_int,
__n: ::core::ffi::c_ulong,
) -> *mut ::core::ffi::c_void;
}
extern "C" {
pub fn strcpy(
__dest: *mut ::core::ffi::c_char,
__src: *const ::core::ffi::c_char,
) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn strncpy(
__dest: *mut ::core::ffi::c_char,
__src: *const ::core::ffi::c_char,
__n: ::core::ffi::c_ulong,
) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn strcat(
__dest: *mut ::core::ffi::c_char,
__src: *const ::core::ffi::c_char,
) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn strncat(
__dest: *mut ::core::ffi::c_char,
__src: *const ::core::ffi::c_char,
__n: ::core::ffi::c_ulong,
) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn strcmp(
__s1: *const ::core::ffi::c_char,
__s2: *const ::core::ffi::c_char,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn strncmp(
__s1: *const ::core::ffi::c_char,
__s2: *const ::core::ffi::c_char,
__n: ::core::ffi::c_ulong,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn strcoll(
__s1: *const ::core::ffi::c_char,
__s2: *const ::core::ffi::c_char,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn strxfrm(
__dest: *mut ::core::ffi::c_char,
__src: *const ::core::ffi::c_char,
__n: ::core::ffi::c_ulong,
) -> ::core::ffi::c_ulong;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __locale_struct {
pub __locales: [*mut __locale_data; 13usize],
pub __ctype_b: *const ::core::ffi::c_ushort,
pub __ctype_tolower: *const ::core::ffi::c_int,
pub __ctype_toupper: *const ::core::ffi::c_int,
pub __names: [*const ::core::ffi::c_char; 13usize],
}
#[test]
fn bindgen_test_layout___locale_struct() {
const UNINIT: ::core::mem::MaybeUninit<__locale_struct> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<__locale_struct>(),
232usize,
concat!("Size of: ", stringify!(__locale_struct))
);
assert_eq!(
::core::mem::align_of::<__locale_struct>(),
8usize,
concat!("Alignment of ", stringify!(__locale_struct))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__locales) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__locale_struct),
"::",
stringify!(__locales)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__ctype_b) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(__locale_struct),
"::",
stringify!(__ctype_b)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__ctype_tolower) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(__locale_struct),
"::",
stringify!(__ctype_tolower)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__ctype_toupper) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(__locale_struct),
"::",
stringify!(__ctype_toupper)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__names) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(__locale_struct),
"::",
stringify!(__names)
)
);
}
pub type __locale_t = *mut __locale_struct;
pub type locale_t = __locale_t;
extern "C" {
pub fn strcoll_l(
__s1: *const ::core::ffi::c_char,
__s2: *const ::core::ffi::c_char,
__l: locale_t,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn strxfrm_l(
__dest: *mut ::core::ffi::c_char,
__src: *const ::core::ffi::c_char,
__n: usize,
__l: locale_t,
) -> usize;
}
extern "C" {
pub fn strdup(__s: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn strndup(
__string: *const ::core::ffi::c_char,
__n: ::core::ffi::c_ulong,
) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn strchr(
__s: *const ::core::ffi::c_char,
__c: ::core::ffi::c_int,
) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn strrchr(
__s: *const ::core::ffi::c_char,
__c: ::core::ffi::c_int,
) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn strcspn(
__s: *const ::core::ffi::c_char,
__reject: *const ::core::ffi::c_char,
) -> ::core::ffi::c_ulong;
}
extern "C" {
pub fn strspn(
__s: *const ::core::ffi::c_char,
__accept: *const ::core::ffi::c_char,
) -> ::core::ffi::c_ulong;
}
extern "C" {
pub fn strpbrk(
__s: *const ::core::ffi::c_char,
__accept: *const ::core::ffi::c_char,
) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn strstr(
__haystack: *const ::core::ffi::c_char,
__needle: *const ::core::ffi::c_char,
) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn strtok(
__s: *mut ::core::ffi::c_char,
__delim: *const ::core::ffi::c_char,
) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn __strtok_r(
__s: *mut ::core::ffi::c_char,
__delim: *const ::core::ffi::c_char,
__save_ptr: *mut *mut ::core::ffi::c_char,
) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn strtok_r(
__s: *mut ::core::ffi::c_char,
__delim: *const ::core::ffi::c_char,
__save_ptr: *mut *mut ::core::ffi::c_char,
) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn strlen(__s: *const ::core::ffi::c_char) -> ::core::ffi::c_ulong;
}
extern "C" {
pub fn strnlen(__string: *const ::core::ffi::c_char, __maxlen: usize) -> usize;
}
extern "C" {
pub fn strerror(__errnum: ::core::ffi::c_int) -> *mut ::core::ffi::c_char;
}
extern "C" {
#[link_name = "\u{1}__xpg_strerror_r"]
pub fn strerror_r(
__errnum: ::core::ffi::c_int,
__buf: *mut ::core::ffi::c_char,
__buflen: usize,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn strerror_l(__errnum: ::core::ffi::c_int, __l: locale_t) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn bcmp(
__s1: *const ::core::ffi::c_void,
__s2: *const ::core::ffi::c_void,
__n: ::core::ffi::c_ulong,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn bcopy(__src: *const ::core::ffi::c_void, __dest: *mut ::core::ffi::c_void, __n: usize);
}
extern "C" {
pub fn bzero(__s: *mut ::core::ffi::c_void, __n: ::core::ffi::c_ulong);
}
extern "C" {
pub fn index(
__s: *const ::core::ffi::c_char,
__c: ::core::ffi::c_int,
) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn rindex(
__s: *const ::core::ffi::c_char,
__c: ::core::ffi::c_int,
) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn ffs(__i: ::core::ffi::c_int) -> ::core::ffi::c_int;
}
extern "C" {
pub fn ffsl(__l: ::core::ffi::c_long) -> ::core::ffi::c_int;
}
extern "C" {
pub fn ffsll(__ll: ::core::ffi::c_longlong) -> ::core::ffi::c_int;
}
extern "C" {
pub fn strcasecmp(
__s1: *const ::core::ffi::c_char,
__s2: *const ::core::ffi::c_char,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn strncasecmp(
__s1: *const ::core::ffi::c_char,
__s2: *const ::core::ffi::c_char,
__n: ::core::ffi::c_ulong,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn strcasecmp_l(
__s1: *const ::core::ffi::c_char,
__s2: *const ::core::ffi::c_char,
__loc: locale_t,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn strncasecmp_l(
__s1: *const ::core::ffi::c_char,
__s2: *const ::core::ffi::c_char,
__n: usize,
__loc: locale_t,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn explicit_bzero(__s: *mut ::core::ffi::c_void, __n: usize);
}
extern "C" {
pub fn strsep(
__stringp: *mut *mut ::core::ffi::c_char,
__delim: *const ::core::ffi::c_char,
) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn strsignal(__sig: ::core::ffi::c_int) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn __stpcpy(
__dest: *mut ::core::ffi::c_char,
__src: *const ::core::ffi::c_char,
) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn stpcpy(
__dest: *mut ::core::ffi::c_char,
__src: *const ::core::ffi::c_char,
) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn __stpncpy(
__dest: *mut ::core::ffi::c_char,
__src: *const ::core::ffi::c_char,
__n: usize,
) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn stpncpy(
__dest: *mut ::core::ffi::c_char,
__src: *const ::core::ffi::c_char,
__n: ::core::ffi::c_ulong,
) -> *mut ::core::ffi::c_char;
}
extern "C" {
#[doc = " Send data over a CSP connection.\n\n Data will be send in chunks of \\a mtu bytes. The MTU must be small enough to fit\n into a CSP packat + SFP header + other transport headers.\n\n csp_sfp_recv() or csp_sfp_recv_fp() can be used at the other end to receive data.\n\n This is usefull if you wish to send data stored in flash memory or another location, where standard memcpy() doesn't work.\n\n @param[in] conn established connection for sending SFP packets.\n @param[in] data data to send\n @param[in] datasize tsize of \\a data\n @param[in] mtu maximum transfer unit (bytes), max data chunk to send.\n @param[in] timeout unused as of CSP version 1.6\n @param[in] memcpyfcn memory copy function.\n @return #CSP_ERR_NONE on success, otherwise an error."]
pub fn csp_sfp_send_own_memcpy(
conn: *mut csp_conn_t,
data: *const ::core::ffi::c_void,
datasize: ::core::ffi::c_uint,
mtu: ::core::ffi::c_uint,
timeout: u32,
memcpyfcn: csp_memcpy_fnc_t,
) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Receive data over a CSP connection.\n\n This is the counterpart to the csp_sfp_send() and csp_sfp_send_own_memcpy().\n\n @param[in] conn established connection for receiving SFP packets.\n @param[out] dataout received data on success. Allocated with malloc(), so\n \t\t\t should be freed with free(). The pointer will be NULL on failure.\n @param[out] datasize size of received data.\n @param[in] timeout timeout in ms to wait for csp_read()\n @param[in] first_packet First packet of a SFP transfer.\n \t\t\t Use NULL to receive first packet on the connection.\n @return #CSP_ERR_NONE on success, otherwise an error."]
pub fn csp_sfp_recv_fp(
conn: *mut csp_conn_t,
dataout: *mut *mut ::core::ffi::c_void,
datasize: *mut ::core::ffi::c_int,
timeout: u32,
first_packet: *mut csp_packet_t,
) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Enable promiscuous packet queue.\n\n @param[in]queue_size: Size (max length) of queue for incoming packets.\n @return #CSP_ERR_NONE on success, otherwise an error code."]
pub fn csp_promisc_enable(queue_size: ::core::ffi::c_uint) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Disable promiscuous mode."]
pub fn csp_promisc_disable();
}
extern "C" {
#[doc = " Get/dequeue packet from promiscuous packet queue.\n\n Returns the first packet from the promiscuous packet queue.\n\n @param[in] timeout Timeout in ms to wait for a packet.\n @return Packet (free with csp_buffer_free() or re-use packet), NULL on error or timeout."]
pub fn csp_promisc_read(timeout: u32) -> *mut csp_packet_t;
}
#[doc = "< Deduplication off"]
pub const csp_dedup_types_CSP_DEDUP_OFF: csp_dedup_types = 0;
#[doc = "< Deduplication on forwarding only"]
pub const csp_dedup_types_CSP_DEDUP_FWD: csp_dedup_types = 1;
#[doc = "< Deduplication on incomfing only"]
pub const csp_dedup_types_CSP_DEDUP_INCOMING: csp_dedup_types = 2;
#[doc = "< Deduplication on incoming and forwarding"]
pub const csp_dedup_types_CSP_DEDUP_ALL: csp_dedup_types = 3;
#[doc = " CSP Debug Types"]
pub type csp_dedup_types = ::core::ffi::c_uint;
#[doc = " CSP configuration."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct csp_conf_s {
#[doc = "< Protocol version to use (either 1 or 2)"]
pub version: u8,
#[doc = "< Host name, returned by the #CSP_CMP_IDENT request"]
pub hostname: *const ::core::ffi::c_char,
#[doc = "< Model, returned by the #CSP_CMP_IDENT request"]
pub model: *const ::core::ffi::c_char,
#[doc = "< Revision, returned by the #CSP_CMP_IDENT request"]
pub revision: *const ::core::ffi::c_char,
#[doc = "< Default connection options. Options will always be or'ed onto new connections, see csp_connect()"]
pub conn_dfl_so: u32,
#[doc = "< Enable CSP deduplication. 0 = off, 1 = always on, 2 = only on forwarded packets,"]
pub dedup: u8,
}
#[test]
fn bindgen_test_layout_csp_conf_s() {
const UNINIT: ::core::mem::MaybeUninit<csp_conf_s> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<csp_conf_s>(),
40usize,
concat!("Size of: ", stringify!(csp_conf_s))
);
assert_eq!(
::core::mem::align_of::<csp_conf_s>(),
8usize,
concat!("Alignment of ", stringify!(csp_conf_s))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).version) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(csp_conf_s),
"::",
stringify!(version)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).hostname) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(csp_conf_s),
"::",
stringify!(hostname)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).model) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(csp_conf_s),
"::",
stringify!(model)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).revision) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(csp_conf_s),
"::",
stringify!(revision)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).conn_dfl_so) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(csp_conf_s),
"::",
stringify!(conn_dfl_so)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).dedup) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(csp_conf_s),
"::",
stringify!(dedup)
)
);
}
#[doc = " CSP configuration."]
pub type csp_conf_t = csp_conf_s;
extern "C" {
pub static mut csp_conf: csp_conf_t;
}
extern "C" {
#[doc = " Initialize CSP.\n This will configure basic structures."]
pub fn csp_init();
}
extern "C" {
#[doc = " Free allocated resorces in CSP.\n This is intended for testing of CSP, in order to be able re-initialize CSP by calling csp_init() again."]
pub fn csp_free_resources();
}
extern "C" {
#[doc = " Get a \\a read-only reference to the active CSP configuration.\n\n @return Active CSP configuration (read-only)."]
pub fn csp_get_conf() -> *const csp_conf_t;
}
extern "C" {
#[doc = " Copy csp id fields from source to target object"]
pub fn csp_id_copy(target: *mut csp_id_t, source: *const csp_id_t);
}
extern "C" {
#[doc = " Wait/accept a new connection.\n\n @param[in] socket socket to accept connections on, created by calling csp_socket().\n @param[in] timeout timeout in mS to wait for a connection, use CSP_MAX_TIMEOUT for infinite timeout.\n @return New connection on success, NULL on failure or timeout."]
pub fn csp_accept(socket: *mut csp_socket_t, timeout: u32) -> *mut csp_conn_t;
}
extern "C" {
#[doc = " Read packet from a connection.\n This fuction will wait on the connection's RX queue for the specified timeout.\n\n @param[in] conn connection\n @param[in] timeout timeout in mS to wait for a packet, use CSP_MAX_TIMEOUT for infinite timeout.\n @return Packet or NULL in case of failure or timeout."]
pub fn csp_read(conn: *mut csp_conn_t, timeout: u32) -> *mut csp_packet_t;
}
extern "C" {
#[doc = " Send packet on a connection.\n The packet buffer is automatically freed, and cannot be used after the call to csp_send()\n\n @param[in] conn connection\n @param[in] packet packet to send"]
pub fn csp_send(conn: *mut csp_conn_t, packet: *mut csp_packet_t);
}
extern "C" {
#[doc = " Change the default priority of the connection and send a packet.\n\n .. note:: The priority of the connection will be changed.\n If you need to change it back, call csp_send_prio() again.\n\n @param[in] prio priority to set on the connection\n @param[in] conn connection\n @param[in] packet packet to send"]
pub fn csp_send_prio(prio: u8, conn: *mut csp_conn_t, packet: *mut csp_packet_t);
}
extern "C" {
#[doc = " Perform an entire request & reply transaction.\n Creates a connection, send \\a outbuf, wait for reply, copy reply to \\a inbuf and close the connection.\n\n @param[in] prio priority, see #csp_prio_t\n @param[in] dst destination address\n @param[in] dst_port destination port\n @param[in] timeout timeout in mS to wait for a reply\n @param[in] outbuf outgoing data (request)\n @param[in] outlen length of data in \\a outbuf (request)\n @param[out] inbuf user provided buffer for receiving data (reply)\n @param[in] inlen length of expected reply, -1 for unknown size (inbuf MUST be large enough), 0 for no reply.\n @param[in] opts connection options, see @ref CSP_CONNECTION_OPTIONS.\n\n Returns:\n int: 1 or reply size on success, 0 on failure (error, incoming length does not match, timeout)"]
pub fn csp_transaction_w_opts(
prio: u8,
dst: u16,
dst_port: u8,
timeout: u32,
outbuf: *const ::core::ffi::c_void,
outlen: ::core::ffi::c_int,
inbuf: *mut ::core::ffi::c_void,
inlen: ::core::ffi::c_int,
opts: u32,
) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Perform an entire request & reply transaction on an existing connection.\n Send \\a outbuf, wait for reply and copy reply to \\a inbuf.\n\n @param[in] conn connection\n @param[in] timeout timeout in mS to wait for a reply\n @param[in] outbuf outgoing data (request)\n @param[in] outlen length of data in \\a outbuf (request)\n @param[out] inbuf user provided buffer for receiving data (reply)\n @param[in] inlen length of expected reply, -1 for unknown size (inbuf MUST be large enough), 0 for no reply.\n @return 1 or reply size on success, 0 on failure (error, incoming length does not match, timeout)"]
pub fn csp_transaction_persistent(
conn: *mut csp_conn_t,
timeout: u32,
outbuf: *const ::core::ffi::c_void,
outlen: ::core::ffi::c_int,
inbuf: *mut ::core::ffi::c_void,
inlen: ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Read data from a connection-less server socket.\n\n @param[in] socket connection-less socket.\n @param[in] timeout timeout in mS to wait for a packet, use #CSP_MAX_TIMEOUT for infinite timeout.\n @return Packet on success, or NULL on failure or timeout."]
pub fn csp_recvfrom(socket: *mut csp_socket_t, timeout: u32) -> *mut csp_packet_t;
}
extern "C" {
#[doc = " Send a packet (without connection).\n\n @param[in] prio packet priority, see #csp_prio_t\n @param[in] dst destination address\n @param[in] dst_port destination port\n @param[in] src_port source port\n @param[in] opts connection options, see @ref CSP_CONNECTION_OPTIONS.\n @param[in] packet packet to send"]
pub fn csp_sendto(
prio: u8,
dst: u16,
dst_port: u8,
src_port: u8,
opts: u32,
packet: *mut csp_packet_t,
);
}
extern "C" {
#[doc = " Send a packet as a reply to a request (without a connection).\n Calls csp_sendto() with the source address and port from the request.\n\n @param[in] request incoming request\n @param[out] reply reply packet\n @param[in] opts connection options, see @ref CSP_CONNECTION_OPTIONS."]
pub fn csp_sendto_reply(request: *const csp_packet_t, reply: *mut csp_packet_t, opts: u32);
}
extern "C" {
#[doc = " Establish outgoing connection.\n The call will return immediately, unless it is a RDP connection (#CSP_O_RDP) in which case it will wait until the other\n end acknowleges the connection (timeout is determined by the current connection timeout set by csp_rdp_set_opt()).\n\n @param[in] prio priority, see #csp_prio_t\n @param[in] dst Destination address\n @param[in] dst_port Destination port\n @param[in] timeout unused.\n @param[in] opts connection options, see @ref CSP_CONNECTION_OPTIONS.\n @return Established connection or NULL on failure (no free connections, timeout)."]
pub fn csp_connect(
prio: u8,
dst: u16,
dst_port: u8,
timeout: u32,
opts: u32,
) -> *mut csp_conn_t;
}
extern "C" {
#[doc = " Close an open connection.\n Any packets in the RX queue will be freed.\n\n @param[in] conn connection. Closing a NULL connection is acceptable.\n @return #CSP_ERR_NONE on success, otherwise an error code."]
pub fn csp_close(conn: *mut csp_conn_t) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Close a socket, freeing it's RX queue and unbinding it from the associated\n port.\n\n @param[in] sock Socket\n @return #CSP_ERR_NONE on success, otherwise an error code."]
pub fn csp_socket_close(sock: *mut csp_socket_t) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Return destination port of connection.\n\n @param[in] conn connection\n @return destination port of an incoming connection"]
pub fn csp_conn_dport(conn: *const csp_conn_t) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Return source port of connection.\n\n @param[in] conn connection\n @return source port of an incoming connection"]
pub fn csp_conn_sport(conn: *const csp_conn_t) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Return destination address of connection.\n\n @param[in] conn connection\n @return destination address of an incoming connection"]
pub fn csp_conn_dst(conn: *const csp_conn_t) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Return source address of connection.\n\n @param[in] conn connection\n @return source address of an incoming connection"]
pub fn csp_conn_src(conn: *const csp_conn_t) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Return flags of connection.\n\n @param[in] conn connection\n @return flags of an incoming connection, see @ref CSP_HEADER_FLAGS"]
pub fn csp_conn_flags(conn: *const csp_conn_t) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Set socket to listen for incoming connections.\n\n @param[in] socket socket\n @param[in] backlog max length of backlog queue. The backlog queue holds incoming connections, waiting to be returned by call to csp_accept().\n @return #CSP_ERR_NONE on success, otherwise an error code."]
pub fn csp_listen(socket: *mut csp_socket_t, backlog: usize) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Bind port to socket.\n\n @param[in] socket socket to bind port to\n @param[in] port port number to bind, use #CSP_ANY for all ports. Bindnig to a specific will take precedence over #CSP_ANY.\n @return #CSP_ERR_NONE on success, otherwise an error code."]
pub fn csp_bind(socket: *mut csp_socket_t, port: u8) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Bind port to callback function.\n\n @param[in] callback pointer to callback function\n @param[in] port port number to bind, use #CSP_ANY for all ports. Bindnig to a specific will take precedence over #CSP_ANY.\n @return 0 on success, otherwise an error code."]
pub fn csp_bind_callback(callback: csp_callback_t, port: u8) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Route packet from the incoming router queue and check RDP timeouts.\n In order for incoming packets to routed and RDP timeouts to be checked, this function must be called reguarly.\n @return #CSP_ERR_NONE on success, otherwise an error code."]
pub fn csp_route_work() -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Set the bridge interfaces.\n\n @param[in] if_a CSP Interface `A`\n @param[in] if_b CSP Interface `B`"]
pub fn csp_bridge_set_interfaces(if_a: *mut csp_iface_t, if_b: *mut csp_iface_t);
}
extern "C" {
#[doc = " Bridge packet from an interface to the other."]
pub fn csp_bridge_work();
}
extern "C" {
#[doc = " Handle CSP service request.\n If the given packet is a service-request (the destination port matches one of CSP service ports #csp_service_port_t),\n the packet will be processed by the specific CSP service handler.\n The packet will either process it or free it, so this function is typically called in the last \"default\" clause of\n a switch/case statement in a CSP listener task.\n In order to listen to csp service ports, bind your listener to the specific services ports #csp_service_port_t or\n use #CSP_ANY to all ports.\n\n @param[in] packet first packet, obtained by using csp_read()"]
pub fn csp_service_handler(packet: *mut csp_packet_t);
}
extern "C" {
#[doc = " Send a single ping/echo packet.\n\n @param[in] node address of subsystem.\n @param[in] timeout timeout in ms to wait for reply.\n @param[in] size payload size in bytes.\n @param[in] opts connection options, see @ref CSP_CONNECTION_OPTIONS.\n @return >=0 echo time in mS on success, otherwise -1 for error."]
pub fn csp_ping(
node: u16,
timeout: u32,
size: ::core::ffi::c_uint,
opts: u8,
) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Send a single ping/echo packet without waiting for reply.\n Payload is 1 byte.\n\n @param[in] node address of subsystem."]
pub fn csp_ping_noreply(node: u16);
}
extern "C" {
#[doc = " Request process list.\n\n .. note:: This is currently only supported on FreeRTOS systems.\n\n @param[in] node address of subsystem.\n @param[in] timeout timeout in mS to wait for replies. The function will not return until the timeout occurrs."]
pub fn csp_ps(node: u16, timeout: u32);
}
extern "C" {
#[doc = " Request free memory.\n\n @param[in] node address of subsystem.\n @param[in] timeout timeout in mS to wait for reply.\n @param[out] size free memory on subsystem.\n @return #CSP_ERR_NONE on success, otherwise an error code."]
pub fn csp_get_memfree(node: u16, timeout: u32, size: *mut u32) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Request free memory and print to stdout.\n\n @param[in] node address of subsystem.\n @param[in] timeout timeout in mS to wait for reply."]
pub fn csp_memfree(node: u16, timeout: u32);
}
extern "C" {
#[doc = " Request free buffers.\n\n @param[in] node address of subsystem.\n @param[in] timeout timeout in mS to wait for reply.\n @param[out] size free buffers.\n @return #CSP_ERR_NONE on success, otherwise an error code."]
pub fn csp_get_buf_free(node: u16, timeout: u32, size: *mut u32) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Request free buffers and print to stdout.\n\n @param[in] node address of subsystem.\n @param[in] timeout timeout in mS to wait for reply."]
pub fn csp_buf_free(node: u16, timeout: u32);
}
extern "C" {
#[doc = " Reboot subsystem.\n If handled by the standard CSP service handler, the reboot handler set by csp_sys_set_reboot() on the subsystem, will be invoked.\n\n @param[in] node address of subsystem.\n"]
pub fn csp_reboot(node: u16);
}
extern "C" {
#[doc = " Shutdown subsystem.\n If handled by the standard CSP service handler, the shutdown handler set by csp_sys_set_shutdown() on the subsystem, will be invoked.\n\n @param[in] node address of subsystem.\n"]
pub fn csp_shutdown(node: u16);
}
extern "C" {
#[doc = " Request uptime and print to stdout.\n\n @param[in] node address of subsystem.\n @param[in] timeout timeout in mS to wait for reply.\n"]
pub fn csp_uptime(node: u16, timeout: u32);
}
extern "C" {
#[doc = " Request uptime\n\n @param[in] node address of subsystem.\n @param[in] timeout timeout in mS to wait for reply.\n @param[out] uptime uptime in seconds.\n @return #CSP_ERR_NONE on success, otherwise an error code."]
pub fn csp_get_uptime(node: u16, timeout: u32, uptime: *mut u32) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Set RDP options.\n The RDP options are used from the connecting/client side. When a RDP connection\n is established, the client tranmits the options to the server.\n\n @param[in] window_size window size\n @param[in] conn_timeout_ms connection timeout in mS\n @param[in] packet_timeout_ms packet timeout in mS.\n @param[in] delayed_acks enable/disable delayed acknowledgements.\n @param[in] ack_timeout acknowledgement timeout when delayed ACKs is enabled\n @param[in] ack_delay_count send acknowledgement for every ack_delay_count packets.\n"]
pub fn csp_rdp_set_opt(
window_size: ::core::ffi::c_uint,
conn_timeout_ms: ::core::ffi::c_uint,
packet_timeout_ms: ::core::ffi::c_uint,
delayed_acks: ::core::ffi::c_uint,
ack_timeout: ::core::ffi::c_uint,
ack_delay_count: ::core::ffi::c_uint,
);
}
extern "C" {
#[doc = " Get RDP options. @see csp_rdp_set_opt()\n\n @param[out] window_size Window size\n @param[out] conn_timeout_ms connection timeout in ms\n @param[out] packet_timeout_ms packet timeout in ms\n @param[out] delayed_acks enable/disable delayed acknowledgements\n @param[out] ack_timeout acknowledgement timeout when delayed ACKs is enabled\n @param[out] ack_delay_count send acknowledgement for every ack_delay_count packets"]
pub fn csp_rdp_get_opt(
window_size: *mut ::core::ffi::c_uint,
conn_timeout_ms: *mut ::core::ffi::c_uint,
packet_timeout_ms: *mut ::core::ffi::c_uint,
delayed_acks: *mut ::core::ffi::c_uint,
ack_timeout: *mut ::core::ffi::c_uint,
ack_delay_count: *mut ::core::ffi::c_uint,
);
}
extern "C" {
#[doc = " Set platform specific memory copy function."]
pub fn csp_cmp_set_memcpy(fnc: csp_memcpy_fnc_t);
}
extern "C" {
#[doc = " Print connection table to stdout."]
pub fn csp_conn_print_table();
}
extern "C" {
#[doc = " Hex dump memory to stdout.\n\n @param[in] desc description printed on first line.\n @param[in] addr memory address.\n @param[in] len number of bytes to dump, starting from \\a addr.\n"]
pub fn csp_hex_dump(
desc: *const ::core::ffi::c_char,
addr: *mut ::core::ffi::c_void,
len: ::core::ffi::c_int,
);
}
extern "C" {
#[doc = " Print connection table to string."]
pub fn csp_conn_print_table_str(
str_buf: *mut ::core::ffi::c_char,
str_size: ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn csp_output_hook(
idout: *mut csp_id_t,
packet: *mut csp_packet_t,
iface: *mut csp_iface_t,
via: u16,
from_me: ::core::ffi::c_int,
);
}
extern "C" {
pub fn csp_input_hook(iface: *mut csp_iface_t, packet: *mut csp_packet_t);
}
extern "C" {
pub fn csp_reboot_hook();
}
extern "C" {
pub fn csp_shutdown_hook();
}
extern "C" {
pub fn csp_memfree_hook() -> u32;
}
extern "C" {
pub fn csp_ps_hook(packet: *mut csp_packet_t) -> ::core::ffi::c_uint;
}
extern "C" {
#[doc = " Implement these, if you use csp_if_tun"]
pub fn csp_crypto_decrypt(
ciphertext_in: *mut u8,
ciphertext_len: u8,
msg_out: *mut u8,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn csp_crypto_encrypt(
msg_begin: *mut u8,
msg_len: u8,
ciphertext_out: *mut u8,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn csp_clock_get_time(time: *mut csp_timestamp_t);
}
extern "C" {
pub fn csp_clock_set_time(time: *const csp_timestamp_t) -> ::core::ffi::c_int;
}
pub const memory_order_memory_order_relaxed: memory_order = 0;
pub const memory_order_memory_order_consume: memory_order = 1;
pub const memory_order_memory_order_acquire: memory_order = 2;
pub const memory_order_memory_order_release: memory_order = 3;
pub const memory_order_memory_order_acq_rel: memory_order = 4;
pub const memory_order_memory_order_seq_cst: memory_order = 5;
pub type memory_order = ::core::ffi::c_uint;
extern "C" {
pub fn atomic_thread_fence(arg1: memory_order);
}
extern "C" {
pub fn atomic_signal_fence(arg1: memory_order);
}
pub type atomic_bool = u8;
pub type atomic_char = u8;
pub type atomic_schar = u8;
pub type atomic_uchar = u8;
pub type atomic_short = u16;
pub type atomic_ushort = u16;
pub type atomic_int = u32;
pub type atomic_uint = u32;
pub type atomic_long = u64;
pub type atomic_ulong = u64;
pub type atomic_llong = u64;
pub type atomic_ullong = u64;
pub type atomic_char16_t = u16;
pub type atomic_char32_t = u32;
pub type atomic_wchar_t = u32;
pub type atomic_int_least8_t = u8;
pub type atomic_uint_least8_t = u8;
pub type atomic_int_least16_t = u16;
pub type atomic_uint_least16_t = u16;
pub type atomic_int_least32_t = u32;
pub type atomic_uint_least32_t = u32;
pub type atomic_int_least64_t = u64;
pub type atomic_uint_least64_t = u64;
pub type atomic_int_fast8_t = u8;
pub type atomic_uint_fast8_t = u8;
pub type atomic_int_fast16_t = u64;
pub type atomic_uint_fast16_t = u64;
pub type atomic_int_fast32_t = u64;
pub type atomic_uint_fast32_t = u64;
pub type atomic_int_fast64_t = u64;
pub type atomic_uint_fast64_t = u64;
pub type atomic_intptr_t = u64;
pub type atomic_uintptr_t = u64;
pub type atomic_size_t = u64;
pub type atomic_ptrdiff_t = u64;
pub type atomic_intmax_t = u64;
pub type atomic_uintmax_t = u64;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct atomic_flag {
pub _Value: atomic_bool,
}
#[test]
fn bindgen_test_layout_atomic_flag() {
const UNINIT: ::core::mem::MaybeUninit<atomic_flag> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<atomic_flag>(),
1usize,
concat!("Size of: ", stringify!(atomic_flag))
);
assert_eq!(
::core::mem::align_of::<atomic_flag>(),
1usize,
concat!("Alignment of ", stringify!(atomic_flag))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr)._Value) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(atomic_flag),
"::",
stringify!(_Value)
)
);
}
extern "C" {
pub fn atomic_flag_test_and_set(arg1: *mut atomic_flag) -> bool;
}
extern "C" {
pub fn atomic_flag_test_and_set_explicit(arg1: *mut atomic_flag, arg2: memory_order) -> bool;
}
extern "C" {
pub fn atomic_flag_clear(arg1: *mut atomic_flag);
}
extern "C" {
pub fn atomic_flag_clear_explicit(arg1: *mut atomic_flag, arg2: memory_order);
}
pub type u_char = __u_char;
pub type u_short = __u_short;
pub type u_int = __u_int;
pub type u_long = __u_long;
pub type quad_t = __quad_t;
pub type u_quad_t = __u_quad_t;
pub type fsid_t = __fsid_t;
pub type loff_t = __loff_t;
pub type ino_t = __ino_t;
pub type dev_t = __dev_t;
pub type gid_t = __gid_t;
pub type mode_t = __mode_t;
pub type nlink_t = __nlink_t;
pub type uid_t = __uid_t;
pub type off_t = __off_t;
pub type pid_t = __pid_t;
pub type id_t = __id_t;
pub type daddr_t = __daddr_t;
pub type caddr_t = __caddr_t;
pub type key_t = __key_t;
pub type clock_t = __clock_t;
pub type clockid_t = __clockid_t;
pub type time_t = __time_t;
pub type timer_t = __timer_t;
pub type ulong = ::core::ffi::c_ulong;
pub type ushort = ::core::ffi::c_ushort;
pub type uint = ::core::ffi::c_uint;
pub type u_int8_t = __uint8_t;
pub type u_int16_t = __uint16_t;
pub type u_int32_t = __uint32_t;
pub type u_int64_t = __uint64_t;
pub type register_t = ::core::ffi::c_long;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __sigset_t {
pub __val: [::core::ffi::c_ulong; 16usize],
}
#[test]
fn bindgen_test_layout___sigset_t() {
const UNINIT: ::core::mem::MaybeUninit<__sigset_t> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<__sigset_t>(),
128usize,
concat!("Size of: ", stringify!(__sigset_t))
);
assert_eq!(
::core::mem::align_of::<__sigset_t>(),
8usize,
concat!("Alignment of ", stringify!(__sigset_t))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__val) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__sigset_t),
"::",
stringify!(__val)
)
);
}
pub type sigset_t = __sigset_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct timeval {
pub tv_sec: __time_t,
pub tv_usec: __suseconds_t,
}
#[test]
fn bindgen_test_layout_timeval() {
const UNINIT: ::core::mem::MaybeUninit<timeval> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<timeval>(),
16usize,
concat!("Size of: ", stringify!(timeval))
);
assert_eq!(
::core::mem::align_of::<timeval>(),
8usize,
concat!("Alignment of ", stringify!(timeval))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(timeval),
"::",
stringify!(tv_sec)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(timeval),
"::",
stringify!(tv_usec)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct timespec {
pub tv_sec: __time_t,
pub tv_nsec: __syscall_slong_t,
}
#[test]
fn bindgen_test_layout_timespec() {
const UNINIT: ::core::mem::MaybeUninit<timespec> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<timespec>(),
16usize,
concat!("Size of: ", stringify!(timespec))
);
assert_eq!(
::core::mem::align_of::<timespec>(),
8usize,
concat!("Alignment of ", stringify!(timespec))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(timespec),
"::",
stringify!(tv_sec)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(timespec),
"::",
stringify!(tv_nsec)
)
);
}
pub type suseconds_t = __suseconds_t;
pub type __fd_mask = ::core::ffi::c_long;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fd_set {
pub __fds_bits: [__fd_mask; 16usize],
}
#[test]
fn bindgen_test_layout_fd_set() {
const UNINIT: ::core::mem::MaybeUninit<fd_set> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<fd_set>(),
128usize,
concat!("Size of: ", stringify!(fd_set))
);
assert_eq!(
::core::mem::align_of::<fd_set>(),
8usize,
concat!("Alignment of ", stringify!(fd_set))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__fds_bits) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fd_set),
"::",
stringify!(__fds_bits)
)
);
}
pub type fd_mask = __fd_mask;
extern "C" {
pub fn select(
__nfds: ::core::ffi::c_int,
__readfds: *mut fd_set,
__writefds: *mut fd_set,
__exceptfds: *mut fd_set,
__timeout: *mut timeval,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pselect(
__nfds: ::core::ffi::c_int,
__readfds: *mut fd_set,
__writefds: *mut fd_set,
__exceptfds: *mut fd_set,
__timeout: *const timespec,
__sigmask: *const __sigset_t,
) -> ::core::ffi::c_int;
}
pub type blksize_t = __blksize_t;
pub type blkcnt_t = __blkcnt_t;
pub type fsblkcnt_t = __fsblkcnt_t;
pub type fsfilcnt_t = __fsfilcnt_t;
#[repr(C)]
#[derive(Copy, Clone)]
pub union __atomic_wide_counter {
pub __value64: ::core::ffi::c_ulonglong,
pub __value32: __atomic_wide_counter__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __atomic_wide_counter__bindgen_ty_1 {
pub __low: ::core::ffi::c_uint,
pub __high: ::core::ffi::c_uint,
}
#[test]
fn bindgen_test_layout___atomic_wide_counter__bindgen_ty_1() {
const UNINIT: ::core::mem::MaybeUninit<__atomic_wide_counter__bindgen_ty_1> =
::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<__atomic_wide_counter__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(__atomic_wide_counter__bindgen_ty_1))
);
assert_eq!(
::core::mem::align_of::<__atomic_wide_counter__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(__atomic_wide_counter__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__low) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__atomic_wide_counter__bindgen_ty_1),
"::",
stringify!(__low)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__high) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(__atomic_wide_counter__bindgen_ty_1),
"::",
stringify!(__high)
)
);
}
#[test]
fn bindgen_test_layout___atomic_wide_counter() {
const UNINIT: ::core::mem::MaybeUninit<__atomic_wide_counter> =
::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<__atomic_wide_counter>(),
8usize,
concat!("Size of: ", stringify!(__atomic_wide_counter))
);
assert_eq!(
::core::mem::align_of::<__atomic_wide_counter>(),
8usize,
concat!("Alignment of ", stringify!(__atomic_wide_counter))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__value64) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__atomic_wide_counter),
"::",
stringify!(__value64)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__value32) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__atomic_wide_counter),
"::",
stringify!(__value32)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_internal_list {
pub __prev: *mut __pthread_internal_list,
pub __next: *mut __pthread_internal_list,
}
#[test]
fn bindgen_test_layout___pthread_internal_list() {
const UNINIT: ::core::mem::MaybeUninit<__pthread_internal_list> =
::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<__pthread_internal_list>(),
16usize,
concat!("Size of: ", stringify!(__pthread_internal_list))
);
assert_eq!(
::core::mem::align_of::<__pthread_internal_list>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_internal_list))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__prev) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_internal_list),
"::",
stringify!(__prev)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__next) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__pthread_internal_list),
"::",
stringify!(__next)
)
);
}
pub type __pthread_list_t = __pthread_internal_list;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_internal_slist {
pub __next: *mut __pthread_internal_slist,
}
#[test]
fn bindgen_test_layout___pthread_internal_slist() {
const UNINIT: ::core::mem::MaybeUninit<__pthread_internal_slist> =
::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<__pthread_internal_slist>(),
8usize,
concat!("Size of: ", stringify!(__pthread_internal_slist))
);
assert_eq!(
::core::mem::align_of::<__pthread_internal_slist>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_internal_slist))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__next) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_internal_slist),
"::",
stringify!(__next)
)
);
}
pub type __pthread_slist_t = __pthread_internal_slist;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_mutex_s {
pub __lock: ::core::ffi::c_int,
pub __count: ::core::ffi::c_uint,
pub __owner: ::core::ffi::c_int,
pub __nusers: ::core::ffi::c_uint,
pub __kind: ::core::ffi::c_int,
pub __spins: ::core::ffi::c_short,
pub __elision: ::core::ffi::c_short,
pub __list: __pthread_list_t,
}
#[test]
fn bindgen_test_layout___pthread_mutex_s() {
const UNINIT: ::core::mem::MaybeUninit<__pthread_mutex_s> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<__pthread_mutex_s>(),
40usize,
concat!("Size of: ", stringify!(__pthread_mutex_s))
);
assert_eq!(
::core::mem::align_of::<__pthread_mutex_s>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_mutex_s))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__lock) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__lock)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__count) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__count)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__owner) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__owner)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__nusers) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__nusers)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__kind) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__kind)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__spins) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__spins)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__elision) as usize - ptr as usize },
22usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__elision)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__list) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__list)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_rwlock_arch_t {
pub __readers: ::core::ffi::c_uint,
pub __writers: ::core::ffi::c_uint,
pub __wrphase_futex: ::core::ffi::c_uint,
pub __writers_futex: ::core::ffi::c_uint,
pub __pad3: ::core::ffi::c_uint,
pub __pad4: ::core::ffi::c_uint,
pub __cur_writer: ::core::ffi::c_int,
pub __shared: ::core::ffi::c_int,
pub __rwelision: ::core::ffi::c_schar,
pub __pad1: [::core::ffi::c_uchar; 7usize],
pub __pad2: ::core::ffi::c_ulong,
pub __flags: ::core::ffi::c_uint,
}
#[test]
fn bindgen_test_layout___pthread_rwlock_arch_t() {
const UNINIT: ::core::mem::MaybeUninit<__pthread_rwlock_arch_t> =
::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<__pthread_rwlock_arch_t>(),
56usize,
concat!("Size of: ", stringify!(__pthread_rwlock_arch_t))
);
assert_eq!(
::core::mem::align_of::<__pthread_rwlock_arch_t>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_rwlock_arch_t))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__readers) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__readers)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__writers) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__writers)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__wrphase_futex) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__wrphase_futex)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__writers_futex) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__writers_futex)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__pad3) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__pad3)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__pad4) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__pad4)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__cur_writer) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__cur_writer)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__shared) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__shared)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__rwelision) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__rwelision)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__pad1) as usize - ptr as usize },
33usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__pad1)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__pad2) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__pad2)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__flags) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__flags)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __pthread_cond_s {
pub __wseq: __atomic_wide_counter,
pub __g1_start: __atomic_wide_counter,
pub __g_refs: [::core::ffi::c_uint; 2usize],
pub __g_size: [::core::ffi::c_uint; 2usize],
pub __g1_orig_size: ::core::ffi::c_uint,
pub __wrefs: ::core::ffi::c_uint,
pub __g_signals: [::core::ffi::c_uint; 2usize],
}
#[test]
fn bindgen_test_layout___pthread_cond_s() {
const UNINIT: ::core::mem::MaybeUninit<__pthread_cond_s> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<__pthread_cond_s>(),
48usize,
concat!("Size of: ", stringify!(__pthread_cond_s))
);
assert_eq!(
::core::mem::align_of::<__pthread_cond_s>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_cond_s))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__wseq) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__wseq)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__g1_start) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__g1_start)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__g_refs) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__g_refs)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__g_size) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__g_size)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__g1_orig_size) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__g1_orig_size)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__wrefs) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__wrefs)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__g_signals) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__g_signals)
)
);
}
pub type __tss_t = ::core::ffi::c_uint;
pub type __thrd_t = ::core::ffi::c_ulong;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __once_flag {
pub __data: ::core::ffi::c_int,
}
#[test]
fn bindgen_test_layout___once_flag() {
const UNINIT: ::core::mem::MaybeUninit<__once_flag> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<__once_flag>(),
4usize,
concat!("Size of: ", stringify!(__once_flag))
);
assert_eq!(
::core::mem::align_of::<__once_flag>(),
4usize,
concat!("Alignment of ", stringify!(__once_flag))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__data) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__once_flag),
"::",
stringify!(__data)
)
);
}
pub type pthread_t = ::core::ffi::c_ulong;
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_mutexattr_t {
pub __size: [::core::ffi::c_char; 4usize],
pub __align: ::core::ffi::c_int,
}
#[test]
fn bindgen_test_layout_pthread_mutexattr_t() {
const UNINIT: ::core::mem::MaybeUninit<pthread_mutexattr_t> =
::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<pthread_mutexattr_t>(),
4usize,
concat!("Size of: ", stringify!(pthread_mutexattr_t))
);
assert_eq!(
::core::mem::align_of::<pthread_mutexattr_t>(),
4usize,
concat!("Alignment of ", stringify!(pthread_mutexattr_t))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_mutexattr_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_mutexattr_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_condattr_t {
pub __size: [::core::ffi::c_char; 4usize],
pub __align: ::core::ffi::c_int,
}
#[test]
fn bindgen_test_layout_pthread_condattr_t() {
const UNINIT: ::core::mem::MaybeUninit<pthread_condattr_t> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<pthread_condattr_t>(),
4usize,
concat!("Size of: ", stringify!(pthread_condattr_t))
);
assert_eq!(
::core::mem::align_of::<pthread_condattr_t>(),
4usize,
concat!("Alignment of ", stringify!(pthread_condattr_t))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_condattr_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_condattr_t),
"::",
stringify!(__align)
)
);
}
pub type pthread_key_t = ::core::ffi::c_uint;
pub type pthread_once_t = ::core::ffi::c_int;
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_attr_t {
pub __size: [::core::ffi::c_char; 56usize],
pub __align: ::core::ffi::c_long,
}
#[test]
fn bindgen_test_layout_pthread_attr_t() {
const UNINIT: ::core::mem::MaybeUninit<pthread_attr_t> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<pthread_attr_t>(),
56usize,
concat!("Size of: ", stringify!(pthread_attr_t))
);
assert_eq!(
::core::mem::align_of::<pthread_attr_t>(),
8usize,
concat!("Alignment of ", stringify!(pthread_attr_t))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_attr_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_attr_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_mutex_t {
pub __data: __pthread_mutex_s,
pub __size: [::core::ffi::c_char; 40usize],
pub __align: ::core::ffi::c_long,
}
#[test]
fn bindgen_test_layout_pthread_mutex_t() {
const UNINIT: ::core::mem::MaybeUninit<pthread_mutex_t> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<pthread_mutex_t>(),
40usize,
concat!("Size of: ", stringify!(pthread_mutex_t))
);
assert_eq!(
::core::mem::align_of::<pthread_mutex_t>(),
8usize,
concat!("Alignment of ", stringify!(pthread_mutex_t))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__data) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_mutex_t),
"::",
stringify!(__data)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_mutex_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_mutex_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_cond_t {
pub __data: __pthread_cond_s,
pub __size: [::core::ffi::c_char; 48usize],
pub __align: ::core::ffi::c_longlong,
}
#[test]
fn bindgen_test_layout_pthread_cond_t() {
const UNINIT: ::core::mem::MaybeUninit<pthread_cond_t> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<pthread_cond_t>(),
48usize,
concat!("Size of: ", stringify!(pthread_cond_t))
);
assert_eq!(
::core::mem::align_of::<pthread_cond_t>(),
8usize,
concat!("Alignment of ", stringify!(pthread_cond_t))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__data) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_cond_t),
"::",
stringify!(__data)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_cond_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_cond_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_rwlock_t {
pub __data: __pthread_rwlock_arch_t,
pub __size: [::core::ffi::c_char; 56usize],
pub __align: ::core::ffi::c_long,
}
#[test]
fn bindgen_test_layout_pthread_rwlock_t() {
const UNINIT: ::core::mem::MaybeUninit<pthread_rwlock_t> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<pthread_rwlock_t>(),
56usize,
concat!("Size of: ", stringify!(pthread_rwlock_t))
);
assert_eq!(
::core::mem::align_of::<pthread_rwlock_t>(),
8usize,
concat!("Alignment of ", stringify!(pthread_rwlock_t))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__data) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_rwlock_t),
"::",
stringify!(__data)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_rwlock_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_rwlock_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_rwlockattr_t {
pub __size: [::core::ffi::c_char; 8usize],
pub __align: ::core::ffi::c_long,
}
#[test]
fn bindgen_test_layout_pthread_rwlockattr_t() {
const UNINIT: ::core::mem::MaybeUninit<pthread_rwlockattr_t> =
::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<pthread_rwlockattr_t>(),
8usize,
concat!("Size of: ", stringify!(pthread_rwlockattr_t))
);
assert_eq!(
::core::mem::align_of::<pthread_rwlockattr_t>(),
8usize,
concat!("Alignment of ", stringify!(pthread_rwlockattr_t))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_rwlockattr_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_rwlockattr_t),
"::",
stringify!(__align)
)
);
}
pub type pthread_spinlock_t = ::core::ffi::c_int;
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_barrier_t {
pub __size: [::core::ffi::c_char; 32usize],
pub __align: ::core::ffi::c_long,
}
#[test]
fn bindgen_test_layout_pthread_barrier_t() {
const UNINIT: ::core::mem::MaybeUninit<pthread_barrier_t> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<pthread_barrier_t>(),
32usize,
concat!("Size of: ", stringify!(pthread_barrier_t))
);
assert_eq!(
::core::mem::align_of::<pthread_barrier_t>(),
8usize,
concat!("Alignment of ", stringify!(pthread_barrier_t))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_barrier_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_barrier_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_barrierattr_t {
pub __size: [::core::ffi::c_char; 4usize],
pub __align: ::core::ffi::c_int,
}
#[test]
fn bindgen_test_layout_pthread_barrierattr_t() {
const UNINIT: ::core::mem::MaybeUninit<pthread_barrierattr_t> =
::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<pthread_barrierattr_t>(),
4usize,
concat!("Size of: ", stringify!(pthread_barrierattr_t))
);
assert_eq!(
::core::mem::align_of::<pthread_barrierattr_t>(),
4usize,
concat!("Alignment of ", stringify!(pthread_barrierattr_t))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_barrierattr_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_barrierattr_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union sem_t {
pub __size: [::core::ffi::c_char; 32usize],
pub __align: ::core::ffi::c_long,
}
#[test]
fn bindgen_test_layout_sem_t() {
const UNINIT: ::core::mem::MaybeUninit<sem_t> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<sem_t>(),
32usize,
concat!("Size of: ", stringify!(sem_t))
);
assert_eq!(
::core::mem::align_of::<sem_t>(),
8usize,
concat!("Alignment of ", stringify!(sem_t))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sem_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sem_t),
"::",
stringify!(__align)
)
);
}
extern "C" {
pub fn sem_init(
__sem: *mut sem_t,
__pshared: ::core::ffi::c_int,
__value: ::core::ffi::c_uint,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn sem_destroy(__sem: *mut sem_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn sem_open(
__name: *const ::core::ffi::c_char,
__oflag: ::core::ffi::c_int,
...
) -> *mut sem_t;
}
extern "C" {
pub fn sem_close(__sem: *mut sem_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn sem_unlink(__name: *const ::core::ffi::c_char) -> ::core::ffi::c_int;
}
extern "C" {
pub fn sem_wait(__sem: *mut sem_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn sem_timedwait(__sem: *mut sem_t, __abstime: *const timespec) -> ::core::ffi::c_int;
}
extern "C" {
pub fn sem_trywait(__sem: *mut sem_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn sem_post(__sem: *mut sem_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn sem_getvalue(__sem: *mut sem_t, __sval: *mut ::core::ffi::c_int) -> ::core::ffi::c_int;
}
pub type csp_bin_sem_t = sem_t;
extern "C" {
#[doc = " initialize a binary semaphore with static storage\n The semaphore is created in state \\a unlocked (value 1).\n On platforms supporting max values, the semaphore is created with a max value of 1, hence the naming \\a binary."]
pub fn csp_bin_sem_init(sem: *mut csp_bin_sem_t);
}
extern "C" {
#[doc = " Wait/lock semaphore\n @param[in] timeout timeout in mS. Use #CSP_MAX_TIMEOUT for no timeout, e.g. wait forever until locked.\n @return #CSP_SEMAPHORE_OK on success, otherwise #CSP_SEMAPHORE_ERROR"]
pub fn csp_bin_sem_wait(
sem: *mut csp_bin_sem_t,
timeout: ::core::ffi::c_uint,
) -> ::core::ffi::c_int;
}
extern "C" {
#[doc = " Signal/unlock semaphore\n @return #CSP_SEMAPHORE_OK on success, otherwise #CSP_SEMAPHORE_ERROR"]
pub fn csp_bin_sem_post(sem: *mut csp_bin_sem_t) -> ::core::ffi::c_int;
}
pub const csp_conn_state_t_CONN_CLOSED: csp_conn_state_t = 0;
pub const csp_conn_state_t_CONN_OPEN: csp_conn_state_t = 1;
#[doc = " Connection states"]
pub type csp_conn_state_t = ::core::ffi::c_uint;
pub const csp_conn_type_t_CONN_CLIENT: csp_conn_type_t = 0;
pub const csp_conn_type_t_CONN_SERVER: csp_conn_type_t = 1;
#[doc = " Connection types"]
pub type csp_conn_type_t = ::core::ffi::c_uint;
pub const csp_rdp_state_t_RDP_CLOSED: csp_rdp_state_t = 0;
pub const csp_rdp_state_t_RDP_SYN_SENT: csp_rdp_state_t = 1;
pub const csp_rdp_state_t_RDP_SYN_RCVD: csp_rdp_state_t = 2;
pub const csp_rdp_state_t_RDP_OPEN: csp_rdp_state_t = 3;
pub const csp_rdp_state_t_RDP_CLOSE_WAIT: csp_rdp_state_t = 4;
#[doc = " RDP Connection states"]
pub type csp_rdp_state_t = ::core::ffi::c_uint;
#[doc = " RDP Connection"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct csp_rdp_t {
#[doc = "< Connection state"]
pub state: csp_rdp_state_t,
#[doc = "< Tracks 'who' have closed the RDP connection"]
pub closed_by: u8,
#[doc = "< The sequence number of the next segment that is to be sent"]
pub snd_nxt: u16,
#[doc = "< The sequence number of the oldest unacknowledged segment"]
pub snd_una: u16,
#[doc = "< The initial send sequence number"]
pub snd_iss: u16,
#[doc = "< The sequence number of the last segment received correctly and in sequence"]
pub rcv_cur: u16,
#[doc = "< The initial receive sequence number"]
pub rcv_irs: u16,
#[doc = "< The last sequence number acknowledged by the receiver"]
pub rcv_lsa: u16,
pub window_size: u32,
pub conn_timeout: u32,
pub packet_timeout: u32,
pub delayed_acks: u32,
pub ack_timeout: u32,
pub ack_delay_count: u32,
pub ack_timestamp: u32,
pub tx_wait: csp_bin_sem_t,
}
#[test]
fn bindgen_test_layout_csp_rdp_t() {
const UNINIT: ::core::mem::MaybeUninit<csp_rdp_t> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<csp_rdp_t>(),
80usize,
concat!("Size of: ", stringify!(csp_rdp_t))
);
assert_eq!(
::core::mem::align_of::<csp_rdp_t>(),
8usize,
concat!("Alignment of ", stringify!(csp_rdp_t))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).state) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(csp_rdp_t),
"::",
stringify!(state)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).closed_by) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(csp_rdp_t),
"::",
stringify!(closed_by)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).snd_nxt) as usize - ptr as usize },
6usize,
concat!(
"Offset of field: ",
stringify!(csp_rdp_t),
"::",
stringify!(snd_nxt)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).snd_una) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(csp_rdp_t),
"::",
stringify!(snd_una)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).snd_iss) as usize - ptr as usize },
10usize,
concat!(
"Offset of field: ",
stringify!(csp_rdp_t),
"::",
stringify!(snd_iss)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).rcv_cur) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(csp_rdp_t),
"::",
stringify!(rcv_cur)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).rcv_irs) as usize - ptr as usize },
14usize,
concat!(
"Offset of field: ",
stringify!(csp_rdp_t),
"::",
stringify!(rcv_irs)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).rcv_lsa) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(csp_rdp_t),
"::",
stringify!(rcv_lsa)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).window_size) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(csp_rdp_t),
"::",
stringify!(window_size)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).conn_timeout) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(csp_rdp_t),
"::",
stringify!(conn_timeout)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).packet_timeout) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(csp_rdp_t),
"::",
stringify!(packet_timeout)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).delayed_acks) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(csp_rdp_t),
"::",
stringify!(delayed_acks)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).ack_timeout) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(csp_rdp_t),
"::",
stringify!(ack_timeout)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).ack_delay_count) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(csp_rdp_t),
"::",
stringify!(ack_delay_count)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).ack_timestamp) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(csp_rdp_t),
"::",
stringify!(ack_timestamp)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).tx_wait) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(csp_rdp_t),
"::",
stringify!(tx_wait)
)
);
}
#[doc = " @brief Connection struct"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct csp_conn_s {
pub type_: atomic_int,
pub state: atomic_int,
pub idin: csp_id_t,
pub idout: csp_id_t,
pub sport_outgoing: u8,
pub rx_queue: csp_queue_handle_t,
pub rx_queue_static: csp_static_queue_t,
pub rx_queue_static_data: [::core::ffi::c_char; 128usize],
pub callback: ::core::option::Option<unsafe extern "C" fn(packet: *mut csp_packet_t)>,
pub dest_socket: *mut csp_socket_t,
pub timestamp: u32,
pub opts: u32,
pub rdp: csp_rdp_t,
}
#[test]
fn bindgen_test_layout_csp_conn_s() {
const UNINIT: ::core::mem::MaybeUninit<csp_conn_s> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<csp_conn_s>(),
280usize,
concat!("Size of: ", stringify!(csp_conn_s))
);
assert_eq!(
::core::mem::align_of::<csp_conn_s>(),
8usize,
concat!("Alignment of ", stringify!(csp_conn_s))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(csp_conn_s),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).state) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(csp_conn_s),
"::",
stringify!(state)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).idin) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(csp_conn_s),
"::",
stringify!(idin)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).idout) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(csp_conn_s),
"::",
stringify!(idout)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).sport_outgoing) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(csp_conn_s),
"::",
stringify!(sport_outgoing)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).rx_queue) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(csp_conn_s),
"::",
stringify!(rx_queue)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).rx_queue_static) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(csp_conn_s),
"::",
stringify!(rx_queue_static)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).rx_queue_static_data) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(csp_conn_s),
"::",
stringify!(rx_queue_static_data)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).callback) as usize - ptr as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(csp_conn_s),
"::",
stringify!(callback)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).dest_socket) as usize - ptr as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(csp_conn_s),
"::",
stringify!(dest_socket)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).timestamp) as usize - ptr as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(csp_conn_s),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).opts) as usize - ptr as usize },
196usize,
concat!(
"Offset of field: ",
stringify!(csp_conn_s),
"::",
stringify!(opts)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).rdp) as usize - ptr as usize },
200usize,
concat!(
"Offset of field: ",
stringify!(csp_conn_s),
"::",
stringify!(rdp)
)
);
}
extern "C" {
pub fn csp_conn_enqueue_packet(
conn: *mut csp_conn_t,
packet: *mut csp_packet_t,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn csp_conn_init();
}
extern "C" {
pub fn csp_conn_allocate(type_: csp_conn_type_t) -> *mut csp_conn_t;
}
extern "C" {
pub fn csp_conn_find_existing(id: *mut csp_id_t) -> *mut csp_conn_t;
}
extern "C" {
pub fn csp_conn_find_dport(dport: ::core::ffi::c_uint) -> *mut csp_conn_t;
}
extern "C" {
pub fn csp_conn_new(idin: csp_id_t, idout: csp_id_t, type_: csp_conn_type_t)
-> *mut csp_conn_t;
}
extern "C" {
pub fn csp_conn_check_timeouts();
}
extern "C" {
pub fn csp_conn_get_rxq(prio: ::core::ffi::c_int) -> ::core::ffi::c_int;
}
extern "C" {
pub fn csp_conn_close(conn: *mut csp_conn_t, closed_by: u8) -> ::core::ffi::c_int;
}
extern "C" {
pub fn csp_conn_get_array(size: *mut usize) -> *const csp_conn_t;
}
extern "C" {
#[doc = " Loopback interface."]
pub static mut csp_if_lo: csp_iface_t;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sched_param {
pub sched_priority: ::core::ffi::c_int,
}
#[test]
fn bindgen_test_layout_sched_param() {
const UNINIT: ::core::mem::MaybeUninit<sched_param> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<sched_param>(),
4usize,
concat!("Size of: ", stringify!(sched_param))
);
assert_eq!(
::core::mem::align_of::<sched_param>(),
4usize,
concat!("Alignment of ", stringify!(sched_param))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).sched_priority) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sched_param),
"::",
stringify!(sched_priority)
)
);
}
pub type __cpu_mask = ::core::ffi::c_ulong;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cpu_set_t {
pub __bits: [__cpu_mask; 16usize],
}
#[test]
fn bindgen_test_layout_cpu_set_t() {
const UNINIT: ::core::mem::MaybeUninit<cpu_set_t> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<cpu_set_t>(),
128usize,
concat!("Size of: ", stringify!(cpu_set_t))
);
assert_eq!(
::core::mem::align_of::<cpu_set_t>(),
8usize,
concat!("Alignment of ", stringify!(cpu_set_t))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__bits) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(cpu_set_t),
"::",
stringify!(__bits)
)
);
}
extern "C" {
pub fn __sched_cpucount(__setsize: usize, __setp: *const cpu_set_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn __sched_cpualloc(__count: usize) -> *mut cpu_set_t;
}
extern "C" {
pub fn __sched_cpufree(__set: *mut cpu_set_t);
}
extern "C" {
pub fn sched_setparam(__pid: __pid_t, __param: *const sched_param) -> ::core::ffi::c_int;
}
extern "C" {
pub fn sched_getparam(__pid: __pid_t, __param: *mut sched_param) -> ::core::ffi::c_int;
}
extern "C" {
pub fn sched_setscheduler(
__pid: __pid_t,
__policy: ::core::ffi::c_int,
__param: *const sched_param,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn sched_getscheduler(__pid: __pid_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn sched_yield() -> ::core::ffi::c_int;
}
extern "C" {
pub fn sched_get_priority_max(__algorithm: ::core::ffi::c_int) -> ::core::ffi::c_int;
}
extern "C" {
pub fn sched_get_priority_min(__algorithm: ::core::ffi::c_int) -> ::core::ffi::c_int;
}
extern "C" {
pub fn sched_rr_get_interval(__pid: __pid_t, __t: *mut timespec) -> ::core::ffi::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct tm {
pub tm_sec: ::core::ffi::c_int,
pub tm_min: ::core::ffi::c_int,
pub tm_hour: ::core::ffi::c_int,
pub tm_mday: ::core::ffi::c_int,
pub tm_mon: ::core::ffi::c_int,
pub tm_year: ::core::ffi::c_int,
pub tm_wday: ::core::ffi::c_int,
pub tm_yday: ::core::ffi::c_int,
pub tm_isdst: ::core::ffi::c_int,
pub tm_gmtoff: ::core::ffi::c_long,
pub tm_zone: *const ::core::ffi::c_char,
}
#[test]
fn bindgen_test_layout_tm() {
const UNINIT: ::core::mem::MaybeUninit<tm> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<tm>(),
56usize,
concat!("Size of: ", stringify!(tm))
);
assert_eq!(
::core::mem::align_of::<tm>(),
8usize,
concat!("Alignment of ", stringify!(tm))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).tm_sec) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(tm),
"::",
stringify!(tm_sec)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).tm_min) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(tm),
"::",
stringify!(tm_min)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).tm_hour) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(tm),
"::",
stringify!(tm_hour)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).tm_mday) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(tm),
"::",
stringify!(tm_mday)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).tm_mon) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(tm),
"::",
stringify!(tm_mon)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).tm_year) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(tm),
"::",
stringify!(tm_year)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).tm_wday) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(tm),
"::",
stringify!(tm_wday)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).tm_yday) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(tm),
"::",
stringify!(tm_yday)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).tm_isdst) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(tm),
"::",
stringify!(tm_isdst)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).tm_gmtoff) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(tm),
"::",
stringify!(tm_gmtoff)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).tm_zone) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(tm),
"::",
stringify!(tm_zone)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct itimerspec {
pub it_interval: timespec,
pub it_value: timespec,
}
#[test]
fn bindgen_test_layout_itimerspec() {
const UNINIT: ::core::mem::MaybeUninit<itimerspec> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<itimerspec>(),
32usize,
concat!("Size of: ", stringify!(itimerspec))
);
assert_eq!(
::core::mem::align_of::<itimerspec>(),
8usize,
concat!("Alignment of ", stringify!(itimerspec))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).it_interval) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(itimerspec),
"::",
stringify!(it_interval)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).it_value) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(itimerspec),
"::",
stringify!(it_value)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sigevent {
_unused: [u8; 0],
}
extern "C" {
pub fn clock() -> clock_t;
}
extern "C" {
pub fn time(__timer: *mut time_t) -> time_t;
}
extern "C" {
pub fn difftime(__time1: time_t, __time0: time_t) -> f64;
}
extern "C" {
pub fn mktime(__tp: *mut tm) -> time_t;
}
extern "C" {
pub fn strftime(
__s: *mut ::core::ffi::c_char,
__maxsize: usize,
__format: *const ::core::ffi::c_char,
__tp: *const tm,
) -> usize;
}
extern "C" {
pub fn strftime_l(
__s: *mut ::core::ffi::c_char,
__maxsize: usize,
__format: *const ::core::ffi::c_char,
__tp: *const tm,
__loc: locale_t,
) -> usize;
}
extern "C" {
pub fn gmtime(__timer: *const time_t) -> *mut tm;
}
extern "C" {
pub fn localtime(__timer: *const time_t) -> *mut tm;
}
extern "C" {
pub fn gmtime_r(__timer: *const time_t, __tp: *mut tm) -> *mut tm;
}
extern "C" {
pub fn localtime_r(__timer: *const time_t, __tp: *mut tm) -> *mut tm;
}
extern "C" {
pub fn asctime(__tp: *const tm) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn ctime(__timer: *const time_t) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn asctime_r(__tp: *const tm, __buf: *mut ::core::ffi::c_char) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub fn ctime_r(
__timer: *const time_t,
__buf: *mut ::core::ffi::c_char,
) -> *mut ::core::ffi::c_char;
}
extern "C" {
pub static mut __tzname: [*mut ::core::ffi::c_char; 2usize];
}
extern "C" {
pub static mut __daylight: ::core::ffi::c_int;
}
extern "C" {
pub static mut __timezone: ::core::ffi::c_long;
}
extern "C" {
pub static mut tzname: [*mut ::core::ffi::c_char; 2usize];
}
extern "C" {
pub fn tzset();
}
extern "C" {
pub static mut daylight: ::core::ffi::c_int;
}
extern "C" {
pub static mut timezone: ::core::ffi::c_long;
}
extern "C" {
pub fn timegm(__tp: *mut tm) -> time_t;
}
extern "C" {
pub fn timelocal(__tp: *mut tm) -> time_t;
}
extern "C" {
pub fn dysize(__year: ::core::ffi::c_int) -> ::core::ffi::c_int;
}
extern "C" {
pub fn nanosleep(
__requested_time: *const timespec,
__remaining: *mut timespec,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn clock_getres(__clock_id: clockid_t, __res: *mut timespec) -> ::core::ffi::c_int;
}
extern "C" {
pub fn clock_gettime(__clock_id: clockid_t, __tp: *mut timespec) -> ::core::ffi::c_int;
}
extern "C" {
pub fn clock_settime(__clock_id: clockid_t, __tp: *const timespec) -> ::core::ffi::c_int;
}
extern "C" {
pub fn clock_nanosleep(
__clock_id: clockid_t,
__flags: ::core::ffi::c_int,
__req: *const timespec,
__rem: *mut timespec,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn clock_getcpuclockid(__pid: pid_t, __clock_id: *mut clockid_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn timer_create(
__clock_id: clockid_t,
__evp: *mut sigevent,
__timerid: *mut timer_t,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn timer_delete(__timerid: timer_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn timer_settime(
__timerid: timer_t,
__flags: ::core::ffi::c_int,
__value: *const itimerspec,
__ovalue: *mut itimerspec,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn timer_gettime(__timerid: timer_t, __value: *mut itimerspec) -> ::core::ffi::c_int;
}
extern "C" {
pub fn timer_getoverrun(__timerid: timer_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn timespec_get(__ts: *mut timespec, __base: ::core::ffi::c_int) -> ::core::ffi::c_int;
}
pub type __jmp_buf = [::core::ffi::c_long; 8usize];
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __jmp_buf_tag {
pub __jmpbuf: __jmp_buf,
pub __mask_was_saved: ::core::ffi::c_int,
pub __saved_mask: __sigset_t,
}
#[test]
fn bindgen_test_layout___jmp_buf_tag() {
const UNINIT: ::core::mem::MaybeUninit<__jmp_buf_tag> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<__jmp_buf_tag>(),
200usize,
concat!("Size of: ", stringify!(__jmp_buf_tag))
);
assert_eq!(
::core::mem::align_of::<__jmp_buf_tag>(),
8usize,
concat!("Alignment of ", stringify!(__jmp_buf_tag))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__jmpbuf) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__jmp_buf_tag),
"::",
stringify!(__jmpbuf)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__mask_was_saved) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(__jmp_buf_tag),
"::",
stringify!(__mask_was_saved)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__saved_mask) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(__jmp_buf_tag),
"::",
stringify!(__saved_mask)
)
);
}
pub const PTHREAD_CREATE_JOINABLE: _bindgen_ty_1 = 0;
pub const PTHREAD_CREATE_DETACHED: _bindgen_ty_1 = 1;
pub type _bindgen_ty_1 = ::core::ffi::c_uint;
pub const PTHREAD_MUTEX_TIMED_NP: _bindgen_ty_2 = 0;
pub const PTHREAD_MUTEX_RECURSIVE_NP: _bindgen_ty_2 = 1;
pub const PTHREAD_MUTEX_ERRORCHECK_NP: _bindgen_ty_2 = 2;
pub const PTHREAD_MUTEX_ADAPTIVE_NP: _bindgen_ty_2 = 3;
pub const PTHREAD_MUTEX_NORMAL: _bindgen_ty_2 = 0;
pub const PTHREAD_MUTEX_RECURSIVE: _bindgen_ty_2 = 1;
pub const PTHREAD_MUTEX_ERRORCHECK: _bindgen_ty_2 = 2;
pub const PTHREAD_MUTEX_DEFAULT: _bindgen_ty_2 = 0;
pub type _bindgen_ty_2 = ::core::ffi::c_uint;
pub const PTHREAD_MUTEX_STALLED: _bindgen_ty_3 = 0;
pub const PTHREAD_MUTEX_STALLED_NP: _bindgen_ty_3 = 0;
pub const PTHREAD_MUTEX_ROBUST: _bindgen_ty_3 = 1;
pub const PTHREAD_MUTEX_ROBUST_NP: _bindgen_ty_3 = 1;
pub type _bindgen_ty_3 = ::core::ffi::c_uint;
pub const PTHREAD_PRIO_NONE: _bindgen_ty_4 = 0;
pub const PTHREAD_PRIO_INHERIT: _bindgen_ty_4 = 1;
pub const PTHREAD_PRIO_PROTECT: _bindgen_ty_4 = 2;
pub type _bindgen_ty_4 = ::core::ffi::c_uint;
pub const PTHREAD_RWLOCK_PREFER_READER_NP: _bindgen_ty_5 = 0;
pub const PTHREAD_RWLOCK_PREFER_WRITER_NP: _bindgen_ty_5 = 1;
pub const PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP: _bindgen_ty_5 = 2;
pub const PTHREAD_RWLOCK_DEFAULT_NP: _bindgen_ty_5 = 0;
pub type _bindgen_ty_5 = ::core::ffi::c_uint;
pub const PTHREAD_INHERIT_SCHED: _bindgen_ty_6 = 0;
pub const PTHREAD_EXPLICIT_SCHED: _bindgen_ty_6 = 1;
pub type _bindgen_ty_6 = ::core::ffi::c_uint;
pub const PTHREAD_SCOPE_SYSTEM: _bindgen_ty_7 = 0;
pub const PTHREAD_SCOPE_PROCESS: _bindgen_ty_7 = 1;
pub type _bindgen_ty_7 = ::core::ffi::c_uint;
pub const PTHREAD_PROCESS_PRIVATE: _bindgen_ty_8 = 0;
pub const PTHREAD_PROCESS_SHARED: _bindgen_ty_8 = 1;
pub type _bindgen_ty_8 = ::core::ffi::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _pthread_cleanup_buffer {
pub __routine: ::core::option::Option<unsafe extern "C" fn(arg1: *mut ::core::ffi::c_void)>,
pub __arg: *mut ::core::ffi::c_void,
pub __canceltype: ::core::ffi::c_int,
pub __prev: *mut _pthread_cleanup_buffer,
}
#[test]
fn bindgen_test_layout__pthread_cleanup_buffer() {
const UNINIT: ::core::mem::MaybeUninit<_pthread_cleanup_buffer> =
::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<_pthread_cleanup_buffer>(),
32usize,
concat!("Size of: ", stringify!(_pthread_cleanup_buffer))
);
assert_eq!(
::core::mem::align_of::<_pthread_cleanup_buffer>(),
8usize,
concat!("Alignment of ", stringify!(_pthread_cleanup_buffer))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__routine) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_pthread_cleanup_buffer),
"::",
stringify!(__routine)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__arg) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_pthread_cleanup_buffer),
"::",
stringify!(__arg)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__canceltype) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(_pthread_cleanup_buffer),
"::",
stringify!(__canceltype)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__prev) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(_pthread_cleanup_buffer),
"::",
stringify!(__prev)
)
);
}
pub const PTHREAD_CANCEL_ENABLE: _bindgen_ty_9 = 0;
pub const PTHREAD_CANCEL_DISABLE: _bindgen_ty_9 = 1;
pub type _bindgen_ty_9 = ::core::ffi::c_uint;
pub const PTHREAD_CANCEL_DEFERRED: _bindgen_ty_10 = 0;
pub const PTHREAD_CANCEL_ASYNCHRONOUS: _bindgen_ty_10 = 1;
pub type _bindgen_ty_10 = ::core::ffi::c_uint;
extern "C" {
pub fn pthread_create(
__newthread: *mut pthread_t,
__attr: *const pthread_attr_t,
__start_routine: ::core::option::Option<
unsafe extern "C" fn(arg1: *mut ::core::ffi::c_void) -> *mut ::core::ffi::c_void,
>,
__arg: *mut ::core::ffi::c_void,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_exit(__retval: *mut ::core::ffi::c_void) -> !;
}
extern "C" {
pub fn pthread_join(
__th: pthread_t,
__thread_return: *mut *mut ::core::ffi::c_void,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_detach(__th: pthread_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_self() -> pthread_t;
}
extern "C" {
pub fn pthread_equal(__thread1: pthread_t, __thread2: pthread_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_attr_init(__attr: *mut pthread_attr_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_attr_destroy(__attr: *mut pthread_attr_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_attr_getdetachstate(
__attr: *const pthread_attr_t,
__detachstate: *mut ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_attr_setdetachstate(
__attr: *mut pthread_attr_t,
__detachstate: ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_attr_getguardsize(
__attr: *const pthread_attr_t,
__guardsize: *mut usize,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_attr_setguardsize(
__attr: *mut pthread_attr_t,
__guardsize: usize,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_attr_getschedparam(
__attr: *const pthread_attr_t,
__param: *mut sched_param,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_attr_setschedparam(
__attr: *mut pthread_attr_t,
__param: *const sched_param,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_attr_getschedpolicy(
__attr: *const pthread_attr_t,
__policy: *mut ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_attr_setschedpolicy(
__attr: *mut pthread_attr_t,
__policy: ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_attr_getinheritsched(
__attr: *const pthread_attr_t,
__inherit: *mut ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_attr_setinheritsched(
__attr: *mut pthread_attr_t,
__inherit: ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_attr_getscope(
__attr: *const pthread_attr_t,
__scope: *mut ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_attr_setscope(
__attr: *mut pthread_attr_t,
__scope: ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_attr_getstackaddr(
__attr: *const pthread_attr_t,
__stackaddr: *mut *mut ::core::ffi::c_void,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_attr_setstackaddr(
__attr: *mut pthread_attr_t,
__stackaddr: *mut ::core::ffi::c_void,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_attr_getstacksize(
__attr: *const pthread_attr_t,
__stacksize: *mut usize,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_attr_setstacksize(
__attr: *mut pthread_attr_t,
__stacksize: usize,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_attr_getstack(
__attr: *const pthread_attr_t,
__stackaddr: *mut *mut ::core::ffi::c_void,
__stacksize: *mut usize,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_attr_setstack(
__attr: *mut pthread_attr_t,
__stackaddr: *mut ::core::ffi::c_void,
__stacksize: usize,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_setschedparam(
__target_thread: pthread_t,
__policy: ::core::ffi::c_int,
__param: *const sched_param,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_getschedparam(
__target_thread: pthread_t,
__policy: *mut ::core::ffi::c_int,
__param: *mut sched_param,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_setschedprio(
__target_thread: pthread_t,
__prio: ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_once(
__once_control: *mut pthread_once_t,
__init_routine: ::core::option::Option<unsafe extern "C" fn()>,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_setcancelstate(
__state: ::core::ffi::c_int,
__oldstate: *mut ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_setcanceltype(
__type: ::core::ffi::c_int,
__oldtype: *mut ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_cancel(__th: pthread_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_testcancel();
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __cancel_jmp_buf_tag {
pub __cancel_jmp_buf: __jmp_buf,
pub __mask_was_saved: ::core::ffi::c_int,
}
#[test]
fn bindgen_test_layout___cancel_jmp_buf_tag() {
const UNINIT: ::core::mem::MaybeUninit<__cancel_jmp_buf_tag> =
::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<__cancel_jmp_buf_tag>(),
72usize,
concat!("Size of: ", stringify!(__cancel_jmp_buf_tag))
);
assert_eq!(
::core::mem::align_of::<__cancel_jmp_buf_tag>(),
8usize,
concat!("Alignment of ", stringify!(__cancel_jmp_buf_tag))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__cancel_jmp_buf) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__cancel_jmp_buf_tag),
"::",
stringify!(__cancel_jmp_buf)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__mask_was_saved) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(__cancel_jmp_buf_tag),
"::",
stringify!(__mask_was_saved)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_unwind_buf_t {
pub __cancel_jmp_buf: [__cancel_jmp_buf_tag; 1usize],
pub __pad: [*mut ::core::ffi::c_void; 4usize],
}
#[test]
fn bindgen_test_layout___pthread_unwind_buf_t() {
const UNINIT: ::core::mem::MaybeUninit<__pthread_unwind_buf_t> =
::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<__pthread_unwind_buf_t>(),
104usize,
concat!("Size of: ", stringify!(__pthread_unwind_buf_t))
);
assert_eq!(
::core::mem::align_of::<__pthread_unwind_buf_t>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_unwind_buf_t))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__cancel_jmp_buf) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_unwind_buf_t),
"::",
stringify!(__cancel_jmp_buf)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__pad) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(__pthread_unwind_buf_t),
"::",
stringify!(__pad)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_cleanup_frame {
pub __cancel_routine:
::core::option::Option<unsafe extern "C" fn(arg1: *mut ::core::ffi::c_void)>,
pub __cancel_arg: *mut ::core::ffi::c_void,
pub __do_it: ::core::ffi::c_int,
pub __cancel_type: ::core::ffi::c_int,
}
#[test]
fn bindgen_test_layout___pthread_cleanup_frame() {
const UNINIT: ::core::mem::MaybeUninit<__pthread_cleanup_frame> =
::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<__pthread_cleanup_frame>(),
24usize,
concat!("Size of: ", stringify!(__pthread_cleanup_frame))
);
assert_eq!(
::core::mem::align_of::<__pthread_cleanup_frame>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_cleanup_frame))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__cancel_routine) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cleanup_frame),
"::",
stringify!(__cancel_routine)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__cancel_arg) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cleanup_frame),
"::",
stringify!(__cancel_arg)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__do_it) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cleanup_frame),
"::",
stringify!(__do_it)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__cancel_type) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cleanup_frame),
"::",
stringify!(__cancel_type)
)
);
}
extern "C" {
pub fn __pthread_register_cancel(__buf: *mut __pthread_unwind_buf_t);
}
extern "C" {
pub fn __pthread_unregister_cancel(__buf: *mut __pthread_unwind_buf_t);
}
extern "C" {
pub fn __pthread_unwind_next(__buf: *mut __pthread_unwind_buf_t) -> !;
}
extern "C" {
pub fn __sigsetjmp(
__env: *mut __jmp_buf_tag,
__savemask: ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_mutex_init(
__mutex: *mut pthread_mutex_t,
__mutexattr: *const pthread_mutexattr_t,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_mutex_destroy(__mutex: *mut pthread_mutex_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_mutex_trylock(__mutex: *mut pthread_mutex_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_mutex_lock(__mutex: *mut pthread_mutex_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_mutex_timedlock(
__mutex: *mut pthread_mutex_t,
__abstime: *const timespec,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_mutex_unlock(__mutex: *mut pthread_mutex_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_mutex_getprioceiling(
__mutex: *const pthread_mutex_t,
__prioceiling: *mut ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_mutex_setprioceiling(
__mutex: *mut pthread_mutex_t,
__prioceiling: ::core::ffi::c_int,
__old_ceiling: *mut ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_mutex_consistent(__mutex: *mut pthread_mutex_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_mutexattr_init(__attr: *mut pthread_mutexattr_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_mutexattr_destroy(__attr: *mut pthread_mutexattr_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_mutexattr_getpshared(
__attr: *const pthread_mutexattr_t,
__pshared: *mut ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_mutexattr_setpshared(
__attr: *mut pthread_mutexattr_t,
__pshared: ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_mutexattr_gettype(
__attr: *const pthread_mutexattr_t,
__kind: *mut ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_mutexattr_settype(
__attr: *mut pthread_mutexattr_t,
__kind: ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_mutexattr_getprotocol(
__attr: *const pthread_mutexattr_t,
__protocol: *mut ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_mutexattr_setprotocol(
__attr: *mut pthread_mutexattr_t,
__protocol: ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_mutexattr_getprioceiling(
__attr: *const pthread_mutexattr_t,
__prioceiling: *mut ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_mutexattr_setprioceiling(
__attr: *mut pthread_mutexattr_t,
__prioceiling: ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_mutexattr_getrobust(
__attr: *const pthread_mutexattr_t,
__robustness: *mut ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_mutexattr_setrobust(
__attr: *mut pthread_mutexattr_t,
__robustness: ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_rwlock_init(
__rwlock: *mut pthread_rwlock_t,
__attr: *const pthread_rwlockattr_t,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_rwlock_destroy(__rwlock: *mut pthread_rwlock_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_rwlock_rdlock(__rwlock: *mut pthread_rwlock_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_rwlock_tryrdlock(__rwlock: *mut pthread_rwlock_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_rwlock_timedrdlock(
__rwlock: *mut pthread_rwlock_t,
__abstime: *const timespec,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_rwlock_wrlock(__rwlock: *mut pthread_rwlock_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_rwlock_trywrlock(__rwlock: *mut pthread_rwlock_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_rwlock_timedwrlock(
__rwlock: *mut pthread_rwlock_t,
__abstime: *const timespec,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_rwlock_unlock(__rwlock: *mut pthread_rwlock_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_rwlockattr_init(__attr: *mut pthread_rwlockattr_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_rwlockattr_destroy(__attr: *mut pthread_rwlockattr_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_rwlockattr_getpshared(
__attr: *const pthread_rwlockattr_t,
__pshared: *mut ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_rwlockattr_setpshared(
__attr: *mut pthread_rwlockattr_t,
__pshared: ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_rwlockattr_getkind_np(
__attr: *const pthread_rwlockattr_t,
__pref: *mut ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_rwlockattr_setkind_np(
__attr: *mut pthread_rwlockattr_t,
__pref: ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_cond_init(
__cond: *mut pthread_cond_t,
__cond_attr: *const pthread_condattr_t,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_cond_destroy(__cond: *mut pthread_cond_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_cond_signal(__cond: *mut pthread_cond_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_cond_broadcast(__cond: *mut pthread_cond_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_cond_wait(
__cond: *mut pthread_cond_t,
__mutex: *mut pthread_mutex_t,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_cond_timedwait(
__cond: *mut pthread_cond_t,
__mutex: *mut pthread_mutex_t,
__abstime: *const timespec,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_condattr_init(__attr: *mut pthread_condattr_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_condattr_destroy(__attr: *mut pthread_condattr_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_condattr_getpshared(
__attr: *const pthread_condattr_t,
__pshared: *mut ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_condattr_setpshared(
__attr: *mut pthread_condattr_t,
__pshared: ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_condattr_getclock(
__attr: *const pthread_condattr_t,
__clock_id: *mut __clockid_t,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_condattr_setclock(
__attr: *mut pthread_condattr_t,
__clock_id: __clockid_t,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_spin_init(
__lock: *mut pthread_spinlock_t,
__pshared: ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_spin_destroy(__lock: *mut pthread_spinlock_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_spin_lock(__lock: *mut pthread_spinlock_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_spin_trylock(__lock: *mut pthread_spinlock_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_spin_unlock(__lock: *mut pthread_spinlock_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_barrier_init(
__barrier: *mut pthread_barrier_t,
__attr: *const pthread_barrierattr_t,
__count: ::core::ffi::c_uint,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_barrier_destroy(__barrier: *mut pthread_barrier_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_barrier_wait(__barrier: *mut pthread_barrier_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_barrierattr_init(__attr: *mut pthread_barrierattr_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_barrierattr_destroy(__attr: *mut pthread_barrierattr_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_barrierattr_getpshared(
__attr: *const pthread_barrierattr_t,
__pshared: *mut ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_barrierattr_setpshared(
__attr: *mut pthread_barrierattr_t,
__pshared: ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_key_create(
__key: *mut pthread_key_t,
__destr_function: ::core::option::Option<
unsafe extern "C" fn(arg1: *mut ::core::ffi::c_void),
>,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_key_delete(__key: pthread_key_t) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_getspecific(__key: pthread_key_t) -> *mut ::core::ffi::c_void;
}
extern "C" {
pub fn pthread_setspecific(
__key: pthread_key_t,
__pointer: *const ::core::ffi::c_void,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_getcpuclockid(
__thread_id: pthread_t,
__clock_id: *mut __clockid_t,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn pthread_atfork(
__prepare: ::core::option::Option<unsafe extern "C" fn()>,
__parent: ::core::option::Option<unsafe extern "C" fn()>,
__child: ::core::option::Option<unsafe extern "C" fn()>,
) -> ::core::ffi::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct iovec {
pub iov_base: *mut ::core::ffi::c_void,
pub iov_len: usize,
}
#[test]
fn bindgen_test_layout_iovec() {
const UNINIT: ::core::mem::MaybeUninit<iovec> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<iovec>(),
16usize,
concat!("Size of: ", stringify!(iovec))
);
assert_eq!(
::core::mem::align_of::<iovec>(),
8usize,
concat!("Alignment of ", stringify!(iovec))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).iov_base) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(iovec),
"::",
stringify!(iov_base)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).iov_len) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(iovec),
"::",
stringify!(iov_len)
)
);
}
pub type socklen_t = __socklen_t;
pub const __socket_type_SOCK_STREAM: __socket_type = 1;
pub const __socket_type_SOCK_DGRAM: __socket_type = 2;
pub const __socket_type_SOCK_RAW: __socket_type = 3;
pub const __socket_type_SOCK_RDM: __socket_type = 4;
pub const __socket_type_SOCK_SEQPACKET: __socket_type = 5;
pub const __socket_type_SOCK_DCCP: __socket_type = 6;
pub const __socket_type_SOCK_PACKET: __socket_type = 10;
pub const __socket_type_SOCK_CLOEXEC: __socket_type = 524288;
pub const __socket_type_SOCK_NONBLOCK: __socket_type = 2048;
pub type __socket_type = ::core::ffi::c_uint;
pub type sa_family_t = ::core::ffi::c_ushort;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sockaddr {
pub sa_family: sa_family_t,
pub sa_data: [::core::ffi::c_char; 14usize],
}
#[test]
fn bindgen_test_layout_sockaddr() {
const UNINIT: ::core::mem::MaybeUninit<sockaddr> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<sockaddr>(),
16usize,
concat!("Size of: ", stringify!(sockaddr))
);
assert_eq!(
::core::mem::align_of::<sockaddr>(),
2usize,
concat!("Alignment of ", stringify!(sockaddr))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).sa_family) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sockaddr),
"::",
stringify!(sa_family)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).sa_data) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(sockaddr),
"::",
stringify!(sa_data)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sockaddr_storage {
pub ss_family: sa_family_t,
pub __ss_padding: [::core::ffi::c_char; 118usize],
pub __ss_align: ::core::ffi::c_ulong,
}
#[test]
fn bindgen_test_layout_sockaddr_storage() {
const UNINIT: ::core::mem::MaybeUninit<sockaddr_storage> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<sockaddr_storage>(),
128usize,
concat!("Size of: ", stringify!(sockaddr_storage))
);
assert_eq!(
::core::mem::align_of::<sockaddr_storage>(),
8usize,
concat!("Alignment of ", stringify!(sockaddr_storage))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).ss_family) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_storage),
"::",
stringify!(ss_family)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__ss_padding) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_storage),
"::",
stringify!(__ss_padding)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__ss_align) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_storage),
"::",
stringify!(__ss_align)
)
);
}
pub const MSG_OOB: _bindgen_ty_11 = 1;
pub const MSG_PEEK: _bindgen_ty_11 = 2;
pub const MSG_DONTROUTE: _bindgen_ty_11 = 4;
pub const MSG_CTRUNC: _bindgen_ty_11 = 8;
pub const MSG_PROXY: _bindgen_ty_11 = 16;
pub const MSG_TRUNC: _bindgen_ty_11 = 32;
pub const MSG_DONTWAIT: _bindgen_ty_11 = 64;
pub const MSG_EOR: _bindgen_ty_11 = 128;
pub const MSG_WAITALL: _bindgen_ty_11 = 256;
pub const MSG_FIN: _bindgen_ty_11 = 512;
pub const MSG_SYN: _bindgen_ty_11 = 1024;
pub const MSG_CONFIRM: _bindgen_ty_11 = 2048;
pub const MSG_RST: _bindgen_ty_11 = 4096;
pub const MSG_ERRQUEUE: _bindgen_ty_11 = 8192;
pub const MSG_NOSIGNAL: _bindgen_ty_11 = 16384;
pub const MSG_MORE: _bindgen_ty_11 = 32768;
pub const MSG_WAITFORONE: _bindgen_ty_11 = 65536;
pub const MSG_BATCH: _bindgen_ty_11 = 262144;
pub const MSG_ZEROCOPY: _bindgen_ty_11 = 67108864;
pub const MSG_FASTOPEN: _bindgen_ty_11 = 536870912;
pub const MSG_CMSG_CLOEXEC: _bindgen_ty_11 = 1073741824;
pub type _bindgen_ty_11 = ::core::ffi::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct msghdr {
pub msg_name: *mut ::core::ffi::c_void,
pub msg_namelen: socklen_t,
pub msg_iov: *mut iovec,
pub msg_iovlen: usize,
pub msg_control: *mut ::core::ffi::c_void,
pub msg_controllen: usize,
pub msg_flags: ::core::ffi::c_int,
}
#[test]
fn bindgen_test_layout_msghdr() {
const UNINIT: ::core::mem::MaybeUninit<msghdr> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<msghdr>(),
56usize,
concat!("Size of: ", stringify!(msghdr))
);
assert_eq!(
::core::mem::align_of::<msghdr>(),
8usize,
concat!("Alignment of ", stringify!(msghdr))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).msg_name) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(msghdr),
"::",
stringify!(msg_name)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).msg_namelen) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(msghdr),
"::",
stringify!(msg_namelen)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).msg_iov) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(msghdr),
"::",
stringify!(msg_iov)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).msg_iovlen) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(msghdr),
"::",
stringify!(msg_iovlen)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).msg_control) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(msghdr),
"::",
stringify!(msg_control)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).msg_controllen) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(msghdr),
"::",
stringify!(msg_controllen)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).msg_flags) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(msghdr),
"::",
stringify!(msg_flags)
)
);
}
#[repr(C)]
#[derive(Debug)]
pub struct cmsghdr {
pub cmsg_len: usize,
pub cmsg_level: ::core::ffi::c_int,
pub cmsg_type: ::core::ffi::c_int,
pub __cmsg_data: __IncompleteArrayField<::core::ffi::c_uchar>,
}
#[test]
fn bindgen_test_layout_cmsghdr() {
const UNINIT: ::core::mem::MaybeUninit<cmsghdr> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<cmsghdr>(),
16usize,
concat!("Size of: ", stringify!(cmsghdr))
);
assert_eq!(
::core::mem::align_of::<cmsghdr>(),
8usize,
concat!("Alignment of ", stringify!(cmsghdr))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).cmsg_len) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(cmsghdr),
"::",
stringify!(cmsg_len)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).cmsg_level) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(cmsghdr),
"::",
stringify!(cmsg_level)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).cmsg_type) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(cmsghdr),
"::",
stringify!(cmsg_type)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__cmsg_data) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(cmsghdr),
"::",
stringify!(__cmsg_data)
)
);
}
extern "C" {
pub fn __cmsg_nxthdr(__mhdr: *mut msghdr, __cmsg: *mut cmsghdr) -> *mut cmsghdr;
}
pub const SCM_RIGHTS: _bindgen_ty_12 = 1;
pub type _bindgen_ty_12 = ::core::ffi::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __kernel_fd_set {
pub fds_bits: [::core::ffi::c_ulong; 16usize],
}
#[test]
fn bindgen_test_layout___kernel_fd_set() {
const UNINIT: ::core::mem::MaybeUninit<__kernel_fd_set> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<__kernel_fd_set>(),
128usize,
concat!("Size of: ", stringify!(__kernel_fd_set))
);
assert_eq!(
::core::mem::align_of::<__kernel_fd_set>(),
8usize,
concat!("Alignment of ", stringify!(__kernel_fd_set))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__kernel_fd_set),
"::",
stringify!(fds_bits)
)
);
}
pub type __kernel_sighandler_t =
::core::option::Option<unsafe extern "C" fn(arg1: ::core::ffi::c_int)>;
pub type __kernel_key_t = ::core::ffi::c_int;
pub type __kernel_mqd_t = ::core::ffi::c_int;
pub type __kernel_old_uid_t = ::core::ffi::c_ushort;
pub type __kernel_old_gid_t = ::core::ffi::c_ushort;
pub type __kernel_old_dev_t = ::core::ffi::c_ulong;
pub type __kernel_long_t = ::core::ffi::c_long;
pub type __kernel_ulong_t = ::core::ffi::c_ulong;
pub type __kernel_ino_t = __kernel_ulong_t;
pub type __kernel_mode_t = ::core::ffi::c_uint;
pub type __kernel_pid_t = ::core::ffi::c_int;
pub type __kernel_ipc_pid_t = ::core::ffi::c_int;
pub type __kernel_uid_t = ::core::ffi::c_uint;
pub type __kernel_gid_t = ::core::ffi::c_uint;
pub type __kernel_suseconds_t = __kernel_long_t;
pub type __kernel_daddr_t = ::core::ffi::c_int;
pub type __kernel_uid32_t = ::core::ffi::c_uint;
pub type __kernel_gid32_t = ::core::ffi::c_uint;
pub type __kernel_size_t = __kernel_ulong_t;
pub type __kernel_ssize_t = __kernel_long_t;
pub type __kernel_ptrdiff_t = __kernel_long_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __kernel_fsid_t {
pub val: [::core::ffi::c_int; 2usize],
}
#[test]
fn bindgen_test_layout___kernel_fsid_t() {
const UNINIT: ::core::mem::MaybeUninit<__kernel_fsid_t> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<__kernel_fsid_t>(),
8usize,
concat!("Size of: ", stringify!(__kernel_fsid_t))
);
assert_eq!(
::core::mem::align_of::<__kernel_fsid_t>(),
4usize,
concat!("Alignment of ", stringify!(__kernel_fsid_t))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).val) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__kernel_fsid_t),
"::",
stringify!(val)
)
);
}
pub type __kernel_off_t = __kernel_long_t;
pub type __kernel_loff_t = ::core::ffi::c_longlong;
pub type __kernel_old_time_t = __kernel_long_t;
pub type __kernel_time_t = __kernel_long_t;
pub type __kernel_time64_t = ::core::ffi::c_longlong;
pub type __kernel_clock_t = __kernel_long_t;
pub type __kernel_timer_t = ::core::ffi::c_int;
pub type __kernel_clockid_t = ::core::ffi::c_int;
pub type __kernel_caddr_t = *mut ::core::ffi::c_char;
pub type __kernel_uid16_t = ::core::ffi::c_ushort;
pub type __kernel_gid16_t = ::core::ffi::c_ushort;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct linger {
pub l_onoff: ::core::ffi::c_int,
pub l_linger: ::core::ffi::c_int,
}
#[test]
fn bindgen_test_layout_linger() {
const UNINIT: ::core::mem::MaybeUninit<linger> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<linger>(),
8usize,
concat!("Size of: ", stringify!(linger))
);
assert_eq!(
::core::mem::align_of::<linger>(),
4usize,
concat!("Alignment of ", stringify!(linger))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).l_onoff) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(linger),
"::",
stringify!(l_onoff)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).l_linger) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(linger),
"::",
stringify!(l_linger)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct osockaddr {
pub sa_family: ::core::ffi::c_ushort,
pub sa_data: [::core::ffi::c_uchar; 14usize],
}
#[test]
fn bindgen_test_layout_osockaddr() {
const UNINIT: ::core::mem::MaybeUninit<osockaddr> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<osockaddr>(),
16usize,
concat!("Size of: ", stringify!(osockaddr))
);
assert_eq!(
::core::mem::align_of::<osockaddr>(),
2usize,
concat!("Alignment of ", stringify!(osockaddr))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).sa_family) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(osockaddr),
"::",
stringify!(sa_family)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).sa_data) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(osockaddr),
"::",
stringify!(sa_data)
)
);
}
pub const SHUT_RD: _bindgen_ty_13 = 0;
pub const SHUT_WR: _bindgen_ty_13 = 1;
pub const SHUT_RDWR: _bindgen_ty_13 = 2;
pub type _bindgen_ty_13 = ::core::ffi::c_uint;
extern "C" {
pub fn socket(
__domain: ::core::ffi::c_int,
__type: ::core::ffi::c_int,
__protocol: ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn socketpair(
__domain: ::core::ffi::c_int,
__type: ::core::ffi::c_int,
__protocol: ::core::ffi::c_int,
__fds: *mut ::core::ffi::c_int,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn bind(
__fd: ::core::ffi::c_int,
__addr: *const sockaddr,
__len: socklen_t,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn getsockname(
__fd: ::core::ffi::c_int,
__addr: *mut sockaddr,
__len: *mut socklen_t,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn connect(
__fd: ::core::ffi::c_int,
__addr: *const sockaddr,
__len: socklen_t,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn getpeername(
__fd: ::core::ffi::c_int,
__addr: *mut sockaddr,
__len: *mut socklen_t,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn send(
__fd: ::core::ffi::c_int,
__buf: *const ::core::ffi::c_void,
__n: usize,
__flags: ::core::ffi::c_int,
) -> isize;
}
extern "C" {
pub fn recv(
__fd: ::core::ffi::c_int,
__buf: *mut ::core::ffi::c_void,
__n: usize,
__flags: ::core::ffi::c_int,
) -> isize;
}
extern "C" {
pub fn sendto(
__fd: ::core::ffi::c_int,
__buf: *const ::core::ffi::c_void,
__n: usize,
__flags: ::core::ffi::c_int,
__addr: *const sockaddr,
__addr_len: socklen_t,
) -> isize;
}
extern "C" {
pub fn recvfrom(
__fd: ::core::ffi::c_int,
__buf: *mut ::core::ffi::c_void,
__n: usize,
__flags: ::core::ffi::c_int,
__addr: *mut sockaddr,
__addr_len: *mut socklen_t,
) -> isize;
}
extern "C" {
pub fn sendmsg(
__fd: ::core::ffi::c_int,
__message: *const msghdr,
__flags: ::core::ffi::c_int,
) -> isize;
}
extern "C" {
pub fn recvmsg(
__fd: ::core::ffi::c_int,
__message: *mut msghdr,
__flags: ::core::ffi::c_int,
) -> isize;
}
extern "C" {
pub fn getsockopt(
__fd: ::core::ffi::c_int,
__level: ::core::ffi::c_int,
__optname: ::core::ffi::c_int,
__optval: *mut ::core::ffi::c_void,
__optlen: *mut socklen_t,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn setsockopt(
__fd: ::core::ffi::c_int,
__level: ::core::ffi::c_int,
__optname: ::core::ffi::c_int,
__optval: *const ::core::ffi::c_void,
__optlen: socklen_t,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn listen(__fd: ::core::ffi::c_int, __n: ::core::ffi::c_int) -> ::core::ffi::c_int;
}
extern "C" {
pub fn accept(
__fd: ::core::ffi::c_int,
__addr: *mut sockaddr,
__addr_len: *mut socklen_t,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn shutdown(__fd: ::core::ffi::c_int, __how: ::core::ffi::c_int) -> ::core::ffi::c_int;
}
extern "C" {
pub fn sockatmark(__fd: ::core::ffi::c_int) -> ::core::ffi::c_int;
}
extern "C" {
pub fn isfdtype(__fd: ::core::ffi::c_int, __fdtype: ::core::ffi::c_int) -> ::core::ffi::c_int;
}
pub type in_addr_t = u32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct in_addr {
pub s_addr: in_addr_t,
}
#[test]
fn bindgen_test_layout_in_addr() {
const UNINIT: ::core::mem::MaybeUninit<in_addr> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<in_addr>(),
4usize,
concat!("Size of: ", stringify!(in_addr))
);
assert_eq!(
::core::mem::align_of::<in_addr>(),
4usize,
concat!("Alignment of ", stringify!(in_addr))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).s_addr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(in_addr),
"::",
stringify!(s_addr)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ip_opts {
pub ip_dst: in_addr,
pub ip_opts: [::core::ffi::c_char; 40usize],
}
#[test]
fn bindgen_test_layout_ip_opts() {
const UNINIT: ::core::mem::MaybeUninit<ip_opts> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<ip_opts>(),
44usize,
concat!("Size of: ", stringify!(ip_opts))
);
assert_eq!(
::core::mem::align_of::<ip_opts>(),
4usize,
concat!("Alignment of ", stringify!(ip_opts))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).ip_dst) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ip_opts),
"::",
stringify!(ip_dst)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).ip_opts) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ip_opts),
"::",
stringify!(ip_opts)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ip_mreqn {
pub imr_multiaddr: in_addr,
pub imr_address: in_addr,
pub imr_ifindex: ::core::ffi::c_int,
}
#[test]
fn bindgen_test_layout_ip_mreqn() {
const UNINIT: ::core::mem::MaybeUninit<ip_mreqn> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<ip_mreqn>(),
12usize,
concat!("Size of: ", stringify!(ip_mreqn))
);
assert_eq!(
::core::mem::align_of::<ip_mreqn>(),
4usize,
concat!("Alignment of ", stringify!(ip_mreqn))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).imr_multiaddr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ip_mreqn),
"::",
stringify!(imr_multiaddr)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).imr_address) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ip_mreqn),
"::",
stringify!(imr_address)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).imr_ifindex) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ip_mreqn),
"::",
stringify!(imr_ifindex)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct in_pktinfo {
pub ipi_ifindex: ::core::ffi::c_int,
pub ipi_spec_dst: in_addr,
pub ipi_addr: in_addr,
}
#[test]
fn bindgen_test_layout_in_pktinfo() {
const UNINIT: ::core::mem::MaybeUninit<in_pktinfo> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<in_pktinfo>(),
12usize,
concat!("Size of: ", stringify!(in_pktinfo))
);
assert_eq!(
::core::mem::align_of::<in_pktinfo>(),
4usize,
concat!("Alignment of ", stringify!(in_pktinfo))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).ipi_ifindex) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(in_pktinfo),
"::",
stringify!(ipi_ifindex)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).ipi_spec_dst) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(in_pktinfo),
"::",
stringify!(ipi_spec_dst)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).ipi_addr) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(in_pktinfo),
"::",
stringify!(ipi_addr)
)
);
}
pub const IPPROTO_IP: _bindgen_ty_14 = 0;
pub const IPPROTO_ICMP: _bindgen_ty_14 = 1;
pub const IPPROTO_IGMP: _bindgen_ty_14 = 2;
pub const IPPROTO_IPIP: _bindgen_ty_14 = 4;
pub const IPPROTO_TCP: _bindgen_ty_14 = 6;
pub const IPPROTO_EGP: _bindgen_ty_14 = 8;
pub const IPPROTO_PUP: _bindgen_ty_14 = 12;
pub const IPPROTO_UDP: _bindgen_ty_14 = 17;
pub const IPPROTO_IDP: _bindgen_ty_14 = 22;
pub const IPPROTO_TP: _bindgen_ty_14 = 29;
pub const IPPROTO_DCCP: _bindgen_ty_14 = 33;
pub const IPPROTO_IPV6: _bindgen_ty_14 = 41;
pub const IPPROTO_RSVP: _bindgen_ty_14 = 46;
pub const IPPROTO_GRE: _bindgen_ty_14 = 47;
pub const IPPROTO_ESP: _bindgen_ty_14 = 50;
pub const IPPROTO_AH: _bindgen_ty_14 = 51;
pub const IPPROTO_MTP: _bindgen_ty_14 = 92;
pub const IPPROTO_BEETPH: _bindgen_ty_14 = 94;
pub const IPPROTO_ENCAP: _bindgen_ty_14 = 98;
pub const IPPROTO_PIM: _bindgen_ty_14 = 103;
pub const IPPROTO_COMP: _bindgen_ty_14 = 108;
pub const IPPROTO_SCTP: _bindgen_ty_14 = 132;
pub const IPPROTO_UDPLITE: _bindgen_ty_14 = 136;
pub const IPPROTO_MPLS: _bindgen_ty_14 = 137;
pub const IPPROTO_ETHERNET: _bindgen_ty_14 = 143;
pub const IPPROTO_RAW: _bindgen_ty_14 = 255;
pub const IPPROTO_MPTCP: _bindgen_ty_14 = 262;
pub const IPPROTO_MAX: _bindgen_ty_14 = 263;
pub type _bindgen_ty_14 = ::core::ffi::c_uint;
pub const IPPROTO_HOPOPTS: _bindgen_ty_15 = 0;
pub const IPPROTO_ROUTING: _bindgen_ty_15 = 43;
pub const IPPROTO_FRAGMENT: _bindgen_ty_15 = 44;
pub const IPPROTO_ICMPV6: _bindgen_ty_15 = 58;
pub const IPPROTO_NONE: _bindgen_ty_15 = 59;
pub const IPPROTO_DSTOPTS: _bindgen_ty_15 = 60;
pub const IPPROTO_MH: _bindgen_ty_15 = 135;
pub type _bindgen_ty_15 = ::core::ffi::c_uint;
pub type in_port_t = u16;
pub const IPPORT_ECHO: _bindgen_ty_16 = 7;
pub const IPPORT_DISCARD: _bindgen_ty_16 = 9;
pub const IPPORT_SYSTAT: _bindgen_ty_16 = 11;
pub const IPPORT_DAYTIME: _bindgen_ty_16 = 13;
pub const IPPORT_NETSTAT: _bindgen_ty_16 = 15;
pub const IPPORT_FTP: _bindgen_ty_16 = 21;
pub const IPPORT_TELNET: _bindgen_ty_16 = 23;
pub const IPPORT_SMTP: _bindgen_ty_16 = 25;
pub const IPPORT_TIMESERVER: _bindgen_ty_16 = 37;
pub const IPPORT_NAMESERVER: _bindgen_ty_16 = 42;
pub const IPPORT_WHOIS: _bindgen_ty_16 = 43;
pub const IPPORT_MTP: _bindgen_ty_16 = 57;
pub const IPPORT_TFTP: _bindgen_ty_16 = 69;
pub const IPPORT_RJE: _bindgen_ty_16 = 77;
pub const IPPORT_FINGER: _bindgen_ty_16 = 79;
pub const IPPORT_TTYLINK: _bindgen_ty_16 = 87;
pub const IPPORT_SUPDUP: _bindgen_ty_16 = 95;
pub const IPPORT_EXECSERVER: _bindgen_ty_16 = 512;
pub const IPPORT_LOGINSERVER: _bindgen_ty_16 = 513;
pub const IPPORT_CMDSERVER: _bindgen_ty_16 = 514;
pub const IPPORT_EFSSERVER: _bindgen_ty_16 = 520;
pub const IPPORT_BIFFUDP: _bindgen_ty_16 = 512;
pub const IPPORT_WHOSERVER: _bindgen_ty_16 = 513;
pub const IPPORT_ROUTESERVER: _bindgen_ty_16 = 520;
pub const IPPORT_RESERVED: _bindgen_ty_16 = 1024;
pub const IPPORT_USERRESERVED: _bindgen_ty_16 = 5000;
pub type _bindgen_ty_16 = ::core::ffi::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct in6_addr {
pub __in6_u: in6_addr__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union in6_addr__bindgen_ty_1 {
pub __u6_addr8: [u8; 16usize],
pub __u6_addr16: [u16; 8usize],
pub __u6_addr32: [u32; 4usize],
}
#[test]
fn bindgen_test_layout_in6_addr__bindgen_ty_1() {
const UNINIT: ::core::mem::MaybeUninit<in6_addr__bindgen_ty_1> =
::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<in6_addr__bindgen_ty_1>(),
16usize,
concat!("Size of: ", stringify!(in6_addr__bindgen_ty_1))
);
assert_eq!(
::core::mem::align_of::<in6_addr__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(in6_addr__bindgen_ty_1))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__u6_addr8) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(in6_addr__bindgen_ty_1),
"::",
stringify!(__u6_addr8)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__u6_addr16) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(in6_addr__bindgen_ty_1),
"::",
stringify!(__u6_addr16)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__u6_addr32) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(in6_addr__bindgen_ty_1),
"::",
stringify!(__u6_addr32)
)
);
}
#[test]
fn bindgen_test_layout_in6_addr() {
const UNINIT: ::core::mem::MaybeUninit<in6_addr> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<in6_addr>(),
16usize,
concat!("Size of: ", stringify!(in6_addr))
);
assert_eq!(
::core::mem::align_of::<in6_addr>(),
4usize,
concat!("Alignment of ", stringify!(in6_addr))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).__in6_u) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(in6_addr),
"::",
stringify!(__in6_u)
)
);
}
extern "C" {
pub static in6addr_any: in6_addr;
}
extern "C" {
pub static in6addr_loopback: in6_addr;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sockaddr_in {
pub sin_family: sa_family_t,
pub sin_port: in_port_t,
pub sin_addr: in_addr,
pub sin_zero: [::core::ffi::c_uchar; 8usize],
}
#[test]
fn bindgen_test_layout_sockaddr_in() {
const UNINIT: ::core::mem::MaybeUninit<sockaddr_in> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<sockaddr_in>(),
16usize,
concat!("Size of: ", stringify!(sockaddr_in))
);
assert_eq!(
::core::mem::align_of::<sockaddr_in>(),
4usize,
concat!("Alignment of ", stringify!(sockaddr_in))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).sin_family) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_in),
"::",
stringify!(sin_family)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).sin_port) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_in),
"::",
stringify!(sin_port)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).sin_addr) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_in),
"::",
stringify!(sin_addr)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).sin_zero) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_in),
"::",
stringify!(sin_zero)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct sockaddr_in6 {
pub sin6_family: sa_family_t,
pub sin6_port: in_port_t,
pub sin6_flowinfo: u32,
pub sin6_addr: in6_addr,
pub sin6_scope_id: u32,
}
#[test]
fn bindgen_test_layout_sockaddr_in6() {
const UNINIT: ::core::mem::MaybeUninit<sockaddr_in6> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<sockaddr_in6>(),
28usize,
concat!("Size of: ", stringify!(sockaddr_in6))
);
assert_eq!(
::core::mem::align_of::<sockaddr_in6>(),
4usize,
concat!("Alignment of ", stringify!(sockaddr_in6))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).sin6_family) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_in6),
"::",
stringify!(sin6_family)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).sin6_port) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_in6),
"::",
stringify!(sin6_port)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).sin6_flowinfo) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_in6),
"::",
stringify!(sin6_flowinfo)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).sin6_addr) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_in6),
"::",
stringify!(sin6_addr)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).sin6_scope_id) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_in6),
"::",
stringify!(sin6_scope_id)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ip_mreq {
pub imr_multiaddr: in_addr,
pub imr_interface: in_addr,
}
#[test]
fn bindgen_test_layout_ip_mreq() {
const UNINIT: ::core::mem::MaybeUninit<ip_mreq> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<ip_mreq>(),
8usize,
concat!("Size of: ", stringify!(ip_mreq))
);
assert_eq!(
::core::mem::align_of::<ip_mreq>(),
4usize,
concat!("Alignment of ", stringify!(ip_mreq))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).imr_multiaddr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ip_mreq),
"::",
stringify!(imr_multiaddr)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).imr_interface) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ip_mreq),
"::",
stringify!(imr_interface)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ip_mreq_source {
pub imr_multiaddr: in_addr,
pub imr_interface: in_addr,
pub imr_sourceaddr: in_addr,
}
#[test]
fn bindgen_test_layout_ip_mreq_source() {
const UNINIT: ::core::mem::MaybeUninit<ip_mreq_source> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<ip_mreq_source>(),
12usize,
concat!("Size of: ", stringify!(ip_mreq_source))
);
assert_eq!(
::core::mem::align_of::<ip_mreq_source>(),
4usize,
concat!("Alignment of ", stringify!(ip_mreq_source))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).imr_multiaddr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ip_mreq_source),
"::",
stringify!(imr_multiaddr)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).imr_interface) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ip_mreq_source),
"::",
stringify!(imr_interface)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).imr_sourceaddr) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ip_mreq_source),
"::",
stringify!(imr_sourceaddr)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ipv6_mreq {
pub ipv6mr_multiaddr: in6_addr,
pub ipv6mr_interface: ::core::ffi::c_uint,
}
#[test]
fn bindgen_test_layout_ipv6_mreq() {
const UNINIT: ::core::mem::MaybeUninit<ipv6_mreq> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<ipv6_mreq>(),
20usize,
concat!("Size of: ", stringify!(ipv6_mreq))
);
assert_eq!(
::core::mem::align_of::<ipv6_mreq>(),
4usize,
concat!("Alignment of ", stringify!(ipv6_mreq))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).ipv6mr_multiaddr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ipv6_mreq),
"::",
stringify!(ipv6mr_multiaddr)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).ipv6mr_interface) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(ipv6_mreq),
"::",
stringify!(ipv6mr_interface)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct group_req {
pub gr_interface: u32,
pub gr_group: sockaddr_storage,
}
#[test]
fn bindgen_test_layout_group_req() {
const UNINIT: ::core::mem::MaybeUninit<group_req> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<group_req>(),
136usize,
concat!("Size of: ", stringify!(group_req))
);
assert_eq!(
::core::mem::align_of::<group_req>(),
8usize,
concat!("Alignment of ", stringify!(group_req))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).gr_interface) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(group_req),
"::",
stringify!(gr_interface)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).gr_group) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(group_req),
"::",
stringify!(gr_group)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct group_source_req {
pub gsr_interface: u32,
pub gsr_group: sockaddr_storage,
pub gsr_source: sockaddr_storage,
}
#[test]
fn bindgen_test_layout_group_source_req() {
const UNINIT: ::core::mem::MaybeUninit<group_source_req> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<group_source_req>(),
264usize,
concat!("Size of: ", stringify!(group_source_req))
);
assert_eq!(
::core::mem::align_of::<group_source_req>(),
8usize,
concat!("Alignment of ", stringify!(group_source_req))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).gsr_interface) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(group_source_req),
"::",
stringify!(gsr_interface)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).gsr_group) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(group_source_req),
"::",
stringify!(gsr_group)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).gsr_source) as usize - ptr as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(group_source_req),
"::",
stringify!(gsr_source)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ip_msfilter {
pub imsf_multiaddr: in_addr,
pub imsf_interface: in_addr,
pub imsf_fmode: u32,
pub imsf_numsrc: u32,
pub imsf_slist: [in_addr; 1usize],
}
#[test]
fn bindgen_test_layout_ip_msfilter() {
const UNINIT: ::core::mem::MaybeUninit<ip_msfilter> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<ip_msfilter>(),
20usize,
concat!("Size of: ", stringify!(ip_msfilter))
);
assert_eq!(
::core::mem::align_of::<ip_msfilter>(),
4usize,
concat!("Alignment of ", stringify!(ip_msfilter))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).imsf_multiaddr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ip_msfilter),
"::",
stringify!(imsf_multiaddr)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).imsf_interface) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ip_msfilter),
"::",
stringify!(imsf_interface)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).imsf_fmode) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ip_msfilter),
"::",
stringify!(imsf_fmode)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).imsf_numsrc) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(ip_msfilter),
"::",
stringify!(imsf_numsrc)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).imsf_slist) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(ip_msfilter),
"::",
stringify!(imsf_slist)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct group_filter {
pub gf_interface: u32,
pub gf_group: sockaddr_storage,
pub gf_fmode: u32,
pub gf_numsrc: u32,
pub gf_slist: [sockaddr_storage; 1usize],
}
#[test]
fn bindgen_test_layout_group_filter() {
const UNINIT: ::core::mem::MaybeUninit<group_filter> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<group_filter>(),
272usize,
concat!("Size of: ", stringify!(group_filter))
);
assert_eq!(
::core::mem::align_of::<group_filter>(),
8usize,
concat!("Alignment of ", stringify!(group_filter))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).gf_interface) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(group_filter),
"::",
stringify!(gf_interface)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).gf_group) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(group_filter),
"::",
stringify!(gf_group)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).gf_fmode) as usize - ptr as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(group_filter),
"::",
stringify!(gf_fmode)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).gf_numsrc) as usize - ptr as usize },
140usize,
concat!(
"Offset of field: ",
stringify!(group_filter),
"::",
stringify!(gf_numsrc)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).gf_slist) as usize - ptr as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(group_filter),
"::",
stringify!(gf_slist)
)
);
}
extern "C" {
pub fn ntohl(__netlong: u32) -> u32;
}
extern "C" {
pub fn ntohs(__netshort: u16) -> u16;
}
extern "C" {
pub fn htonl(__hostlong: u32) -> u32;
}
extern "C" {
pub fn htons(__hostshort: u16) -> u16;
}
extern "C" {
pub fn bindresvport(
__sockfd: ::core::ffi::c_int,
__sock_in: *mut sockaddr_in,
) -> ::core::ffi::c_int;
}
extern "C" {
pub fn bindresvport6(
__sockfd: ::core::ffi::c_int,
__sock_in: *mut sockaddr_in6,
) -> ::core::ffi::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct csp_if_udp_conf_t {
pub host: *mut ::core::ffi::c_char,
pub lport: ::core::ffi::c_int,
pub rport: ::core::ffi::c_int,
pub server_handle: pthread_t,
pub peer_addr: sockaddr_in,
pub sockfd: ::core::ffi::c_int,
}
#[test]
fn bindgen_test_layout_csp_if_udp_conf_t() {
const UNINIT: ::core::mem::MaybeUninit<csp_if_udp_conf_t> = ::core::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::core::mem::size_of::<csp_if_udp_conf_t>(),
48usize,
concat!("Size of: ", stringify!(csp_if_udp_conf_t))
);
assert_eq!(
::core::mem::align_of::<csp_if_udp_conf_t>(),
8usize,
concat!("Alignment of ", stringify!(csp_if_udp_conf_t))
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).host) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(csp_if_udp_conf_t),
"::",
stringify!(host)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).lport) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(csp_if_udp_conf_t),
"::",
stringify!(lport)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).rport) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(csp_if_udp_conf_t),
"::",
stringify!(rport)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).server_handle) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(csp_if_udp_conf_t),
"::",
stringify!(server_handle)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).peer_addr) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(csp_if_udp_conf_t),
"::",
stringify!(peer_addr)
)
);
assert_eq!(
unsafe { ::core::ptr::addr_of!((*ptr).sockfd) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(csp_if_udp_conf_t),
"::",
stringify!(sockfd)
)
);
}
extern "C" {
#[doc = " Setup UDP peer\n\n RX task:\n A server task will attempt at binding to ip 0.0.0.0 port 9600\n If this fails, it is because another udp server is already running.\n The server task will continue attemting the bind and will not exit before the application is closed.\n\n TX peer:\n Outgoing CSP packets will be transferred to the peer specified by the host argument"]
pub fn csp_if_udp_init(iface: *mut csp_iface_t, ifconf: *mut csp_if_udp_conf_t);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __locale_data {
pub _address: u8,
}