Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/net/icmp_api.c

    r64d2b10 r6b82009  
    5454 * timeout occurs.
    5555 *
    56  * @param[in] icmp_phone The ICMP module phone used for (semi)remote calls.
     56 * @param[in] sess The ICMP session.
    5757 * @param[in] size      The message data length in bytes.
    5858 * @param[in] timeout   The timeout in milliseconds.
     
    7373 */
    7474int
    75 icmp_echo_msg(int icmp_phone, size_t size, mseconds_t timeout, ip_ttl_t ttl,
     75icmp_echo_msg(async_sess_t *sess, size_t size, mseconds_t timeout, ip_ttl_t ttl,
    7676    ip_tos_t tos, int dont_fragment, const struct sockaddr *addr,
    7777    socklen_t addrlen)
     
    8282        if (addrlen <= 0)
    8383                return EINVAL;
    84 
    85         message_id = async_send_5(icmp_phone, NET_ICMP_ECHO, size, timeout, ttl,
     84       
     85        async_exch_t *exch = async_exchange_begin(sess);
     86       
     87        message_id = async_send_5(exch, NET_ICMP_ECHO, size, timeout, ttl,
    8688            tos, (sysarg_t) dont_fragment, NULL);
    87 
     89       
    8890        /* Send the address */
    89         async_data_write_start(icmp_phone, addr, (size_t) addrlen);
     91        async_data_write_start(exch, addr, (size_t) addrlen);
     92       
     93        async_exchange_end(exch);
    9094
    9195        async_wait_for(message_id, &result);
Note: See TracChangeset for help on using the changeset viewer.