Ignore:
Timestamp:
2010-10-31T19:19:19Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ba1a2fd
Parents:
940bb45
Message:

Cleanup icmp.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/tl/icmp/icmp_module.c

    r940bb45 redc5a985  
    2828
    2929/** @addtogroup icmp
    30  *  @{
     30 * @{
    3131 */
    3232
    3333/** @file
    34  *  ICMP standalone module implementation.
    35  *  Contains skeleton module functions mapping.
    36  *  The functions are used by the module skeleton as module specific entry points.
    37  *  @see module.c
     34 * ICMP standalone module implementation.
     35 * Contains skeleton module functions mapping.
     36 * The functions are used by the module skeleton as module specific entry points.
     37 * @see module.c
    3838 */
     39
     40#include "icmp.h"
     41#include "icmp_module.h"
    3942
    4043#include <async.h>
     
    4750#include <net/packet.h>
    4851#include <net_interface.h>
     52
    4953#include <tl_local.h>
    5054
    51 #include "icmp.h"
    52 #include "icmp_module.h"
     55/** ICMP module global data. */
     56extern icmp_globals_t icmp_globals;
    5357
    54 /** ICMP module global data.
    55  */
    56 extern icmp_globals_t   icmp_globals;
    57 
    58 /** Starts the ICMP module.
    59  *  Initializes the client connection serving function, initializes the module, registers the module service and starts the async manager, processing IPC messages in an infinite loop.
    60  *  @param[in] client_connection The client connection processing function. The module skeleton propagates its own one.
    61  *  @returns EOK on successful module termination.
    62  *  @returns Other error codes as defined for the arp_initialize() function.
    63  *  @returns Other error codes as defined for the REGISTER_ME() macro function.
    64  */
    65 int tl_module_start_standalone(async_client_conn_t client_connection){
     58int tl_module_start_standalone(async_client_conn_t client_connection)
     59{
    6660        ERROR_DECLARE;
    6761
     
    7064        async_set_client_connection(client_connection);
    7165        icmp_globals.net_phone = net_connect_module();
    72         if(icmp_globals.net_phone < 0){
     66        if (icmp_globals.net_phone < 0)
    7367                return icmp_globals.net_phone;
    74         }
     68
    7569        ERROR_PROPAGATE(pm_init());
    76         if(ERROR_OCCURRED(icmp_initialize(client_connection))
    77                 || ERROR_OCCURRED(REGISTER_ME(SERVICE_ICMP, &phonehash))){
     70        if (ERROR_OCCURRED(icmp_initialize(client_connection)) ||
     71            ERROR_OCCURRED(REGISTER_ME(SERVICE_ICMP, &phonehash))) {
    7872                pm_destroy();
    7973                return ERROR_CODE;
     
    8680}
    8781
    88 /** Processes the ICMP message.
    89  *  @param[in] callid The message identifier.
    90  *  @param[in] call The message parameters.
    91  *  @param[out] answer The message answer parameters.
    92  *  @param[out] answer_count The last parameter for the actual answer in the answer parameter.
    93  *  @returns EOK on success.
    94  *  @returns Other error codes as defined for the icmp_message() function.
    95  */
    96 int tl_module_message_standalone(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){
     82int
     83tl_module_message_standalone(ipc_callid_t callid, ipc_call_t *call,
     84    ipc_call_t *answer, int *answer_count)
     85{
    9786        return icmp_message_standalone(callid, call, answer, answer_count);
    9887}
     
    10089/** @}
    10190 */
     91
Note: See TracChangeset for help on using the changeset viewer.