[INFO] updating cached repository https://github.com/FrozenDroid/nrf91-bsdlib [INFO] running `"git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "-c" "remote.origin.fetch=refs/heads/*:refs/heads/*" "fetch" "origin" "--force" "--prune"` [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] f2711d55ca854b1eed4513ea629e0d632884166a [INFO] testing FrozenDroid/nrf91-bsdlib against beta-2020-06-03 for beta-1.45-1 [INFO] running `"git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FFrozenDroid%2Fnrf91-bsdlib" "/workspace/builds/worker-7/source"` [INFO] [stderr] Cloning into '/workspace/builds/worker-7/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/FrozenDroid/nrf91-bsdlib on toolchain beta-2020-06-03 [INFO] running `"/workspace/cargo-home/bin/cargo" "+beta-2020-06-03" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started tweaking git repo https://github.com/FrozenDroid/nrf91-bsdlib [INFO] finished tweaking git repo https://github.com/FrozenDroid/nrf91-bsdlib [INFO] tweaked toml for git repo https://github.com/FrozenDroid/nrf91-bsdlib written to /workspace/builds/worker-7/source/Cargo.toml [INFO] crate git repo https://github.com/FrozenDroid/nrf91-bsdlib already has a lockfile, it will not be regenerated [INFO] running `"/workspace/cargo-home/bin/cargo" "+beta-2020-06-03" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "MAP_USER_ID=0" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--network" "none" "rustops/crates-build-env" "/opt/rustwide/cargo-home/bin/cargo" "+beta-2020-06-03" "build" "--frozen"` [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] [stdout] a37badad89694ca9a5df5489b6c45c6a7ef436c2bd2ac9fbe6ccbba5a0ee3c03 [INFO] running `"docker" "start" "-a" "a37badad89694ca9a5df5489b6c45c6a7ef436c2bd2ac9fbe6ccbba5a0ee3c03"` [INFO] [stderr] sudo: setrlimit(RLIMIT_CORE): Operation not permitted [INFO] [stderr] Compiling cortex-m v0.6.1 [INFO] [stderr] Compiling rand_core v0.4.2 [INFO] [stderr] Compiling bindgen v0.49.2 [INFO] [stderr] Compiling fpa v0.1.0 [INFO] [stderr] Compiling cortex-m-rt v0.6.10 [INFO] [stderr] Compiling nrf52832-pac v0.8.0 [INFO] [stderr] Compiling nb v0.1.2 [INFO] [stderr] Compiling cast v0.2.2 [INFO] [stderr] Compiling r0 v0.2.2 [INFO] [stderr] Compiling nrf91 v0.1.1 [INFO] [stderr] Compiling tinyrlibc v0.1.2 [INFO] [stderr] Compiling humantime v1.3.0 [INFO] [stderr] Compiling bare-metal v0.2.5 [INFO] [stderr] Compiling fxhash v0.2.1 [INFO] [stderr] Compiling clang-sys v0.28.1 [INFO] [stderr] Compiling as-slice v0.1.0 [INFO] [stderr] Compiling failure v0.1.5 [INFO] [stderr] Compiling nom v4.2.3 [INFO] [stderr] Compiling embedded-hal v0.2.3 [INFO] [stderr] Compiling rand_core v0.3.1 [INFO] [stderr] Compiling rand v0.5.6 [INFO] [stderr] Compiling which v2.0.1 [INFO] [stderr] Compiling env_logger v0.6.2 [INFO] [stderr] Compiling aligned v0.3.1 [INFO] [stderr] Compiling cexpr v0.3.5 [INFO] [stderr] Compiling cortex-m-rt-macros v0.1.5 [INFO] [stderr] Compiling nrfxlib-sys v0.1.6 [INFO] [stderr] error[E0204]: the trait `Copy` may not be implemented for this type [INFO] [stderr] --> /opt/rustwide/target/debug/build/nrfxlib-sys-3bfdd8545c463c5c/out/bindings.rs:3:12286 [INFO] [stderr] | [INFO] [stderr] 3 | # [ repr ( C ) ] # [ derive ( Default ) ] pub struct __IncompleteArrayField < T > ( :: core :: marker :: PhantomData < T > , [ T ; 0 ] ) ; impl < T > __IncompleteArrayField < T > { # [ inline ] pub fn new ( ) -> Self { __IncompleteArrayField ( :: core :: marker :: PhantomData , [ ] ) } # [ inline ] pub unsafe fn as_ptr ( & self ) -> * const T { :: core :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_mut_ptr ( & mut self ) -> * mut T { :: core :: mem :: transmute ( self ) } # [ inline ] pub unsafe fn as_slice ( & self , len : usize ) -> & [ T ] { :: core :: slice :: from_raw_parts ( self . as_ptr ( ) , len ) } # [ inline ] pub unsafe fn as_mut_slice ( & mut self , len : usize ) -> & mut [ T ] { :: core :: slice :: from_raw_parts_mut ( self . as_mut_ptr ( ) , len ) } } impl < T > :: core :: fmt :: Debug for __IncompleteArrayField < T > { fn fmt ( & self , fmt : & mut :: core :: fmt :: Formatter < '_ > ) -> :: core :: fmt :: Result { fmt . write_str ( "__IncompleteArrayField" ) } } impl < T > :: core :: clone :: Clone for __IncompleteArrayField < T > { # [ inline ] fn clone ( & self ) -> Self { Self :: new ( ) } } pub const NRF_EPERM : u32 = 1 ; pub const NRF_ENOENT : u32 = 2 ; pub const NRF_EIO : u32 = 5 ; pub const NRF_ENOEXEC : u32 = 8 ; pub const NRF_EBADF : u32 = 9 ; pub const NRF_ENOMEM : u32 = 12 ; pub const NRF_EACCES : u32 = 13 ; pub const NRF_EFAULT : u32 = 14 ; pub const NRF_EINVAL : u32 = 22 ; pub const NRF_EMFILE : u32 = 24 ; pub const NRF_ENOSPC : u32 = 28 ; pub const NRF_EAGAIN : u32 = 35 ; pub const NRF_EPROTOTYPE : u32 = 41 ; pub const NRF_ENOPROTOOPT : u32 = 42 ; pub const NRF_EPROTONOSUPPORT : u32 = 43 ; pub const NRF_ESOCKTNOSUPPORT : u32 = 44 ; pub const NRF_EOPNOTSUPP : u32 = 45 ; pub const NRF_EAFNOSUPPORT : u32 = 47 ; pub const NRF_EADDRINUSE : u32 = 48 ; pub const NRF_ENETDOWN : u32 = 50 ; pub const NRF_ENETUNREACH : u32 = 51 ; pub const NRF_ENETRESET : u32 = 52 ; pub const NRF_ECONNRESET : u32 = 54 ; pub const NRF_EISCONN : u32 = 56 ; pub const NRF_ENOTCONN : u32 = 57 ; pub const NRF_ETIMEDOUT : u32 = 60 ; pub const NRF_ENOBUFS : u32 = 105 ; pub const NRF_EHOSTDOWN : u32 = 112 ; pub const NRF_EALREADY : u32 = 114 ; pub const NRF_EINPROGRESS : u32 = 115 ; pub const NRF_ECANCELED : u32 = 125 ; pub const NRF_ENOKEY : u32 = 126 ; pub const NRF_EKEYEXPIRED : u32 = 127 ; pub const NRF_EKEYREVOKED : u32 = 128 ; pub const NRF_EKEYREJECTED : u32 = 129 ; pub const NRF_INET_ADDRSTRLEN : u32 = 16 ; pub const NRF_INET6_ADDRSTRLEN : u32 = 46 ; pub const NRF_AF_LOCAL : u32 = 1 ; pub const NRF_AF_INET : u32 = 2 ; pub const NRF_AF_INET6 : u32 = 10 ; pub const NRF_AF_LTE : u32 = 102 ; pub const NRF_SOCK_STREAM : u32 = 1 ; pub const NRF_SOCK_DGRAM : u32 = 2 ; pub const NRF_SOCK_MGMT : u32 = 512 ; pub const NRF_IPPROTO_TCP : u32 = 1 ; pub const NRF_IPPROTO_UDP : u32 = 2 ; pub const NRF_SPROTO_TLS1v2 : u32 = 260 ; pub const NRF_SPROTO_TLS1v3 : u32 = 261 ; pub const NRF_SPROTO_DTLS1v2 : u32 = 270 ; pub const NRF_PROTO_AT : u32 = 513 ; pub const NRF_PROTO_PDN : u32 = 514 ; pub const NRF_PROTO_DFU : u32 = 515 ; pub const NRF_PROTO_GNSS : u32 = 516 ; pub const NRF_SO_SEC_ROLE : u32 = 1 ; pub const NRF_SO_SEC_TAG_LIST : u32 = 2 ; pub const NRF_SO_SEC_SESSION_CACHE : u32 = 3 ; pub const NRF_SO_SEC_PEER_VERIFY : u32 = 4 ; pub const NRF_SO_HOSTNAME : u32 = 5 ; pub const NRF_SO_CIPHERSUITE_LIST : u32 = 6 ; pub const NRF_SO_CIPHER_IN_USE : u32 = 7 ; pub const NRF_SO_PDN_AF : u32 = 1 ; pub const NRF_SO_DFU_FW_VERSION : u32 = 1 ; pub const NRF_SO_DFU_RESOURCES : u32 = 2 ; pub const NRF_SO_DFU_TIMEO : u32 = 3 ; pub const NRF_SO_DFU_APPLY : u32 = 4 ; pub const NRF_SO_DFU_REVERT : u32 = 5 ; pub const NRF_SO_DFU_BACKUP_DELETE : u32 = 6 ; pub const NRF_SO_DFU_OFFSET : u32 = 7 ; pub const NRF_SO_DFU_ERROR : u32 = 20 ; pub const NRF_SO_GNSS_FIX_INTERVAL : u32 = 1 ; pub const NRF_SO_GNSS_FIX_RETRY : u32 = 2 ; pub const NRF_SO_GNSS_SYSTEM : u32 = 3 ; pub const NRF_SO_GNSS_NMEA_MASK : u32 = 4 ; pub const NRF_SO_GNSS_ELEVATION_MASK : u32 = 5 ; pub const NRF_SO_GNSS_USE_CASE : u32 = 6 ; pub const NRF_SO_GNSS_START : u32 = 7 ; pub const NRF_SO_GNSS_STOP : u32 = 8 ; pub const NRF_GNSS_PVT_FLAG_FIX_VALID_BIT : u32 = 1 ; pub const NRF_GNSS_PVT_FLAG_LEAP_SECOND_VALID : u32 = 2 ; pub const NRF_GNSS_SV_FLAG_USED_IN_FIX : u32 = 2 ; pub const NRF_GNSS_SV_FLAG_UNHEALTHY : u32 = 8 ; pub const NRF_CONFIG_NMEA_GGA_MASK : u32 = 1 ; pub const NRF_CONFIG_NMEA_GLL_MASK : u32 = 2 ; pub const NRF_CONFIG_NMEA_GSA_MASK : u32 = 4 ; pub const NRF_CONFIG_NMEA_GSV_MASK : u32 = 8 ; pub const NRF_CONFIG_NMEA_RMC_MASK : u32 = 16 ; pub const NRF_SO_ERROR : u32 = 4 ; pub const NRF_SO_RCVTIMEO : u32 = 20 ; pub const NRF_SO_BINDTODEVICE : u32 = 25 ; pub const NRF_SOL_SOCKET : u32 = 1 ; pub const NRF_SOL_SECURE : u32 = 282 ; pub const NRF_SOL_PDN : u32 = 514 ; pub const NRF_SOL_DFU : u32 = 515 ; pub const NRF_SOL_GNSS : u32 = 516 ; pub const NRF_MSG_DONTROUTE : u32 = 1 ; pub const NRF_MSG_DONTWAIT : u32 = 2 ; pub const NRF_MSG_OOB : u32 = 4 ; pub const NRF_MSG_PEEK : u32 = 8 ; pub const NRF_MSG_WAITALL : u32 = 16 ; pub const NRF_F_SETFL : u32 = 1 ; pub const NRF_F_GETFL : u32 = 2 ; pub const NRF_O_NONBLOCK : u32 = 1 ; pub const NRF_IFNAMSIZ : u32 = 64 ; pub const NRF_GNSS_MAX_SATELLITES : u32 = 12 ; pub const NRF_GNSS_NMEA_MAX_LEN : u32 = 83 ; pub const NRF_GNSS_PVT_DATA_ID : u32 = 1 ; pub const NRF_GNSS_NMEA_DATA_ID : u32 = 2 ; pub const NRF_POLLIN : u32 = 1 ; pub const NRF_POLLOUT : u32 = 2 ; pub const NRF_POLLERR : u32 = 4 ; pub const NRF_POLLHUP : u32 = 8 ; pub const NRF_POLLNVAL : u32 = 16 ; extern "C" { # [ doc = " @brief Method to initialize BSD library." ] # [ doc = "" ] # [ doc = " @details This method shall be called before using any of the other methods of the application." ] # [ doc = " In case the initialization fails, the call results in a hard fault." ] # [ doc = "" ] # [ doc = " This method shall be called once. Calling this method again with a shutdown results" ] # [ doc = " in undefined behavior." ] # [ doc = "" ] # [ doc = " Initializing the library results in reserving resources defined in bsd_platform.h on" ] # [ doc = " the system. The application shall not use any of the resources identified in" ] # [ doc = " bsd_platform.h." ] # [ doc = "" ] # [ doc = " @return Zero on success or an error code otherwise." ] pub fn bsd_init ( ) -> ctypes :: c_int ; } extern "C" { # [ doc = " @brief Method to gracefully shutdown the BSD library." ] # [ doc = "" ] # [ doc = " @details This method used to shutdown the library. Resources reserved by the system may be reused" ] # [ doc = " once the library is gracefully shutdown." ] pub fn bsd_shutdown ( ) ; } extern "C" { # [ doc = " @brief Handler for recoverable BSD library errors." ] # [ doc = "" ] # [ doc = " @note It can be overwritten by the application." ] # [ doc = " The default will hard fault." ] # [ doc = "" ] # [ doc = " @param[in] error Indicates the error that occurred." ] pub fn bsd_recoverable_error_handler ( error : u32 ) ; } extern "C" { # [ doc = " @brief Handler for irrecoverable BSD library errors." ] # [ doc = "" ] # [ doc = " @note It can be overwritten by the application." ] # [ doc = " The default will hard fault." ] # [ doc = "" ] # [ doc = " @param[in] error Indicates the error that occurred." ] pub fn bsd_irrecoverable_error_handler ( error : u32 ) ; } extern "C" { # [ doc = "@}" ] pub fn bsd_os_init ( ) ; } extern "C" { pub fn bsd_os_timedwait ( context : u32 , p_timeout : * mut i32 ) -> i32 ; } extern "C" { pub fn bsd_os_errno_set ( errno_val : ctypes :: c_int ) ; } extern "C" { pub fn bsd_os_application_irq_clear ( ) ; } extern "C" { pub fn bsd_os_application_irq_set ( ) ; } extern "C" { pub fn bsd_os_trace_irq_set ( ) ; } extern "C" { pub fn bsd_os_trace_irq_clear ( ) ; } extern "C" { pub fn bsd_os_trace_put ( p_buffer : * const u8 , buf_len : u32 ) -> i32 ; } extern "C" { pub fn bsd_os_application_irq_handler ( ) ; } extern "C" { pub fn bsd_os_trace_irq_handler ( ) ; } extern "C" { # [ doc = "@brief Update Class with new APN." ] # [ doc = "" ] # [ doc = " This function will write a new APN to the specified Class." ] # [ doc = "" ] # [ doc = " @param[in] apn_class Class to update." ] # [ doc = " @param[in] p_apn Buffer containing the APN to set." ] # [ doc = " @param[in] apn_len Length of the APN pointed to by p_apn." ] # [ doc = "" ] # [ doc = " @retval 0 If create operation was successful." ] # [ doc = " @retval NRF_EIO If operation was not successful due to internal error." ] # [ doc = " @retval NRF_ENOBUFS If the operation could not be performed because it could not allocate" ] # [ doc = " enough intermediate buffers to perform the operation." ] # [ doc = " @retval NRF_ENOENT If the Class indicated cannot be written." ] # [ doc = " @retval NRF_ENOMEM If there was not memory enough to store the APN name." ] # [ doc = " @retval NRF_EPERM If the application did not have permission to do the operation." ] # [ doc = " @retval NRF_EINVAL If one or more of the provided parameters are not valid." ] pub fn nrf_apn_class_update ( apn_class : u8 , p_apn : * const u8 , apn_len : u16 ) -> ctypes :: c_int ; } extern "C" { # [ doc = "@brief Read APN based on Class." ] # [ doc = "" ] # [ doc = " This function will read the APN referenced by a Class." ] # [ doc = "" ] # [ doc = " @param[in] apn_class Class to read." ] # [ doc = " @param[out] p_apn Output buffer where to write the APN." ] # [ doc = " @param[inout] p_apn_len Length of the p_apn buffer as input, and length of the APN as" ] # [ doc = " output." ] # [ doc = "" ] # [ doc = " @retval 0 If read operation was successful." ] # [ doc = " @retval NRF_EIO If operation was not successful due to internal error." ] # [ doc = " @retval NRF_ENOBUFS If the operation could not be performed because it could not allocate" ] # [ doc = " enough intermediate buffers to perform the operation." ] # [ doc = " @retval NRF_ENOENT If there is no APN associated with the Class." ] # [ doc = " @retval NRF_EPERM If the application did not have permission to do the operation." ] # [ doc = " @retval NRF_EINVAL If provided buffer is to small for result data. If failing with this error," ] # [ doc = " the size needed is provided as output parameter by reference in the output" ] # [ doc = " p_apn_len output parameter." ] pub fn nrf_apn_class_read ( apn_class : u8 , p_apn : * mut u8 , p_apn_len : * mut u16 ) -> ctypes :: c_int ; } pub type bool_ = bool ; # [ doc = " @brief Socket module size type." ] pub type nrf_socklen_t = u32 ; # [ doc = " @brief Socket port type." ] pub type nrf_in_port_t = u16 ; # [ doc = " @brief Structure specifying time interval." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct nrf_timeval { # [ doc = "< Time interval seconds." ] pub tv_sec : u32 , # [ doc = "< Time interval microseconds." ] pub tv_usec : u32 , } # [ test ] fn bindgen_test_layout_nrf_timeval ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nrf_timeval > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( nrf_timeval ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nrf_timeval > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( nrf_timeval ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_timeval > ( ) ) ) . tv_sec as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nrf_timeval ) , "::" , stringify ! ( tv_sec ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_timeval > ( ) ) ) . tv_usec as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( nrf_timeval ) , "::" , stringify ! ( tv_usec ) ) ) ; } # [ doc = " @brief Socket families." ] # [ doc = "" ] # [ doc = " @details For a list of valid values, refer to @ref nrf_socket_families." ] pub type nrf_socket_family_t = ctypes :: c_int ; pub type nrf_sa_family_t = nrf_socket_family_t ; # [ doc = " @brief Generic socket address." ] # [ doc = "" ] # [ doc = " @details Only provided for API compatibility." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct nrf_sockaddr { pub sa_len : u8 , pub sa_family : ctypes :: c_int , pub sa_data : __IncompleteArrayField < ctypes :: c_char > , } # [ test ] fn bindgen_test_layout_nrf_sockaddr ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nrf_sockaddr > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( nrf_sockaddr ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nrf_sockaddr > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( nrf_sockaddr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_sockaddr > ( ) ) ) . sa_len as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nrf_sockaddr ) , "::" , stringify ! ( sa_len ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_sockaddr > ( ) ) ) . sa_family as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( nrf_sockaddr ) , "::" , stringify ! ( sa_family ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_sockaddr > ( ) ) ) . sa_data as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( nrf_sockaddr ) , "::" , stringify ! ( sa_data ) ) ) ; } # [ doc = " @brief IPv6 address." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct nrf_in6_addr { pub s6_addr : [ u8 ; 16usize ] , } # [ test ] fn bindgen_test_layout_nrf_in6_addr ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nrf_in6_addr > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( nrf_in6_addr ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nrf_in6_addr > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( nrf_in6_addr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_in6_addr > ( ) ) ) . s6_addr as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nrf_in6_addr ) , "::" , stringify ! ( s6_addr ) ) ) ; } # [ doc = " @brief IPv4 address." ] pub type nrf_in_addr_t = u32 ; # [ doc = " @brief IPv4 address structure." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct nrf_in_addr { pub s_addr : nrf_in_addr_t , } # [ test ] fn bindgen_test_layout_nrf_in_addr ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nrf_in_addr > ( ) , 4usize , concat ! ( "Size of: " , stringify ! ( nrf_in_addr ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nrf_in_addr > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( nrf_in_addr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_in_addr > ( ) ) ) . s_addr as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nrf_in_addr ) , "::" , stringify ! ( s_addr ) ) ) ; } # [ doc = " @brief Address record for IPv6 addresses." ] # [ doc = "" ] # [ doc = " @details Contains the address and port of the host, as well as other socket options. All fields" ] # [ doc = " in this structure are compatible with the POSIX variant for API compatibility." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct nrf_sockaddr_in6 { # [ doc = "< Length of this data structure." ] pub sin6_len : u8 , # [ doc = "< Socket family." ] pub sin6_family : nrf_sa_family_t , # [ doc = "< Port, in network byte order." ] pub sin6_port : nrf_in_port_t , # [ doc = "< IPv6 flow info parameters. Not used." ] pub sin6_flowinfo : u32 , # [ doc = "< IPv6 address." ] pub sin6_addr : nrf_in6_addr , # [ doc = "< IPv6 scope ID. Not used." ] pub sin6_scope_id : u32 , } # [ test ] fn bindgen_test_layout_nrf_sockaddr_in6 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nrf_sockaddr_in6 > ( ) , 36usize , concat ! ( "Size of: " , stringify ! ( nrf_sockaddr_in6 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nrf_sockaddr_in6 > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( nrf_sockaddr_in6 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_sockaddr_in6 > ( ) ) ) . sin6_len as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nrf_sockaddr_in6 ) , "::" , stringify ! ( sin6_len ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_sockaddr_in6 > ( ) ) ) . sin6_family as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( nrf_sockaddr_in6 ) , "::" , stringify ! ( sin6_family ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_sockaddr_in6 > ( ) ) ) . sin6_port as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( nrf_sockaddr_in6 ) , "::" , stringify ! ( sin6_port ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_sockaddr_in6 > ( ) ) ) . sin6_flowinfo as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( nrf_sockaddr_in6 ) , "::" , stringify ! ( sin6_flowinfo ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_sockaddr_in6 > ( ) ) ) . sin6_addr as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( nrf_sockaddr_in6 ) , "::" , stringify ! ( sin6_addr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_sockaddr_in6 > ( ) ) ) . sin6_scope_id as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( nrf_sockaddr_in6 ) , "::" , stringify ! ( sin6_scope_id ) ) ) ; } # [ doc = " @brief Address record for IPv4 addresses." ] # [ doc = "" ] # [ doc = " @details Contains the address and port of the host. All fields" ] # [ doc = " in this structure are compatible with the POSIX variant for API compatibility." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct nrf_sockaddr_in { # [ doc = "< Length of this data structure." ] pub sin_len : u8 , # [ doc = "< Socket family." ] pub sin_family : nrf_sa_family_t , # [ doc = "< Port, in network byte order." ] pub sin_port : nrf_in_port_t , # [ doc = "< IPv4 address." ] pub sin_addr : nrf_in_addr , } # [ test ] fn bindgen_test_layout_nrf_sockaddr_in ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nrf_sockaddr_in > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( nrf_sockaddr_in ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nrf_sockaddr_in > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( nrf_sockaddr_in ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_sockaddr_in > ( ) ) ) . sin_len as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nrf_sockaddr_in ) , "::" , stringify ! ( sin_len ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_sockaddr_in > ( ) ) ) . sin_family as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( nrf_sockaddr_in ) , "::" , stringify ! ( sin_family ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_sockaddr_in > ( ) ) ) . sin_port as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( nrf_sockaddr_in ) , "::" , stringify ! ( sin_port ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_sockaddr_in > ( ) ) ) . sin_addr as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( nrf_sockaddr_in ) , "::" , stringify ! ( sin_addr ) ) ) ; } pub type nrf_sockaddr_t = nrf_sockaddr ; pub type nrf_sockaddr_in6_t = nrf_sockaddr_in6 ; pub type nrf_in6_addr_t = nrf_in6_addr ; pub type nrf_sockaddr_in_t = nrf_sockaddr_in ; # [ doc = "@defgroup nrf_socket_dns BSD Socket Address Functions (DNS)" ] # [ doc = " @ingroup nrf_socket" ] # [ doc = " @{" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct nrf_addrinfo { # [ doc = "< Input flags." ] pub ai_flags : ctypes :: c_int , # [ doc = "< Address family of the socket." ] pub ai_family : ctypes :: c_int , # [ doc = "< Socket type." ] pub ai_socktype : ctypes :: c_int , # [ doc = "< Protocol of the socket." ] pub ai_protocol : ctypes :: c_int , # [ doc = "< Length of the socket address." ] pub ai_addrlen : nrf_socklen_t , # [ doc = "< Address of the socket." ] pub ai_addr : * mut nrf_sockaddr , # [ doc = "< Canonical name of service location." ] pub ai_canonname : * mut ctypes :: c_char , # [ doc = "< Pointer to next in list." ] pub ai_next : * mut nrf_addrinfo , } # [ test ] fn bindgen_test_layout_nrf_addrinfo ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nrf_addrinfo > ( ) , 32usize , concat ! ( "Size of: " , stringify ! ( nrf_addrinfo ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nrf_addrinfo > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( nrf_addrinfo ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_addrinfo > ( ) ) ) . ai_flags as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nrf_addrinfo ) , "::" , stringify ! ( ai_flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_addrinfo > ( ) ) ) . ai_family as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( nrf_addrinfo ) , "::" , stringify ! ( ai_family ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_addrinfo > ( ) ) ) . ai_socktype as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( nrf_addrinfo ) , "::" , stringify ! ( ai_socktype ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_addrinfo > ( ) ) ) . ai_protocol as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( nrf_addrinfo ) , "::" , stringify ! ( ai_protocol ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_addrinfo > ( ) ) ) . ai_addrlen as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( nrf_addrinfo ) , "::" , stringify ! ( ai_addrlen ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_addrinfo > ( ) ) ) . ai_addr as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( nrf_addrinfo ) , "::" , stringify ! ( ai_addr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_addrinfo > ( ) ) ) . ai_canonname as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( nrf_addrinfo ) , "::" , stringify ! ( ai_canonname ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_addrinfo > ( ) ) ) . ai_next as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( nrf_addrinfo ) , "::" , stringify ! ( ai_next ) ) ) ; } # [ doc = "@brief Defines TLS role on the socket." ] # [ doc = "" ] # [ doc = " @details Valid values for the role include:" ] # [ doc = " 0 and 1." ] # [ doc = " 0 implies a TLS client role." ] # [ doc = " 1 implies a TLS server role." ] # [ doc = "" ] # [ doc = " @note The default role is the TLS client role." ] pub type nrf_sec_role_t = u32 ; # [ doc = "@brief Defines the security tag to be used on the TLS socket." ] # [ doc = "" ] # [ doc = " @details More than one security tags may be used on a socket." ] # [ doc = " If more than one tag is used on the socket," ] # [ doc = " set the array of security tags." ] # [ doc = " A maximum of 8 tags can be set per socket." ] pub type nrf_sec_tag_t = u32 ; # [ doc = "@brief Defines session cache option on the TLS socket." ] # [ doc = "" ] # [ doc = " @details Valid values used to set the choice of session cache include:" ] # [ doc = " 0 and 1." ] # [ doc = " 0 implies session cache is enabled." ] # [ doc = " 1 implies session cache is disabled." ] # [ doc = "" ] # [ doc = " @note By default, the session cache is disabled." ] # [ doc = " @note Session cache, even if enabled may not be used if the peer does not support it." ] pub type nrf_sec_session_cache_t = u8 ; # [ doc = "@brief Defines peer verification options on the TLS socket." ] # [ doc = "" ] # [ doc = " @details Valid values for the peer verification option include:" ] # [ doc = " 0, 1 and 2." ] # [ doc = " 0 implies no peer verification." ] # [ doc = " 1 implies peer verification is optional." ] # [ doc = " 2 implies peer verification is strict (mandatory)." ] # [ doc = "" ] # [ doc = " @note By default, peer verification is set to strict." ] pub type nrf_sec_peer_verify_t = u32 ; # [ doc = "@brief Defines the cipher suite." ] # [ doc = "" ] # [ doc = " @details IANA defined values must be used to identify the cipher." ] # [ doc = " See https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-4 for the list." ] # [ doc = "" ] # [ doc = " @note Implementation support only a limited subset of the values." ] pub type nrf_sec_cipher_t = u32 ; # [ doc = "@brief Data type to combine all security configuration parameters." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct nrf_sec_config_t { # [ doc = "< Local role to be played. See @nrf_sec_role_t for details." ] pub role : nrf_sec_role_t , # [ doc = "< Indicates the preference for peer verification. See @nrf_sec_peer_verify_t for details." ] pub peer_verify : nrf_sec_peer_verify_t , # [ doc = "< Indicates the preference for session caching. See @nrf_sec_session_cache_t for details." ] pub session_cache : nrf_sec_session_cache_t , # [ doc = "< Indicates the number of entries in the cipher list." ] pub cipher_count : u32 , # [ doc = "< Indicates the list of ciphers to be used for the session. See @nrf_sec_cipher_t for details." ] pub p_cipher_list : * mut nrf_sec_cipher_t , # [ doc = "< Indicates the number of entries in the sec tag list." ] pub sec_tag_count : u32 , # [ doc = "< Indicates the list of security tags to be used for the session. See @nrf_sec_tag_t for details." ] pub p_sec_tag_list : * mut nrf_sec_tag_t , } # [ test ] fn bindgen_test_layout_nrf_sec_config_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nrf_sec_config_t > ( ) , 28usize , concat ! ( "Size of: " , stringify ! ( nrf_sec_config_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nrf_sec_config_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( nrf_sec_config_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_sec_config_t > ( ) ) ) . role as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nrf_sec_config_t ) , "::" , stringify ! ( role ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_sec_config_t > ( ) ) ) . peer_verify as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( nrf_sec_config_t ) , "::" , stringify ! ( peer_verify ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_sec_config_t > ( ) ) ) . session_cache as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( nrf_sec_config_t ) , "::" , stringify ! ( session_cache ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_sec_config_t > ( ) ) ) . cipher_count as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( nrf_sec_config_t ) , "::" , stringify ! ( cipher_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_sec_config_t > ( ) ) ) . p_cipher_list as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( nrf_sec_config_t ) , "::" , stringify ! ( p_cipher_list ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_sec_config_t > ( ) ) ) . sec_tag_count as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( nrf_sec_config_t ) , "::" , stringify ! ( sec_tag_count ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_sec_config_t > ( ) ) ) . p_sec_tag_list as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( nrf_sec_config_t ) , "::" , stringify ! ( p_sec_tag_list ) ) ) ; } # [ doc = "@brief Data type for network interface." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct nrf_ifreq { pub ifr_name : [ ctypes :: c_char ; 64usize ] , } # [ test ] fn bindgen_test_layout_nrf_ifreq ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nrf_ifreq > ( ) , 64usize , concat ! ( "Size of: " , stringify ! ( nrf_ifreq ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nrf_ifreq > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( nrf_ifreq ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_ifreq > ( ) ) ) . ifr_name as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nrf_ifreq ) , "::" , stringify ! ( ifr_name ) ) ) ; } # [ doc = "@defgroup nrf_socketopt_pdn PDN socket option" ] # [ doc = " @ingroup nrf_socket" ] # [ doc = " @brief Data types defined to set and get socket options on a PDN socket." ] # [ doc = " @{" ] # [ doc = " @note the size of the list is provided in the optlen field." ] pub type nrf_pdn_af_list_t = * mut nrf_sa_family_t ; # [ doc = "@brief Defines the format for Address family for the PDN." ] pub type nrf_pdn_class_t = u32 ; # [ doc = "@brief Defines the firmware version." ] # [ doc = "" ] # [ doc = " @details The firmware version is as defined by the RFC 4122." ] pub type nrf_dfu_fw_version_t = [ u8 ; 36usize ] ; # [ doc = "@brief Defines the format for resources available for firmware upgrade," ] # [ doc = " i.e. available flash size in bytes." ] pub type nrf_dfu_resources_t = u32 ; # [ doc = "@brief Defines the format to get/set offset for firmware download." ] pub type nrf_dfu_fw_offset_t = u32 ; # [ doc = "@brief DFU socket error." ] pub type nrf_dfu_err_t = ctypes :: c_int ; # [ doc = "@defgroup nrf_socket_gnss_data_frame GNSS data frames" ] # [ doc = " @ingroup nrf_socket" ] # [ doc = " @brief GNSS Data frame formats." ] # [ doc = " @{" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct nrf_gnss_datetime_t { # [ doc = "< 4-digit representation (Gregorian calendar)." ] pub year : u16 , # [ doc = "< 1...12" ] pub month : u8 , # [ doc = "< 1...31" ] pub day : u8 , # [ doc = "< 0...23" ] pub hour : u8 , # [ doc = "< 0...59" ] pub minute : u8 , # [ doc = "< 0...59" ] pub seconds : u8 , # [ doc = "< 0...999" ] pub ms : u16 , } # [ test ] fn bindgen_test_layout_nrf_gnss_datetime_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nrf_gnss_datetime_t > ( ) , 10usize , concat ! ( "Size of: " , stringify ! ( nrf_gnss_datetime_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nrf_gnss_datetime_t > ( ) , 2usize , concat ! ( "Alignment of " , stringify ! ( nrf_gnss_datetime_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_datetime_t > ( ) ) ) . year as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_datetime_t ) , "::" , stringify ! ( year ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_datetime_t > ( ) ) ) . month as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_datetime_t ) , "::" , stringify ! ( month ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_datetime_t > ( ) ) ) . day as * const _ as usize } , 3usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_datetime_t ) , "::" , stringify ! ( day ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_datetime_t > ( ) ) ) . hour as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_datetime_t ) , "::" , stringify ! ( hour ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_datetime_t > ( ) ) ) . minute as * const _ as usize } , 5usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_datetime_t ) , "::" , stringify ! ( minute ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_datetime_t > ( ) ) ) . seconds as * const _ as usize } , 6usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_datetime_t ) , "::" , stringify ! ( seconds ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_datetime_t > ( ) ) ) . ms as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_datetime_t ) , "::" , stringify ! ( ms ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct nrf_gnss_sv_t { # [ doc = "< SV number 1...32 for GPS." ] pub sv : u16 , # [ doc = "< Signal type. 0: invalid, 1: GPS L1C/A, other values are reserved for other GNSSes or signals." ] pub signal : u8 , # [ doc = "< 0.1 dB/Hz." ] pub cn0 : u16 , # [ doc = "< SV elevation angle in degrees." ] pub elevation : i16 , # [ doc = "< SV azimuth angle in degrees." ] pub azimuth : i16 , # [ doc = "< Bit mask of measurement and position computation flags." ] pub flags : u8 , } # [ test ] fn bindgen_test_layout_nrf_gnss_sv_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nrf_gnss_sv_t > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( nrf_gnss_sv_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nrf_gnss_sv_t > ( ) , 2usize , concat ! ( "Alignment of " , stringify ! ( nrf_gnss_sv_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_sv_t > ( ) ) ) . sv as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_sv_t ) , "::" , stringify ! ( sv ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_sv_t > ( ) ) ) . signal as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_sv_t ) , "::" , stringify ! ( signal ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_sv_t > ( ) ) ) . cn0 as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_sv_t ) , "::" , stringify ! ( cn0 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_sv_t > ( ) ) ) . elevation as * const _ as usize } , 6usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_sv_t ) , "::" , stringify ! ( elevation ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_sv_t > ( ) ) ) . azimuth as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_sv_t ) , "::" , stringify ! ( azimuth ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_sv_t > ( ) ) ) . flags as * const _ as usize } , 10usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_sv_t ) , "::" , stringify ! ( flags ) ) ) ; } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct nrf_gnss_pvt_data_frame_t { # [ doc = "< Latitude in degrees." ] pub latitude : f64 , # [ doc = "< Longitude in degrees." ] pub longitude : f64 , # [ doc = "< Altitude above WGS-84 ellipsoid in meters." ] pub altitude : f32 , # [ doc = "< Accuracy (2D 1-sigma) in meters." ] pub accuracy : f32 , # [ doc = "< Horizontal speed in meters." ] pub speed : f32 , # [ doc = "< Heading of user movement in degrees." ] pub heading : f32 , pub datetime : nrf_gnss_datetime_t , # [ doc = "< Position dilution of precision." ] pub pdop : f32 , # [ doc = "< Horizontal dilution of precision." ] pub hdop : f32 , # [ doc = "< Vertical dilution of precision." ] pub vdop : f32 , # [ doc = "< Time dilution of precision." ] pub tdop : f32 , # [ doc = "< Bit 0 (LSB): fix validity. Bit 1: Leap second validity. Bit 2: If set, the GNSS operation is blocked, for example, by LTE." ] pub flags : u8 , # [ doc = "< Describes up to 12 of the space vehicles used for the measurement." ] pub sv : [ nrf_gnss_sv_t ; 12usize ] , pub __bindgen_padding_0 : u16 , } # [ test ] fn bindgen_test_layout_nrf_gnss_pvt_data_frame_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nrf_gnss_pvt_data_frame_t > ( ) , 208usize , concat ! ( "Size of: " , stringify ! ( nrf_gnss_pvt_data_frame_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nrf_gnss_pvt_data_frame_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( nrf_gnss_pvt_data_frame_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_pvt_data_frame_t > ( ) ) ) . latitude as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_pvt_data_frame_t ) , "::" , stringify ! ( latitude ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_pvt_data_frame_t > ( ) ) ) . longitude as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_pvt_data_frame_t ) , "::" , stringify ! ( longitude ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_pvt_data_frame_t > ( ) ) ) . altitude as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_pvt_data_frame_t ) , "::" , stringify ! ( altitude ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_pvt_data_frame_t > ( ) ) ) . accuracy as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_pvt_data_frame_t ) , "::" , stringify ! ( accuracy ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_pvt_data_frame_t > ( ) ) ) . speed as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_pvt_data_frame_t ) , "::" , stringify ! ( speed ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_pvt_data_frame_t > ( ) ) ) . heading as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_pvt_data_frame_t ) , "::" , stringify ! ( heading ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_pvt_data_frame_t > ( ) ) ) . datetime as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_pvt_data_frame_t ) , "::" , stringify ! ( datetime ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_pvt_data_frame_t > ( ) ) ) . pdop as * const _ as usize } , 44usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_pvt_data_frame_t ) , "::" , stringify ! ( pdop ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_pvt_data_frame_t > ( ) ) ) . hdop as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_pvt_data_frame_t ) , "::" , stringify ! ( hdop ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_pvt_data_frame_t > ( ) ) ) . vdop as * const _ as usize } , 52usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_pvt_data_frame_t ) , "::" , stringify ! ( vdop ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_pvt_data_frame_t > ( ) ) ) . tdop as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_pvt_data_frame_t ) , "::" , stringify ! ( tdop ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_pvt_data_frame_t > ( ) ) ) . flags as * const _ as usize } , 60usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_pvt_data_frame_t ) , "::" , stringify ! ( flags ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_pvt_data_frame_t > ( ) ) ) . sv as * const _ as usize } , 62usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_pvt_data_frame_t ) , "::" , stringify ! ( sv ) ) ) ; } pub type nrf_gnss_nmea_data_frame_t = [ ctypes :: c_char ; 83usize ] ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct nrf_gnss_data_frame_t { pub data_id : u8 , pub __bindgen_padding_0 : u32 , pub __bindgen_anon_1 : nrf_gnss_data_frame_t__bindgen_ty_1 , } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union nrf_gnss_data_frame_t__bindgen_ty_1 { pub pvt : nrf_gnss_pvt_data_frame_t , pub nmea : nrf_gnss_nmea_data_frame_t , _bindgen_union_align : [ u64 ; 26usize ] , } # [ test ] fn bindgen_test_layout_nrf_gnss_data_frame_t__bindgen_ty_1 ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nrf_gnss_data_frame_t__bindgen_ty_1 > ( ) , 208usize , concat ! ( "Size of: " , stringify ! ( nrf_gnss_data_frame_t__bindgen_ty_1 ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nrf_gnss_data_frame_t__bindgen_ty_1 > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( nrf_gnss_data_frame_t__bindgen_ty_1 ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_data_frame_t__bindgen_ty_1 > ( ) ) ) . pvt as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_data_frame_t__bindgen_ty_1 ) , "::" , stringify ! ( pvt ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_data_frame_t__bindgen_ty_1 > ( ) ) ) . nmea as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_data_frame_t__bindgen_ty_1 ) , "::" , stringify ! ( nmea ) ) ) ; } # [ test ] fn bindgen_test_layout_nrf_gnss_data_frame_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nrf_gnss_data_frame_t > ( ) , 216usize , concat ! ( "Size of: " , stringify ! ( nrf_gnss_data_frame_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nrf_gnss_data_frame_t > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( nrf_gnss_data_frame_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_gnss_data_frame_t > ( ) ) ) . data_id as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nrf_gnss_data_frame_t ) , "::" , stringify ! ( data_id ) ) ) ; } # [ doc = "@brief Defines the interval between each fix in seconds." ] # [ doc = " @details The default interval is 1 second. 0 denotes a single fix." ] pub type nrf_gnss_fix_interval_t = u16 ; # [ doc = "@brief Defines how long (in seconds) the receiver should try to get a fix." ] # [ doc = " @details The default retry wait time is 60 seconds before it gives up." ] # [ doc = "0 denotes an infinite limit." ] pub type nrf_gnss_fix_retry_t = u16 ; # [ doc = "@brief Defines which GNSS system to use." ] # [ doc = " @details 0 denotes GPS. Currently, only GPS is supported and any other value" ] # [ doc = " returns an error." ] pub type nrf_gnss_system_t = u8 ; # [ doc = "@brief Defines which GNSS output format to use." ] # [ doc = " @details 0 denotes RAW GPS data defined in nrf_gnss_raw_data_frame_t." ] # [ doc = " 1 denotes NPEA formated data frames. Any other value returns" ] # [ doc = " an error." ] pub type nrf_gnss_data_format_t = u8 ; # [ doc = "@brief Defines at which elevation the GPS should track a satellite." ] # [ doc = " @details This option is used to make the GPS stop tracking GPSes on a" ] # [ doc = " certain elevation, because the information sent from the GPS gets more" ] # [ doc = " inaccurate as it gets closer to the horizon. Acceptable values" ] # [ doc = " are between 0 and 30 degrees." ] pub type nrf_gnss_elevation_mask_t = u8 ; # [ doc = "@brief Defines if NMEA frames should be added." ] pub type nrf_gnss_nmea_mask_t = u16 ; extern "C" { # [ doc = " @brief Function for creating a socket." ] # [ doc = "" ] # [ doc = " @details API to create a socket that can be used for network communication independently" ] # [ doc = " of lower protocol layers." ] # [ doc = "" ] # [ doc = " @param[in] family The protocol family of the network protocol to use." ] # [ doc = " @param[in] type The protocol type to use for this socket." ] # [ doc = " @param[in] protocol The transport protocol to use for this socket." ] # [ doc = "" ] # [ doc = " @return A non-negative socket descriptor on success, or -1 on error." ] pub fn nrf_socket ( family : ctypes :: c_int , type_ : ctypes :: c_int , protocol : ctypes :: c_int ) -> ctypes :: c_int ; } extern "C" { # [ doc = " @brief Function for closing a socket and freeing any resources held by it." ] # [ doc = "" ] # [ doc = " @details If the socket is already closed, this function does nothing." ] # [ doc = "" ] # [ doc = " @param[in] sock The socket to close." ] # [ doc = "" ] # [ doc = " @return 0 on success, or -1 on error." ] pub fn nrf_close ( sock : ctypes :: c_int ) -> ctypes :: c_int ; } extern "C" { # [ doc = " @brief Function for controlling file descriptor options." ] # [ doc = "" ] # [ doc = " @details Set or get file descriptor options or flags. For a list of supported commands, refer" ] # [ doc = " to @ref nrf_fcnt_commands." ] # [ doc = " For a list of supported flags, refer to @ref nrf_fcnt_flags." ] # [ doc = "" ] # [ doc = " @param[in] fd The descriptor to set options on." ] # [ doc = " @param[in] cmd The command class for options." ] # [ doc = " @param[in] flags The flags to set." ] pub fn nrf_fcntl ( fd : ctypes :: c_int , cmd : ctypes :: c_int , flags : ctypes :: c_int ) -> ctypes :: c_int ; } extern "C" { # [ doc = " @brief Function for connecting to an endpoint with a given address." ] # [ doc = "" ] # [ doc = " @details The socket handle must be a valid handle that has not yet been connected. Running" ] # [ doc = " connect on a connected handle will return an error." ] # [ doc = "" ] # [ doc = " @param[in] sock The socket to use for connection." ] # [ doc = " @param[in] p_servaddr The address of the server to connect to." ] # [ doc = " @param[in] addrlen The size of the p_servaddr argument." ] # [ doc = "" ] # [ doc = " @return 0 on success, or -1 on error." ] pub fn nrf_connect ( sock : ctypes :: c_int , p_servaddr : * const ctypes :: c_void , addrlen : nrf_socklen_t ) -> ctypes :: c_int ; } extern "C" { # [ doc = " @brief Function for sending data through a socket." ] # [ doc = "" ] # [ doc = " @details By default, this function will block unless the NRF_O_NONBLOCK" ] # [ doc = " socket option has been set, OR NRF_MSG_DONTWAIT is passed as a flag. In that case, the" ] # [ doc = " method will return immediately." ] # [ doc = "" ] # [ doc = " @param[in] sock The socket to write data to." ] # [ doc = " @param[in] p_buff Buffer containing the data to send." ] # [ doc = " @param[in] nbytes Size of data contained on p_buff." ] # [ doc = " @param[in] flags Flags to control send behavior." ] # [ doc = "" ] # [ doc = " @return The number of bytes that were sent on success, or -1 on error." ] pub fn nrf_send ( sock : ctypes :: c_int , p_buff : * const ctypes :: c_void , nbytes : usize , flags : ctypes :: c_int ) -> isize ; } extern "C" { # [ doc = " @brief Function for sending datagram through a socket." ] # [ doc = "" ] # [ doc = " @details By default, this function will block if the lower layers are not able to process the" ] # [ doc = " packet, unless the NRF_O_NONBLOCK socket option has been set, OR NRF_MSG_DONTWAIT is passed as a flag." ] # [ doc = " In that case, the method will return immediately." ] # [ doc = "" ] # [ doc = " @param[in] sock The socket to write data to." ] # [ doc = " @param[in] p_buff Buffer containing the data to send." ] # [ doc = " @param[in] nbytes Size of data contained in p_buff." ] # [ doc = " @param[in] flags Flags to control send behavior." ] # [ doc = " @param[in] p_servaddr The address of the server to send to." ] # [ doc = " @param[in] addrlen The size of the p_servaddr argument." ] # [ doc = "" ] # [ doc = " @return The number of bytes that were sent on success, or -1 on error." ] pub fn nrf_sendto ( sock : ctypes :: c_int , p_buff : * const ctypes :: c_void , nbytes : usize , flags : ctypes :: c_int , p_servaddr : * const ctypes :: c_void , addrlen : nrf_socklen_t ) -> isize ; } extern "C" { # [ doc = " @brief Function for writing data to a socket. See \\ref nrf_send() for details." ] # [ doc = "" ] # [ doc = " @param[in] sock The socket to write data to." ] # [ doc = " @param[in] p_buff Buffer containing the data to send." ] # [ doc = " @param[in] nbytes Size of data contained in p_buff." ] # [ doc = "" ] # [ doc = " @return The number of bytes that were sent on success, or -1 on error." ] pub fn nrf_write ( sock : ctypes :: c_int , p_buff : * const ctypes :: c_void , nbytes : usize ) -> isize ; } extern "C" { # [ doc = " @brief Function for receiving data on a socket." ] # [ doc = "" ] # [ doc = " @details API for receiving data from a socket. By default, this function will block, unless the" ] # [ doc = " NRF_O_NONBLOCK socket option has been set, or NRF_MSG_DONTWAIT is passed as a flag." ] # [ doc = "" ] # [ doc = " @param[in] sock The socket to receive data from." ] # [ doc = " @param[out] p_buff Buffer to hold the data to be read." ] # [ doc = " @param[in] nbytes Number of bytes to read. Should not be larger than the size of p_buff." ] # [ doc = " @param[in] flags Flags to control receive behavior." ] # [ doc = "" ] # [ doc = " @return The number of bytes that were read, or -1 on error." ] pub fn nrf_recv ( sock : ctypes :: c_int , p_buff : * mut ctypes :: c_void , nbytes : usize , flags : ctypes :: c_int ) -> isize ; } extern "C" { # [ doc = " @brief Function for receiving datagram on a socket." ] # [ doc = "" ] # [ doc = " @details API for receiving data from a socket. By default, this function will block, unless the" ] # [ doc = " NRF_O_NONBLOCK socket option has been set, or NRF_MSG_DONTWAIT is passed as a flag." ] # [ doc = "" ] # [ doc = " @param[in] sock The socket to receive data from." ] # [ doc = " @param[out] p_buff Buffer to hold the data to be read." ] # [ doc = " @param[in] nbytes Number of bytes to read. Should not be larger than the size of p_buff." ] # [ doc = " @param[in] flags Flags to control receive behavior." ] # [ doc = " @param[out] p_cliaddr Socket address that will be set to the client's address." ] # [ doc = " @param[inout] p_addrlen The size of the p_cliaddr passed. Might be modified by the function." ] # [ doc = "" ] # [ doc = " @return The number of bytes that were read, or -1 on error." ] pub fn nrf_recvfrom ( sock : ctypes :: c_int , p_buff : * mut ctypes :: c_void , nbytes : usize , flags : ctypes :: c_int , p_cliaddr : * mut ctypes :: c_void , p_addrlen : * mut nrf_socklen_t ) -> isize ; } extern "C" { # [ doc = " @brief Function for reading data from a socket. See \\ref nrf_recv() for details." ] # [ doc = "" ] # [ doc = " @param[in] sock The socket to receive data from." ] # [ doc = " @param[out] p_buff Buffer to hold the data to be read." ] # [ doc = " @param[in] nbytes Number of bytes to read. Should not be larger than the size of p_buff." ] # [ doc = "" ] # [ doc = " @return The number of bytes that were read, or -1 on error." ] pub fn nrf_read ( sock : ctypes :: c_int , p_buff : * mut ctypes :: c_void , nbytes : usize ) -> isize ; } # [ doc = " @defgroup nrf_fd_set_api API for file descriptor set" ] # [ doc = " @ingroup nrf_socket" ] # [ doc = " @details File descriptor sets are used as input to the nrf_select() function for doing I/O" ] # [ doc = " multiplexing. The maximum number of descriptors contained in a set is defined by" ] # [ doc = " NRF_FD_SETSIZE." ] # [ doc = "" ] # [ doc = " @{" ] pub type nrf_fd_set = u32 ; extern "C" { # [ doc = " @brief Function for waiting for read, write, or exception events on a socket." ] # [ doc = "" ] # [ doc = " @details Wait for a set of socket descriptors to be ready for reading, writing, or having" ] # [ doc = " exceptions. The set of socket descriptors is configured before calling this function." ] # [ doc = " This function will block until any of the descriptors in the set has any of the required" ] # [ doc = " events. This function is mostly useful when using NRF_O_NONBLOCK or NRF_MSG_DONTWAIT" ] # [ doc = " options to enable asynchronous operation." ] # [ doc = "" ] # [ doc = " @param[in] nfds The highest socket descriptor value contained in the sets." ] # [ doc = " @param[inout] p_readset The set of descriptors for which to wait for read events. Set to NULL" ] # [ doc = " if not used." ] # [ doc = " @param[inout] p_writeset The set of descriptors for which to wait for write events. Set to NULL" ] # [ doc = " if not used." ] # [ doc = " @param[inout] p_exceptset The set of descriptors for which to wait for exception events. Set to" ] # [ doc = " NULL if not used." ] # [ doc = " @param[in] p_timeout The timeout to use for select call. Set to NULL if waiting forever." ] # [ doc = "" ] # [ doc = " @return The number of ready descriptors contained in the descriptor sets on success, or -1 on error." ] pub fn nrf_select ( nfds : ctypes :: c_int , p_readset : * mut nrf_fd_set , p_writeset : * mut nrf_fd_set , p_exceptset : * mut nrf_fd_set , p_timeout : * const nrf_timeval ) -> ctypes :: c_int ; } # [ doc = " @defgroup nrf_poll_api Interface for polling for socket events." ] # [ doc = " @ingroup nrf_socket" ] # [ doc = " @details Necessary data types, methods and defines to poll for" ] # [ doc = " events on one or more sockets." ] # [ doc = "" ] # [ doc = " @{" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct nrf_pollfd { pub handle : ctypes :: c_int , pub requested : ctypes :: c_short , pub returned : ctypes :: c_short , } # [ test ] fn bindgen_test_layout_nrf_pollfd ( ) { assert_eq ! ( :: core :: mem :: size_of :: < nrf_pollfd > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( nrf_pollfd ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < nrf_pollfd > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( nrf_pollfd ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_pollfd > ( ) ) ) . handle as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( nrf_pollfd ) , "::" , stringify ! ( handle ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_pollfd > ( ) ) ) . requested as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( nrf_pollfd ) , "::" , stringify ! ( requested ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < nrf_pollfd > ( ) ) ) . returned as * const _ as usize } , 6usize , concat ! ( "Offset of field: " , stringify ! ( nrf_pollfd ) , "::" , stringify ! ( returned ) ) ) ; } extern "C" { # [ doc = " @brief Method to poll for events on one or more sockets." ] # [ doc = "" ] # [ doc = " @param[inout] An array of sockets, and respective for each socket that the caller polls for." ] # [ doc = " The occurred events per socket is returned in the requested field of @ref struct nrf_pollfd structure." ] # [ doc = " Shall not be NULL." ] # [ doc = " @param[in] Positive number of sockets being polled for events." ] # [ doc = " Shall not be more than @ref BSD_MAX_SOCKET_COUNT." ] # [ doc = "" ] # [ doc = " @param[in] Timeout in milliseconds." ] # [ doc = " The methods waits for this time period for the events to occur on the sockets." ] # [ doc = "" ] # [ doc = " @retval A positive number less than or equal to nfds indicating sockets on which events occurred." ] # [ doc = " 0 indicates the timed out occurred and no file descriptors were ready." ] # [ doc = " -1 on error, and errno indicates the reason for failure." ] # [ doc = " @{" ] pub fn nrf_poll ( p_fds : * mut nrf_pollfd , nfds : u32 , timeout : ctypes :: c_int ) -> ctypes :: c_int ; } extern "C" { # [ doc = " @brief Function for setting socket options for a given socket." ] # [ doc = "" ] # [ doc = " @details The options are grouped by level, and the option value should be the expected for the" ] # [ doc = " given option, and the lifetime must be longer than that of the socket." ] # [ doc = "" ] # [ doc = " @param[in] sock The socket for which to set the option." ] # [ doc = " @param[in] level The level or group to which the option belongs." ] # [ doc = " @param[in] optname The name of the socket option." ] # [ doc = " @param[in] p_optval The value to be stored for this option." ] # [ doc = " @param[in] optlen The size of p_optval." ] # [ doc = "" ] # [ doc = " @return 0 on success, or -1 on error." ] pub fn nrf_setsockopt ( sock : ctypes :: c_int , level : ctypes :: c_int , optname : ctypes :: c_int , p_optval : * const ctypes :: c_void , optlen : nrf_socklen_t ) -> ctypes :: c_int ; } extern "C" { # [ doc = " @brief Function for getting socket options for a given socket." ] # [ doc = "" ] # [ doc = " @details The options are grouped by level, and the option value is the value described by the" ] # [ doc = " option name." ] # [ doc = "" ] # [ doc = " @param[in] sock The socket for which to set the option." ] # [ doc = " @param[in] level The level or group to which the option belongs." ] # [ doc = " @param[in] optname The name of the socket option." ] # [ doc = " @param[out] p_optval Pointer to the storage for the option value." ] # [ doc = " @param[inout] p_optlen The size of p_optval. Can be modified to the actual size of p_optval." ] # [ doc = "" ] # [ doc = " @return 0 on success, or -1 on error." ] pub fn nrf_getsockopt ( sock : ctypes :: c_int , level : ctypes :: c_int , optname : ctypes :: c_int , p_optval : * mut ctypes :: c_void , p_optlen : * mut nrf_socklen_t ) -> ctypes :: c_int ; } extern "C" { # [ doc = " @brief Function for binding a socket to an address and port." ] # [ doc = "" ] # [ doc = " @details The provided address must be supported by the socket protocol family." ] # [ doc = "" ] # [ doc = " @param[in] sock The socket descriptor to bind." ] # [ doc = " @param[in] p_myaddr The address to bind this socket to." ] # [ doc = " @param[in] addrlen The size of p_myaddr." ] # [ doc = "" ] # [ doc = " @return 0 on success, or -1 on error." ] pub fn nrf_bind ( sock : ctypes :: c_int , p_myaddr : * const ctypes :: c_void , addrlen : nrf_socklen_t ) -> ctypes :: c_int ; } extern "C" { # [ doc = " @brief Function to put the socket in listening mode for incoming connections." ] # [ doc = "" ] # [ doc = " @details Once a socket is marked to be in the listening state, it remains a listening socket until closed." ] # [ doc = " It is important to consider the backlog parameter, as it will affect how much memory your application will" ] # [ doc = " use in the worst case." ] # [ doc = "" ] # [ doc = " @param[in] sock The socket descriptor on which to set the listening options." ] # [ doc = " @param[in] backlog The max length of the queue of pending connections. A value of 0 means" ] # [ doc = " infinite." ] # [ doc = "" ] # [ doc = " @return 0 on success, or -1 on error." ] pub fn nrf_listen ( sock : ctypes :: c_int , backlog : ctypes :: c_int ) -> ctypes :: c_int ; } extern "C" { # [ doc = " @brief Function for waiting for the next client to connect." ] # [ doc = "" ] # [ doc = " @details This function will block if there are no clients attempting to connect." ] # [ doc = "" ] # [ doc = " @param[in] sock The socket descriptor to use for waiting on client connections." ] # [ doc = " @param[out] p_cliaddr Socket address that will be set to the client's address." ] # [ doc = " @param[out] p_addrlen The size of the p_cliaddr passed. Might be modified by the function." ] # [ doc = "" ] # [ doc = " @return A non-negative client descriptor on success, or -1 on error." ] pub fn nrf_accept ( sock : ctypes :: c_int , p_cliaddr : * mut ctypes :: c_void , p_addrlen : * mut nrf_socklen_t ) -> ctypes :: c_int ; } extern "C" { # [ doc = " @brief Function for converting a human-readable IP address to a form usable by the socket API." ] # [ doc = "" ] # [ doc = " @details This function will convert a string form of addresses and encode it into a byte" ] # [ doc = " array in network byte order." ] # [ doc = "" ] # [ doc = " @note Currently not supporting mixed IPv4 and IPv6 format strings." ] # [ doc = "" ] # [ doc = " @param[in] family Address family. NRF_AF_INET or NRF_AF_INET6." ] # [ doc = " @param[in] p_src Null-terminated string containing the address to convert." ] # [ doc = " @param[out] p_dst Pointer to a struct nrf_in_addr or nrf_in6_addr where the address will" ] # [ doc = " be stored." ] # [ doc = "" ] # [ doc = " @return 1 on success, 0 if p_src does not contain a valid address," ] # [ doc = " -1 and errno set in case of error." ] pub fn nrf_inet_pton ( family : ctypes :: c_int , p_src : * const ctypes :: c_char , p_dst : * mut ctypes :: c_void ) -> ctypes :: c_int ; } extern "C" { # [ doc = " @brief Function for converting an IP address to a human-readable string form." ] # [ doc = "" ] # [ doc = " @details This function will decode the IP bytes from network byte order and convert" ] # [ doc = " it to a string form of the address." ] # [ doc = "" ] # [ doc = " @note Currently not supporting mixed IPv4 and IPv6 format strings." ] # [ doc = "" ] # [ doc = " @param[in] family Address family. NRF_AF_INET or NRF_AF_INET6." ] # [ doc = " @param[in] p_src Pointer to a struct nrf_in_addr or nrf_in6_addr containing the address to convert." ] # [ doc = " @param[out] p_dst Pointer to a buffer where the string representation of the address will be stored." ] # [ doc = " @param[in] size Size of the provided buffer in p_dst." ] # [ doc = "" ] # [ doc = " @return Pointer to p_dst on success, NULL and errno set in case of error." ] pub fn nrf_inet_ntop ( family : ctypes :: c_int , p_src : * const ctypes :: c_void , p_dst : * mut ctypes :: c_char , size : nrf_socklen_t ) -> * const ctypes :: c_char ; } extern "C" { # [ doc = "@brief Function to resolve the host name into IPv4 and/or IPv6 addresses." ] # [ doc = "" ] # [ doc = " @note The memory pointed to by @p pp_res must be freed using" ] # [ doc = " @ref nrf_freeaddrinfo when the address is no longer needed" ] # [ doc = " or before calling @ref nrf_getaddrinfo again." ] # [ doc = "" ] # [ doc = " @param[in] p_node Host name to resolve." ] # [ doc = " @param[in] p_service Service to resolve." ] # [ doc = " @param[in] p_hints Any hints to be used for the resolution." ] # [ doc = " @param[out] pp_res Pointer to the linked list of resolved addresses if the procedure" ] # [ doc = " was successful." ] # [ doc = "" ] # [ doc = " @return 0 if the procedure succeeds, else, an errno indicating the reason for failure." ] pub fn nrf_getaddrinfo ( p_node : * const ctypes :: c_char , p_service : * const ctypes :: c_char , p_hints : * const nrf_addrinfo , pp_res : * mut * mut nrf_addrinfo ) -> ctypes :: c_int ; } extern "C" { # [ doc = "@brief Function for freeing the memory allocated for the result of @ref nrf_getaddrinfo." ] # [ doc = "" ] # [ doc = " When the linked list of resolved addresses created by @ref getaddrinfo" ] # [ doc = " is no longer needed, call this function to free the allocated memory." ] # [ doc = "" ] # [ doc = " @param[in] p_res Pointer to the memory to be freed." ] pub fn nrf_freeaddrinfo ( p_res : * mut nrf_addrinfo ) ; } pub const nrf_key_mgnt_cred_type_t_NRF_KEY_MGMT_CRED_TYPE_CA_CHAIN : nrf_key_mgnt_cred_type_t = 0 ; pub const nrf_key_mgnt_cred_type_t_NRF_KEY_MGMT_CRED_TYPE_PUBLIC_CERT : nrf_key_mgnt_cred_type_t = 1 ; pub const nrf_key_mgnt_cred_type_t_NRF_KEY_MGMT_CRED_TYPE_PRIVATE_CERT : nrf_key_mgnt_cred_type_t = 2 ; pub const nrf_key_mgnt_cred_type_t_NRF_KEY_MGMT_CRED_TYPE_PSK : nrf_key_mgnt_cred_type_t = 3 ; pub const nrf_key_mgnt_cred_type_t_NRF_KEY_MGMT_CRED_TYPE_IDENTITY : nrf_key_mgnt_cred_type_t = 4 ; # [ doc = "@brief Enumeration values for credentials types" ] # [ doc = " available in the key management module." ] pub type nrf_key_mgnt_cred_type_t = u32 ; extern "C" { # [ doc = "@brief Provision new or update credential in persistent storage." ] # [ doc = "" ] # [ doc = " This function will store the credential referenced to be stored persistently." ] # [ doc = " The credential can later be referenced for use or managed by nrf_inbuilt_key module" ] # [ doc = " by using the application defined sec_tag." ] # [ doc = "" ] # [ doc = " @param[in] sec_tag Application defined tag for this credential to be referred" ] # [ doc = " to in setting up a BSD Secure Socket or to manage the credential" ] # [ doc = " using nrf_key_mgmt module to read/delete/search the key." ] # [ doc = " @param[in] cred_type Type of credential being created and stored for later use." ] # [ doc = " @param[in] p_buffer Buffer containing the credential data." ] # [ doc = " @param[in] buffer_len Length of the buffer holding the credential data." ] # [ doc = "" ] # [ doc = " @retval 0 If create operation was successful." ] # [ doc = " @retval NRF_EIO If operation was not successful due to internal error or uninitialized" ] # [ doc = " module." ] # [ doc = " @retval NRF_ENOBUFS If the operation could not be performed because it could not allocate" ] # [ doc = " enough intermediate buffers to perform the operation." ] # [ doc = " @retval NRF_ENOENT If the sec_tag indicated cannot be written." ] # [ doc = " @retval NRF_ENOMEM If there was not memory enough to store the credential data." ] # [ doc = " @retval NRF_EPERM If the application did not have permission to do the operation." ] # [ doc = " @retval NRF_EACCES If the operation could not be performed while modem is in active state." ] # [ doc = " @retval NRF_EINVAL If one or more of the provided parameters are not valid." ] pub fn nrf_inbuilt_key_write ( sec_tag : nrf_sec_tag_t , cred_type : nrf_key_mgnt_cred_type_t , p_buffer : * mut u8 , buffer_len : u16 ) -> ctypes :: c_int ; } extern "C" { # [ doc = "@brief Read back a credential from persistent storage." ] # [ doc = "" ] # [ doc = " This function will read the credential from persistent memory referenced by a sec_tag." ] # [ doc = "" ] # [ doc = " @param[in] sec_tag Application defined tag for this credential to read." ] # [ doc = " @param[in] cred_type Type of credential being read." ] # [ doc = " @param[in] p_buffer Output buffer containing where to write the read credential data." ] # [ doc = " @param[inout] p_buffer_len Length of the output buffer as input, and length used as output" ] # [ doc = " parameter." ] # [ doc = "" ] # [ doc = " @retval 0 If read operation was successful." ] # [ doc = " @retval NRF_EIO If operation was not successful due to internal error or uninitialized" ] # [ doc = " module." ] # [ doc = " @retval NRF_ENOBUFS If the operation could not be performed because it could not allocate" ] # [ doc = " enough intermediate buffers to perform the operation." ] # [ doc = " @retval NRF_ENOENT If there was no credential associated with the sec_tag and cred_type." ] # [ doc = " @retval NRF_EPERM If the application did not have permission to do the operation." ] # [ doc = " @retval NRF_EACCES If the operation could not be performed while modem is in active state." ] # [ doc = " @retval NRF_EINVAL If provided buffer is to small for result data. If failing with this error," ] # [ doc = " the size needed is provided as output parameter by reference in the output" ] # [ doc = " p_buffer_len output parameter." ] pub fn nrf_inbuilt_key_read ( sec_tag : nrf_sec_tag_t , cred_type : nrf_key_mgnt_cred_type_t , p_buffer : * mut u8 , p_buffer_len : * mut u16 ) -> ctypes :: c_int ; } extern "C" { # [ doc = "@brief Delete a credential from persistent storage." ] # [ doc = "" ] # [ doc = " This function deletes a stored credential from the persistent storage." ] # [ doc = "" ] # [ doc = " @param[in] sec_tag Application defined tag to delete." ] # [ doc = " @param[in] cred_type Type of credential being deleted." ] # [ doc = "" ] # [ doc = " @retval 0 If delete operation was successful." ] # [ doc = " @retval NRF_EIO If operation was not successful due to internal errors or uninitialized" ] # [ doc = " module." ] # [ doc = " @retval NRF_ENOBUFS If the operation could not be performed because it could not allocate" ] # [ doc = " enough intermediate buffers to perform the operation." ] # [ doc = " @retval NRF_ENOENT If there was no credential associated with the sec_tag and cred_type." ] # [ doc = " @retval NRF_EPERM If the application did not have permission to do the operation." ] # [ doc = " @retval NRF_EACCES If the operation could not be performed while modem is in active state." ] pub fn nrf_inbuilt_key_delete ( sec_tag : nrf_sec_tag_t , cred_type : nrf_key_mgnt_cred_type_t ) -> ctypes :: c_int ; } extern "C" { # [ doc = "@brief Set permission on a credential in persistent storage." ] # [ doc = "" ] # [ doc = " This function will set permissions on the credential referenced in" ] # [ doc = " persistently storage by a sec_tag and credential type." ] # [ doc = "" ] # [ doc = " @param[in] sec_tag Application defined tag for this credential apply the permissions to." ] # [ doc = " @param[in] cred_type Type of credential to apply the permissions to." ] # [ doc = " @param[in] perm_flags Permission flags. Not yet implemented/supported." ] # [ doc = "" ] # [ doc = " @retval 0 If create operation was successful." ] # [ doc = " @retval NRF_EIO If operation was not successful due to internal errors or uninitialized" ] # [ doc = " module." ] # [ doc = " @retval NRF_ENOBUFS If the operation could not be performed because it could not allocate" ] # [ doc = " enough intermediate buffers to perform the operation." ] # [ doc = " @retval NRF_ENOENT If there was no credential associated with the sec_tag and cred_type." ] # [ doc = " @retval NRF_EPERM If the application did not have permission to do the operation." ] # [ doc = " @retval NRF_EACCES If the operation could not be performed while modem is in active state." ] pub fn nrf_inbuilt_key_permission_set ( sec_tag : nrf_sec_tag_t , cred_type : nrf_key_mgnt_cred_type_t , perm_flags : u8 ) -> ctypes :: c_int ; } extern "C" { # [ doc = "@brief Check if credential exists in persistent storage." ] # [ doc = "" ] # [ doc = " This function do a check whether the credential exists in the persistent storage." ] # [ doc = "" ] # [ doc = " @param[in] sec_tag Application defined tag for search for." ] # [ doc = " @param[in] cred_type Type of credential being searched read." ] # [ doc = " @param[out] p_exists Value by reference output parameter telling the existence" ] # [ doc = " of the credential. Only valid if operation was successful." ] # [ doc = " @param[out] p_perm_flags Value by reference output parameter telling the permission" ] # [ doc = " flags of the credential. Only valid if operation was successful" ] # [ doc = " and @param p_exists is true. Not yet implemented/supported." ] # [ doc = "" ] # [ doc = " @retval 0 If delete operation was successful." ] # [ doc = " @retval NRF_EIO If operation was not successful due to internal errors or uninitialized" ] # [ doc = " module." ] # [ doc = " @retval NRF_ENOBUFS If the operation could not be performed because it could not allocate" ] # [ doc = " enough intermediate buffers to perform the operation." ] # [ doc = " @retval NRF_ENOENT If there was no credential associated with the sec_tag and cred_type." ] # [ doc = " @retval NRF_EPERM If the application did not have permission to do the operation." ] # [ doc = " @retval NRF_EACCES If the operation could not be performed while modem is in active state." ] pub fn nrf_inbuilt_key_exists ( sec_tag : nrf_sec_tag_t , cred_type : nrf_key_mgnt_cred_type_t , p_exists : * mut bool_ , p_perm_flags : * mut u8 ) -> ctypes :: c_int ; } [INFO] [stderr] | ^^^^ --------------------------------------------------------- this field does not implement `Copy` [INFO] [stderr] | [INFO] [stderr] = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] For more information about this error, try `rustc --explain E0204`. [INFO] [stderr] error: could not compile `nrfxlib-sys`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: build failed [INFO] running `"docker" "inspect" "a37badad89694ca9a5df5489b6c45c6a7ef436c2bd2ac9fbe6ccbba5a0ee3c03"` [INFO] running `"docker" "rm" "-f" "a37badad89694ca9a5df5489b6c45c6a7ef436c2bd2ac9fbe6ccbba5a0ee3c03"` [INFO] [stdout] a37badad89694ca9a5df5489b6c45c6a7ef436c2bd2ac9fbe6ccbba5a0ee3c03