Rev 3685 | Rev 3912 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3685 | Rev 3846 | ||
---|---|---|---|
Line 31... | Line 31... | ||
31 | */ |
31 | */ |
32 | 32 | ||
33 | /** @file |
33 | /** @file |
34 | */ |
34 | */ |
35 | 35 | ||
- | 36 | #ifndef __NET_MESSAGES_H__ |
|
- | 37 | #define __NET_MESSAGES_H__ |
|
- | 38 | ||
36 | #define NET_NETIF_COUNT 7 |
39 | #define NET_NETIF_COUNT 6 |
37 | #define NET_NETWORKING_COUNT 4 |
40 | #define NET_NET_COUNT 9 |
38 | #define NET_LL_COUNT 5 |
41 | #define NET_NIL_COUNT 8 |
39 | #define NET_ETHERNET_COUNT 0 |
42 | #define NET_ETH_COUNT 0 |
40 | #define NET_IL_COUNT 2 |
43 | #define NET_IL_COUNT 3 |
41 | #define NET_IP_COUNT 4 |
44 | #define NET_IP_COUNT 2 |
42 | #define NET_ARP_COUNT 0 |
45 | #define NET_ARP_COUNT 4 |
43 | #define NET_RARP_COUNT 0 |
46 | #define NET_RARP_COUNT 0 |
44 | #define NET_ICMP_COUNT 0 |
47 | #define NET_ICMP_COUNT 0 |
45 | #define NET_UDP_COUNT 0 |
48 | #define NET_UDP_COUNT 0 |
46 | #define NET_TCP_COUNT 0 |
49 | #define NET_TCP_COUNT 0 |
47 | #define NET_SOCKET_COUNT 0 |
50 | #define NET_SOCKET_COUNT 0 |
Line 49... | Line 52... | ||
49 | #define NET_FIRST 2000 |
52 | #define NET_FIRST 2000 |
50 | 53 | ||
51 | #define NET_NETIF_FIRST NET_FIRST |
54 | #define NET_NETIF_FIRST NET_FIRST |
52 | #define NET_NETIF_LAST ( NET_NETIF_FIRST + NET_NETIF_COUNT ) |
55 | #define NET_NETIF_LAST ( NET_NETIF_FIRST + NET_NETIF_COUNT ) |
53 | 56 | ||
54 | #define NET_NETWORKING_FIRST ( NET_NETIF_LAST + 0 ) |
57 | #define NET_NET_FIRST ( NET_NETIF_LAST + 0 ) |
55 | #define NET_NETWORKING_LAST ( NET_NETWORKING_FIRST + NET_NETWORKING_COUNT ) |
58 | #define NET_NET_LAST ( NET_NET_FIRST + NET_NET_COUNT ) |
56 | 59 | ||
57 | #define NET_LL_FIRST ( NET_NETWORKING_LAST + 0 ) |
60 | #define NET_NIL_FIRST ( NET_NET_LAST + 0 ) |
58 | #define NET_LL_LAST ( NET_LL_FIRST + NET_LL_COUNT ) |
61 | #define NET_NIL_LAST ( NET_NIL_FIRST + NET_NIL_COUNT ) |
59 | #define NET_ETHERNET_FIRST ( NET_LL_LAST + 0 ) |
62 | #define NET_ETH_FIRST ( NET_NIL_LAST + 0 ) |
60 | #define NET_ETHERNET_LAST ( NET_ETHERNET_FIRST + NET_ETHERNET_COUNT ) |
63 | #define NET_ETH_LAST ( NET_ETH_FIRST + NET_ETH_COUNT ) |
61 | 64 | ||
62 | #define NET_IL_FIRST ( NET_ETHERNET_LAST + 0 ) |
65 | #define NET_IL_FIRST ( NET_ETH_LAST + 0 ) |
63 | #define NET_IL_LAST ( NET_IL_FIRST + NET_IL_COUNT ) |
66 | #define NET_IL_LAST ( NET_IL_FIRST + NET_IL_COUNT ) |
64 | #define NET_IP_FIRST ( NET_IL_LAST + 0 ) |
67 | #define NET_IP_FIRST ( NET_IL_LAST + 0 ) |
65 | #define NET_IP_LAST ( NET_IP_FIRST + NET_IP_COUNT ) |
68 | #define NET_IP_LAST ( NET_IP_FIRST + NET_IP_COUNT ) |
66 | 69 | ||
67 | #define NET_ARP_FIRST ( NET_IP_LAST + 0 ) |
70 | #define NET_ARP_FIRST ( NET_IP_LAST + 0 ) |
Line 83... | Line 86... | ||
83 | #define NET_COUNT ( NET_LAST - NET_FIRST ) |
86 | #define NET_COUNT ( NET_LAST - NET_FIRST ) |
84 | 87 | ||
85 | #define IS_IN_INTERVAL( item, first_inclusive, last_exclusive ) ((( item ) >= ( first_inclusive )) && (( item ) < ( last_exclusive ))) |
88 | #define IS_IN_INTERVAL( item, first_inclusive, last_exclusive ) ((( item ) >= ( first_inclusive )) && (( item ) < ( last_exclusive ))) |
86 | 89 | ||
87 | #define IS_NET_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_FIRST, NET_LAST ) |
90 | #define IS_NET_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_FIRST, NET_LAST ) |
88 | #define IS_NET_NETWORKING_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_NETWORKING_FIRST, NET_NETWORKING_LAST ) |
91 | #define IS_NET_NET_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_NET_FIRST, NET_NET_LAST ) |
89 | #define IS_NET_LL_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_LL_FIRST, NET_LL_LAST ) |
92 | #define IS_NET_NIL_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_NIL_FIRST, NET_NIL_LAST ) |
90 | #define IS_NET_ETHERNET_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_ETHERNET_FIRST, NET_SOCKET_LAST ) |
93 | #define IS_NET_ETH_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_ETH_FIRST, NET_ETH_LAST ) |
91 | #define IS_NET_IL_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_IL_FIRST, NET_IL_LAST ) |
94 | #define IS_NET_IL_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_IL_FIRST, NET_IL_LAST ) |
92 | #define IS_NET_IP_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_IP_FIRST, NET_IP_LAST ) |
95 | #define IS_NET_IP_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_IP_FIRST, NET_IP_LAST ) |
93 | #define IS_NET_ARP_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_ARP_FIRST, NET_ARP_LAST ) |
96 | #define IS_NET_ARP_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_ARP_FIRST, NET_ARP_LAST ) |
94 | #define IS_NET_RARP_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_RARP_FIRST, NET_RARP_LAST ) |
97 | #define IS_NET_RARP_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_RARP_FIRST, NET_RARP_LAST ) |
95 | #define IS_NET_UDP_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_UDP_FIRST, NET_UDP_LAST ) |
98 | #define IS_NET_UDP_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_UDP_FIRST, NET_UDP_LAST ) |
96 | #define IS_NET_TCP_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_TCP_FIRST, NET_TCP_LAST ) |
99 | #define IS_NET_TCP_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_TCP_FIRST, NET_TCP_LAST ) |
97 | #define IS_NET_SOCKET_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_SOCKET_FIRST, NET_SOCKET_LAST ) |
100 | #define IS_NET_SOCKET_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( call ), NET_SOCKET_FIRST, NET_SOCKET_LAST ) |
98 | 101 | ||
99 | typedef enum { |
102 | typedef enum { |
- | 103 | /* ( device_id, irq, io ) */ |
|
100 | NET_NETIF_PROBE = NET_NETIF_FIRST, |
104 | NET_NETIF_PROBE = NET_NETIF_FIRST, |
- | 105 | /* () not supported, should ask networking for a name and register device */ |
|
101 | NET_NETIF_PROBE_AUTO, |
106 | NET_NETIF_PROBE_AUTO, |
102 | NET_NETIF_REGISTER, |
107 | /* ( device_id ), packet_send */ |
103 | NET_NETIF_SEND, |
108 | NET_NETIF_SEND, |
- | 109 | /* ( device_id ) */ |
|
104 | NET_NETIF_START, |
110 | NET_NETIF_START, |
- | 111 | /* ( device_id ), ipc_data_read( stats ) */ |
|
105 | NET_NETIF_STATS, |
112 | NET_NETIF_STATS, |
- | 113 | /* ( device_id ) */ |
|
106 | NET_NETIF_STOP, |
114 | NET_NETIF_STOP, |
- | 115 | /* () not supported, registers new device */ |
|
107 | NET_NETWORKING_DEVICE = NET_NETWORKING_FIRST, |
116 | NET_NET_DEVICE = NET_NET_FIRST, |
- | 117 | /* (), measured_strings_send( names ), measured_strings_return( values ) */ |
|
108 | NET_NETWORKING_GET_CONFIGURATION, |
118 | NET_NET_GET_CONF, |
- | 119 | /* ( device_id ), measured_strings_send( names ), measured_strings_return( values ) */ |
|
109 | NET_NETWORKING_GET_DEVICE_CONFIGURATION, |
120 | NET_NET_GET_DEVICE_CONF, |
- | 121 | /* () not supported, measured_strings_send( names ), measured_strings_send( values ) */ |
|
- | 122 | NET_NET_SET_CONF, |
|
- | 123 | /* ( device_id ) not supported, measured_strings_send( names ), measured_strings_send( values ) */ |
|
- | 124 | NET_NET_SET_DEVICE_CONF, |
|
- | 125 | /* () */ |
|
110 | NET_NETWORKING_STARTUP, |
126 | NET_NET_STARTUP, |
- | 127 | /* ( device_id ) */ |
|
- | 128 | NET_NET_START, |
|
- | 129 | /* ( device_id ) */ |
|
- | 130 | NET_NET_STOP, |
|
- | 131 | /* ( device_id ) ipc_data_read( stats ) */ |
|
- | 132 | NET_NET_STATS, |
|
- | 133 | /* ( device_id, driver_service ) */ |
|
111 | NET_LL_DEVICE = NET_LL_FIRST, |
134 | NET_NIL_DEVICE = NET_NIL_FIRST, |
- | 135 | /* ( device_id, state ) */ |
|
112 | NET_LL_DEVICE_STATE_CHANGED, |
136 | NET_NIL_DEVICE_STATE, |
- | 137 | /* ( device_id, mtu ) */ |
|
113 | NET_LL_MTU_CHANGED, |
138 | NET_NIL_MTU, |
- | 139 | /* ( device_id ), packet_send */ |
|
114 | NET_LL_RECEIVED, |
140 | NET_NIL_RECEIVED, |
- | 141 | /* ( device_id ), packet_send */ |
|
- | 142 | NET_NIL_SEND, |
|
- | 143 | /* ( device_id ) -> prefix, content, sufix */ |
|
- | 144 | NET_NIL_PACKET_SPACE, |
|
- | 145 | /* ( device_id ), measured_strings_return( hardware address ) */ |
|
115 | NET_LL_REGISTER, |
146 | NET_NIL_ADDR, |
- | 147 | /* ( device_id ), measured_strings_return( broadcast address ) */ |
|
- | 148 | NET_NIL_BROADCAST_ADDR, |
|
- | 149 | /* ( service ), protocol */ |
|
- | 150 | // NET_NIL_PROTOCOL, |
|
- | 151 | /* ( device_id, nil_service ) */ |
|
116 | NET_IL_DEVICE = NET_IL_FIRST, |
152 | NET_IL_DEVICE = NET_IL_FIRST, |
- | 153 | /* ( device_id, state ) */ |
|
117 | NET_IL_DEVICE_STATE_CHANGED, |
154 | NET_IL_DEVICE_STATE, |
- | 155 | /* ( device_id ), packet_send */ |
|
- | 156 | NET_IL_RECEIVED, |
|
- | 157 | /* ( device_id ), measured_strings_send( address ) */ |
|
- | 158 | // NET_IL_MY_ADDR, |
|
118 | NET_IP_CONFIGURATION_DHCP = NET_IP_FIRST, |
159 | NET_IP_ECHO = NET_IP_FIRST, |
- | 160 | NET_IP_SEND, |
|
- | 161 | /* ( device_id, nil_service, proto ), measured_strings_send( proto_addr ) */ |
|
119 | NET_IP_CONFIGURATION_STATIC, |
162 | NET_ARP_DEVICE = NET_ARP_FIRST, |
- | 163 | /* ( device_id, protocol ), measured_strings_send( target ), measured_strings_return( translation ) */ |
|
120 | NET_IP_ECHO, |
164 | NET_ARP_TRANSLATE, |
- | 165 | /* ( device_id ) */ |
|
121 | NET_IP_TCP_REGISTER |
166 | NET_ARP_CLEAR_DEVICE, |
- | 167 | /* () */ |
|
- | 168 | NET_ARP_CLEAN_CACHE |
|
122 | } net_message; |
169 | } net_message; |
123 | 170 | ||
- | 171 | #endif |
|
- | 172 | ||
124 | /** @} |
173 | /** @} |
125 | */ |
174 | */ |