Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4719 → Rev 4720

/branches/network/uspace/srv/net/include/icmp_api.h
51,22 → 51,35
#include "icmp_codes.h"
#include "icmp_common.h"
 
/** Miliseconds type definition.
*/
typedef size_t mseconds_t;
 
/** @name ICMP module application interface
* This interface is used by other application modules.
*/
/*@{*/
 
/** \todo
/** Requests an echo message.
* Sends a packet with specified parameters to the target host and waits for the reply upto the given timeout.
* Blocks the caller until the reply or the timeout occurres.
* @param icmp_phone The ICMP module phone used for (semi)remote calls. Input parameter.
* @param size The message data length in bytes. Input parameter.
* @param timeout The timeout in miliseconds. Input parameter.
* @param ttl The time to live. Input parameter.
* @param tos The type of service. Input parameter.
* @param dont_fragment The value indicating whether the datagram must not be fragmented. Is used as a MTU discovery. Input parameter.
* @param addr The target host address. Input parameter.
* @param addrlen The torget host address length. Input parameter.
* @returns ICMP_ECHO on success.
* @returns ETIMEOUT if the reply has not arrived before the timeout.
* @returns ICMP type of the received error notification.
* @returns EINVAL if the addrlen parameter is less or equal to zero (<=0).
* @returns ENOMEM if there is not enough memory left.
* @returns EPARTY if there was an internal error.
*/
int icmp_echo_msg( int icmp_phone, size_t size, suseconds_t timeout, ip_ttl_t ttl, ip_tos_t tos, int dont_fragment, const struct sockaddr * addr, socklen_t addrlen );
int icmp_echo_msg( int icmp_phone, size_t size, mseconds_t timeout, ip_ttl_t ttl, ip_tos_t tos, int dont_fragment, const struct sockaddr * addr, socklen_t addrlen );
 
/** Connects to the ICMP module.
* @param service The ICMP module service. Ignored parameter.
* @returns The ICMP module phone on success.
* @returns 0 if called by the bundle module.
*/
int icmp_connect_module( services_t service );
 
/*@}*/
 
#endif