Changeset 89c57b6 in mainline for uspace/srv/net/net/net_standalone.c
- Timestamp:
- 2011-04-13T14:45:41Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 88634420
- Parents:
- cefb126 (diff), 17279ead (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/net/net_standalone.c
rcefb126 r89c57b6 28 28 29 29 /** @addtogroup net 30 * 30 * @{ 31 31 */ 32 32 33 33 /** @file 34 * 34 * Wrapper for the standalone networking module. 35 35 */ 36 37 #include <str.h>38 39 #include <ipc/ipc.h>40 41 #include <net_messages.h>42 #include <ip_interface.h>43 #include <adt/measured_strings.h>44 #include <adt/module_map.h>45 #include <packet/packet_server.h>46 36 47 37 #include "net.h" 48 38 49 /** Networking module global data. 50 */ 39 #include <str.h> 40 #include <adt/measured_strings.h> 41 #include <adt/module_map.h> 42 #include <ipc/net.h> 43 #include <errno.h> 44 45 #include <ip_interface.h> 46 #include <packet_server.h> 47 48 /** Networking module global data. */ 51 49 extern net_globals_t net_globals; 52 50 … … 60 58 * 61 59 */ 62 int net_initialize_build(async_client_conn_t client_connection){ 63 ERROR_DECLARE; 60 int net_initialize_build(async_client_conn_t client_connection) 61 { 62 int rc; 64 63 65 task_id_t task_id = spawn("/srv/ip");64 task_id_t task_id = net_spawn((uint8_t *) "/srv/ip"); 66 65 if (!task_id) 67 66 return EINVAL; 68 67 69 ERROR_PROPAGATE(add_module(NULL, &net_globals.modules, IP_NAME, 70 IP_FILENAME, SERVICE_IP, task_id, ip_connect_module)); 68 rc = add_module(NULL, &net_globals.modules, (uint8_t *) IP_NAME, 69 (uint8_t *) IP_FILENAME, SERVICE_IP, task_id, ip_connect_module); 70 if (rc != EOK) 71 return rc; 71 72 72 if (! spawn("/srv/icmp"))73 if (!net_spawn((uint8_t *) "/srv/icmp")) 73 74 return EINVAL; 74 75 75 if (! spawn("/srv/udp"))76 if (!net_spawn((uint8_t *) "/srv/udp")) 76 77 return EINVAL; 77 78 78 if (! spawn("/srv/tcp"))79 if (!net_spawn((uint8_t *) "/srv/tcp")) 79 80 return EINVAL; 80 81 … … 94 95 * @return EOK on success. 95 96 * @return ENOTSUP if the message is not known. 96 * @return Other error codes as defined for each bundled module 97 * message function. 97 * @return Other error codes. 98 98 * 99 99 */ 100 100 int net_module_message(ipc_callid_t callid, ipc_call_t *call, 101 ipc_call_t *answer, int *answer_count)101 ipc_call_t *answer, size_t *count) 102 102 { 103 if (IS_NET_PACKET_MESSAGE( call))104 return packet_server_message(callid, call, answer, answer_count);103 if (IS_NET_PACKET_MESSAGE(*call)) 104 return packet_server_message(callid, call, answer, count); 105 105 106 return net_message(callid, call, answer, answer_count);106 return net_message(callid, call, answer, count); 107 107 } 108 108
Note:
See TracChangeset
for help on using the changeset viewer.