Ignore:
File:
1 edited

Legend:

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

    re037e20e r14f1db0  
    2727 */
    2828
    29 /** @addtogroup libnet
    30  * @{
     29/** @addtogroup ip
     30 *  @{
    3131 */
    3232
    33 #ifndef LIBNET_IP_INTERFACE_H_
    34 #define LIBNET_IP_INTERFACE_H_
     33#ifndef __NET_IP_INTERFACE_H__
     34#define __NET_IP_INTERFACE_H__
    3535
    36 #include <net/socket_codes.h>
    3736#include <async.h>
    3837#include <ipc/services.h>
    3938
    40 #include <net/device.h>
    41 #include <net/packet.h>
     39#include <net_device.h>
     40#include <packet/packet.h>
    4241
    43 #include <net/in.h>
    44 #include <net/ip_codes.h>
     42#include <in.h>
     43#include <ip_codes.h>
     44#include <socket_codes.h>
     45
     46#ifdef CONFIG_IL_TL_BUNDLE
     47
     48#include <ip_local.h>
     49
     50#define ip_received_error_msg  ip_received_error_msg_local
     51#define ip_set_gateway_req     ip_set_gateway_req_local
     52#define ip_packet_size_req     ip_packet_size_req_local
     53#define ip_device_req          ip_device_req_local
     54#define ip_add_route_req       ip_add_route_req_local
     55#define ip_send_msg            ip_send_msg_local
     56#define ip_get_route_req       ip_get_route_req_local
     57
     58#else
    4559
    4660#include <ip_remote.h>
     
    5468#define ip_get_route_req       ip_get_route_req_remote
    5569
     70#endif
     71
    5672/** @name IP module interface
    57  * This interface is used by other modules.
     73 *  This interface is used by other modules.
    5874 */
    5975/*@{*/
    6076
    6177/** The transport layer notification function type definition.
    62  *
    63  * Notifies the transport layer modules about the received packet/s.
    64  *
    65  * @param[in] device_id The device identifier.
    66  * @param[in] packet    The received packet or the received packet queue.
    67  * @param[in] receiver  The receiving module service.
    68  * @param[in] error     The packet error reporting service. Prefixes the
    69  *                      received packet.
    70  * @returns             EOK on success.
     78 *  Notifies the transport layer modules about the received packet/s.
     79 *  @param[in] device_id The device identifier.
     80 *  @param[in] packet The received packet or the received packet queue.
     81 *  @param[in] receiver The receiving module service.
     82 *  @param[in] error The packet error reporting service. Prefixes the received packet.
     83 *  @returns EOK on success.
    7184 */
    72 typedef int (*tl_received_msg_t)(device_id_t device_id, packet_t packet,
    73     services_t receiver, services_t error);
     85typedef int     (*tl_received_msg_t)(device_id_t device_id, packet_t packet, services_t receiver, services_t error);
    7486
    75 extern int ip_bind_service(services_t, int, services_t, async_client_conn_t);
    76 extern int ip_connect_module(services_t);
     87/** Creates bidirectional connection with the ip module service and registers the message receiver.
     88 *  @param[in] service The IP module service.
     89 *  @param[in] protocol The transport layer protocol.
     90 *  @param[in] me The requesting module service.
     91 *  @param[in] receiver The message receiver. Used for remote connection.
     92 *  @param[in] tl_received_msg The message processing function. Used if bundled together.
     93 *  @returns The phone of the needed service.
     94 *  @returns EOK on success.
     95 *  @returns Other error codes as defined for the bind_service() function.
     96 */
     97extern int ip_bind_service(services_t service, int protocol, services_t me, async_client_conn_t receiver, tl_received_msg_t tl_received_msg);
     98
     99/** Connects to the IP module.
     100 *  @param service The IP module service. Ignored parameter.
     101 *  @returns The IP module phone on success.
     102 *  @returns 0 if called by the bundle module.
     103 */
     104extern int ip_connect_module(services_t service);
    77105
    78106/*@}*/
Note: See TracChangeset for help on using the changeset viewer.