~jakub/helenos/ia64-revival

« back to all changes in this revision

Viewing changes to uspace/lib/net/include/il_remote.h

  • Committer: Jakub Jermar
  • Date: 2011-04-13 14:45:41 UTC
  • mfrom: (527.1.397 main-clone)
  • Revision ID: jakub@jermar.eu-20110413144541-x0j3r1zxqhsljx1o
MergeĀ mainlineĀ changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
27
 */
28
28
 
29
 
/** @addtogroup net_il
30
 
 *  @{
 
29
/** @addtogroup libnet
 
30
 * @{
31
31
 */
32
32
 
33
33
/** @file
34
 
 * Internetwork layer module interface for the underlying network interface layer.
35
 
 * This interface is always called by the remote modules.
 
34
 * Internetwork layer module interface for the underlying network interface
 
35
 * layer. This interface is always called by the remote modules.
36
36
 */
37
37
 
38
 
#ifndef __NET_IL_INTERFACE_H__
39
 
#define __NET_IL_INTERFACE_H__
40
 
 
41
 
#include <async.h>
 
38
#ifndef LIBNET_IL_REMOTE_H_
 
39
#define LIBNET_IL_REMOTE_H_
42
40
 
43
41
#include <ipc/services.h>
 
42
#include <sys/types.h>
44
43
 
45
 
#include <net_messages.h>
46
 
#include <net_device.h>
47
 
#include <packet/packet.h>
48
 
#include <packet/packet_client.h>
49
 
#include <il_messages.h>
 
44
#include <net/device.h>
 
45
#include <net/packet.h>
50
46
 
51
47
/** @name Internetwork layer module interface
52
48
 * This interface is used by other modules.
53
49
 */
54
50
/*@{*/
55
51
 
56
 
/** Notify the internetwork layer modules about the device state change.
57
 
 *
58
 
 * @param[in] il_phone  The internetwork layer module phone used for
59
 
 *                      (semi)remote calls.
60
 
 * @param[in] device_id The device identifier.
61
 
 * @param[in] state     The new device state.
62
 
 * @param[in] target    The target internetwork module service to be
63
 
 *                      delivered to.
64
 
 *
65
 
 * @return EOK on success.
66
 
 *
67
 
 */
68
 
static inline int il_device_state_msg(int il_phone, device_id_t device_id,
69
 
    device_state_t state, services_t target)
70
 
{
71
 
        return generic_device_state_msg_remote(il_phone, NET_IL_DEVICE_STATE,
72
 
            device_id, state, target);
73
 
}
74
 
 
75
 
/** Notify the internetwork layer modules about the received packet/s.
76
 
 *
77
 
 * @param[in] il_phone  The internetwork layer module phone used for
78
 
 *                      (semi)remote calls.
79
 
 * @param[in] device_id The device identifier.
80
 
 * @param[in] packet    The received packet or the received packet queue.
81
 
 * @param[in] target    The target internetwork module service to be
82
 
 *                      delivered to.
83
 
 *
84
 
 * @return EOK on success.
85
 
 *
86
 
 */
87
 
inline static int il_received_msg(int il_phone, device_id_t device_id,
88
 
    packet_t packet, services_t target)
89
 
{
90
 
        return generic_received_msg_remote(il_phone, NET_IL_RECEIVED, device_id,
91
 
            packet_get_id(packet), target, 0);
92
 
}
93
 
 
94
 
/** Notify the internetwork layer modules about the mtu change.
95
 
 *
96
 
 * @param[in] il_phone  The internetwork layer module phone used for
97
 
 *                      (semi)remote calls.
98
 
 * @param[in] device_id The device identifier.
99
 
 * @param[in] mtu       The new mtu value.
100
 
 * @param[in] target    The target internetwork module service to be
101
 
 *                      delivered to.
102
 
 *
103
 
 * @return EOK on success.
104
 
 *
105
 
 */
106
 
inline static int il_mtu_changed_msg(int il_phone, device_id_t device_id,
107
 
    size_t mtu, services_t target)
108
 
{
109
 
        return generic_device_state_msg_remote(il_phone, NET_IL_MTU_CHANGED,
110
 
            device_id, (int) mtu, target);
111
 
}
 
52
extern int il_device_state_msg(int, device_id_t, device_state_t, services_t);
 
53
extern int il_received_msg(int, device_id_t, packet_t *, services_t);
 
54
extern int il_mtu_changed_msg(int, device_id_t, size_t, services_t);
112
55
 
113
56
/*@}*/
114
57