Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4742 → Rev 4743

/branches/network/uspace/srv/net/net/net_remote.c
47,7 → 47,7
 
#include "../structures/measured_strings.h"
 
//#include "net_messages.h"
#include "net_messages.h"
 
int net_get_device_conf_req( int net_phone, device_id_t device_id, measured_string_ref * configuration, size_t count, char ** data ){
return generic_translate_req( net_phone, NET_NET_GET_DEVICE_CONF, device_id, 0, * configuration, count, configuration, data );
/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 );
/branches/network/uspace/srv/net/net/Makefile
52,7 → 52,7
ifeq ($(NETWORKING), module)
 
SOURCES += $(NAME)_bundle.c \
$(NET_BASE)crc.c \
$(NET_BASE)checksum.c \
$(NET_BASE)inet.c \
$(NET_BASE)il/arp/arp.c \
$(NET_BASE)il/ip/ip.c \
/branches/network/uspace/srv/net/net/start/netstart.c
44,10 → 44,11
#include <ipc/services.h>
 
#include "../../err.h"
#include "../../messages.h"
#include "../../modules.h"
#include "../../self_test.h"
 
#include "../net_messages.h"
 
/** Networking startup module name.
*/
#define NAME "Networking startup"
88,8 → 89,9
if( ERROR_OCCURRED( ipc_call_sync_0_0( net_phone, NET_NET_STARTUP ))){
printf( "ERROR %d\n", ERROR_CODE );
return ERROR_CODE;
}else{
printf( "OK\n" );
}
printf( "OK\n" );
 
return EOK;
}
/branches/network/uspace/srv/net/net/start/Makefile
39,7 → 39,7
OUTPUT = $(NAME)
SOURCES = \
$(NAME).c \
$(NET_BASE)crc.c \
$(NET_BASE)checksum.c \
$(NET_BASE)modules.c \
$(NET_BASE)self_test.c \
$(STRUCTURES)char_map.c \