1
2
3
/* automatically generated by rust-bindgen */

# [ repr ( C ) ] # [ derive ( Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd ) ] pub struct __BindgenBitfieldUnit < Storage , Align > { storage : Storage , align : [ Align ; 0 ] , } impl < Storage , Align > __BindgenBitfieldUnit < Storage , Align > { # [ inline ] pub const fn new ( storage : Storage ) -> Self { Self { storage , align : [ ] } } } impl < Storage , Align > __BindgenBitfieldUnit < Storage , Align > where Storage : AsRef < [ u8 ] > + AsMut < [ u8 ] >, { # [ inline ] pub fn get_bit ( & self , index : usize ) -> bool { debug_assert ! ( index / 8 < self . storage . as_ref ( ) . len ( ) ) ; let byte_index = index / 8 ; let byte = self . storage . as_ref ( ) [ byte_index ] ; let bit_index = if cfg ! ( target_endian = "big" ) { 7 - ( index % 8 ) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [ inline ] pub fn set_bit ( & mut self , index : usize , val : bool ) { debug_assert ! ( index / 8 < self . storage . as_ref ( ) . len ( ) ) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut ( ) [ byte_index ] ; let bit_index = if cfg ! ( target_endian = "big" ) { 7 - ( index % 8 ) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [ inline ] pub fn get ( & self , bit_offset : usize , bit_width : u8 ) -> u64 { debug_assert ! ( bit_width <= 64 ) ; debug_assert ! ( bit_offset / 8 < self . storage . as_ref ( ) . len ( ) ) ; debug_assert ! ( ( bit_offset + ( bit_width as usize ) ) / 8 <= self . storage . as_ref ( ) . len ( ) ) ; let mut val = 0 ; for i in 0 .. ( bit_width as usize ) { if self . get_bit ( i + bit_offset ) { let index = if cfg ! ( target_endian = "big" ) { bit_width as usize - 1 - i } else { i } ; val |= 1 << index ; } } val } # [ inline ] pub fn set ( & mut self , bit_offset : usize , bit_width : u8 , val : u64 ) { debug_assert ! ( bit_width <= 64 ) ; debug_assert ! ( bit_offset / 8 < self . storage . as_ref ( ) . len ( ) ) ; debug_assert ! ( ( bit_offset + ( bit_width as usize ) ) / 8 <= self . storage . as_ref ( ) . len ( ) ) ; for i in 0 .. ( bit_width as usize ) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! ( target_endian = "big" ) { bit_width as usize - 1 - i } else { i } ; self . set_bit ( index + bit_offset , val_bit_is_set ) ; } } } # [ repr ( C ) ] # [ derive ( Default ) ] pub struct __IncompleteArrayField < T > ( :: std :: marker :: PhantomData < T > , [ T ; 0 ] ) ; impl < T > __IncompleteArrayField < T > { # [ inline ] pub const fn new ( ) -> Self { __IncompleteArrayField ( :: std :: 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 ] { :: std :: slice :: from_raw_parts ( self . as_ptr ( ) , len ) } # [ inline ] pub unsafe fn as_mut_slice ( & mut self , len : usize ) -> & mut [ T ] { :: std :: slice :: from_raw_parts_mut ( self . as_mut_ptr ( ) , len ) } } impl < T > :: std :: fmt :: Debug for __IncompleteArrayField < T > { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . write_str ( "__IncompleteArrayField" ) } } pub const LIBCOAP_PACKAGE_BUGREPORT : & 'static [ u8 ; 41usize ] = b"libcoap-developers@lists.sourceforge.net\0" ; pub const LIBCOAP_PACKAGE_NAME : & 'static [ u8 ; 8usize ] = b"libcoap\0" ; pub const LIBCOAP_PACKAGE_STRING : & 'static [ u8 ; 14usize ] = b"libcoap 4.2.1\0" ; pub const LIBCOAP_PACKAGE_URL : & 'static [ u8 ; 21usize ] = b"https://libcoap.net/\0" ; pub const LIBCOAP_PACKAGE_VERSION : & 'static [ u8 ; 6usize ] = b"4.2.1\0" ; pub const _NETINET_IN_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; 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 __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 _STDC_PREDEF_H : u32 = 1 ; pub const __STDC_IEC_559__ : u32 = 1 ; pub const __STDC_IEC_559_COMPLEX__ : u32 = 1 ; pub const __STDC_ISO_10646__ : u32 = 201706 ; pub const __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; pub const _SYS_CDEFS_H : u32 = 1 ; pub const __glibc_c99_flexarr_available : u32 = 1 ; pub const __WORDSIZE : u32 = 64 ; pub const __WORDSIZE_TIME64_COMPAT32 : u32 = 1 ; pub const __SYSCALL_WORDSIZE : u32 = 64 ; pub const __HAVE_GENERIC_SELECTION : u32 = 1 ; pub const _BITS_STDINT_UINTN_H : u32 = 1 ; 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 __FD_SETSIZE : u32 = 1024 ; pub const _SYS_SOCKET_H : u32 = 1 ; pub const __iovec_defined : 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 _BITS_STDINT_INTN_H : u32 = 1 ; pub const __BIT_TYPES_DEFINED__ : u32 = 1 ; pub const _ENDIAN_H : u32 = 1 ; 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 __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 __FD_ZERO_STOS : & 'static [ u8 ; 6usize ] = b"stosq\0" ; pub const __sigset_t_defined : u32 = 1 ; pub const __timeval_defined : u32 = 1 ; pub const __timespec_defined : u32 = 1 ; pub const FD_SETSIZE : u32 = 1024 ; pub const _SYS_SYSMACROS_H : u32 = 1 ; pub const _BITS_SYSMACROS_H : u32 = 1 ; 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 __PTHREAD_MUTEX_LOCK_ELISION : u32 = 1 ; pub const __PTHREAD_MUTEX_NUSERS_AFTER_KIND : u32 = 0 ; pub const __PTHREAD_MUTEX_USE_UNION : u32 = 0 ; pub const __PTHREAD_RWLOCK_INT_FLAGS_SHARED : u32 = 1 ; pub const __PTHREAD_MUTEX_HAVE_PREV : u32 = 1 ; pub const __have_pthread_attr_t : 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_MAX : u32 = 44 ; 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_MAX : u32 = 44 ; 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 SOMAXCONN : u32 = 128 ; pub const _BITS_SOCKADDR_H : u32 = 1 ; pub const _SS_SIZE : u32 = 128 ; 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 : u32 = 35078 ; pub const SIOCGSTAMPNS : 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 : u32 = 20 ; pub const SO_SNDTIMEO : 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_TIMESTAMP : u32 = 29 ; pub const SCM_TIMESTAMP : u32 = 29 ; pub const SO_ACCEPTCONN : u32 = 30 ; pub const SO_PEERSEC : u32 = 31 ; pub const SO_PASSSEC : u32 = 34 ; pub const SO_TIMESTAMPNS : u32 = 35 ; pub const SCM_TIMESTAMPNS : u32 = 35 ; pub const SO_MARK : u32 = 36 ; pub const SO_TIMESTAMPING : u32 = 37 ; pub const SCM_TIMESTAMPING : u32 = 37 ; 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 __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_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_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_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 const _ASSERT_H : 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_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_WCHAR_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 _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 _STDLIB_H : u32 = 1 ; pub const WNOHANG : u32 = 1 ; pub const WUNTRACED : u32 = 2 ; pub const WSTOPPED : u32 = 2 ; pub const WEXITED : u32 = 4 ; pub const WCONTINUED : u32 = 8 ; pub const WNOWAIT : u32 = 16777216 ; pub const __WNOTHREAD : u32 = 536870912 ; pub const __WALL : u32 = 1073741824 ; pub const __WCLONE : u32 = 2147483648 ; pub const __ENUM_IDTYPE_T : u32 = 1 ; pub const __W_CONTINUED : u32 = 65535 ; pub const __WCOREFLAG : u32 = 128 ; pub const __HAVE_FLOAT128 : u32 = 0 ; pub const __HAVE_DISTINCT_FLOAT128 : u32 = 0 ; pub const __HAVE_FLOAT64X : u32 = 1 ; pub const __HAVE_FLOAT64X_LONG_DOUBLE : u32 = 1 ; pub const __HAVE_FLOAT16 : u32 = 0 ; pub const __HAVE_FLOAT32 : u32 = 1 ; pub const __HAVE_FLOAT64 : u32 = 1 ; pub const __HAVE_FLOAT32X : u32 = 1 ; pub const __HAVE_FLOAT128X : u32 = 0 ; pub const __HAVE_DISTINCT_FLOAT16 : u32 = 0 ; pub const __HAVE_DISTINCT_FLOAT32 : u32 = 0 ; pub const __HAVE_DISTINCT_FLOAT64 : u32 = 0 ; pub const __HAVE_DISTINCT_FLOAT32X : u32 = 0 ; pub const __HAVE_DISTINCT_FLOAT64X : u32 = 0 ; pub const __HAVE_DISTINCT_FLOAT128X : u32 = 0 ; pub const __HAVE_FLOATN_NOT_TYPEDEF : u32 = 0 ; pub const __ldiv_t_defined : u32 = 1 ; pub const __lldiv_t_defined : u32 = 1 ; pub const RAND_MAX : u32 = 2147483647 ; pub const EXIT_FAILURE : u32 = 1 ; pub const EXIT_SUCCESS : u32 = 0 ; pub const _ALLOCA_H : u32 = 1 ; pub const _SYS_TIME_H : u32 = 1 ; 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 COAP_RXBUFFER_SIZE : u32 = 1472 ; pub const COAP_MAX_EPOLL_EVENTS : u32 = 10 ; pub const COAP_SOCKET_ERROR : i32 = -1 ; pub const COAP_INVALID_SOCKET : i32 = -1 ; pub const COAP_SOCKET_EMPTY : u32 = 0 ; pub const COAP_SOCKET_NOT_EMPTY : u32 = 1 ; pub const COAP_SOCKET_BOUND : u32 = 2 ; pub const COAP_SOCKET_CONNECTED : u32 = 4 ; pub const COAP_SOCKET_WANT_READ : u32 = 16 ; pub const COAP_SOCKET_WANT_WRITE : u32 = 32 ; pub const COAP_SOCKET_WANT_ACCEPT : u32 = 64 ; pub const COAP_SOCKET_WANT_CONNECT : u32 = 128 ; pub const COAP_SOCKET_CAN_READ : u32 = 256 ; pub const COAP_SOCKET_CAN_WRITE : u32 = 512 ; pub const COAP_SOCKET_CAN_ACCEPT : u32 = 1024 ; pub const COAP_SOCKET_CAN_CONNECT : u32 = 2048 ; pub const COAP_SOCKET_MULTICAST : u32 = 4096 ; pub const COAP_DTLS_PKI_SETUP_VERSION : u32 = 1 ; pub const COAP_EVENT_DTLS_CLOSED : u32 = 0 ; pub const COAP_EVENT_DTLS_CONNECTED : u32 = 478 ; pub const COAP_EVENT_DTLS_RENEGOTIATE : u32 = 479 ; pub const COAP_EVENT_DTLS_ERROR : u32 = 512 ; pub const COAP_EVENT_TCP_CONNECTED : u32 = 4097 ; pub const COAP_EVENT_TCP_CLOSED : u32 = 4098 ; pub const COAP_EVENT_TCP_FAILED : u32 = 4099 ; pub const COAP_EVENT_SESSION_CONNECTED : u32 = 8193 ; pub const COAP_EVENT_SESSION_CLOSED : u32 = 8194 ; pub const COAP_EVENT_SESSION_FAILED : u32 = 8195 ; pub const COAP_MAX_STR_CONST_FUNC : u32 = 2 ; pub const COAP_URI_SCHEME_SECURE_MASK : u32 = 1 ; pub const COAP_DEFAULT_PORT : u32 = 5683 ; pub const COAPS_DEFAULT_PORT : u32 = 5684 ; pub const COAP_DEFAULT_MAX_AGE : u32 = 60 ; pub const COAP_DEFAULT_MTU : u32 = 1152 ; pub const COAP_MESSAGE_SIZE_OFFSET_TCP8 : u32 = 13 ; pub const COAP_MESSAGE_SIZE_OFFSET_TCP16 : u32 = 269 ; pub const COAP_MESSAGE_SIZE_OFFSET_TCP32 : u32 = 65805 ; pub const COAP_MAX_MESSAGE_SIZE_TCP0 : u32 = 12 ; pub const COAP_MAX_MESSAGE_SIZE_TCP8 : u32 = 268 ; pub const COAP_MAX_MESSAGE_SIZE_TCP16 : u32 = 65804 ; pub const COAP_MAX_MESSAGE_SIZE_TCP32 : u64 = 4295033100 ; pub const COAP_DEFAULT_MAX_PDU_RX_SIZE : u32 = 8388864 ; pub const COAP_DEBUG_BUF_SIZE : u32 = 2056 ; pub const COAP_DEFAULT_VERSION : u32 = 1 ; pub const COAP_DEFAULT_SCHEME : & 'static [ u8 ; 5usize ] = b"coap\0" ; pub const COAP_DEFAULT_URI_WELLKNOWN : & 'static [ u8 ; 17usize ] = b".well-known/core\0" ; pub const COAP_MESSAGE_CON : u32 = 0 ; pub const COAP_MESSAGE_NON : u32 = 1 ; pub const COAP_MESSAGE_ACK : u32 = 2 ; pub const COAP_MESSAGE_RST : u32 = 3 ; pub const COAP_REQUEST_GET : u32 = 1 ; pub const COAP_REQUEST_POST : u32 = 2 ; pub const COAP_REQUEST_PUT : u32 = 3 ; pub const COAP_REQUEST_DELETE : u32 = 4 ; pub const COAP_REQUEST_FETCH : u32 = 5 ; pub const COAP_REQUEST_PATCH : u32 = 6 ; pub const COAP_REQUEST_IPATCH : u32 = 7 ; pub const COAP_OPTION_IF_MATCH : u32 = 1 ; pub const COAP_OPTION_URI_HOST : u32 = 3 ; pub const COAP_OPTION_ETAG : u32 = 4 ; pub const COAP_OPTION_IF_NONE_MATCH : u32 = 5 ; pub const COAP_OPTION_URI_PORT : u32 = 7 ; pub const COAP_OPTION_LOCATION_PATH : u32 = 8 ; pub const COAP_OPTION_URI_PATH : u32 = 11 ; pub const COAP_OPTION_CONTENT_FORMAT : u32 = 12 ; pub const COAP_OPTION_CONTENT_TYPE : u32 = 12 ; pub const COAP_OPTION_MAXAGE : u32 = 14 ; pub const COAP_OPTION_URI_QUERY : u32 = 15 ; pub const COAP_OPTION_ACCEPT : u32 = 17 ; pub const COAP_OPTION_LOCATION_QUERY : u32 = 20 ; pub const COAP_OPTION_SIZE2 : u32 = 28 ; pub const COAP_OPTION_PROXY_URI : u32 = 35 ; pub const COAP_OPTION_PROXY_SCHEME : u32 = 39 ; pub const COAP_OPTION_SIZE1 : u32 = 60 ; pub const COAP_OPTION_OBSERVE : u32 = 6 ; pub const COAP_OPTION_SUBSCRIPTION : u32 = 6 ; pub const COAP_OPTION_BLOCK2 : u32 = 23 ; pub const COAP_OPTION_BLOCK1 : u32 = 27 ; pub const COAP_OPTION_NORESPONSE : u32 = 258 ; pub const COAP_MAX_OPT : u32 = 65535 ; pub const COAP_ERROR_PHRASE_LENGTH : u32 = 32 ; pub const COAP_SIGNALING_OPTION_MAX_MESSAGE_SIZE : u32 = 2 ; pub const COAP_SIGNALING_OPTION_BLOCK_WISE_TRANSFER : u32 = 4 ; pub const COAP_SIGNALING_OPTION_CUSTODY : u32 = 2 ; pub const COAP_SIGNALING_OPTION_ALTERNATIVE_ADDRESS : u32 = 2 ; pub const COAP_SIGNALING_OPTION_HOLD_OFF : u32 = 4 ; pub const COAP_SIGNALING_OPTION_BAD_CSM_OPTION : u32 = 2 ; pub const COAP_MEDIATYPE_TEXT_PLAIN : u32 = 0 ; pub const COAP_MEDIATYPE_APPLICATION_LINK_FORMAT : u32 = 40 ; pub const COAP_MEDIATYPE_APPLICATION_XML : u32 = 41 ; pub const COAP_MEDIATYPE_APPLICATION_OCTET_STREAM : u32 = 42 ; pub const COAP_MEDIATYPE_APPLICATION_RDF_XML : u32 = 43 ; pub const COAP_MEDIATYPE_APPLICATION_EXI : u32 = 47 ; pub const COAP_MEDIATYPE_APPLICATION_JSON : u32 = 50 ; pub const COAP_MEDIATYPE_APPLICATION_CBOR : u32 = 60 ; pub const COAP_MEDIATYPE_APPLICATION_COSE_SIGN : u32 = 98 ; pub const COAP_MEDIATYPE_APPLICATION_COSE_SIGN1 : u32 = 18 ; pub const COAP_MEDIATYPE_APPLICATION_COSE_ENCRYPT : u32 = 96 ; pub const COAP_MEDIATYPE_APPLICATION_COSE_ENCRYPT0 : u32 = 16 ; pub const COAP_MEDIATYPE_APPLICATION_COSE_MAC : u32 = 97 ; pub const COAP_MEDIATYPE_APPLICATION_COSE_MAC0 : u32 = 17 ; pub const COAP_MEDIATYPE_APPLICATION_COSE_KEY : u32 = 101 ; pub const COAP_MEDIATYPE_APPLICATION_COSE_KEY_SET : u32 = 102 ; pub const COAP_MEDIATYPE_APPLICATION_SENML_JSON : u32 = 110 ; pub const COAP_MEDIATYPE_APPLICATION_SENSML_JSON : u32 = 111 ; pub const COAP_MEDIATYPE_APPLICATION_SENML_CBOR : u32 = 112 ; pub const COAP_MEDIATYPE_APPLICATION_SENSML_CBOR : u32 = 113 ; pub const COAP_MEDIATYPE_APPLICATION_SENML_EXI : u32 = 114 ; pub const COAP_MEDIATYPE_APPLICATION_SENSML_EXI : u32 = 115 ; pub const COAP_MEDIATYPE_APPLICATION_SENML_XML : u32 = 310 ; pub const COAP_MEDIATYPE_APPLICATION_SENSML_XML : u32 = 311 ; pub const COAP_MEDIATYPE_ANY : u32 = 255 ; pub const COAP_INVALID_TID : i32 = -1 ; pub const COAP_DROPPED_RESPONSE : i32 = -2 ; pub const COAP_PDU_DELAYED : i32 = -3 ; pub const COAP_OPT_LONG : u32 = 15 ; pub const COAP_OPT_END : u32 = 240 ; pub const COAP_PAYLOAD_START : u32 = 255 ; pub const COAP_PDU_MAX_UDP_HEADER_SIZE : u32 = 4 ; pub const COAP_PDU_MAX_TCP_HEADER_SIZE : u32 = 6 ; pub const COAP_PROTO_NONE : u32 = 0 ; pub const COAP_PROTO_UDP : u32 = 1 ; pub const COAP_PROTO_DTLS : u32 = 2 ; pub const COAP_PROTO_TCP : u32 = 3 ; pub const COAP_PROTO_TLS : u32 = 4 ; pub const COAP_OPT_FILTER_SHORT : u32 = 6 ; pub const COAP_OPT_FILTER_LONG : u32 = 2 ; pub const COAP_OPT_FILTER_SIZE : u32 = 6 ; pub const HASH_INITIAL_NUM_BUCKETS : u32 = 32 ; pub const HASH_INITIAL_NUM_BUCKETS_LOG2 : u32 = 5 ; pub const HASH_BKT_CAPACITY_THRESH : u32 = 10 ; pub const HASH_BLOOM_BYTELEN : u32 = 0 ; pub const HASH_SIGNATURE : u32 = 2685476833 ; pub const HASH_BLOOM_SIGNATURE : u32 = 2971803890 ; pub const COAP_DEFAULT_SESSION_TIMEOUT : u32 = 300 ; pub const COAP_DEFAULT_MAX_HANDSHAKE_SESSIONS : u32 = 100 ; pub const COAP_SESSION_TYPE_CLIENT : u32 = 1 ; pub const COAP_SESSION_TYPE_SERVER : u32 = 2 ; pub const COAP_SESSION_TYPE_HELLO : u32 = 3 ; pub const COAP_SESSION_STATE_NONE : u32 = 0 ; pub const COAP_SESSION_STATE_CONNECTING : u32 = 1 ; pub const COAP_SESSION_STATE_HANDSHAKE : u32 = 2 ; pub const COAP_SESSION_STATE_CSM : u32 = 3 ; pub const COAP_SESSION_STATE_ESTABLISHED : u32 = 4 ; pub const COAP_DEFAULT_MAX_RETRANSMIT : u32 = 4 ; pub const COAP_DEFAULT_NSTART : u32 = 1 ; pub const COAP_RUN_BLOCK : u32 = 0 ; pub const COAP_RUN_NONBLOCK : u32 = 1 ; pub const COAP_ASYNC_CONFIRM : u32 = 1 ; pub const COAP_ASYNC_SEPARATE : u32 = 2 ; pub const COAP_ASYNC_OBSERVED : u32 = 4 ; pub const COAP_ASYNC_RELEASE_DATA : u32 = 8 ; pub const Nn : u32 = 8 ; pub const ENCODE_HEADER_SIZE : u32 = 4 ; pub const HIBIT : u32 = 128 ; pub const EMASK : u32 = 15 ; pub const MMASK : u32 = 240 ; pub const MAX_VALUE : u32 = 7864320 ; pub const COAP_MAX_BLOCK_SZX : u32 = 6 ; pub const COAP_RESOURCE_CHECK_TIME : u32 = 2 ; pub const COAP_OBSERVE_ESTABLISH : u32 = 0 ; pub const COAP_OBSERVE_CANCEL : u32 = 1 ; pub const COAP_ATTR_FLAGS_RELEASE_NAME : u32 = 1 ; pub const COAP_ATTR_FLAGS_RELEASE_VALUE : u32 = 2 ; pub const COAP_RESOURCE_FLAGS_RELEASE_URI : u32 = 1 ; pub const COAP_RESOURCE_FLAGS_NOTIFY_NON : u32 = 0 ; pub const COAP_RESOURCE_FLAGS_NOTIFY_CON : u32 = 2 ; pub const COAP_PRINT_STATUS_MASK : u32 = 4026531840 ; pub const COAP_PRINT_STATUS_ERROR : u32 = 2147483648 ; pub const COAP_PRINT_STATUS_TRUNC : u32 = 1073741824 ; pub type __u_char = :: std :: os :: raw :: c_uchar ; pub type __u_short = :: std :: os :: raw :: c_ushort ; pub type __u_int = :: std :: os :: raw :: c_uint ; pub type __u_long = :: std :: os :: raw :: c_ulong ; pub type __int8_t = :: std :: os :: raw :: c_schar ; pub type __uint8_t = :: std :: os :: raw :: c_uchar ; pub type __int16_t = :: std :: os :: raw :: c_short ; pub type __uint16_t = :: std :: os :: raw :: c_ushort ; pub type __int32_t = :: std :: os :: raw :: c_int ; pub type __uint32_t = :: std :: os :: raw :: c_uint ; pub type __int64_t = :: std :: os :: raw :: c_long ; pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __quad_t = :: std :: os :: raw :: c_long ; pub type __u_quad_t = :: std :: os :: raw :: c_ulong ; pub type __intmax_t = :: std :: os :: raw :: c_long ; pub type __uintmax_t = :: std :: os :: raw :: c_ulong ; pub type __dev_t = :: std :: os :: raw :: c_ulong ; pub type __uid_t = :: std :: os :: raw :: c_uint ; pub type __gid_t = :: std :: os :: raw :: c_uint ; pub type __ino_t = :: std :: os :: raw :: c_ulong ; pub type __ino64_t = :: std :: os :: raw :: c_ulong ; pub type __mode_t = :: std :: os :: raw :: c_uint ; pub type __nlink_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __pid_t = :: std :: os :: raw :: c_int ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __fsid_t { pub __val : [ :: std :: os :: raw :: c_int ; 2usize ] , } # [ test ] fn bindgen_test_layout___fsid_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < __fsid_t > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( __fsid_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < __fsid_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( __fsid_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __fsid_t > ( ) ) ) . __val as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __fsid_t ) , "::" , stringify ! ( __val ) ) ) ; } pub type __clock_t = :: std :: os :: raw :: c_long ; pub type __rlim_t = :: std :: os :: raw :: c_ulong ; pub type __rlim64_t = :: std :: os :: raw :: c_ulong ; pub type __id_t = :: std :: os :: raw :: c_uint ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type __useconds_t = :: std :: os :: raw :: c_uint ; pub type __suseconds_t = :: std :: os :: raw :: c_long ; pub type __daddr_t = :: std :: os :: raw :: c_int ; pub type __key_t = :: std :: os :: raw :: c_int ; pub type __clockid_t = :: std :: os :: raw :: c_int ; pub type __timer_t = * mut :: std :: os :: raw :: c_void ; pub type __blksize_t = :: std :: os :: raw :: c_long ; pub type __blkcnt_t = :: std :: os :: raw :: c_long ; pub type __blkcnt64_t = :: std :: os :: raw :: c_long ; pub type __fsblkcnt_t = :: std :: os :: raw :: c_ulong ; pub type __fsblkcnt64_t = :: std :: os :: raw :: c_ulong ; pub type __fsfilcnt_t = :: std :: os :: raw :: c_ulong ; pub type __fsfilcnt64_t = :: std :: os :: raw :: c_ulong ; pub type __fsword_t = :: std :: os :: raw :: c_long ; pub type __ssize_t = :: std :: os :: raw :: c_long ; pub type __syscall_slong_t = :: std :: os :: raw :: c_long ; pub type __syscall_ulong_t = :: std :: os :: raw :: c_ulong ; pub type __loff_t = __off64_t ; pub type __caddr_t = * mut :: std :: os :: raw :: c_char ; pub type __intptr_t = :: std :: os :: raw :: c_long ; pub type __socklen_t = :: std :: os :: raw :: c_uint ; pub type __sig_atomic_t = :: std :: os :: raw :: c_int ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct iovec { pub iov_base : * mut :: std :: os :: raw :: c_void , pub iov_len : usize , } # [ test ] fn bindgen_test_layout_iovec ( ) { assert_eq ! ( :: std :: mem :: size_of :: < iovec > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( iovec ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < iovec > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( iovec ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < iovec > ( ) ) ) . iov_base as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( iovec ) , "::" , stringify ! ( iov_base ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < iovec > ( ) ) ) . iov_len as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( iovec ) , "::" , stringify ! ( iov_len ) ) ) ; } 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 = :: std :: os :: raw :: c_ulong ; pub type ushort = :: std :: os :: raw :: c_ushort ; pub type uint = :: std :: os :: raw :: c_uint ; pub type u_int8_t = :: std :: os :: raw :: c_uchar ; pub type u_int16_t = :: std :: os :: raw :: c_ushort ; pub type u_int32_t = :: std :: os :: raw :: c_uint ; pub type u_int64_t = :: std :: os :: raw :: c_ulong ; pub type register_t = :: std :: os :: raw :: c_long ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __sigset_t { pub __val : [ :: std :: os :: raw :: c_ulong ; 16usize ] , } # [ test ] fn bindgen_test_layout___sigset_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < __sigset_t > ( ) , 128usize , concat ! ( "Size of: " , stringify ! ( __sigset_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < __sigset_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( __sigset_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __sigset_t > ( ) ) ) . __val as * const _ 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 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < timeval > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( timeval ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < timeval > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( timeval ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < timeval > ( ) ) ) . tv_sec as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( timeval ) , "::" , stringify ! ( tv_sec ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < timeval > ( ) ) ) . tv_usec as * const _ 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 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < timespec > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( timespec ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < timespec > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( timespec ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < timespec > ( ) ) ) . tv_sec as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( timespec ) , "::" , stringify ! ( tv_sec ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < timespec > ( ) ) ) . tv_nsec as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( timespec ) , "::" , stringify ! ( tv_nsec ) ) ) ; } pub type suseconds_t = __suseconds_t ; pub type __fd_mask = :: std :: os :: raw :: 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 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < fd_set > ( ) , 128usize , concat ! ( "Size of: " , stringify ! ( fd_set ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < fd_set > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( fd_set ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < fd_set > ( ) ) ) . __fds_bits as * const _ 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 : :: std :: os :: raw :: c_int , __readfds : * mut fd_set , __writefds : * mut fd_set , __exceptfds : * mut fd_set , __timeout : * mut timeval ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn pselect ( __nfds : :: std :: os :: raw :: c_int , __readfds : * mut fd_set , __writefds : * mut fd_set , __exceptfds : * mut fd_set , __timeout : * const timespec , __sigmask : * const __sigset_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn gnu_dev_major ( __dev : __dev_t ) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn gnu_dev_minor ( __dev : __dev_t ) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn gnu_dev_makedev ( __major : :: std :: os :: raw :: c_uint , __minor : :: std :: os :: raw :: c_uint ) -> __dev_t ; } 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 ( Debug , Copy , Clone ) ] pub struct __pthread_rwlock_arch_t { pub __readers : :: std :: os :: raw :: c_uint , pub __writers : :: std :: os :: raw :: c_uint , pub __wrphase_futex : :: std :: os :: raw :: c_uint , pub __writers_futex : :: std :: os :: raw :: c_uint , pub __pad3 : :: std :: os :: raw :: c_uint , pub __pad4 : :: std :: os :: raw :: c_uint , pub __cur_writer : :: std :: os :: raw :: c_int , pub __shared : :: std :: os :: raw :: c_int , pub __rwelision : :: std :: os :: raw :: c_schar , pub __pad1 : [ :: std :: os :: raw :: c_uchar ; 7usize ] , pub __pad2 : :: std :: os :: raw :: c_ulong , pub __flags : :: std :: os :: raw :: c_uint , } # [ test ] fn bindgen_test_layout___pthread_rwlock_arch_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < __pthread_rwlock_arch_t > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( __pthread_rwlock_arch_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < __pthread_rwlock_arch_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( __pthread_rwlock_arch_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __readers as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __readers ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __writers as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __writers ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __wrphase_futex as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __wrphase_futex ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __writers_futex as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __writers_futex ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __pad3 as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __pad3 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __pad4 as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __pad4 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __cur_writer as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __cur_writer ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __shared as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __shared ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __rwelision as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __rwelision ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __pad1 as * const _ as usize } , 33usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __pad1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __pad2 as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __pad2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_rwlock_arch_t > ( ) ) ) . __flags as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_rwlock_arch_t ) , "::" , stringify ! ( __flags ) ) ) ; } # [ 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 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < __pthread_internal_list > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( __pthread_internal_list ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < __pthread_internal_list > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( __pthread_internal_list ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_internal_list > ( ) ) ) . __prev as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_internal_list ) , "::" , stringify ! ( __prev ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_internal_list > ( ) ) ) . __next as * const _ 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_mutex_s { pub __lock : :: std :: os :: raw :: c_int , pub __count : :: std :: os :: raw :: c_uint , pub __owner : :: std :: os :: raw :: c_int , pub __nusers : :: std :: os :: raw :: c_uint , pub __kind : :: std :: os :: raw :: c_int , pub __spins : :: std :: os :: raw :: c_short , pub __elision : :: std :: os :: raw :: c_short , pub __list : __pthread_list_t , } # [ test ] fn bindgen_test_layout___pthread_mutex_s ( ) { assert_eq ! ( :: std :: mem :: size_of :: < __pthread_mutex_s > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( __pthread_mutex_s ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < __pthread_mutex_s > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( __pthread_mutex_s ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_mutex_s > ( ) ) ) . __lock as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_mutex_s ) , "::" , stringify ! ( __lock ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_mutex_s > ( ) ) ) . __count as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_mutex_s ) , "::" , stringify ! ( __count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_mutex_s > ( ) ) ) . __owner as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_mutex_s ) , "::" , stringify ! ( __owner ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_mutex_s > ( ) ) ) . __nusers as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_mutex_s ) , "::" , stringify ! ( __nusers ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_mutex_s > ( ) ) ) . __kind as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_mutex_s ) , "::" , stringify ! ( __kind ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_mutex_s > ( ) ) ) . __spins as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_mutex_s ) , "::" , stringify ! ( __spins ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_mutex_s > ( ) ) ) . __elision as * const _ as usize } , 22usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_mutex_s ) , "::" , stringify ! ( __elision ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_mutex_s > ( ) ) ) . __list as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_mutex_s ) , "::" , stringify ! ( __list ) ) ) ; } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct __pthread_cond_s { pub __bindgen_anon_1 : __pthread_cond_s__bindgen_ty_1 , pub __bindgen_anon_2 : __pthread_cond_s__bindgen_ty_2 , pub __g_refs : [ :: std :: os :: raw :: c_uint ; 2usize ] , pub __g_size : [ :: std :: os :: raw :: c_uint ; 2usize ] , pub __g1_orig_size : :: std :: os :: raw :: c_uint , pub __wrefs : :: std :: os :: raw :: c_uint , pub __g_signals : [ :: std :: os :: raw :: c_uint ; 2usize ] , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union __pthread_cond_s__bindgen_ty_1 { pub __wseq : :: std :: os :: raw :: c_ulonglong , pub __wseq32 : __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 , _bindgen_union_align : u64 , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 { pub __low : :: std :: os :: raw :: c_uint , pub __high : :: std :: os :: raw :: c_uint , } # [ test ] fn bindgen_test_layout___pthread_cond_s__bindgen_ty_1__bindgen_ty_1 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 > ( ) ) ) . __low as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( __low ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 > ( ) ) ) . __high as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 ) , "::" , stringify ! ( __high ) ) ) ; } # [ test ] fn bindgen_test_layout___pthread_cond_s__bindgen_ty_1 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < __pthread_cond_s__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( __pthread_cond_s__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < __pthread_cond_s__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( __pthread_cond_s__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_cond_s__bindgen_ty_1 > ( ) ) ) . __wseq as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s__bindgen_ty_1 ) , "::" , stringify ! ( __wseq ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_cond_s__bindgen_ty_1 > ( ) ) ) . __wseq32 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s__bindgen_ty_1 ) , "::" , stringify ! ( __wseq32 ) ) ) ; } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union __pthread_cond_s__bindgen_ty_2 { pub __g1_start : :: std :: os :: raw :: c_ulonglong , pub __g1_start32 : __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 , _bindgen_union_align : u64 , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 { pub __low : :: std :: os :: raw :: c_uint , pub __high : :: std :: os :: raw :: c_uint , } # [ test ] fn bindgen_test_layout___pthread_cond_s__bindgen_ty_2__bindgen_ty_1 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 > ( ) ) ) . __low as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 ) , "::" , stringify ! ( __low ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 > ( ) ) ) . __high as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 ) , "::" , stringify ! ( __high ) ) ) ; } # [ test ] fn bindgen_test_layout___pthread_cond_s__bindgen_ty_2 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < __pthread_cond_s__bindgen_ty_2 > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( __pthread_cond_s__bindgen_ty_2 ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < __pthread_cond_s__bindgen_ty_2 > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( __pthread_cond_s__bindgen_ty_2 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_cond_s__bindgen_ty_2 > ( ) ) ) . __g1_start as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s__bindgen_ty_2 ) , "::" , stringify ! ( __g1_start ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_cond_s__bindgen_ty_2 > ( ) ) ) . __g1_start32 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s__bindgen_ty_2 ) , "::" , stringify ! ( __g1_start32 ) ) ) ; } # [ test ] fn bindgen_test_layout___pthread_cond_s ( ) { assert_eq ! ( :: std :: mem :: size_of :: < __pthread_cond_s > ( ) , 48usize , concat ! ( "Size of: " , stringify ! ( __pthread_cond_s ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < __pthread_cond_s > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( __pthread_cond_s ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_cond_s > ( ) ) ) . __g_refs as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s ) , "::" , stringify ! ( __g_refs ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_cond_s > ( ) ) ) . __g_size as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s ) , "::" , stringify ! ( __g_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_cond_s > ( ) ) ) . __g1_orig_size as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s ) , "::" , stringify ! ( __g1_orig_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_cond_s > ( ) ) ) . __wrefs as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s ) , "::" , stringify ! ( __wrefs ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __pthread_cond_s > ( ) ) ) . __g_signals as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( __pthread_cond_s ) , "::" , stringify ! ( __g_signals ) ) ) ; } pub type pthread_t = :: std :: os :: raw :: c_ulong ; # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union pthread_mutexattr_t { pub __size : [ :: std :: os :: raw :: c_char ; 4usize ] , pub __align : :: std :: os :: raw :: c_int , _bindgen_union_align : u32 , } # [ test ] fn bindgen_test_layout_pthread_mutexattr_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < pthread_mutexattr_t > ( ) , 4usize , concat ! ( "Size of: " , stringify ! ( pthread_mutexattr_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < pthread_mutexattr_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( pthread_mutexattr_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < pthread_mutexattr_t > ( ) ) ) . __size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_mutexattr_t ) , "::" , stringify ! ( __size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < pthread_mutexattr_t > ( ) ) ) . __align as * const _ 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 : [ :: std :: os :: raw :: c_char ; 4usize ] , pub __align : :: std :: os :: raw :: c_int , _bindgen_union_align : u32 , } # [ test ] fn bindgen_test_layout_pthread_condattr_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < pthread_condattr_t > ( ) , 4usize , concat ! ( "Size of: " , stringify ! ( pthread_condattr_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < pthread_condattr_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( pthread_condattr_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < pthread_condattr_t > ( ) ) ) . __size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_condattr_t ) , "::" , stringify ! ( __size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < pthread_condattr_t > ( ) ) ) . __align as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_condattr_t ) , "::" , stringify ! ( __align ) ) ) ; } pub type pthread_key_t = :: std :: os :: raw :: c_uint ; pub type pthread_once_t = :: std :: os :: raw :: c_int ; # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union pthread_attr_t { pub __size : [ :: std :: os :: raw :: c_char ; 56usize ] , pub __align : :: std :: os :: raw :: c_long , _bindgen_union_align : [ u64 ; 7usize ] , } # [ test ] fn bindgen_test_layout_pthread_attr_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < pthread_attr_t > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( pthread_attr_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < pthread_attr_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( pthread_attr_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < pthread_attr_t > ( ) ) ) . __size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_attr_t ) , "::" , stringify ! ( __size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < pthread_attr_t > ( ) ) ) . __align as * const _ 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 : [ :: std :: os :: raw :: c_char ; 40usize ] , pub __align : :: std :: os :: raw :: c_long , _bindgen_union_align : [ u64 ; 5usize ] , } # [ test ] fn bindgen_test_layout_pthread_mutex_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < pthread_mutex_t > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( pthread_mutex_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < pthread_mutex_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( pthread_mutex_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < pthread_mutex_t > ( ) ) ) . __data as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_mutex_t ) , "::" , stringify ! ( __data ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < pthread_mutex_t > ( ) ) ) . __size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_mutex_t ) , "::" , stringify ! ( __size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < pthread_mutex_t > ( ) ) ) . __align as * const _ 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 : [ :: std :: os :: raw :: c_char ; 48usize ] , pub __align : :: std :: os :: raw :: c_longlong , _bindgen_union_align : [ u64 ; 6usize ] , } # [ test ] fn bindgen_test_layout_pthread_cond_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < pthread_cond_t > ( ) , 48usize , concat ! ( "Size of: " , stringify ! ( pthread_cond_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < pthread_cond_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( pthread_cond_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < pthread_cond_t > ( ) ) ) . __data as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_cond_t ) , "::" , stringify ! ( __data ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < pthread_cond_t > ( ) ) ) . __size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_cond_t ) , "::" , stringify ! ( __size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < pthread_cond_t > ( ) ) ) . __align as * const _ 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 : [ :: std :: os :: raw :: c_char ; 56usize ] , pub __align : :: std :: os :: raw :: c_long , _bindgen_union_align : [ u64 ; 7usize ] , } # [ test ] fn bindgen_test_layout_pthread_rwlock_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < pthread_rwlock_t > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( pthread_rwlock_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < pthread_rwlock_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( pthread_rwlock_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < pthread_rwlock_t > ( ) ) ) . __data as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_rwlock_t ) , "::" , stringify ! ( __data ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < pthread_rwlock_t > ( ) ) ) . __size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_rwlock_t ) , "::" , stringify ! ( __size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < pthread_rwlock_t > ( ) ) ) . __align as * const _ 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 : [ :: std :: os :: raw :: c_char ; 8usize ] , pub __align : :: std :: os :: raw :: c_long , _bindgen_union_align : u64 , } # [ test ] fn bindgen_test_layout_pthread_rwlockattr_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < pthread_rwlockattr_t > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( pthread_rwlockattr_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < pthread_rwlockattr_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( pthread_rwlockattr_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < pthread_rwlockattr_t > ( ) ) ) . __size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_rwlockattr_t ) , "::" , stringify ! ( __size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < pthread_rwlockattr_t > ( ) ) ) . __align as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_rwlockattr_t ) , "::" , stringify ! ( __align ) ) ) ; } pub type pthread_spinlock_t = :: std :: os :: raw :: c_int ; # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union pthread_barrier_t { pub __size : [ :: std :: os :: raw :: c_char ; 32usize ] , pub __align : :: std :: os :: raw :: c_long , _bindgen_union_align : [ u64 ; 4usize ] , } # [ test ] fn bindgen_test_layout_pthread_barrier_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < pthread_barrier_t > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( pthread_barrier_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < pthread_barrier_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( pthread_barrier_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < pthread_barrier_t > ( ) ) ) . __size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_barrier_t ) , "::" , stringify ! ( __size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < pthread_barrier_t > ( ) ) ) . __align as * const _ 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 : [ :: std :: os :: raw :: c_char ; 4usize ] , pub __align : :: std :: os :: raw :: c_int , _bindgen_union_align : u32 , } # [ test ] fn bindgen_test_layout_pthread_barrierattr_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < pthread_barrierattr_t > ( ) , 4usize , concat ! ( "Size of: " , stringify ! ( pthread_barrierattr_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < pthread_barrierattr_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( pthread_barrierattr_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < pthread_barrierattr_t > ( ) ) ) . __size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_barrierattr_t ) , "::" , stringify ! ( __size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < pthread_barrierattr_t > ( ) ) ) . __align as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( pthread_barrierattr_t ) , "::" , stringify ! ( __align ) ) ) ; } 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 = u32 ; pub type sa_family_t = :: std :: os :: raw :: c_ushort ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct sockaddr { pub sa_family : sa_family_t , pub sa_data : [ :: std :: os :: raw :: c_char ; 14usize ] , } # [ test ] fn bindgen_test_layout_sockaddr ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sockaddr > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( sockaddr ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sockaddr > ( ) , 2usize , concat ! ( "Alignment of " , stringify ! ( sockaddr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sockaddr > ( ) ) ) . sa_family as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sockaddr ) , "::" , stringify ! ( sa_family ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sockaddr > ( ) ) ) . sa_data as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( sockaddr ) , "::" , stringify ! ( sa_data ) ) ) ; } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct sockaddr_storage { pub ss_family : sa_family_t , pub __ss_padding : [ :: std :: os :: raw :: c_char ; 118usize ] , pub __ss_align : :: std :: os :: raw :: c_ulong , } # [ test ] fn bindgen_test_layout_sockaddr_storage ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sockaddr_storage > ( ) , 128usize , concat ! ( "Size of: " , stringify ! ( sockaddr_storage ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sockaddr_storage > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( sockaddr_storage ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sockaddr_storage > ( ) ) ) . ss_family as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sockaddr_storage ) , "::" , stringify ! ( ss_family ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sockaddr_storage > ( ) ) ) . __ss_padding as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( sockaddr_storage ) , "::" , stringify ! ( __ss_padding ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sockaddr_storage > ( ) ) ) . __ss_align as * const _ as usize } , 120usize , concat ! ( "Offset of field: " , stringify ! ( sockaddr_storage ) , "::" , stringify ! ( __ss_align ) ) ) ; } pub const MSG_OOB : _bindgen_ty_1 = 1 ; pub const MSG_PEEK : _bindgen_ty_1 = 2 ; pub const MSG_DONTROUTE : _bindgen_ty_1 = 4 ; pub const MSG_CTRUNC : _bindgen_ty_1 = 8 ; pub const MSG_PROXY : _bindgen_ty_1 = 16 ; pub const MSG_TRUNC : _bindgen_ty_1 = 32 ; pub const MSG_DONTWAIT : _bindgen_ty_1 = 64 ; pub const MSG_EOR : _bindgen_ty_1 = 128 ; pub const MSG_WAITALL : _bindgen_ty_1 = 256 ; pub const MSG_FIN : _bindgen_ty_1 = 512 ; pub const MSG_SYN : _bindgen_ty_1 = 1024 ; pub const MSG_CONFIRM : _bindgen_ty_1 = 2048 ; pub const MSG_RST : _bindgen_ty_1 = 4096 ; pub const MSG_ERRQUEUE : _bindgen_ty_1 = 8192 ; pub const MSG_NOSIGNAL : _bindgen_ty_1 = 16384 ; pub const MSG_MORE : _bindgen_ty_1 = 32768 ; pub const MSG_WAITFORONE : _bindgen_ty_1 = 65536 ; pub const MSG_BATCH : _bindgen_ty_1 = 262144 ; pub const MSG_ZEROCOPY : _bindgen_ty_1 = 67108864 ; pub const MSG_FASTOPEN : _bindgen_ty_1 = 536870912 ; pub const MSG_CMSG_CLOEXEC : _bindgen_ty_1 = 1073741824 ; pub type _bindgen_ty_1 = u32 ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct msghdr { pub msg_name : * mut :: std :: os :: raw :: c_void , pub msg_namelen : socklen_t , pub msg_iov : * mut iovec , pub msg_iovlen : usize , pub msg_control : * mut :: std :: os :: raw :: c_void , pub msg_controllen : usize , pub msg_flags : :: std :: os :: raw :: c_int , } # [ test ] fn bindgen_test_layout_msghdr ( ) { assert_eq ! ( :: std :: mem :: size_of :: < msghdr > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( msghdr ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < msghdr > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( msghdr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < msghdr > ( ) ) ) . msg_name as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( msghdr ) , "::" , stringify ! ( msg_name ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < msghdr > ( ) ) ) . msg_namelen as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( msghdr ) , "::" , stringify ! ( msg_namelen ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < msghdr > ( ) ) ) . msg_iov as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( msghdr ) , "::" , stringify ! ( msg_iov ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < msghdr > ( ) ) ) . msg_iovlen as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( msghdr ) , "::" , stringify ! ( msg_iovlen ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < msghdr > ( ) ) ) . msg_control as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( msghdr ) , "::" , stringify ! ( msg_control ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < msghdr > ( ) ) ) . msg_controllen as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( msghdr ) , "::" , stringify ! ( msg_controllen ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < msghdr > ( ) ) ) . msg_flags as * const _ 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 : :: std :: os :: raw :: c_int , pub cmsg_type : :: std :: os :: raw :: c_int , pub __cmsg_data : __IncompleteArrayField < :: std :: os :: raw :: c_uchar > , } # [ test ] fn bindgen_test_layout_cmsghdr ( ) { assert_eq ! ( :: std :: mem :: size_of :: < cmsghdr > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( cmsghdr ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < cmsghdr > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( cmsghdr ) ) ) ; } extern "C" { pub fn __cmsg_nxthdr ( __mhdr : * mut msghdr , __cmsg : * mut cmsghdr ) -> * mut cmsghdr ; } pub const SCM_RIGHTS : _bindgen_ty_2 = 1 ; pub type _bindgen_ty_2 = u32 ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct linger { pub l_onoff : :: std :: os :: raw :: c_int , pub l_linger : :: std :: os :: raw :: c_int , } # [ test ] fn bindgen_test_layout_linger ( ) { assert_eq ! ( :: std :: mem :: size_of :: < linger > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( linger ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < linger > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( linger ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < linger > ( ) ) ) . l_onoff as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( linger ) , "::" , stringify ! ( l_onoff ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < linger > ( ) ) ) . l_linger as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( linger ) , "::" , stringify ! ( l_linger ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct osockaddr { pub sa_family : :: std :: os :: raw :: c_ushort , pub sa_data : [ :: std :: os :: raw :: c_uchar ; 14usize ] , } # [ test ] fn bindgen_test_layout_osockaddr ( ) { assert_eq ! ( :: std :: mem :: size_of :: < osockaddr > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( osockaddr ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < osockaddr > ( ) , 2usize , concat ! ( "Alignment of " , stringify ! ( osockaddr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < osockaddr > ( ) ) ) . sa_family as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( osockaddr ) , "::" , stringify ! ( sa_family ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < osockaddr > ( ) ) ) . sa_data as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( osockaddr ) , "::" , stringify ! ( sa_data ) ) ) ; } pub const SHUT_RD : _bindgen_ty_3 = 0 ; pub const SHUT_WR : _bindgen_ty_3 = 1 ; pub const SHUT_RDWR : _bindgen_ty_3 = 2 ; pub type _bindgen_ty_3 = u32 ; extern "C" { pub fn socket ( __domain : :: std :: os :: raw :: c_int , __type : :: std :: os :: raw :: c_int , __protocol : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn socketpair ( __domain : :: std :: os :: raw :: c_int , __type : :: std :: os :: raw :: c_int , __protocol : :: std :: os :: raw :: c_int , __fds : * mut :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn bind ( __fd : :: std :: os :: raw :: c_int , __addr : * const sockaddr , __len : socklen_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn getsockname ( __fd : :: std :: os :: raw :: c_int , __addr : * mut sockaddr , __len : * mut socklen_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn connect ( __fd : :: std :: os :: raw :: c_int , __addr : * const sockaddr , __len : socklen_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn getpeername ( __fd : :: std :: os :: raw :: c_int , __addr : * mut sockaddr , __len : * mut socklen_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn send ( __fd : :: std :: os :: raw :: c_int , __buf : * const :: std :: os :: raw :: c_void , __n : usize , __flags : :: std :: os :: raw :: c_int ) -> isize ; } extern "C" { pub fn recv ( __fd : :: std :: os :: raw :: c_int , __buf : * mut :: std :: os :: raw :: c_void , __n : usize , __flags : :: std :: os :: raw :: c_int ) -> isize ; } extern "C" { pub fn sendto ( __fd : :: std :: os :: raw :: c_int , __buf : * const :: std :: os :: raw :: c_void , __n : usize , __flags : :: std :: os :: raw :: c_int , __addr : * const sockaddr , __addr_len : socklen_t ) -> isize ; } extern "C" { pub fn recvfrom ( __fd : :: std :: os :: raw :: c_int , __buf : * mut :: std :: os :: raw :: c_void , __n : usize , __flags : :: std :: os :: raw :: c_int , __addr : * mut sockaddr , __addr_len : * mut socklen_t ) -> isize ; } extern "C" { pub fn sendmsg ( __fd : :: std :: os :: raw :: c_int , __message : * const msghdr , __flags : :: std :: os :: raw :: c_int ) -> isize ; } extern "C" { pub fn recvmsg ( __fd : :: std :: os :: raw :: c_int , __message : * mut msghdr , __flags : :: std :: os :: raw :: c_int ) -> isize ; } extern "C" { pub fn getsockopt ( __fd : :: std :: os :: raw :: c_int , __level : :: std :: os :: raw :: c_int , __optname : :: std :: os :: raw :: c_int , __optval : * mut :: std :: os :: raw :: c_void , __optlen : * mut socklen_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn setsockopt ( __fd : :: std :: os :: raw :: c_int , __level : :: std :: os :: raw :: c_int , __optname : :: std :: os :: raw :: c_int , __optval : * const :: std :: os :: raw :: c_void , __optlen : socklen_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn listen ( __fd : :: std :: os :: raw :: c_int , __n : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn accept ( __fd : :: std :: os :: raw :: c_int , __addr : * mut sockaddr , __addr_len : * mut socklen_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn shutdown ( __fd : :: std :: os :: raw :: c_int , __how : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn sockatmark ( __fd : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn isfdtype ( __fd : :: std :: os :: raw :: c_int , __fdtype : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: 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 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < in_addr > ( ) , 4usize , concat ! ( "Size of: " , stringify ! ( in_addr ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < in_addr > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( in_addr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < in_addr > ( ) ) ) . s_addr as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( in_addr ) , "::" , stringify ! ( s_addr ) ) ) ; } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct ip_opts { pub ip_dst : in_addr , pub ip_opts : [ :: std :: os :: raw :: c_char ; 40usize ] , } # [ test ] fn bindgen_test_layout_ip_opts ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ip_opts > ( ) , 44usize , concat ! ( "Size of: " , stringify ! ( ip_opts ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ip_opts > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( ip_opts ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ip_opts > ( ) ) ) . ip_dst as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ip_opts ) , "::" , stringify ! ( ip_dst ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ip_opts > ( ) ) ) . ip_opts as * const _ 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 : :: std :: os :: raw :: c_int , } # [ test ] fn bindgen_test_layout_ip_mreqn ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ip_mreqn > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( ip_mreqn ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ip_mreqn > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( ip_mreqn ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ip_mreqn > ( ) ) ) . imr_multiaddr as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ip_mreqn ) , "::" , stringify ! ( imr_multiaddr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ip_mreqn > ( ) ) ) . imr_address as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( ip_mreqn ) , "::" , stringify ! ( imr_address ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ip_mreqn > ( ) ) ) . imr_ifindex as * const _ 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 : :: std :: os :: raw :: c_int , pub ipi_spec_dst : in_addr , pub ipi_addr : in_addr , } # [ test ] fn bindgen_test_layout_in_pktinfo ( ) { assert_eq ! ( :: std :: mem :: size_of :: < in_pktinfo > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( in_pktinfo ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < in_pktinfo > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( in_pktinfo ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < in_pktinfo > ( ) ) ) . ipi_ifindex as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( in_pktinfo ) , "::" , stringify ! ( ipi_ifindex ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < in_pktinfo > ( ) ) ) . ipi_spec_dst as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( in_pktinfo ) , "::" , stringify ! ( ipi_spec_dst ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < in_pktinfo > ( ) ) ) . ipi_addr as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( in_pktinfo ) , "::" , stringify ! ( ipi_addr ) ) ) ; } pub const IPPROTO_IP : _bindgen_ty_4 = 0 ; pub const IPPROTO_ICMP : _bindgen_ty_4 = 1 ; pub const IPPROTO_IGMP : _bindgen_ty_4 = 2 ; pub const IPPROTO_IPIP : _bindgen_ty_4 = 4 ; pub const IPPROTO_TCP : _bindgen_ty_4 = 6 ; pub const IPPROTO_EGP : _bindgen_ty_4 = 8 ; pub const IPPROTO_PUP : _bindgen_ty_4 = 12 ; pub const IPPROTO_UDP : _bindgen_ty_4 = 17 ; pub const IPPROTO_IDP : _bindgen_ty_4 = 22 ; pub const IPPROTO_TP : _bindgen_ty_4 = 29 ; pub const IPPROTO_DCCP : _bindgen_ty_4 = 33 ; pub const IPPROTO_IPV6 : _bindgen_ty_4 = 41 ; pub const IPPROTO_RSVP : _bindgen_ty_4 = 46 ; pub const IPPROTO_GRE : _bindgen_ty_4 = 47 ; pub const IPPROTO_ESP : _bindgen_ty_4 = 50 ; pub const IPPROTO_AH : _bindgen_ty_4 = 51 ; pub const IPPROTO_MTP : _bindgen_ty_4 = 92 ; pub const IPPROTO_BEETPH : _bindgen_ty_4 = 94 ; pub const IPPROTO_ENCAP : _bindgen_ty_4 = 98 ; pub const IPPROTO_PIM : _bindgen_ty_4 = 103 ; pub const IPPROTO_COMP : _bindgen_ty_4 = 108 ; pub const IPPROTO_SCTP : _bindgen_ty_4 = 132 ; pub const IPPROTO_UDPLITE : _bindgen_ty_4 = 136 ; pub const IPPROTO_MPLS : _bindgen_ty_4 = 137 ; pub const IPPROTO_RAW : _bindgen_ty_4 = 255 ; pub const IPPROTO_MAX : _bindgen_ty_4 = 256 ; pub type _bindgen_ty_4 = u32 ; pub const IPPROTO_HOPOPTS : _bindgen_ty_5 = 0 ; pub const IPPROTO_ROUTING : _bindgen_ty_5 = 43 ; pub const IPPROTO_FRAGMENT : _bindgen_ty_5 = 44 ; pub const IPPROTO_ICMPV6 : _bindgen_ty_5 = 58 ; pub const IPPROTO_NONE : _bindgen_ty_5 = 59 ; pub const IPPROTO_DSTOPTS : _bindgen_ty_5 = 60 ; pub const IPPROTO_MH : _bindgen_ty_5 = 135 ; pub type _bindgen_ty_5 = u32 ; pub type in_port_t = u16 ; pub const IPPORT_ECHO : _bindgen_ty_6 = 7 ; pub const IPPORT_DISCARD : _bindgen_ty_6 = 9 ; pub const IPPORT_SYSTAT : _bindgen_ty_6 = 11 ; pub const IPPORT_DAYTIME : _bindgen_ty_6 = 13 ; pub const IPPORT_NETSTAT : _bindgen_ty_6 = 15 ; pub const IPPORT_FTP : _bindgen_ty_6 = 21 ; pub const IPPORT_TELNET : _bindgen_ty_6 = 23 ; pub const IPPORT_SMTP : _bindgen_ty_6 = 25 ; pub const IPPORT_TIMESERVER : _bindgen_ty_6 = 37 ; pub const IPPORT_NAMESERVER : _bindgen_ty_6 = 42 ; pub const IPPORT_WHOIS : _bindgen_ty_6 = 43 ; pub const IPPORT_MTP : _bindgen_ty_6 = 57 ; pub const IPPORT_TFTP : _bindgen_ty_6 = 69 ; pub const IPPORT_RJE : _bindgen_ty_6 = 77 ; pub const IPPORT_FINGER : _bindgen_ty_6 = 79 ; pub const IPPORT_TTYLINK : _bindgen_ty_6 = 87 ; pub const IPPORT_SUPDUP : _bindgen_ty_6 = 95 ; pub const IPPORT_EXECSERVER : _bindgen_ty_6 = 512 ; pub const IPPORT_LOGINSERVER : _bindgen_ty_6 = 513 ; pub const IPPORT_CMDSERVER : _bindgen_ty_6 = 514 ; pub const IPPORT_EFSSERVER : _bindgen_ty_6 = 520 ; pub const IPPORT_BIFFUDP : _bindgen_ty_6 = 512 ; pub const IPPORT_WHOSERVER : _bindgen_ty_6 = 513 ; pub const IPPORT_ROUTESERVER : _bindgen_ty_6 = 520 ; pub const IPPORT_RESERVED : _bindgen_ty_6 = 1024 ; pub const IPPORT_USERRESERVED : _bindgen_ty_6 = 5000 ; pub type _bindgen_ty_6 = u32 ; # [ 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 ] , _bindgen_union_align : [ u32 ; 4usize ] , } # [ test ] fn bindgen_test_layout_in6_addr__bindgen_ty_1 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < in6_addr__bindgen_ty_1 > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( in6_addr__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < in6_addr__bindgen_ty_1 > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( in6_addr__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < in6_addr__bindgen_ty_1 > ( ) ) ) . __u6_addr8 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( in6_addr__bindgen_ty_1 ) , "::" , stringify ! ( __u6_addr8 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < in6_addr__bindgen_ty_1 > ( ) ) ) . __u6_addr16 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( in6_addr__bindgen_ty_1 ) , "::" , stringify ! ( __u6_addr16 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < in6_addr__bindgen_ty_1 > ( ) ) ) . __u6_addr32 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( in6_addr__bindgen_ty_1 ) , "::" , stringify ! ( __u6_addr32 ) ) ) ; } # [ test ] fn bindgen_test_layout_in6_addr ( ) { assert_eq ! ( :: std :: mem :: size_of :: < in6_addr > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( in6_addr ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < in6_addr > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( in6_addr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < in6_addr > ( ) ) ) . __in6_u as * const _ 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 : [ :: std :: os :: raw :: c_uchar ; 8usize ] , } # [ test ] fn bindgen_test_layout_sockaddr_in ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sockaddr_in > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( sockaddr_in ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sockaddr_in > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( sockaddr_in ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sockaddr_in > ( ) ) ) . sin_family as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sockaddr_in ) , "::" , stringify ! ( sin_family ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sockaddr_in > ( ) ) ) . sin_port as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( sockaddr_in ) , "::" , stringify ! ( sin_port ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sockaddr_in > ( ) ) ) . sin_addr as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( sockaddr_in ) , "::" , stringify ! ( sin_addr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sockaddr_in > ( ) ) ) . sin_zero as * const _ 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 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < sockaddr_in6 > ( ) , 28usize , concat ! ( "Size of: " , stringify ! ( sockaddr_in6 ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < sockaddr_in6 > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( sockaddr_in6 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sockaddr_in6 > ( ) ) ) . sin6_family as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( sockaddr_in6 ) , "::" , stringify ! ( sin6_family ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sockaddr_in6 > ( ) ) ) . sin6_port as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( sockaddr_in6 ) , "::" , stringify ! ( sin6_port ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sockaddr_in6 > ( ) ) ) . sin6_flowinfo as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( sockaddr_in6 ) , "::" , stringify ! ( sin6_flowinfo ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sockaddr_in6 > ( ) ) ) . sin6_addr as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( sockaddr_in6 ) , "::" , stringify ! ( sin6_addr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < sockaddr_in6 > ( ) ) ) . sin6_scope_id as * const _ 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 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ip_mreq > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( ip_mreq ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ip_mreq > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( ip_mreq ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ip_mreq > ( ) ) ) . imr_multiaddr as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ip_mreq ) , "::" , stringify ! ( imr_multiaddr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ip_mreq > ( ) ) ) . imr_interface as * const _ 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 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ip_mreq_source > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( ip_mreq_source ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ip_mreq_source > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( ip_mreq_source ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ip_mreq_source > ( ) ) ) . imr_multiaddr as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ip_mreq_source ) , "::" , stringify ! ( imr_multiaddr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ip_mreq_source > ( ) ) ) . imr_interface as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( ip_mreq_source ) , "::" , stringify ! ( imr_interface ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ip_mreq_source > ( ) ) ) . imr_sourceaddr as * const _ 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 : :: std :: os :: raw :: c_uint , } # [ test ] fn bindgen_test_layout_ipv6_mreq ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ipv6_mreq > ( ) , 20usize , concat ! ( "Size of: " , stringify ! ( ipv6_mreq ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ipv6_mreq > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( ipv6_mreq ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ipv6_mreq > ( ) ) ) . ipv6mr_multiaddr as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ipv6_mreq ) , "::" , stringify ! ( ipv6mr_multiaddr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ipv6_mreq > ( ) ) ) . ipv6mr_interface as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( ipv6_mreq ) , "::" , stringify ! ( ipv6mr_interface ) ) ) ; } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct group_req { pub gr_interface : u32 , pub gr_group : sockaddr_storage , } # [ test ] fn bindgen_test_layout_group_req ( ) { assert_eq ! ( :: std :: mem :: size_of :: < group_req > ( ) , 136usize , concat ! ( "Size of: " , stringify ! ( group_req ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < group_req > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( group_req ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < group_req > ( ) ) ) . gr_interface as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( group_req ) , "::" , stringify ! ( gr_interface ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < group_req > ( ) ) ) . gr_group as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( group_req ) , "::" , stringify ! ( gr_group ) ) ) ; } # [ repr ( C ) ] # [ derive ( 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 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < group_source_req > ( ) , 264usize , concat ! ( "Size of: " , stringify ! ( group_source_req ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < group_source_req > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( group_source_req ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < group_source_req > ( ) ) ) . gsr_interface as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( group_source_req ) , "::" , stringify ! ( gsr_interface ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < group_source_req > ( ) ) ) . gsr_group as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( group_source_req ) , "::" , stringify ! ( gsr_group ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < group_source_req > ( ) ) ) . gsr_source as * const _ 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 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ip_msfilter > ( ) , 20usize , concat ! ( "Size of: " , stringify ! ( ip_msfilter ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ip_msfilter > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( ip_msfilter ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ip_msfilter > ( ) ) ) . imsf_multiaddr as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ip_msfilter ) , "::" , stringify ! ( imsf_multiaddr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ip_msfilter > ( ) ) ) . imsf_interface as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( ip_msfilter ) , "::" , stringify ! ( imsf_interface ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ip_msfilter > ( ) ) ) . imsf_fmode as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( ip_msfilter ) , "::" , stringify ! ( imsf_fmode ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ip_msfilter > ( ) ) ) . imsf_numsrc as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( ip_msfilter ) , "::" , stringify ! ( imsf_numsrc ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ip_msfilter > ( ) ) ) . imsf_slist as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( ip_msfilter ) , "::" , stringify ! ( imsf_slist ) ) ) ; } # [ repr ( C ) ] # [ derive ( 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 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < group_filter > ( ) , 272usize , concat ! ( "Size of: " , stringify ! ( group_filter ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < group_filter > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( group_filter ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < group_filter > ( ) ) ) . gf_interface as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( group_filter ) , "::" , stringify ! ( gf_interface ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < group_filter > ( ) ) ) . gf_group as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( group_filter ) , "::" , stringify ! ( gf_group ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < group_filter > ( ) ) ) . gf_fmode as * const _ as usize } , 136usize , concat ! ( "Offset of field: " , stringify ! ( group_filter ) , "::" , stringify ! ( gf_fmode ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < group_filter > ( ) ) ) . gf_numsrc as * const _ as usize } , 140usize , concat ! ( "Offset of field: " , stringify ! ( group_filter ) , "::" , stringify ! ( gf_numsrc ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < group_filter > ( ) ) ) . gf_slist as * const _ 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 : :: std :: os :: raw :: c_int , __sock_in : * mut sockaddr_in ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn bindresvport6 ( __sockfd : :: std :: os :: raw :: c_int , __sock_in : * mut sockaddr_in6 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn coap_startup ( ) ; } extern "C" { pub fn coap_cleanup ( ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct coap_endpoint_t { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct coap_subscription_t { _unused : [ u8 ; 0 ] , } extern "C" { pub fn __assert_fail ( __assertion : * const :: std :: os :: raw :: c_char , __file : * const :: std :: os :: raw :: c_char , __line : :: std :: os :: raw :: c_uint , __function : * const :: std :: os :: raw :: c_char ) ; } extern "C" { pub fn __assert_perror_fail ( __errnum : :: std :: os :: raw :: c_int , __file : * const :: std :: os :: raw :: c_char , __line : :: std :: os :: raw :: c_uint , __function : * const :: std :: os :: raw :: c_char ) ; } extern "C" { pub fn __assert ( __assertion : * const :: std :: os :: raw :: c_char , __file : * const :: std :: os :: raw :: c_char , __line : :: std :: os :: raw :: c_int ) ; } pub type int_least8_t = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; pub type int_fast8_t = :: std :: os :: raw :: c_schar ; pub type int_fast16_t = :: std :: os :: raw :: c_long ; pub type int_fast32_t = :: std :: os :: raw :: c_long ; pub type int_fast64_t = :: std :: os :: raw :: c_long ; pub type uint_fast8_t = :: std :: os :: raw :: c_uchar ; pub type uint_fast16_t = :: std :: os :: raw :: c_ulong ; pub type uint_fast32_t = :: std :: os :: raw :: c_ulong ; pub type uint_fast64_t = :: std :: os :: raw :: c_ulong ; pub type intmax_t = __intmax_t ; pub type uintmax_t = __uintmax_t ; extern "C" { pub fn memcpy ( __dest : * mut :: std :: os :: raw :: c_void , __src : * const :: std :: os :: raw :: c_void , __n : :: std :: os :: raw :: c_ulong ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn memmove ( __dest : * mut :: std :: os :: raw :: c_void , __src : * const :: std :: os :: raw :: c_void , __n : :: std :: os :: raw :: c_ulong ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn memccpy ( __dest : * mut :: std :: os :: raw :: c_void , __src : * const :: std :: os :: raw :: c_void , __c : :: std :: os :: raw :: c_int , __n : usize ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn memset ( __s : * mut :: std :: os :: raw :: c_void , __c : :: std :: os :: raw :: c_int , __n : :: std :: os :: raw :: c_ulong ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn memcmp ( __s1 : * const :: std :: os :: raw :: c_void , __s2 : * const :: std :: os :: raw :: c_void , __n : :: std :: os :: raw :: c_ulong ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn memchr ( __s : * const :: std :: os :: raw :: c_void , __c : :: std :: os :: raw :: c_int , __n : :: std :: os :: raw :: c_ulong ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn strcpy ( __dest : * mut :: std :: os :: raw :: c_char , __src : * const :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn strncpy ( __dest : * mut :: std :: os :: raw :: c_char , __src : * const :: std :: os :: raw :: c_char , __n : :: std :: os :: raw :: c_ulong ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn strcat ( __dest : * mut :: std :: os :: raw :: c_char , __src : * const :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn strncat ( __dest : * mut :: std :: os :: raw :: c_char , __src : * const :: std :: os :: raw :: c_char , __n : :: std :: os :: raw :: c_ulong ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn strcmp ( __s1 : * const :: std :: os :: raw :: c_char , __s2 : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn strncmp ( __s1 : * const :: std :: os :: raw :: c_char , __s2 : * const :: std :: os :: raw :: c_char , __n : :: std :: os :: raw :: c_ulong ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn strcoll ( __s1 : * const :: std :: os :: raw :: c_char , __s2 : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn strxfrm ( __dest : * mut :: std :: os :: raw :: c_char , __src : * const :: std :: os :: raw :: c_char , __n : :: std :: os :: raw :: c_ulong ) -> :: std :: os :: raw :: c_ulong ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __locale_struct { pub __locales : [ * mut __locale_data ; 13usize ] , pub __ctype_b : * const :: std :: os :: raw :: c_ushort , pub __ctype_tolower : * const :: std :: os :: raw :: c_int , pub __ctype_toupper : * const :: std :: os :: raw :: c_int , pub __names : [ * const :: std :: os :: raw :: c_char ; 13usize ] , } # [ test ] fn bindgen_test_layout___locale_struct ( ) { assert_eq ! ( :: std :: mem :: size_of :: < __locale_struct > ( ) , 232usize , concat ! ( "Size of: " , stringify ! ( __locale_struct ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < __locale_struct > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( __locale_struct ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __locale_struct > ( ) ) ) . __locales as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __locale_struct ) , "::" , stringify ! ( __locales ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __locale_struct > ( ) ) ) . __ctype_b as * const _ as usize } , 104usize , concat ! ( "Offset of field: " , stringify ! ( __locale_struct ) , "::" , stringify ! ( __ctype_b ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __locale_struct > ( ) ) ) . __ctype_tolower as * const _ as usize } , 112usize , concat ! ( "Offset of field: " , stringify ! ( __locale_struct ) , "::" , stringify ! ( __ctype_tolower ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __locale_struct > ( ) ) ) . __ctype_toupper as * const _ as usize } , 120usize , concat ! ( "Offset of field: " , stringify ! ( __locale_struct ) , "::" , stringify ! ( __ctype_toupper ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __locale_struct > ( ) ) ) . __names as * const _ 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 :: std :: os :: raw :: c_char , __s2 : * const :: std :: os :: raw :: c_char , __l : locale_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn strxfrm_l ( __dest : * mut :: std :: os :: raw :: c_char , __src : * const :: std :: os :: raw :: c_char , __n : usize , __l : locale_t ) -> usize ; } extern "C" { pub fn strdup ( __s : * const :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn strndup ( __string : * const :: std :: os :: raw :: c_char , __n : :: std :: os :: raw :: c_ulong ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn strchr ( __s : * const :: std :: os :: raw :: c_char , __c : :: std :: os :: raw :: c_int ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn strrchr ( __s : * const :: std :: os :: raw :: c_char , __c : :: std :: os :: raw :: c_int ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn strcspn ( __s : * const :: std :: os :: raw :: c_char , __reject : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_ulong ; } extern "C" { pub fn strspn ( __s : * const :: std :: os :: raw :: c_char , __accept : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_ulong ; } extern "C" { pub fn strpbrk ( __s : * const :: std :: os :: raw :: c_char , __accept : * const :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn strstr ( __haystack : * const :: std :: os :: raw :: c_char , __needle : * const :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn strtok ( __s : * mut :: std :: os :: raw :: c_char , __delim : * const :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn __strtok_r ( __s : * mut :: std :: os :: raw :: c_char , __delim : * const :: std :: os :: raw :: c_char , __save_ptr : * mut * mut :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn strtok_r ( __s : * mut :: std :: os :: raw :: c_char , __delim : * const :: std :: os :: raw :: c_char , __save_ptr : * mut * mut :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn strlen ( __s : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_ulong ; } extern "C" { pub fn strnlen ( __string : * const :: std :: os :: raw :: c_char , __maxlen : usize ) -> usize ; } extern "C" { pub fn strerror ( __errnum : :: std :: os :: raw :: c_int ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [ link_name = "\u{1}___xpg_strerror_r" ] pub fn strerror_r ( __errnum : :: std :: os :: raw :: c_int , __buf : * mut :: std :: os :: raw :: c_char , __buflen : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn strerror_l ( __errnum : :: std :: os :: raw :: c_int , __l : locale_t ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn bcmp ( __s1 : * const :: std :: os :: raw :: c_void , __s2 : * const :: std :: os :: raw :: c_void , __n : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn bcopy ( __src : * const :: std :: os :: raw :: c_void , __dest : * mut :: std :: os :: raw :: c_void , __n : usize ) ; } extern "C" { pub fn bzero ( __s : * mut :: std :: os :: raw :: c_void , __n : :: std :: os :: raw :: c_ulong ) ; } extern "C" { pub fn index ( __s : * const :: std :: os :: raw :: c_char , __c : :: std :: os :: raw :: c_int ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn rindex ( __s : * const :: std :: os :: raw :: c_char , __c : :: std :: os :: raw :: c_int ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn ffs ( __i : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ffsl ( __l : :: std :: os :: raw :: c_long ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn ffsll ( __ll : :: std :: os :: raw :: c_longlong ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn strcasecmp ( __s1 : * const :: std :: os :: raw :: c_char , __s2 : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn strncasecmp ( __s1 : * const :: std :: os :: raw :: c_char , __s2 : * const :: std :: os :: raw :: c_char , __n : :: std :: os :: raw :: c_ulong ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn strcasecmp_l ( __s1 : * const :: std :: os :: raw :: c_char , __s2 : * const :: std :: os :: raw :: c_char , __loc : locale_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn strncasecmp_l ( __s1 : * const :: std :: os :: raw :: c_char , __s2 : * const :: std :: os :: raw :: c_char , __n : usize , __loc : locale_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn explicit_bzero ( __s : * mut :: std :: os :: raw :: c_void , __n : usize ) ; } extern "C" { pub fn strsep ( __stringp : * mut * mut :: std :: os :: raw :: c_char , __delim : * const :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn strsignal ( __sig : :: std :: os :: raw :: c_int ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn __stpcpy ( __dest : * mut :: std :: os :: raw :: c_char , __src : * const :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn stpcpy ( __dest : * mut :: std :: os :: raw :: c_char , __src : * const :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn __stpncpy ( __dest : * mut :: std :: os :: raw :: c_char , __src : * const :: std :: os :: raw :: c_char , __n : usize ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn stpncpy ( __dest : * mut :: std :: os :: raw :: c_char , __src : * const :: std :: os :: raw :: c_char , __n : :: std :: os :: raw :: c_ulong ) -> * mut :: std :: os :: raw :: c_char ; } # [ doc = " multi-purpose address abstraction" ] # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct coap_address_t { # [ doc = "< size of addr" ] pub size : socklen_t , pub addr : coap_address_t__bindgen_ty_1 , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union coap_address_t__bindgen_ty_1 { pub sa : sockaddr , pub sin : sockaddr_in , pub sin6 : sockaddr_in6 , _bindgen_union_align : [ u32 ; 7usize ] , } # [ test ] fn bindgen_test_layout_coap_address_t__bindgen_ty_1 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_address_t__bindgen_ty_1 > ( ) , 28usize , concat ! ( "Size of: " , stringify ! ( coap_address_t__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_address_t__bindgen_ty_1 > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( coap_address_t__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_address_t__bindgen_ty_1 > ( ) ) ) . sa as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_address_t__bindgen_ty_1 ) , "::" , stringify ! ( sa ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_address_t__bindgen_ty_1 > ( ) ) ) . sin as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_address_t__bindgen_ty_1 ) , "::" , stringify ! ( sin ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_address_t__bindgen_ty_1 > ( ) ) ) . sin6 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_address_t__bindgen_ty_1 ) , "::" , stringify ! ( sin6 ) ) ) ; } # [ test ] fn bindgen_test_layout_coap_address_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_address_t > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( coap_address_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_address_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( coap_address_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_address_t > ( ) ) ) . size as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_address_t ) , "::" , stringify ! ( size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_address_t > ( ) ) ) . addr as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( coap_address_t ) , "::" , stringify ! ( addr ) ) ) ; } extern "C" { # [ doc = " Compares given address objects @p a and @p b. This function returns @c 1 if" ] # [ doc = " addresses are equal, @c 0 otherwise. The parameters @p a and @p b must not be" ] # [ doc = " @c NULL;" ] pub fn coap_address_equals ( a : * const coap_address_t , b : * const coap_address_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Resets the given coap_address_t object @p addr to its default values. In" ] # [ doc = " particular, the member size must be initialized to the available size for" ] # [ doc = " storing addresses." ] # [ doc = "" ] # [ doc = " @param addr The coap_address_t object to initialize." ] pub fn coap_address_init ( addr : * mut coap_address_t ) ; } extern "C" { # [ doc = " Checks if given address @p a denotes a multicast address. This function" ] # [ doc = " returns @c 1 if @p a is multicast, @c 0 otherwise." ] pub fn coap_is_mcast ( a : * const coap_address_t ) -> :: std :: os :: raw :: c_int ; } pub type wchar_t = :: std :: os :: raw :: c_int ; pub const idtype_t_P_ALL : idtype_t = 0 ; pub const idtype_t_P_PID : idtype_t = 1 ; pub const idtype_t_P_PGID : idtype_t = 2 ; pub type idtype_t = u32 ; pub type _Float32 = f32 ; pub type _Float64 = f64 ; pub type _Float32x = f64 ; pub type _Float64x = u128 ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct div_t { pub quot : :: std :: os :: raw :: c_int , pub rem : :: std :: os :: raw :: c_int , } # [ test ] fn bindgen_test_layout_div_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < div_t > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( div_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < div_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( div_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < div_t > ( ) ) ) . quot as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( div_t ) , "::" , stringify ! ( quot ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < div_t > ( ) ) ) . rem as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( div_t ) , "::" , stringify ! ( rem ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct ldiv_t { pub quot : :: std :: os :: raw :: c_long , pub rem : :: std :: os :: raw :: c_long , } # [ test ] fn bindgen_test_layout_ldiv_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < ldiv_t > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( ldiv_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < ldiv_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( ldiv_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ldiv_t > ( ) ) ) . quot as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( ldiv_t ) , "::" , stringify ! ( quot ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < ldiv_t > ( ) ) ) . rem as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( ldiv_t ) , "::" , stringify ! ( rem ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct lldiv_t { pub quot : :: std :: os :: raw :: c_longlong , pub rem : :: std :: os :: raw :: c_longlong , } # [ test ] fn bindgen_test_layout_lldiv_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < lldiv_t > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( lldiv_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < lldiv_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( lldiv_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < lldiv_t > ( ) ) ) . quot as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( lldiv_t ) , "::" , stringify ! ( quot ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < lldiv_t > ( ) ) ) . rem as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( lldiv_t ) , "::" , stringify ! ( rem ) ) ) ; } extern "C" { pub fn __ctype_get_mb_cur_max ( ) -> usize ; } extern "C" { pub fn atof ( __nptr : * const :: std :: os :: raw :: c_char ) -> f64 ; } extern "C" { pub fn atoi ( __nptr : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn atol ( __nptr : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_long ; } extern "C" { pub fn atoll ( __nptr : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_longlong ; } extern "C" { pub fn strtod ( __nptr : * const :: std :: os :: raw :: c_char , __endptr : * mut * mut :: std :: os :: raw :: c_char ) -> f64 ; } extern "C" { pub fn strtof ( __nptr : * const :: std :: os :: raw :: c_char , __endptr : * mut * mut :: std :: os :: raw :: c_char ) -> f32 ; } extern "C" { pub fn strtold ( __nptr : * const :: std :: os :: raw :: c_char , __endptr : * mut * mut :: std :: os :: raw :: c_char ) -> u128 ; } extern "C" { pub fn strtol ( __nptr : * const :: std :: os :: raw :: c_char , __endptr : * mut * mut :: std :: os :: raw :: c_char , __base : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_long ; } extern "C" { pub fn strtoul ( __nptr : * const :: std :: os :: raw :: c_char , __endptr : * mut * mut :: std :: os :: raw :: c_char , __base : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_ulong ; } extern "C" { pub fn strtoq ( __nptr : * const :: std :: os :: raw :: c_char , __endptr : * mut * mut :: std :: os :: raw :: c_char , __base : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_longlong ; } extern "C" { pub fn strtouq ( __nptr : * const :: std :: os :: raw :: c_char , __endptr : * mut * mut :: std :: os :: raw :: c_char , __base : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_ulonglong ; } extern "C" { pub fn strtoll ( __nptr : * const :: std :: os :: raw :: c_char , __endptr : * mut * mut :: std :: os :: raw :: c_char , __base : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_longlong ; } extern "C" { pub fn strtoull ( __nptr : * const :: std :: os :: raw :: c_char , __endptr : * mut * mut :: std :: os :: raw :: c_char , __base : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_ulonglong ; } extern "C" { pub fn l64a ( __n : :: std :: os :: raw :: c_long ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn a64l ( __s : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_long ; } extern "C" { pub fn random ( ) -> :: std :: os :: raw :: c_long ; } extern "C" { pub fn srandom ( __seed : :: std :: os :: raw :: c_uint ) ; } extern "C" { pub fn initstate ( __seed : :: std :: os :: raw :: c_uint , __statebuf : * mut :: std :: os :: raw :: c_char , __statelen : usize ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn setstate ( __statebuf : * mut :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct random_data { pub fptr : * mut i32 , pub rptr : * mut i32 , pub state : * mut i32 , pub rand_type : :: std :: os :: raw :: c_int , pub rand_deg : :: std :: os :: raw :: c_int , pub rand_sep : :: std :: os :: raw :: c_int , pub end_ptr : * mut i32 , } # [ test ] fn bindgen_test_layout_random_data ( ) { assert_eq ! ( :: std :: mem :: size_of :: < random_data > ( ) , 48usize , concat ! ( "Size of: " , stringify ! ( random_data ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < random_data > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( random_data ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < random_data > ( ) ) ) . fptr as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( random_data ) , "::" , stringify ! ( fptr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < random_data > ( ) ) ) . rptr as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( random_data ) , "::" , stringify ! ( rptr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < random_data > ( ) ) ) . state as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( random_data ) , "::" , stringify ! ( state ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < random_data > ( ) ) ) . rand_type as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( random_data ) , "::" , stringify ! ( rand_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < random_data > ( ) ) ) . rand_deg as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( random_data ) , "::" , stringify ! ( rand_deg ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < random_data > ( ) ) ) . rand_sep as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( random_data ) , "::" , stringify ! ( rand_sep ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < random_data > ( ) ) ) . end_ptr as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( random_data ) , "::" , stringify ! ( end_ptr ) ) ) ; } extern "C" { pub fn random_r ( __buf : * mut random_data , __result : * mut i32 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn srandom_r ( __seed : :: std :: os :: raw :: c_uint , __buf : * mut random_data ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn initstate_r ( __seed : :: std :: os :: raw :: c_uint , __statebuf : * mut :: std :: os :: raw :: c_char , __statelen : usize , __buf : * mut random_data ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn setstate_r ( __statebuf : * mut :: std :: os :: raw :: c_char , __buf : * mut random_data ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn rand ( ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn srand ( __seed : :: std :: os :: raw :: c_uint ) ; } extern "C" { pub fn rand_r ( __seed : * mut :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn drand48 ( ) -> f64 ; } extern "C" { pub fn erand48 ( __xsubi : * mut :: std :: os :: raw :: c_ushort ) -> f64 ; } extern "C" { pub fn lrand48 ( ) -> :: std :: os :: raw :: c_long ; } extern "C" { pub fn nrand48 ( __xsubi : * mut :: std :: os :: raw :: c_ushort ) -> :: std :: os :: raw :: c_long ; } extern "C" { pub fn mrand48 ( ) -> :: std :: os :: raw :: c_long ; } extern "C" { pub fn jrand48 ( __xsubi : * mut :: std :: os :: raw :: c_ushort ) -> :: std :: os :: raw :: c_long ; } extern "C" { pub fn srand48 ( __seedval : :: std :: os :: raw :: c_long ) ; } extern "C" { pub fn seed48 ( __seed16v : * mut :: std :: os :: raw :: c_ushort ) -> * mut :: std :: os :: raw :: c_ushort ; } extern "C" { pub fn lcong48 ( __param : * mut :: std :: os :: raw :: c_ushort ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct drand48_data { pub __x : [ :: std :: os :: raw :: c_ushort ; 3usize ] , pub __old_x : [ :: std :: os :: raw :: c_ushort ; 3usize ] , pub __c : :: std :: os :: raw :: c_ushort , pub __init : :: std :: os :: raw :: c_ushort , pub __a : :: std :: os :: raw :: c_ulonglong , } # [ test ] fn bindgen_test_layout_drand48_data ( ) { assert_eq ! ( :: std :: mem :: size_of :: < drand48_data > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( drand48_data ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < drand48_data > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( drand48_data ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < drand48_data > ( ) ) ) . __x as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( drand48_data ) , "::" , stringify ! ( __x ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < drand48_data > ( ) ) ) . __old_x as * const _ as usize } , 6usize , concat ! ( "Offset of field: " , stringify ! ( drand48_data ) , "::" , stringify ! ( __old_x ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < drand48_data > ( ) ) ) . __c as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( drand48_data ) , "::" , stringify ! ( __c ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < drand48_data > ( ) ) ) . __init as * const _ as usize } , 14usize , concat ! ( "Offset of field: " , stringify ! ( drand48_data ) , "::" , stringify ! ( __init ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < drand48_data > ( ) ) ) . __a as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( drand48_data ) , "::" , stringify ! ( __a ) ) ) ; } extern "C" { pub fn drand48_r ( __buffer : * mut drand48_data , __result : * mut f64 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn erand48_r ( __xsubi : * mut :: std :: os :: raw :: c_ushort , __buffer : * mut drand48_data , __result : * mut f64 ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn lrand48_r ( __buffer : * mut drand48_data , __result : * mut :: std :: os :: raw :: c_long ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn nrand48_r ( __xsubi : * mut :: std :: os :: raw :: c_ushort , __buffer : * mut drand48_data , __result : * mut :: std :: os :: raw :: c_long ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn mrand48_r ( __buffer : * mut drand48_data , __result : * mut :: std :: os :: raw :: c_long ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn jrand48_r ( __xsubi : * mut :: std :: os :: raw :: c_ushort , __buffer : * mut drand48_data , __result : * mut :: std :: os :: raw :: c_long ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn srand48_r ( __seedval : :: std :: os :: raw :: c_long , __buffer : * mut drand48_data ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn seed48_r ( __seed16v : * mut :: std :: os :: raw :: c_ushort , __buffer : * mut drand48_data ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn lcong48_r ( __param : * mut :: std :: os :: raw :: c_ushort , __buffer : * mut drand48_data ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn malloc ( __size : :: std :: os :: raw :: c_ulong ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn calloc ( __nmemb : :: std :: os :: raw :: c_ulong , __size : :: std :: os :: raw :: c_ulong ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn realloc ( __ptr : * mut :: std :: os :: raw :: c_void , __size : :: std :: os :: raw :: c_ulong ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn free ( __ptr : * mut :: std :: os :: raw :: c_void ) ; } extern "C" { pub fn alloca ( __size : :: std :: os :: raw :: c_ulong ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn valloc ( __size : usize ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn posix_memalign ( __memptr : * mut * mut :: std :: os :: raw :: c_void , __alignment : usize , __size : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn aligned_alloc ( __alignment : usize , __size : usize ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn abort ( ) ; } extern "C" { pub fn atexit ( __func : :: std :: option :: Option < unsafe extern "C" fn ( ) > ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn at_quick_exit ( __func : :: std :: option :: Option < unsafe extern "C" fn ( ) > ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn on_exit ( __func : :: std :: option :: Option < unsafe extern "C" fn ( __status : :: std :: os :: raw :: c_int , __arg : * mut :: std :: os :: raw :: c_void ) > , __arg : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn exit ( __status : :: std :: os :: raw :: c_int ) ; } extern "C" { pub fn quick_exit ( __status : :: std :: os :: raw :: c_int ) ; } extern "C" { pub fn _Exit ( __status : :: std :: os :: raw :: c_int ) ; } extern "C" { pub fn getenv ( __name : * const :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn putenv ( __string : * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn setenv ( __name : * const :: std :: os :: raw :: c_char , __value : * const :: std :: os :: raw :: c_char , __replace : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn unsetenv ( __name : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn clearenv ( ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn mktemp ( __template : * mut :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn mkstemp ( __template : * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn mkstemps ( __template : * mut :: std :: os :: raw :: c_char , __suffixlen : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn mkdtemp ( __template : * mut :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn system ( __command : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn realpath ( __name : * const :: std :: os :: raw :: c_char , __resolved : * mut :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } pub type __compar_fn_t = :: std :: option :: Option < unsafe extern "C" fn ( arg1 : * const :: std :: os :: raw :: c_void , arg2 : * const :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ; extern "C" { pub fn bsearch ( __key : * const :: std :: os :: raw :: c_void , __base : * const :: std :: os :: raw :: c_void , __nmemb : usize , __size : usize , __compar : __compar_fn_t ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn qsort ( __base : * mut :: std :: os :: raw :: c_void , __nmemb : usize , __size : usize , __compar : __compar_fn_t ) ; } extern "C" { pub fn abs ( __x : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn labs ( __x : :: std :: os :: raw :: c_long ) -> :: std :: os :: raw :: c_long ; } extern "C" { pub fn llabs ( __x : :: std :: os :: raw :: c_longlong ) -> :: std :: os :: raw :: c_longlong ; } extern "C" { pub fn div ( __numer : :: std :: os :: raw :: c_int , __denom : :: std :: os :: raw :: c_int ) -> div_t ; } extern "C" { pub fn ldiv ( __numer : :: std :: os :: raw :: c_long , __denom : :: std :: os :: raw :: c_long ) -> ldiv_t ; } extern "C" { pub fn lldiv ( __numer : :: std :: os :: raw :: c_longlong , __denom : :: std :: os :: raw :: c_longlong ) -> lldiv_t ; } extern "C" { pub fn ecvt ( __value : f64 , __ndigit : :: std :: os :: raw :: c_int , __decpt : * mut :: std :: os :: raw :: c_int , __sign : * mut :: std :: os :: raw :: c_int ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn fcvt ( __value : f64 , __ndigit : :: std :: os :: raw :: c_int , __decpt : * mut :: std :: os :: raw :: c_int , __sign : * mut :: std :: os :: raw :: c_int ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn gcvt ( __value : f64 , __ndigit : :: std :: os :: raw :: c_int , __buf : * mut :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn qecvt ( __value : u128 , __ndigit : :: std :: os :: raw :: c_int , __decpt : * mut :: std :: os :: raw :: c_int , __sign : * mut :: std :: os :: raw :: c_int ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn qfcvt ( __value : u128 , __ndigit : :: std :: os :: raw :: c_int , __decpt : * mut :: std :: os :: raw :: c_int , __sign : * mut :: std :: os :: raw :: c_int ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn qgcvt ( __value : u128 , __ndigit : :: std :: os :: raw :: c_int , __buf : * mut :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn ecvt_r ( __value : f64 , __ndigit : :: std :: os :: raw :: c_int , __decpt : * mut :: std :: os :: raw :: c_int , __sign : * mut :: std :: os :: raw :: c_int , __buf : * mut :: std :: os :: raw :: c_char , __len : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn fcvt_r ( __value : f64 , __ndigit : :: std :: os :: raw :: c_int , __decpt : * mut :: std :: os :: raw :: c_int , __sign : * mut :: std :: os :: raw :: c_int , __buf : * mut :: std :: os :: raw :: c_char , __len : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn qecvt_r ( __value : u128 , __ndigit : :: std :: os :: raw :: c_int , __decpt : * mut :: std :: os :: raw :: c_int , __sign : * mut :: std :: os :: raw :: c_int , __buf : * mut :: std :: os :: raw :: c_char , __len : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn qfcvt_r ( __value : u128 , __ndigit : :: std :: os :: raw :: c_int , __decpt : * mut :: std :: os :: raw :: c_int , __sign : * mut :: std :: os :: raw :: c_int , __buf : * mut :: std :: os :: raw :: c_char , __len : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn mblen ( __s : * const :: std :: os :: raw :: c_char , __n : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn mbtowc ( __pwc : * mut wchar_t , __s : * const :: std :: os :: raw :: c_char , __n : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn wctomb ( __s : * mut :: std :: os :: raw :: c_char , __wchar : wchar_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn mbstowcs ( __pwcs : * mut wchar_t , __s : * const :: std :: os :: raw :: c_char , __n : usize ) -> usize ; } extern "C" { pub fn wcstombs ( __s : * mut :: std :: os :: raw :: c_char , __pwcs : * const wchar_t , __n : usize ) -> usize ; } extern "C" { pub fn rpmatch ( __response : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn getsubopt ( __optionp : * mut * mut :: std :: os :: raw :: c_char , __tokens : * const * mut :: std :: os :: raw :: c_char , __valuep : * mut * mut :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn getloadavg ( __loadavg : * mut f64 , __nelem : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct timezone { pub tz_minuteswest : :: std :: os :: raw :: c_int , pub tz_dsttime : :: std :: os :: raw :: c_int , } # [ test ] fn bindgen_test_layout_timezone ( ) { assert_eq ! ( :: std :: mem :: size_of :: < timezone > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( timezone ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < timezone > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( timezone ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < timezone > ( ) ) ) . tz_minuteswest as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( timezone ) , "::" , stringify ! ( tz_minuteswest ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < timezone > ( ) ) ) . tz_dsttime as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( timezone ) , "::" , stringify ! ( tz_dsttime ) ) ) ; } pub type __timezone_ptr_t = * mut timezone ; extern "C" { pub fn gettimeofday ( __tv : * mut timeval , __tz : __timezone_ptr_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn settimeofday ( __tv : * const timeval , __tz : * const timezone ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn adjtime ( __delta : * const timeval , __olddelta : * mut timeval ) -> :: std :: os :: raw :: c_int ; } pub const __itimer_which_ITIMER_REAL : __itimer_which = 0 ; pub const __itimer_which_ITIMER_VIRTUAL : __itimer_which = 1 ; pub const __itimer_which_ITIMER_PROF : __itimer_which = 2 ; pub type __itimer_which = u32 ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct itimerval { pub it_interval : timeval , pub it_value : timeval , } # [ test ] fn bindgen_test_layout_itimerval ( ) { assert_eq ! ( :: std :: mem :: size_of :: < itimerval > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( itimerval ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < itimerval > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( itimerval ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < itimerval > ( ) ) ) . it_interval as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( itimerval ) , "::" , stringify ! ( it_interval ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < itimerval > ( ) ) ) . it_value as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( itimerval ) , "::" , stringify ! ( it_value ) ) ) ; } pub type __itimer_which_t = :: std :: os :: raw :: c_int ; extern "C" { pub fn getitimer ( __which : __itimer_which_t , __value : * mut itimerval ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn setitimer ( __which : __itimer_which_t , __new : * const itimerval , __old : * mut itimerval ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn utimes ( __file : * const :: std :: os :: raw :: c_char , __tvp : * const timeval ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn lutimes ( __file : * const :: std :: os :: raw :: c_char , __tvp : * const timeval ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn futimes ( __fd : :: std :: os :: raw :: c_int , __tvp : * const timeval ) -> :: std :: os :: raw :: c_int ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct tm { pub tm_sec : :: std :: os :: raw :: c_int , pub tm_min : :: std :: os :: raw :: c_int , pub tm_hour : :: std :: os :: raw :: c_int , pub tm_mday : :: std :: os :: raw :: c_int , pub tm_mon : :: std :: os :: raw :: c_int , pub tm_year : :: std :: os :: raw :: c_int , pub tm_wday : :: std :: os :: raw :: c_int , pub tm_yday : :: std :: os :: raw :: c_int , pub tm_isdst : :: std :: os :: raw :: c_int , pub tm_gmtoff : :: std :: os :: raw :: c_long , pub tm_zone : * const :: std :: os :: raw :: c_char , } # [ test ] fn bindgen_test_layout_tm ( ) { assert_eq ! ( :: std :: mem :: size_of :: < tm > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( tm ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < tm > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( tm ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < tm > ( ) ) ) . tm_sec as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( tm ) , "::" , stringify ! ( tm_sec ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < tm > ( ) ) ) . tm_min as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( tm ) , "::" , stringify ! ( tm_min ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < tm > ( ) ) ) . tm_hour as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( tm ) , "::" , stringify ! ( tm_hour ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < tm > ( ) ) ) . tm_mday as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( tm ) , "::" , stringify ! ( tm_mday ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < tm > ( ) ) ) . tm_mon as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( tm ) , "::" , stringify ! ( tm_mon ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < tm > ( ) ) ) . tm_year as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( tm ) , "::" , stringify ! ( tm_year ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < tm > ( ) ) ) . tm_wday as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( tm ) , "::" , stringify ! ( tm_wday ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < tm > ( ) ) ) . tm_yday as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( tm ) , "::" , stringify ! ( tm_yday ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < tm > ( ) ) ) . tm_isdst as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( tm ) , "::" , stringify ! ( tm_isdst ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < tm > ( ) ) ) . tm_gmtoff as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( tm ) , "::" , stringify ! ( tm_gmtoff ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < tm > ( ) ) ) . tm_zone as * const _ 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 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < itimerspec > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( itimerspec ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < itimerspec > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( itimerspec ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < itimerspec > ( ) ) ) . it_interval as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( itimerspec ) , "::" , stringify ! ( it_interval ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < itimerspec > ( ) ) ) . it_value as * const _ 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 :: std :: os :: raw :: c_char , __maxsize : usize , __format : * const :: std :: os :: raw :: c_char , __tp : * const tm ) -> usize ; } extern "C" { pub fn strftime_l ( __s : * mut :: std :: os :: raw :: c_char , __maxsize : usize , __format : * const :: std :: os :: raw :: 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 :: std :: os :: raw :: c_char ; } extern "C" { pub fn ctime ( __timer : * const time_t ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn asctime_r ( __tp : * const tm , __buf : * mut :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn ctime_r ( __timer : * const time_t , __buf : * mut :: std :: os :: raw :: c_char ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub static mut __tzname : [ * mut :: std :: os :: raw :: c_char ; 2usize ] ; } extern "C" { pub static mut __daylight : :: std :: os :: raw :: c_int ; } extern "C" { pub static mut __timezone : :: std :: os :: raw :: c_long ; } extern "C" { pub static mut tzname : [ * mut :: std :: os :: raw :: c_char ; 2usize ] ; } extern "C" { pub fn tzset ( ) ; } extern "C" { pub static mut daylight : :: std :: os :: raw :: c_int ; } extern "C" { pub static mut timezone : :: std :: os :: raw :: c_long ; } extern "C" { pub fn stime ( __when : * const time_t ) -> :: std :: os :: raw :: c_int ; } 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 : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn nanosleep ( __requested_time : * const timespec , __remaining : * mut timespec ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn clock_getres ( __clock_id : clockid_t , __res : * mut timespec ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn clock_gettime ( __clock_id : clockid_t , __tp : * mut timespec ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn clock_settime ( __clock_id : clockid_t , __tp : * const timespec ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn clock_nanosleep ( __clock_id : clockid_t , __flags : :: std :: os :: raw :: c_int , __req : * const timespec , __rem : * mut timespec ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn clock_getcpuclockid ( __pid : pid_t , __clock_id : * mut clockid_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn timer_create ( __clock_id : clockid_t , __evp : * mut sigevent , __timerid : * mut timer_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn timer_delete ( __timerid : timer_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn timer_settime ( __timerid : timer_t , __flags : :: std :: os :: raw :: c_int , __value : * const itimerspec , __ovalue : * mut itimerspec ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn timer_gettime ( __timerid : timer_t , __value : * mut itimerspec ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn timer_getoverrun ( __timerid : timer_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn timespec_get ( __ts : * mut timespec , __base : :: std :: os :: raw :: c_int ) -> :: std :: os :: raw :: c_int ; } pub type coap_fd_t = :: std :: os :: raw :: c_int ; pub type coap_socket_flags_t = u16 ; # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct coap_addr_tuple_t { # [ doc = "< remote address and port" ] pub remote : coap_address_t , # [ doc = "< local address and port" ] pub local : coap_address_t , } # [ test ] fn bindgen_test_layout_coap_addr_tuple_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_addr_tuple_t > ( ) , 64usize , concat ! ( "Size of: " , stringify ! ( coap_addr_tuple_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_addr_tuple_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( coap_addr_tuple_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_addr_tuple_t > ( ) ) ) . remote as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_addr_tuple_t ) , "::" , stringify ! ( remote ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_addr_tuple_t > ( ) ) ) . local as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( coap_addr_tuple_t ) , "::" , stringify ! ( local ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct coap_socket_t { pub fd : coap_fd_t , pub flags : coap_socket_flags_t , pub session : * mut coap_session_t , pub endpoint : * mut coap_endpoint_t , } # [ test ] fn bindgen_test_layout_coap_socket_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_socket_t > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( coap_socket_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_socket_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( coap_socket_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_socket_t > ( ) ) ) . fd as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_socket_t ) , "::" , stringify ! ( fd ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_socket_t > ( ) ) ) . flags as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( coap_socket_t ) , "::" , stringify ! ( flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_socket_t > ( ) ) ) . session as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( coap_socket_t ) , "::" , stringify ! ( session ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_socket_t > ( ) ) ) . endpoint as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( coap_socket_t ) , "::" , stringify ! ( endpoint ) ) ) ; } extern "C" { pub fn coap_malloc_endpoint ( ) -> * mut coap_endpoint_t ; } extern "C" { pub fn coap_mfree_endpoint ( ep : * mut coap_endpoint_t ) ; } extern "C" { pub fn coap_socket_connect_udp ( sock : * mut coap_socket_t , local_if : * const coap_address_t , server : * const coap_address_t , default_port : :: std :: os :: raw :: c_int , local_addr : * mut coap_address_t , remote_addr : * mut coap_address_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn coap_socket_bind_udp ( sock : * mut coap_socket_t , listen_addr : * const coap_address_t , bound_addr : * mut coap_address_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn coap_socket_connect_tcp1 ( sock : * mut coap_socket_t , local_if : * const coap_address_t , server : * const coap_address_t , default_port : :: std :: os :: raw :: c_int , local_addr : * mut coap_address_t , remote_addr : * mut coap_address_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn coap_socket_connect_tcp2 ( sock : * mut coap_socket_t , local_addr : * mut coap_address_t , remote_addr : * mut coap_address_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn coap_socket_bind_tcp ( sock : * mut coap_socket_t , listen_addr : * const coap_address_t , bound_addr : * mut coap_address_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn coap_socket_accept_tcp ( server : * mut coap_socket_t , new_client : * mut coap_socket_t , local_addr : * mut coap_address_t , remote_addr : * mut coap_address_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn coap_socket_close ( sock : * mut coap_socket_t ) ; } extern "C" { pub fn coap_socket_send ( sock : * mut coap_socket_t , session : * mut coap_session_t , data : * const u8 , data_len : usize ) -> isize ; } extern "C" { pub fn coap_socket_write ( sock : * mut coap_socket_t , data : * const u8 , data_len : usize ) -> isize ; } extern "C" { pub fn coap_socket_read ( sock : * mut coap_socket_t , data : * mut u8 , data_len : usize ) -> isize ; } extern "C" { pub fn coap_epoll_ctl_mod ( sock : * mut coap_socket_t , events : u32 , func : * const :: std :: os :: raw :: c_char ) ; } extern "C" { pub fn coap_socket_strerror ( ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " Function interface for data transmission. This function returns the number of" ] # [ doc = " bytes that have been transmitted, or a value less than zero on error." ] # [ doc = "" ] # [ doc = " @param sock             Socket to send data with" ] # [ doc = " @param session          Addressing information for unconnected sockets, or NULL" ] # [ doc = " @param data             The data to send." ] # [ doc = " @param datalen          The actual length of @p data." ] # [ doc = "" ] # [ doc = " @return                 The number of bytes written on success, or a value" ] # [ doc = "                         less than zero on error." ] pub fn coap_network_send ( sock : * mut coap_socket_t , session : * const coap_session_t , data : * const u8 , datalen : usize ) -> isize ; } extern "C" { # [ doc = " Function interface for reading data. This function returns the number of" ] # [ doc = " bytes that have been read, or a value less than zero on error. In case of an" ] # [ doc = " error, @p *packet is set to NULL." ] # [ doc = "" ] # [ doc = " @param sock   Socket to read data from" ] # [ doc = " @param packet Received packet metadata and payload. src and dst should be preset." ] # [ doc = "" ] # [ doc = " @return       The number of bytes received on success, or a value less than" ] # [ doc = "               zero on error." ] pub fn coap_network_read ( sock : * mut coap_socket_t , packet : * mut coap_packet_t ) -> isize ; } extern "C" { # [ doc = " Given a packet, set msg and msg_len to an address and length of the packet's" ] # [ doc = " data in memory." ] pub fn coap_packet_get_memmapped ( packet : * mut coap_packet_t , address : * mut * mut :: std :: os :: raw :: c_uchar , length : * mut usize ) ; } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct coap_packet_t { # [ doc = "< local and remote addresses" ] pub addr_info : coap_addr_tuple_t , # [ doc = "< the interface index" ] pub ifindex : :: std :: os :: raw :: c_int , # [ doc = "< length of payload" ] pub length : usize , # [ doc = "< payload" ] pub payload : [ :: std :: os :: raw :: c_uchar ; 1472usize ] , } # [ test ] fn bindgen_test_layout_coap_packet_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_packet_t > ( ) , 1552usize , concat ! ( "Size of: " , stringify ! ( coap_packet_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_packet_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( coap_packet_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_packet_t > ( ) ) ) . addr_info as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_packet_t ) , "::" , stringify ! ( addr_info ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_packet_t > ( ) ) ) . ifindex as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( coap_packet_t ) , "::" , stringify ! ( ifindex ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_packet_t > ( ) ) ) . length as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( coap_packet_t ) , "::" , stringify ! ( length ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_packet_t > ( ) ) ) . payload as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( coap_packet_t ) , "::" , stringify ! ( payload ) ) ) ; } pub const coap_nack_reason_t_COAP_NACK_TOO_MANY_RETRIES : coap_nack_reason_t = 0 ; pub const coap_nack_reason_t_COAP_NACK_NOT_DELIVERABLE : coap_nack_reason_t = 1 ; pub const coap_nack_reason_t_COAP_NACK_RST : coap_nack_reason_t = 2 ; pub const coap_nack_reason_t_COAP_NACK_TLS_FAILED : coap_nack_reason_t = 3 ; pub const coap_nack_reason_t_COAP_NACK_ICMP_ISSUE : coap_nack_reason_t = 4 ; pub type coap_nack_reason_t = u32 ; # [ doc = " This data type represents internal timer ticks with COAP_TICKS_PER_SECOND" ] # [ doc = " resolution." ] pub type coap_tick_t = u64 ; # [ doc = " CoAP time in seconds since epoch." ] pub type coap_time_t = time_t ; # [ doc = " This data type is used to represent the difference between two clock_tick_t" ] # [ doc = " values. This data type must have the same size in memory as coap_tick_t to" ] # [ doc = " allow wrapping." ] pub type coap_tick_diff_t = i64 ; extern "C" { # [ doc = " Initializes the internal clock." ] pub fn coap_clock_init ( ) ; } extern "C" { # [ doc = " Sets @p t to the internal time with COAP_TICKS_PER_SECOND resolution." ] pub fn coap_ticks ( t : * mut coap_tick_t ) ; } extern "C" { # [ doc = " Helper function that converts coap ticks to wallclock time. On POSIX, this" ] # [ doc = " function returns the number of seconds since the epoch. On other systems, it" ] # [ doc = " may be the calculated number of seconds since last reboot or so." ] # [ doc = "" ] # [ doc = " @param t Internal system ticks." ] # [ doc = "" ] # [ doc = " @return  The number of seconds that has passed since a specific reference" ] # [ doc = "          point (seconds since epoch on POSIX)." ] pub fn coap_ticks_to_rt ( t : coap_tick_t ) -> coap_time_t ; } extern "C" { # [ doc = " Helper function that converts coap ticks to POSIX wallclock time in us." ] # [ doc = "" ] # [ doc = " @param t Internal system ticks." ] # [ doc = "" ] # [ doc = " @return  The number of seconds that has passed since a specific reference" ] # [ doc = "          point (seconds since epoch on POSIX)." ] pub fn coap_ticks_to_rt_us ( t : coap_tick_t ) -> u64 ; } extern "C" { # [ doc = " Helper function that converts POSIX wallclock time in us to coap ticks." ] # [ doc = "" ] # [ doc = " @param t POSIX time is us" ] # [ doc = "" ] # [ doc = " @return  coap ticks" ] pub fn coap_ticks_from_rt_us ( t : u64 ) -> coap_tick_t ; } extern "C" { # [ doc = " Check whether DTLS is available." ] # [ doc = "" ] # [ doc = " @return @c 1 if support for DTLS is enabled, or @c 0 otherwise." ] pub fn coap_dtls_is_supported ( ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Check whether TLS is available." ] # [ doc = "" ] # [ doc = " @return @c 1 if support for TLS is enabled, or @c 0 otherwise." ] pub fn coap_tls_is_supported ( ) -> :: std :: os :: raw :: c_int ; } # [ doc = "< No DTLS library" ] pub const coap_tls_library_t_COAP_TLS_LIBRARY_NOTLS : coap_tls_library_t = 0 ; # [ doc = "< Using TinyDTLS library" ] pub const coap_tls_library_t_COAP_TLS_LIBRARY_TINYDTLS : coap_tls_library_t = 1 ; # [ doc = "< Using OpenSSL library" ] pub const coap_tls_library_t_COAP_TLS_LIBRARY_OPENSSL : coap_tls_library_t = 2 ; # [ doc = "< Using GnuTLS library" ] pub const coap_tls_library_t_COAP_TLS_LIBRARY_GNUTLS : coap_tls_library_t = 3 ; pub type coap_tls_library_t = u32 ; # [ doc = " The structure used for returning the underlying (D)TLS library" ] # [ doc = " information." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct coap_tls_version_t { # [ doc = "< (D)TLS runtime Library Version" ] pub version : u64 , # [ doc = "< Library type. One of COAP_TLS_LIBRARY_*" ] pub type_ : coap_tls_library_t , # [ doc = "< (D)TLS Built against Library Version" ] pub built_version : u64 , } # [ test ] fn bindgen_test_layout_coap_tls_version_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_tls_version_t > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( coap_tls_version_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_tls_version_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( coap_tls_version_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_tls_version_t > ( ) ) ) . version as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_tls_version_t ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_tls_version_t > ( ) ) ) . type_ as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( coap_tls_version_t ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_tls_version_t > ( ) ) ) . built_version as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( coap_tls_version_t ) , "::" , stringify ! ( built_version ) ) ) ; } extern "C" { # [ doc = " Determine the type and version of the underlying (D)TLS library." ] # [ doc = "" ] # [ doc = " @return The version and type of library libcoap was compiled against." ] pub fn coap_get_tls_library_version ( ) -> * mut coap_tls_version_t ; } # [ doc = " Additional Security setup handler that can be set up by" ] # [ doc = " coap_context_set_pki()." ] # [ doc = " Invoked when libcoap has done the validation checks at the TLS level," ] # [ doc = " but the application needs to do some additional checks/changes/updates." ] # [ doc = "" ] # [ doc = " @param tls_session The security session definition - e.g. SSL * for OpenSSL." ] # [ doc = "                    NULL if server call-back." ] # [ doc = "                    This will be dependent on the underlying TLS library -" ] # [ doc = "                    see coap_get_tls_library_version()" ] # [ doc = " @param setup_data A structure containing setup data originally passed into" ] # [ doc = "                   coap_context_set_pki() or coap_new_client_session_pki()." ] # [ doc = "" ] # [ doc = " @return @c 1 if successful, else @c 0." ] pub type coap_dtls_security_setup_t = :: std :: option :: Option < unsafe extern "C" fn ( tls_session : * mut :: std :: os :: raw :: c_void , setup_data : * mut coap_dtls_pki_t ) -> :: std :: os :: raw :: c_int > ; # [ doc = " CN Validation call-back that can be set up by coap_context_set_pki()." ] # [ doc = " Invoked when libcoap has done the validation checks at the TLS level," ] # [ doc = " but the application needs to check that the CN is allowed." ] # [ doc = " CN is the SubjectAltName in the cert, if not present, then the leftmost" ] # [ doc = " Common Name (CN) component of the subject name." ] # [ doc = "" ] # [ doc = " @param cn  The determined CN from the certificate" ] # [ doc = " @param asn1_public_cert  The ASN.1 DER encoded X.509 certificate" ] # [ doc = " @param asn1_length  The ASN.1 length" ] # [ doc = " @param coap_session  The CoAP session associated with the certificate update" ] # [ doc = " @param depth  Depth in cert chain.  If 0, then client cert, else a CA" ] # [ doc = " @param validated  TLS layer can find no issues if 1" ] # [ doc = " @param arg  The same as was passed into coap_context_set_pki()" ] # [ doc = "             in setup_data->cn_call_back_arg" ] # [ doc = "" ] # [ doc = " @return @c 1 if accepted, else @c 0 if to be rejected." ] pub type coap_dtls_cn_callback_t = :: std :: option :: Option < unsafe extern "C" fn ( cn : * const :: std :: os :: raw :: c_char , asn1_public_cert : * const u8 , asn1_length : usize , coap_session : * mut coap_session_t , depth : :: std :: os :: raw :: c_uint , validated : :: std :: os :: raw :: c_int , arg : * mut :: std :: os :: raw :: c_void ) -> :: std :: os :: raw :: c_int > ; # [ doc = "< NONE" ] pub const coap_asn1_privatekey_type_t_COAP_ASN1_PKEY_NONE : coap_asn1_privatekey_type_t = 0 ; # [ doc = "< RSA type" ] pub const coap_asn1_privatekey_type_t_COAP_ASN1_PKEY_RSA : coap_asn1_privatekey_type_t = 1 ; # [ doc = "< RSA2 type" ] pub const coap_asn1_privatekey_type_t_COAP_ASN1_PKEY_RSA2 : coap_asn1_privatekey_type_t = 2 ; # [ doc = "< DSA type" ] pub const coap_asn1_privatekey_type_t_COAP_ASN1_PKEY_DSA : coap_asn1_privatekey_type_t = 3 ; # [ doc = "< DSA1 type" ] pub const coap_asn1_privatekey_type_t_COAP_ASN1_PKEY_DSA1 : coap_asn1_privatekey_type_t = 4 ; # [ doc = "< DSA2 type" ] pub const coap_asn1_privatekey_type_t_COAP_ASN1_PKEY_DSA2 : coap_asn1_privatekey_type_t = 5 ; # [ doc = "< DSA3 type" ] pub const coap_asn1_privatekey_type_t_COAP_ASN1_PKEY_DSA3 : coap_asn1_privatekey_type_t = 6 ; # [ doc = "< DSA4 type" ] pub const coap_asn1_privatekey_type_t_COAP_ASN1_PKEY_DSA4 : coap_asn1_privatekey_type_t = 7 ; # [ doc = "< DH type" ] pub const coap_asn1_privatekey_type_t_COAP_ASN1_PKEY_DH : coap_asn1_privatekey_type_t = 8 ; # [ doc = "< DHX type" ] pub const coap_asn1_privatekey_type_t_COAP_ASN1_PKEY_DHX : coap_asn1_privatekey_type_t = 9 ; # [ doc = "< EC type" ] pub const coap_asn1_privatekey_type_t_COAP_ASN1_PKEY_EC : coap_asn1_privatekey_type_t = 10 ; # [ doc = "< HMAC type" ] pub const coap_asn1_privatekey_type_t_COAP_ASN1_PKEY_HMAC : coap_asn1_privatekey_type_t = 11 ; # [ doc = "< CMAC type" ] pub const coap_asn1_privatekey_type_t_COAP_ASN1_PKEY_CMAC : coap_asn1_privatekey_type_t = 12 ; # [ doc = "< TLS1_PRF type" ] pub const coap_asn1_privatekey_type_t_COAP_ASN1_PKEY_TLS1_PRF : coap_asn1_privatekey_type_t = 13 ; # [ doc = "< HKDF type" ] pub const coap_asn1_privatekey_type_t_COAP_ASN1_PKEY_HKDF : coap_asn1_privatekey_type_t = 14 ; # [ doc = " The enum used for determining the provided PKI ASN.1 (DER) Private Key" ] # [ doc = " formats." ] pub type coap_asn1_privatekey_type_t = u32 ; # [ doc = "< The PKI key type is PEM" ] pub const coap_pki_key_t_COAP_PKI_KEY_PEM : coap_pki_key_t = 0 ; # [ doc = "< The PKI key type is ASN.1 (DER)" ] pub const coap_pki_key_t_COAP_PKI_KEY_ASN1 : coap_pki_key_t = 1 ; # [ doc = " The enum used for determining the PKI key formats." ] pub type coap_pki_key_t = u32 ; # [ doc = " The structure that holds the PKI PEM definitions." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct coap_pki_key_pem_t { # [ doc = "< File location of Common CA in PEM format" ] pub ca_file : * const :: std :: os :: raw :: c_char , # [ doc = "< File location of Public Cert in PEM format" ] pub public_cert : * const :: std :: os :: raw :: c_char , # [ doc = "< File location of Private Key in PEM format" ] pub private_key : * const :: std :: os :: raw :: c_char , } # [ test ] fn bindgen_test_layout_coap_pki_key_pem_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_pki_key_pem_t > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( coap_pki_key_pem_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_pki_key_pem_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( coap_pki_key_pem_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_pki_key_pem_t > ( ) ) ) . ca_file as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_pki_key_pem_t ) , "::" , stringify ! ( ca_file ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_pki_key_pem_t > ( ) ) ) . public_cert as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( coap_pki_key_pem_t ) , "::" , stringify ! ( public_cert ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_pki_key_pem_t > ( ) ) ) . private_key as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( coap_pki_key_pem_t ) , "::" , stringify ! ( private_key ) ) ) ; } # [ doc = " The structure that holds the PKI ASN.1 (DER) definitions." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct coap_pki_key_asn1_t { # [ doc = "< ASN1 (DER) Common CA Cert" ] pub ca_cert : * const u8 , # [ doc = "< ASN1 (DER) Public Cert" ] pub public_cert : * const u8 , # [ doc = "< ASN1 (DER) Private Key" ] pub private_key : * const u8 , # [ doc = "< ASN1 CA Cert length" ] pub ca_cert_len : usize , # [ doc = "< ASN1 Public Cert length" ] pub public_cert_len : usize , # [ doc = "< ASN1 Private Key length" ] pub private_key_len : usize , # [ doc = "< Private Key Type" ] pub private_key_type : coap_asn1_privatekey_type_t , } # [ test ] fn bindgen_test_layout_coap_pki_key_asn1_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_pki_key_asn1_t > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( coap_pki_key_asn1_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_pki_key_asn1_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( coap_pki_key_asn1_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_pki_key_asn1_t > ( ) ) ) . ca_cert as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_pki_key_asn1_t ) , "::" , stringify ! ( ca_cert ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_pki_key_asn1_t > ( ) ) ) . public_cert as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( coap_pki_key_asn1_t ) , "::" , stringify ! ( public_cert ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_pki_key_asn1_t > ( ) ) ) . private_key as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( coap_pki_key_asn1_t ) , "::" , stringify ! ( private_key ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_pki_key_asn1_t > ( ) ) ) . ca_cert_len as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( coap_pki_key_asn1_t ) , "::" , stringify ! ( ca_cert_len ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_pki_key_asn1_t > ( ) ) ) . public_cert_len as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( coap_pki_key_asn1_t ) , "::" , stringify ! ( public_cert_len ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_pki_key_asn1_t > ( ) ) ) . private_key_len as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( coap_pki_key_asn1_t ) , "::" , stringify ! ( private_key_len ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_pki_key_asn1_t > ( ) ) ) . private_key_type as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( coap_pki_key_asn1_t ) , "::" , stringify ! ( private_key_type ) ) ) ; } # [ doc = " The structure that holds the PKI key information." ] # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct coap_dtls_key_t { # [ doc = "< key format type" ] pub key_type : coap_pki_key_t , pub key : coap_dtls_key_t__bindgen_ty_1 , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union coap_dtls_key_t__bindgen_ty_1 { # [ doc = "< for PEM keys" ] pub pem : coap_pki_key_pem_t , # [ doc = "< for ASN.1 (DER) keys" ] pub asn1 : coap_pki_key_asn1_t , _bindgen_union_align : [ u64 ; 7usize ] , } # [ test ] fn bindgen_test_layout_coap_dtls_key_t__bindgen_ty_1 ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_dtls_key_t__bindgen_ty_1 > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( coap_dtls_key_t__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_dtls_key_t__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( coap_dtls_key_t__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_dtls_key_t__bindgen_ty_1 > ( ) ) ) . pem as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_dtls_key_t__bindgen_ty_1 ) , "::" , stringify ! ( pem ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_dtls_key_t__bindgen_ty_1 > ( ) ) ) . asn1 as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_dtls_key_t__bindgen_ty_1 ) , "::" , stringify ! ( asn1 ) ) ) ; } # [ test ] fn bindgen_test_layout_coap_dtls_key_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_dtls_key_t > ( ) , 64usize , concat ! ( "Size of: " , stringify ! ( coap_dtls_key_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_dtls_key_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( coap_dtls_key_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_dtls_key_t > ( ) ) ) . key_type as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_dtls_key_t ) , "::" , stringify ! ( key_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_dtls_key_t > ( ) ) ) . key as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( coap_dtls_key_t ) , "::" , stringify ! ( key ) ) ) ; } # [ doc = " Server Name Indication (SNI) Validation call-back that can be set up by" ] # [ doc = " coap_context_set_pki()." ] # [ doc = " Invoked if the SNI is not previously seen and prior to sending a certificate" ] # [ doc = " set back to the client so that the appropriate certificate set can be used" ] # [ doc = " based on the requesting SNI." ] # [ doc = "" ] # [ doc = " @param sni  The requested SNI" ] # [ doc = " @param arg  The same as was passed into coap_context_set_pki()" ] # [ doc = "             in setup_data->sni_call_back_arg" ] # [ doc = "" ] # [ doc = " @return New set of certificates to use, or @c NULL if SNI is to be rejected." ] pub type coap_dtls_sni_callback_t = :: std :: option :: Option < unsafe extern "C" fn ( sni : * const :: std :: os :: raw :: c_char , arg : * mut :: std :: os :: raw :: c_void ) -> * mut coap_dtls_key_t > ; # [ doc = " The structure used for defining the PKI setup data to be used." ] # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct coap_dtls_pki_t { pub version : u8 , # [ doc = "< 1 if peer cert is to be verified" ] pub verify_peer_cert : u8 , # [ doc = "< 1 if peer cert is required" ] pub require_peer_cert : u8 , # [ doc = "< 1 if self signed certs are allowed" ] pub allow_self_signed : u8 , # [ doc = "< 1 if expired certs are allowed" ] pub allow_expired_certs : u8 , # [ doc = "< 1 if to check cert_chain_verify_depth" ] pub cert_chain_validation : u8 , # [ doc = "< recommended depth is 3" ] pub cert_chain_verify_depth : u8 , # [ doc = "< 1 if revocation checks wanted" ] pub check_cert_revocation : u8 , # [ doc = "< 1 ignore if CRL not there" ] pub allow_no_crl : u8 , # [ doc = "< 1 if expired crl is allowed" ] pub allow_expired_crl : u8 , # [ doc = "< Reserved - must be set to 0 for" ] # [ doc = "future compatibility" ] pub reserved : [ u8 ; 6usize ] , # [ doc = " CN check call-back function." ] # [ doc = " If not NULL, is called when the TLS connection has passed the configured" ] # [ doc = " TLS options above for the application to verify if the CN is valid." ] pub validate_cn_call_back : coap_dtls_cn_callback_t , # [ doc = "< Passed in to the CN call-back function" ] pub cn_call_back_arg : * mut :: std :: os :: raw :: c_void , # [ doc = " SNI check call-back function." ] # [ doc = " If not @p NULL, called if the SNI is not previously seen and prior to" ] # [ doc = " sending a certificate set back to the client so that the appropriate" ] # [ doc = " certificate set can be used based on the requesting SNI." ] pub validate_sni_call_back : coap_dtls_sni_callback_t , # [ doc = "< Passed in to the sni call-back function" ] pub sni_call_back_arg : * mut :: std :: os :: raw :: c_void , # [ doc = " Additional Security call-back handler that is invoked when libcoap has" ] # [ doc = " done the standerd, defined validation checks at the TLS level," ] # [ doc = " If not @p NULL, called from within the TLS Client Hello connection" ] # [ doc = " setup." ] pub additional_tls_setup_call_back : coap_dtls_security_setup_t , # [ doc = "<  If not NULL, SNI to use in client TLS setup." ] # [ doc = "Owned by the client app and must remain valid" ] # [ doc = "during the call to coap_new_client_session_pki()" ] pub client_sni : * mut :: std :: os :: raw :: c_char , # [ doc = "< PKI key definition" ] pub pki_key : coap_dtls_key_t , } # [ test ] fn bindgen_test_layout_coap_dtls_pki_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_dtls_pki_t > ( ) , 128usize , concat ! ( "Size of: " , stringify ! ( coap_dtls_pki_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_dtls_pki_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( coap_dtls_pki_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_dtls_pki_t > ( ) ) ) . version as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_dtls_pki_t ) , "::" , stringify ! ( version ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_dtls_pki_t > ( ) ) ) . verify_peer_cert as * const _ as usize } , 1usize , concat ! ( "Offset of field: " , stringify ! ( coap_dtls_pki_t ) , "::" , stringify ! ( verify_peer_cert ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_dtls_pki_t > ( ) ) ) . require_peer_cert as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( coap_dtls_pki_t ) , "::" , stringify ! ( require_peer_cert ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_dtls_pki_t > ( ) ) ) . allow_self_signed as * const _ as usize } , 3usize , concat ! ( "Offset of field: " , stringify ! ( coap_dtls_pki_t ) , "::" , stringify ! ( allow_self_signed ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_dtls_pki_t > ( ) ) ) . allow_expired_certs as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( coap_dtls_pki_t ) , "::" , stringify ! ( allow_expired_certs ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_dtls_pki_t > ( ) ) ) . cert_chain_validation as * const _ as usize } , 5usize , concat ! ( "Offset of field: " , stringify ! ( coap_dtls_pki_t ) , "::" , stringify ! ( cert_chain_validation ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_dtls_pki_t > ( ) ) ) . cert_chain_verify_depth as * const _ as usize } , 6usize , concat ! ( "Offset of field: " , stringify ! ( coap_dtls_pki_t ) , "::" , stringify ! ( cert_chain_verify_depth ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_dtls_pki_t > ( ) ) ) . check_cert_revocation as * const _ as usize } , 7usize , concat ! ( "Offset of field: " , stringify ! ( coap_dtls_pki_t ) , "::" , stringify ! ( check_cert_revocation ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_dtls_pki_t > ( ) ) ) . allow_no_crl as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( coap_dtls_pki_t ) , "::" , stringify ! ( allow_no_crl ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_dtls_pki_t > ( ) ) ) . allow_expired_crl as * const _ as usize } , 9usize , concat ! ( "Offset of field: " , stringify ! ( coap_dtls_pki_t ) , "::" , stringify ! ( allow_expired_crl ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_dtls_pki_t > ( ) ) ) . reserved as * const _ as usize } , 10usize , concat ! ( "Offset of field: " , stringify ! ( coap_dtls_pki_t ) , "::" , stringify ! ( reserved ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_dtls_pki_t > ( ) ) ) . validate_cn_call_back as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( coap_dtls_pki_t ) , "::" , stringify ! ( validate_cn_call_back ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_dtls_pki_t > ( ) ) ) . cn_call_back_arg as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( coap_dtls_pki_t ) , "::" , stringify ! ( cn_call_back_arg ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_dtls_pki_t > ( ) ) ) . validate_sni_call_back as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( coap_dtls_pki_t ) , "::" , stringify ! ( validate_sni_call_back ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_dtls_pki_t > ( ) ) ) . sni_call_back_arg as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( coap_dtls_pki_t ) , "::" , stringify ! ( sni_call_back_arg ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_dtls_pki_t > ( ) ) ) . additional_tls_setup_call_back as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( coap_dtls_pki_t ) , "::" , stringify ! ( additional_tls_setup_call_back ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_dtls_pki_t > ( ) ) ) . client_sni as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( coap_dtls_pki_t ) , "::" , stringify ! ( client_sni ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_dtls_pki_t > ( ) ) ) . pki_key as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( coap_dtls_pki_t ) , "::" , stringify ! ( pki_key ) ) ) ; } extern "C" { # [ doc = " Creates a new DTLS context for the given @p coap_context. This function" ] # [ doc = " returns a pointer to a new DTLS context object or @c NULL on error." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @param coap_context The CoAP context where the DTLS object shall be used." ] # [ doc = "" ] # [ doc = " @return A DTLS context object or @c NULL on error." ] pub fn coap_dtls_new_context ( coap_context : * mut coap_context_t ) -> * mut :: std :: os :: raw :: c_void ; } # [ doc = "< Internal function invoked for client" ] pub const coap_dtls_role_t_COAP_DTLS_ROLE_CLIENT : coap_dtls_role_t = 0 ; # [ doc = "< Internal function invoked for server" ] pub const coap_dtls_role_t_COAP_DTLS_ROLE_SERVER : coap_dtls_role_t = 1 ; pub type coap_dtls_role_t = u32 ; extern "C" { # [ doc = " Set the DTLS context's default PSK information." ] # [ doc = " This does the PSK specifics following coap_dtls_new_context()." ] # [ doc = " If @p COAP_DTLS_ROLE_SERVER, then identity hint will also get set." ] # [ doc = " If @p COAP_DTLS_ROLE_SERVER, then the information will get put into the" ] # [ doc = " TLS library's context (from which sessions are derived)." ] # [ doc = " If @p COAP_DTLS_ROLE_CLIENT, then the information will get put into the" ] # [ doc = " TLS library's session." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @param coap_context The CoAP context." ] # [ doc = " @param identity_hint The default PSK server identity hint sent to a client." ] # [ doc = "                      Required parameter.  If @p NULL, will be set to \"\"." ] # [ doc = "                      Empty string is a valid hint." ] # [ doc = "                      This parameter is ignored if COAP_DTLS_ROLE_CLIENT" ] # [ doc = " @param role  One of @p COAP_DTLS_ROLE_CLIENT or @p COAP_DTLS_ROLE_SERVER" ] # [ doc = "" ] # [ doc = " @return @c 1 if successful, else @c 0." ] pub fn coap_dtls_context_set_psk ( coap_context : * mut coap_context_t , identity_hint : * const :: std :: os :: raw :: c_char , role : coap_dtls_role_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Set the DTLS context's default server PKI information." ] # [ doc = " This does the PKI specifics following coap_dtls_new_context()." ] # [ doc = " If @p COAP_DTLS_ROLE_SERVER, then the information will get put into the" ] # [ doc = " TLS library's context (from which sessions are derived)." ] # [ doc = " If @p COAP_DTLS_ROLE_CLIENT, then the information will get put into the" ] # [ doc = " TLS library's session." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @param coap_context The CoAP context." ] # [ doc = " @param setup_data     Setup information defining how PKI is to be setup." ] # [ doc = "                       Required parameter.  If @p NULL, PKI will not be" ] # [ doc = "                       set up." ] # [ doc = " @param role  One of @p COAP_DTLS_ROLE_CLIENT or @p COAP_DTLS_ROLE_SERVER" ] # [ doc = "" ] # [ doc = " @return @c 1 if successful, else @c 0." ] pub fn coap_dtls_context_set_pki ( coap_context : * mut coap_context_t , setup_data : * mut coap_dtls_pki_t , role : coap_dtls_role_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Set the dtls context's default Root CA information for a client or server." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @param coap_context   The current coap_context_t object." ] # [ doc = " @param ca_file        If not @p NULL, is the full path name of a PEM encoded" ] # [ doc = "                       file containing all the Root CAs to be used." ] # [ doc = " @param ca_dir         If not @p NULL, points to a directory containing PEM" ] # [ doc = "                       encoded files containing all the Root CAs to be used." ] # [ doc = "" ] # [ doc = " @return @c 1 if successful, else @c 0." ] pub fn coap_dtls_context_set_pki_root_cas ( coap_context : * mut coap_context_t , ca_file : * const :: std :: os :: raw :: c_char , ca_dir : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Check whether one of the coap_dtls_context_set_{psk|pki}() functions have" ] # [ doc = " been called." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @param coap_context The current coap_context_t object." ] # [ doc = "" ] # [ doc = " @return @c 1 if coap_dtls_context_set_{psk|pki}() called, else @c 0." ] pub fn coap_dtls_context_check_keys_enabled ( coap_context : * mut coap_context_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Releases the storage allocated for @p dtls_context." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @param dtls_context The DTLS context as returned by coap_dtls_new_context()." ] pub fn coap_dtls_free_context ( dtls_context : * mut :: std :: os :: raw :: c_void ) ; } extern "C" { # [ doc = " Create a new client-side session. This should send a HELLO to the server." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @param coap_session   The CoAP session." ] # [ doc = "" ] # [ doc = " @return Opaque handle to underlying TLS library object containing security" ] # [ doc = "         parameters for the session." ] pub fn coap_dtls_new_client_session ( coap_session : * mut coap_session_t ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [ doc = " Create a new DTLS server-side session." ] # [ doc = " Called after coap_dtls_hello() has returned @c 1, signalling that a validated" ] # [ doc = " HELLO was received from a client." ] # [ doc = " This should send a HELLO to the server." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @param coap_session   The CoAP session." ] # [ doc = "" ] # [ doc = " @return Opaque handle to underlying TLS library object containing security" ] # [ doc = "         parameters for the DTLS session." ] pub fn coap_dtls_new_server_session ( coap_session : * mut coap_session_t ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [ doc = " Terminates the DTLS session (may send an ALERT if necessary) then frees the" ] # [ doc = " underlying TLS library object containing security parameters for the session." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @param coap_session   The CoAP session." ] pub fn coap_dtls_free_session ( coap_session : * mut coap_session_t ) ; } extern "C" { # [ doc = " Notify of a change in the CoAP session's MTU, for example after" ] # [ doc = " a PMTU update." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @param coap_session   The CoAP session." ] pub fn coap_dtls_session_update_mtu ( coap_session : * mut coap_session_t ) ; } extern "C" { # [ doc = " Send data to a DTLS peer." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @param coap_session The CoAP session." ] # [ doc = " @param data      pointer to data." ] # [ doc = " @param data_len  Number of bytes to send." ] # [ doc = "" ] # [ doc = " @return @c 0 if this would be blocking, @c -1 if there is an error or the" ] # [ doc = "         number of cleartext bytes sent." ] pub fn coap_dtls_send ( coap_session : * mut coap_session_t , data : * const u8 , data_len : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Check if timeout is handled per CoAP session or per CoAP context." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @return @c 1 of timeout and retransmit is per context, @c 0 if it is" ] # [ doc = "         per session." ] pub fn coap_dtls_is_context_timeout ( ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Do all pending retransmits and get next timeout" ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @param dtls_context The DTLS context." ] # [ doc = "" ] # [ doc = " @return @c 0 if no event is pending or date of the next retransmit." ] pub fn coap_dtls_get_context_timeout ( dtls_context : * mut :: std :: os :: raw :: c_void ) -> coap_tick_t ; } extern "C" { # [ doc = " Get next timeout for this session." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @param coap_session The CoAP session." ] # [ doc = " @param now The current time in ticks." ] # [ doc = "" ] # [ doc = " @return @c 0 If no event is pending or ticks time of the next retransmit." ] pub fn coap_dtls_get_timeout ( coap_session : * mut coap_session_t , now : coap_tick_t ) -> coap_tick_t ; } extern "C" { # [ doc = " Handle a DTLS timeout expiration." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @param coap_session The CoAP session." ] pub fn coap_dtls_handle_timeout ( coap_session : * mut coap_session_t ) ; } extern "C" { # [ doc = " Handling incoming data from a DTLS peer." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @param coap_session The CoAP session." ] # [ doc = " @param data      Encrypted datagram." ] # [ doc = " @param data_len  Encrypted datagram size." ] # [ doc = "" ] # [ doc = " @return Result of coap_handle_dgram on the decrypted CoAP PDU" ] # [ doc = "         or @c -1 for error." ] pub fn coap_dtls_receive ( coap_session : * mut coap_session_t , data : * const u8 , data_len : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Handling client HELLO messages from a new candiate peer." ] # [ doc = " Note that session->tls is empty." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @param coap_session The CoAP session." ] # [ doc = " @param data      Encrypted datagram." ] # [ doc = " @param data_len  Encrypted datagram size." ] # [ doc = "" ] # [ doc = " @return @c 0 if a cookie verification message has been sent, @c 1 if the" ] # [ doc = "        HELLO contains a valid cookie and a server session should be created," ] # [ doc = "        @c -1 if the message is invalid." ] pub fn coap_dtls_hello ( coap_session : * mut coap_session_t , data : * const u8 , data_len : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Get DTLS overhead over cleartext PDUs." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @param coap_session The CoAP session." ] # [ doc = "" ] # [ doc = " @return Maximum number of bytes added by DTLS layer." ] pub fn coap_dtls_get_overhead ( coap_session : * mut coap_session_t ) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [ doc = " Create a new TLS client-side session." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @param coap_session The CoAP session." ] # [ doc = " @param connected Updated with whether the connection is connected yet or not." ] # [ doc = "                  @c 0 is not connected, @c 1 is connected." ] # [ doc = "" ] # [ doc = " @return Opaque handle to underlying TLS library object containing security" ] # [ doc = "         parameters for the session." ] pub fn coap_tls_new_client_session ( coap_session : * mut coap_session_t , connected : * mut :: std :: os :: raw :: c_int ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [ doc = " Create a TLS new server-side session." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @param coap_session The CoAP session." ] # [ doc = " @param connected Updated with whether the connection is connected yet or not." ] # [ doc = "                  @c 0 is not connected, @c 1 is connected." ] # [ doc = "" ] # [ doc = " @return Opaque handle to underlying TLS library object containing security" ] # [ doc = "         parameters for the session." ] pub fn coap_tls_new_server_session ( coap_session : * mut coap_session_t , connected : * mut :: std :: os :: raw :: c_int ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [ doc = " Terminates the TLS session (may send an ALERT if necessary) then frees the" ] # [ doc = " underlying TLS library object containing security parameters for the session." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @param coap_session The CoAP session." ] pub fn coap_tls_free_session ( coap_session : * mut coap_session_t ) ; } extern "C" { # [ doc = " Send data to a TLS peer, with implicit flush." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @param coap_session The CoAP session." ] # [ doc = " @param data      Pointer to data." ] # [ doc = " @param data_len  Number of bytes to send." ] # [ doc = "" ] # [ doc = " @return          @c 0 if this should be retried, @c -1 if there is an error" ] # [ doc = "                  or the number of cleartext bytes sent." ] pub fn coap_tls_write ( coap_session : * mut coap_session_t , data : * const u8 , data_len : usize ) -> isize ; } extern "C" { # [ doc = " Read some data from a TLS peer." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @param coap_session The CoAP session." ] # [ doc = " @param data      Pointer to data." ] # [ doc = " @param data_len  Maximum number of bytes to read." ] # [ doc = "" ] # [ doc = " @return          @c 0 if this should be retried, @c -1 if there is an error" ] # [ doc = "                  or the number of cleartext bytes read." ] pub fn coap_tls_read ( coap_session : * mut coap_session_t , data : * mut u8 , data_len : usize ) -> isize ; } extern "C" { # [ doc = " Initialize the underlying (D)TLS Library layer." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] pub fn coap_dtls_startup ( ) ; } extern "C" { # [ doc = " @ingroup logging" ] # [ doc = " Sets the (D)TLS logging level to the specified @p level." ] # [ doc = " Note: coap_log_level() will influence output if at a specified level." ] # [ doc = "" ] # [ doc = " @param level The logging level to use - LOG_*" ] pub fn coap_dtls_set_log_level ( level : :: std :: os :: raw :: c_int ) ; } extern "C" { # [ doc = " @ingroup logging" ] # [ doc = " Get the current (D)TLS logging." ] # [ doc = "" ] # [ doc = " @return The current log level (one of LOG_*)." ] pub fn coap_dtls_get_log_level ( ) -> :: std :: os :: raw :: c_int ; } # [ doc = " Scalar type to represent different events, e.g. DTLS events or" ] # [ doc = " retransmission timeouts." ] pub type coap_event_t = :: std :: os :: raw :: c_uint ; # [ doc = " Type for event handler functions that can be registered with a CoAP" ] # [ doc = " context using the unction coap_set_event_handler(). When called by" ] # [ doc = " the library, the first argument will be the coap_context_t object" ] # [ doc = " where the handler function has been registered. The second argument" ] # [ doc = " is the event type that may be complemented by event-specific data" ] # [ doc = " passed as the third argument." ] pub type coap_event_handler_t = :: std :: option :: Option < unsafe extern "C" fn ( arg1 : * mut coap_context_t , event : coap_event_t , session : * mut coap_session_t ) -> :: std :: os :: raw :: c_int > ; extern "C" { # [ doc = " Registers the function @p hnd as callback for events from the given" ] # [ doc = " CoAP context @p context. Any event handler that has previously been" ] # [ doc = " registered with @p context will be overwritten by this operation." ] # [ doc = "" ] # [ doc = " @param context The CoAP context to register the event handler with." ] # [ doc = " @param hnd     The event handler to be registered.  @c NULL if to be" ] # [ doc = "                de-registered." ] pub fn coap_register_event_handler ( context : * mut coap_context_t , hnd : coap_event_handler_t ) ; } extern "C" { # [ doc = " Registers the function @p hnd as callback for events from the given" ] # [ doc = " CoAP context @p context. Any event handler that has previously been" ] # [ doc = " registered with @p context will be overwritten by this operation." ] # [ doc = "" ] # [ doc = " @deprecated Use coap_register_event_handler() instead." ] # [ doc = "" ] # [ doc = " @param context The CoAP context to register the event handler with." ] # [ doc = " @param hnd     The event handler to be registered." ] pub fn coap_set_event_handler ( context : * mut coap_context_t , hnd : coap_event_handler_t ) ; } extern "C" { # [ doc = " Clears the event handler registered with @p context." ] # [ doc = "" ] # [ doc = " @deprecated Use coap_register_event_handler() instead with NULL for hnd." ] # [ doc = "" ] # [ doc = " @param context The CoAP context whose event handler is to be removed." ] pub fn coap_clear_event_handler ( context : * mut coap_context_t ) ; } # [ doc = " Coap string data definition" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct coap_string_t { # [ doc = "< length of string" ] pub length : usize , # [ doc = "< string data" ] pub s : * mut u8 , } # [ test ] fn bindgen_test_layout_coap_string_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_string_t > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( coap_string_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_string_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( coap_string_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_string_t > ( ) ) ) . length as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_string_t ) , "::" , stringify ! ( length ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_string_t > ( ) ) ) . s as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( coap_string_t ) , "::" , stringify ! ( s ) ) ) ; } # [ doc = " Coap string data definition with const data" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct coap_str_const_t { # [ doc = "< length of string" ] pub length : usize , # [ doc = "< string data" ] pub s : * const u8 , } # [ test ] fn bindgen_test_layout_coap_str_const_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_str_const_t > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( coap_str_const_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_str_const_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( coap_str_const_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_str_const_t > ( ) ) ) . length as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_str_const_t ) , "::" , stringify ! ( length ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_str_const_t > ( ) ) ) . s as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( coap_str_const_t ) , "::" , stringify ! ( s ) ) ) ; } # [ doc = " Coap binary data definition" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct coap_binary_t { # [ doc = "< length of binary data" ] pub length : usize , # [ doc = "< binary data" ] pub s : * mut u8 , } # [ test ] fn bindgen_test_layout_coap_binary_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_binary_t > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( coap_binary_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_binary_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( coap_binary_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_binary_t > ( ) ) ) . length as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_binary_t ) , "::" , stringify ! ( length ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_binary_t > ( ) ) ) . s as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( coap_binary_t ) , "::" , stringify ! ( s ) ) ) ; } extern "C" { # [ doc = " Returns a new string object with at least size+1 bytes storage allocated." ] # [ doc = " The string must be released using coap_delete_string()." ] # [ doc = "" ] # [ doc = " @param size The size to allocate for the binary string data." ] # [ doc = "" ] # [ doc = " @return       A pointer to the new object or @c NULL on error." ] pub fn coap_new_string ( size : usize ) -> * mut coap_string_t ; } extern "C" { # [ doc = " Deletes the given string and releases any memory allocated." ] # [ doc = "" ] # [ doc = " @param string The string to free off." ] pub fn coap_delete_string ( string : * mut coap_string_t ) ; } extern "C" { # [ doc = " Returns a new const string object with at least size+1 bytes storage" ] # [ doc = " allocated, and the provided data copied into the string object." ] # [ doc = " The string must be released using coap_delete_str_const()." ] # [ doc = "" ] # [ doc = " @param data The data to put in the new string object." ] # [ doc = " @param size The size to allocate for the binary string data." ] # [ doc = "" ] # [ doc = " @return       A pointer to the new object or @c NULL on error." ] pub fn coap_new_str_const ( data : * const u8 , size : usize ) -> * mut coap_str_const_t ; } extern "C" { # [ doc = " Deletes the given const string and releases any memory allocated." ] # [ doc = "" ] # [ doc = " @param string The string to free off." ] pub fn coap_delete_str_const ( string : * mut coap_str_const_t ) ; } extern "C" { # [ doc = " Take the specified string and create a coap_str_const_t *" ] # [ doc = "" ] # [ doc = " Note: the array is 2 deep as there are up to two callings of" ] # [ doc = " coap_make_str_const in a function call. e.g. coap_add_attr()." ] # [ doc = " Caution: If there are local variable assignments, these will cycle around" ] # [ doc = " the var[COAP_MAX_STR_CONST_FUNC] set.  No current examples do this." ] # [ doc = "" ] # [ doc = " @param string The const string to convert to a coap_str_const_t *" ] # [ doc = "" ] # [ doc = " @return       A pointer to one of two static variables containing the" ] # [ doc = "               coap_str_const_t * result" ] pub fn coap_make_str_const ( string : * const :: std :: os :: raw :: c_char ) -> * mut coap_str_const_t ; } pub const coap_uri_scheme_t_COAP_URI_SCHEME_COAP : coap_uri_scheme_t = 0 ; pub const coap_uri_scheme_t_COAP_URI_SCHEME_COAPS : coap_uri_scheme_t = 1 ; pub const coap_uri_scheme_t_COAP_URI_SCHEME_COAP_TCP : coap_uri_scheme_t = 2 ; pub const coap_uri_scheme_t_COAP_URI_SCHEME_COAPS_TCP : coap_uri_scheme_t = 3 ; # [ doc = " The scheme specifiers. Secure schemes have an odd numeric value," ] # [ doc = " others are even." ] pub type coap_uri_scheme_t = u32 ; # [ doc = " Representation of parsed URI. Components may be filled from a string with" ] # [ doc = " coap_split_uri() and can be used as input for option-creation functions." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct coap_uri_t { # [ doc = "< host part of the URI" ] pub host : coap_str_const_t , # [ doc = "< The port in host byte order" ] pub port : u16 , # [ doc = "< Beginning of the first path segment." ] # [ doc = "Use coap_split_path() to create Uri-Path options" ] pub path : coap_str_const_t , # [ doc = "<  The query part if present" ] pub query : coap_str_const_t , # [ doc = " The parsed scheme specifier." ] pub scheme : coap_uri_scheme_t , } # [ test ] fn bindgen_test_layout_coap_uri_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_uri_t > ( ) , 64usize , concat ! ( "Size of: " , stringify ! ( coap_uri_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_uri_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( coap_uri_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_uri_t > ( ) ) ) . host as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_uri_t ) , "::" , stringify ! ( host ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_uri_t > ( ) ) ) . port as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( coap_uri_t ) , "::" , stringify ! ( port ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_uri_t > ( ) ) ) . path as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( coap_uri_t ) , "::" , stringify ! ( path ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_uri_t > ( ) ) ) . query as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( coap_uri_t ) , "::" , stringify ! ( query ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_uri_t > ( ) ) ) . scheme as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( coap_uri_t ) , "::" , stringify ! ( scheme ) ) ) ; } extern "C" { # [ doc = " Creates a new coap_uri_t object from the specified URI. Returns the new" ] # [ doc = " object or NULL on error. The memory allocated by the new coap_uri_t" ] # [ doc = " must be released using coap_free()." ] # [ doc = "" ] # [ doc = " @param uri The URI path to copy." ] # [ doc = " @param length The length of uri." ] # [ doc = "" ] # [ doc = " @return New URI object or NULL on error." ] pub fn coap_new_uri ( uri : * const u8 , length : :: std :: os :: raw :: c_uint ) -> * mut coap_uri_t ; } extern "C" { # [ doc = " Clones the specified coap_uri_t object. Thie function allocates sufficient" ] # [ doc = " memory to hold the coap_uri_t structure and its contents. The object must" ] # [ doc = " be released with coap_free()." ] pub fn coap_clone_uri ( uri : * const coap_uri_t ) -> * mut coap_uri_t ; } extern "C" { # [ doc = " Parses a given string into URI components. The identified syntactic" ] # [ doc = " components are stored in the result parameter @p uri. Optional URI" ] # [ doc = " components that are not specified will be set to { 0, 0 }, except for the" ] # [ doc = " port which is set to @c COAP_DEFAULT_PORT. This function returns @p 0 if" ] # [ doc = " parsing succeeded, a value less than zero otherwise." ] # [ doc = "" ] # [ doc = " @param str_var The string to split up." ] # [ doc = " @param len     The actual length of @p str_var" ] # [ doc = " @param uri     The coap_uri_t object to store the result." ] # [ doc = " @return        @c 0 on success, or < 0 on error." ] # [ doc = "" ] pub fn coap_split_uri ( str_var : * const u8 , len : usize , uri : * mut coap_uri_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Splits the given URI path into segments. Each segment is preceded" ] # [ doc = " by an option pseudo-header with delta-value 0 and the actual length" ] # [ doc = " of the respective segment after percent-decoding." ] # [ doc = "" ] # [ doc = " @param s      The path string to split." ] # [ doc = " @param length The actual length of @p s." ] # [ doc = " @param buf    Result buffer for parsed segments." ] # [ doc = " @param buflen Maximum length of @p buf. Will be set to the actual number" ] # [ doc = "               of bytes written into buf on success." ] # [ doc = "" ] # [ doc = " @return       The number of segments created or @c -1 on error." ] pub fn coap_split_path ( s : * const u8 , length : usize , buf : * mut :: std :: os :: raw :: c_uchar , buflen : * mut usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Splits the given URI query into segments. Each segment is preceded" ] # [ doc = " by an option pseudo-header with delta-value 0 and the actual length" ] # [ doc = " of the respective query term." ] # [ doc = "" ] # [ doc = " @param s      The query string to split." ] # [ doc = " @param length The actual length of @p s." ] # [ doc = " @param buf    Result buffer for parsed segments." ] # [ doc = " @param buflen Maximum length of @p buf. Will be set to the actual number" ] # [ doc = "               of bytes written into buf on success." ] # [ doc = "" ] # [ doc = " @return       The number of segments created or @c -1 on error." ] # [ doc = "" ] # [ doc = " @bug This function does not reserve additional space for delta > 12." ] pub fn coap_split_query ( s : * const u8 , length : usize , buf : * mut :: std :: os :: raw :: c_uchar , buflen : * mut usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Extract query string from request PDU according to escape rules in 6.5.8." ] # [ doc = " @param request Request PDU." ] # [ doc = " @return        Reconstructed and escaped query string part." ] pub fn coap_get_query ( request : * const coap_pdu_t ) -> * mut coap_string_t ; } extern "C" { # [ doc = " Extract uri_path string from request PDU" ] # [ doc = " @param request Request PDU." ] # [ doc = " @return        Reconstructed and escaped uri path string part." ] pub fn coap_get_uri_path ( request : * const coap_pdu_t ) -> * mut coap_string_t ; } extern "C" { # [ doc = " Returns a human-readable response phrase for the specified CoAP response @p" ] # [ doc = " code. This function returns @c NULL if not found." ] # [ doc = "" ] # [ doc = " @param code The response code for which the literal phrase should be" ] # [ doc = "             retrieved." ] # [ doc = "" ] # [ doc = " @return     A zero-terminated string describing the error, or @c NULL if not" ] # [ doc = "             found." ] pub fn coap_response_phrase ( code : :: std :: os :: raw :: c_uchar ) -> * const :: std :: os :: raw :: c_char ; } # [ doc = " coap_tid_t is used to store CoAP transaction id, i.e. a hash value" ] # [ doc = " built from the remote transport address and the message id of a" ] # [ doc = " CoAP PDU.  Valid transaction ids are greater or equal zero." ] pub type coap_tid_t = :: std :: os :: raw :: c_int ; # [ doc = " @deprecated Use coap_optlist_t instead." ] # [ doc = "" ] # [ doc = " Structures for more convenient handling of options. (To be used with ordered" ] # [ doc = " coap_list_t.) The option's data will be added to the end of the coap_option" ] # [ doc = " structure (see macro COAP_OPTION_DATA)." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct coap_option { pub key : u16 , pub length : :: std :: os :: raw :: c_uint , } # [ test ] fn bindgen_test_layout_coap_option ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_option > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( coap_option ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_option > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( coap_option ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_option > ( ) ) ) . key as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_option ) , "::" , stringify ! ( key ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_option > ( ) ) ) . length as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( coap_option ) , "::" , stringify ! ( length ) ) ) ; } # [ doc = " structure for CoAP PDUs" ] # [ doc = " token, if any, follows the fixed size header, then options until" ] # [ doc = " payload marker (0xff), then the payload if stored inline." ] # [ doc = " Memory layout is:" ] # [ doc = " <---header--->|<---token---><---options--->0xff<---payload--->" ] # [ doc = " header is addressed with a negative offset to token, its maximum size is" ] # [ doc = " max_hdr_size." ] # [ doc = " options starts at token + token_length" ] # [ doc = " payload starts at data, its length is used_size - (data - token)" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct coap_pdu_t { # [ doc = "< message type" ] pub type_ : u8 , # [ doc = "< request method (value 1--10) or response code (value 40-255)" ] pub code : u8 , # [ doc = "< space reserved for protocol-specific header" ] pub max_hdr_size : u8 , # [ doc = "< actaul size used for protocol-specific header" ] pub hdr_size : u8 , # [ doc = "< length of Token" ] pub token_length : u8 , # [ doc = "< transaction id, if any, in regular host byte order" ] pub tid : u16 , # [ doc = "< highest option number" ] pub max_delta : u16 , # [ doc = "< allocated storage for token, options and payload" ] pub alloc_size : usize , # [ doc = "< used bytes of storage for token, options and payload" ] pub used_size : usize , # [ doc = "< maximum size for token, options and payload, or zero for variable size pdu" ] pub max_size : usize , # [ doc = "< first byte of token, if any, or options" ] pub token : * mut u8 , # [ doc = "< first byte of payload, if any" ] pub data : * mut u8 , } # [ test ] fn bindgen_test_layout_coap_pdu_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_pdu_t > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( coap_pdu_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_pdu_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( coap_pdu_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_pdu_t > ( ) ) ) . type_ as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_pdu_t ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_pdu_t > ( ) ) ) . code as * const _ as usize } , 1usize , concat ! ( "Offset of field: " , stringify ! ( coap_pdu_t ) , "::" , stringify ! ( code ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_pdu_t > ( ) ) ) . max_hdr_size as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( coap_pdu_t ) , "::" , stringify ! ( max_hdr_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_pdu_t > ( ) ) ) . hdr_size as * const _ as usize } , 3usize , concat ! ( "Offset of field: " , stringify ! ( coap_pdu_t ) , "::" , stringify ! ( hdr_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_pdu_t > ( ) ) ) . token_length as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( coap_pdu_t ) , "::" , stringify ! ( token_length ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_pdu_t > ( ) ) ) . tid as * const _ as usize } , 6usize , concat ! ( "Offset of field: " , stringify ! ( coap_pdu_t ) , "::" , stringify ! ( tid ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_pdu_t > ( ) ) ) . max_delta as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( coap_pdu_t ) , "::" , stringify ! ( max_delta ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_pdu_t > ( ) ) ) . alloc_size as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( coap_pdu_t ) , "::" , stringify ! ( alloc_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_pdu_t > ( ) ) ) . used_size as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( coap_pdu_t ) , "::" , stringify ! ( used_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_pdu_t > ( ) ) ) . max_size as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( coap_pdu_t ) , "::" , stringify ! ( max_size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_pdu_t > ( ) ) ) . token as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( coap_pdu_t ) , "::" , stringify ! ( token ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_pdu_t > ( ) ) ) . data as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( coap_pdu_t ) , "::" , stringify ! ( data ) ) ) ; } pub type coap_proto_t = u8 ; extern "C" { # [ doc = " Creates a new CoAP PDU with at least enough storage space for the given" ] # [ doc = " @p size maximum message size. The function returns a pointer to the" ] # [ doc = " node coap_pdu_t object on success, or @c NULL on error. The storage allocated" ] # [ doc = " for the result must be released with coap_delete_pdu() if coap_send() is not" ] # [ doc = " called." ] # [ doc = "" ] # [ doc = " @param type The type of the PDU (one of COAP_MESSAGE_CON, COAP_MESSAGE_NON," ] # [ doc = "             COAP_MESSAGE_ACK, COAP_MESSAGE_RST)." ] # [ doc = " @param code The message code." ] # [ doc = " @param tid  The transcation id to set or 0 if unknown / not applicable." ] # [ doc = " @param size The maximum allowed number of byte for the message." ] # [ doc = " @return     A pointer to the new PDU object or @c NULL on error." ] pub fn coap_pdu_init ( type_ : u8 , code : u8 , tid : u16 , size : usize ) -> * mut coap_pdu_t ; } extern "C" { # [ doc = " Dynamically grows the size of @p pdu to @p new_size. The new size" ] # [ doc = " must not exceed the PDU's configure maximum size. On success, this" ] # [ doc = " function returns 1, otherwise 0." ] # [ doc = "" ] # [ doc = " @param pdu      The PDU to resize." ] # [ doc = " @param new_size The new size in bytes." ] # [ doc = " @return         1 if the operation succeeded, 0 otherwise." ] pub fn coap_pdu_resize ( pdu : * mut coap_pdu_t , new_size : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Clears any contents from @p pdu and resets @c used_size," ] # [ doc = " and @c data pointers. @c max_size is set to @p size, any" ] # [ doc = " other field is set to @c 0. Note that @p pdu must be a valid" ] # [ doc = " pointer to a coap_pdu_t object created e.g. by coap_pdu_init()." ] pub fn coap_pdu_clear ( pdu : * mut coap_pdu_t , size : usize ) ; } extern "C" { # [ doc = " Creates a new CoAP PDU." ] pub fn coap_new_pdu ( session : * const coap_session_t ) -> * mut coap_pdu_t ; } extern "C" { # [ doc = " Dispose of an CoAP PDU and frees associated storage." ] # [ doc = " Not that in general you should not call this function directly." ] # [ doc = " When a PDU is sent with coap_send(), coap_delete_pdu() will be" ] # [ doc = " called automatically for you." ] pub fn coap_delete_pdu ( arg1 : * mut coap_pdu_t ) ; } extern "C" { # [ doc = " Interprets @p data to determine the number of bytes in the header." ] # [ doc = " This function returns @c 0 on error or a number greater than zero on success." ] # [ doc = "" ] # [ doc = " @param proto  Session's protocol" ] # [ doc = " @param data   The first byte of raw data to parse as CoAP PDU." ] # [ doc = "" ] # [ doc = " @return       A value greater than zero on success or @c 0 on error." ] pub fn coap_pdu_parse_header_size ( proto : coap_proto_t , data : * const u8 ) -> usize ; } extern "C" { # [ doc = " Parses @p data to extract the message size." ] # [ doc = " @p length must be at least coap_pdu_parse_header_size(proto, data)." ] # [ doc = " This function returns @c 0 on error or a number greater than zero on success." ] # [ doc = "" ] # [ doc = " @param proto  Session's protocol" ] # [ doc = " @param data   The raw data to parse as CoAP PDU." ] # [ doc = " @param length The actual size of @p data." ] # [ doc = "" ] # [ doc = " @return       A value greater than zero on success or @c 0 on error." ] pub fn coap_pdu_parse_size ( proto : coap_proto_t , data : * const u8 , length : usize ) -> usize ; } extern "C" { # [ doc = " Decode the protocol specific header for the specified PDU." ] # [ doc = " @param pdu A newly received PDU." ] # [ doc = " @param proto The target wire protocol." ] # [ doc = " @return 1 for success or 0 on error." ] pub fn coap_pdu_parse_header ( pdu : * mut coap_pdu_t , proto : coap_proto_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Verify consistency in the given CoAP PDU structure and locate the data." ] # [ doc = " This function returns @c 0 on error or a number greater than zero on" ] # [ doc = " success." ] # [ doc = " This function only parses the token and options, up to the payload start" ] # [ doc = " marker." ] # [ doc = "" ] # [ doc = " @param pdu     The PDU structure to." ] # [ doc = "" ] # [ doc = " @return       1 on success or @c 0 on error." ] pub fn coap_pdu_parse_opt ( pdu : * mut coap_pdu_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Parses @p data into the CoAP PDU structure given in @p result." ] # [ doc = " The target pdu must be large enough to" ] # [ doc = " This function returns @c 0 on error or a number greater than zero on success." ] # [ doc = "" ] # [ doc = " @param proto   Session's protocol" ] # [ doc = " @param data    The raw data to parse as CoAP PDU." ] # [ doc = " @param length  The actual size of @p data." ] # [ doc = " @param pdu     The PDU structure to fill. Note that the structure must" ] # [ doc = "                provide space to hold at least the token and options" ] # [ doc = "                part of the message." ] # [ doc = "" ] # [ doc = " @return       1 on success or @c 0 on error." ] pub fn coap_pdu_parse ( proto : coap_proto_t , data : * const u8 , length : usize , pdu : * mut coap_pdu_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Adds token of length @p len to @p pdu." ] # [ doc = " Adding the token destroys any following contents of the pdu. Hence options" ] # [ doc = " and data must be added after coap_add_token() has been called. In @p pdu," ] # [ doc = " length is set to @p len + @c 4, and max_delta is set to @c 0. This function" ] # [ doc = " returns @c 0 on error or a value greater than zero on success." ] # [ doc = "" ] # [ doc = " @param pdu  The PDU where the token is to be added." ] # [ doc = " @param len  The length of the new token." ] # [ doc = " @param data The token to add." ] # [ doc = "" ] # [ doc = " @return     A value greater than zero on success, or @c 0 on error." ] pub fn coap_add_token ( pdu : * mut coap_pdu_t , len : usize , data : * const u8 ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Adds option of given type to pdu that is passed as first" ] # [ doc = " parameter." ] # [ doc = " coap_add_option() destroys the PDU's data, so coap_add_data() must be called" ] # [ doc = " after all options have been added. As coap_add_token() destroys the options" ] # [ doc = " following the token, the token must be added before coap_add_option() is" ] # [ doc = " called. This function returns the number of bytes written or @c 0 on error." ] pub fn coap_add_option ( pdu : * mut coap_pdu_t , type_ : u16 , len : usize , data : * const u8 ) -> usize ; } extern "C" { # [ doc = " Adds option of given type to pdu that is passed as first parameter, but does" ] # [ doc = " not write a value. It works like coap_add_option with respect to calling" ] # [ doc = " sequence (i.e. after token and before data). This function returns a memory" ] # [ doc = " address to which the option data has to be written before the PDU can be" ] # [ doc = " sent, or @c NULL on error." ] pub fn coap_add_option_later ( pdu : * mut coap_pdu_t , type_ : u16 , len : usize ) -> * mut u8 ; } extern "C" { # [ doc = " Adds given data to the pdu that is passed as first parameter. Note that the" ] # [ doc = " PDU's data is destroyed by coap_add_option(). coap_add_data() must be called" ] # [ doc = " only once per PDU, otherwise the result is undefined." ] pub fn coap_add_data ( pdu : * mut coap_pdu_t , len : usize , data : * const u8 ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Adds given data to the pdu that is passed as first parameter but does not" ] # [ doc = " copyt it. Note that the PDU's data is destroyed by coap_add_option()." ] # [ doc = " coap_add_data() must be have been called once for this PDU, otherwise the" ] # [ doc = " result is undefined." ] # [ doc = " The actual data must be copied at the returned location." ] pub fn coap_add_data_after ( pdu : * mut coap_pdu_t , len : usize ) -> * mut u8 ; } extern "C" { # [ doc = " Retrieves the length and data pointer of specified PDU. Returns 0 on error or" ] # [ doc = " 1 if *len and *data have correct values. Note that these values are destroyed" ] # [ doc = " with the pdu." ] pub fn coap_get_data ( pdu : * const coap_pdu_t , len : * mut usize , data : * mut * mut u8 ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Compose the protocol specific header for the specified PDU." ] # [ doc = " @param pdu A newly composed PDU." ] # [ doc = " @param proto The target wire protocol." ] # [ doc = " @return Number of header bytes prepended before pdu->token or 0 on error." ] pub fn coap_pdu_encode_header ( pdu : * mut coap_pdu_t , proto : coap_proto_t ) -> usize ; } # [ doc = " Use byte-oriented access methods here because sliding a complex struct" ] # [ doc = " coap_opt_t over the data buffer may cause bus error on certain platforms." ] pub type coap_opt_t = u8 ; # [ doc = " Representation of CoAP options." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct coap_option_t { pub delta : u16 , pub length : usize , pub value : * const u8 , } # [ test ] fn bindgen_test_layout_coap_option_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_option_t > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( coap_option_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_option_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( coap_option_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_option_t > ( ) ) ) . delta as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_option_t ) , "::" , stringify ! ( delta ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_option_t > ( ) ) ) . length as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( coap_option_t ) , "::" , stringify ! ( length ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_option_t > ( ) ) ) . value as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( coap_option_t ) , "::" , stringify ! ( value ) ) ) ; } extern "C" { # [ doc = " Parses the option pointed to by @p opt into @p result. This function returns" ] # [ doc = " the number of bytes that have been parsed, or @c 0 on error. An error is" ] # [ doc = " signaled when illegal delta or length values are encountered or when option" ] # [ doc = " parsing would result in reading past the option (i.e. beyond opt + length)." ] # [ doc = "" ] # [ doc = " @param opt    The beginning of the option to parse." ] # [ doc = " @param length The maximum length of @p opt." ] # [ doc = " @param result A pointer to the coap_option_t structure that is filled with" ] # [ doc = "               actual values iff coap_opt_parse() > 0." ] # [ doc = " @return       The number of bytes parsed or @c 0 on error." ] pub fn coap_opt_parse ( opt : * const coap_opt_t , length : usize , result : * mut coap_option_t ) -> usize ; } extern "C" { # [ doc = " Returns the size of the given option, taking into account a possible option" ] # [ doc = " jump." ] # [ doc = "" ] # [ doc = " @param opt An option jump or the beginning of the option." ] # [ doc = " @return    The number of bytes between @p opt and the end of the option" ] # [ doc = "            starting at @p opt. In case of an error, this function returns" ] # [ doc = "            @c 0 as options need at least one byte storage space." ] pub fn coap_opt_size ( opt : * const coap_opt_t ) -> usize ; } # [ doc = " Fixed-size vector we use for option filtering. It is large enough" ] # [ doc = " to hold COAP_OPT_FILTER_SHORT entries with an option number between" ] # [ doc = " 0 and 255, and COAP_OPT_FILTER_LONG entries with an option number" ] # [ doc = " between 256 and 65535. Its internal structure is" ] # [ doc = "" ] # [ doc = " @code" ] # [ doc = "struct {" ] # [ doc = "uint16_t mask;" ] # [ doc = "uint16_t long_opts[COAP_OPT_FILTER_LONG];" ] # [ doc = "uint8_t short_opts[COAP_OPT_FILTER_SHORT];" ] # [ doc = "}" ] # [ doc = " @endcode" ] # [ doc = "" ] # [ doc = " The first element contains a bit vector that indicates which fields" ] # [ doc = " in the remaining array are used. The first COAP_OPT_FILTER_LONG" ] # [ doc = " bits correspond to the long option types that are stored in the" ] # [ doc = " elements from index 1 to COAP_OPT_FILTER_LONG. The next" ] # [ doc = " COAP_OPT_FILTER_SHORT bits correspond to the short option types" ] # [ doc = " that are stored in the elements from index COAP_OPT_FILTER_LONG + 1" ] # [ doc = " to COAP_OPT_FILTER_LONG + COAP_OPT_FILTER_SHORT. The latter" ] # [ doc = " elements are treated as bytes." ] pub type coap_opt_filter_t = [ u16 ; 6usize ] ; extern "C" { # [ doc = " Sets the corresponding entry for @p type in @p filter. This" ] # [ doc = " function returns @c 1 if bit was set or @c 0 on error (i.e. when" ] # [ doc = " the given type does not fit in the filter)." ] # [ doc = "" ] # [ doc = " @param filter The filter object to change." ] # [ doc = " @param type   The type for which the bit should be set." ] # [ doc = "" ] # [ doc = " @return       @c 1 if bit was set, @c 0 otherwise." ] pub fn coap_option_filter_set ( filter : * mut u16 , type_ : u16 ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Clears the corresponding entry for @p type in @p filter. This" ] # [ doc = " function returns @c 1 if bit was set or @c 0 on error (i.e. when" ] # [ doc = " the given type does not fit in the filter)." ] # [ doc = "" ] # [ doc = " @param filter The filter object to change." ] # [ doc = " @param type   The type that should be cleared from the filter." ] # [ doc = "" ] # [ doc = " @return       @c 1 if bit was set, @c 0 otherwise." ] pub fn coap_option_filter_unset ( filter : * mut u16 , type_ : u16 ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Checks if @p type is contained in @p filter. This function returns" ] # [ doc = " @c 1 if found, @c 0 if not, or @c -1 on error (i.e. when the given" ] # [ doc = " type does not fit in the filter)." ] # [ doc = "" ] # [ doc = " @param filter The filter object to search." ] # [ doc = " @param type   The type to search for." ] # [ doc = "" ] # [ doc = " @return       @c 1 if @p type was found, @c 0 otherwise, or @c -1 on error." ] pub fn coap_option_filter_get ( filter : * mut u16 , type_ : u16 ) -> :: std :: os :: raw :: c_int ; } # [ doc = " Iterator to run through PDU options. This object must be" ] # [ doc = " initialized with coap_option_iterator_init(). Call" ] # [ doc = " coap_option_next() to walk through the list of options until" ] # [ doc = " coap_option_next() returns @c NULL." ] # [ doc = "" ] # [ doc = " @code" ] # [ doc = " coap_opt_t *option;" ] # [ doc = " coap_opt_iterator_t opt_iter;" ] # [ doc = " coap_option_iterator_init(pdu, &opt_iter, COAP_OPT_ALL);" ] # [ doc = "" ] # [ doc = " while ((option = coap_option_next(&opt_iter))) {" ] # [ doc = "   ... do something with option ..." ] # [ doc = " }" ] # [ doc = " @endcode" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct coap_opt_iterator_t { # [ doc = "< remaining length of PDU" ] pub length : usize , # [ doc = "< decoded option type" ] pub type_ : u16 , pub _bitfield_1 : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > , # [ doc = "< pointer to the unparsed next option" ] pub next_option : * mut coap_opt_t , # [ doc = "< option filter" ] pub filter : coap_opt_filter_t , } # [ test ] fn bindgen_test_layout_coap_opt_iterator_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_opt_iterator_t > ( ) , 40usize , concat ! ( "Size of: " , stringify ! ( coap_opt_iterator_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_opt_iterator_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( coap_opt_iterator_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_opt_iterator_t > ( ) ) ) . length as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_opt_iterator_t ) , "::" , stringify ! ( length ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_opt_iterator_t > ( ) ) ) . type_ as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( coap_opt_iterator_t ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_opt_iterator_t > ( ) ) ) . next_option as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( coap_opt_iterator_t ) , "::" , stringify ! ( next_option ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_opt_iterator_t > ( ) ) ) . filter as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( coap_opt_iterator_t ) , "::" , stringify ! ( filter ) ) ) ; } impl coap_opt_iterator_t { # [ inline ] pub fn bad ( & self ) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute ( self . _bitfield_1 . get ( 0usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_bad ( & mut self , val : :: std :: os :: raw :: c_uint ) { unsafe { let val : u32 = :: std :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 0usize , 1u8 , val as u64 ) } } # [ inline ] pub fn filtered ( & self ) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute ( self . _bitfield_1 . get ( 1usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_filtered ( & mut self , val : :: std :: os :: raw :: c_uint ) { unsafe { let val : u32 = :: std :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 1usize , 1u8 , val as u64 ) } } # [ inline ] pub fn new_bitfield_1 ( bad : :: std :: os :: raw :: c_uint , filtered : :: std :: os :: raw :: c_uint ) -> __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > = Default :: default ( ) ; __bindgen_bitfield_unit . set ( 0usize , 1u8 , { let bad : u32 = unsafe { :: std :: mem :: transmute ( bad ) } ; bad as u64 } ) ; __bindgen_bitfield_unit . set ( 1usize , 1u8 , { let filtered : u32 = unsafe { :: std :: mem :: transmute ( filtered ) } ; filtered as u64 } ) ; __bindgen_bitfield_unit } } extern "C" { # [ doc = " Initializes the given option iterator @p oi to point to the beginning of the" ] # [ doc = " @p pdu's option list. This function returns @p oi on success, @c NULL" ] # [ doc = " otherwise (i.e. when no options exist). Note that a length check on the" ] # [ doc = " option list must be performed before coap_option_iterator_init() is called." ] # [ doc = "" ] # [ doc = " @param pdu    The PDU the options of which should be walked through." ] # [ doc = " @param oi     An iterator object that will be initilized." ] # [ doc = " @param filter An optional option type filter." ] # [ doc = "               With @p type != @c COAP_OPT_ALL, coap_option_next()" ] # [ doc = "               will return only options matching this bitmask." ] # [ doc = "               Fence-post options @c 14, @c 28, @c 42, ... are always" ] # [ doc = "               skipped." ] # [ doc = "" ] # [ doc = " @return       The iterator object @p oi on success, @c NULL otherwise." ] pub fn coap_option_iterator_init ( pdu : * const coap_pdu_t , oi : * mut coap_opt_iterator_t , filter : * mut u16 ) -> * mut coap_opt_iterator_t ; } extern "C" { # [ doc = " Updates the iterator @p oi to point to the next option. This function returns" ] # [ doc = " a pointer to that option or @c NULL if no more options exist. The contents of" ] # [ doc = " @p oi will be updated. In particular, @c oi->n specifies the current option's" ] # [ doc = " ordinal number (counted from @c 1), @c oi->type is the option's type code," ] # [ doc = " and @c oi->option points to the beginning of the current option itself. When" ] # [ doc = " advanced past the last option, @c oi->option will be @c NULL." ] # [ doc = "" ] # [ doc = " Note that options are skipped whose corresponding bits in the filter" ] # [ doc = " specified with coap_option_iterator_init() are @c 0. Options with type codes" ] # [ doc = " that do not fit in this filter hence will always be returned." ] # [ doc = "" ] # [ doc = " @param oi The option iterator to update." ] # [ doc = "" ] # [ doc = " @return   The next option or @c NULL if no more options exist." ] pub fn coap_option_next ( oi : * mut coap_opt_iterator_t ) -> * mut coap_opt_t ; } extern "C" { # [ doc = " Retrieves the first option of type @p type from @p pdu. @p oi must point to a" ] # [ doc = " coap_opt_iterator_t object that will be initialized by this function to" ] # [ doc = " filter only options with code @p type. This function returns the first option" ] # [ doc = " with this type, or @c NULL if not found." ] # [ doc = "" ] # [ doc = " @param pdu  The PDU to parse for options." ] # [ doc = " @param type The option type code to search for." ] # [ doc = " @param oi   An iterator object to use." ] # [ doc = "" ] # [ doc = " @return     A pointer to the first option of type @p type, or @c NULL if" ] # [ doc = "             not found." ] pub fn coap_check_option ( pdu : * mut coap_pdu_t , type_ : u16 , oi : * mut coap_opt_iterator_t ) -> * mut coap_opt_t ; } extern "C" { # [ doc = " Encodes the given delta and length values into @p opt. This function returns" ] # [ doc = " the number of bytes that were required to encode @p delta and @p length or @c" ] # [ doc = " 0 on error. Note that the result indicates by how many bytes @p opt must be" ] # [ doc = " advanced to encode the option value." ] # [ doc = "" ] # [ doc = " @param opt    The option buffer space where @p delta and @p length are" ] # [ doc = "               written." ] # [ doc = " @param maxlen The maximum length of @p opt." ] # [ doc = " @param delta  The actual delta value to encode." ] # [ doc = " @param length The actual length value to encode." ] # [ doc = "" ] # [ doc = " @return       The number of bytes used or @c 0 on error." ] pub fn coap_opt_setheader ( opt : * mut coap_opt_t , maxlen : usize , delta : u16 , length : usize ) -> usize ; } extern "C" { # [ doc = " Compute storage bytes needed for an option with given @p delta and" ] # [ doc = " @p length" ] # [ doc = "" ] # [ doc = " @param delta  The option delta." ] # [ doc = " @param length The option length." ] # [ doc = "" ] # [ doc = " @return       The number of bytes required to encode this option." ] pub fn coap_opt_encode_size ( delta : u16 , length : usize ) -> usize ; } extern "C" { # [ doc = " Encodes option with given @p delta into @p opt. This function returns the" ] # [ doc = " number of bytes written to @p opt or @c 0 on error. This happens especially" ] # [ doc = " when @p opt does not provide sufficient space to store the option value," ] # [ doc = " delta, and option jumps when required." ] # [ doc = "" ] # [ doc = " @param opt    The option buffer space where @p val is written." ] # [ doc = " @param n      Maximum length of @p opt." ] # [ doc = " @param delta  The option delta." ] # [ doc = " @param val    The option value to copy into @p opt." ] # [ doc = " @param length The actual length of @p val." ] # [ doc = "" ] # [ doc = " @return       The number of bytes that have been written to @p opt or @c 0 on" ] # [ doc = "               error. The return value will always be less than @p n." ] pub fn coap_opt_encode ( opt : * mut coap_opt_t , n : usize , delta : u16 , val : * const u8 , length : usize ) -> usize ; } extern "C" { # [ doc = " Decodes the delta value of the next option. This function returns the number" ] # [ doc = " of bytes read or @c 0 on error. The caller of this function must ensure that" ] # [ doc = " it does not read over the boundaries of @p opt (e.g. by calling" ] # [ doc = " coap_opt_check_delta()." ] # [ doc = "" ] # [ doc = " @param opt The option to examine." ] # [ doc = "" ] # [ doc = " @return    The number of bytes read or @c 0 on error." ] pub fn coap_opt_delta ( opt : * const coap_opt_t ) -> u16 ; } extern "C" { # [ doc = " Returns the length of the given option. @p opt must point to an option jump" ] # [ doc = " or the beginning of the option. This function returns @c 0 when @p opt is not" ] # [ doc = " an option or the actual length of @p opt (which can be @c 0 as well)." ] # [ doc = "" ] # [ doc = " @note {The rationale for using @c 0 in case of an error is that in most" ] # [ doc = " contexts, the result of this function is used to skip the next" ] # [ doc = " coap_opt_length() bytes.}" ] # [ doc = "" ] # [ doc = " @param opt  The option whose length should be returned." ] # [ doc = "" ] # [ doc = " @return     The option's length or @c 0 when undefined." ] pub fn coap_opt_length ( opt : * const coap_opt_t ) -> u16 ; } extern "C" { # [ doc = " Returns a pointer to the value of the given option. @p opt must point to an" ] # [ doc = " option jump or the beginning of the option. This function returns @c NULL if" ] # [ doc = " @p opt is not a valid option." ] # [ doc = "" ] # [ doc = " @param opt The option whose value should be returned." ] # [ doc = "" ] # [ doc = " @return    A pointer to the option value or @c NULL on error." ] pub fn coap_opt_value ( opt : * const coap_opt_t ) -> * const u8 ; } # [ doc = " Representation of chained list of CoAP options to install." ] # [ doc = "" ] # [ doc = " @code" ] # [ doc = " coap_optlist_t *optlist_chain = NULL;" ] # [ doc = " coap_pdu_t *pdu = coap_new_pdu(session);" ] # [ doc = "" ] # [ doc = " ... other set up code ..." ] # [ doc = " coap_insert_optlist(&optlist_chain, coap_new_optlist(COAP_OPTION_OBSERVE," ] # [ doc = "                    COAP_OBSERVE_ESTABLISH, NULL));" ] # [ doc = "" ] # [ doc = " coap_add_optlist_pdu(pdu, &optlist_chain);" ] # [ doc = " ... other code ..." ] # [ doc = " coap_delete_optlist(optlist_chain);" ] # [ doc = " @endcode" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct coap_optlist_t { # [ doc = "< next entry in the optlist chain" ] pub next : * mut coap_optlist_t , # [ doc = "< the option number (no delta coding)" ] pub number : u16 , # [ doc = "< the option value length" ] pub length : usize , # [ doc = "< the option data" ] pub data : * mut u8 , } # [ test ] fn bindgen_test_layout_coap_optlist_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_optlist_t > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( coap_optlist_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_optlist_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( coap_optlist_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_optlist_t > ( ) ) ) . next as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_optlist_t ) , "::" , stringify ! ( next ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_optlist_t > ( ) ) ) . number as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( coap_optlist_t ) , "::" , stringify ! ( number ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_optlist_t > ( ) ) ) . length as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( coap_optlist_t ) , "::" , stringify ! ( length ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_optlist_t > ( ) ) ) . data as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( coap_optlist_t ) , "::" , stringify ! ( data ) ) ) ; } extern "C" { # [ doc = " Create a new optlist entry." ] # [ doc = "" ] # [ doc = " @param number    The option number (COAP_OPTION_*)" ] # [ doc = " @param length    The option length" ] # [ doc = " @param data      The option value data" ] # [ doc = "" ] # [ doc = " @return          A pointer to the new optlist entry, or @c NULL if error" ] pub fn coap_new_optlist ( number : u16 , length : usize , data : * const u8 ) -> * mut coap_optlist_t ; } extern "C" { # [ doc = " The current optlist of @p optlist_chain is first sorted (as per RFC7272" ] # [ doc = " ordering requirements) and then added to the @p pdu." ] # [ doc = "" ] # [ doc = " @param pdu  The pdu to add the options to from the chain list" ] # [ doc = " @param optlist_chain The chained list of optlist to add to the pdu" ] # [ doc = "" ] # [ doc = " @return     @c 1 if succesful or @c 0 if failure;" ] pub fn coap_add_optlist_pdu ( pdu : * mut coap_pdu_t , optlist_chain : * mut * mut coap_optlist_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Adds @p optlist to the given @p optlist_chain. The optlist_chain variable" ] # [ doc = " be set to NULL before the initial call to coap_insert_optlist()." ] # [ doc = " The optlist_chain will need to be deleted using coap_delete_optlist()" ] # [ doc = " when no longer required." ] # [ doc = "" ] # [ doc = " @param optlist_chain The chain to add optlist to" ] # [ doc = " @param optlist  The optlist to add to the queue" ] # [ doc = "" ] # [ doc = " @return         @c 1 if successful, @c 0 otherwise." ] pub fn coap_insert_optlist ( optlist_chain : * mut * mut coap_optlist_t , optlist : * mut coap_optlist_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Removes all entries from the @p optlist_chain, freeing off their" ] # [ doc = " memory usage." ] # [ doc = "" ] # [ doc = " @param optlist_chain The optlist chain to remove all the entries from" ] pub fn coap_delete_optlist ( optlist_chain : * mut coap_optlist_t ) ; } pub type max_align_t = u128 ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct UT_hash_bucket { pub hh_head : * mut UT_hash_handle , pub count : :: std :: os :: raw :: c_uint , pub expand_mult : :: std :: os :: raw :: c_uint , } # [ test ] fn bindgen_test_layout_UT_hash_bucket ( ) { assert_eq ! ( :: std :: mem :: size_of :: < UT_hash_bucket > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( UT_hash_bucket ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < UT_hash_bucket > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( UT_hash_bucket ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < UT_hash_bucket > ( ) ) ) . hh_head as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( UT_hash_bucket ) , "::" , stringify ! ( hh_head ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < UT_hash_bucket > ( ) ) ) . count as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( UT_hash_bucket ) , "::" , stringify ! ( count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < UT_hash_bucket > ( ) ) ) . expand_mult as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( UT_hash_bucket ) , "::" , stringify ! ( expand_mult ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct UT_hash_table { pub buckets : * mut UT_hash_bucket , pub num_buckets : :: std :: os :: raw :: c_uint , pub log2_num_buckets : :: std :: os :: raw :: c_uint , pub num_items : :: std :: os :: raw :: c_uint , pub tail : * mut UT_hash_handle , pub hho : isize , pub ideal_chain_maxlen : :: std :: os :: raw :: c_uint , pub nonideal_items : :: std :: os :: raw :: c_uint , pub ineff_expands : :: std :: os :: raw :: c_uint , pub noexpand : :: std :: os :: raw :: c_uint , pub signature : u32 , } # [ test ] fn bindgen_test_layout_UT_hash_table ( ) { assert_eq ! ( :: std :: mem :: size_of :: < UT_hash_table > ( ) , 64usize , concat ! ( "Size of: " , stringify ! ( UT_hash_table ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < UT_hash_table > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( UT_hash_table ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < UT_hash_table > ( ) ) ) . buckets as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( UT_hash_table ) , "::" , stringify ! ( buckets ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < UT_hash_table > ( ) ) ) . num_buckets as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( UT_hash_table ) , "::" , stringify ! ( num_buckets ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < UT_hash_table > ( ) ) ) . log2_num_buckets as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( UT_hash_table ) , "::" , stringify ! ( log2_num_buckets ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < UT_hash_table > ( ) ) ) . num_items as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( UT_hash_table ) , "::" , stringify ! ( num_items ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < UT_hash_table > ( ) ) ) . tail as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( UT_hash_table ) , "::" , stringify ! ( tail ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < UT_hash_table > ( ) ) ) . hho as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( UT_hash_table ) , "::" , stringify ! ( hho ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < UT_hash_table > ( ) ) ) . ideal_chain_maxlen as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( UT_hash_table ) , "::" , stringify ! ( ideal_chain_maxlen ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < UT_hash_table > ( ) ) ) . nonideal_items as * const _ as usize } , 44usize , concat ! ( "Offset of field: " , stringify ! ( UT_hash_table ) , "::" , stringify ! ( nonideal_items ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < UT_hash_table > ( ) ) ) . ineff_expands as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( UT_hash_table ) , "::" , stringify ! ( ineff_expands ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < UT_hash_table > ( ) ) ) . noexpand as * const _ as usize } , 52usize , concat ! ( "Offset of field: " , stringify ! ( UT_hash_table ) , "::" , stringify ! ( noexpand ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < UT_hash_table > ( ) ) ) . signature as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( UT_hash_table ) , "::" , stringify ! ( signature ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct UT_hash_handle { pub tbl : * mut UT_hash_table , pub prev : * mut :: std :: os :: raw :: c_void , pub next : * mut :: std :: os :: raw :: c_void , pub hh_prev : * mut UT_hash_handle , pub hh_next : * mut UT_hash_handle , pub key : * const :: std :: os :: raw :: c_void , pub keylen : :: std :: os :: raw :: c_uint , pub hashv : :: std :: os :: raw :: c_uint , } # [ test ] fn bindgen_test_layout_UT_hash_handle ( ) { assert_eq ! ( :: std :: mem :: size_of :: < UT_hash_handle > ( ) , 56usize , concat ! ( "Size of: " , stringify ! ( UT_hash_handle ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < UT_hash_handle > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( UT_hash_handle ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < UT_hash_handle > ( ) ) ) . tbl as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( UT_hash_handle ) , "::" , stringify ! ( tbl ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < UT_hash_handle > ( ) ) ) . prev as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( UT_hash_handle ) , "::" , stringify ! ( prev ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < UT_hash_handle > ( ) ) ) . next as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( UT_hash_handle ) , "::" , stringify ! ( next ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < UT_hash_handle > ( ) ) ) . hh_prev as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( UT_hash_handle ) , "::" , stringify ! ( hh_prev ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < UT_hash_handle > ( ) ) ) . hh_next as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( UT_hash_handle ) , "::" , stringify ! ( hh_next ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < UT_hash_handle > ( ) ) ) . key as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( UT_hash_handle ) , "::" , stringify ! ( key ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < UT_hash_handle > ( ) ) ) . keylen as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( UT_hash_handle ) , "::" , stringify ! ( keylen ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < UT_hash_handle > ( ) ) ) . hashv as * const _ as usize } , 52usize , concat ! ( "Offset of field: " , stringify ! ( UT_hash_handle ) , "::" , stringify ! ( hashv ) ) ) ; } # [ doc = " Abstraction of a fixed point number that can be used where necessary instead" ] # [ doc = " of a float.  1,000 fractional bits equals one integer" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct coap_fixed_point_t { # [ doc = "< Integer part of fixed point variable" ] pub integer_part : u16 , # [ doc = "< Fractional part of fixed point variable" ] # [ doc = "1/1000 (3 points) precision" ] pub fractional_part : u16 , } # [ test ] fn bindgen_test_layout_coap_fixed_point_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_fixed_point_t > ( ) , 4usize , concat ! ( "Size of: " , stringify ! ( coap_fixed_point_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_fixed_point_t > ( ) , 2usize , concat ! ( "Alignment of " , stringify ! ( coap_fixed_point_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_fixed_point_t > ( ) ) ) . integer_part as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_fixed_point_t ) , "::" , stringify ! ( integer_part ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_fixed_point_t > ( ) ) ) . fractional_part as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( coap_fixed_point_t ) , "::" , stringify ! ( fractional_part ) ) ) ; } pub type coap_session_type_t = u8 ; pub type coap_session_state_t = u8 ; # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct coap_session_t { # [ doc = "< protocol used" ] pub proto : coap_proto_t , # [ doc = "< client or server side socket" ] pub type_ : coap_session_type_t , # [ doc = "< current state of relationaship with peer" ] pub state : coap_session_state_t , # [ doc = "< reference count from queues" ] pub ref_ : :: std :: os :: raw :: c_uint , # [ doc = "< overhead of TLS layer" ] pub tls_overhead : :: std :: os :: raw :: c_uint , # [ doc = "< path or CSM mtu" ] pub mtu : :: std :: os :: raw :: c_uint , # [ doc = "< optional local interface address" ] pub local_if : coap_address_t , pub hh : UT_hash_handle , # [ doc = "< key: remote/local address info" ] pub addr_info : coap_addr_tuple_t , # [ doc = "< interface index" ] pub ifindex : :: std :: os :: raw :: c_int , # [ doc = "< socket object for the session, if any" ] pub sock : coap_socket_t , # [ doc = "< session's endpoint" ] pub endpoint : * mut coap_endpoint_t , # [ doc = "< session's context" ] pub context : * mut coap_context_t , # [ doc = "< security parameters" ] pub tls : * mut :: std :: os :: raw :: c_void , # [ doc = "< the last message id that was used in this session" ] pub tx_mid : u16 , # [ doc = "< Active CON request sent" ] pub con_active : u8 , # [ doc = "< the last keepalive message id that was used in this session" ] pub last_ping_mid : coap_tid_t , # [ doc = "< list of delayed messages waiting to be sent" ] pub delayqueue : * mut coap_queue_t , # [ doc = "< if > 0 indicates number of bytes already written from the pdu at the head of sendqueue" ] pub partial_write : usize , # [ doc = "< storage space for header of incoming message header" ] pub read_header : [ u8 ; 8usize ] , # [ doc = "< if > 0 indicates number of bytes already read for an incoming message" ] pub partial_read : usize , # [ doc = "< incomplete incoming pdu" ] pub partial_pdu : * mut coap_pdu_t , pub last_rx_tx : coap_tick_t , pub last_tx_rst : coap_tick_t , pub last_ping : coap_tick_t , pub last_pong : coap_tick_t , pub csm_tx : coap_tick_t , pub psk_identity : * mut u8 , pub psk_identity_len : usize , pub psk_key : * mut u8 , pub psk_key_len : usize , # [ doc = "< application-specific data" ] pub app : * mut :: std :: os :: raw :: c_void , # [ doc = "< maximum re-transmit count (default 4)" ] pub max_retransmit : :: std :: os :: raw :: c_uint , # [ doc = "< timeout waiting for ack (default 2 secs)" ] pub ack_timeout : coap_fixed_point_t , # [ doc = "< ack random factor backoff (default 1.5)" ] pub ack_random_factor : coap_fixed_point_t , # [ doc = "< dtls setup retry counter" ] pub dtls_timeout_count : :: std :: os :: raw :: c_uint , # [ doc = "< Tracking any (D)TLS events on this sesison" ] pub dtls_event : :: std :: os :: raw :: c_int , } # [ test ] fn bindgen_test_layout_coap_session_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_session_t > ( ) , 376usize , concat ! ( "Size of: " , stringify ! ( coap_session_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_session_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( coap_session_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . proto as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( proto ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . type_ as * const _ as usize } , 1usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . state as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( state ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . ref_ as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( ref_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . tls_overhead as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( tls_overhead ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . mtu as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( mtu ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . local_if as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( local_if ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . hh as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( hh ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . addr_info as * const _ as usize } , 104usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( addr_info ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . ifindex as * const _ as usize } , 168usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( ifindex ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . sock as * const _ as usize } , 176usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( sock ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . endpoint as * const _ as usize } , 200usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( endpoint ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . context as * const _ as usize } , 208usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( context ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . tls as * const _ as usize } , 216usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( tls ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . tx_mid as * const _ as usize } , 224usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( tx_mid ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . con_active as * const _ as usize } , 226usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( con_active ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . last_ping_mid as * const _ as usize } , 228usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( last_ping_mid ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . delayqueue as * const _ as usize } , 232usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( delayqueue ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . partial_write as * const _ as usize } , 240usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( partial_write ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . read_header as * const _ as usize } , 248usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( read_header ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . partial_read as * const _ as usize } , 256usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( partial_read ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . partial_pdu as * const _ as usize } , 264usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( partial_pdu ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . last_rx_tx as * const _ as usize } , 272usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( last_rx_tx ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . last_tx_rst as * const _ as usize } , 280usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( last_tx_rst ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . last_ping as * const _ as usize } , 288usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( last_ping ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . last_pong as * const _ as usize } , 296usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( last_pong ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . csm_tx as * const _ as usize } , 304usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( csm_tx ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . psk_identity as * const _ as usize } , 312usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( psk_identity ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . psk_identity_len as * const _ as usize } , 320usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( psk_identity_len ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . psk_key as * const _ as usize } , 328usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( psk_key ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . psk_key_len as * const _ as usize } , 336usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( psk_key_len ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . app as * const _ as usize } , 344usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( app ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . max_retransmit as * const _ as usize } , 352usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( max_retransmit ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . ack_timeout as * const _ as usize } , 356usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( ack_timeout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . ack_random_factor as * const _ as usize } , 360usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( ack_random_factor ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . dtls_timeout_count as * const _ as usize } , 364usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( dtls_timeout_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_session_t > ( ) ) ) . dtls_event as * const _ as usize } , 368usize , concat ! ( "Offset of field: " , stringify ! ( coap_session_t ) , "::" , stringify ! ( dtls_event ) ) ) ; } extern "C" { # [ doc = " Increment reference counter on a session." ] # [ doc = "" ] # [ doc = " @param session The CoAP session." ] # [ doc = " @return same as session" ] pub fn coap_session_reference ( session : * mut coap_session_t ) -> * mut coap_session_t ; } extern "C" { # [ doc = " Decrement reference counter on a session." ] # [ doc = " Note that the session may be deleted as a result and should not be used" ] # [ doc = " after this call." ] # [ doc = "" ] # [ doc = " @param session The CoAP session." ] pub fn coap_session_release ( session : * mut coap_session_t ) ; } extern "C" { # [ doc = " Stores @p data with the given session. This function overwrites any value" ] # [ doc = " that has previously been stored with @p session." ] pub fn coap_session_set_app_data ( session : * mut coap_session_t , data : * mut :: std :: os :: raw :: c_void ) ; } extern "C" { # [ doc = " Returns any application-specific data that has been stored with @p" ] # [ doc = " session using the function coap_session_set_app_data(). This function will" ] # [ doc = " return @c NULL if no data has been stored." ] pub fn coap_session_get_app_data ( session : * const coap_session_t ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [ doc = " Notify session that it has failed." ] # [ doc = "" ] # [ doc = " @param session The CoAP session." ] # [ doc = " @param reason The reason why the session was disconnected." ] pub fn coap_session_disconnected ( session : * mut coap_session_t , reason : coap_nack_reason_t ) ; } extern "C" { # [ doc = " Notify session transport has just connected and CSM exchange can now start." ] # [ doc = "" ] # [ doc = " @param session The CoAP session." ] pub fn coap_session_send_csm ( session : * mut coap_session_t ) ; } extern "C" { # [ doc = " Notify session that it has just connected or reconnected." ] # [ doc = "" ] # [ doc = " @param session The CoAP session." ] pub fn coap_session_connected ( session : * mut coap_session_t ) ; } extern "C" { # [ doc = " Set the session MTU. This is the maximum message size that can be sent," ] # [ doc = " excluding IP and UDP overhead." ] # [ doc = "" ] # [ doc = " @param session The CoAP session." ] # [ doc = " @param mtu maximum message size" ] pub fn coap_session_set_mtu ( session : * mut coap_session_t , mtu : :: std :: os :: raw :: c_uint ) ; } extern "C" { # [ doc = " Get maximum acceptable PDU size" ] # [ doc = "" ] # [ doc = " @param session The CoAP session." ] # [ doc = " @return maximum PDU size, not including header (but including token)." ] pub fn coap_session_max_pdu_size ( session : * const coap_session_t ) -> usize ; } extern "C" { # [ doc = " Creates a new client session to the designated server." ] # [ doc = " @param ctx The CoAP context." ] # [ doc = " @param local_if Address of local interface. It is recommended to use NULL to let the operating system choose a suitable local interface. If an address is specified, the port number should be zero, which means that a free port is automatically selected." ] # [ doc = " @param server The server's address. If the port number is zero, the default port for the protocol will be used." ] # [ doc = " @param proto Protocol." ] # [ doc = "" ] # [ doc = " @return A new CoAP session or NULL if failed. Call coap_session_release to free." ] pub fn coap_new_client_session ( ctx : * mut coap_context_t , local_if : * const coap_address_t , server : * const coap_address_t , proto : coap_proto_t ) -> * mut coap_session_t ; } extern "C" { # [ doc = " Creates a new client session to the designated server with PSK credentials" ] # [ doc = " @param ctx The CoAP context." ] # [ doc = " @param local_if Address of local interface. It is recommended to use NULL to let the operating system choose a suitable local interface. If an address is specified, the port number should be zero, which means that a free port is automatically selected." ] # [ doc = " @param server The server's address. If the port number is zero, the default port for the protocol will be used." ] # [ doc = " @param proto Protocol." ] # [ doc = " @param identity PSK client identity" ] # [ doc = " @param key PSK shared key" ] # [ doc = " @param key_len PSK shared key length" ] # [ doc = "" ] # [ doc = " @return A new CoAP session or NULL if failed. Call coap_session_release to free." ] pub fn coap_new_client_session_psk ( ctx : * mut coap_context_t , local_if : * const coap_address_t , server : * const coap_address_t , proto : coap_proto_t , identity : * const :: std :: os :: raw :: c_char , key : * const u8 , key_len : :: std :: os :: raw :: c_uint ) -> * mut coap_session_t ; } extern "C" { # [ doc = " Creates a new client session to the designated server with PKI credentials" ] # [ doc = " @param ctx The CoAP context." ] # [ doc = " @param local_if Address of local interface. It is recommended to use NULL to" ] # [ doc = "                 let the operating system choose a suitable local interface." ] # [ doc = "                 If an address is specified, the port number should be zero," ] # [ doc = "                 which means that a free port is automatically selected." ] # [ doc = " @param server The server's address. If the port number is zero, the default" ] # [ doc = "               port for the protocol will be used." ] # [ doc = " @param proto CoAP Protocol." ] # [ doc = " @param setup_data PKI parameters." ] # [ doc = "" ] # [ doc = " @return A new CoAP session or NULL if failed. Call coap_session_release()" ] # [ doc = "         to free." ] pub fn coap_new_client_session_pki ( ctx : * mut coap_context_t , local_if : * const coap_address_t , server : * const coap_address_t , proto : coap_proto_t , setup_data : * mut coap_dtls_pki_t ) -> * mut coap_session_t ; } extern "C" { # [ doc = " Creates a new server session for the specified endpoint." ] # [ doc = " @param ctx The CoAP context." ] # [ doc = " @param ep An endpoint where an incoming connection request is pending." ] # [ doc = "" ] # [ doc = " @return A new CoAP session or NULL if failed. Call coap_session_release to free." ] pub fn coap_new_server_session ( ctx : * mut coap_context_t , ep : * mut coap_endpoint_t ) -> * mut coap_session_t ; } extern "C" { # [ doc = " Function interface for datagram data transmission. This function returns" ] # [ doc = " the number of bytes that have been transmitted, or a value less than zero" ] # [ doc = " on error." ] # [ doc = "" ] # [ doc = " @param session          Session to send data on." ] # [ doc = " @param data             The data to send." ] # [ doc = " @param datalen          The actual length of @p data." ] # [ doc = "" ] # [ doc = " @return                 The number of bytes written on success, or a value" ] # [ doc = "                         less than zero on error." ] pub fn coap_session_send ( session : * mut coap_session_t , data : * const u8 , datalen : usize ) -> isize ; } extern "C" { # [ doc = " Function interface for stream data transmission. This function returns" ] # [ doc = " the number of bytes that have been transmitted, or a value less than zero" ] # [ doc = " on error. The number of bytes written may be less than datalen because of" ] # [ doc = " congestion control." ] # [ doc = "" ] # [ doc = " @param session          Session to send data on." ] # [ doc = " @param data             The data to send." ] # [ doc = " @param datalen          The actual length of @p data." ] # [ doc = "" ] # [ doc = " @return                 The number of bytes written on success, or a value" ] # [ doc = "                         less than zero on error." ] pub fn coap_session_write ( session : * mut coap_session_t , data : * const u8 , datalen : usize ) -> isize ; } extern "C" { # [ doc = " Send a pdu according to the session's protocol. This function returns" ] # [ doc = " the number of bytes that have been transmitted, or a value less than zero" ] # [ doc = " on error." ] # [ doc = "" ] # [ doc = " @param session          Session to send pdu on." ] # [ doc = " @param pdu              The pdu to send." ] # [ doc = "" ] # [ doc = " @return                 The number of bytes written on success, or a value" ] # [ doc = "                         less than zero on error." ] pub fn coap_session_send_pdu ( session : * mut coap_session_t , pdu : * mut coap_pdu_t ) -> isize ; } extern "C" { # [ doc = " @ingroup logging" ] # [ doc = " Get session description." ] # [ doc = "" ] # [ doc = " @param session  The CoAP session." ] # [ doc = " @return description string." ] pub fn coap_session_str ( session : * const coap_session_t ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn coap_session_delay_pdu ( session : * mut coap_session_t , pdu : * mut coap_pdu_t , node : * mut coap_queue_t ) -> isize ; } extern "C" { # [ doc = " Create a new endpoint for communicating with peers." ] # [ doc = "" ] # [ doc = " @param context        The coap context that will own the new endpoint" ] # [ doc = " @param listen_addr    Address the endpoint will listen for incoming requests on or originate outgoing requests from. Use NULL to specify that no incoming request will be accepted and use a random endpoint." ] # [ doc = " @param proto          Protocol used on this endpoint" ] pub fn coap_new_endpoint ( context : * mut coap_context_t , listen_addr : * const coap_address_t , proto : coap_proto_t ) -> * mut coap_endpoint_t ; } extern "C" { # [ doc = " Set the endpoint's default MTU. This is the maximum message size that can be" ] # [ doc = " sent, excluding IP and UDP overhead." ] # [ doc = "" ] # [ doc = " @param endpoint The CoAP endpoint." ] # [ doc = " @param mtu maximum message size" ] pub fn coap_endpoint_set_default_mtu ( endpoint : * mut coap_endpoint_t , mtu : :: std :: os :: raw :: c_uint ) ; } extern "C" { pub fn coap_free_endpoint ( ep : * mut coap_endpoint_t ) ; } extern "C" { # [ doc = " @ingroup logging" ] # [ doc = " Get endpoint description." ] # [ doc = "" ] # [ doc = " @param endpoint  The CoAP endpoint." ] # [ doc = " @return description string." ] pub fn coap_endpoint_str ( endpoint : * const coap_endpoint_t ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " Lookup the server session for the packet received on an endpoint, or create" ] # [ doc = " a new one." ] # [ doc = "" ] # [ doc = " @param endpoint Active endpoint the packet was received on." ] # [ doc = " @param packet Received packet." ] # [ doc = " @param now The current time in ticks." ] # [ doc = " @return The CoAP session or @c NULL if error." ] pub fn coap_endpoint_get_session ( endpoint : * mut coap_endpoint_t , packet : * const coap_packet_t , now : coap_tick_t ) -> * mut coap_session_t ; } extern "C" { # [ doc = " Create a new DTLS session for the @p session." ] # [ doc = " Note: the @p session is released if no DTLS server session can be created." ] # [ doc = "" ] # [ doc = " @ingroup dtls_internal" ] # [ doc = "" ] # [ doc = " @param session   Session to add DTLS session to" ] # [ doc = " @param now       The current time in ticks." ] # [ doc = "" ] # [ doc = " @return CoAP session or @c NULL if error." ] pub fn coap_session_new_dtls_session ( session : * mut coap_session_t , now : coap_tick_t ) -> * mut coap_session_t ; } extern "C" { pub fn coap_session_get_by_peer ( ctx : * mut coap_context_t , remote_addr : * const coap_address_t , ifindex : :: std :: os :: raw :: c_int ) -> * mut coap_session_t ; } extern "C" { pub fn coap_session_free ( session : * mut coap_session_t ) ; } extern "C" { pub fn coap_session_mfree ( session : * mut coap_session_t ) ; } extern "C" { # [ doc = " Set the CoAP maximum retransmit count before failure" ] # [ doc = "" ] # [ doc = " Number of message retransmissions before message sending is stopped" ] # [ doc = "" ] # [ doc = " @param session The CoAP session." ] # [ doc = " @param value The value to set to. The default is 4 and should not normally" ] # [ doc = "              get changed." ] pub fn coap_session_set_max_retransmit ( session : * mut coap_session_t , value : :: std :: os :: raw :: c_uint ) ; } extern "C" { # [ doc = " Set the CoAP initial ack response timeout before the next re-transmit" ] # [ doc = "" ] # [ doc = " Number of seconds when to expect an ACK or a response to an" ] # [ doc = " outstanding CON message." ] # [ doc = "" ] # [ doc = " @param session The CoAP session." ] # [ doc = " @param value The value to set to. The default is 2 and should not normally" ] # [ doc = "              get changed." ] pub fn coap_session_set_ack_timeout ( session : * mut coap_session_t , value : coap_fixed_point_t ) ; } extern "C" { # [ doc = " Set the CoAP ack randomize factor" ] # [ doc = "" ] # [ doc = " A factor that is used to randomize the wait time before a message" ] # [ doc = " is retransmitted to prevent synchronization effects." ] # [ doc = "" ] # [ doc = " @param session The CoAP session." ] # [ doc = " @param value The value to set to. The default is 1.5 and should not normally" ] # [ doc = "              get changed." ] pub fn coap_session_set_ack_random_factor ( session : * mut coap_session_t , value : coap_fixed_point_t ) ; } extern "C" { # [ doc = " Get the CoAP maximum retransmit before failure" ] # [ doc = "" ] # [ doc = " Number of message retransmissions before message sending is stopped" ] # [ doc = "" ] # [ doc = " @param session The CoAP session." ] # [ doc = "" ] # [ doc = " @return Current maximum retransmit value" ] pub fn coap_session_get_max_transmit ( session : * mut coap_session_t ) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [ doc = " Get the CoAP initial ack response timeout before the next re-transmit" ] # [ doc = "" ] # [ doc = " Number of seconds when to expect an ACK or a response to an" ] # [ doc = " outstanding CON message." ] # [ doc = "" ] # [ doc = " @param session The CoAP session." ] # [ doc = "" ] # [ doc = " @return Current ack response timeout value" ] pub fn coap_session_get_ack_timeout ( session : * mut coap_session_t ) -> coap_fixed_point_t ; } extern "C" { # [ doc = " Get the CoAP ack randomize factor" ] # [ doc = "" ] # [ doc = " A factor that is used to randomize the wait time before a message" ] # [ doc = " is retransmitted to prevent synchronization effects." ] # [ doc = "" ] # [ doc = " @param session The CoAP session." ] # [ doc = "" ] # [ doc = " @return Current ack randomize value" ] pub fn coap_session_get_ack_random_factor ( session : * mut coap_session_t ) -> coap_fixed_point_t ; } extern "C" { # [ doc = " Send a ping message for the session." ] # [ doc = " @param session The CoAP session." ] # [ doc = "" ] # [ doc = " @return COAP_INVALID_TID if there is an error" ] pub fn coap_session_send_ping ( session : * mut coap_session_t ) -> coap_tid_t ; } # [ doc = " Queue entry" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct coap_queue_t { pub next : * mut coap_queue_t , # [ doc = "< when to send PDU for the next time" ] pub t : coap_tick_t , # [ doc = "< retransmission counter, will be removed" ] # [ doc = "    when zero" ] pub retransmit_cnt : :: std :: os :: raw :: c_uchar , # [ doc = "< the randomized timeout value" ] pub timeout : :: std :: os :: raw :: c_uint , # [ doc = "< the CoAP session" ] pub session : * mut coap_session_t , # [ doc = "< CoAP transaction id" ] pub id : coap_tid_t , # [ doc = "< the CoAP PDU to send" ] pub pdu : * mut coap_pdu_t , } # [ test ] fn bindgen_test_layout_coap_queue_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_queue_t > ( ) , 48usize , concat ! ( "Size of: " , stringify ! ( coap_queue_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_queue_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( coap_queue_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_queue_t > ( ) ) ) . next as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_queue_t ) , "::" , stringify ! ( next ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_queue_t > ( ) ) ) . t as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( coap_queue_t ) , "::" , stringify ! ( t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_queue_t > ( ) ) ) . retransmit_cnt as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( coap_queue_t ) , "::" , stringify ! ( retransmit_cnt ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_queue_t > ( ) ) ) . timeout as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( coap_queue_t ) , "::" , stringify ! ( timeout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_queue_t > ( ) ) ) . session as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( coap_queue_t ) , "::" , stringify ! ( session ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_queue_t > ( ) ) ) . id as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( coap_queue_t ) , "::" , stringify ! ( id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_queue_t > ( ) ) ) . pdu as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( coap_queue_t ) , "::" , stringify ! ( pdu ) ) ) ; } extern "C" { # [ doc = " Adds @p node to given @p queue, ordered by variable t in @p node." ] # [ doc = "" ] # [ doc = " @param queue Queue to add to." ] # [ doc = " @param node Node entry to add to Queue." ] # [ doc = "" ] # [ doc = " @return @c 1 added to queue, @c 0 failure." ] pub fn coap_insert_node ( queue : * mut * mut coap_queue_t , node : * mut coap_queue_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Destroys specified @p node." ] # [ doc = "" ] # [ doc = " @param node Node entry to remove." ] # [ doc = "" ] # [ doc = " @return @c 1 node deleted from queue, @c 0 failure." ] pub fn coap_delete_node ( node : * mut coap_queue_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Removes all items from given @p queue and frees the allocated storage." ] # [ doc = "" ] # [ doc = " @param queue The queue to delete." ] pub fn coap_delete_all ( queue : * mut coap_queue_t ) ; } extern "C" { # [ doc = " Creates a new node suitable for adding to the CoAP sendqueue." ] # [ doc = "" ] # [ doc = " @return New node entry, or @c NULL if failure." ] pub fn coap_new_node ( ) -> * mut coap_queue_t ; } # [ doc = " Response handler that is used as call-back in coap_context_t." ] # [ doc = "" ] # [ doc = " @param context CoAP session." ] # [ doc = " @param session CoAP session." ] # [ doc = " @param sent The PDU that was transmitted." ] # [ doc = " @param received The PDU that was received." ] # [ doc = " @param id CoAP transaction ID." ] pub type coap_response_handler_t = :: std :: option :: Option < unsafe extern "C" fn ( context : * mut coap_context_t , session : * mut coap_session_t , sent : * mut coap_pdu_t , received : * mut coap_pdu_t , id : coap_tid_t ) > ; # [ doc = " Negative Acknowedge handler that is used as call-back in coap_context_t." ] # [ doc = "" ] # [ doc = " @param context CoAP session." ] # [ doc = " @param session CoAP session." ] # [ doc = " @param sent The PDU that was transmitted." ] # [ doc = " @param reason The reason for the NACK." ] # [ doc = " @param id CoAP transaction ID." ] pub type coap_nack_handler_t = :: std :: option :: Option < unsafe extern "C" fn ( context : * mut coap_context_t , session : * mut coap_session_t , sent : * mut coap_pdu_t , reason : coap_nack_reason_t , id : coap_tid_t ) > ; # [ doc = " Recieved Ping handler that is used as call-back in coap_context_t." ] # [ doc = "" ] # [ doc = " @param context CoAP session." ] # [ doc = " @param session CoAP session." ] # [ doc = " @param received The PDU that was received." ] # [ doc = " @param id CoAP transaction ID." ] pub type coap_ping_handler_t = :: std :: option :: Option < unsafe extern "C" fn ( context : * mut coap_context_t , session : * mut coap_session_t , received : * mut coap_pdu_t , id : coap_tid_t ) > ; # [ doc = " Recieved Pong handler that is used as call-back in coap_context_t." ] # [ doc = "" ] # [ doc = " @param context CoAP session." ] # [ doc = " @param session CoAP session." ] # [ doc = " @param received The PDU that was received." ] # [ doc = " @param id CoAP transaction ID." ] pub type coap_pong_handler_t = :: std :: option :: Option < unsafe extern "C" fn ( context : * mut coap_context_t , session : * mut coap_session_t , received : * mut coap_pdu_t , id : coap_tid_t ) > ; # [ doc = " The CoAP stack's global state is stored in a coap_context_t object." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct coap_context_t { pub known_options : coap_opt_filter_t , # [ doc = "< hash table or list of known" ] # [ doc = "resources" ] pub resources : * mut coap_resource_t , # [ doc = "< can be used for handling" ] # [ doc = "unknown resources" ] pub unknown_resource : * mut coap_resource_t , # [ doc = " list of asynchronous transactions" ] pub async_state : * mut coap_async_state_t , # [ doc = " The time stamp in the first element of the sendqeue is relative" ] # [ doc = " to sendqueue_basetime." ] pub sendqueue_basetime : coap_tick_t , pub sendqueue : * mut coap_queue_t , # [ doc = "< the endpoints used for listening" ] pub endpoint : * mut coap_endpoint_t , # [ doc = "< client sessions" ] pub sessions : * mut coap_session_t , pub response_handler : coap_response_handler_t , pub nack_handler : coap_nack_handler_t , pub ping_handler : coap_ping_handler_t , pub pong_handler : coap_pong_handler_t , # [ doc = " Callback function that is used to signal events to the" ] # [ doc = " application.  This field is set by coap_set_event_handler()." ] pub handle_event : coap_event_handler_t , pub network_send : :: std :: option :: Option < unsafe extern "C" fn ( sock : * mut coap_socket_t , session : * const coap_session_t , data : * const u8 , datalen : usize ) -> isize > , pub network_read : :: std :: option :: Option < unsafe extern "C" fn ( sock : * mut coap_socket_t , packet : * mut coap_packet_t ) -> isize > , pub get_client_psk : :: std :: option :: Option < unsafe extern "C" fn ( session : * const coap_session_t , hint : * const u8 , hint_len : usize , identity : * mut u8 , identity_len : * mut usize , max_identity_len : usize , psk : * mut u8 , max_psk_len : usize ) -> usize > , pub get_server_psk : :: std :: option :: Option < unsafe extern "C" fn ( session : * const coap_session_t , identity : * const u8 , identity_len : usize , psk : * mut u8 , max_psk_len : usize ) -> usize > , pub get_server_hint : :: std :: option :: Option < unsafe extern "C" fn ( session : * const coap_session_t , hint : * mut u8 , max_hint_len : usize ) -> usize > , pub dtls_context : * mut :: std :: os :: raw :: c_void , pub psk_hint : * mut u8 , pub psk_hint_len : usize , pub psk_key : * mut u8 , pub psk_key_len : usize , # [ doc = "< Number of seconds of inactivity after which an unused session will be closed. 0 means use default." ] pub session_timeout : :: std :: os :: raw :: c_uint , # [ doc = "< Maximum number of simultaneous unused sessions per endpoint. 0 means no maximum." ] pub max_idle_sessions : :: std :: os :: raw :: c_uint , # [ doc = "< Maximum number of simultaneous negotating sessions per endpoint. 0 means use default." ] pub max_handshake_sessions : :: std :: os :: raw :: c_uint , # [ doc = "< Minimum inactivity time before sending a ping message. 0 means disabled." ] pub ping_timeout : :: std :: os :: raw :: c_uint , # [ doc = "< Timeout for waiting for a CSM from the remote side. 0 means disabled." ] pub csm_timeout : :: std :: os :: raw :: c_uint , # [ doc = "< application-specific data" ] pub app : * mut :: std :: os :: raw :: c_void , } # [ test ] fn bindgen_test_layout_coap_context_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_context_t > ( ) , 224usize , concat ! ( "Size of: " , stringify ! ( coap_context_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_context_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( coap_context_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . known_options as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( known_options ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . resources as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( resources ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . unknown_resource as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( unknown_resource ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . async_state as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( async_state ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . sendqueue_basetime as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( sendqueue_basetime ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . sendqueue as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( sendqueue ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . endpoint as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( endpoint ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . sessions as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( sessions ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . response_handler as * const _ as usize } , 72usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( response_handler ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . nack_handler as * const _ as usize } , 80usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( nack_handler ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . ping_handler as * const _ as usize } , 88usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( ping_handler ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . pong_handler as * const _ as usize } , 96usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( pong_handler ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . handle_event as * const _ as usize } , 104usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( handle_event ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . network_send as * const _ as usize } , 112usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( network_send ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . network_read as * const _ as usize } , 120usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( network_read ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . get_client_psk as * const _ as usize } , 128usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( get_client_psk ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . get_server_psk as * const _ as usize } , 136usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( get_server_psk ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . get_server_hint as * const _ as usize } , 144usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( get_server_hint ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . dtls_context as * const _ as usize } , 152usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( dtls_context ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . psk_hint as * const _ as usize } , 160usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( psk_hint ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . psk_hint_len as * const _ as usize } , 168usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( psk_hint_len ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . psk_key as * const _ as usize } , 176usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( psk_key ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . psk_key_len as * const _ as usize } , 184usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( psk_key_len ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . session_timeout as * const _ as usize } , 192usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( session_timeout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . max_idle_sessions as * const _ as usize } , 196usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( max_idle_sessions ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . max_handshake_sessions as * const _ as usize } , 200usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( max_handshake_sessions ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . ping_timeout as * const _ as usize } , 204usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( ping_timeout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . csm_timeout as * const _ as usize } , 208usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( csm_timeout ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_context_t > ( ) ) ) . app as * const _ as usize } , 216usize , concat ! ( "Offset of field: " , stringify ! ( coap_context_t ) , "::" , stringify ! ( app ) ) ) ; } extern "C" { # [ doc = " Set sendqueue_basetime in the given context object @p ctx to @p now. This" ] # [ doc = " function returns the number of elements in the queue head that have timed" ] # [ doc = " out." ] pub fn coap_adjust_basetime ( ctx : * mut coap_context_t , now : coap_tick_t ) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [ doc = " Returns the next pdu to send without removing from sendqeue." ] pub fn coap_peek_next ( context : * mut coap_context_t ) -> * mut coap_queue_t ; } extern "C" { # [ doc = " Returns the next pdu to send and removes it from the sendqeue." ] pub fn coap_pop_next ( context : * mut coap_context_t ) -> * mut coap_queue_t ; } extern "C" { # [ doc = " Creates a new coap_context_t object that will hold the CoAP stack status." ] pub fn coap_new_context ( listen_addr : * const coap_address_t ) -> * mut coap_context_t ; } extern "C" { # [ doc = " Set the context's default PSK hint and/or key for a server." ] # [ doc = "" ] # [ doc = " @param context The current coap_context_t object." ] # [ doc = " @param hint    The default PSK server hint sent to a client. If @p NULL, PSK" ] # [ doc = "                authentication is disabled. Empty string is a valid hint." ] # [ doc = " @param key     The default PSK key. If @p NULL, PSK authentication will fail." ] # [ doc = " @param key_len The default PSK key's length. If @p 0, PSK authentication will" ] # [ doc = "                fail." ] # [ doc = "" ] # [ doc = " @return @c 1 if successful, else @c 0." ] pub fn coap_context_set_psk ( context : * mut coap_context_t , hint : * const :: std :: os :: raw :: c_char , key : * const u8 , key_len : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Set the context's default PKI information for a server." ] # [ doc = "" ] # [ doc = " @param context        The current coap_context_t object." ] # [ doc = " @param setup_data     If @p NULL, PKI authentication will fail. Certificate" ] # [ doc = "                       information required." ] # [ doc = "" ] # [ doc = " @return @c 1 if successful, else @c 0." ] pub fn coap_context_set_pki ( context : * mut coap_context_t , setup_data : * mut coap_dtls_pki_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Set the context's default Root CA information for a client or server." ] # [ doc = "" ] # [ doc = " @param context        The current coap_context_t object." ] # [ doc = " @param ca_file        If not @p NULL, is the full path name of a PEM encoded" ] # [ doc = "                       file containing all the Root CAs to be used." ] # [ doc = " @param ca_dir         If not @p NULL, points to a directory containing PEM" ] # [ doc = "                       encoded files containing all the Root CAs to be used." ] # [ doc = "" ] # [ doc = " @return @c 1 if successful, else @c 0." ] pub fn coap_context_set_pki_root_cas ( context : * mut coap_context_t , ca_file : * const :: std :: os :: raw :: c_char , ca_dir : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Set the context keepalive timer for sessions." ] # [ doc = " A keepalive message will be sent after if a session has been inactive," ] # [ doc = " i.e. no packet sent or received, for the given number of seconds." ] # [ doc = " For unreliable protocols, a CoAP Empty message will be sent. If a" ] # [ doc = " CoAP RST is not received, the CoAP Empty messages will get resent based" ] # [ doc = " on the Confirmable retry parameters until there is a failure timeout," ] # [ doc = " at which point the session will be considered as disconnected." ] # [ doc = " For reliable protocols, a CoAP PING message will be sent. If a CoAP PONG" ] # [ doc = " has not been received before the next PING is due to be sent, the session" ] # [ doc = " will be considered as disconnected." ] # [ doc = "" ] # [ doc = " @param context        The coap_context_t object." ] # [ doc = " @param seconds        Number of seconds for the inactivity timer, or zero" ] # [ doc = "                       to disable CoAP-level keepalive messages." ] # [ doc = "" ] # [ doc = " @return 1 if successful, else 0" ] pub fn coap_context_set_keepalive ( context : * mut coap_context_t , seconds : :: std :: os :: raw :: c_uint ) ; } extern "C" { # [ doc = " Get the libcoap internal file descriptor for using in an application's" ] # [ doc = " select() or returned as an event in an application's epoll_wait() call." ] # [ doc = "" ] # [ doc = " @param context        The coap_context_t object." ] # [ doc = "" ] # [ doc = " @return The libcoap file descriptor or @c -1 if epoll is not available." ] pub fn coap_context_get_coap_fd ( context : * mut coap_context_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " CoAP stack context must be released with coap_free_context(). This function" ] # [ doc = " clears all entries from the receive queue and send queue and deletes the" ] # [ doc = " resources that have been registered with @p context, and frees the attached" ] # [ doc = " endpoints." ] # [ doc = "" ] # [ doc = " @param context The current coap_context_t object to free off." ] pub fn coap_free_context ( context : * mut coap_context_t ) ; } extern "C" { # [ doc = " Stores @p data with the given CoAP context. This function" ] # [ doc = " overwrites any value that has previously been stored with @p" ] # [ doc = " context." ] # [ doc = "" ] # [ doc = " @param context The CoAP context." ] # [ doc = " @param data The data to store with wih the context. Note that this data" ] # [ doc = "             must be valid during the lifetime of @p context." ] pub fn coap_set_app_data ( context : * mut coap_context_t , data : * mut :: std :: os :: raw :: c_void ) ; } extern "C" { # [ doc = " Returns any application-specific data that has been stored with @p" ] # [ doc = " context using the function coap_set_app_data(). This function will" ] # [ doc = " return @c NULL if no data has been stored." ] # [ doc = "" ] # [ doc = " @param context The CoAP context." ] # [ doc = "" ] # [ doc = " @return The data previously stored or @c NULL if not data stored." ] pub fn coap_get_app_data ( context : * const coap_context_t ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [ doc = " Creates a new ACK PDU with specified error @p code. The options specified by" ] # [ doc = " the filter expression @p opts will be copied from the original request" ] # [ doc = " contained in @p request. Unless @c SHORT_ERROR_RESPONSE was defined at build" ] # [ doc = " time, the textual reason phrase for @p code will be added as payload, with" ] # [ doc = " Content-Type @c 0." ] # [ doc = " This function returns a pointer to the new response message, or @c NULL on" ] # [ doc = " error. The storage allocated for the new message must be relased with" ] # [ doc = " coap_free()." ] # [ doc = "" ] # [ doc = " @param request Specification of the received (confirmable) request." ] # [ doc = " @param code    The error code to set." ] # [ doc = " @param opts    An option filter that specifies which options to copy from" ] # [ doc = "                the original request in @p node." ] # [ doc = "" ] # [ doc = " @return        A pointer to the new message or @c NULL on error." ] pub fn coap_new_error_response ( request : * mut coap_pdu_t , code : :: std :: os :: raw :: c_uchar , opts : * mut u16 ) -> * mut coap_pdu_t ; } extern "C" { # [ doc = " Sends an error response with code @p code for request @p request to @p dst." ] # [ doc = " @p opts will be passed to coap_new_error_response() to copy marked options" ] # [ doc = " from the request. This function returns the transaction id if the message was" ] # [ doc = " sent, or @c COAP_INVALID_TID otherwise." ] # [ doc = "" ] # [ doc = " @param session         The CoAP session." ] # [ doc = " @param request         The original request to respond to." ] # [ doc = " @param code            The response code." ] # [ doc = " @param opts            A filter that specifies the options to copy from the" ] # [ doc = "                        @p request." ] # [ doc = "" ] # [ doc = " @return                The transaction id if the message was sent, or @c" ] # [ doc = "                        COAP_INVALID_TID otherwise." ] pub fn coap_send_error ( session : * mut coap_session_t , request : * mut coap_pdu_t , code : :: std :: os :: raw :: c_uchar , opts : * mut u16 ) -> coap_tid_t ; } extern "C" { # [ doc = " Helper funktion to create and send a message with @p type (usually ACK or" ] # [ doc = " RST). This function returns @c COAP_INVALID_TID when the message was not" ] # [ doc = " sent, a valid transaction id otherwise." ] # [ doc = "" ] # [ doc = " @param session         The CoAP session." ] # [ doc = " @param request         The request that should be responded to." ] # [ doc = " @param type            Which type to set." ] # [ doc = " @return                transaction id on success or @c COAP_INVALID_TID" ] # [ doc = "                        otherwise." ] pub fn coap_send_message_type ( session : * mut coap_session_t , request : * mut coap_pdu_t , type_ : :: std :: os :: raw :: c_uchar ) -> coap_tid_t ; } extern "C" { # [ doc = " Sends an ACK message with code @c 0 for the specified @p request to @p dst." ] # [ doc = " This function returns the corresponding transaction id if the message was" ] # [ doc = " sent or @c COAP_INVALID_TID on error." ] # [ doc = "" ] # [ doc = " @param session         The CoAP session." ] # [ doc = " @param request         The request to be acknowledged." ] # [ doc = "" ] # [ doc = " @return                The transaction id if ACK was sent or @c" ] # [ doc = "                        COAP_INVALID_TID on error." ] pub fn coap_send_ack ( session : * mut coap_session_t , request : * mut coap_pdu_t ) -> coap_tid_t ; } extern "C" { # [ doc = " Sends a CoAP message to given peer. The memory that is" ] # [ doc = " allocated by pdu will be released by coap_send()." ] # [ doc = " The caller must not use the pdu after calling coap_send()." ] # [ doc = "" ] # [ doc = " @param session         The CoAP session." ] # [ doc = " @param pdu             The CoAP PDU to send." ] # [ doc = "" ] # [ doc = " @return                The message id of the sent message or @c" ] # [ doc = "                        COAP_INVALID_TID on error." ] pub fn coap_send ( session : * mut coap_session_t , pdu : * mut coap_pdu_t ) -> coap_tid_t ; } extern "C" { # [ doc = " Handles retransmissions of confirmable messages" ] # [ doc = "" ] # [ doc = " @param context      The CoAP context." ] # [ doc = " @param node         The node to retransmit." ] # [ doc = "" ] # [ doc = " @return             The message id of the sent message or @c" ] # [ doc = "                     COAP_INVALID_TID on error." ] pub fn coap_retransmit ( context : * mut coap_context_t , node : * mut coap_queue_t ) -> coap_tid_t ; } extern "C" { # [ doc = " For applications with their own message loop, send all pending retransmits and" ] # [ doc = " return the list of sockets with events to wait for and the next timeout" ] # [ doc = " The application should call coap_read, then coap_write again when any condition below is true:" ] # [ doc = " - data is available on any of the sockets with the COAP_SOCKET_WANT_READ" ] # [ doc = " - an incoming connection is pending in the listen queue and the COAP_SOCKET_WANT_ACCEPT flag is set" ] # [ doc = " - at least some data can be written without blocking on any of the sockets with the COAP_SOCKET_WANT_WRITE flag set" ] # [ doc = " - a connection event occured (success or failure) and the COAP_SOCKET_WANT_CONNECT flag is set" ] # [ doc = " - the timeout has expired" ] # [ doc = " Before calling coap_read or coap_write again, the application should position COAP_SOCKET_CAN_READ and COAP_SOCKET_CAN_WRITE flags as applicable." ] # [ doc = "" ] # [ doc = " @param ctx The CoAP context" ] # [ doc = " @param sockets array of socket descriptors, filled on output" ] # [ doc = " @param max_sockets size of socket array." ] # [ doc = " @param num_sockets pointer to the number of valid entries in the socket arrays on output" ] # [ doc = " @param now Current time." ] # [ doc = "" ] # [ doc = " @return timeout as maxmimum number of milliseconds that the application should wait for network events or 0 if the application should wait forever." ] pub fn coap_write ( ctx : * mut coap_context_t , sockets : * mut * mut coap_socket_t , max_sockets : :: std :: os :: raw :: c_uint , num_sockets : * mut :: std :: os :: raw :: c_uint , now : coap_tick_t ) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [ doc = " For applications with their own message loop, reads all data from the network." ] # [ doc = "" ] # [ doc = " @param ctx The CoAP context" ] # [ doc = " @param now Current time" ] pub fn coap_read ( ctx : * mut coap_context_t , now : coap_tick_t ) ; } extern "C" { # [ doc = " The main message processing loop." ] # [ doc = "" ] # [ doc = " @param ctx The CoAP context" ] # [ doc = " @param timeout_ms Minimum number of milliseconds to wait for new packets" ] # [ doc = "                   before returning. If COAP_RUN_BLOCK, the call will block" ] # [ doc = "                   until at least one new packet is received. If" ] # [ doc = "                   COAP_RUN_NONBLOCK, the function will return immediately" ] # [ doc = "                   following without waiting for any new input not already" ] # [ doc = "                   available." ] # [ doc = "" ] # [ doc = " @return Number of milliseconds spent in coap_run_once, or @c -1 if there" ] # [ doc = "         was an error" ] pub fn coap_run_once ( ctx : * mut coap_context_t , timeout_ms : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Any now timed out delayed packet is transmitted, along with any packets" ] # [ doc = " associated with requested observable response." ] # [ doc = "" ] # [ doc = " In addition, it returns when the next expected I/O is expected to take place" ] # [ doc = " (e.g. a packet retransmit)." ] # [ doc = "" ] # [ doc = " Note: If epoll support is compiled into libcoap, coap_io_prepare_epoll() must" ] # [ doc = " be used instead of coap_write()." ] # [ doc = "" ] # [ doc = " Internal function." ] # [ doc = "" ] # [ doc = " @param ctx The CoAP context" ] # [ doc = " @param now Current time." ] # [ doc = "" ] # [ doc = " @return timeout Maxmimum number of milliseconds that can be used by a" ] # [ doc = "                 epoll_wait() to wait for network events or 0 if wait should be" ] # [ doc = "                 forever." ] pub fn coap_io_prepare_epoll ( ctx : * mut coap_context_t , now : coap_tick_t ) -> :: std :: os :: raw :: c_uint ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct epoll_event { _unused : [ u8 ; 0 ] , } extern "C" { # [ doc = " Process all the epoll events" ] # [ doc = "" ] # [ doc = " Internal function" ] # [ doc = "" ] # [ doc = " @param ctx    The current CoAP context." ] # [ doc = " @param events The list of events returned from an epoll_wait() call." ] # [ doc = " @param nevents The number of events." ] # [ doc = "" ] pub fn coap_io_do_events ( ctx : * mut coap_context_t , events : * mut epoll_event , nevents : usize ) ; } extern "C" { # [ doc = " Parses and interprets a CoAP datagram with context @p ctx. This function" ] # [ doc = " returns @c 0 if the datagram was handled, or a value less than zero on" ] # [ doc = " error." ] # [ doc = "" ] # [ doc = " @param ctx    The current CoAP context." ] # [ doc = " @param session The current CoAP session." ] # [ doc = " @param data The received packet'd data." ] # [ doc = " @param data_len The received packet'd data length." ] # [ doc = "" ] # [ doc = " @return       @c 0 if message was handled successfully, or less than zero on" ] # [ doc = "               error." ] pub fn coap_handle_dgram ( ctx : * mut coap_context_t , session : * mut coap_session_t , data : * mut u8 , data_len : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Invokes the event handler of @p context for the given @p event and" ] # [ doc = " @p data." ] # [ doc = "" ] # [ doc = " @param context The CoAP context whose event handler is to be called." ] # [ doc = " @param event   The event to deliver." ] # [ doc = " @param session The session related to @p event." ] # [ doc = " @return The result from the associated event handler or 0 if none was" ] # [ doc = " registered." ] pub fn coap_handle_event ( context : * mut coap_context_t , event : coap_event_t , session : * mut coap_session_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " This function removes the element with given @p id from the list given list." ] # [ doc = " If @p id was found, @p node is updated to point to the removed element. Note" ] # [ doc = " that the storage allocated by @p node is @b not released. The caller must do" ] # [ doc = " this manually using coap_delete_node(). This function returns @c 1 if the" ] # [ doc = " element with id @p id was found, @c 0 otherwise. For a return value of @c 0," ] # [ doc = " the contents of @p node is undefined." ] # [ doc = "" ] # [ doc = " @param queue The queue to search for @p id." ] # [ doc = " @param session The session to look for." ] # [ doc = " @param id    The transaction id to look for." ] # [ doc = " @param node  If found, @p node is updated to point to the removed node. You" ] # [ doc = "              must release the storage pointed to by @p node manually." ] # [ doc = "" ] # [ doc = " @return      @c 1 if @p id was found, @c 0 otherwise." ] pub fn coap_remove_from_queue ( queue : * mut * mut coap_queue_t , session : * mut coap_session_t , id : coap_tid_t , node : * mut * mut coap_queue_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn coap_wait_ack ( context : * mut coap_context_t , session : * mut coap_session_t , node : * mut coap_queue_t ) -> coap_tid_t ; } extern "C" { # [ doc = " Retrieves transaction from the queue." ] # [ doc = "" ] # [ doc = " @param queue The transaction queue to be searched." ] # [ doc = " @param session The session to find." ] # [ doc = " @param id    The transaction id to find." ] # [ doc = "" ] # [ doc = " @return      A pointer to the transaction object or @c NULL if not found." ] pub fn coap_find_transaction ( queue : * mut coap_queue_t , session : * mut coap_session_t , id : coap_tid_t ) -> * mut coap_queue_t ; } extern "C" { # [ doc = " Cancels all outstanding messages for session @p session that have the specified" ] # [ doc = " token." ] # [ doc = "" ] # [ doc = " @param context      The context in use." ] # [ doc = " @param session      Session of the messages to remove." ] # [ doc = " @param token        Message token." ] # [ doc = " @param token_length Actual length of @p token." ] pub fn coap_cancel_all_messages ( context : * mut coap_context_t , session : * mut coap_session_t , token : * const u8 , token_length : usize ) ; } extern "C" { # [ doc = " Cancels all outstanding messages for session @p session." ] # [ doc = "" ] # [ doc = " @param context      The context in use." ] # [ doc = " @param session      Session of the messages to remove." ] # [ doc = " @param reason       The reasion for the session cancellation" ] pub fn coap_cancel_session_messages ( context : * mut coap_context_t , session : * mut coap_session_t , reason : coap_nack_reason_t ) ; } extern "C" { # [ doc = " Dispatches the PDUs from the receive queue in given context." ] pub fn coap_dispatch ( context : * mut coap_context_t , session : * mut coap_session_t , pdu : * mut coap_pdu_t ) ; } extern "C" { # [ doc = " Returns 1 if there are no messages to send or to dispatch in the context's" ] # [ doc = " queues." ] pub fn coap_can_exit ( context : * mut coap_context_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Verifies that @p pdu contains no unknown critical options. Options must be" ] # [ doc = " registered at @p ctx, using the function coap_register_option(). A basic set" ] # [ doc = " of options is registered automatically by coap_new_context(). This function" ] # [ doc = " returns @c 1 if @p pdu is ok, @c 0 otherwise. The given filter object @p" ] # [ doc = " unknown will be updated with the unknown options. As only @c COAP_MAX_OPT" ] # [ doc = " options can be signalled this way, remaining options must be examined" ] # [ doc = " manually." ] # [ doc = "" ] # [ doc = " @code" ] # [ doc = "coap_opt_filter_t f = COAP_OPT_NONE;" ] # [ doc = "coap_opt_iterator_t opt_iter;" ] # [ doc = "" ] # [ doc = "if (coap_option_check_critical(ctx, pdu, f) == 0) {" ] # [ doc = "coap_option_iterator_init(pdu, &opt_iter, f);" ] # [ doc = "" ] # [ doc = "while (coap_option_next(&opt_iter)) {" ] # [ doc = "if (opt_iter.type & 0x01) {" ] # [ doc = "... handle unknown critical option in opt_iter ..." ] # [ doc = "}" ] # [ doc = "}" ] # [ doc = "}" ] # [ doc = "@endcode" ] # [ doc = "" ] # [ doc = " @param ctx      The context where all known options are registered." ] # [ doc = " @param pdu      The PDU to check." ] # [ doc = " @param unknown  The output filter that will be updated to indicate the" ] # [ doc = "                 unknown critical options found in @p pdu." ] # [ doc = "" ] # [ doc = " @return         @c 1 if everything was ok, @c 0 otherwise." ] pub fn coap_option_check_critical ( ctx : * mut coap_context_t , pdu : * mut coap_pdu_t , unknown : * mut u16 ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Creates a new response for given @p request with the contents of @c" ] # [ doc = " .well-known/core. The result is NULL on error or a newly allocated PDU that" ] # [ doc = " must be either sent with coap_sent() or released by coap_delete_pdu()." ] # [ doc = "" ] # [ doc = " @param context The current coap context to use." ] # [ doc = " @param session The CoAP session." ] # [ doc = " @param request The request for @c .well-known/core ." ] # [ doc = "" ] # [ doc = " @return        A new 2.05 response for @c .well-known/core or NULL on error." ] pub fn coap_wellknown_response ( context : * mut coap_context_t , session : * mut coap_session_t , request : * mut coap_pdu_t ) -> * mut coap_pdu_t ; } extern "C" { # [ doc = " Calculates the initial timeout based on the session CoAP transmission" ] # [ doc = " parameters 'ack_timeout', 'ack_random_factor', and COAP_TICKS_PER_SECOND." ] # [ doc = " The calculation requires 'ack_timeout' and 'ack_random_factor' to be in" ] # [ doc = " Qx.FRAC_BITS fixed point notation, whereas the passed parameter @p r" ] # [ doc = " is interpreted as the fractional part of a Q0.MAX_BITS random value." ] # [ doc = "" ] # [ doc = " @param session session timeout is associated with" ] # [ doc = " @param r  random value as fractional part of a Q0.MAX_BITS fixed point" ] # [ doc = "           value" ] # [ doc = " @return   COAP_TICKS_PER_SECOND * 'ack_timeout' *" ] # [ doc = "           (1 + ('ack_random_factor' - 1) * r)" ] pub fn coap_calc_timeout ( session : * mut coap_session_t , r : :: std :: os :: raw :: c_uchar ) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [ doc = " Function interface for joining a multicast group for listening" ] # [ doc = "" ] # [ doc = " @param ctx   The current context" ] # [ doc = " @param groupname The name of the group that is to be joined for listening" ] # [ doc = "" ] # [ doc = " @return       0 on success, -1 on error" ] pub fn coap_join_mcast_group ( ctx : * mut coap_context_t , groupname : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } # [ doc = " @defgroup coap_async Asynchronous Messaging" ] # [ doc = " @{" ] # [ doc = " Structure for managing asynchronous state of CoAP resources. A" ] # [ doc = " coap_resource_t object holds a list of coap_async_state_t objects that can be" ] # [ doc = " used to generate a separate response in case a result of an operation cannot" ] # [ doc = " be delivered in time, or the resource has been explicitly subscribed to with" ] # [ doc = " the option @c observe." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct coap_async_state_t { # [ doc = "< holds the flags to control behaviour" ] pub flags : :: std :: os :: raw :: c_uchar , # [ doc = " Holds the internal time when the object was registered with a" ] # [ doc = " resource. This field will be updated whenever" ] # [ doc = " coap_register_async() is called for a specific resource." ] pub created : coap_tick_t , # [ doc = " This field can be used to register opaque application data with the" ] # [ doc = " asynchronous state object." ] pub appdata : * mut :: std :: os :: raw :: c_void , # [ doc = "< transaction session" ] pub session : * mut coap_session_t , # [ doc = "< transaction id" ] pub id : coap_tid_t , # [ doc = "< internally used for linking" ] pub next : * mut coap_async_state_t , # [ doc = "< length of the token" ] pub tokenlen : usize , # [ doc = "< the token to use in a response" ] pub token : [ u8 ; 8usize ] , } # [ test ] fn bindgen_test_layout_coap_async_state_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_async_state_t > ( ) , 64usize , concat ! ( "Size of: " , stringify ! ( coap_async_state_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_async_state_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( coap_async_state_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_async_state_t > ( ) ) ) . flags as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_async_state_t ) , "::" , stringify ! ( flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_async_state_t > ( ) ) ) . created as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( coap_async_state_t ) , "::" , stringify ! ( created ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_async_state_t > ( ) ) ) . appdata as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( coap_async_state_t ) , "::" , stringify ! ( appdata ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_async_state_t > ( ) ) ) . session as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( coap_async_state_t ) , "::" , stringify ! ( session ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_async_state_t > ( ) ) ) . id as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( coap_async_state_t ) , "::" , stringify ! ( id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_async_state_t > ( ) ) ) . next as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( coap_async_state_t ) , "::" , stringify ! ( next ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_async_state_t > ( ) ) ) . tokenlen as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( coap_async_state_t ) , "::" , stringify ! ( tokenlen ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_async_state_t > ( ) ) ) . token as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( coap_async_state_t ) , "::" , stringify ! ( token ) ) ) ; } extern "C" { # [ doc = " Allocates a new coap_async_state_t object and fills its fields according to" ] # [ doc = " the given @p request. The @p flags are used to control generation of empty" ] # [ doc = " ACK responses to stop retransmissions and to release registered @p data when" ] # [ doc = " the resource is deleted by coap_free_async(). This function returns a pointer" ] # [ doc = " to the registered coap_async_t object or @c NULL on error. Note that this" ] # [ doc = " function will return @c NULL in case that an object with the same identifier" ] # [ doc = " is already registered." ] # [ doc = "" ] # [ doc = " @param context  The context to use." ] # [ doc = " @param session  The session that is used for asynchronous transmissions." ] # [ doc = " @param request  The request that is handled asynchronously." ] # [ doc = " @param flags    Flags to control state management." ] # [ doc = " @param data     Opaque application data to register. Note that the" ] # [ doc = "                 storage occupied by @p data is released on destruction" ] # [ doc = "                 only if flag COAP_ASYNC_RELEASE_DATA is set." ] # [ doc = "" ] # [ doc = " @return         A pointer to the registered coap_async_state_t object or @c" ] # [ doc = "                 NULL in case of an error." ] pub fn coap_register_async ( context : * mut coap_context_t , session : * mut coap_session_t , request : * mut coap_pdu_t , flags : :: std :: os :: raw :: c_uchar , data : * mut :: std :: os :: raw :: c_void ) -> * mut coap_async_state_t ; } extern "C" { # [ doc = " Removes the state object identified by @p id from @p context. The removed" ] # [ doc = " object is returned in @p s, if found. Otherwise, @p s is undefined. This" ] # [ doc = " function returns @c 1 if the object was removed, @c 0 otherwise. Note that" ] # [ doc = " the storage allocated for the stored object is not released by this" ] # [ doc = " functions. You will have to call coap_free_async() to do so." ] # [ doc = "" ] # [ doc = " @param context The context where the async object is registered." ] # [ doc = " @param session  The session that is used for asynchronous transmissions." ] # [ doc = " @param id      The identifier of the asynchronous transaction." ] # [ doc = " @param s       Will be set to the object identified by @p id after removal." ] # [ doc = "" ] # [ doc = " @return        @c 1 if object was removed and @p s updated, or @c 0 if no" ] # [ doc = "                object was found with the given id. @p s is valid only if the" ] # [ doc = "                return value is @c 1." ] pub fn coap_remove_async ( context : * mut coap_context_t , session : * mut coap_session_t , id : coap_tid_t , s : * mut * mut coap_async_state_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Releases the memory that was allocated by coap_async_state_init() for the" ] # [ doc = " object @p s. The registered application data will be released automatically" ] # [ doc = " if COAP_ASYNC_RELEASE_DATA is set." ] # [ doc = "" ] # [ doc = " @param state The object to delete." ] pub fn coap_free_async ( state : * mut coap_async_state_t ) ; } extern "C" { # [ doc = " Retrieves the object identified by @p id from the list of asynchronous" ] # [ doc = " transactions that are registered with @p context. This function returns a" ] # [ doc = " pointer to that object or @c NULL if not found." ] # [ doc = "" ] # [ doc = " @param context The context where the asynchronous objects are registered" ] # [ doc = "                with." ] # [ doc = " @param session  The session that is used for asynchronous transmissions." ] # [ doc = " @param id      The id of the object to retrieve." ] # [ doc = "" ] # [ doc = " @return        A pointer to the object identified by @p id or @c NULL if" ] # [ doc = "                not found." ] pub fn coap_find_async ( context : * mut coap_context_t , session : * mut coap_session_t , id : coap_tid_t ) -> * mut coap_async_state_t ; } extern "C" { pub fn coap_fls ( i : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn coap_flsll ( i : :: std :: os :: raw :: c_longlong ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Decodes multiple-length byte sequences. @p buf points to an input byte" ] # [ doc = " sequence of length @p length. Returns the up to 4 byte decoded value." ] # [ doc = "" ] # [ doc = " @param buf The input byte sequence to decode from" ] # [ doc = " @param length The length of the input byte sequence" ] # [ doc = "" ] # [ doc = " @return      The decoded value" ] pub fn coap_decode_var_bytes ( buf : * const u8 , length : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [ doc = " Decodes multiple-length byte sequences. @p buf points to an input byte" ] # [ doc = " sequence of length @p length. Returns the up to 8 byte decoded value." ] # [ doc = "" ] # [ doc = " @param buf The input byte sequence to decode from" ] # [ doc = " @param length The length of the input byte sequence" ] # [ doc = "" ] # [ doc = " @return      The decoded value" ] pub fn coap_decode_var_bytes8 ( buf : * const u8 , length : :: std :: os :: raw :: c_uint ) -> u64 ; } extern "C" { # [ doc = " Encodes multiple-length byte sequences. @p buf points to an output buffer of" ] # [ doc = " sufficient length to store the encoded bytes. @p value is the 4 byte value" ] # [ doc = " to encode." ] # [ doc = " Returns the number of bytes used to encode @p value or 0 on error." ] # [ doc = "" ] # [ doc = " @param buf    The output buffer to encode into" ] # [ doc = " @param length The output buffer size to encode into (must be sufficient)" ] # [ doc = " @param value  The value to encode into the buffer" ] # [ doc = "" ] # [ doc = " @return       The number of bytes used to encode @p value or @c 0 on error." ] pub fn coap_encode_var_safe ( buf : * mut u8 , length : usize , value : :: std :: os :: raw :: c_uint ) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [ doc = " Encodes multiple-length byte sequences. @p buf points to an output buffer of" ] # [ doc = " sufficient length to store the encoded bytes. @p value is the 8 byte value" ] # [ doc = " to encode." ] # [ doc = " Returns the number of bytes used to encode @p value or 0 on error." ] # [ doc = "" ] # [ doc = " @param buf    The output buffer to encode into" ] # [ doc = " @param length The output buffer size to encode into (must be sufficient)" ] # [ doc = " @param value  The value to encode into the buffer" ] # [ doc = "" ] # [ doc = " @return       The number of bytes used to encode @p value or @c 0 on error." ] pub fn coap_encode_var_safe8 ( buf : * mut u8 , length : usize , value : u64 ) -> :: std :: os :: raw :: c_uint ; } # [ doc = " Structure of Block options." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct coap_block_t { # [ doc = "< block number" ] pub num : :: std :: os :: raw :: c_uint , pub _bitfield_1 : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > , pub __bindgen_padding_0 : [ u8 ; 3usize ] , } # [ test ] fn bindgen_test_layout_coap_block_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_block_t > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( coap_block_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_block_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( coap_block_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_block_t > ( ) ) ) . num as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_block_t ) , "::" , stringify ! ( num ) ) ) ; } impl coap_block_t { # [ inline ] pub fn m ( & self ) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute ( self . _bitfield_1 . get ( 0usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_m ( & mut self , val : :: std :: os :: raw :: c_uint ) { unsafe { let val : u32 = :: std :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 0usize , 1u8 , val as u64 ) } } # [ inline ] pub fn szx ( & self ) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute ( self . _bitfield_1 . get ( 1usize , 3u8 ) as u32 ) } } # [ inline ] pub fn set_szx ( & mut self , val : :: std :: os :: raw :: c_uint ) { unsafe { let val : u32 = :: std :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 1usize , 3u8 , val as u64 ) } } # [ inline ] pub fn new_bitfield_1 ( m : :: std :: os :: raw :: c_uint , szx : :: std :: os :: raw :: c_uint ) -> __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > = Default :: default ( ) ; __bindgen_bitfield_unit . set ( 0usize , 1u8 , { let m : u32 = unsafe { :: std :: mem :: transmute ( m ) } ; m as u64 } ) ; __bindgen_bitfield_unit . set ( 1usize , 3u8 , { let szx : u32 = unsafe { :: std :: mem :: transmute ( szx ) } ; szx as u64 } ) ; __bindgen_bitfield_unit } } extern "C" { # [ doc = " Returns the value of field @c num in the given block option @p block_opt." ] pub fn coap_opt_block_num ( block_opt : * const coap_opt_t ) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [ doc = " Initializes @p block from @p pdu. @p type must be either COAP_OPTION_BLOCK1" ] # [ doc = " or COAP_OPTION_BLOCK2. When option @p type was found in @p pdu, @p block is" ] # [ doc = " initialized with values from this option and the function returns the value" ] # [ doc = " @c 1. Otherwise, @c 0 is returned." ] # [ doc = "" ] # [ doc = " @param pdu   The pdu to search for option @p type." ] # [ doc = " @param type  The option to search for (must be COAP_OPTION_BLOCK1 or" ] # [ doc = "              COAP_OPTION_BLOCK2)." ] # [ doc = " @param block The block structure to initilize." ] # [ doc = "" ] # [ doc = " @return      @c 1 on success, @c 0 otherwise." ] pub fn coap_get_block ( pdu : * mut coap_pdu_t , type_ : u16 , block : * mut coap_block_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Writes a block option of type @p type to message @p pdu. If the requested" ] # [ doc = " block size is too large to fit in @p pdu, it is reduced accordingly. An" ] # [ doc = " exception is made for the final block when less space is required. The actual" ] # [ doc = " length of the resource is specified in @p data_length." ] # [ doc = "" ] # [ doc = " This function may change *block to reflect the values written to @p pdu. As" ] # [ doc = " the function takes into consideration the remaining space @p pdu, no more" ] # [ doc = " options should be added after coap_write_block_opt() has returned." ] # [ doc = "" ] # [ doc = " @param block       The block structure to use. On return, this object is" ] # [ doc = "                    updated according to the values that have been written to" ] # [ doc = "                    @p pdu." ] # [ doc = " @param type        COAP_OPTION_BLOCK1 or COAP_OPTION_BLOCK2." ] # [ doc = " @param pdu         The message where the block option should be written." ] # [ doc = " @param data_length The length of the actual data that will be added the @p" ] # [ doc = "                    pdu by calling coap_add_block()." ] # [ doc = "" ] # [ doc = " @return            @c 1 on success, or a negative value on error." ] pub fn coap_write_block_opt ( block : * mut coap_block_t , type_ : u16 , pdu : * mut coap_pdu_t , data_length : usize ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Adds the @p block_num block of size 1 << (@p block_szx + 4) from source @p" ] # [ doc = " data to @p pdu." ] # [ doc = "" ] # [ doc = " @param pdu       The message to add the block." ] # [ doc = " @param len       The length of @p data." ] # [ doc = " @param data      The source data to fill the block with." ] # [ doc = " @param block_num The actual block number." ] # [ doc = " @param block_szx Encoded size of block @p block_number." ] # [ doc = "" ] # [ doc = " @return          @c 1 on success, @c 0 otherwise." ] pub fn coap_add_block ( pdu : * mut coap_pdu_t , len : :: std :: os :: raw :: c_uint , data : * const u8 , block_num : :: std :: os :: raw :: c_uint , block_szx : :: std :: os :: raw :: c_uchar ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Adds the appropriate part of @p data to the @p response pdu.  If blocks are" ] # [ doc = " required, then the appropriate block will be added to the PDU and sent." ] # [ doc = " Adds a ETAG option that is the hash of the entire data if the data is to be" ] # [ doc = " split into blocks" ] # [ doc = " Used by a GET request handler." ] # [ doc = "" ] # [ doc = " @param resource   The resource the data is associated with." ] # [ doc = " @param session    The coap session." ] # [ doc = " @param request    The requesting pdu." ] # [ doc = " @param response   The response pdu." ] # [ doc = " @param token      The token taken from the (original) requesting pdu." ] # [ doc = " @param media_type The format of the data." ] # [ doc = " @param maxage     The maxmimum life of the data. If @c -1, then there" ] # [ doc = "                   is no maxage." ] # [ doc = " @param length     The total length of the data." ] # [ doc = " @param data       The entire data block to transmit." ] # [ doc = "" ] pub fn coap_add_data_blocked_response ( resource : * mut coap_resource_t , session : * mut coap_session_t , request : * mut coap_pdu_t , response : * mut coap_pdu_t , token : * const coap_binary_t , media_type : u16 , maxage : :: std :: os :: raw :: c_int , length : usize , data : * const u8 ) ; } # [ doc = "< Emergency" ] pub const coap_log_t_LOG_EMERG : coap_log_t = 0 ; # [ doc = "< Alert" ] pub const coap_log_t_LOG_ALERT : coap_log_t = 1 ; # [ doc = "< Critical" ] pub const coap_log_t_LOG_CRIT : coap_log_t = 2 ; # [ doc = "< Error" ] pub const coap_log_t_LOG_ERR : coap_log_t = 3 ; # [ doc = "< Warning" ] pub const coap_log_t_LOG_WARNING : coap_log_t = 4 ; # [ doc = "< Notice" ] pub const coap_log_t_LOG_NOTICE : coap_log_t = 5 ; # [ doc = "< Information" ] pub const coap_log_t_LOG_INFO : coap_log_t = 6 ; # [ doc = "< Debug" ] pub const coap_log_t_LOG_DEBUG : coap_log_t = 7 ; # [ doc = "< CipherInfo" ] pub const coap_log_t_COAP_LOG_CIPHERS : coap_log_t = 9 ; # [ doc = " Pre-defined log levels akin to what is used in \\b syslog" ] # [ doc = "with LOG_CIPHERS added." ] pub type coap_log_t = u32 ; extern "C" { # [ doc = " Get the current logging level." ] # [ doc = "" ] # [ doc = " @return One of the LOG_* values." ] pub fn coap_get_log_level ( ) -> coap_log_t ; } extern "C" { # [ doc = " Sets the log level to the specified value." ] # [ doc = "" ] # [ doc = " @param level One of the LOG_* values." ] pub fn coap_set_log_level ( level : coap_log_t ) ; } # [ doc = " Logging call-back handler definition." ] # [ doc = "" ] # [ doc = " @param level One of the LOG_* values." ] # [ doc = " @param message Zero-terminated string message to log." ] pub type coap_log_handler_t = :: std :: option :: Option < unsafe extern "C" fn ( level : coap_log_t , message : * const :: std :: os :: raw :: c_char ) > ; extern "C" { # [ doc = " Add a custom log callback handler." ] # [ doc = "" ] # [ doc = " @param handler The logging handler to use or @p NULL to use default handler." ] pub fn coap_set_log_handler ( handler : coap_log_handler_t ) ; } extern "C" { # [ doc = " Get the library package name." ] # [ doc = "" ] # [ doc = " @return Zero-terminated string with the name of this library." ] pub fn coap_package_name ( ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " Get the library package version." ] # [ doc = "" ] # [ doc = " @return Zero-terminated string with the library version." ] pub fn coap_package_version ( ) -> * const :: std :: os :: raw :: c_char ; } extern "C" { pub fn coap_log_impl ( level : coap_log_t , format : * const :: std :: os :: raw :: c_char , ... ) ; } extern "C" { # [ doc = " Defines the output mode for the coap_show_pdu() function." ] # [ doc = "" ] # [ doc = " @param use_fprintf @p 1 if the output is to use fprintf() (the default)" ] # [ doc = "                    @p 0 if the output is to use coap_log()." ] pub fn coap_set_show_pdu_output ( use_fprintf : :: std :: os :: raw :: c_int ) ; } extern "C" { # [ doc = " Display the contents of the specified @p pdu." ] # [ doc = " Note: The output method of coap_show_pdu() is dependent on the setting of" ] # [ doc = " coap_set_show_pdu_output()." ] # [ doc = "" ] # [ doc = " @param level The required minimum logging level." ] # [ doc = " @param pdu The PDU to decode." ] pub fn coap_show_pdu ( level : coap_log_t , pdu : * const coap_pdu_t ) ; } extern "C" { # [ doc = " Display the current (D)TLS library linked with and built for version." ] # [ doc = "" ] # [ doc = " @param level The required minimum logging level." ] pub fn coap_show_tls_version ( level : coap_log_t ) ; } extern "C" { # [ doc = " Build a string containing the current (D)TLS library linked with and" ] # [ doc = " built for version." ] # [ doc = "" ] # [ doc = " @param buffer The buffer to put the string into." ] # [ doc = " @param bufsize The size of the buffer to put the string into." ] # [ doc = "" ] # [ doc = " @return A pointer to the provided buffer." ] pub fn coap_string_tls_version ( buffer : * mut :: std :: os :: raw :: c_char , bufsize : usize ) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [ doc = " Print the address into the defined buffer." ] # [ doc = "" ] # [ doc = " Internal Function." ] # [ doc = "" ] # [ doc = " @param address The address to print." ] # [ doc = " @param buffer The buffer to print into." ] # [ doc = " @param size The size of the buffer to print into." ] # [ doc = "" ] # [ doc = " @return The amount written into the buffer." ] pub fn coap_print_addr ( address : * const coap_address_t , buffer : * mut :: std :: os :: raw :: c_uchar , size : usize ) -> usize ; } extern "C" { # [ doc = " Set the packet loss level for testing.  This can be in one of two forms." ] # [ doc = "" ] # [ doc = " Percentage : 0% to 100%.  Use the specified probability." ] # [ doc = " 0% is send all packets, 100% is drop all packets." ] # [ doc = "" ] # [ doc = " List: A comma separated list of numbers or number ranges that are the" ] # [ doc = " packets to drop." ] # [ doc = "" ] # [ doc = " @param loss_level The defined loss level (percentage or list)." ] # [ doc = "" ] # [ doc = " @return @c 1 If loss level set, @c 0 if there is an error." ] pub fn coap_debug_set_packet_loss ( loss_level : * const :: std :: os :: raw :: c_char ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Check to see whether a packet should be sent or not." ] # [ doc = "" ] # [ doc = " Internal function" ] # [ doc = "" ] # [ doc = " @return @c 1 if packet is to be sent, @c 0 if packet is to be dropped." ] pub fn coap_debug_send_packet ( ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Initializes libcoap's memory management." ] # [ doc = " This function must be called once before coap_malloc() can be used on" ] # [ doc = " constrained devices." ] pub fn coap_memory_init ( ) ; } pub const coap_memory_tag_t_COAP_STRING : coap_memory_tag_t = 0 ; pub const coap_memory_tag_t_COAP_ATTRIBUTE_NAME : coap_memory_tag_t = 1 ; pub const coap_memory_tag_t_COAP_ATTRIBUTE_VALUE : coap_memory_tag_t = 2 ; pub const coap_memory_tag_t_COAP_PACKET : coap_memory_tag_t = 3 ; pub const coap_memory_tag_t_COAP_NODE : coap_memory_tag_t = 4 ; pub const coap_memory_tag_t_COAP_CONTEXT : coap_memory_tag_t = 5 ; pub const coap_memory_tag_t_COAP_ENDPOINT : coap_memory_tag_t = 6 ; pub const coap_memory_tag_t_COAP_PDU : coap_memory_tag_t = 7 ; pub const coap_memory_tag_t_COAP_PDU_BUF : coap_memory_tag_t = 8 ; pub const coap_memory_tag_t_COAP_RESOURCE : coap_memory_tag_t = 9 ; pub const coap_memory_tag_t_COAP_RESOURCEATTR : coap_memory_tag_t = 10 ; pub const coap_memory_tag_t_COAP_SESSION : coap_memory_tag_t = 11 ; pub const coap_memory_tag_t_COAP_OPTLIST : coap_memory_tag_t = 12 ; # [ doc = " Type specifiers for coap_malloc_type(). Memory objects can be typed to" ] # [ doc = " facilitate arrays of type objects to be used instead of dynamic memory" ] # [ doc = " management on constrained devices." ] pub type coap_memory_tag_t = u32 ; extern "C" { # [ doc = " Allocates a chunk of @p size bytes and returns a pointer to the newly" ] # [ doc = " allocated memory. The @p type is used to select the appropriate storage" ] # [ doc = " container on constrained devices. The storage allocated by coap_malloc_type()" ] # [ doc = " must be released with coap_free_type()." ] # [ doc = "" ] # [ doc = " @param type The type of object to be stored." ] # [ doc = " @param size The number of bytes requested." ] # [ doc = " @return     A pointer to the allocated storage or @c NULL on error." ] pub fn coap_malloc_type ( type_ : coap_memory_tag_t , size : usize ) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [ doc = " Releases the memory that was allocated by coap_malloc_type(). The type tag @p" ] # [ doc = " type must be the same that was used for allocating the object pointed to by" ] # [ doc = " @p ." ] # [ doc = "" ] # [ doc = " @param type The type of the object to release." ] # [ doc = " @param p    A pointer to memory that was allocated by coap_malloc_type()." ] pub fn coap_free_type ( type_ : coap_memory_tag_t , p : * mut :: std :: os :: raw :: c_void ) ; } # [ doc = " Definition of message handler function (@sa coap_resource_t)." ] pub type coap_method_handler_t = :: std :: option :: Option < unsafe extern "C" fn ( arg1 : * mut coap_context_t , arg2 : * mut coap_resource_t , arg3 : * mut coap_session_t , arg4 : * mut coap_pdu_t , arg5 : * mut coap_binary_t , arg6 : * mut coap_string_t , arg7 : * mut coap_pdu_t ) > ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct coap_attr_t { pub next : * mut coap_attr_t , pub name : * mut coap_str_const_t , pub value : * mut coap_str_const_t , pub flags : :: std :: os :: raw :: c_int , } # [ test ] fn bindgen_test_layout_coap_attr_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_attr_t > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( coap_attr_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_attr_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( coap_attr_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_attr_t > ( ) ) ) . next as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( coap_attr_t ) , "::" , stringify ! ( next ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_attr_t > ( ) ) ) . name as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( coap_attr_t ) , "::" , stringify ! ( name ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_attr_t > ( ) ) ) . value as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( coap_attr_t ) , "::" , stringify ! ( value ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_attr_t > ( ) ) ) . flags as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( coap_attr_t ) , "::" , stringify ! ( flags ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct coap_resource_t { pub _bitfield_1 : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > , # [ doc = " Used to store handlers for the seven coap methods @c GET, @c POST, @c PUT," ] # [ doc = " @c DELETE, @c FETCH, @c PATCH and @c IPATCH." ] # [ doc = " coap_dispatch() will pass incoming requests to the handler" ] # [ doc = " that corresponds to its request method or generate a 4.05 response if no" ] # [ doc = " handler is available." ] pub handler : [ coap_method_handler_t ; 7usize ] , pub hh : UT_hash_handle , # [ doc = "< attributes to be included with the link format" ] pub link_attr : * mut coap_attr_t , # [ doc = "< list of observers for this resource" ] pub subscribers : * mut coap_subscription_t , # [ doc = "< the key used for hash lookup for this resource" ] pub uri_path : * mut coap_str_const_t , pub flags : :: std :: os :: raw :: c_int , # [ doc = " The next value for the Observe option. This field must be increased each" ] # [ doc = " time the resource changes. Only the lower 24 bits are sent." ] pub observe : :: std :: os :: raw :: c_uint , # [ doc = " This pointer is under user control. It can be used to store context for" ] # [ doc = " the coap handler." ] pub user_data : * mut :: std :: os :: raw :: c_void , } # [ test ] fn bindgen_test_layout_coap_resource_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < coap_resource_t > ( ) , 160usize , concat ! ( "Size of: " , stringify ! ( coap_resource_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < coap_resource_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( coap_resource_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_resource_t > ( ) ) ) . handler as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( coap_resource_t ) , "::" , stringify ! ( handler ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_resource_t > ( ) ) ) . hh as * const _ as usize } , 64usize , concat ! ( "Offset of field: " , stringify ! ( coap_resource_t ) , "::" , stringify ! ( hh ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_resource_t > ( ) ) ) . link_attr as * const _ as usize } , 120usize , concat ! ( "Offset of field: " , stringify ! ( coap_resource_t ) , "::" , stringify ! ( link_attr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_resource_t > ( ) ) ) . subscribers as * const _ as usize } , 128usize , concat ! ( "Offset of field: " , stringify ! ( coap_resource_t ) , "::" , stringify ! ( subscribers ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_resource_t > ( ) ) ) . uri_path as * const _ as usize } , 136usize , concat ! ( "Offset of field: " , stringify ! ( coap_resource_t ) , "::" , stringify ! ( uri_path ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_resource_t > ( ) ) ) . flags as * const _ as usize } , 144usize , concat ! ( "Offset of field: " , stringify ! ( coap_resource_t ) , "::" , stringify ! ( flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_resource_t > ( ) ) ) . observe as * const _ as usize } , 148usize , concat ! ( "Offset of field: " , stringify ! ( coap_resource_t ) , "::" , stringify ! ( observe ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < coap_resource_t > ( ) ) ) . user_data as * const _ as usize } , 152usize , concat ! ( "Offset of field: " , stringify ! ( coap_resource_t ) , "::" , stringify ! ( user_data ) ) ) ; } impl coap_resource_t { # [ inline ] pub fn dirty ( & self ) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute ( self . _bitfield_1 . get ( 0usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_dirty ( & mut self , val : :: std :: os :: raw :: c_uint ) { unsafe { let val : u32 = :: std :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 0usize , 1u8 , val as u64 ) } } # [ inline ] pub fn partiallydirty ( & self ) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute ( self . _bitfield_1 . get ( 1usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_partiallydirty ( & mut self , val : :: std :: os :: raw :: c_uint ) { unsafe { let val : u32 = :: std :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 1usize , 1u8 , val as u64 ) } } # [ inline ] pub fn observable ( & self ) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute ( self . _bitfield_1 . get ( 2usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_observable ( & mut self , val : :: std :: os :: raw :: c_uint ) { unsafe { let val : u32 = :: std :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 2usize , 1u8 , val as u64 ) } } # [ inline ] pub fn cacheable ( & self ) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute ( self . _bitfield_1 . get ( 3usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_cacheable ( & mut self , val : :: std :: os :: raw :: c_uint ) { unsafe { let val : u32 = :: std :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 3usize , 1u8 , val as u64 ) } } # [ inline ] pub fn is_unknown ( & self ) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute ( self . _bitfield_1 . get ( 4usize , 1u8 ) as u32 ) } } # [ inline ] pub fn set_is_unknown ( & mut self , val : :: std :: os :: raw :: c_uint ) { unsafe { let val : u32 = :: std :: mem :: transmute ( val ) ; self . _bitfield_1 . set ( 4usize , 1u8 , val as u64 ) } } # [ inline ] pub fn new_bitfield_1 ( dirty : :: std :: os :: raw :: c_uint , partiallydirty : :: std :: os :: raw :: c_uint , observable : :: std :: os :: raw :: c_uint , cacheable : :: std :: os :: raw :: c_uint , is_unknown : :: std :: os :: raw :: c_uint ) -> __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [ u8 ; 1usize ] , u8 > = Default :: default ( ) ; __bindgen_bitfield_unit . set ( 0usize , 1u8 , { let dirty : u32 = unsafe { :: std :: mem :: transmute ( dirty ) } ; dirty as u64 } ) ; __bindgen_bitfield_unit . set ( 1usize , 1u8 , { let partiallydirty : u32 = unsafe { :: std :: mem :: transmute ( partiallydirty ) } ; partiallydirty as u64 } ) ; __bindgen_bitfield_unit . set ( 2usize , 1u8 , { let observable : u32 = unsafe { :: std :: mem :: transmute ( observable ) } ; observable as u64 } ) ; __bindgen_bitfield_unit . set ( 3usize , 1u8 , { let cacheable : u32 = unsafe { :: std :: mem :: transmute ( cacheable ) } ; cacheable as u64 } ) ; __bindgen_bitfield_unit . set ( 4usize , 1u8 , { let is_unknown : u32 = unsafe { :: std :: mem :: transmute ( is_unknown ) } ; is_unknown as u64 } ) ; __bindgen_bitfield_unit } } extern "C" { # [ doc = " Creates a new resource object and initializes the link field to the string" ] # [ doc = " @p uri_path. This function returns the new coap_resource_t object." ] # [ doc = "" ] # [ doc = " If the string is going to be freed off by coap_delete_resource() when" ] # [ doc = " COAP_RESOURCE_FLAGS_RELEASE_URI is set in @p flags, then either the 's'" ] # [ doc = " variable of coap_str_const_t has to point to constant text, or point to data" ] # [ doc = " within the allocated coap_str_const_t parameter." ] # [ doc = "" ] # [ doc = " @param uri_path The string URI path of the new resource." ] # [ doc = " @param flags    Flags for memory management (in particular release of" ] # [ doc = "                 memory). Possible values:@n" ] # [ doc = "" ] # [ doc = "                 COAP_RESOURCE_FLAGS_RELEASE_URI" ] # [ doc = "                  If this flag is set, the URI passed to" ] # [ doc = "                  coap_resource_init() is free'd by" ] # [ doc = "                  coap_delete_resource()@n" ] # [ doc = "" ] # [ doc = "                 COAP_RESOURCE_FLAGS_NOTIFY_CON" ] # [ doc = "                  If this flag is set, coap-observe notifications" ] # [ doc = "                  will be sent confirmable by default.@n" ] # [ doc = "" ] # [ doc = "                 COAP_RESOURCE_FLAGS_NOTIFY_NON (default)" ] # [ doc = "                  If this flag is set, coap-observe notifications" ] # [ doc = "                  will be sent non-confirmable by default.@n" ] # [ doc = "" ] # [ doc = "                  If flags is set to 0 then the" ] # [ doc = "                  COAP_RESOURCE_FLAGS_NOTIFY_NON is considered." ] # [ doc = "" ] # [ doc = " @return         A pointer to the new object or @c NULL on error." ] pub fn coap_resource_init ( uri_path : * mut coap_str_const_t , flags : :: std :: os :: raw :: c_int ) -> * mut coap_resource_t ; } extern "C" { # [ doc = " Creates a new resource object for the unknown resource handler with support" ] # [ doc = " for PUT." ] # [ doc = "" ] # [ doc = " In the same way that additional handlers can be added to the resource" ] # [ doc = " created by coap_resource_init() by using coap_register_handler(), POST," ] # [ doc = " GET, DELETE etc. handlers can be added to this resource. It is the" ] # [ doc = " responsibility of the application to manage the unknown resources by either" ] # [ doc = " creating new resources with coap_resource_init() (which should have a" ] # [ doc = " DELETE handler specified for the resource removal) or by maintaining an" ] # [ doc = " active resource list." ] # [ doc = "" ] # [ doc = " Note: There can only be one unknown resource handler per context - attaching" ] # [ doc = "       a new one overrides the previous definition." ] # [ doc = "" ] # [ doc = " Note: It is not possible to observe the unknown resource with a GET request" ] # [ doc = "       - a separate resource needs to be reated by the PUT (or POST) handler," ] # [ doc = "       and make that resource observable." ] # [ doc = "" ] # [ doc = " This function returns the new coap_resource_t object." ] # [ doc = "" ] # [ doc = " @param put_handler The PUT handler to register with @p resource for" ] # [ doc = "                    unknown Uri-Path." ] # [ doc = "" ] # [ doc = " @return       A pointer to the new object or @c NULL on error." ] pub fn coap_resource_unknown_init ( put_handler : coap_method_handler_t ) -> * mut coap_resource_t ; } extern "C" { # [ doc = " Registers the given @p resource for @p context. The resource must have been" ] # [ doc = " created by coap_resource_init() or coap_resource_unknown_init(), the" ] # [ doc = " storage allocated for the resource will be released by coap_delete_resource()." ] # [ doc = "" ] # [ doc = " @param context  The context to use." ] # [ doc = " @param resource The resource to store." ] pub fn coap_add_resource ( context : * mut coap_context_t , resource : * mut coap_resource_t ) ; } extern "C" { # [ doc = " Deletes a resource identified by @p resource. The storage allocated for that" ] # [ doc = " resource is freed, and removed from the context." ] # [ doc = "" ] # [ doc = " @param context  The context where the resources are stored." ] # [ doc = " @param resource The resource to delete." ] # [ doc = "" ] # [ doc = " @return         @c 1 if the resource was found (and destroyed)," ] # [ doc = "                 @c 0 otherwise." ] pub fn coap_delete_resource ( context : * mut coap_context_t , resource : * mut coap_resource_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Deletes all resources from given @p context and frees their storage." ] # [ doc = "" ] # [ doc = " @param context The CoAP context with the resources to be deleted." ] pub fn coap_delete_all_resources ( context : * mut coap_context_t ) ; } extern "C" { # [ doc = " Registers a new attribute with the given @p resource. As the" ] # [ doc = " attribute's coap_str_const_ fields will point to @p name and @p value the" ] # [ doc = " caller must ensure that these pointers are valid during the" ] # [ doc = " attribute's lifetime." ] # [ doc = "" ] # [ doc = " If the @p name and/or @p value string is going to be freed off at attribute" ] # [ doc = " removal time by the setting of COAP_ATTR_FLAGS_RELEASE_NAME or" ] # [ doc = " COAP_ATTR_FLAGS_RELEASE_VALUE in @p flags, then either the 's'" ] # [ doc = " variable of coap_str_const_t has to point to constant text, or point to data" ] # [ doc = " within the allocated coap_str_const_t parameter." ] # [ doc = "" ] # [ doc = " @param resource The resource to register the attribute with." ] # [ doc = " @param name     The attribute's name as a string." ] # [ doc = " @param value    The attribute's value as a string or @c NULL if none." ] # [ doc = " @param flags    Flags for memory management (in particular release of" ] # [ doc = "                 memory). Possible values:@n" ] # [ doc = "" ] # [ doc = "                 COAP_ATTR_FLAGS_RELEASE_NAME" ] # [ doc = "                  If this flag is set, the name passed to" ] # [ doc = "                  coap_add_attr_release() is free'd" ] # [ doc = "                  when the attribute is deleted@n" ] # [ doc = "" ] # [ doc = "                 COAP_ATTR_FLAGS_RELEASE_VALUE" ] # [ doc = "                  If this flag is set, the value passed to" ] # [ doc = "                  coap_add_attr_release() is free'd" ] # [ doc = "                  when the attribute is deleted@n" ] # [ doc = "" ] # [ doc = " @return         A pointer to the new attribute or @c NULL on error." ] pub fn coap_add_attr ( resource : * mut coap_resource_t , name : * mut coap_str_const_t , value : * mut coap_str_const_t , flags : :: std :: os :: raw :: c_int ) -> * mut coap_attr_t ; } extern "C" { # [ doc = " Returns @p resource's coap_attr_t object with given @p name if found, @c NULL" ] # [ doc = " otherwise." ] # [ doc = "" ] # [ doc = " @param resource The resource to search for attribute @p name." ] # [ doc = " @param name     Name of the requested attribute as a string." ] # [ doc = " @return         The first attribute with specified @p name or @c NULL if none" ] # [ doc = "                 was found." ] pub fn coap_find_attr ( resource : * mut coap_resource_t , name : * mut coap_str_const_t ) -> * mut coap_attr_t ; } extern "C" { # [ doc = " Deletes an attribute." ] # [ doc = " Note: This is for internal use only, as it is not deleted from its chain." ] # [ doc = "" ] # [ doc = " @param attr Pointer to a previously created attribute." ] # [ doc = "" ] pub fn coap_delete_attr ( attr : * mut coap_attr_t ) ; } # [ doc = " Status word to encode the result of conditional print or copy operations such" ] # [ doc = " as coap_print_link(). The lower 28 bits of coap_print_status_t are used to" ] # [ doc = " encode the number of characters that has actually been printed, bits 28 to 31" ] # [ doc = " encode the status.  When COAP_PRINT_STATUS_ERROR is set, an error occurred" ] # [ doc = " during output. In this case, the other bits are undefined." ] # [ doc = " COAP_PRINT_STATUS_TRUNC indicates that the output is truncated, i.e. the" ] # [ doc = " printing would have exceeded the current buffer." ] pub type coap_print_status_t = :: std :: os :: raw :: c_uint ; extern "C" { # [ doc = " Writes a description of this resource in link-format to given text buffer. @p" ] # [ doc = " len must be initialized to the maximum length of @p buf and will be set to" ] # [ doc = " the number of characters actually written if successful. This function" ] # [ doc = " returns @c 1 on success or @c 0 on error." ] # [ doc = "" ] # [ doc = " @param resource The resource to describe." ] # [ doc = " @param buf      The output buffer to write the description to." ] # [ doc = " @param len      Must be initialized to the length of @p buf and" ] # [ doc = "                 will be set to the length of the printed link description." ] # [ doc = " @param offset   The offset within the resource description where to" ] # [ doc = "                 start writing into @p buf. This is useful for dealing" ] # [ doc = "                 with the Block2 option. @p offset is updated during" ] # [ doc = "                 output as it is consumed." ] # [ doc = "" ] # [ doc = " @return If COAP_PRINT_STATUS_ERROR is set, an error occured. Otherwise," ] # [ doc = "         the lower 28 bits will indicate the number of characters that" ] # [ doc = "         have actually been output into @p buffer. The flag" ] # [ doc = "         COAP_PRINT_STATUS_TRUNC indicates that the output has been" ] # [ doc = "         truncated." ] pub fn coap_print_link ( resource : * const coap_resource_t , buf : * mut :: std :: os :: raw :: c_uchar , len : * mut usize , offset : * mut usize ) -> coap_print_status_t ; } extern "C" { # [ doc = " Registers the specified @p handler as message handler for the request type @p" ] # [ doc = " method" ] # [ doc = "" ] # [ doc = " @param resource The resource for which the handler shall be registered." ] # [ doc = " @param method   The CoAP request method to handle." ] # [ doc = " @param handler  The handler to register with @p resource." ] pub fn coap_register_handler ( resource : * mut coap_resource_t , method : :: std :: os :: raw :: c_uchar , handler : coap_method_handler_t ) ; } extern "C" { # [ doc = " Returns the resource identified by the unique string @p uri_path. If no" ] # [ doc = " resource was found, this function returns @c NULL." ] # [ doc = "" ] # [ doc = " @param context  The context to look for this resource." ] # [ doc = " @param uri_path  The unique string uri of the resource." ] # [ doc = "" ] # [ doc = " @return         A pointer to the resource or @c NULL if not found." ] pub fn coap_get_resource_from_uri_path ( context : * mut coap_context_t , uri_path : * mut coap_str_const_t ) -> * mut coap_resource_t ; } extern "C" { # [ doc = " Adds the specified peer as observer for @p resource. The subscription is" ] # [ doc = " identified by the given @p token. This function returns the registered" ] # [ doc = " subscription information if the @p observer has been added, or @c NULL on" ] # [ doc = " error." ] # [ doc = "" ] # [ doc = " @param resource        The observed resource." ] # [ doc = " @param session         The observer's session" ] # [ doc = " @param token           The token that identifies this subscription." ] # [ doc = " @param query           The query string, if any. subscription will" ] # [ doc = "take ownership of the string." ] # [ doc = " @param has_block2      If Option Block2 defined." ] # [ doc = " @param block2          Contents of Block2 if Block 2 defined." ] # [ doc = " @return                A pointer to the added/updated subscription" ] # [ doc = "                        information or @c NULL on error." ] pub fn coap_add_observer ( resource : * mut coap_resource_t , session : * mut coap_session_t , token : * const coap_binary_t , query : * mut coap_string_t , has_block2 : :: std :: os :: raw :: c_int , block2 : coap_block_t ) -> * mut coap_subscription_t ; } extern "C" { # [ doc = " Returns a subscription object for given @p peer." ] # [ doc = "" ] # [ doc = " @param resource The observed resource." ] # [ doc = " @param session  The observer's session" ] # [ doc = " @param token    The token that identifies this subscription or @c NULL for" ] # [ doc = "                 any token." ] # [ doc = " @return         A valid subscription if exists or @c NULL otherwise." ] pub fn coap_find_observer ( resource : * mut coap_resource_t , session : * mut coap_session_t , token : * const coap_binary_t ) -> * mut coap_subscription_t ; } extern "C" { # [ doc = " Marks an observer as alive." ] # [ doc = "" ] # [ doc = " @param context  The CoAP context to use." ] # [ doc = " @param session  The observer's session" ] # [ doc = " @param token    The corresponding token that has been used for the" ] # [ doc = "                 subscription." ] pub fn coap_touch_observer ( context : * mut coap_context_t , session : * mut coap_session_t , token : * const coap_binary_t ) ; } extern "C" { # [ doc = " Removes any subscription for @p observer from @p resource and releases the" ] # [ doc = " allocated storage. The result is @c 1 if an observation relationship with @p" ] # [ doc = " observer and @p token existed, @c 0 otherwise." ] # [ doc = "" ] # [ doc = " @param resource The observed resource." ] # [ doc = " @param session  The observer's session." ] # [ doc = " @param token    The token that identifies this subscription or @c NULL for" ] # [ doc = "                 any token." ] # [ doc = " @return         @c 1 if the observer has been deleted, @c 0 otherwise." ] pub fn coap_delete_observer ( resource : * mut coap_resource_t , session : * mut coap_session_t , token : * const coap_binary_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " Removes any subscription for @p session and releases the allocated storage." ] # [ doc = "" ] # [ doc = " @param context  The CoAP context to use." ] # [ doc = " @param session  The observer's session." ] pub fn coap_delete_observers ( context : * mut coap_context_t , session : * mut coap_session_t ) ; } extern "C" { # [ doc = " Checks for all known resources, if they are dirty and notifies subscribed" ] # [ doc = " observers." ] pub fn coap_check_notify ( context : * mut coap_context_t ) ; } extern "C" { # [ doc = " @}" ] pub fn coap_print_wellknown ( arg1 : * mut coap_context_t , arg2 : * mut :: std :: os :: raw :: c_uchar , arg3 : * mut usize , arg4 : usize , arg5 : * mut coap_opt_t ) -> coap_print_status_t ; } extern "C" { pub fn coap_handle_failed_notify ( arg1 : * mut coap_context_t , arg2 : * mut coap_session_t , arg3 : * const coap_binary_t ) ; } extern "C" { # [ doc = " Initiate the sending of an Observe packet for all observers of @p resource," ] # [ doc = " optionally matching @p query if not NULL" ] # [ doc = "" ] # [ doc = " @param resource The CoAP resource to use." ] # [ doc = " @param query    The Query to match against or NULL" ] # [ doc = "" ] # [ doc = " @return         @c 1 if the Observe has been triggered, @c 0 otherwise." ] pub fn coap_resource_notify_observers ( resource : * mut coap_resource_t , query : * const coap_string_t ) -> :: std :: os :: raw :: c_int ; } extern "C" { # [ doc = " @deprecated use coap_resource_notify_observers() instead." ] pub fn coap_resource_set_dirty ( r : * mut coap_resource_t , query : * const coap_string_t ) -> :: std :: os :: raw :: c_int ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __locale_data { pub _address : u8 , }