Changeset 79ae36dd in mainline for uspace/lib/net
- Timestamp:
- 2011-06-08T19:01:55Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0eff68e
- Parents:
- 764d71e
- Location:
- uspace/lib/net
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/net/generic/generic.c
r764d71e r79ae36dd 37 37 #include <generic.h> 38 38 #include <async.h> 39 #include <async_obsolete.h> 39 40 #include <ipc/services.h> 40 41 #include <net/device.h> … … 56 57 int state, services_t target) 57 58 { 58 async_ msg_3(phone, (sysarg_t) message, (sysarg_t) device_id,59 async_obsolete_msg_3(phone, (sysarg_t) message, (sysarg_t) device_id, 59 60 (sysarg_t) state, target); 60 61 … … 78 79 int arg2, services_t service) 79 80 { 80 return (int) async_ req_3_0(phone, (sysarg_t) message,81 return (int) async_obsolete_req_3_0(phone, (sysarg_t) message, 81 82 (sysarg_t) device_id, (sysarg_t) arg2, (sysarg_t) service); 82 83 } … … 107 108 108 109 /* Request the address */ 109 message_id = async_ send_1(phone, (sysarg_t) message,110 message_id = async_obsolete_send_1(phone, (sysarg_t) message, 110 111 (sysarg_t) device_id, NULL); 111 112 string = measured_strings_return(phone, address, data, 1); … … 145 146 sysarg_t suffix; 146 147 147 sysarg_t result = async_ req_1_4(phone, (sysarg_t) message,148 sysarg_t result = async_obsolete_req_1_4(phone, (sysarg_t) message, 148 149 (sysarg_t) device_id, &addr_len, &prefix, &content, &suffix); 149 150 … … 172 173 { 173 174 if (error) { 174 async_ msg_4(phone, (sysarg_t) message, (sysarg_t) device_id,175 async_obsolete_msg_4(phone, (sysarg_t) message, (sysarg_t) device_id, 175 176 (sysarg_t) packet_id, (sysarg_t) target, (sysarg_t) error); 176 177 } else { 177 async_ msg_3(phone, (sysarg_t) message, (sysarg_t) device_id,178 async_obsolete_msg_3(phone, (sysarg_t) message, (sysarg_t) device_id, 178 179 (sysarg_t) packet_id, (sysarg_t) target); 179 180 } … … 198 199 { 199 200 if (error) { 200 async_ msg_4(phone, (sysarg_t) message, (sysarg_t) device_id,201 async_obsolete_msg_4(phone, (sysarg_t) message, (sysarg_t) device_id, 201 202 (sysarg_t) packet_id, (sysarg_t) sender, (sysarg_t) error); 202 203 } else { 203 async_ msg_3(phone, (sysarg_t) message, (sysarg_t) device_id,204 async_obsolete_msg_3(phone, (sysarg_t) message, (sysarg_t) device_id, 204 205 (sysarg_t) packet_id, (sysarg_t) sender); 205 206 } … … 243 244 244 245 /* Request the translation */ 245 message_id = async_ send_3(phone, (sysarg_t) message,246 message_id = async_obsolete_send_3(phone, (sysarg_t) message, 246 247 (sysarg_t) device_id, (sysarg_t) count, (sysarg_t) service, NULL); 247 248 measured_strings_send(phone, configuration, count); -
uspace/lib/net/generic/packet_remote.c
r764d71e r79ae36dd 37 37 38 38 #include <async.h> 39 #include <async_obsolete.h> 39 40 #include <errno.h> 40 41 #include <ipc/packet.h> … … 59 60 * @return EOK on success. 60 61 * @return Other error codes as defined for the pm_add() function. 61 * @return Other error codes as defined for the async_ share_in_start() function.62 * @return Other error codes as defined for the async_obsolete_share_in_start() function. 62 63 * 63 64 */ … … 69 70 int rc; 70 71 71 message = async_ send_1(phone, NET_PACKET_GET, packet_id, &answer);72 message = async_obsolete_send_1(phone, NET_PACKET_GET, packet_id, &answer); 72 73 73 74 *packet = (packet_t *) as_get_mappable_page(size); 74 rc = async_ share_in_start_0_0(phone, *packet, size);75 rc = async_obsolete_share_in_start_0_0(phone, *packet, size); 75 76 if (rc != EOK) { 76 77 munmap(*packet, size); … … 117 118 sysarg_t size; 118 119 119 rc = async_ req_1_1(phone, NET_PACKET_GET_SIZE, packet_id,120 rc = async_obsolete_req_1_1(phone, NET_PACKET_GET_SIZE, packet_id, 120 121 &size); 121 122 if (rc != EOK) … … 154 155 int rc; 155 156 156 rc = async_ req_4_2(phone, NET_PACKET_CREATE_4, max_content, addr_len,157 rc = async_obsolete_req_4_2(phone, NET_PACKET_CREATE_4, max_content, addr_len, 157 158 max_prefix, max_suffix, &packet_id, &size); 158 159 if (rc != EOK) … … 185 186 int rc; 186 187 187 rc = async_ req_1_2(phone, NET_PACKET_CREATE_1, content, &packet_id,188 rc = async_obsolete_req_1_2(phone, NET_PACKET_CREATE_1, content, &packet_id, 188 189 &size); 189 190 if (rc != EOK) … … 212 213 void pq_release_remote(int phone, packet_id_t packet_id) 213 214 { 214 async_ msg_1(phone, NET_PACKET_RELEASE, packet_id);215 async_obsolete_msg_1(phone, NET_PACKET_RELEASE, packet_id); 215 216 } 216 217 -
uspace/lib/net/il/arp_remote.c
r764d71e r79ae36dd 40 40 41 41 #include <async.h> 42 #include <async_obsolete.h> 42 43 #include <errno.h> 43 44 #include <ipc/services.h> … … 68 69 int arp_clean_cache_req(int arp_phone) 69 70 { 70 return (int) async_ req_0_0(arp_phone, NET_ARP_CLEAN_CACHE);71 return (int) async_obsolete_req_0_0(arp_phone, NET_ARP_CLEAN_CACHE); 71 72 } 72 73 … … 87 88 sysarg_t result; 88 89 89 message_id = async_ send_2(arp_phone, NET_ARP_CLEAR_ADDRESS,90 message_id = async_obsolete_send_2(arp_phone, NET_ARP_CLEAR_ADDRESS, 90 91 (sysarg_t) device_id, protocol, NULL); 91 92 measured_strings_send(arp_phone, address, 1); … … 104 105 int arp_clear_device_req(int arp_phone, device_id_t device_id) 105 106 { 106 return (int) async_ req_1_0(arp_phone, NET_ARP_CLEAR_DEVICE,107 return (int) async_obsolete_req_1_0(arp_phone, NET_ARP_CLEAR_DEVICE, 107 108 (sysarg_t) device_id); 108 109 } … … 137 138 sysarg_t result; 138 139 139 message_id = async_ send_3(arp_phone, NET_ARP_DEVICE,140 message_id = async_obsolete_send_3(arp_phone, NET_ARP_DEVICE, 140 141 (sysarg_t) device_id, protocol, netif, NULL); 141 142 measured_strings_send(arp_phone, address, 1); -
uspace/lib/net/il/il_skel.c
r764d71e r79ae36dd 42 42 #include <net/modules.h> 43 43 44 // FIXME: remove this header 45 #include <kernel/ipc/ipc_methods.h> 46 44 47 /** Default thread for new connections. 45 48 * … … 75 78 * result. 76 79 */ 77 if ((IPC_GET_IMETHOD(call) == IPC_M_PHONE_HUNGUP) || 78 (res == EHANGUP)) 80 if ((!IPC_GET_IMETHOD(call)) || (res == EHANGUP)) 79 81 return; 80 82 -
uspace/lib/net/il/ip_remote.c
r764d71e r79ae36dd 44 44 #include <packet_client.h> 45 45 #include <generic.h> 46 46 #include <async_obsolete.h> 47 47 #include <ipc/services.h> 48 48 #include <ipc/il.h> … … 66 66 in_addr_t address, in_addr_t netmask, in_addr_t gateway) 67 67 { 68 return (int) async_ req_4_0(ip_phone, NET_IP_ADD_ROUTE,68 return (int) async_obsolete_req_4_0(ip_phone, NET_IP_ADD_ROUTE, 69 69 (sysarg_t) device_id, (sysarg_t) gateway.s_addr, 70 70 (sysarg_t) address.s_addr, (sysarg_t) netmask.s_addr); … … 150 150 151 151 ipc_call_t answer; 152 aid_t message_id = async_ send_1(ip_phone, NET_IP_GET_ROUTE,152 aid_t message_id = async_obsolete_send_1(ip_phone, NET_IP_GET_ROUTE, 153 153 (sysarg_t) protocol, &answer); 154 154 155 if ((async_ data_write_start(ip_phone, destination, addrlen) == EOK) &&156 (async_ data_read_start(ip_phone, headerlen,155 if ((async_obsolete_data_write_start(ip_phone, destination, addrlen) == EOK) && 156 (async_obsolete_data_read_start(ip_phone, headerlen, 157 157 sizeof(*headerlen)) == EOK) && (*headerlen > 0)) { 158 158 *header = malloc(*headerlen); 159 159 if (*header) { 160 if (async_ data_read_start(ip_phone, *header,160 if (async_obsolete_data_read_start(ip_phone, *header, 161 161 *headerlen) != EOK) 162 162 free(*header); … … 243 243 in_addr_t gateway) 244 244 { 245 return (int) async_ req_2_0(ip_phone, NET_IP_SET_GATEWAY,245 return (int) async_obsolete_req_2_0(ip_phone, NET_IP_SET_GATEWAY, 246 246 (sysarg_t) device_id, (sysarg_t) gateway.s_addr); 247 247 } -
uspace/lib/net/netif/netif_remote.c
r764d71e r79ae36dd 38 38 #include <packet_client.h> 39 39 #include <generic.h> 40 40 #include <async_obsolete.h> 41 41 #include <ipc/services.h> 42 42 #include <ipc/netif.h> … … 82 82 int netif_probe_req(int netif_phone, device_id_t device_id, int irq, void *io) 83 83 { 84 return async_ req_3_0(netif_phone, NET_NETIF_PROBE, device_id, irq,84 return async_obsolete_req_3_0(netif_phone, NET_NETIF_PROBE, device_id, irq, 85 85 (sysarg_t) io); 86 86 } … … 119 119 int netif_start_req(int netif_phone, device_id_t device_id) 120 120 { 121 return async_ req_1_0(netif_phone, NET_NETIF_START, device_id);121 return async_obsolete_req_1_0(netif_phone, NET_NETIF_START, device_id); 122 122 } 123 123 … … 136 136 int netif_stop_req(int netif_phone, device_id_t device_id) 137 137 { 138 return async_ req_1_0(netif_phone, NET_NETIF_STOP, device_id);138 return async_obsolete_req_1_0(netif_phone, NET_NETIF_STOP, device_id); 139 139 } 140 140 … … 154 154 return EBADMEM; 155 155 156 aid_t message_id = async_ send_1(netif_phone, NET_NETIF_STATS,156 aid_t message_id = async_obsolete_send_1(netif_phone, NET_NETIF_STATS, 157 157 (sysarg_t) device_id, NULL); 158 async_ data_read_start(netif_phone, stats, sizeof(*stats));158 async_obsolete_data_read_start(netif_phone, stats, sizeof(*stats)); 159 159 160 160 sysarg_t result; -
uspace/lib/net/netif/netif_skel.c
r764d71e r79ae36dd 54 54 #include <nil_remote.h> 55 55 56 // FIXME: remove this header 57 #include <kernel/ipc/ipc_methods.h> 58 56 59 DEVICE_MAP_IMPLEMENT(netif_device_map, netif_device_t); 57 60 … … 288 291 *count = 0; 289 292 293 if (!IPC_GET_IMETHOD(*call)) 294 return EOK; 295 290 296 switch (IPC_GET_IMETHOD(*call)) { 291 case IPC_M_PHONE_HUNGUP:292 return EOK;293 294 297 case NET_NETIF_PROBE: 295 298 return netif_probe_req_local(0, IPC_GET_DEVICE(*call), … … 385 388 386 389 /* End if said to either by the message or the processing result */ 387 if ((IPC_GET_IMETHOD(call) == IPC_M_PHONE_HUNGUP) || 388 (res == EHANGUP)) 390 if ((!IPC_GET_IMETHOD(call)) || (res == EHANGUP)) 389 391 return; 390 392 -
uspace/lib/net/nil/nil_skel.c
r764d71e r79ae36dd 42 42 #include <net/modules.h> 43 43 44 // FIXME: remove this header 45 #include <kernel/ipc/ipc_methods.h> 46 44 47 /** Default thread for new connections. 45 48 * … … 75 78 * result. 76 79 */ 77 if ((IPC_GET_IMETHOD(call) == IPC_M_PHONE_HUNGUP) || 78 (res == EHANGUP)) 80 if ((!IPC_GET_IMETHOD(call)) || (res == EHANGUP)) 79 81 return; 80 82 -
uspace/lib/net/tl/icmp_remote.c
r764d71e r79ae36dd 41 41 42 42 #include <async.h> 43 #include <async_obsolete.h> 43 44 #include <errno.h> 44 45 #include <ipc/services.h> … … 64 65 icmp_param_t mtu, packet_t *packet) 65 66 { 66 async_ msg_3(icmp_phone, NET_ICMP_DEST_UNREACH, (sysarg_t) code,67 async_obsolete_msg_3(icmp_phone, NET_ICMP_DEST_UNREACH, (sysarg_t) code, 67 68 (sysarg_t) packet_get_id(packet), (sysarg_t) mtu); 68 69 return EOK; … … 83 84 int icmp_source_quench_msg(int icmp_phone, packet_t *packet) 84 85 { 85 async_ msg_2(icmp_phone, NET_ICMP_SOURCE_QUENCH, 0,86 async_obsolete_msg_2(icmp_phone, NET_ICMP_SOURCE_QUENCH, 0, 86 87 (sysarg_t) packet_get_id(packet)); 87 88 return EOK; … … 103 104 int icmp_time_exceeded_msg(int icmp_phone, icmp_code_t code, packet_t *packet) 104 105 { 105 async_ msg_2(icmp_phone, NET_ICMP_TIME_EXCEEDED, (sysarg_t) code,106 async_obsolete_msg_2(icmp_phone, NET_ICMP_TIME_EXCEEDED, (sysarg_t) code, 106 107 (sysarg_t) packet_get_id(packet)); 107 108 return EOK; … … 125 126 icmp_param_t pointer, packet_t *packet) 126 127 { 127 async_ msg_3(icmp_phone, NET_ICMP_PARAMETERPROB, (sysarg_t) code,128 async_obsolete_msg_3(icmp_phone, NET_ICMP_PARAMETERPROB, (sysarg_t) code, 128 129 (sysarg_t) packet_get_id(packet), (sysarg_t) pointer); 129 130 return EOK; -
uspace/lib/net/tl/tl_skel.c
r764d71e r79ae36dd 42 42 #include <net/modules.h> 43 43 44 // FIXME: remove this header 45 #include <kernel/ipc/ipc_methods.h> 46 44 47 /** Default thread for new connections. 45 48 * … … 77 80 * result. 78 81 */ 79 if ((IPC_GET_IMETHOD(call) == IPC_M_PHONE_HUNGUP) || 80 (res == EHANGUP)) 82 if ((!IPC_GET_IMETHOD(call)) || (res == EHANGUP)) 81 83 return; 82 84
Note:
See TracChangeset
for help on using the changeset viewer.