Subversion Repositories HelenOS

Rev

Rev 4307 | Rev 4332 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4307 Rev 4327
Line 32... Line 32...
32
 
32
 
33
/** @file
33
/** @file
34
 *  
34
 *  
35
 */
35
 */
36
 
36
 
37
#include <stdio.h>
37
#include <string.h>
38
 
38
 
39
#include <ipc/ipc.h>
39
#include <ipc/ipc.h>
40
 
40
 
41
#include "../messages.h"
41
#include "../messages.h"
42
 
42
 
Line 89... Line 89...
89
}
89
}
90
 
90
 
91
int read_netif_configuration( char * name, netif_ref netif ){
91
int read_netif_configuration( char * name, netif_ref netif ){
92
    ERROR_DECLARE;
92
    ERROR_DECLARE;
93
 
93
 
94
    if( strncmp( name, "lo", 2 ) == 0 ){
94
    if( str_lcmp( name, "lo", 2 ) == 0 ){
95
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "NAME", LO_NAME ));
95
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "NAME", LO_NAME ));
96
        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, "IL", IP_NAME ));
97
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "IL", IP_NAME ));
98
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_CONFIG", "static" ));
98
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_CONFIG", "static" ));
99
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_ADDR", "127.0.0.1" ));
99
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_ADDR", "127.0.0.1" ));
100
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "NETMASK", "255.0.0.0" ));
100
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "NETMASK", "255.0.0.0" ));
101
    }else if( strncmp( name, "ne2k", 4 ) == 0 ){
101
    }else if( str_lcmp( name, "ne2k", 4 ) == 0 ){
102
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "NAME", "eth0" ));
102
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "NAME", "eth0" ));
103
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "NETIF", DP8390_NAME ));
103
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "NETIF", DP8390_NAME ));
104
        // standalone ethernet
104
        // standalone ethernet
105
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "NIL", ETHERNET_NAME ));
105
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "NIL", ETHERNET_NAME ));
106
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "IL", IP_NAME ));
106
        ERROR_PROPAGATE( add_configuration( & netif->configuration, "IL", IP_NAME ));