/branches/network/uspace/srv/net/include/icmp_common.h |
---|
42,7 → 42,7 |
/** 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. |
* @returns The ICMP socket identifier if called by the bundle module. |
*/ |
int icmp_connect_module( services_t service ); |
/branches/network/uspace/srv/net/include/icmp_codes.h |
---|
78,7 → 78,7 |
*/ |
#define ICMP_ECHO 8 |
/** Router advertisement. |
/** Router Advertisement. |
*/ |
#define ICMP_ROUTER_ADV 9 |
/branches/network/uspace/srv/net/include/icmp_interface.h |
---|
59,19 → 59,52 |
*/ |
/*@{*/ |
/** \todo |
/** Sends the Destination Unreachable error notification packet. |
* Beginning of the packet is sent as the notification packet data. |
* The source and the destination addresses should be set in the original packet. |
* @param icmp_phone The ICMP module phone used for (semi)remote calls. Input parameter. |
* @param code The error specific code. Input parameter. |
* @param mtu The error MTU value. Input parameter. |
* @param packet The original packet. |
* @returns EOK on success. |
* @returns EPERM if the ICMP error notifications are disabled. |
* @returns ENOMEM if there is not enough memory left. |
*/ |
int icmp_destination_unreachable_msg( int icmp_phone, icmp_code_t code, icmp_param_t mtu, packet_t packet ); |
/** \todo |
/** Sends the Source Quench error notification packet. |
* Beginning of the packet is sent as the notification packet data. |
* The source and the destination addresses should be set in the original packet. |
* @param icmp_phone The ICMP module phone used for (semi)remote calls. Input parameter. |
* @param packet The original packet. |
* @returns EOK on success. |
* @returns EPERM if the ICMP error notifications are disabled. |
* @returns ENOMEM if there is not enough memory left. |
*/ |
int icmp_source_quench_msg( int icmp_phone, packet_t packet ); |
/** \todo |
/** Sends the Time Exceeded error notification packet. |
* Beginning of the packet is sent as the notification packet data. |
* The source and the destination addresses should be set in the original packet. |
* @param icmp_phone The ICMP module phone used for (semi)remote calls. Input parameter. |
* @param code The error specific code. Input parameter. |
* @param packet The original packet. |
* @returns EOK on success. |
* @returns EPERM if the ICMP error notifications are disabled. |
* @returns ENOMEM if there is not enough memory left. |
*/ |
int icmp_time_exceeded_msg( int icmp_phone, icmp_code_t code, packet_t packet ); |
/** \todo |
/** Sends the Parameter Problem error notification packet. |
* Beginning of the packet is sent as the notification packet data. |
* The source and the destination addresses should be set in the original packet. |
* @param icmp_phone The ICMP module phone used for (semi)remote calls. Input parameter. |
* @param code The error specific code. Input parameter. |
* @param pointer The problematic parameter offset. Input parameter. |
* @param packet The original packet. |
* @returns EOK on success. |
* @returns EPERM if the ICMP error notifications are disabled. |
* @returns ENOMEM if there is not enough memory left. |
*/ |
int icmp_parameter_problem_msg( int icmp_phone, icmp_code_t code, icmp_param_t pointer, packet_t packet ); |
/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 |
/branches/network/uspace/srv/net/include/icmp_client.h |
---|
40,7 → 40,14 |
#include "icmp_codes.h" |
#include "../structures/packet/packet.h" |
/** \todo |
/** Processes the received packet prefixed with an ICMP header. |
* @param packet The received packet. Input parameter. |
* @param type The ICMP header type. Output parameter. |
* @param code The ICMP header code. Output parameter. |
* @param pointer The ICMP header pointer. Output parameter. |
* @param mtu The ICMP header MTU. Output parameter. |
* @returns The ICMP header length. |
* @returns ENOMEM if the packet contains no data. |
*/ |
int icmp_client_process_packet( packet_t packet, icmp_type_t * type, icmp_code_t * code, icmp_param_t * pointer, icmp_param_t * mtu ); |
/branches/network/uspace/srv/net/include/ip_interface.h |
---|
98,7 → 98,7 |
* @param device_id The device identifier. Input parameter. |
* @param packet The packet queue. Input parameter. |
* @param sender The sending module service. Input parameter. |
* @param target The target transport layer module service to be delivered to. Input parameter. |
* @param error The packet error reporting service. Prefixes the received packet. Input parameter. |
* @returns EOK on success. |
* @returns Other error codes as defined for the generic_send_msg() function. |
*/ |
/branches/network/uspace/srv/net/include/socket.h |
---|
44,6 → 44,7 |
#include "inet.h" |
#include "socket_codes.h" |
#include "socket_errno.h" |
/** @name Socket application programming interface |
*/ |