Changeset 0a9ea4a in mainline for uspace/lib/net/include/tl_skel.h


Ignore:
Timestamp:
2011-01-14T14:28:57Z (13 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1d7a74e, 6336b6e
Parents:
45019865 (diff), 2f60e57d (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 development into lelian/hidd

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/net/include/tl_skel.h

    r45019865 r0a9ea4a  
    11/*
    2  * Copyright (c) 2009 Lukas Mejdrech
     2 * Copyright (c) 2010 Martin Decky
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup eth
     29/** @addtogroup libnet
    3030 * @{
    3131 */
    3232
     33#ifndef LIBNET_TL_SKEL_H_
     34#define LIBNET_TL_SKEL_H_
     35
    3336/** @file
    34  *  Ethernet module stub.
    35  *  @see module.c
     37 * Transport layer module skeleton.
     38 * The skeleton has to be part of each transport layer module.
    3639 */
    3740
    38 #include "eth.h"
    39 
    4041#include <async.h>
    41 #include <stdio.h>
    42 #include <errno.h>
    43 
     42#include <fibril_synch.h>
    4443#include <ipc/ipc.h>
    4544#include <ipc/services.h>
    4645
    47 #include <net/modules.h>
    48 #include <net_interface.h>
     46#include <adt/measured_strings.h>
     47#include <net/device.h>
    4948#include <net/packet.h>
    50 #include <nil_local.h>
    5149
    52 int nil_module_start_standalone(async_client_conn_t client_connection)
    53 {
    54         sysarg_t phonehash;
    55         int rc;
    56        
    57         async_set_client_connection(client_connection);
    58         int net_phone = net_connect_module();
     50/** Module initialization.
     51 *
     52 * This has to be implemented in user code.
     53 *
     54 * @param[in] net_phone Networking module phone.
     55 *
     56 * @return EOK on success.
     57 * @return Other error codes as defined for each specific module
     58 *         initialize function.
     59 *
     60 */
     61extern int tl_initialize(int net_phone);
    5962
    60         rc = pm_init();
    61         if (rc != EOK)
    62                 return rc;
    63        
    64         rc = nil_initialize(net_phone);
    65         if (rc != EOK)
    66                 goto out;
     63/** Process the transport layer module message.
     64 *
     65 * This has to be implemented in user code.
     66 *
     67 * @param[in]  callid Message identifier.
     68 * @param[in]  call   Message parameters.
     69 * @param[out] answer Answer.
     70 * @param[out] count  Number of arguments of the answer.
     71 *
     72 * @return EOK on success.
     73 * @return Other error codes as defined for each specific module.
     74 *
     75 */
     76extern int tl_module_message(ipc_callid_t, ipc_call_t *,
     77    ipc_call_t *, size_t *);
    6778
    68         rc = ipc_connect_to_me(PHONE_NS, SERVICE_ETHERNET, 0, 0, &phonehash);
    69         if (rc != EOK)
    70                 goto out;
    71        
    72         async_manager();
     79extern int tl_module_start(int);
    7380
    74 out:
    75         pm_destroy();
    76         return rc;
    77 }
    78 
    79 int nil_module_message_standalone(const char *name, ipc_callid_t callid,
    80     ipc_call_t *call, ipc_call_t *answer, size_t *count)
    81 {
    82         return nil_message_standalone(name, callid, call, answer, count);
    83 }
     81#endif
    8482
    8583/** @}
Note: See TracChangeset for help on using the changeset viewer.