Rev 4197 | Rev 4261 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4197 | Rev 4243 | ||
---|---|---|---|
Line 54... | Line 54... | ||
54 | #include "../structures/module_map.h" |
54 | #include "../structures/module_map.h" |
55 | #include "../structures/packet/packet.h" |
55 | #include "../structures/packet/packet.h" |
56 | #include "../structures/packet/packet_server.h" |
56 | #include "../structures/packet/packet_server.h" |
57 | 57 | ||
58 | #include "../il/ip/ip_messages.h" |
58 | #include "../il/ip/ip_messages.h" |
59 | #include "../netif/device.h" |
59 | #include "../include/device.h" |
- | 60 | #include "../include/netif_messages.h" |
|
60 | 61 | ||
61 | #if IP_BUNDLE |
62 | #if IP_BUNDLE |
62 | 63 | ||
63 | #include "../ip/ip_module.h" |
64 | #include "../ip/ip_module.h" |
64 | 65 | ||
Line 430... | Line 431... | ||
430 | ERROR_PROPAGATE( add_configuration( & netif->configuration, "NETIF", DP8390_NAME )); |
431 | ERROR_PROPAGATE( add_configuration( & netif->configuration, "NETIF", DP8390_NAME )); |
431 | ERROR_PROPAGATE( add_configuration( & netif->configuration, "NIL", ETHERNET_NAME )); |
432 | ERROR_PROPAGATE( add_configuration( & netif->configuration, "NIL", ETHERNET_NAME )); |
432 | ERROR_PROPAGATE( add_configuration( & netif->configuration, "IL", IP_NAME )); |
433 | ERROR_PROPAGATE( add_configuration( & netif->configuration, "IL", IP_NAME )); |
433 | ERROR_PROPAGATE( add_configuration( & netif->configuration, "IRQ", "9" )); |
434 | ERROR_PROPAGATE( add_configuration( & netif->configuration, "IRQ", "9" )); |
434 | ERROR_PROPAGATE( add_configuration( & netif->configuration, "IO", "300" )); |
435 | ERROR_PROPAGATE( add_configuration( & netif->configuration, "IO", "300" )); |
- | 436 | ERROR_PROPAGATE( add_configuration( & netif->configuration, "MTU", "1492" )); |
|
435 | ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_CONFIG", "static" )); |
437 | ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_CONFIG", "static" )); |
436 | ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_ADDR", "10.0.2.5" )); |
438 | ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_ADDR", "10.0.2.5" )); |
437 | ERROR_PROPAGATE( add_configuration( & netif->configuration, "NETMASK", "255.255.255.0" )); |
439 | ERROR_PROPAGATE( add_configuration( & netif->configuration, "NETMASK", "255.255.255.0" )); |
438 | ERROR_PROPAGATE( add_configuration( & netif->configuration, "BROADCAST", "10.0.2.255" )); |
440 | ERROR_PROPAGATE( add_configuration( & netif->configuration, "BROADCAST", "10.0.2.255" )); |
439 | ERROR_PROPAGATE( add_configuration( & netif->configuration, "GATEWAY", "10.0.2.2" )); |
441 | ERROR_PROPAGATE( add_configuration( & netif->configuration, "GATEWAY", "10.0.2.2" )); |
Line 482... | Line 484... | ||
482 | // startup the loopback interface |
484 | // startup the loopback interface |
483 | setting = measured_strings_find( & netif->configuration, CONF_IRQ, 0 ); |
485 | setting = measured_strings_find( & netif->configuration, CONF_IRQ, 0 ); |
484 | irq = setting ? strtol( setting->value, NULL, 10 ) : 0; |
486 | irq = setting ? strtol( setting->value, NULL, 10 ) : 0; |
485 | setting = measured_strings_find( & netif->configuration, CONF_IO, 0 ); |
487 | setting = measured_strings_find( & netif->configuration, CONF_IO, 0 ); |
486 | io = setting ? strtol( setting->value, NULL, 16 ) : 0; |
488 | io = setting ? strtol( setting->value, NULL, 16 ) : 0; |
487 | ERROR_PROPAGATE( async_req_3_0( netif->driver->phone, NET_NETIF_PROBE, netif->id, irq, io )); |
489 | ERROR_PROPAGATE( netif_probe_req( netif->driver->phone, netif->id, irq, io )); |
488 | if( netif->nil ){ |
490 | if( netif->nil ){ |
489 | setting = measured_strings_find( & netif->configuration, CONF_MTU, 0 ); |
491 | setting = measured_strings_find( & netif->configuration, CONF_MTU, 0 ); |
490 | if( ! setting ){ |
492 | if( ! setting ){ |
491 | setting = measured_strings_find( & networking_globals.configuration, CONF_MTU, 0 ); |
493 | setting = measured_strings_find( & networking_globals.configuration, CONF_MTU, 0 ); |
492 | } |
494 | } |
493 | mtu = setting ? strtol( setting->value, NULL, 10 ) : 0; |
495 | mtu = setting ? strtol( setting->value, NULL, 10 ) : 0; |
494 | ERROR_PROPAGATE( async_req_3_0( netif->nil->phone, NET_NIL_DEVICE, netif->id, netif->driver->service, mtu )); |
496 | ERROR_PROPAGATE( async_req_3_0( netif->nil->phone, NET_NIL_DEVICE, netif->id, mtu, netif->driver->service )); |
495 | internet_service = netif->nil->service; |
497 | internet_service = netif->nil->service; |
496 | }else{ |
498 | }else{ |
497 | internet_service = netif->driver->service; |
499 | internet_service = netif->driver->service; |
498 | } |
500 | } |
499 | // TODO IL_BUNDLE |
501 | // TODO IL_BUNDLE |
500 | ERROR_PROPAGATE( async_req_2_0( netif->il->phone, NET_IL_DEVICE, netif->id, internet_service )); |
502 | ERROR_PROPAGATE( async_req_2_0( netif->il->phone, NET_IL_DEVICE, netif->id, internet_service )); |
501 | ERROR_PROPAGATE( async_req_1_0( netif->driver->phone, NET_NETIF_START, netif->id )); |
503 | ERROR_PROPAGATE( netif_start_req( netif->driver->phone, netif->id )); |
502 | return EOK; |
504 | return EOK; |
503 | } |
505 | } |
504 | 506 | ||
505 | int startup( void ){ |
507 | int startup( void ){ |
506 | ERROR_DECLARE; |
508 | ERROR_DECLARE; |