Changeset 89c57b6 in mainline for uspace/srv/net/net/net_standalone.c


Ignore:
Timestamp:
2011-04-13T14:45:41Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
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.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/net/net_standalone.c

    rcefb126 r89c57b6  
    2828
    2929/** @addtogroup net
    30  *  @{
     30 * @{
    3131 */
    3232
    3333/** @file
    34  *  Wrapper for the standalone networking module.
     34 * Wrapper for the standalone networking module.
    3535 */
    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>
    4636
    4737#include "net.h"
    4838
    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. */
    5149extern net_globals_t net_globals;
    5250
     
    6058 *
    6159 */
    62 int net_initialize_build(async_client_conn_t client_connection){
    63         ERROR_DECLARE;
     60int net_initialize_build(async_client_conn_t client_connection)
     61{
     62        int rc;
    6463       
    65         task_id_t task_id = spawn("/srv/ip");
     64        task_id_t task_id = net_spawn((uint8_t *) "/srv/ip");
    6665        if (!task_id)
    6766                return EINVAL;
    6867       
    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;
    7172       
    72         if (!spawn("/srv/icmp"))
     73        if (!net_spawn((uint8_t *) "/srv/icmp"))
    7374                return EINVAL;
    7475       
    75         if (!spawn("/srv/udp"))
     76        if (!net_spawn((uint8_t *) "/srv/udp"))
    7677                return EINVAL;
    7778       
    78         if (!spawn("/srv/tcp"))
     79        if (!net_spawn((uint8_t *) "/srv/tcp"))
    7980                return EINVAL;
    8081       
     
    9495 * @return EOK on success.
    9596 * @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.
    9898 *
    9999 */
    100100int 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)
    102102{
    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);
    105105       
    106         return net_message(callid, call, answer, answer_count);
     106        return net_message(callid, call, answer, count);
    107107}
    108108
Note: See TracChangeset for help on using the changeset viewer.