Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4742 → Rev 4743

/branches/network/uspace/srv/net/net/net.c
63,6 → 63,7
#include "../include/ip_interface.h"
 
#include "net.h"
#include "net_messages.h"
 
/** Networking module name.
*/
250,10 → 251,6
switch( IPC_GET_METHOD( * call )){
case IPC_M_PHONE_HUNGUP:
return EOK;
case NET_NET_DEVICE:
// TODO configure, register
printf( "Networking: new netif %d\n", IPC_GET_DEVICE( call ));
return EOK;
case NET_NET_GET_DEVICE_CONF:
ERROR_PROPAGATE( measured_strings_receive( & strings, & data, IPC_GET_COUNT( call )));
net_get_device_conf_req( 0, IPC_GET_DEVICE( call ), & strings, IPC_GET_COUNT( call ), NULL );
347,6 → 344,7
 
// read general configuration
ERROR_PROPAGATE( add_configuration( & net_globals.configuration, "IPV", "4" ));
ERROR_PROPAGATE( add_configuration( & net_globals.configuration, "IP_ROUTING", "no" ));
ERROR_PROPAGATE( add_configuration( & net_globals.configuration, "MTU", "1500" ));
ERROR_PROPAGATE( add_configuration( & net_globals.configuration, "ICMP_ERROR_REPORTING", "yes" )); //anything else not starting with 'y'
ERROR_PROPAGATE( add_configuration( & net_globals.configuration, "ICMP_ECHO_REPLYING", "yes" )); //anything else not starting with 'y'
364,8 → 362,7
ERROR_PROPAGATE( add_configuration( & netif->configuration, "IL", IP_NAME ));
ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_CONFIG", "static" ));
ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_ADDR", "127.0.0.1" ));
ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_ROUTING", "yes" ));
ERROR_PROPAGATE( add_configuration( & netif->configuration, "NETMASK", "255.0.0.0" ));
ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_NETMASK", "255.0.0.0" ));
ERROR_PROPAGATE( add_configuration( & netif->configuration, "MTU", "15535" ));
}else if( str_lcmp( name, "ne2k", 4 ) == 0 ){
ERROR_PROPAGATE( add_configuration( & netif->configuration, "NAME", "eth0" ));
379,11 → 376,9
ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_CONFIG", "static" ));
ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_ADDR", "10.0.2.15" ));
ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_ROUTING", "yes" ));
ERROR_PROPAGATE( add_configuration( & netif->configuration, "NETMASK", "255.255.255.240" ));
ERROR_PROPAGATE( add_configuration( & netif->configuration, "BROADCAST", "10.0.2.255" ));
ERROR_PROPAGATE( add_configuration( & netif->configuration, "GATEWAY", "10.0.2.2" ));
ERROR_PROPAGATE( add_configuration( & netif->configuration, "DNS1", "10.0.2.2" ));
ERROR_PROPAGATE( add_configuration( & netif->configuration, "DNS2", "10.0.2.2" ));
ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_NETMASK", "255.255.255.240" ));
ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_BROADCAST", "10.0.2.255" ));
ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_GATEWAY", "10.0.2.2" ));
ERROR_PROPAGATE( add_configuration( & netif->configuration, "ARP", "arp" ));
}
return read_netif_configuration_build( name, netif );