Changeset e037e20e in mainline
- Timestamp:
- 2010-10-17T18:48:39Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4a3b501
- Parents:
- c62ae1d6
- Location:
- uspace/lib/net
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/il/ip_remote.c
rc62ae1d6 re037e20e 27 27 */ 28 28 29 /** @addtogroup ip29 /** @addtogroup libnet 30 30 * @{ 31 31 */ … … 72 72 } 73 73 74 /** Creates bidirectional connection with the ip module service and registers 75 * the message receiver. 76 * 77 * @param[in] service The IP module service. 78 * @param[in] protocol The transport layer protocol. 79 * @param[in] me The requesting module service. 80 * @param[in] receiver The message receiver. Used for remote connection. 81 * @returns The phone of the needed service. 82 * @returns EOK on success. 83 * @returns Other error codes as defined for the bind_service() 84 * function. 85 */ 74 86 int ip_bind_service(services_t service, int protocol, services_t me, 75 87 async_client_conn_t receiver) … … 79 91 } 80 92 93 /** Connects to the IP module. 94 * 95 * @param service The IP module service. Ignored parameter. 96 * @returns The IP module phone on success. 97 */ 81 98 int ip_connect_module(services_t service) 82 99 { … … 110 127 } 111 128 112 /** Return the device identifier and the IP pseudo header based on the destination address. 129 /** Return the device identifier and the IP pseudo header based on the 130 * destination address. 113 131 * 114 132 * @param[in] ip_phone The IP module phone used for (semi)remote calls. … … 137 155 (ipcarg_t) protocol, &answer); 138 156 139 if ((async_data_write_start(ip_phone, destination, addrlen) == EOK) 140 && (async_data_read_start(ip_phone, headerlen, sizeof(*headerlen)) == EOK)141 && (*headerlen > 0)) {157 if ((async_data_write_start(ip_phone, destination, addrlen) == EOK) && 158 (async_data_read_start(ip_phone, headerlen, 159 sizeof(*headerlen)) == EOK) && (*headerlen > 0)) { 142 160 *header = malloc(*headerlen); 143 161 if (*header) { 144 if (async_data_read_start(ip_phone, *header, *headerlen) != EOK) 162 if (async_data_read_start(ip_phone, *header, 163 *headerlen) != EOK) 145 164 free(*header); 146 165 } … … 173 192 packet_dimension_ref packet_dimension) 174 193 { 175 return generic_packet_size_req_remote(ip_phone, NET_IL_PACKET_SPACE, device_id,176 packet_dimension);194 return generic_packet_size_req_remote(ip_phone, NET_IL_PACKET_SPACE, 195 device_id, packet_dimension); 177 196 } 178 197 -
uspace/lib/net/include/ip_interface.h
rc62ae1d6 re037e20e 27 27 */ 28 28 29 /** @addtogroup ip30 * 29 /** @addtogroup libnet 30 * @{ 31 31 */ 32 32 33 #ifndef __NET_IP_INTERFACE_H__34 #define __NET_IP_INTERFACE_H__33 #ifndef LIBNET_IP_INTERFACE_H_ 34 #define LIBNET_IP_INTERFACE_H_ 35 35 36 36 #include <net/socket_codes.h> … … 55 55 56 56 /** @name IP module interface 57 * 57 * This interface is used by other modules. 58 58 */ 59 59 /*@{*/ 60 60 61 61 /** The transport layer notification function type definition. 62 * Notifies the transport layer modules about the received packet/s. 63 * @param[in] device_id The device identifier. 64 * @param[in] packet The received packet or the received packet queue. 65 * @param[in] receiver The receiving module service. 66 * @param[in] error The packet error reporting service. Prefixes the received packet. 67 * @returns EOK on success. 62 * 63 * Notifies the transport layer modules about the received packet/s. 64 * 65 * @param[in] device_id The device identifier. 66 * @param[in] packet The received packet or the received packet queue. 67 * @param[in] receiver The receiving module service. 68 * @param[in] error The packet error reporting service. Prefixes the 69 * received packet. 70 * @returns EOK on success. 68 71 */ 69 typedef int (*tl_received_msg_t)(device_id_t device_id, packet_t packet, services_t receiver, services_t error); 72 typedef int (*tl_received_msg_t)(device_id_t device_id, packet_t packet, 73 services_t receiver, services_t error); 70 74 71 /** Creates bidirectional connection with the ip module service and registers the message receiver. 72 * @param[in] service The IP module service. 73 * @param[in] protocol The transport layer protocol. 74 * @param[in] me The requesting module service. 75 * @param[in] receiver The message receiver. Used for remote connection. 76 * @returns The phone of the needed service. 77 * @returns EOK on success. 78 * @returns Other error codes as defined for the bind_service() function. 79 */ 80 extern int ip_bind_service(services_t service, int protocol, services_t me, async_client_conn_t receiver); 81 82 /** Connects to the IP module. 83 * @param service The IP module service. Ignored parameter. 84 * @returns The IP module phone on success. 85 */ 86 extern int ip_connect_module(services_t service); 75 extern int ip_bind_service(services_t, int, services_t, async_client_conn_t); 76 extern int ip_connect_module(services_t); 87 77 88 78 /*@}*/ -
uspace/lib/net/include/ip_remote.h
rc62ae1d6 re037e20e 27 27 */ 28 28 29 /** @addtogroup ip29 /** @addtogroup libnet 30 30 * @{ 31 31 */ 32 32 33 #ifndef __NET_IP_REMOTE_H__34 #define __NET_IP_REMOTE_H__33 #ifndef LIBNET_IP_REMOTE_H_ 34 #define LIBNET_IP_REMOTE_H_ 35 35 36 36 #include <ipc/services.h>
Note:
See TracChangeset
for help on using the changeset viewer.