riot_sys::bindgen

Function sock_ip_send_aux

Source
pub unsafe extern "C" fn sock_ip_send_aux(
    sock: *mut sock_ip_t,
    data: *const c_void,
    len: size_t,
    proto: u8,
    remote: *const sock_ip_ep_t,
    aux: *mut sock_ip_aux_tx_t,
) -> ssize_t
Expand description

@brief Sends a message over IPv4/IPv6 to remote end point

@pre ((sock != NULL || remote != NULL)) && (if (len != 0): (data != NULL))

@param[in] sock A raw IPv4/IPv6 sock object. May be NULL. A sensible local end point should be selected by the implementation in that case. @param[in] data Pointer where the received data should be stored. May be NULL if len == 0. @param[in] len Maximum space available at @p data. @param[in] proto Protocol to use in the packet sent, in case sock == NULL. If sock != NULL this parameter will be ignored. @param[in] remote Remote end point for the sent data. May be NULL, if @p sock has a remote end point. sock_ip_ep_t::family may be AF_UNSPEC, if local end point of @p sock provides this information. @param[out] aux Auxiliary data for the transmission. May be NULL if not needed by the caller.

@return The number of bytes sent on success. @return -EAFNOSUPPORT, if remote != NULL and sock_ip_ep_t::family of @p remote is != AF_UNSPEC and not supported. @return -EINVAL, if sock_ip_ep_t::addr of @p remote is an invalid address. @return -EINVAL, if sock_ip_ep_t::netif of @p remote is not a valid interface or contradicts the local interface of @p sock. @return -EHOSTUNREACH, if @p remote or remote end point of @p sock is not reachable. @return -ENOMEM, if no memory was available to send @p data. @return -ENOTCONN, if remote == NULL, but @p sock has no remote end point. @return -EPROTOTYPE, if sock == NULL and @p proto is not by sock_ip_ep_t::family of @p remote.