Subversion Repositories HelenOS

Rev

Rev 3846 | Rev 3912 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3846 Rev 3901
Line 45... Line 45...
45
#define NET_ARP_COUNT       4
45
#define NET_ARP_COUNT       4
46
#define NET_RARP_COUNT      0
46
#define NET_RARP_COUNT      0
47
#define NET_ICMP_COUNT      0
47
#define NET_ICMP_COUNT      0
48
#define NET_UDP_COUNT       0
48
#define NET_UDP_COUNT       0
49
#define NET_TCP_COUNT       0
49
#define NET_TCP_COUNT       0
-
 
50
#define NET_PACKET_COUNT    5
50
#define NET_SOCKET_COUNT    0
51
#define NET_SOCKET_COUNT    0
51
 
52
 
52
#define NET_FIRST       2000
53
#define NET_FIRST       2000
53
 
54
 
54
#define NET_NETIF_FIRST     NET_FIRST
55
#define NET_NETIF_FIRST     NET_FIRST
Line 79... Line 80...
79
#define NET_TCP_LAST        ( NET_TCP_FIRST + NET_TCP_COUNT )
80
#define NET_TCP_LAST        ( NET_TCP_FIRST + NET_TCP_COUNT )
80
 
81
 
81
#define NET_SOCKET_FIRST    ( NET_TCP_LAST + 0 )
82
#define NET_SOCKET_FIRST    ( NET_TCP_LAST + 0 )
82
#define NET_SOCKET_LAST     ( NET_SOCKET_FIRST + NET_SOCKET_COUNT )
83
#define NET_SOCKET_LAST     ( NET_SOCKET_FIRST + NET_SOCKET_COUNT )
83
 
84
 
-
 
85
#define NET_PACKET_FIRST    ( NET_SOCKET_LAST + 0 )
-
 
86
#define NET_PACKET_LAST     ( NET_PACKET_FIRST + NET_PACKET_COUNT )
-
 
87
 
84
#define NET_LAST        NET_SOCKET_LAST
88
#define NET_LAST        NET_PACKET_LAST
85
 
89
 
86
#define NET_COUNT       ( NET_LAST - NET_FIRST )
90
#define NET_COUNT       ( NET_LAST - NET_FIRST )
87
 
91
 
88
#define IS_IN_INTERVAL( item, first_inclusive, last_exclusive ) ((( item ) >= ( first_inclusive )) && (( item ) < ( last_exclusive )))
92
#define IS_IN_INTERVAL( item, first_inclusive, last_exclusive ) ((( item ) >= ( first_inclusive )) && (( item ) < ( last_exclusive )))
89
 
93
 
90
#define IS_NET_MESSAGE( call )          IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_FIRST, NET_LAST )
94
#define IS_NET_MESSAGE( call )          IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_FIRST, NET_LAST )
91
#define IS_NET_NET_MESSAGE( call )      IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_NET_FIRST, NET_NET_LAST )
95
#define IS_NET_NET_MESSAGE( call )      IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_NET_FIRST, NET_NET_LAST )
92
#define IS_NET_NIL_MESSAGE( call )      IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_NIL_FIRST, NET_NIL_LAST )
96
#define IS_NET_NIL_MESSAGE( call )      IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_NIL_FIRST, NET_NIL_LAST )
93
#define IS_NET_ETH_MESSAGE( call )      IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_ETH_FIRST, NET_ETH_LAST )
97
#define IS_NET_ETH_MESSAGE( call )      IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_ETH_FIRST, NET_ETH_LAST )
94
#define IS_NET_IL_MESSAGE( call )       IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_IL_FIRST, NET_IL_LAST )
98
#define IS_NET_IL_MESSAGE( call )       IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_IL_FIRST, NET_IL_LAST )
95
#define IS_NET_IP_MESSAGE( call )       IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_IP_FIRST, NET_IP_LAST )
99
#define IS_NET_IP_MESSAGE( call )       IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_IP_FIRST, NET_IP_LAST )
96
#define IS_NET_ARP_MESSAGE( call )      IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_ARP_FIRST, NET_ARP_LAST )
100
#define IS_NET_ARP_MESSAGE( call )      IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_ARP_FIRST, NET_ARP_LAST )
97
#define IS_NET_RARP_MESSAGE( call )     IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_RARP_FIRST, NET_RARP_LAST )
101
#define IS_NET_RARP_MESSAGE( call )     IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_RARP_FIRST, NET_RARP_LAST )
98
#define IS_NET_UDP_MESSAGE( call )      IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_UDP_FIRST, NET_UDP_LAST )
102
#define IS_NET_UDP_MESSAGE( call )      IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_UDP_FIRST, NET_UDP_LAST )
99
#define IS_NET_TCP_MESSAGE( call )      IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_TCP_FIRST, NET_TCP_LAST )
103
#define IS_NET_TCP_MESSAGE( call )      IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_TCP_FIRST, NET_TCP_LAST )
100
#define IS_NET_SOCKET_MESSAGE( call )       IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_SOCKET_FIRST, NET_SOCKET_LAST )
104
#define IS_NET_SOCKET_MESSAGE( call )   IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_SOCKET_FIRST, NET_SOCKET_LAST )
-
 
105
#define IS_NET_PACKET_MESSAGE( call )   IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_PACKET_FIRST, NET_PACKET_LAST )
101
 
106
 
102
typedef enum {
107
typedef enum {
103
    /* ( device_id, irq, io ) */
108
    /* ( device_id, irq, io ) */
104
    NET_NETIF_PROBE = NET_NETIF_FIRST,
109
    NET_NETIF_PROBE = NET_NETIF_FIRST,
105
    /* () not supported, should ask networking for a name and register device */
110
    /* () not supported, should ask networking for a name and register device */
106
    NET_NETIF_PROBE_AUTO,
111
    NET_NETIF_PROBE_AUTO,
107
    /* ( device_id ), packet_send */
112
    /* ( device_id, packet_id ) */
108
    NET_NETIF_SEND,
113
    NET_NETIF_SEND,
109
    /* ( device_id ) */
114
    /* ( device_id ) */
110
    NET_NETIF_START,
115
    NET_NETIF_START,
111
    /* ( device_id ), ipc_data_read( stats ) */
116
    /* ( device_id ), ipc_data_read( stats ) */
112
    NET_NETIF_STATS,
117
    NET_NETIF_STATS,
113
    /* ( device_id ) */
118
    /* ( device_id ) */
114
    NET_NETIF_STOP,
119
    NET_NETIF_STOP,
115
    /* () not supported, registers new device */
120
    /* () not supported, registers new device */
116
    NET_NET_DEVICE = NET_NET_FIRST,
121
    NET_NET_DEVICE = NET_NET_FIRST,
117
    /* (), measured_strings_send( names ), measured_strings_return( values ) */
122
    /* ( NULL, count ), measured_strings_send( names ), measured_strings_return( values ) */
118
    NET_NET_GET_CONF,
123
    NET_NET_GET_CONF,
119
    /* ( device_id ), measured_strings_send( names ), measured_strings_return( values ) */
124
    /* ( device_id, count ), measured_strings_send( names ), measured_strings_return( values ) */
120
    NET_NET_GET_DEVICE_CONF,
125
    NET_NET_GET_DEVICE_CONF,
121
    /* () not supported, measured_strings_send( names ), measured_strings_send( values ) */
126
    /* () not supported, measured_strings_send( names ), measured_strings_send( values ) */
122
    NET_NET_SET_CONF,
127
    NET_NET_SET_CONF,
123
    /* ( device_id ) not supported, measured_strings_send( names ), measured_strings_send( values ) */
128
    /* ( device_id, count ) not supported, measured_strings_send( names ), measured_strings_send( values ) */
124
    NET_NET_SET_DEVICE_CONF,
129
    NET_NET_SET_DEVICE_CONF,
125
    /* () */
130
    /* () */
126
    NET_NET_STARTUP,
131
    NET_NET_STARTUP,
127
    /* ( device_id ) */
132
    /* ( device_id ) */
128
    NET_NET_START,
133
    NET_NET_START,
Line 155... Line 160...
155
    /* ( device_id ), packet_send */
160
    /* ( device_id ), packet_send */
156
    NET_IL_RECEIVED,
161
    NET_IL_RECEIVED,
157
    /* ( device_id ), measured_strings_send( address ) */
162
    /* ( device_id ), measured_strings_send( address ) */
158
//  NET_IL_MY_ADDR,
163
//  NET_IL_MY_ADDR,
159
    NET_IP_ECHO = NET_IP_FIRST,
164
    NET_IP_ECHO = NET_IP_FIRST,
-
 
165
    /* ( packet_id ) */
160
    NET_IP_SEND,
166
    NET_IP_SEND,
161
    /* ( device_id, nil_service, proto ), measured_strings_send( proto_addr ) */
167
    /* ( device_id, nil_service, proto ), measured_strings_send( proto_addr ) */
162
    NET_ARP_DEVICE = NET_ARP_FIRST,
168
    NET_ARP_DEVICE = NET_ARP_FIRST,
163
    /* ( device_id, protocol ), measured_strings_send( target ), measured_strings_return( translation ) */
169
    /* ( device_id, protocol ), measured_strings_send( target ), measured_strings_return( translation ) */
164
    NET_ARP_TRANSLATE,
170
    NET_ARP_TRANSLATE,
165
    /* ( device_id ) */
171
    /* ( device_id ) */
166
    NET_ARP_CLEAR_DEVICE,
172
    NET_ARP_CLEAR_DEVICE,
167
    /* () */
173
    /* () */
168
    NET_ARP_CLEAN_CACHE
174
    NET_ARP_CLEAN_CACHE,
-
 
175
    NET_PACKET_CREATE_1 = NET_PACKET_FIRST,
-
 
176
    NET_PACKET_CREATE_5,
-
 
177
    NET_PACKET_GET,
-
 
178
    NET_PACKET_GET_SIZE,
-
 
179
    NET_PACKET_RELEASE
169
} net_message;
180
} net_messages;
170
 
181
 
171
#endif
182
#endif
172
 
183
 
173
/** @}
184
/** @}
174
 */
185
 */