1,5 → 1,5 |
/* |
* Copyright (c) 2008 Lukas Mejdrech |
* Copyright (c) 2009 Lukas Mejdrech |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
27,7 → 27,7 |
*/ |
|
/** @addtogroup net |
* @{ |
* @{ |
*/ |
|
/** @file |
187,7 → 187,7 |
tmp_module->name = name; |
tmp_module->filename = filename; |
tmp_module->service = service; |
if( ERROR_OCCURED( modules_add( modules, tmp_module->name, 0, tmp_module ))){ |
if( ERROR_OCCURRED( modules_add( modules, tmp_module->name, 0, tmp_module ))){ |
free( tmp_module ); |
return ERROR_CODE; |
} |
404,7 → 404,7 |
setting = measured_string_create_bulk( value, -1 ); |
if( ! setting ) return ENOMEM; |
// add the configuration setting |
if( ERROR_OCCURED( measured_strings_add( configuration, name, 0, setting ))){ |
if( ERROR_OCCURRED( measured_strings_add( configuration, name, 0, setting ))){ |
free( setting ); |
return ERROR_CODE; |
} |
420,7 → 420,7 |
setting = measured_string_create_bulk( value, 0 ); |
if( ! setting ) return ENOMEM; |
// add the configuration setting |
if( ERROR_OCCURED( measured_strings_add( configuration, name, 0, setting ))){ |
if( ERROR_OCCURRED( measured_strings_add( configuration, name, 0, setting ))){ |
free( setting ); |
return ERROR_CODE; |
} |
450,13 → 450,13 |
if( ! netif ) return ENOMEM; |
netif->id = generate_new_device_id(); |
ERROR_PROPAGATE( measured_strings_initialize( & netif->configuration )); |
if( ERROR_OCCURED( add_configuration( & netif->configuration, "NAME", LO_NAME )) |
|| ERROR_OCCURED( add_configuration( & netif->configuration, "NETIF", LO_NAME )) |
|| ERROR_OCCURED( add_configuration( & netif->configuration, "IL", IP_NAME )) |
|| ERROR_OCCURED( add_configuration( & netif->configuration, "MTU", "1500" )) |
|| ERROR_OCCURED( add_configuration( & netif->configuration, "IP_CONFIG", "STATIC" )) |
|| ERROR_OCCURED( add_configuration( & netif->configuration, "IP_ADDR", "127.0.0.1" )) |
|| ERROR_OCCURED( add_configuration( & netif->configuration, "NETMASK", "255.0.0.0" ))){ |
if( ERROR_OCCURRED( add_configuration( & netif->configuration, "NAME", LO_NAME )) |
|| ERROR_OCCURRED( add_configuration( & netif->configuration, "NETIF", LO_NAME )) |
|| ERROR_OCCURRED( add_configuration( & netif->configuration, "IL", IP_NAME )) |
|| ERROR_OCCURRED( add_configuration( & netif->configuration, "MTU", "1500" )) |
|| ERROR_OCCURRED( add_configuration( & netif->configuration, "IP_CONFIG", "STATIC" )) |
|| ERROR_OCCURRED( add_configuration( & netif->configuration, "IP_ADDR", "127.0.0.1" )) |
|| ERROR_OCCURRED( add_configuration( & netif->configuration, "NETMASK", "255.0.0.0" ))){ |
measured_strings_destroy( & netif->configuration ); |
free( netif ); |
return ERROR_CODE; |
559,7 → 559,7 |
free( netif ); |
return ERROR_CODE; |
} |
if( ERROR_OCCURED( char_map_add( & networking_globals.netif_names, netif->name, 0, index ))){ |
if( ERROR_OCCURRED( char_map_add( & networking_globals.netif_names, netif->name, 0, index ))){ |
netifs_exclude_index( & networking_globals.netifs, index ); |
return ERROR_CODE; |
} |
618,7 → 618,7 |
ERROR_DECLARE; |
|
// read configuration files |
if( ERROR_OCCURED( read_configuration())) return ERROR_CODE; |
if( ERROR_OCCURRED( read_configuration())) return ERROR_CODE; |
|
// start network interfaces and needed modules |
// start_device( "/sbin/lo", "/sbin/dummy_link_layer" ); |