Changeset 79ae36dd in mainline for uspace/srv/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/srv/net
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/il/arp/arp.c
r764d71e r79ae36dd 845 845 846 846 *count = 0; 847 848 if (!IPC_GET_IMETHOD(*call)) 849 return EOK; 850 847 851 switch (IPC_GET_IMETHOD(*call)) { 848 case IPC_M_PHONE_HUNGUP:849 return EOK;850 851 852 case NET_ARP_DEVICE: 852 853 rc = measured_strings_receive(&address, &data, 1); -
uspace/srv/net/il/ip/ip.c
r764d71e r79ae36dd 76 76 #include <il_remote.h> 77 77 #include <il_skel.h> 78 79 // FIXME: remove this header 80 #include <kernel/ipc/ipc_methods.h> 78 81 79 82 /** IP module name. */ … … 1913 1916 1914 1917 *answer_count = 0; 1918 1919 if (!IPC_GET_IMETHOD(*call)) 1920 return EOK; 1921 1915 1922 switch (IPC_GET_IMETHOD(*call)) { 1916 case IPC_M_PHONE_HUNGUP:1917 return EOK;1918 1919 1923 case IPC_M_CONNECT_TO_ME: 1920 1924 return ip_register(IL_GET_PROTO(*call), IL_GET_SERVICE(*call), -
uspace/srv/net/net/net.c
r764d71e r79ae36dd 41 41 #include <ctype.h> 42 42 #include <ddi.h> 43 #include <ns.h> 43 44 #include <errno.h> 44 45 #include <malloc.h> … … 339 340 goto out; 340 341 341 rc = async_connect_to_me(PHONE_NS, SERVICE_NETWORKING, 0, 0, NULL);342 rc = service_register(SERVICE_NETWORKING); 342 343 if (rc != EOK) 343 344 goto out; … … 638 639 639 640 *answer_count = 0; 641 642 if (!IPC_GET_IMETHOD(*call)) 643 return EOK; 644 640 645 switch (IPC_GET_IMETHOD(*call)) { 641 case IPC_M_PHONE_HUNGUP:642 return EOK;643 646 case NET_NET_GET_DEVICE_CONF: 644 647 rc = measured_strings_receive(&strings, &data, … … 703 706 704 707 /* End if told to either by the message or the processing result */ 705 if (( IPC_GET_IMETHOD(call) == IPC_M_PHONE_HUNGUP) || (res == EHANGUP))708 if ((!IPC_GET_IMETHOD(call)) || (res == EHANGUP)) 706 709 return; 707 710 -
uspace/srv/net/netif/lo/lo.c
r764d71e r79ae36dd 39 39 #include <stdio.h> 40 40 #include <str.h> 41 #include <ns.h> 41 42 #include <ipc/services.h> 42 43 #include <ipc/nil.h> … … 164 165 int netif_initialize(void) 165 166 { 166 return async_connect_to_me(PHONE_NS, SERVICE_LO, 0, 0, NULL);167 return service_register(SERVICE_LO); 167 168 } 168 169 -
uspace/srv/net/nil/eth/eth.c
r764d71e r79ae36dd 59 59 #include <packet_remote.h> 60 60 #include <nil_skel.h> 61 62 // FIXME: remove this header 63 #include <kernel/ipc/ipc_methods.h> 61 64 62 65 #include "eth.h" … … 846 849 847 850 *answer_count = 0; 851 852 if (!IPC_GET_IMETHOD(*call)) 853 return EOK; 854 848 855 switch (IPC_GET_IMETHOD(*call)) { 849 case IPC_M_PHONE_HUNGUP:850 return EOK;851 852 856 case NET_NIL_DEVICE: 853 857 return eth_device_message(IPC_GET_DEVICE(*call), -
uspace/srv/net/nil/nildummy/nildummy.c
r764d71e r79ae36dd 54 54 #include <nil_skel.h> 55 55 56 // FIXME: remove this header 57 #include <kernel/ipc/ipc_methods.h> 58 56 59 #include "nildummy.h" 57 60 … … 393 396 394 397 *answer_count = 0; 398 399 if (!IPC_GET_IMETHOD(*call)) 400 return EOK; 401 395 402 switch (IPC_GET_IMETHOD(*call)) { 396 case IPC_M_PHONE_HUNGUP:397 return EOK;398 399 403 case NET_NIL_DEVICE: 400 404 return nildummy_device_message(IPC_GET_DEVICE(*call), -
uspace/srv/net/tl/icmp/icmp.c
r764d71e r79ae36dd 612 612 static void icmp_receiver(ipc_callid_t iid, ipc_call_t *icall) 613 613 { 614 bool loop = true;615 614 packet_t *packet; 616 615 int rc; 617 616 618 while (loop) { 617 while (true) { 618 if (!IPC_GET_IMETHOD(*icall)) 619 break; 620 619 621 switch (IPC_GET_IMETHOD(*icall)) { 620 622 case NET_TL_RECEIVED: … … 629 631 async_answer_0(iid, (sysarg_t) rc); 630 632 break; 631 case IPC_M_PHONE_HUNGUP:632 loop = false;633 continue;634 633 default: 635 634 async_answer_0(iid, (sysarg_t) ENOTSUP); -
uspace/srv/net/tl/tcp/tcp.c
r764d71e r79ae36dd 38 38 #include <assert.h> 39 39 #include <async.h> 40 #include <async_obsolete.h> 40 41 #include <fibril_synch.h> 41 42 #include <malloc.h> … … 72 73 #include "tcp.h" 73 74 #include "tcp_header.h" 75 76 // FIXME: remove this header 77 #include <kernel/ipc/ipc_methods.h> 74 78 75 79 /** TCP module name. */ … … 799 803 800 804 /* Notify the destination socket */ 801 async_ msg_5(socket->phone, NET_SOCKET_RECEIVED,805 async_obsolete_msg_5(socket->phone, NET_SOCKET_RECEIVED, 802 806 (sysarg_t) socket->socket_id, 803 807 ((packet_dimension->content < socket_data->data_fragment_size) ? … … 820 824 821 825 /* Notify the destination socket */ 822 async_ msg_5(socket->phone, NET_SOCKET_RECEIVED,826 async_obsolete_msg_5(socket->phone, NET_SOCKET_RECEIVED, 823 827 (sysarg_t) socket->socket_id, 824 828 0, 0, 0, … … 1078 1082 if (rc == EOK) { 1079 1083 /* Notify the destination socket */ 1080 async_ msg_5(socket->phone, NET_SOCKET_ACCEPTED,1084 async_obsolete_msg_5(socket->phone, NET_SOCKET_ACCEPTED, 1081 1085 (sysarg_t) listening_socket->socket_id, 1082 1086 socket_data->data_fragment_size, TCP_HEADER_SIZE, … … 1269 1273 { 1270 1274 int res; 1271 bool keep_on_going = true;1272 1275 socket_cores_t local_sockets; 1273 1276 int app_phone = IPC_GET_PHONE(call); … … 1293 1296 fibril_rwlock_initialize(&lock); 1294 1297 1295 while ( keep_on_going) {1298 while (true) { 1296 1299 1297 1300 /* Answer the call */ … … 1301 1304 /* Get the next call */ 1302 1305 callid = async_get_call(&call); 1306 1307 if (!IPC_GET_IMETHOD(call)) { 1308 res = EHANGUP; 1309 break; 1310 } 1303 1311 1304 1312 /* Process the call */ 1305 1313 switch (IPC_GET_IMETHOD(call)) { 1306 case IPC_M_PHONE_HUNGUP:1307 keep_on_going = false;1308 res = EHANGUP;1309 break;1310 1311 1314 case NET_SOCKET: 1312 1315 socket_data = … … 1506 1509 1507 1510 /* Release the application phone */ 1508 async_ hangup(app_phone);1511 async_obsolete_hangup(app_phone); 1509 1512 1510 1513 printf("release\n"); -
uspace/srv/net/tl/udp/udp.c
r764d71e r79ae36dd 37 37 38 38 #include <async.h> 39 #include <async_obsolete.h> 39 40 #include <fibril_synch.h> 40 41 #include <malloc.h> … … 69 70 #include "udp.h" 70 71 #include "udp_header.h" 72 73 // FIXME: remove this header 74 #include <kernel/ipc/ipc_methods.h> 71 75 72 76 /** UDP module name. */ … … 299 303 /* Notify the destination socket */ 300 304 fibril_rwlock_write_unlock(&udp_globals.lock); 301 async_ msg_5(socket->phone, NET_SOCKET_RECEIVED,305 async_obsolete_msg_5(socket->phone, NET_SOCKET_RECEIVED, 302 306 (sysarg_t) socket->socket_id, packet_dimension->content, 0, 0, 303 307 (sysarg_t) fragments); … … 748 752 { 749 753 int res; 750 bool keep_on_going = true;751 754 socket_cores_t local_sockets; 752 755 int app_phone = IPC_GET_PHONE(call); … … 773 776 socket_cores_initialize(&local_sockets); 774 777 775 while ( keep_on_going) {778 while (true) { 776 779 777 780 /* Answer the call */ … … 783 786 /* Get the next call */ 784 787 callid = async_get_call(&call); 788 789 if (!IPC_GET_IMETHOD(call)) { 790 res = EHANGUP; 791 break; 792 } 785 793 786 794 /* Process the call */ 787 795 switch (IPC_GET_IMETHOD(call)) { 788 case IPC_M_PHONE_HUNGUP:789 keep_on_going = false;790 res = EHANGUP;791 break;792 793 796 case NET_SOCKET: 794 797 socket_id = SOCKET_GET_SOCKET_ID(call); … … 880 883 881 884 /* Release the application phone */ 882 async_ hangup(app_phone);885 async_obsolete_hangup(app_phone); 883 886 884 887 /* Release all local sockets */
Note:
See TracChangeset
for help on using the changeset viewer.