Changeset 1916d1f in mainline for uspace/lib/c/generic/net/icmp_api.c


Ignore:
Timestamp:
2011-07-12T13:41:26Z (13 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
50fc490
Parents:
11809eab (diff), 6817eba (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge libposix changes.

File:
1 edited

Legend:

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

    r11809eab r1916d1f  
    4242#include <net/ip_codes.h>
    4343#include <async.h>
    44 #include <async_obsolete.h>
    4544#include <sys/types.h>
    4645#include <sys/time.h>
     
    5554 * timeout occurs.
    5655 *
    57  * @param[in] icmp_phone The ICMP module phone used for (semi)remote calls.
     56 * @param[in] sess The ICMP session.
    5857 * @param[in] size      The message data length in bytes.
    5958 * @param[in] timeout   The timeout in milliseconds.
     
    7473 */
    7574int
    76 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,
    7776    ip_tos_t tos, int dont_fragment, const struct sockaddr *addr,
    7877    socklen_t addrlen)
     
    8382        if (addrlen <= 0)
    8483                return EINVAL;
    85 
    86         message_id = async_obsolete_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,
    8788            tos, (sysarg_t) dont_fragment, NULL);
    88 
     89       
    8990        /* Send the address */
    90         async_obsolete_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);
    9194
    9295        async_wait_for(message_id, &result);
Note: See TracChangeset for help on using the changeset viewer.