Rev 4163 | Rev 4243 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4163 | Rev 4192 | ||
---|---|---|---|
Line 35... | Line 35... | ||
35 | */ |
35 | */ |
36 | 36 | ||
37 | #ifndef __NET_NETIF_H__ |
37 | #ifndef __NET_NETIF_H__ |
38 | #define __NET_NETIF_H__ |
38 | #define __NET_NETIF_H__ |
39 | 39 | ||
- | 40 | #include <rwlock.h> |
|
- | 41 | ||
40 | #include "device.h" |
42 | #include "device.h" |
41 | 43 | ||
42 | /** Sends the notification message to the registered network interface layer module. |
44 | /** Sends the notification message to the registered network interface layer module. |
43 | * Wrapper of the async_msg_3(). |
45 | * Wrapper of the async_msg_3(). |
44 | * The first message argument is always the device identifier. |
46 | * The first message argument is always the device identifier. |
Line 77... | Line 79... | ||
77 | */ |
79 | */ |
78 | device_id_t device_id; |
80 | device_id_t device_id; |
79 | /** Receiving network interface layer phone. |
81 | /** Receiving network interface layer phone. |
80 | */ |
82 | */ |
81 | int nil_phone; |
83 | int nil_phone; |
82 | /** Usage statistics. |
- | |
83 | */ |
- | |
84 | device_stats_t stats; |
- | |
85 | /** Actual device state. |
84 | /** Actual device state. |
86 | */ |
85 | */ |
87 | device_state_t state; |
86 | device_state_t state; |
88 | /** Driver specific data. |
87 | /** Driver specific data. |
89 | */ |
88 | */ |
Line 97... | Line 96... | ||
97 | */ |
96 | */ |
98 | int networking_phone; |
97 | int networking_phone; |
99 | /** Device map. |
98 | /** Device map. |
100 | */ |
99 | */ |
101 | device_map_t device_map; |
100 | device_map_t device_map; |
- | 101 | /** Safety lock. |
|
- | 102 | */ |
|
- | 103 | rwlock_t lock; |
|
102 | }; |
104 | }; |
103 | 105 | ||
104 | /** Finds the device specific data. |
106 | /** Finds the device specific data. |
105 | * @param device_id The device identifier. Input parameter. |
107 | * @param device_id The device identifier. Input parameter. |
106 | * @param device The device specific data. Output parameter. |
108 | * @param device The device specific data. Output parameter. |
Line 113... | Line 115... | ||
113 | /** Clears the usage statistics. |
115 | /** Clears the usage statistics. |
114 | * @param stats The usage statistics. Input parameter. |
116 | * @param stats The usage statistics. Input parameter. |
115 | */ |
117 | */ |
116 | void null_device_stats( device_stats_ref stats ); |
118 | void null_device_stats( device_stats_ref stats ); |
117 | 119 | ||
- | 120 | // prepared for future optimalizations |
|
- | 121 | /** \todo |
|
- | 122 | */ |
|
- | 123 | void netif_pq_release( packet_id_t packet ); |
|
- | 124 | ||
- | 125 | /** \todo |
|
- | 126 | */ |
|
- | 127 | packet_t netif_packet_get_1( size_t content ); |
|
- | 128 | ||
118 | #endif |
129 | #endif |
119 | 130 | ||
120 | /** @} |
131 | /** @} |
121 | */ |
132 | */ |
122 | 133 |