riot_sys::bindgen

Function _gnrc_netapi_send_recv

Source
pub unsafe extern "C" fn _gnrc_netapi_send_recv(
    pid: kernel_pid_t,
    pkt: *mut gnrc_pktsnip_t,
    type_: u16,
) -> c_int
Expand description

@brief Shortcut function for sending @ref GNRC_NETAPI_MSG_TYPE_SND or @ref GNRC_NETAPI_MSG_TYPE_RCV messages

@param[in] pid PID of the targeted network module @param[in] pkt pointer into the packet buffer holding the data to send @param[in] type type of the message to send. Must be either @ref GNRC_NETAPI_MSG_TYPE_SND or @ref GNRC_NETAPI_MSG_TYPE_RCV

@return 1 if packet was successfully delivered @return -1 on error (invalid PID or no space in queue)