Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 404dbae in mainline


Ignore:
Timestamp:
2010-10-17T20:48:24Z (10 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
Children:
a8ca1d81
Parents:
42a9f27
Message:

Cleanup the network interface layer local and remote interfaces.

Location:
uspace
Files:
5 edited

Legend:

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

    r42a9f27 r404dbae  
    2727 */
    2828
    29 /** @addtogroup net_nil
    30  *  @{
     29/** @addtogroup libnet
     30 * @{
    3131 */
    3232
    33 #ifndef __NET_NIL_INTERFACE_H__
    34 #define __NET_NIL_INTERFACE_H__
     33#ifndef LIBNET_NIL_INTERFACE_H_
     34#define LIBNET_NIL_INTERFACE_H_
    3535
    3636#include <async.h>
     
    4747
    4848#define nil_packet_size_req(nil_phone, device_id, packet_dimension) \
    49         generic_packet_size_req_remote(nil_phone, NET_NIL_PACKET_SPACE, device_id, \
    50             packet_dimension)
     49        generic_packet_size_req_remote(nil_phone, NET_NIL_PACKET_SPACE, \
     50            device_id, packet_dimension)
    5151
    5252#define nil_get_addr_req(nil_phone, device_id, address, data) \
  • uspace/lib/net/include/nil_local.h

    r42a9f27 r404dbae  
    2727 */
    2828
    29 /** @addtogroup net_nil
    30  *  @{
     29/** @addtogroup libnet
     30 * @{
    3131 */
    3232
     
    3636 */
    3737
    38 #ifndef __NET_NIL_LOCAL_H__
    39 #define __NET_NIL_LOCAL_H__
     38#ifndef LIBNET_NIL_LOCAL_H_
     39#define LIBNET_NIL_LOCAL_H_
    4040
    4141#include <ipc/ipc.h>
     
    4545 * Is called by the module_start() function.
    4646 *
    47  * @param[in] net_phone The networking moduel phone.
    48  *
    49  * @return EOK on success.
    50  * @return Other error codes as defined for each specific module initialize function.
    51  *
     47 * @param[in] net_phone The networking moduel phone.
     48 * @return              EOK on success.
     49 * @return              Other error codes as defined for each specific module
     50 *                      initialize function.
    5251 */
    5352extern int nil_initialize(int);
    5453
     54/** Notify the network interface layer about the device state change.
     55 *
     56 * @param[in] nil_phone The network interface layer phone.
     57 * @param[in] device_id The device identifier.
     58 * @param[in] state     The new device state.
     59 * @return              EOK on success.
     60 * @return              Other error codes as defined for each specific module
     61 *                      device state function.
     62 */
    5563extern int nil_device_state_msg_local(int, device_id_t, int);
     64
     65
     66/** Pass the packet queue to the network interface layer.
     67 *
     68 * Process and redistribute the received packet queue to the registered
     69 * upper layers.
     70 *
     71 * @param[in] nil_phone The network interface layer phone.
     72 * @param[in] device_id The source device identifier.
     73 * @param[in] packet    The received packet or the received packet queue.
     74 * @param target        The target service. Ignored parameter.
     75 * @return              EOK on success.
     76 * @return              Other error codes as defined for each specific module
     77 *                      received function.
     78 */
    5679extern int nil_received_msg_local(int, device_id_t, packet_t, services_t);
    5780
    5881/** Message processing function.
    5982 *
    60  * @param[in]  name         Module name.
    61  * @param[in]  callid       The message identifier.
    62  * @param[in]  call         The message parameters.
    63  * @param[out] answer       The message answer parameters.
    64  * @param[out] answer_count The last parameter for the actual answer
    65  *                          in the answer parameter.
    66  *
    67  * @return EOK on success.
    68  * @return ENOTSUP if the message is not known.
    69  * @return Other error codes as defined for each specific
    70  *         module message function.
     83 * @param[in] name      Module name.
     84 * @param[in] callid    The message identifier.
     85 * @param[in] call      The message parameters.
     86 * @param[out] answer   The message answer parameters.
     87 * @param[out] answer_count The last parameter for the actual answer in the
     88 *                      answer parameter.
     89 * @return              EOK on success.
     90 * @return              ENOTSUP if the message is not known.
     91 * @return              Other error codes as defined for each specific module
     92 *                      message function.
    7193 *
    7294 * @see nil_interface.h
    7395 * @see IS_NET_NIL_MESSAGE()
     96 */
     97extern int nil_message_standalone(const char *, ipc_callid_t, ipc_call_t *,
     98    ipc_call_t *, int *);
     99
     100/** Pass the parameters to the module specific nil_message() function.
    74101 *
     102 * @param[in] name      Module name.
     103 * @param[in] callid    The message identifier.
     104 * @param[in] call      The message parameters.
     105 * @param[out] answer   The message answer parameters.
     106 * @param[out] answer_count The last parameter for the actual answer in the
     107 *                      answer parameter.
     108 * @return              EOK on success.
     109 * @return              ENOTSUP if the message is not known.
     110 * @return              Other error codes as defined for each specific module
     111 *                      message function.
    75112 */
    76 extern int nil_message_standalone(const char *, ipc_callid_t, ipc_call_t *, ipc_call_t *,
    77     int *);
    78 
    79113extern int nil_module_message_standalone(const char *, ipc_callid_t,
    80114    ipc_call_t *, ipc_call_t *, int *);
     115
     116/** Start the standalone nil layer module.
     117 *
     118 * Initialize the client connection serving function, initialize
     119 * the module, register the module service and start the async
     120 * manager, processing IPC messages in an infinite loop.
     121 *
     122 * @param[in] client_connection The client connection processing function.
     123 *                      The module skeleton propagates its own one.
     124 * @return              EOK on success.
     125 * @return              Other error codes as defined for the pm_init() function.
     126 * @return              Other error codes as defined for the nil_initialize()
     127 *                      function.
     128 * @return              Other error codes as defined for the REGISTER_ME() macro
     129 *                      function.
     130 */
    81131extern int nil_module_start_standalone(async_client_conn_t);
    82132
  • uspace/lib/net/nil/nil_remote.c

    r42a9f27 r404dbae  
    2727 */
    2828
    29 /** @addtogroup net_nil
     29/** @addtogroup libnet
    3030 * @{
    3131 */
     
    4747/** Notify the network interface layer about the device state change.
    4848 *
    49  * @param[in] nil_phone The network interface layer phone.
    50  * @param[in] device_id The device identifier.
    51  * @param[in] state     The new device state.
    52  *
    53  * @return EOK on success.
    54  * @return Other error codes as defined for each specific module device
    55  *         state function.
    56  *
     49 * @param[in] nil_phone The network interface layer phone.
     50 * @param[in] device_id The device identifier.
     51 * @param[in] state     The new device state.
     52 * @return              EOK on success.
     53 * @return              Other error codes as defined for each specific module
     54 *                      device state function.
    5755 */
    5856int nil_device_state_msg_remote(int nil_phone, device_id_t device_id, int state)
     
    6765 * upper layers.
    6866 *
    69  * @param[in] nil_phone The network interface layer phone.
    70  * @param[in] device_id The source device identifier.
    71  * @param[in] packet    The received packet or the received packet queue.
    72  * @param     target    The target service. Ignored parameter.
    73  *
    74  * @return EOK on success.
    75  * @return Other error codes as defined for each specific module
    76  *         received function.
    77  *
     67 * @param[in] nil_phone The network interface layer phone.
     68 * @param[in] device_id The source device identifier.
     69 * @param[in] packet    The received packet or the received packet queue.
     70 * @param target        The target service. Ignored parameter.
     71 * @return              EOK on success.
     72 * @return              Other error codes as defined for each specific module
     73 *                      received function.
    7874 */
    7975int nil_received_msg_remote(int nil_phone, device_id_t device_id,
    8076    packet_t packet, services_t target)
    8177{
    82         return generic_received_msg_remote(nil_phone, NET_NIL_RECEIVED, device_id,
    83             packet_get_id(packet), target, 0);
     78        return generic_received_msg_remote(nil_phone, NET_NIL_RECEIVED,
     79            device_id, packet_get_id(packet), target, 0);
    8480}
    8581
  • uspace/srv/net/nil/eth/eth_module.c

    r42a9f27 r404dbae  
    5050#include "eth.h"
    5151
    52 /** Starts the Ethernet module.
    53  *  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.
    54  *  @param[in] client_connection The client connection processing function. The module skeleton propagates its own one.
    55  *  @returns EOK on success.
    56  *  @returns Other error codes as defined for the pm_init() function.
    57  *  @returns Other error codes as defined for the nil_initialize() function.
    58  *  @returns Other error codes as defined for the REGISTER_ME() macro function.
    59  */
    6052int nil_module_start_standalone(async_client_conn_t client_connection)
    6153{
     
    7971}
    8072
    81 /** Pass the parameters to the module specific nil_message() function.
    82  *
    83  * @param[in]  name         Module name.
    84  * @param[in]  callid       The message identifier.
    85  * @param[in]  call         The message parameters.
    86  * @param[out] answer       The message answer parameters.
    87  * @param[out] answer_count The last parameter for the actual answer
    88  *                          in the answer parameter.
    89  *
    90  * @return EOK on success.
    91  * @return ENOTSUP if the message is not known.
    92  * @return Other error codes as defined for each
    93  *         specific module message function.
    94  *
    95  */
    9673int nil_module_message_standalone(const char *name, ipc_callid_t callid, ipc_call_t *call,
    9774    ipc_call_t *answer, int *answer_count)
  • uspace/srv/net/nil/nildummy/nildummy_module.c

    r42a9f27 r404dbae  
    5050#include "nildummy.h"
    5151
    52 /** Start the dummy nil module.
    53  *
    54  * Initialize the client connection serving function, initialize
    55  * the module, register the module service and start the async
    56  * manager, processing IPC messages in an infinite loop.
    57  *
    58  * @param[in] client_connection The client connection processing
    59  *                              function. The module skeleton propagates
    60  *                              its own one.
    61  *
    62  * @return EOK on success.
    63  * @return Other error codes as defined for the pm_init() function.
    64  * @return Other error codes as defined for the nil_initialize() function.
    65  * @return Other error codes as defined for the REGISTER_ME() macro function.
    66  *
    67  */
    6852int nil_module_start_standalone(async_client_conn_t client_connection)
    6953{
     
    8771}
    8872
    89 /** Pass the parameters to the module specific nil_message() function.
    90  *
    91  * @param[in]  name         Module name.
    92  * @param[in]  callid       The message identifier.
    93  * @param[in]  call         The message parameters.
    94  * @param[out] answer       The message answer parameters.
    95  * @param[out] answer_count The last parameter for the actual answer
    96  *                          in the answer parameter.
    97  *
    98  * @return EOK on success.
    99  * @return ENOTSUP if the message is not known.
    100  * @return Other error codes as defined for each specific
    101  *          module message function.
    102  *
    103  */
    10473int nil_module_message_standalone(const char *name, ipc_callid_t callid,
    10574    ipc_call_t *call, ipc_call_t *answer, int *answer_count)
Note: See TracChangeset for help on using the changeset viewer.