Changeset f1938c6 in mainline for uspace/lib
- Timestamp:
- 2011-01-17T15:41:30Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a2d8d59, ffaba00
- Parents:
- 9f3864a
- Location:
- uspace/lib
- Files:
-
- 7 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/net/icmp_common.c
r9f3864a rf1938c6 27 27 */ 28 28 29 /** @addtogroup libc 29 /** @addtogroup libc 30 30 * @{ 31 31 */ … … 38 38 #include <net/modules.h> 39 39 #include <net/icmp_common.h> 40 41 40 #include <ipc/services.h> 42 41 #include <ipc/icmp.h> 43 44 42 #include <sys/time.h> 45 43 #include <async.h> 46 44 47 /** Connect sto the ICMP module.45 /** Connect to the ICMP module. 48 46 * 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 * @return The ICMP module phone on success. 53 * @return ETIMEOUT if the connection timeouted. 47 * @param[in] timeout Connection timeout in microseconds, zero 48 * for no timeout. 49 * 50 * @return ICMP module phone on success. 51 * @return ETIMEOUT if the connection timeouted. 52 * 54 53 */ 55 int icmp_connect_module(s ervices_t service, suseconds_t timeout)54 int icmp_connect_module(suseconds_t timeout) 56 55 { 57 int phone; 58 59 phone = connect_to_service_timeout(SERVICE_ICMP, timeout); 60 if (phone >= 0) 61 async_req_0_0(phone, NET_ICMP_INIT); 62 63 return phone; 56 return connect_to_service_timeout(SERVICE_ICMP, timeout); 64 57 } 65 58 -
uspace/lib/c/include/ipc/icmp.h
r9f3864a rf1938c6 33 33 /** @file 34 34 * ICMP module messages. 35 * @see icmp_ interface.h35 * @see icmp_remote.h 36 36 */ 37 37 … … 48 48 /** ICMP module messages. */ 49 49 typedef enum { 50 /** Send secho request. @see icmp_echo() */50 /** Send echo request. @see icmp_echo() */ 51 51 NET_ICMP_ECHO = NET_ICMP_FIRST, 52 52 53 53 /** 54 * Send sdestination unreachable error message.54 * Send destination unreachable error message. 55 55 * @see icmp_destination_unreachable_msg() 56 56 */ … … 58 58 59 59 /** 60 * Send ssource quench error message.60 * Send source quench error message. 61 61 * @see icmp_source_quench_msg() 62 62 */ … … 64 64 65 65 /** 66 * Send stime exceeded error message.66 * Send time exceeded error message. 67 67 * @see icmp_time_exceeded_msg() 68 68 */ … … 70 70 71 71 /** 72 * Send sparameter problem error message.72 * Send parameter problem error message. 73 73 * @see icmp_parameter_problem_msg() 74 74 */ 75 NET_ICMP_PARAMETERPROB, 76 77 /** Initializes new connection. */ 78 NET_ICMP_INIT 79 } icmp_messages; 75 NET_ICMP_PARAMETERPROB 76 } icmp_messages_t; 80 77 81 78 /** @name ICMP specific message parameters definitions */ -
uspace/lib/c/include/net/icmp_common.h
r9f3864a rf1938c6 41 41 #include <sys/time.h> 42 42 43 /** Default timeout for incoming connections in microseconds . */44 #define ICMP_CONNECT_TIMEOUT (1 * 1000 * 1000)43 /** Default timeout for incoming connections in microseconds (1 sec). */ 44 #define ICMP_CONNECT_TIMEOUT 1000000 45 45 46 extern int icmp_connect_module(s ervices_t, suseconds_t);46 extern int icmp_connect_module(suseconds_t); 47 47 48 48 #endif -
uspace/lib/net/include/icmp_remote.h
r9f3864a rf1938c6 27 27 */ 28 28 29 /** @addtogroup libnet 29 /** @addtogroup libnet 30 30 * @{ 31 31 */ 32 32 33 #ifndef LIBNET_ICMP_ INTERFACE_H_34 #define LIBNET_ICMP_ INTERFACE_H_33 #ifndef LIBNET_ICMP_REMOTE_H_ 34 #define LIBNET_ICMP_REMOTE_H_ 35 35 36 36 #include <net/socket_codes.h> … … 54 54 extern int icmp_source_quench_msg(int, packet_t *); 55 55 extern int icmp_time_exceeded_msg(int, icmp_code_t, packet_t *); 56 extern int icmp_parameter_problem_msg(int, icmp_code_t, icmp_param_t, packet_t *); 56 extern int icmp_parameter_problem_msg(int, icmp_code_t, icmp_param_t, 57 packet_t *); 57 58 58 59 /*@}*/ -
uspace/lib/net/include/tl_skel.h
r9f3864a rf1938c6 61 61 extern int tl_initialize(int net_phone); 62 62 63 /** Per-connection module initialization. 64 * 65 * This has to be implemented in user code. 66 * 67 */ 68 extern void tl_connection(void); 69 63 70 /** Process the transport layer module message. 64 71 * … … 74 81 * 75 82 */ 76 extern int tl_m odule_message(ipc_callid_t, ipc_call_t *,83 extern int tl_message(ipc_callid_t, ipc_call_t *, 77 84 ipc_call_t *, size_t *); 78 85 -
uspace/lib/net/tl/icmp_remote.c
r9f3864a rf1938c6 33 33 /** @file 34 34 * ICMP interface implementation for remote modules. 35 * @see icmp_ interface.h35 * @see icmp_remote.h 36 36 */ 37 37 38 #include <icmp_ interface.h>38 #include <icmp_remote.h> 39 39 #include <net/modules.h> 40 40 #include <packet_client.h> -
uspace/lib/net/tl/tl_common.c
r9f3864a rf1938c6 27 27 */ 28 28 29 /** @addtogroup libnet 29 /** @addtogroup libnet 30 30 * @{ 31 31 */ … … 39 39 #include <packet_client.h> 40 40 #include <packet_remote.h> 41 #include <icmp_ interface.h>41 #include <icmp_remote.h> 42 42 #include <ip_remote.h> 43 43 #include <ip_interface.h> -
uspace/lib/net/tl/tl_skel.c
r9f3864a rf1938c6 56 56 ipc_answer_0(iid, EOK); 57 57 58 /* Per-connection initialization */ 59 tl_connection(); 60 58 61 while (true) { 59 62 ipc_call_t answer; … … 68 71 69 72 /* Process the message */ 70 int res = tl_module_message(callid, &call, &answer, 71 &count); 73 int res = tl_message(callid, &call, &answer, &count); 72 74 73 75 /*
Note:
See TracChangeset
for help on using the changeset viewer.