Subversion Repositories HelenOS

Rev

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

Rev 4574 Rev 4695
Line 74... Line 74...
74
//  ERROR_PROPAGATE( self_test());
74
//  ERROR_PROPAGATE( self_test());
75
 
75
 
76
    ERROR_PROPAGATE( add_module( NULL, & net_globals.modules, LO_NAME, LO_FILENAME, SERVICE_LO, 0, connect_to_service ));
76
    ERROR_PROPAGATE( add_module( NULL, & net_globals.modules, LO_NAME, LO_FILENAME, SERVICE_LO, 0, connect_to_service ));
77
    ERROR_PROPAGATE( add_module( NULL, & net_globals.modules, DP8390_NAME, DP8390_FILENAME, SERVICE_DP8390, 0, connect_to_service ));
77
    ERROR_PROPAGATE( add_module( NULL, & net_globals.modules, DP8390_NAME, DP8390_FILENAME, SERVICE_DP8390, 0, connect_to_service ));
78
    ERROR_PROPAGATE( add_module( NULL, & net_globals.modules, ETHERNET_NAME, ETHERNET_FILENAME, SERVICE_ETHERNET, 0, connect_to_service ));
78
    ERROR_PROPAGATE( add_module( NULL, & net_globals.modules, ETHERNET_NAME, ETHERNET_FILENAME, SERVICE_ETHERNET, 0, connect_to_service ));
-
 
79
    ERROR_PROPAGATE( add_module( NULL, & net_globals.modules, NILDUMMY_NAME, NILDUMMY_FILENAME, SERVICE_NILDUMMY, 0, connect_to_service ));
79
 
80
 
80
    task_id = spawn( "/srv/ip" );
81
    task_id = spawn( "/srv/ip" );
81
    if( ! task_id ) return EINVAL;
82
    if( ! task_id ) return EINVAL;
82
    ERROR_PROPAGATE( add_module( NULL, & net_globals.modules, IP_NAME, IP_FILENAME, SERVICE_IP, task_id, ip_connect_module ));
83
    ERROR_PROPAGATE( add_module( NULL, & net_globals.modules, IP_NAME, IP_FILENAME, SERVICE_IP, task_id, ip_connect_module ));
83
    if( ! spawn( "/srv/udp" )) return EINVAL;
84
    if( ! spawn( "/srv/udp" )) return EINVAL;
Line 91... Line 92...
91
    ERROR_DECLARE;
92
    ERROR_DECLARE;
92
 
93
 
93
    if( str_lcmp( name, "lo", 2 ) == 0 ){
94
    if( str_lcmp( name, "lo", 2 ) == 0 ){
94
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "NAME", LO_NAME ));
95
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "NAME", LO_NAME ));
95
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "NETIF", LO_NAME ));
96
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "NETIF", LO_NAME ));
-
 
97
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "NIL", NILDUMMY_NAME ));
96
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "IL", IP_NAME ));
98
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "IL", IP_NAME ));
97
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_CONFIG", "static" ));
99
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_CONFIG", "static" ));
98
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_ADDR", "127.0.0.1" ));
100
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_ADDR", "127.0.0.1" ));
-
 
101
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_ROUTING", "yes" ));
99
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "NETMASK", "255.0.0.0" ));
102
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "NETMASK", "255.0.0.0" ));
100
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "MTU", "15535" ));
103
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "MTU", "15535" ));
101
    }else if( str_lcmp( name, "ne2k", 4 ) == 0 ){
104
    }else if( str_lcmp( name, "ne2k", 4 ) == 0 ){
102
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "NAME", "eth0" ));
105
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "NAME", "eth0" ));
103
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "NETIF", DP8390_NAME ));
106
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "NETIF", DP8390_NAME ));
Line 109... Line 112...
109
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "IRQ", "9" ));
112
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "IRQ", "9" ));
110
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "IO", "300" ));
113
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "IO", "300" ));
111
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "MTU", "576" ));
114
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "MTU", "576" ));
112
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_CONFIG", "static" ));
115
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_CONFIG", "static" ));
113
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_ADDR", "10.0.2.15" ));
116
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_ADDR", "10.0.2.15" ));
-
 
117
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_ROUTING", "yes" ));
114
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "NETMASK", "255.255.255.240" ));
118
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "NETMASK", "255.255.255.240" ));
115
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "BROADCAST", "10.0.2.255" ));
119
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "BROADCAST", "10.0.2.255" ));
116
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "GATEWAY", "10.0.2.2" ));
120
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "GATEWAY", "10.0.2.2" ));
117
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "DNS1", "10.0.2.2" ));
121
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "DNS1", "10.0.2.2" ));
118
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "DNS2", "10.0.2.2" ));
122
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "DNS2", "10.0.2.2" ));