Rev 4243 | Rev 4271 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4243 | Rev 4261 | ||
---|---|---|---|
Line 45... | Line 45... | ||
45 | #include "../../modules.h" |
45 | #include "../../modules.h" |
46 | 46 | ||
47 | #include "../../include/sockaddr.h" |
47 | #include "../../include/sockaddr.h" |
48 | #include "../../include/socket.h" |
48 | #include "../../include/socket.h" |
49 | #include "../../include/device.h" |
49 | #include "../../include/device.h" |
- | 50 | #include "../../include/nil_messages.h" |
|
50 | #include "../../structures/measured_strings.h" |
51 | #include "../../structures/measured_strings.h" |
51 | #include "../../structures/module_map.h" |
52 | #include "../../structures/module_map.h" |
52 | #include "../../structures/packet/packet_client.h" |
53 | #include "../../structures/packet/packet_client.h" |
53 | 54 | ||
54 | #include "ip.h" |
55 | #include "ip.h" |
Line 58... | Line 59... | ||
58 | #define DEFAULT_IPV 4 |
59 | #define DEFAULT_IPV 4 |
59 | 60 | ||
60 | #define ARP_NAME "arp" |
61 | #define ARP_NAME "arp" |
61 | #define ARP_FILENAME "/srv/arp" |
62 | #define ARP_FILENAME "/srv/arp" |
62 | 63 | ||
63 | #define IPC_GET_DEVICE( call ) ( device_id_t ) IPC_GET_ARG1( * call ) |
- | |
64 | #define IPC_GET_PACKET( call ) ( packet_id_t ) IPC_GET_ARG1( * call ) |
- | |
65 | #define IPC_GET_PROTO( call ) ( int ) IPC_GET_ARG1( * call ) |
64 | #define IPC_GET_PROTO( call ) ( int ) IPC_GET_ARG1( * call ) |
66 | #define IPC_GET_SERVICE( call ) ( services_t ) IPC_GET_ARG2( * call ) |
- | |
67 | #define IPC_GET_STATE( call ) ( device_state_t ) IPC_GET_ARG2( * call ) |
65 | #define IPC_GET_STATE( call ) ( device_state_t ) IPC_GET_ARG2( * call ) |
68 | #define IPC_GET_PHONE( call ) ( int ) IPC_GET_ARG5( * call ) |
66 | #define IPC_GET_PHONE( call ) ( int ) IPC_GET_ARG5( * call ) |
69 | 67 | ||
70 | ip_globals_t ip_globals; |
68 | ip_globals_t ip_globals; |
71 | 69 | ||
Line 178... | Line 176... | ||
178 | ip_netif->arp = NULL; |
176 | ip_netif->arp = NULL; |
179 | } |
177 | } |
180 | free( settings ); |
178 | free( settings ); |
181 | free( data ); |
179 | free( data ); |
182 | } |
180 | } |
183 | // TODO mapping |
- | |
184 | ip_netif->phone = bind_service( service, ip_netif->device_id, SERVICE_IP, 0, ip_driver_receiver ); |
181 | ip_netif->phone = bind_service( service, ip_netif->device_id, SERVICE_IP, 0, ip_driver_receiver ); |
185 | if( ip_netif->phone < 0 ){ |
182 | if( ip_netif->phone < 0 ){ |
186 | printf( "\nFailed to contact the nil service %d", service ); |
183 | printf( "\nFailed to contact the nil service %d", service ); |
187 | free( ip_netif ); |
184 | free( ip_netif ); |
188 | return ip_netif->phone; |
185 | return ip_netif->phone; |