Ignore:
Timestamp:
2010-10-13T22:38:16Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
10056483, b2a109d9
Parents:
f3b4051
Message:

Move ICMP client stuff from libsocket to standard library.

File:
1 moved

Legend:

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

    rf3b4051 r753bca3  
    2727 */
    2828
    29 /** @addtogroup icmp
     29/** @addtogroup libc
    3030 *  @{
    3131 */
    3232
    3333/** @file
    34  *  ICMP common interface implementation.
    35  *  @see icmp_common.h
     34 * ICMP common interface implementation.
     35 * @see icmp_common.h
    3636 */
    3737
     38#include <net/modules.h>
     39#include <net/icmp_common.h>
     40
     41#include <ipc/services.h>
     42#include <ipc/icmp.h>
     43
     44#include <sys/time.h>
    3845#include <async.h>
    39 #include <ipc/services.h>
    4046
    41 #include <net/modules.h>
    42 #include <icmp_common.h>
    43 #include <icmp_messages.h>
    44 
    45 int icmp_connect_module(services_t service, suseconds_t timeout){
     47/** Connects to the ICMP module.
     48 *
     49 * @param service       The ICMP module service. Ignored parameter.
     50 * @param[in] timeout   The connection timeout in microseconds. No timeout if
     51 *                      set to zero.
     52 * @returns             The ICMP module phone on success.
     53 * @returns             ETIMEOUT if the connection timeouted.
     54 */
     55int icmp_connect_module(services_t service, suseconds_t timeout)
     56{
    4657        int phone;
    4758
    4859        phone = connect_to_service_timeout(SERVICE_ICMP, timeout);
    49         if(phone >= 0){
     60        if (phone >= 0)
    5061                async_req_0_0(phone, NET_ICMP_INIT);
    51         }
     62
    5263        return phone;
    5364}
Note: See TracChangeset for help on using the changeset viewer.