Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4196 → Rev 4197

/branches/network/uspace/srv/net/tl/tcp/tcp_module.c
57,7 → 57,7
extern tcp_globals_t tcp_globals;
 
void tcp_print_name( void ){
printf( NAME );
printf( "%s", NAME );
}
 
int tcp_start_module( async_client_conn_t client_connection ){
/branches/network/uspace/srv/net/nil/eth/eth_module.c
55,7 → 55,7
extern eth_globals_t eth_globals;
 
void eth_print_name( void ){
printf( NAME );
printf( "%s", NAME );
}
 
int eth_start_module( async_client_conn_t client_connection ){
/branches/network/uspace/srv/net/structures/generic_field.h
71,11 → 71,9
if( field->next == ( field->size - 1 )){ \
type ** tmp; \
\
tmp = ( type ** ) malloc( sizeof( type * ) * 2 * field->size ); \
tmp = ( type ** ) realloc( field->items, sizeof( type * ) * 2 * field->size ); \
if( ! tmp ) return ENOMEM; \
field->size *= 2; \
memcpy( tmp, field->items, sizeof( type * ) * field->next ); \
free( field->items ); \
field->items = tmp; \
} \
field->items[ field->next ] = value; \
/branches/network/uspace/srv/net/structures/char_map.c
100,16 → 100,18
if( map->next == ( map->size - 1 )){
char_map_ref * tmp;
 
tmp = ( char_map_ref * ) malloc( sizeof( char_map_ref ) * 2 * map->size );
tmp = ( char_map_ref * ) realloc( map->items, sizeof( char_map_ref ) * 2 * map->size );
if( ! tmp ) return ENOMEM;
map->size *= 2;
memcpy( tmp, map->items, sizeof( char_map_ref ) * map->next );
free( map->items );
map->items = tmp;
}
map->items[ map->next ] = ( char_map_ref ) malloc( sizeof( char_map_t ));
if( ! map->items[ map->next ] ) return ENOMEM;
char_map_initialize( map->items[ map->next ] );
if( char_map_initialize( map->items[ map->next ] ) != EOK ){
free( map->items[ map->next ] );
map->items[ map->next ] = NULL;
return ENOMEM;
}
map->items[ map->next ]->c = * identifier;
++ identifier;
if( length ) -- length;
132,6 → 134,7
char_map_destroy( map->items[ index ] );
}
free( map->items );
map->items = NULL;
}
}
 
179,12 → 182,15
 
int char_map_initialize( char_map_ref map ){
if( ! map ) return EINVAL;
map->c = 0;
map->c = '\0';
map->value = CHAR_MAP_NULL;
map->size = 2;
map->next = 0;
map->items = malloc( sizeof( char_map_ref ) * map->size );
if( ! map->items ) return ENOMEM;
if( ! map->items ){
map->magic = 0;
return ENOMEM;
}
map->items[ map->next ] = NULL;
map->magic = CHAR_MAP_MAGIC_VALUE;
return EOK;
/branches/network/uspace/srv/net/structures/int_map.h
83,11 → 83,9
if( map->next == ( map->size - 1 )){ \
name##_item_ref tmp; \
\
tmp = ( name##_item_ref ) malloc( sizeof( name##_item_t ) * 2 * map->size ); \
tmp = ( name##_item_ref ) realloc( map->items, sizeof( name##_item_t ) * 2 * map->size ); \
if( ! tmp ) return ENOMEM; \
map->size *= 2; \
memcpy( tmp, map->items, sizeof( name##_item_t ) * map->next ); \
free( map->items ); \
map->items = tmp; \
} \
map->items[ map->next ].key = key; \
/branches/network/uspace/srv/net/networking/startup/networking_startup.c
74,21 → 74,21
 
int networking_phone;
 
printf( "\nTask %d - " NAME, task_get_id());
printf( "\nTask %d - %s", task_get_id(), NAME );
// run self tests
ERROR_PROPAGATE( self_test());
// start networking service
if( ! spawn( "/srv/net" )){
printf( "\n" NAME " - Could not spawn networking" );
printf( "\nCould not spawn networking" );
return EINVAL;
}
// start networking
networking_phone = connect_to_service( SERVICE_NETWORKING );
if( ERROR_OCCURRED( ipc_call_sync_0_0( networking_phone, NET_NET_STARTUP ))){
printf( "\n" NAME " - ERROR %d\n", ERROR_CODE );
printf( "\nERROR %d\n", ERROR_CODE );
return ERROR_CODE;
}
printf( "\n" NAME " - OK\n" );
printf( "\nOK\n" );
 
return EOK;
}
/branches/network/uspace/srv/net/networking/networking.c
162,7 → 162,7
GENERIC_CHAR_MAP_IMPLEMENT( measured_strings, measured_string_t )
 
void networking_print_name( void ){
printf( NAME );
printf( "%s", NAME );
}
 
int networking_message( ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count ){
/branches/network/uspace/srv/net/il/arp/arp_module.c
74,7 → 74,7
extern arp_globals_t arp_globals;
 
void arp_print_name( void ){
printf( NAME );
printf( "%s", NAME );
}
 
int arp_start_module( async_client_conn_t client_connection ){
/branches/network/uspace/srv/net/il/ip/ip_module.c
55,7 → 55,7
extern ip_globals_t ip_globals;
 
void ip_print_name( void ){
printf( NAME );
printf( "%s", NAME );
}
 
int ip_start_module( async_client_conn_t client_connection ){
/branches/network/uspace/srv/net/netif/dp8390/dp8390_module.c
123,7 → 123,7
}
 
void netif_print_name( void ){
printf( NAME );
printf( "%s", NAME );
}
 
int get_addr_message( device_id_t device_id, measured_string_ref address ){
217,7 → 217,7
dpeth_t * dep;
packet_t next;
 
ERROR_PROPAGATE( find_device( IPC_GET_DEVICE( call ), & device ));
ERROR_PROPAGATE( find_device( device_id, & device ));
dep = ( dpeth_t * ) device->specific;
// process packet queue
do{
/branches/network/uspace/srv/net/netif/lo/lo.c
137,7 → 137,7
}
 
void netif_print_name( void ){
printf( NAME );
printf( "%s", NAME );
}
 
int probe_auto_message( void ){