Index: uspace/srv/net/structures/char_map.c
===================================================================
--- uspace/srv/net/structures/char_map.c	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/structures/char_map.c	(revision aadf01ebd2c032bc8dd43a6e06ae5715e6c2710f)
@@ -57,5 +57,5 @@
  *  @returns EEXIST if the key character string is already used.
  */
-int	char_map_add_item( char_map_ref map, const char * identifier, size_t length, const int value );
+int char_map_add_item(char_map_ref map, const char * identifier, size_t length, const int value);
 
 /** Returns the node assigned to the key from the map.
@@ -66,5 +66,5 @@
  *  @returns NULL if the key is not assigned a&nbsp;node.
  */
-char_map_ref	char_map_find_node( const char_map_ref map, const char * identifier, const size_t length );
+char_map_ref char_map_find_node(const char_map_ref map, const char * identifier, const size_t length);
 
 /** Returns the value assigned to the map.
@@ -73,5 +73,5 @@
  *  @returns CHAR_MAP_NULL if the map is not assigned a&nbsp;value.
  */
-int	char_map_get_value( const char_map_ref map );
+int char_map_get_value(const char_map_ref map);
 
 /** Checks if the map is valid.
@@ -80,74 +80,80 @@
  *  @returns FALSE otherwise.
  */
-int	char_map_is_valid( const char_map_ref map );
-
-int char_map_add( char_map_ref map, const char * identifier, size_t length, const int value ){
-	if( char_map_is_valid( map ) && ( identifier ) && (( length ) || ( * identifier ))){
-		int	index;
-
-		for( index = 0; index < map->next; ++ index ){
-			if( map->items[ index ]->c == * identifier ){
+int char_map_is_valid(const char_map_ref map);
+
+int char_map_add(char_map_ref map, const char * identifier, size_t length, const int value){
+	if(char_map_is_valid(map) && (identifier) && ((length) || (*identifier))){
+		int index;
+
+		for(index = 0; index < map->next; ++ index){
+			if(map->items[index]->c == * identifier){
 				++ identifier;
-				if(( length > 1 ) || (( length == 0 ) && ( * identifier ))){
-					return char_map_add( map->items[ index ], identifier, length ? length - 1 : 0, value );
+				if((length > 1) || ((length == 0) && (*identifier))){
+					return char_map_add(map->items[index], identifier, length ? length - 1 : 0, value);
 				}else{
-					if( map->items[ index ]->value != CHAR_MAP_NULL ) return EEXISTS;
-					map->items[ index ]->value = value;
+					if(map->items[index]->value != CHAR_MAP_NULL){
+						return EEXISTS;
+					}
+					map->items[index]->value = value;
 					return EOK;
 				}
 			}
 		}
-		return char_map_add_item( map, identifier, length, value );
+		return char_map_add_item(map, identifier, length, value);
 	}
 	return EINVAL;
 }
 
-int char_map_add_item( char_map_ref map, const char * identifier, size_t length, const int value ){
-	if( map->next == ( map->size - 1 )){
-		char_map_ref	* tmp;
-
-		tmp = ( char_map_ref * ) realloc( map->items, sizeof( char_map_ref ) * 2 * map->size );
-		if( ! tmp ) return ENOMEM;
+int char_map_add_item(char_map_ref map, const char * identifier, size_t length, const int value){
+	if(map->next == (map->size - 1)){
+		char_map_ref *tmp;
+
+		tmp = (char_map_ref *) realloc(map->items, sizeof(char_map_ref) * 2 * map->size);
+		if(! tmp){
+			return ENOMEM;
+		}
 		map->size *= 2;
 		map->items = tmp;
 	}
-	map->items[ map->next ] = ( char_map_ref ) malloc( sizeof( char_map_t ));
-	if( ! map->items[ map->next ] ) return ENOMEM;
-	if( char_map_initialize( map->items[ map->next ] ) != EOK ){
-		free( map->items[ map->next ] );
-		map->items[ map->next ] = NULL;
+	map->items[map->next] = (char_map_ref) malloc(sizeof(char_map_t));
+	if(! map->items[map->next]){
 		return ENOMEM;
 	}
-	map->items[ map->next ]->c = * identifier;
+	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;
 	++ map->next;
-	if(( length > 1 ) || (( length == 0 ) && ( * identifier ))){
-		map->items[ map->next - 1 ]->value = CHAR_MAP_NULL;
-		return char_map_add_item( map->items[ map->next - 1 ], identifier, length ? length - 1 : 0, value );
+	if((length > 1) || ((length == 0) && (*identifier))){
+		map->items[map->next - 1]->value = CHAR_MAP_NULL;
+		return char_map_add_item(map->items[map->next - 1], identifier, length ? length - 1 : 0, value);
 	}else{
-		map->items[ map->next - 1 ]->value = value;
+		map->items[map->next - 1]->value = value;
 	}
 	return EOK;
 }
 
-void char_map_destroy( char_map_ref map ){
-	if( char_map_is_valid( map )){
-		int	index;
+void char_map_destroy(char_map_ref map){
+	if(char_map_is_valid(map)){
+		int index;
 
 		map->magic = 0;
-		for( index = 0; index < map->next; ++ index ){
-			char_map_destroy( map->items[ index ] );
-		}
-		free( map->items );
+		for(index = 0; index < map->next; ++ index){
+			char_map_destroy(map->items[index]);
+		}
+		free(map->items);
 		map->items = NULL;
 	}
 }
 
-int char_map_exclude( char_map_ref map, const char * identifier, size_t length ){
-	char_map_ref	node;
-
-	node = char_map_find_node( map, identifier, length );
-	if( node ){
-		int	value;
+int char_map_exclude(char_map_ref map, const char * identifier, size_t length){
+	char_map_ref node;
+
+	node = char_map_find_node(map, identifier, length);
+	if(node){
+		int value;
 
 		value = node->value;
@@ -158,21 +164,25 @@
 }
 
-int char_map_find( const char_map_ref map, const char * identifier, size_t length ){
-	char_map_ref	node;
-
-	node = char_map_find_node( map, identifier, length );
+int char_map_find(const char_map_ref map, const char * identifier, size_t length){
+	char_map_ref node;
+
+	node = char_map_find_node(map, identifier, length);
 	return node ? node->value : CHAR_MAP_NULL;
 }
 
-char_map_ref char_map_find_node( const char_map_ref map, const char * identifier, size_t length ){
-	if( ! char_map_is_valid( map )) return NULL;
-	if( length || ( * identifier )){
-		int	index;
-
-		for( index = 0; index < map->next; ++ index ){
-			if( map->items[ index ]->c == * identifier ){
+char_map_ref char_map_find_node(const char_map_ref map, const char * identifier, size_t length){
+	if(! char_map_is_valid(map)){
+		return NULL;
+	}
+	if(length || (*identifier)){
+		int index;
+
+		for(index = 0; index < map->next; ++ index){
+			if(map->items[index]->c == * identifier){
 				++ identifier;
-				if( length == 1 ) return map->items[ index ];
-				return char_map_find_node( map->items[ index ], identifier, length ? length - 1 : 0 );
+				if(length == 1){
+					return map->items[index];
+				}
+				return char_map_find_node(map->items[index], identifier, length ? length - 1 : 0);
 			}
 		}
@@ -182,38 +192,40 @@
 }
 
-int char_map_get_value( const char_map_ref map ){
-	return char_map_is_valid( map ) ? map->value : CHAR_MAP_NULL;
-}
-
-int char_map_initialize( char_map_ref map ){
-	if( ! map ) return EINVAL;
+int char_map_get_value(const char_map_ref map){
+	return char_map_is_valid(map) ? map->value : CHAR_MAP_NULL;
+}
+
+int char_map_initialize(char_map_ref map){
+	if(! map){
+		return EINVAL;
+	}
 	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 ){
+	map->items = malloc(sizeof(char_map_ref) * map->size);
+	if(! map->items){
 		map->magic = 0;
 		return ENOMEM;
 	}
-	map->items[ map->next ] = NULL;
+	map->items[map->next] = NULL;
 	map->magic = CHAR_MAP_MAGIC_VALUE;
 	return EOK;
 }
 
-int char_map_is_valid( const char_map_ref map ){
-	return map && ( map->magic == CHAR_MAP_MAGIC_VALUE );
-}
-
-int char_map_update( char_map_ref map, const char * identifier, const size_t length, const int value ){
-	char_map_ref	node;
-
-//	if( ! char_map_is_valid( map )) return EINVAL;
-	node = char_map_find_node( map, identifier, length );
-	if( node ){
+int char_map_is_valid(const char_map_ref map){
+	return map && (map->magic == CHAR_MAP_MAGIC_VALUE);
+}
+
+int char_map_update(char_map_ref map, const char * identifier, const size_t length, const int value){
+	char_map_ref node;
+
+//	if(! char_map_is_valid(map)) return EINVAL;
+	node = char_map_find_node(map, identifier, length);
+	if(node){
 		node->value = value;
 		return EOK;
 	}else{
-		return char_map_add( map, identifier, length, value );
+		return char_map_add(map, identifier, length, value);
 	}
 }
Index: uspace/srv/net/structures/char_map.h
===================================================================
--- uspace/srv/net/structures/char_map.h	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/structures/char_map.h	(revision aadf01ebd2c032bc8dd43a6e06ae5715e6c2710f)
@@ -40,5 +40,5 @@
 /** Invalid assigned value used also if an&nbsp;entry does not exist.
  */
-#define CHAR_MAP_NULL	( -1 )
+#define CHAR_MAP_NULL	(-1)
 
 /** Type definition of the character string to integer map.
@@ -59,20 +59,20 @@
 	/** Actually mapped character.
 	 */
-	char			c;
+	char c;
 	/** Stored integral value.
 	 */
-	int				value;
+	int value;
 	/** Next character array size.
 	 */
-	int				size;
+	int size;
 	/** First free position in the next character array.
 	 */
-	int				next;
+	int next;
 	/** Next character array.
 	 */
-	char_map_ref *	items;
+	char_map_ref * items;
 	/** Consistency check magic value.
 	 */
-	int				magic;
+	int magic;
 };
 
@@ -89,10 +89,10 @@
  *  @returns Other error codes as defined for the char_map_add_item() function.
  */
-int	char_map_add( char_map_ref map, const char * identifier, size_t length, const int value );
+int char_map_add(char_map_ref map, const char * identifier, size_t length, const int value);
 
 /** Clears and destroys the map.
  *  @param[in,out] map The character string to integer map.
  */
-void	char_map_destroy( char_map_ref map );
+void char_map_destroy(char_map_ref map);
 
 /** Excludes the value assigned to the key from the map.
@@ -104,5 +104,5 @@
  *  @returns CHAR_MAP_NULL if the key is not assigned a&nbsp;value.
  */
-int	char_map_exclude( char_map_ref map, const char * identifier, size_t length );
+int char_map_exclude(char_map_ref map, const char * identifier, size_t length);
 
 /** Returns the value assigned to the key from the map.
@@ -113,5 +113,5 @@
  *  @returns CHAR_MAP_NULL if the key is not assigned a&nbsp;value.
  */
-int	char_map_find( const char_map_ref map, const char * identifier, size_t length );
+int char_map_find(const char_map_ref map, const char * identifier, size_t length);
 
 /** Initializes the map.
@@ -121,5 +121,5 @@
  *  @returns ENOMEM if there is not enough memory left.
  */
-int	char_map_initialize( char_map_ref map );
+int char_map_initialize(char_map_ref map);
 
 /** Adds or updates the value with the key to the map.
@@ -135,5 +135,5 @@
  *  @returns Other error codes as defined for the char_map_add_item() function.
  */
-int	char_map_update( char_map_ref map, const char * identifier, size_t length, const int value );
+int char_map_update(char_map_ref map, const char * identifier, size_t length, const int value);
 
 #endif
Index: uspace/srv/net/structures/dynamic_fifo.c
===================================================================
--- uspace/srv/net/structures/dynamic_fifo.c	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/structures/dynamic_fifo.c	(revision aadf01ebd2c032bc8dd43a6e06ae5715e6c2710f)
@@ -50,5 +50,5 @@
  *  @param[in] index The actual index to be shifted.
  */
-#define NEXT_INDEX( fifo, index )	((( index ) + 1 ) % (( fifo )->size + 1 ))
+#define NEXT_INDEX(fifo, index)	(((index) + 1) % ((fifo)->size + 1))
 
 /** Checks if the queue is valid.
@@ -57,15 +57,21 @@
  *  @returns FALSE otherwise.
  */
-int	dyn_fifo_is_valid( dyn_fifo_ref fifo );
+int dyn_fifo_is_valid(dyn_fifo_ref fifo);
 
-int dyn_fifo_is_valid( dyn_fifo_ref fifo ){
-	return fifo && ( fifo->magic_value == DYN_FIFO_MAGIC_VALUE );
+int dyn_fifo_is_valid(dyn_fifo_ref fifo){
+	return fifo && (fifo->magic_value == DYN_FIFO_MAGIC_VALUE);
 }
 
-int dyn_fifo_initialize( dyn_fifo_ref fifo, int size ){
-	if( ! fifo ) return EBADMEM;
-	if( size <= 0 ) return EINVAL;
-	fifo->items = ( int * ) malloc( sizeof( int ) * size + 1 );
-	if( ! fifo->items ) return ENOMEM;
+int dyn_fifo_initialize(dyn_fifo_ref fifo, int size){
+	if(! fifo){
+		return EBADMEM;
+	}
+	if(size <= 0){
+		return EINVAL;
+	}
+	fifo->items = (int *) malloc(sizeof(int) * size + 1);
+	if(! fifo->items){
+		return ENOMEM;
+	}
 	fifo->size = size;
 	fifo->head = 0;
@@ -75,24 +81,30 @@
 }
 
-int	dyn_fifo_push( dyn_fifo_ref fifo, int value, int max_size ){
-	int *	new_items;
+int dyn_fifo_push(dyn_fifo_ref fifo, int value, int max_size){
+	int * new_items;
 
-	if( ! dyn_fifo_is_valid( fifo )) return EINVAL;
-	if( NEXT_INDEX( fifo, fifo->tail ) == fifo->head ){
-		if(( max_size > 0 ) && (( fifo->size * 2 ) > max_size )){
-			if( fifo->size >= max_size ) return ENOMEM;
+	if(! dyn_fifo_is_valid(fifo)){
+		return EINVAL;
+	}
+	if(NEXT_INDEX(fifo, fifo->tail) == fifo->head){
+		if((max_size > 0) && ((fifo->size * 2) > max_size)){
+			if(fifo->size >= max_size){
+				return ENOMEM;
+			}
 		}else{
 			max_size = fifo->size * 2;
 		}
-		new_items = realloc( fifo->items, sizeof( int ) * max_size + 1 );
-		if( ! new_items ) return ENOMEM;
+		new_items = realloc(fifo->items, sizeof(int) * max_size + 1);
+		if(! new_items){
+			return ENOMEM;
+		}
 		fifo->items = new_items;
-		if( fifo->tail < fifo->head ){
-			if( fifo->tail < max_size - fifo->size ){
-				memcpy( fifo->items + fifo->size + 1, fifo->items, fifo->tail * sizeof( int ));
+		if(fifo->tail < fifo->head){
+			if(fifo->tail < max_size - fifo->size){
+				memcpy(fifo->items + fifo->size + 1, fifo->items, fifo->tail * sizeof(int));
 				fifo->tail += fifo->size + 1;
 			}else{
-				memcpy( fifo->items + fifo->size + 1, fifo->items, ( max_size - fifo->size ) * sizeof( int ));
-				memcpy( fifo->items, fifo->items + max_size - fifo->size, fifo->tail - max_size + fifo->size );
+				memcpy(fifo->items + fifo->size + 1, fifo->items, (max_size - fifo->size) * sizeof(int));
+				memcpy(fifo->items, fifo->items + max_size - fifo->size, fifo->tail - max_size + fifo->size);
 				fifo->tail -= max_size - fifo->size;
 			}
@@ -100,28 +112,38 @@
 		fifo->size = max_size;
 	}
-	fifo->items[ fifo->tail ] = value;
-	fifo->tail = NEXT_INDEX( fifo, fifo->tail );
+	fifo->items[fifo->tail] = value;
+	fifo->tail = NEXT_INDEX(fifo, fifo->tail);
 	return EOK;
 }
 
-int dyn_fifo_pop( dyn_fifo_ref fifo ){
-	int	value;
+int dyn_fifo_pop(dyn_fifo_ref fifo){
+	int value;
 
-	if( ! dyn_fifo_is_valid( fifo )) return EINVAL;
-	if( fifo->head == fifo->tail ) return ENOENT;
-	value = fifo->items[ fifo->head ];
-	fifo->head = NEXT_INDEX( fifo, fifo->head );
+	if(! dyn_fifo_is_valid(fifo)){
+		return EINVAL;
+	}
+	if(fifo->head == fifo->tail){
+		return ENOENT;
+	}
+	value = fifo->items[fifo->head];
+	fifo->head = NEXT_INDEX(fifo, fifo->head);
 	return value;
 }
 
-int dyn_fifo_value( dyn_fifo_ref fifo ){
-	if( ! dyn_fifo_is_valid( fifo )) return EINVAL;
-	if( fifo->head == fifo->tail ) return ENOENT;
-	return fifo->items[ fifo->head ];
+int dyn_fifo_value(dyn_fifo_ref fifo){
+	if(! dyn_fifo_is_valid(fifo)){
+		return EINVAL;
+	}
+	if(fifo->head == fifo->tail){
+		return ENOENT;
+	}
+	return fifo->items[fifo->head];
 }
 
-int dyn_fifo_destroy( dyn_fifo_ref fifo ){
-	if( ! dyn_fifo_is_valid( fifo )) return EINVAL;
-	free( fifo->items );
+int dyn_fifo_destroy(dyn_fifo_ref fifo){
+	if(! dyn_fifo_is_valid(fifo)){
+		return EINVAL;
+	}
+	free(fifo->items);
 	fifo->magic_value = 0;
 	return EOK;
Index: uspace/srv/net/structures/dynamic_fifo.h
===================================================================
--- uspace/srv/net/structures/dynamic_fifo.h	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/structures/dynamic_fifo.h	(revision aadf01ebd2c032bc8dd43a6e06ae5715e6c2710f)
@@ -56,17 +56,17 @@
 	/** Stored item field.
 	 */
-	int	*	items;
+	int *	items;
 	/** Actual field size.
 	 */
-	int		size;
+	int size;
 	/** First item in the queue index.
 	 */
-	int		head;
+	int head;
 	/** Last item in the queue index.
 	 */
-	int		tail;
+	int tail;
 	/** Consistency check magic value.
 	 */
-	int		magic_value;
+	int magic_value;
 };
 
@@ -79,5 +79,5 @@
  *  @returns ENOMEM if there is not enough memory left.
  */
-int	dyn_fifo_initialize( dyn_fifo_ref fifo, int size );
+int dyn_fifo_initialize(dyn_fifo_ref fifo, int size);
 
 /** Appends a new item to the queue end.
@@ -89,5 +89,5 @@
  *  @returns ENOMEM if there is not enough memory left.
  */
-int	dyn_fifo_push( dyn_fifo_ref fifo, int value, int max_size );
+int dyn_fifo_push(dyn_fifo_ref fifo, int value, int max_size);
 
 /** Returns and excludes the first item in the queue.
@@ -97,5 +97,5 @@
  *  @returns ENOENT if the queue is empty.
  */
-int	dyn_fifo_pop( dyn_fifo_ref fifo );
+int dyn_fifo_pop(dyn_fifo_ref fifo);
 
 /** Returns and keeps the first item in the queue.
@@ -105,5 +105,5 @@
  *  @returns ENOENT if the queue is empty.
  */
-int	dyn_fifo_value( dyn_fifo_ref fifo );
+int dyn_fifo_value(dyn_fifo_ref fifo);
 
 /** Clears and destroys the queue.
@@ -112,5 +112,5 @@
  *  @returns EINVAL if the queue is not valid.
  */
-int dyn_fifo_destroy( dyn_fifo_ref fifo );
+int dyn_fifo_destroy(dyn_fifo_ref fifo);
 
 #endif
Index: uspace/srv/net/structures/generic_char_map.h
===================================================================
--- uspace/srv/net/structures/generic_char_map.h	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/structures/generic_char_map.h	(revision aadf01ebd2c032bc8dd43a6e06ae5715e6c2710f)
@@ -54,7 +54,7 @@
  *  @param[in] type Inner object type.
  */
-#define GENERIC_CHAR_MAP_DECLARE( name, type )									\
+#define GENERIC_CHAR_MAP_DECLARE(name, type)									\
 																				\
-GENERIC_FIELD_DECLARE( name##_items, type )										\
+GENERIC_FIELD_DECLARE(name##_items, type)										\
 																				\
 typedef	struct name		name##_t;												\
@@ -62,16 +62,16 @@
 																				\
 struct	name{																	\
-	char_map_t		names;														\
-	name##_items_t	values;														\
-	int				magic;														\
+	char_map_t names;														\
+	name##_items_t values;														\
+	int magic;														\
 };																				\
 																				\
-int	name##_add( name##_ref map, const char * name, const size_t length, type * value );	\
-int	name##_count( name##_ref map );												\
-void	name##_destroy( name##_ref map );										\
-void	name##_exclude( name##_ref map, const char * name, const size_t length );	\
-type *	name##_find( name##_ref map, const char * name, const size_t length );	\
-int	name##_initialize( name##_ref map );										\
-int	name##_is_valid( name##_ref map );
+int name##_add(name##_ref map, const char * name, const size_t length, type * value);	\
+int name##_count(name##_ref map);												\
+void name##_destroy(name##_ref map);											\
+void name##_exclude(name##_ref map, const char * name, const size_t length);	\
+type * name##_find(name##_ref map, const char * name, const size_t length);		\
+int name##_initialize(name##_ref map);											\
+int name##_is_valid(name##_ref map);
 
 /** Character string to generic type map implementation.
@@ -80,18 +80,22 @@
  *  @param[in] type Inner object type.
  */
-#define GENERIC_CHAR_MAP_IMPLEMENT( name, type )								\
+#define GENERIC_CHAR_MAP_IMPLEMENT(name, type)									\
 																				\
-GENERIC_FIELD_IMPLEMENT( name##_items, type )									\
+GENERIC_FIELD_IMPLEMENT(name##_items, type)										\
 																				\
-int name##_add( name##_ref map, const char * name, const size_t length, type * value ){	\
+int name##_add(name##_ref map, const char * name, const size_t length, type * value){	\
 	ERROR_DECLARE;																\
 																				\
-	int	index;																	\
+	int index;																	\
 																				\
-	if( ! name##_is_valid( map )) return EINVAL;								\
-	index = name##_items_add( & map->values, value );							\
-	if( index < 0 ) return index;												\
-	if( ERROR_OCCURRED( char_map_add( & map->names, name, length, index ))){		\
-		name##_items_exclude_index( & map->values, index );						\
+	if(! name##_is_valid(map)){													\
+		return EINVAL;															\
+	}																			\
+	index = name##_items_add(&map->values, value);								\
+	if(index < 0){																\
+		return index;															\
+	}																			\
+	if(ERROR_OCCURRED(char_map_add(&map->names, name, length, index))){			\
+		name##_items_exclude_index(&map->values, index);						\
 		return ERROR_CODE;														\
 	}																			\
@@ -99,33 +103,33 @@
 }																				\
 																				\
-int name##_count( name##_ref map ){												\
-	return name##_is_valid( map ) ? name##_items_count( & map->values ) : -1;	\
+int name##_count(name##_ref map){												\
+	return name##_is_valid(map) ? name##_items_count(&map->values) : -1;		\
 }																				\
 																				\
-void name##_destroy( name##_ref map ){											\
-	if( name##_is_valid( map )){												\
-		char_map_destroy( & map->names );										\
-		name##_items_destroy( & map->values );									\
+void name##_destroy(name##_ref map){											\
+	if(name##_is_valid(map)){													\
+		char_map_destroy(&map->names);											\
+		name##_items_destroy(&map->values);										\
 	}																			\
 }																				\
 																				\
-void name##_exclude( name##_ref map, const char * name, const size_t length ){	\
-	if( name##_is_valid( map )){												\
-		int	index;																\
+void name##_exclude(name##_ref map, const char * name, const size_t length){	\
+	if(name##_is_valid(map)){													\
+		int index;																\
 																				\
-		index = char_map_exclude( & map->names, name, length );					\
-		if( index != CHAR_MAP_NULL ){											\
-			name##_items_exclude_index( & map->values, index );					\
+		index = char_map_exclude(&map->names, name, length);					\
+		if(index != CHAR_MAP_NULL){												\
+			name##_items_exclude_index(&map->values, index);					\
 		}																		\
 	}																			\
 }																				\
 																				\
-type * name##_find( name##_ref map, const char * name, const size_t length ){	\
-	if( name##_is_valid( map )){												\
-		int	index;																\
+type * name##_find(name##_ref map, const char * name, const size_t length){		\
+	if(name##_is_valid(map)){													\
+		int index;																\
 																				\
-		index = char_map_find( & map->names, name, length );					\
-		if( index != CHAR_MAP_NULL ){											\
-			return name##_items_get_index( & map->values, index );				\
+		index = char_map_find(&map->names, name, length);						\
+		if(index != CHAR_MAP_NULL){												\
+			return name##_items_get_index(&map->values, index);					\
 		}																		\
 	}																			\
@@ -133,11 +137,13 @@
 }																				\
 																				\
-int name##_initialize( name##_ref map ){										\
+int name##_initialize(name##_ref map){											\
 	ERROR_DECLARE;																\
 																				\
-	if( ! map ) return EINVAL;													\
-	ERROR_PROPAGATE( char_map_initialize( & map->names ));						\
-	if( ERROR_OCCURRED( name##_items_initialize( & map->values ))){				\
-		char_map_destroy( & map->names );										\
+	if(! map){																	\
+		return EINVAL;															\
+	}																			\
+	ERROR_PROPAGATE(char_map_initialize(&map->names));							\
+	if(ERROR_OCCURRED(name##_items_initialize(&map->values))){					\
+		char_map_destroy(&map->names);											\
 		return ERROR_CODE;														\
 	}																			\
@@ -146,6 +152,6 @@
 }																				\
 																				\
-int name##_is_valid( name##_ref map ){											\
-	return map && ( map->magic == GENERIC_CHAR_MAP_MAGIC_VALUE );				\
+int name##_is_valid(name##_ref map){											\
+	return map && (map->magic == GENERIC_CHAR_MAP_MAGIC_VALUE);					\
 }
 
Index: uspace/srv/net/structures/generic_field.h
===================================================================
--- uspace/srv/net/structures/generic_field.h	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/structures/generic_field.h	(revision aadf01ebd2c032bc8dd43a6e06ae5715e6c2710f)
@@ -51,24 +51,24 @@
  *  @param[in] type Inner object type.
  */
-#define GENERIC_FIELD_DECLARE( name, type )					\
-										\
-typedef	struct name		name##_t;					\
-typedef	name##_t *		name##_ref;					\
-										\
-struct	name{									\
-	int	size;								\
-	int	next;								\
-	type **	items;								\
-	int	magic;								\
-};										\
-										\
-int	name##_add( name##_ref field, type * value );				\
-int	name##_count( name##_ref field );					\
-void	name##_destroy( name##_ref field );					\
-void	name##_exclude_index( name##_ref field, int index );			\
-type **	name##_get_field( name##_ref field );					\
-type *	name##_get_index( name##_ref field, int index );			\
-int	name##_initialize( name##_ref field );					\
-int	name##_is_valid( name##_ref field );
+#define GENERIC_FIELD_DECLARE(name, type)										\
+																				\
+typedef	struct name		name##_t;												\
+typedef	name##_t *		name##_ref;												\
+																				\
+struct	name{																	\
+	int size;																	\
+	int next;																	\
+	type **	items;																\
+	int magic;																	\
+};																				\
+																				\
+int name##_add(name##_ref field, type * value);									\
+int name##_count(name##_ref field);												\
+void name##_destroy(name##_ref field);											\
+void name##_exclude_index(name##_ref field, int index);							\
+type ** name##_get_field(name##_ref field);										\
+type * name##_get_index(name##_ref field, int index);							\
+int name##_initialize(name##_ref field);										\
+int name##_is_valid(name##_ref field);
 
 /** Generic type field implementation.
@@ -77,71 +77,79 @@
  *  @param[in] type Inner object type.
  */
-#define GENERIC_FIELD_IMPLEMENT( name, type )					\
-										\
-int name##_add( name##_ref field, type * value ){				\
-	if( name##_is_valid( field )){						\
-		if( field->next == ( field->size - 1 )){			\
-			type **	tmp;					\
-										\
-			tmp = ( type ** ) realloc( field->items, sizeof( type * ) * 2 * field->size );	\
-			if( ! tmp ) return ENOMEM;				\
-			field->size *= 2;					\
-			field->items = tmp;					\
-		}								\
-		field->items[ field->next ] = value;				\
-		++ field->next;							\
-		field->items[ field->next ] = NULL;				\
-		return field->next - 1;						\
-	}									\
-	return EINVAL;								\
-}										\
-										\
-int name##_count( name##_ref field ){						\
-	return name##_is_valid( field ) ? field->next : -1;			\
-}										\
-										\
-void name##_destroy( name##_ref field ){					\
-	if( name##_is_valid( field )){						\
-		int	index;							\
-										\
-		field->magic = 0;						\
-		for( index = 0; index < field->next; ++ index ){		\
-			if( field->items[ index ] ) free( field->items[ index ] );				\
-		}								\
-		free( field->items );						\
-	}									\
-}										\
-										\
-void name##_exclude_index( name##_ref field, int index ){			\
-	if( name##_is_valid( field ) && ( index >= 0 ) && ( index < field->next ) && ( field->items[ index ] )){	\
-		free( field->items[ index ] );					\
-		field->items[ index ] = NULL;					\
-	}									\
-}										\
-										\
-type * name##_get_index( name##_ref field, int index ){				\
-	if( name##_is_valid( field ) && ( index >= 0 ) && ( index < field->next ) && ( field->items[ index ] )){	\
-		return field->items[ index ];					\
-	}									\
-	return NULL;								\
-}										\
-										\
-type ** name##_get_field( name##_ref field ){					\
-	return name##_is_valid( field ) ? field->items : NULL;			\
-}										\
-										\
-int name##_initialize( name##_ref field ){					\
-	if( ! field ) return EINVAL;						\
-	field->size = 2;							\
-	field->next = 0;							\
-	field->items = ( type ** ) malloc( sizeof( type * ) * field->size );	\
-	if( ! field->items ) return ENOMEM;					\
-	field->items[ field->next ] = NULL;					\
-	field->magic = GENERIC_FIELD_MAGIC_VALUE;					\
-	return EOK;								\
-}										\
-										\
-int name##_is_valid( name##_ref field ){					\
-	return field && ( field->magic == GENERIC_FIELD_MAGIC_VALUE );		\
+#define GENERIC_FIELD_IMPLEMENT(name, type)										\
+																				\
+int name##_add(name##_ref field, type * value){									\
+	if(name##_is_valid(field)){													\
+		if(field->next == (field->size - 1)){									\
+			type **	tmp;														\
+																				\
+			tmp = (type **) realloc(field->items, sizeof(type *) * 2 * field->size);	\
+			if(! tmp){															\
+				return ENOMEM;													\
+			}																	\
+			field->size *= 2;													\
+			field->items = tmp;													\
+		}																		\
+		field->items[field->next] = value;										\
+		++ field->next;															\
+		field->items[field->next] = NULL;										\
+		return field->next - 1;													\
+	}																			\
+	return EINVAL;																\
+}																				\
+																				\
+int name##_count(name##_ref field){												\
+	return name##_is_valid(field) ? field->next : -1;							\
+}																				\
+																				\
+void name##_destroy(name##_ref field){											\
+	if(name##_is_valid(field)){													\
+		int index;																\
+																				\
+		field->magic = 0;														\
+		for(index = 0; index < field->next; ++ index){							\
+			if(field->items[index]){											\
+				free(field->items[index]);										\
+			}																	\
+		}																		\
+		free(field->items);														\
+	}																			\
+}																				\
+																				\
+void name##_exclude_index(name##_ref field, int index){							\
+	if(name##_is_valid(field) && (index >= 0) && (index < field->next) && (field->items[index])){	\
+		free(field->items[index]);												\
+		field->items[index] = NULL;												\
+	}																			\
+}																				\
+																				\
+type * name##_get_index(name##_ref field, int index){							\
+	if(name##_is_valid(field) && (index >= 0) && (index < field->next) && (field->items[index])){	\
+		return field->items[index];												\
+	}																			\
+	return NULL;																\
+}																				\
+																				\
+type ** name##_get_field(name##_ref field){										\
+	return name##_is_valid(field) ? field->items : NULL;						\
+}																				\
+																				\
+int name##_initialize(name##_ref field){										\
+	if(! field){																\
+		return EINVAL;															\
+	}																			\
+	field->size = 2;															\
+	field->next = 0;															\
+	field->items = (type **) malloc(sizeof(type *) * field->size);				\
+	if(! field->items){															\
+		return ENOMEM;															\
+	}																			\
+	field->items[field->next] = NULL;											\
+	field->magic = GENERIC_FIELD_MAGIC_VALUE;									\
+	return EOK;																	\
+}																				\
+																				\
+int name##_is_valid(name##_ref field){											\
+	return field && (field->magic == GENERIC_FIELD_MAGIC_VALUE);				\
 }
 
Index: uspace/srv/net/structures/int_map.h
===================================================================
--- uspace/srv/net/structures/int_map.h	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/structures/int_map.h	(revision aadf01ebd2c032bc8dd43a6e06ae5715e6c2710f)
@@ -55,5 +55,5 @@
  *  @param[in] type Inner object type.
  */
-#define INT_MAP_DECLARE( name, type )											\
+#define INT_MAP_DECLARE(name, type)												\
 																				\
 typedef	struct name			name##_t;											\
@@ -63,29 +63,29 @@
 																				\
 struct	name##_item{															\
-	int		key;																\
-	type *	value;																\
-	int		magic;																\
+	int key;																\
+	type * value;																\
+	int magic;																\
 };																				\
 																				\
 struct	name{																	\
-	int				size;														\
-	int				next;														\
-	name##_item_ref	items;														\
-	int				magic;														\
+	int size;														\
+	int next;														\
+	name##_item_ref items;														\
+	int magic;														\
 };																				\
 																				\
-int		name##_add( name##_ref map, int key, type * value );					\
-void	name##_clear( name##_ref map );											\
-int		name##_count( name##_ref map );											\
-void	name##_destroy( name##_ref map );										\
-void	name##_exclude( name##_ref map, int key );								\
-void	name##_exclude_index( name##_ref map, int index );						\
-type *	name##_find( name##_ref map, int key );									\
-int		name##_update( name##_ref map, int key, int new_key );					\
-type *	name##_get_index( name##_ref map, int index );							\
-int		name##_initialize( name##_ref map );									\
-int		name##_is_valid( name##_ref map );										\
-void	name##_item_destroy( name##_item_ref item );							\
-int		name##_item_is_valid( name##_item_ref item );
+int name##_add(name##_ref map, int key, type * value);							\
+void name##_clear(name##_ref map);												\
+int name##_count(name##_ref map);												\
+void name##_destroy(name##_ref map);											\
+void name##_exclude(name##_ref map, int key);									\
+void name##_exclude_index(name##_ref map, int index);							\
+type * name##_find(name##_ref map, int key);									\
+int name##_update(name##_ref map, int key, int new_key);						\
+type * name##_get_index(name##_ref map, int index);								\
+int name##_initialize(name##_ref map);											\
+int name##_is_valid(name##_ref map);											\
+void name##_item_destroy(name##_item_ref item);									\
+int name##_item_is_valid(name##_item_ref item);
 
 /** Integer to generic type map implementation.
@@ -94,21 +94,23 @@
  *  @param[in] type Inner object type.
  */
-#define INT_MAP_IMPLEMENT( name, type )											\
-																				\
-int name##_add( name##_ref map, int key, type * value ){						\
-	if( name##_is_valid( map )){												\
-		if( map->next == ( map->size - 1 )){									\
-			name##_item_ref	tmp;												\
-																				\
-			tmp = ( name##_item_ref ) realloc( map->items, sizeof( name##_item_t ) * 2 * map->size );	\
-			if( ! tmp ) return ENOMEM;											\
+#define INT_MAP_IMPLEMENT(name, type)											\
+																				\
+int name##_add(name##_ref map, int key, type * value){							\
+	if(name##_is_valid(map)){													\
+		if(map->next == (map->size - 1)){										\
+			name##_item_ref tmp;												\
+																				\
+			tmp = (name##_item_ref) realloc(map->items, sizeof(name##_item_t) * 2 * map->size);	\
+			if(! tmp){															\
+				return ENOMEM;													\
+			}																	\
 			map->size *= 2;														\
 			map->items = tmp;													\
 		}																		\
-		map->items[ map->next ].key = key;										\
-		map->items[ map->next ].value = value;									\
-		map->items[ map->next ].magic = INT_MAP_ITEM_MAGIC_VALUE;				\
+		map->items[map->next].key = key;										\
+		map->items[map->next].value = value;									\
+		map->items[map->next].magic = INT_MAP_ITEM_MAGIC_VALUE;					\
 		++ map->next;															\
-		map->items[ map->next ].magic = 0;										\
+		map->items[map->next].magic = 0;										\
 		return map->next - 1;													\
 	}																			\
@@ -116,63 +118,63 @@
 }																				\
 																				\
-void name##_clear( name##_ref map ){											\
-	if( name##_is_valid( map )){												\
-		int	index;																\
+void name##_clear(name##_ref map){												\
+	if(name##_is_valid(map)){													\
+		int index;																\
 																				\
 /*		map->magic = 0;*/														\
-		for( index = 0; index < map->next; ++ index ){							\
-			if( name##_item_is_valid( &( map->items[ index ] ))){				\
-				name##_item_destroy( &( map->items[ index ] ));					\
+		for(index = 0; index < map->next; ++ index){							\
+			if(name##_item_is_valid(&(map->items[index]))){						\
+				name##_item_destroy(&(map->items[index]));						\
 			}																	\
 		}																		\
 		map->next = 0;															\
-		map->items[ map->next ].magic = 0;										\
+		map->items[map->next].magic = 0;										\
 /*		map->magic = INT_MAP_MAGIC_VALUE;*/										\
 	}																			\
 }																				\
 																				\
-int name##_count( name##_ref map ){												\
-	return name##_is_valid( map ) ? map->next : -1;								\
-}																				\
-																				\
-void name##_destroy( name##_ref map ){											\
-	if( name##_is_valid( map )){												\
-		int	index;																\
+int name##_count(name##_ref map){												\
+	return name##_is_valid(map) ? map->next : -1;								\
+}																				\
+																				\
+void name##_destroy(name##_ref map){											\
+	if(name##_is_valid(map)){													\
+		int index;																\
 																				\
 		map->magic = 0;															\
-		for( index = 0; index < map->next; ++ index ){							\
-			if( name##_item_is_valid( &( map->items[ index ] ))){				\
-				name##_item_destroy( &( map->items[ index ] ));					\
-			}																	\
-		}																		\
-		free( map->items );														\
-	}																			\
-}																				\
-																				\
-void name##_exclude( name##_ref map, int key ){									\
-	if( name##_is_valid( map )){												\
-		int	index;																\
-																				\
-		for( index = 0; index < map->next; ++ index ){							\
-			if( name##_item_is_valid( &( map->items[ index ] )) && ( map->items[ index ].key == key )){	\
-				name##_item_destroy( &( map->items[ index ] ));					\
-			}																	\
-		}																		\
-	}																			\
-}																				\
-																				\
-void name##_exclude_index( name##_ref map, int index ){							\
-	if( name##_is_valid( map ) && ( index >= 0 ) && ( index < map->next ) && name##_item_is_valid( &( map->items[ index ] ))){	\
-		name##_item_destroy( &( map->items[ index ] ));							\
-	}																			\
-}																				\
-																				\
-type * name##_find( name##_ref map, int key ){									\
-	if( name##_is_valid( map )){												\
-		int	index;																\
-																				\
-		for( index = 0; index < map->next; ++ index ){							\
-			if( name##_item_is_valid( &( map->items[ index ] )) && ( map->items[ index ].key == key )){	\
-				return map->items[ index ].value;								\
+		for(index = 0; index < map->next; ++ index){							\
+			if(name##_item_is_valid(&(map->items[index]))){						\
+				name##_item_destroy(&(map->items[index]));						\
+			}																	\
+		}																		\
+		free(map->items);														\
+	}																			\
+}																				\
+																				\
+void name##_exclude(name##_ref map, int key){									\
+	if(name##_is_valid(map)){													\
+		int index;																\
+																				\
+		for(index = 0; index < map->next; ++ index){							\
+			if(name##_item_is_valid(&(map->items[index])) && (map->items[index].key == key)){	\
+				name##_item_destroy(&(map->items[index]));						\
+			}																	\
+		}																		\
+	}																			\
+}																				\
+																				\
+void name##_exclude_index(name##_ref map, int index){							\
+	if(name##_is_valid(map) && (index >= 0) && (index < map->next) && name##_item_is_valid(&(map->items[index]))){	\
+		name##_item_destroy(&(map->items[index]));								\
+	}																			\
+}																				\
+																				\
+type * name##_find(name##_ref map, int key){									\
+	if(name##_is_valid(map)){													\
+		int index;																\
+																				\
+		for(index = 0; index < map->next; ++ index){							\
+			if(name##_item_is_valid(&(map->items[index])) && (map->items[index].key == key)){	\
+				return map->items[index].value;									\
 			}																	\
 		}																		\
@@ -181,14 +183,14 @@
 }																				\
 																				\
-int name##_update( name##_ref map, int key, int new_key ){						\
-	if( name##_is_valid( map )){												\
-		int	index;																\
-																				\
-		for( index = 0; index < map->next; ++ index ){							\
-			if( name##_item_is_valid( &( map->items[ index ] ))){				\
-				if( map->items[ index ].key == new_key ){						\
+int name##_update(name##_ref map, int key, int new_key){						\
+	if(name##_is_valid(map)){													\
+		int index;																\
+																				\
+		for(index = 0; index < map->next; ++ index){							\
+			if(name##_item_is_valid(&(map->items[index]))){						\
+				if(map->items[index].key == new_key){							\
 					return EEXIST;												\
-				}else if( map->items[ index ].key == key ){						\
-					map->items[ index ].key = new_key;							\
+				}else if(map->items[index].key == key){							\
+					map->items[index].key = new_key;							\
 					return EOK;													\
 				}																\
@@ -199,31 +201,35 @@
 }																				\
 																				\
-type * name##_get_index( name##_ref map, int index ){							\
-	if( name##_is_valid( map ) && ( index >= 0 ) && ( index < map->next ) && name##_item_is_valid( &( map->items[ index ] ))){	\
-		return map->items[ index ].value;										\
+type * name##_get_index(name##_ref map, int index){								\
+	if(name##_is_valid(map) && (index >= 0) && (index < map->next) && name##_item_is_valid(&(map->items[index]))){	\
+		return map->items[index].value;											\
 	}																			\
 	return NULL;																\
 }																				\
 																				\
-int name##_initialize( name##_ref map ){										\
-	if( ! map ) return EINVAL;													\
+int name##_initialize(name##_ref map){											\
+	if(! map){																	\
+		return EINVAL;															\
+	}																			\
 	map->size = 2;																\
 	map->next = 0;																\
-	map->items = ( name##_item_ref ) malloc( sizeof( name##_item_t ) * map->size );	\
-	if( ! map->items ) return ENOMEM;											\
-	map->items[ map->next ].magic = 0;											\
+	map->items = (name##_item_ref) malloc(sizeof(name##_item_t) * map->size);	\
+	if(! map->items){															\
+		return ENOMEM;															\
+	}																			\
+	map->items[map->next].magic = 0;											\
 	map->magic = INT_MAP_MAGIC_VALUE;											\
 	return EOK;																	\
 }																				\
 																				\
-int name##_is_valid( name##_ref map ){											\
-	return map && ( map->magic == INT_MAP_MAGIC_VALUE );						\
-}																				\
-																				\
-void name##_item_destroy( name##_item_ref item ){								\
-	if( name##_item_is_valid( item )){											\
+int name##_is_valid(name##_ref map){											\
+	return map && (map->magic == INT_MAP_MAGIC_VALUE);							\
+}																				\
+																				\
+void name##_item_destroy(name##_item_ref item){									\
+	if(name##_item_is_valid(item)){												\
 		item->magic = 0;														\
-		if( item->value ){														\
-			free( item->value );												\
+		if(item->value){														\
+			free(item->value);													\
 			item->value = NULL;													\
 		}																		\
@@ -231,6 +237,6 @@
 }																				\
 																				\
-int name##_item_is_valid( name##_item_ref item ){								\
-	return item && ( item->magic == INT_MAP_ITEM_MAGIC_VALUE );					\
+int name##_item_is_valid(name##_item_ref item){									\
+	return item && (item->magic == INT_MAP_ITEM_MAGIC_VALUE);					\
 }
 
Index: uspace/srv/net/structures/measured_strings.c
===================================================================
--- uspace/srv/net/structures/measured_strings.c	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/structures/measured_strings.c	(revision aadf01ebd2c032bc8dd43a6e06ae5715e6c2710f)
@@ -54,36 +54,42 @@
  *  @returns NULL if there is not enough memory left.
  */
-size_t *	prepare_lengths( const measured_string_ref strings, size_t count );
-
-measured_string_ref measured_string_create_bulk( const char * string, size_t length ){
-	measured_string_ref	new;
-
-	if( length == 0 ){
-		while( string[ length ] ) ++ length;
-	}
-	new = ( measured_string_ref ) malloc( sizeof( measured_string_t ) + ( sizeof( char ) * ( length + 1 )));
-	if( ! new ) return NULL;
+size_t * prepare_lengths(const measured_string_ref strings, size_t count);
+
+measured_string_ref measured_string_create_bulk(const char * string, size_t length){
+	measured_string_ref new;
+
+	if(length == 0){
+		while(string[length]){
+			++ length;
+		}
+	}
+	new = (measured_string_ref) malloc(sizeof(measured_string_t) + (sizeof(char) * (length + 1)));
+	if(! new){
+		return NULL;
+	}
 	new->length = length;
-	new->value = (( char * ) new ) + sizeof( measured_string_t );
+	new->value = ((char *) new) + sizeof(measured_string_t);
 	// append terminating zero explicitly - to be safe
-	memcpy( new->value, string, new->length );
-	new->value[ new->length ] = '\0';
+	memcpy(new->value, string, new->length);
+	new->value[new->length] = '\0';
 	return new;
 }
 
-measured_string_ref measured_string_copy( measured_string_ref source ){
-	measured_string_ref	new;
-
-	if( ! source ) return NULL;
-	new = ( measured_string_ref ) malloc( sizeof( measured_string_t ));
-	if( new ){
-		new->value = ( char * ) malloc( source->length + 1 );
-		if( new->value ){
+measured_string_ref measured_string_copy(measured_string_ref source){
+	measured_string_ref new;
+
+	if(! source){
+		return NULL;
+	}
+	new = (measured_string_ref) malloc(sizeof(measured_string_t));
+	if(new){
+		new->value = (char *) malloc(source->length + 1);
+		if(new->value){
 			new->length = source->length;
-			memcpy( new->value, source->value, new->length );
-			new->value[ new->length ] = '\0';
+			memcpy(new->value, source->value, new->length);
+			new->value[new->length] = '\0';
 			return new;
 		}else{
-			free( new );
+			free(new);
 		}
 	}
@@ -91,173 +97,187 @@
 }
 
-int measured_strings_receive( measured_string_ref * strings, char ** data, size_t count ){
-	ERROR_DECLARE;
-
-	size_t *		lengths;
-	size_t			index;
-	size_t			length;
-	char *			next;
-	ipc_callid_t	callid;
-
-	if(( ! strings ) || ( ! data ) || ( count <= 0 )){
-		return EINVAL;
-	}
-	lengths = ( size_t * ) malloc( sizeof( size_t ) * ( count + 1 ));
-	if( ! lengths ) return ENOMEM;
-	if(( ! async_data_write_receive( & callid, & length ))
-	|| ( length != sizeof( size_t ) * ( count + 1 ))){
-		free( lengths );
-		return EINVAL;
-	}
-	if( ERROR_OCCURRED( async_data_write_finalize( callid, lengths, sizeof( size_t ) * ( count + 1 )))){
-		free( lengths );
-		return ERROR_CODE;
-	}
-	* data = malloc( lengths[ count ] );
-	if( !( * data )) return ENOMEM;
-	( * data )[ lengths[ count ] - 1 ] = '\0';
-	* strings = ( measured_string_ref ) malloc( sizeof( measured_string_t ) * count );
-	if( !( * strings )){
-		free( lengths );
-		free( * data );
+int measured_strings_receive(measured_string_ref * strings, char ** data, size_t count){
+	ERROR_DECLARE;
+
+	size_t * lengths;
+	size_t index;
+	size_t length;
+	char * next;
+	ipc_callid_t callid;
+
+	if((! strings) || (! data) || (count <= 0)){
+		return EINVAL;
+	}
+	lengths = (size_t *) malloc(sizeof(size_t) * (count + 1));
+	if(! lengths){
+		return ENOMEM;
+	}
+	if((! async_data_write_receive(&callid, &length))
+		|| (length != sizeof(size_t) * (count + 1))){
+		free(lengths);
+		return EINVAL;
+	}
+	if(ERROR_OCCURRED(async_data_write_finalize(callid, lengths, sizeof(size_t) * (count + 1)))){
+		free(lengths);
+		return ERROR_CODE;
+	}
+	*data = malloc(lengths[count]);
+	if(!(*data)){
+		return ENOMEM;
+	}
+	(*data)[lengths[count] - 1] = '\0';
+	*strings = (measured_string_ref) malloc(sizeof(measured_string_t) * count);
+	if(!(*strings)){
+		free(lengths);
+		free(*data);
 		return ENOMEM;
 	}
 	next = * data;
-	for( index = 0; index < count; ++ index ){
-		( * strings)[ index ].length = lengths[ index ];
-		if( lengths[ index ] > 0 ){
-			if(( ! async_data_write_receive( & callid, & length ))
-			|| ( length != lengths[ index ] )){
-				free( * data );
-				free( * strings );
-				free( lengths );
+	for(index = 0; index < count; ++ index){
+		(*strings)[index].length = lengths[index];
+		if(lengths[index] > 0){
+			if((! async_data_write_receive(&callid, &length))
+				|| (length != lengths[index])){
+				free(*data);
+				free(*strings);
+				free(lengths);
 				return EINVAL;
 			}
-			ERROR_PROPAGATE( async_data_write_finalize( callid, next, lengths[ index ] ));
-			( * strings)[ index ].value = next;
-			next += lengths[ index ];
-			* next = '\0';
+			ERROR_PROPAGATE(async_data_write_finalize(callid, next, lengths[index]));
+			(*strings)[index].value = next;
+			next += lengths[index];
+			*next = '\0';
 			++ next;
 		}else{
-			( * strings )[ index ].value = NULL;
-		}
-	}
-	free( lengths );
-	return EOK;
-}
-
-int measured_strings_reply( const measured_string_ref strings, size_t count ){
-	ERROR_DECLARE;
-
-	size_t *		lengths;
-	size_t			index;
-	size_t			length;
-	ipc_callid_t	callid;
-
-	if(( ! strings ) || ( count <= 0 )){
-		return EINVAL;
-	}
-	lengths = prepare_lengths( strings, count );
-	if( ! lengths ) return ENOMEM;
-	if(( ! async_data_read_receive( & callid, & length ))
-	|| ( length != sizeof( size_t ) * ( count + 1 ))){
-		free( lengths );
-		return EINVAL;
-	}
-	if( ERROR_OCCURRED( async_data_read_finalize( callid, lengths, sizeof( size_t ) * ( count + 1 )))){
-		free( lengths );
-		return ERROR_CODE;
-	}
-	free( lengths );
-	for( index = 0; index < count; ++ index ){
-		if( strings[ index ].length > 0 ){
-			if(( ! async_data_read_receive( & callid, & length ))
-			|| ( length != strings[ index ].length )){
+			(*strings)[index].value = NULL;
+		}
+	}
+	free(lengths);
+	return EOK;
+}
+
+int measured_strings_reply(const measured_string_ref strings, size_t count){
+	ERROR_DECLARE;
+
+	size_t * lengths;
+	size_t index;
+	size_t length;
+	ipc_callid_t callid;
+
+	if((! strings) || (count <= 0)){
+		return EINVAL;
+	}
+	lengths = prepare_lengths(strings, count);
+	if(! lengths){
+		return ENOMEM;
+	}
+	if((! async_data_read_receive(&callid, &length))
+		|| (length != sizeof(size_t) * (count + 1))){
+		free(lengths);
+		return EINVAL;
+	}
+	if(ERROR_OCCURRED(async_data_read_finalize(callid, lengths, sizeof(size_t) * (count + 1)))){
+		free(lengths);
+		return ERROR_CODE;
+	}
+	free(lengths);
+	for(index = 0; index < count; ++ index){
+		if(strings[index].length > 0){
+			if((! async_data_read_receive(&callid, &length))
+				|| (length != strings[index].length)){
 				return EINVAL;
 			}
-			ERROR_PROPAGATE( async_data_read_finalize( callid, strings[ index ].value, strings[ index ].length ));
-		}
-	}
-	return EOK;
-}
-
-int measured_strings_return( int phone, measured_string_ref * strings, char ** data, size_t count ){
-	ERROR_DECLARE;
-
-	size_t *	lengths;
-	size_t		index;
-	char *		next;
-
-	if(( phone <= 0 ) || ( ! strings ) || ( ! data ) || ( count <= 0 )){
-		return EINVAL;
-	}
-	lengths = ( size_t * ) malloc( sizeof( size_t ) * ( count + 1 ));
-	if( ! lengths ) return ENOMEM;
-	if( ERROR_OCCURRED( async_data_read_start( phone, lengths, sizeof( size_t ) * ( count + 1 )))){
-		free( lengths );
-		return ERROR_CODE;
-	}
-	* data = malloc( lengths[ count ] );
-	if( !( * data )) return ENOMEM;
-	* strings = ( measured_string_ref ) malloc( sizeof( measured_string_t ) * count );
-	if( !( * strings )){
-		free( lengths );
-		free( * data );
+			ERROR_PROPAGATE(async_data_read_finalize(callid, strings[index].value, strings[index].length));
+		}
+	}
+	return EOK;
+}
+
+int measured_strings_return(int phone, measured_string_ref * strings, char ** data, size_t count){
+	ERROR_DECLARE;
+
+	size_t * lengths;
+	size_t index;
+	char * next;
+
+	if((phone <= 0) || (! strings) || (! data) || (count <= 0)){
+		return EINVAL;
+	}
+	lengths = (size_t *) malloc(sizeof(size_t) * (count + 1));
+	if(! lengths){
+		return ENOMEM;
+	}
+	if(ERROR_OCCURRED(async_data_read_start(phone, lengths, sizeof(size_t) * (count + 1)))){
+		free(lengths);
+		return ERROR_CODE;
+	}
+	*data = malloc(lengths[count]);
+	if(!(*data)){
+		return ENOMEM;
+	}
+	*strings = (measured_string_ref) malloc(sizeof(measured_string_t) * count);
+	if(!(*strings)){
+		free(lengths);
+		free(*data);
 		return ENOMEM;
 	}
 	next = * data;
-	for( index = 0; index < count; ++ index ){
-		( * strings )[ index ].length = lengths[ index ];
-		if( lengths[ index ] > 0 ){
-			ERROR_PROPAGATE( async_data_read_start( phone, next, lengths[ index ] ));
-			( * strings )[ index ].value = next;
-			next += lengths[ index ];
-			* next = '\0';
+	for(index = 0; index < count; ++ index){
+		(*strings)[index].length = lengths[index];
+		if(lengths[index] > 0){
+			ERROR_PROPAGATE(async_data_read_start(phone, next, lengths[index]));
+			(*strings)[index].value = next;
+			next += lengths[index];
+			*next = '\0';
 			++ next;
 		}else{
-			( * strings )[ index ].value = NULL;
-		}
-	}
-	free( lengths );
-	return EOK;
-}
-
-int measured_strings_send( int phone, const measured_string_ref strings, size_t count ){
-	ERROR_DECLARE;
-
-	size_t *	lengths;
-	size_t		index;
-
-	if(( phone <= 0 ) || ( ! strings ) || ( count <= 0 )){
-		return EINVAL;
-	}
-	lengths = prepare_lengths( strings, count );
-	if( ! lengths ) return ENOMEM;
-	if( ERROR_OCCURRED( async_data_write_start( phone, lengths, sizeof( size_t ) * ( count + 1 )))){
-		free( lengths );
-		return ERROR_CODE;
-	}
-	free( lengths );
-	for( index = 0; index < count; ++ index ){
-		if( strings[ index ].length > 0 ){
-			ERROR_PROPAGATE( async_data_write_start( phone, strings[ index ].value, strings[ index ].length ));
-		}
-	}
-	return EOK;
-}
-
-size_t * prepare_lengths( const measured_string_ref strings, size_t count ){
-	size_t *	lengths;
-	size_t		index;
-	size_t		length;
-
-	lengths = ( size_t * ) malloc( sizeof( size_t ) * ( count + 1 ));
-	if( ! lengths ) return NULL;
+			(*strings)[index].value = NULL;
+		}
+	}
+	free(lengths);
+	return EOK;
+}
+
+int measured_strings_send(int phone, const measured_string_ref strings, size_t count){
+	ERROR_DECLARE;
+
+	size_t * lengths;
+	size_t index;
+
+	if((phone <= 0) || (! strings) || (count <= 0)){
+		return EINVAL;
+	}
+	lengths = prepare_lengths(strings, count);
+	if(! lengths){
+		return ENOMEM;
+	}
+	if(ERROR_OCCURRED(async_data_write_start(phone, lengths, sizeof(size_t) * (count + 1)))){
+		free(lengths);
+		return ERROR_CODE;
+	}
+	free(lengths);
+	for(index = 0; index < count; ++ index){
+		if(strings[index].length > 0){
+			ERROR_PROPAGATE(async_data_write_start(phone, strings[index].value, strings[index].length));
+		}
+	}
+	return EOK;
+}
+
+size_t * prepare_lengths(const measured_string_ref strings, size_t count){
+	size_t * lengths;
+	size_t index;
+	size_t length;
+
+	lengths = (size_t *) malloc(sizeof(size_t) * (count + 1));
+	if(! lengths){
+		return NULL;
+	}
 	length = 0;
-	for( index = 0; index < count; ++ index ){
-		lengths[ index ] = strings[ index ].length;
-		length += lengths[ index ] + 1;
-	}
-	lengths[ count ] = length;
+	for(index = 0; index < count; ++ index){
+		lengths[index] = strings[index].length;
+		length += lengths[index] + 1;
+	}
+	lengths[count] = length;
 	return lengths;
 }
Index: uspace/srv/net/structures/measured_strings.h
===================================================================
--- uspace/srv/net/structures/measured_strings.h	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/structures/measured_strings.h	(revision aadf01ebd2c032bc8dd43a6e06ae5715e6c2710f)
@@ -57,8 +57,8 @@
 	/** Character string data.
 	 */
-	char *	value;
+	char * value;
 	/** Character string length.
 	 */
-	size_t	length;
+	size_t length;
 };
 
@@ -71,5 +71,5 @@
  *  @returns NULL if there is not enough memory left.
  */
-measured_string_ref	measured_string_create_bulk( const char * string, size_t length );
+measured_string_ref measured_string_create_bulk(const char * string, size_t length);
 
 /** Copies the given measured string with separated header and data parts.
@@ -79,5 +79,5 @@
  *  @returns NULL if there is not enough memory left.
  */
-measured_string_ref	measured_string_copy( measured_string_ref source );
+measured_string_ref measured_string_copy(measured_string_ref source);
 
 /** Receives a&nbsp;measured strings array from a&nbsp;calling module.
@@ -95,5 +95,5 @@
  *  @returns Other error codes as defined for the async_data_write_finalize() function.
  */
-int	measured_strings_receive( measured_string_ref * strings, char ** data, size_t count );
+int measured_strings_receive(measured_string_ref * strings, char ** data, size_t count);
 
 /** Replies the given measured strings array to a&nbsp;calling module.
@@ -108,5 +108,5 @@
  *  @returns Other error codes as defined for the async_data_read_finalize() function.
  */
-int	measured_strings_reply( const measured_string_ref strings, size_t count );
+int measured_strings_reply(const measured_string_ref strings, size_t count);
 
 /** Receives a&nbsp;measured strings array from another module.
@@ -124,5 +124,5 @@
  *  @returns Other error codes as defined for the async_data_read_start() function.
  */
-int	measured_strings_return( int phone, measured_string_ref * strings, char ** data, size_t count );
+int measured_strings_return(int phone, measured_string_ref * strings, char ** data, size_t count);
 
 /** Sends the given measured strings array to another module.
@@ -136,5 +136,5 @@
  *  @returns Other error codes as defined for the async_data_write_start() function.
  */
-int	measured_strings_send( int phone, const measured_string_ref strings, size_t count );
+int measured_strings_send(int phone, const measured_string_ref strings, size_t count);
 
 #endif
Index: uspace/srv/net/structures/module_map.c
===================================================================
--- uspace/srv/net/structures/module_map.c	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/structures/module_map.c	(revision aadf01ebd2c032bc8dd43a6e06ae5715e6c2710f)
@@ -47,13 +47,15 @@
 #include "module_map.h"
 
-GENERIC_CHAR_MAP_IMPLEMENT( modules, module_t )
+GENERIC_CHAR_MAP_IMPLEMENT(modules, module_t)
 
-int add_module( module_ref * module, modules_ref modules, const char * name, const char * filename, services_t service, task_id_t task_id, connect_module_t connect_module ){
+int add_module(module_ref * module, modules_ref modules, const char * name, const char * filename, services_t service, task_id_t task_id, connect_module_t connect_module){
 	ERROR_DECLARE;
 
-	module_ref	tmp_module;
+	module_ref tmp_module;
 
-	tmp_module = ( module_ref ) malloc( sizeof( module_t ));
-	if( ! tmp_module ) return ENOMEM;
+	tmp_module = (module_ref) malloc(sizeof(module_t));
+	if(! tmp_module){
+		return ENOMEM;
+	}
 	tmp_module->task_id = task_id;
 	tmp_module->phone = 0;
@@ -63,34 +65,40 @@
 	tmp_module->service = service;
 	tmp_module->connect_module = connect_module;
-	if( ERROR_OCCURRED( modules_add( modules, tmp_module->name, 0, tmp_module ))){
-		free( tmp_module );
+	if(ERROR_OCCURRED(modules_add(modules, tmp_module->name, 0, tmp_module))){
+		free(tmp_module);
 		return ERROR_CODE;
 	}
-	if( module ) * module = tmp_module;
+	if(module){
+		*module = tmp_module;
+	}
 	return EOK;
 }
 
-module_ref get_running_module( modules_ref modules, char * name ){
-	module_ref	module;
+module_ref get_running_module(modules_ref modules, char * name){
+	module_ref module;
 
-	module = modules_find( modules, name, 0 );
-	if( ! module ) return NULL;
-	if( ! module->task_id ){
-		module->task_id = spawn( module->filename );
-		if( ! module->task_id ) return NULL;
+	module = modules_find(modules, name, 0);
+	if(! module){
+		return NULL;
 	}
-	if( ! module->phone ){
-		module->phone = module->connect_module( module->service );
+	if(! module->task_id){
+		module->task_id = spawn(module->filename);
+		if(! module->task_id){
+			return NULL;
+		}
+	}
+	if(! module->phone){
+		module->phone = module->connect_module(module->service);
 	}
 	return module;
 }
 
-task_id_t spawn( const char * fname ){
-	const char * argv[ 2 ];
-	task_id_t	res;
+task_id_t spawn(const char * fname){
+	const char * argv[2];
+	task_id_t res;
 
-	argv[ 0 ] = fname;
-	argv[ 1 ] = NULL;
-	res = task_spawn( fname, argv );
+	argv[0] = fname;
+	argv[1] = NULL;
+	res = task_spawn(fname, argv);
 
 	return res;
Index: uspace/srv/net/structures/module_map.h
===================================================================
--- uspace/srv/net/structures/module_map.h	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/structures/module_map.h	(revision aadf01ebd2c032bc8dd43a6e06ae5715e6c2710f)
@@ -60,5 +60,5 @@
  *  @see generic_char_map.h
  */
-GENERIC_CHAR_MAP_DECLARE( modules, module_t )
+GENERIC_CHAR_MAP_DECLARE(modules, module_t)
 
 /** Module structure.
@@ -67,23 +67,23 @@
 	/** Module task identifier if running.
 	 */
-	task_id_t	task_id;
+	task_id_t task_id;
 	/** Module service identifier.
 	 */
-	services_t	service;
+	services_t service;
 	/** Module phone if running and connected.
 	 */
-	int			phone;
+	int phone;
 	/** Usage counter.
 	 */
-	int			usage;
+	int usage;
 	/** Module name.
 	 */
-	const char *		name;
+	const char * name;
 	/** Module full path filename.
 	 */
-	const char *		filename;
+	const char * filename;
 	/** Connecting function.
 	 */
-	connect_module_t *	connect_module;
+	connect_module_t * connect_module;
 };
 
@@ -99,5 +99,5 @@
  *  @returns ENOMEM if there is not enough memory left.
  */
-int	add_module( module_ref * module, modules_ref modules, const char * name, const char * filename, services_t service, task_id_t task_id, connect_module_t * connect_module );
+int add_module(module_ref * module, modules_ref modules, const char * name, const char * filename, services_t service, task_id_t task_id, connect_module_t * connect_module);
 
 /** Searches and returns the specified module.
@@ -109,5 +109,5 @@
  *  @returns NULL if there is no such module.
  */
-module_ref	get_running_module( modules_ref modules, char * name );
+module_ref get_running_module(modules_ref modules, char * name);
 
 /** Starts the given module.
@@ -116,5 +116,5 @@
  *  @returns 0 if there is no such module.
  */
-task_id_t	spawn( const char * fname );
+task_id_t spawn(const char * fname);
 
 #endif
Index: uspace/srv/net/structures/packet/packet.c
===================================================================
--- uspace/srv/net/structures/packet/packet.c	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/structures/packet/packet.c	(revision aadf01ebd2c032bc8dd43a6e06ae5715e6c2710f)
@@ -59,14 +59,14 @@
  *  @param[in] packet_id The packet identifier.
  */
-#define PACKET_MAP_PAGE( packet_id )	((( packet_id ) - 1 ) / PACKET_MAP_SIZE )
+#define PACKET_MAP_PAGE(packet_id)	(((packet_id) - 1) / PACKET_MAP_SIZE)
 
 /** Returns the packet index in the corresponding packet map page.
  *  @param[in] packet_id The packet identifier.
  */
-#define PACKET_MAP_INDEX( packet_id )	((( packet_id ) - 1 ) % PACKET_MAP_SIZE )
+#define PACKET_MAP_INDEX(packet_id)	(((packet_id) - 1) % PACKET_MAP_SIZE)
 
 /** Type definition of the packet map page.
  */
-typedef packet_t packet_map_t[ PACKET_MAP_SIZE ];
+typedef packet_t packet_map_t[PACKET_MAP_SIZE];
 /** Type definition of the packet map page pointer.
  */
@@ -77,5 +77,5 @@
  *  @see generic_field.h
  */
-GENERIC_FIELD_DECLARE( gpm, packet_map_t );
+GENERIC_FIELD_DECLARE(gpm, packet_map_t);
 
 /** Releases the packet.
@@ -84,5 +84,5 @@
  *  @returns EINVAL if the packet is not valid.
  */
-int packet_destroy( packet_t packet );
+int packet_destroy(packet_t packet);
 
 /** Packet map global data.
@@ -91,77 +91,83 @@
 	/** Safety lock.
 	 */
-	fibril_rwlock_t	lock;
+	fibril_rwlock_t lock;
 	/** Packet map.
 	 */
-	gpm_t	packet_map;
+	gpm_t packet_map;
 } pm_globals;
 
-GENERIC_FIELD_IMPLEMENT( gpm, packet_map_t );
-
-int packet_destroy( packet_t packet ){
-	if( ! packet_is_valid( packet )) return EINVAL;
-	return munmap( packet, packet->length );
-}
-
-int pm_init( void ){
+GENERIC_FIELD_IMPLEMENT(gpm, packet_map_t);
+
+int packet_destroy(packet_t packet){
+	if(! packet_is_valid(packet)){
+		return EINVAL;
+	}
+	return munmap(packet, packet->length);
+}
+
+int pm_init(void){
 	ERROR_DECLARE;
 
-	fibril_rwlock_initialize( & pm_globals.lock );
-	fibril_rwlock_write_lock( & pm_globals.lock );
-	ERROR_PROPAGATE( gpm_initialize( & pm_globals.packet_map ));
-	fibril_rwlock_write_unlock( & pm_globals.lock );
-	return EOK;
-}
-
-packet_t pm_find( packet_id_t packet_id ){
+	fibril_rwlock_initialize(&pm_globals.lock);
+	fibril_rwlock_write_lock(&pm_globals.lock);
+	ERROR_PROPAGATE(gpm_initialize(&pm_globals.packet_map));
+	fibril_rwlock_write_unlock(&pm_globals.lock);
+	return EOK;
+}
+
+packet_t pm_find(packet_id_t packet_id){
 	packet_map_ref map;
 	packet_t packet;
 
-	if( ! packet_id ) return NULL;
-	fibril_rwlock_read_lock( & pm_globals.lock );
-	if( packet_id > PACKET_MAP_SIZE * gpm_count( & pm_globals.packet_map )){
-		fibril_rwlock_read_unlock( & pm_globals.lock );
-		return NULL;
-	}
-	map = gpm_get_index( & pm_globals.packet_map, PACKET_MAP_PAGE( packet_id ));
-	if( ! map ){
-		fibril_rwlock_read_unlock( & pm_globals.lock );
-		return NULL;
-	}
-	packet = ( * map )[ PACKET_MAP_INDEX( packet_id ) ];
-	fibril_rwlock_read_unlock( & pm_globals.lock );
+	if(! packet_id){
+		return NULL;
+	}
+	fibril_rwlock_read_lock(&pm_globals.lock);
+	if(packet_id > PACKET_MAP_SIZE * gpm_count(&pm_globals.packet_map)){
+		fibril_rwlock_read_unlock(&pm_globals.lock);
+		return NULL;
+	}
+	map = gpm_get_index(&pm_globals.packet_map, PACKET_MAP_PAGE(packet_id));
+	if(! map){
+		fibril_rwlock_read_unlock(&pm_globals.lock);
+		return NULL;
+	}
+	packet = (*map)[PACKET_MAP_INDEX(packet_id)];
+	fibril_rwlock_read_unlock(&pm_globals.lock);
 	return packet;
 }
 
-int pm_add( packet_t packet ){
+int pm_add(packet_t packet){
 	ERROR_DECLARE;
 
 	packet_map_ref map;
 
-	if( ! packet_is_valid( packet )) return EINVAL;
-	fibril_rwlock_write_lock( & pm_globals.lock );
-	if( PACKET_MAP_PAGE( packet->packet_id ) < gpm_count( & pm_globals.packet_map )){
-		map = gpm_get_index( & pm_globals.packet_map, PACKET_MAP_PAGE( packet->packet_id ));
+	if(! packet_is_valid(packet)){
+		return EINVAL;
+	}
+	fibril_rwlock_write_lock(&pm_globals.lock);
+	if(PACKET_MAP_PAGE(packet->packet_id) < gpm_count(&pm_globals.packet_map)){
+		map = gpm_get_index(&pm_globals.packet_map, PACKET_MAP_PAGE(packet->packet_id));
 	}else{
 		do{
-			map = ( packet_map_ref ) malloc( sizeof( packet_map_t ));
-			if( ! map ){
-				fibril_rwlock_write_unlock( & pm_globals.lock );
+			map = (packet_map_ref) malloc(sizeof(packet_map_t));
+			if(! map){
+				fibril_rwlock_write_unlock(&pm_globals.lock);
 				return ENOMEM;
 			}
-			bzero( map, sizeof( packet_map_t ));
-			if(( ERROR_CODE = gpm_add( & pm_globals.packet_map, map )) < 0 ){
-				fibril_rwlock_write_unlock( & pm_globals.lock );
-				free( map );
+			bzero(map, sizeof(packet_map_t));
+			if((ERROR_CODE = gpm_add(&pm_globals.packet_map, map)) < 0){
+				fibril_rwlock_write_unlock(&pm_globals.lock);
+				free(map);
 				return ERROR_CODE;
 			}
-		}while( PACKET_MAP_PAGE( packet->packet_id ) >= gpm_count( & pm_globals.packet_map ));
-	}
-	( * map )[ PACKET_MAP_INDEX( packet->packet_id ) ] = packet;
-	fibril_rwlock_write_unlock( & pm_globals.lock );
-	return EOK;
-}
-
-void pm_destroy( void ){
+		}while(PACKET_MAP_PAGE(packet->packet_id) >= gpm_count(&pm_globals.packet_map));
+	}
+	(*map)[PACKET_MAP_INDEX(packet->packet_id)] = packet;
+	fibril_rwlock_write_unlock(&pm_globals.lock);
+	return EOK;
+}
+
+void pm_destroy(void){
 	int count;
 	int index;
@@ -169,30 +175,32 @@
 	packet_t packet;
 
-	fibril_rwlock_write_lock( & pm_globals.lock );
-	count = gpm_count( & pm_globals.packet_map );
-	while( count > 0 ){
-		map = gpm_get_index( & pm_globals.packet_map, count - 1 );
-		for( index = PACKET_MAP_SIZE - 1; index >= 0; -- index ){
-			packet = ( * map )[ index ];
-			if( packet_is_valid( packet )){
-				munmap( packet, packet->length );
+	fibril_rwlock_write_lock(&pm_globals.lock);
+	count = gpm_count(&pm_globals.packet_map);
+	while(count > 0){
+		map = gpm_get_index(&pm_globals.packet_map, count - 1);
+		for(index = PACKET_MAP_SIZE - 1; index >= 0; -- index){
+			packet = (*map)[index];
+			if(packet_is_valid(packet)){
+				munmap(packet, packet->length);
 			}
 		}
 	}
-	gpm_destroy( & pm_globals.packet_map );
+	gpm_destroy(&pm_globals.packet_map);
 	// leave locked
 }
 
-int pq_add( packet_t * first, packet_t packet, size_t order, size_t metric ){
-	packet_t	item;
-
-	if(( ! first ) || ( ! packet_is_valid( packet ))) return EINVAL;
-	pq_set_order( packet, order, metric );
-	if( packet_is_valid( * first )){
+int pq_add(packet_t * first, packet_t packet, size_t order, size_t metric){
+	packet_t item;
+
+	if((! first) || (! packet_is_valid(packet))){
+		return EINVAL;
+	}
+	pq_set_order(packet, order, metric);
+	if(packet_is_valid(*first)){
 		item = * first;
 		do{
-			if( item->order < order ){
-				if( item->next ){
-					item = pm_find( item->next );
+			if(item->order < order){
+				if(item->next){
+					item = pm_find(item->next);
 				}else{
 					item->next = packet->packet_id;
@@ -204,27 +212,31 @@
 				packet->next = item->packet_id;
 				item->previous = packet->packet_id;
-				item = pm_find( packet->previous );
-				if( item ){
+				item = pm_find(packet->previous);
+				if(item){
 					item->next = packet->packet_id;
 				}else{
-					* first = packet;
+					*first = packet;
 				}
 				return EOK;
 			}
-		}while( packet_is_valid( item ));
-	}
-	* first = packet;
-	return EOK;
-}
-
-packet_t pq_find( packet_t packet, size_t order ){
-	packet_t	item;
-
-	if( ! packet_is_valid( packet )) return NULL;
-	if( packet->order == order ) return packet;
-	item = pm_find( packet->next );
-	while( item && ( item != packet )){
-		item = pm_find( item->next );
-		if( item->order == order ){
+		}while(packet_is_valid(item));
+	}
+	*first = packet;
+	return EOK;
+}
+
+packet_t pq_find(packet_t packet, size_t order){
+	packet_t item;
+
+	if(! packet_is_valid(packet)){
+		return NULL;
+	}
+	if(packet->order == order){
+		return packet;
+	}
+	item = pm_find(packet->next);
+	while(item && (item != packet)){
+		item = pm_find(item->next);
+		if(item->order == order){
 			return item;
 		}
@@ -233,26 +245,32 @@
 }
 
-int	pq_insert_after( packet_t packet, packet_t new_packet ){
-	packet_t	item;
-
-	if( !( packet_is_valid( packet ) && packet_is_valid( new_packet ))) return EINVAL;
+int pq_insert_after(packet_t packet, packet_t new_packet){
+	packet_t item;
+
+	if(!(packet_is_valid(packet) && packet_is_valid(new_packet))){
+		return EINVAL;
+	}
 	new_packet->previous = packet->packet_id;
 	new_packet->next = packet->next;
-	item = pm_find( packet->next );
-	if( item ) item->previous = new_packet->packet_id;
+	item = pm_find(packet->next);
+	if(item){
+		item->previous = new_packet->packet_id;
+	}
 	packet->next = new_packet->packet_id;
 	return EOK;
 }
 
-packet_t pq_detach( packet_t packet ){
+packet_t pq_detach(packet_t packet){
 	packet_t next;
 	packet_t previous;
 
-	if( ! packet_is_valid( packet )) return NULL;
-	next = pm_find( packet->next );
-	if( next ){
+	if(! packet_is_valid(packet)){
+		return NULL;
+	}
+	next = pm_find(packet->next);
+	if(next){
 		next->previous = packet->previous;
-		previous = pm_find( next->previous );
-		if( previous ){
+		previous = pm_find(next->previous);
+		if(previous){
 			previous->next = next->packet_id;
 		}
@@ -263,6 +281,8 @@
 }
 
-int pq_set_order( packet_t packet, size_t order, size_t metric ){
-	if( ! packet_is_valid( packet )) return EINVAL;
+int pq_set_order(packet_t packet, size_t order, size_t metric){
+	if(! packet_is_valid(packet)){
+		return EINVAL;
+	}
 	packet->order = order;
 	packet->metric = metric;
@@ -270,33 +290,45 @@
 }
 
-int pq_get_order( packet_t packet, size_t * order, size_t * metric ){
-	if( ! packet_is_valid( packet )) return EINVAL;
-	if( order ) * order = packet->order;
-	if( metric ) * metric = packet->metric;
-	return EOK;
-}
-
-void pq_destroy( packet_t first, void ( * packet_release )( packet_t packet )){
-	packet_t	actual;
-	packet_t	next;
+int pq_get_order(packet_t packet, size_t * order, size_t * metric){
+	if(! packet_is_valid(packet)){
+		return EINVAL;
+	}
+	if(order){
+		*order = packet->order;
+	}
+	if(metric){
+		*metric = packet->metric;
+	}
+	return EOK;
+}
+
+void pq_destroy(packet_t first, void (*packet_release)(packet_t packet)){
+	packet_t actual;
+	packet_t next;
 
 	actual = first;
-	while( packet_is_valid( actual )){
-		next = pm_find( actual->next );
+	while(packet_is_valid(actual)){
+		next = pm_find(actual->next);
 		actual->next = 0;
 		actual->previous = 0;
-		if( packet_release ) packet_release( actual );
+		if(packet_release){
+			packet_release(actual);
+		}
 		actual = next;
 	}
 }
 
-packet_t pq_next( packet_t packet ){
-	if( ! packet_is_valid( packet )) return NULL;
-	return pm_find( packet->next );
-}
-
-packet_t pq_previous( packet_t packet ){
-	if( ! packet_is_valid( packet )) return NULL;
-	return pm_find( packet->previous );
+packet_t pq_next(packet_t packet){
+	if(! packet_is_valid(packet)){
+		return NULL;
+	}
+	return pm_find(packet->next);
+}
+
+packet_t pq_previous(packet_t packet){
+	if(! packet_is_valid(packet)){
+		return NULL;
+	}
+	return pm_find(packet->previous);
 }
 
Index: uspace/srv/net/structures/packet/packet.h
===================================================================
--- uspace/srv/net/structures/packet/packet.h	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/structures/packet/packet.h	(revision aadf01ebd2c032bc8dd43a6e06ae5715e6c2710f)
@@ -68,14 +68,14 @@
 	/** Reserved packet prefix length.
 	 */
-	size_t			prefix;
+	size_t prefix;
 	/** Maximal packet content length.
 	 */
-	size_t			content;
+	size_t content;
 	/** Reserved packet suffix length.
 	 */
-	size_t			suffix;
+	size_t suffix;
 	/** Maximal packet address length.
 	 */
-	size_t			addr_len;
+	size_t addr_len;
 };
 
@@ -89,5 +89,5 @@
  *  @returns NULL if the mapping does not exist.
  */
-packet_t	pm_find( packet_id_t packet_id );
+packet_t pm_find(packet_id_t packet_id);
 
 /** Adds the packet mapping.
@@ -98,5 +98,5 @@
  *  @returns ENOMEM if there is not enough memory left.
  */
-int	pm_add( packet_t packet );
+int pm_add(packet_t packet);
 
 /** Initializes the packet map.
@@ -104,9 +104,9 @@
  *  @returns ENOMEM if there is not enough memory left.
  */
-int	pm_init( void );
+int pm_init(void);
 
 /** Releases the packet map.
  */
-void	pm_destroy( void );
+void pm_destroy(void);
 
 /** Add packet to the sorted queue.
@@ -121,5 +121,5 @@
  *  @returns EINVAL if the packet is not valid.
  */
-int	pq_add( packet_t * first, packet_t packet, size_t order, size_t metric );
+int pq_add(packet_t * first, packet_t packet, size_t order, size_t metric);
 
 /** Finds the packet with the given order.
@@ -130,5 +130,5 @@
  *  @returns NULL if the packet is not found.
  */
-packet_t	pq_find( packet_t first, size_t order );
+packet_t pq_find(packet_t first, size_t order);
 
 /** Inserts packet after the given one.
@@ -138,5 +138,5 @@
  *  @returns EINVAL if etiher of the packets is invalid.
  */
-int	pq_insert_after( packet_t packet, packet_t new_packet );
+int pq_insert_after(packet_t packet, packet_t new_packet);
 
 /** Detach the packet from the queue.
@@ -146,5 +146,5 @@
  *  @returns NULL if the packet is not valid.
  */
-packet_t	pq_detach( packet_t packet );
+packet_t pq_detach(packet_t packet);
 
 /** Sets the packet order and metric attributes.
@@ -155,5 +155,5 @@
  *  @returns EINVAL if the packet is invalid..
  */
-int	pq_set_order( packet_t packet, size_t order, size_t metric );
+int pq_set_order(packet_t packet, size_t order, size_t metric);
 
 /** Sets the packet order and metric attributes.
@@ -164,5 +164,5 @@
  *  @returns EINVAL if the packet is invalid..
  */
-int	pq_get_order( packet_t packet, size_t * order, size_t * metric );
+int pq_get_order(packet_t packet, size_t * order, size_t * metric);
 
 /** Releases the whole queue.
@@ -171,5 +171,5 @@
  *  @param[in] packet_release The releasing function called for each of the packets after its detachment.
  */
-void	pq_destroy( packet_t first, void ( * packet_release )( packet_t packet ));
+void pq_destroy(packet_t first, void (*packet_release)(packet_t packet));
 
 /** Returns the next packet in the queue.
@@ -179,5 +179,5 @@
  *  @returns NULL if the packet is not valid.
  */
-packet_t	pq_next( packet_t packet );
+packet_t pq_next(packet_t packet);
 
 /** Returns the previous packet in the queue.
@@ -187,5 +187,5 @@
  *  @returns NULL if the packet is not valid.
  */
-packet_t	pq_previous( packet_t packet );
+packet_t pq_previous(packet_t packet);
 
 /*@}*/
Index: uspace/srv/net/structures/packet/packet_client.c
===================================================================
--- uspace/srv/net/structures/packet/packet_client.c	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/structures/packet/packet_client.c	(revision aadf01ebd2c032bc8dd43a6e06ae5715e6c2710f)
@@ -48,9 +48,13 @@
 #include "packet_client.h"
 
-int packet_copy_data( packet_t packet, const void * data, size_t length ){
-	if( ! packet_is_valid( packet )) return EINVAL;
-	if( packet->data_start + length >= packet->length ) return ENOMEM;
-	memcpy(( void * ) packet + packet->data_start, data, length );
-	if( packet->data_start + length > packet->data_end ){
+int packet_copy_data(packet_t packet, const void * data, size_t length){
+	if(! packet_is_valid(packet)){
+		return EINVAL;
+	}
+	if(packet->data_start + length >= packet->length){
+		return ENOMEM;
+	}
+	memcpy((void *) packet + packet->data_start, data, length);
+	if(packet->data_start + length > packet->data_end){
 		packet->data_end = packet->data_start + length;
 	}
@@ -58,19 +62,27 @@
 }
 
-void * packet_prefix( packet_t packet, size_t length ){
-	if(( ! packet_is_valid( packet )) || ( packet->data_start - sizeof( struct packet ) - 2 * ( packet->dest_addr - packet->src_addr ) < length )) return NULL;
+void * packet_prefix(packet_t packet, size_t length){
+	if((! packet_is_valid(packet)) || (packet->data_start - sizeof(struct packet) - 2 * (packet->dest_addr - packet->src_addr) < length)){
+		return NULL;
+	}
 	packet->data_start -= length;
-	return ( void * ) packet + packet->data_start;
+	return (void *) packet + packet->data_start;
 }
 
-void * packet_suffix( packet_t packet, size_t length ){
-	if(( ! packet_is_valid( packet )) || ( packet->data_end + length >= packet->length )) return NULL;
+void * packet_suffix(packet_t packet, size_t length){
+	if((! packet_is_valid(packet)) || (packet->data_end + length >= packet->length)){
+		return NULL;
+	}
 	packet->data_end += length;
-	return ( void * ) packet + packet->data_end - length;
+	return (void *) packet + packet->data_end - length;
 }
 
-int packet_trim( packet_t packet, size_t prefix, size_t suffix ){
-	if( ! packet_is_valid( packet )) return EINVAL;
-	if( prefix + suffix > PACKET_DATA_LENGTH( packet )) return ENOMEM;
+int packet_trim(packet_t packet, size_t prefix, size_t suffix){
+	if(! packet_is_valid(packet)){
+		return EINVAL;
+	}
+	if(prefix + suffix > PACKET_DATA_LENGTH(packet)){
+		return ENOMEM;
+	}
 	packet->data_start += prefix;
 	packet->data_end -= suffix;
@@ -78,71 +90,95 @@
 }
 
-packet_id_t packet_get_id( const packet_t packet ){
-	return packet_is_valid( packet ) ? packet->packet_id : 0;
+packet_id_t packet_get_id(const packet_t packet){
+	return packet_is_valid(packet) ? packet->packet_id : 0;
 }
 
-int packet_get_addr( const packet_t packet, uint8_t ** src, uint8_t ** dest ){
-	if( ! packet_is_valid( packet )) return EINVAL;
-	if( ! packet->addr_len ) return 0;
-	if( src ) * src = ( void * ) packet + packet->src_addr;
-	if( dest ) * dest = ( void * ) packet + packet->dest_addr;
+int packet_get_addr(const packet_t packet, uint8_t ** src, uint8_t ** dest){
+	if(! packet_is_valid(packet)){
+		return EINVAL;
+	}
+	if(! packet->addr_len){
+		return 0;
+	}
+	if(src){
+		*src = (void *) packet + packet->src_addr;
+	}
+	if(dest){
+		*dest = (void *) packet + packet->dest_addr;
+	}
 	return packet->addr_len;
 }
 
-size_t packet_get_data_length( const packet_t packet ){
-	if( ! packet_is_valid( packet )) return 0;
-	return PACKET_DATA_LENGTH( packet );
+size_t packet_get_data_length(const packet_t packet){
+	if(! packet_is_valid(packet)){
+		return 0;
+	}
+	return PACKET_DATA_LENGTH(packet);
 }
 
-void * packet_get_data( const packet_t packet ){
-	if( ! packet_is_valid( packet )) return NULL;
-	return ( void * ) packet + packet->data_start;
+void * packet_get_data(const packet_t packet){
+	if(! packet_is_valid(packet)){
+		return NULL;
+	}
+	return (void *) packet + packet->data_start;
 }
 
-int packet_set_addr( packet_t packet, const uint8_t * src, const uint8_t * dest, size_t addr_len ){
-	size_t	padding;
-	size_t	allocated;
+int packet_set_addr(packet_t packet, const uint8_t * src, const uint8_t * dest, size_t addr_len){
+	size_t padding;
+	size_t allocated;
 
-	if( ! packet_is_valid( packet )) return EINVAL;
-	allocated = PACKET_MAX_ADDRESS_LENGTH( packet );
-	if( allocated < addr_len ) return ENOMEM;
+	if(! packet_is_valid(packet)){
+		return EINVAL;
+	}
+	allocated = PACKET_MAX_ADDRESS_LENGTH(packet);
+	if(allocated < addr_len){
+		return ENOMEM;
+	}
 	padding = allocated - addr_len;
 	packet->addr_len = addr_len;
-	if( src ){
-		memcpy(( void * ) packet + packet->src_addr, src, addr_len );
-		if( padding ) bzero(( void * ) packet + packet->src_addr + addr_len, padding );
+	if(src){
+		memcpy((void *) packet + packet->src_addr, src, addr_len);
+		if(padding){
+			bzero((void *) packet + packet->src_addr + addr_len, padding);
+		}
 	}else{
-		bzero(( void * ) packet + packet->src_addr, allocated );
+		bzero((void *) packet + packet->src_addr, allocated);
 	}
-	if( dest ){
-		memcpy(( void * ) packet + packet->dest_addr, dest, addr_len );
-		if( padding ) bzero(( void * ) packet + packet->dest_addr + addr_len, padding );
+	if(dest){
+		memcpy((void *) packet + packet->dest_addr, dest, addr_len);
+		if(padding){
+			bzero((void *) packet + packet->dest_addr + addr_len, padding);
+		}
 	}else{
-		bzero(( void * ) packet + packet->dest_addr, allocated );
+		bzero((void *) packet + packet->dest_addr, allocated);
 	}
 	return EOK;
 }
 
-packet_t packet_get_copy( int phone, packet_t packet ){
-	packet_t	copy;
-	uint8_t *	src;
-	uint8_t *	dest;
-	size_t		addrlen;
+packet_t packet_get_copy(int phone, packet_t packet){
+	packet_t copy;
+	uint8_t * src;
+	uint8_t * dest;
+	size_t addrlen;
 
-	if( ! packet_is_valid( packet )) return NULL;
+	if(! packet_is_valid(packet)){
+		return NULL;
+	}
 	// get a new packet
-	copy = packet_get_4( phone, PACKET_DATA_LENGTH( packet ), PACKET_MAX_ADDRESS_LENGTH( packet ), packet->max_prefix, PACKET_MIN_SUFFIX( packet ));
-	if( ! copy ) return NULL;
+	copy = packet_get_4(phone, PACKET_DATA_LENGTH(packet), PACKET_MAX_ADDRESS_LENGTH(packet), packet->max_prefix, PACKET_MIN_SUFFIX(packet));
+	if(! copy){
+		return NULL;
+	}
 	// get addresses
-	addrlen = packet_get_addr( packet, & src, & dest );
+	addrlen = packet_get_addr(packet, &src, &dest);
 	// copy data
-	if(( packet_copy_data( copy, packet_get_data( packet ), PACKET_DATA_LENGTH( packet )) == EOK )
+	if((packet_copy_data(copy, packet_get_data(packet), PACKET_DATA_LENGTH(packet)) == EOK)
 	// copy addresses if present
-	&& (( addrlen <= 0 ) || ( packet_set_addr( copy, src, dest, addrlen ) == EOK ))){
+		&& ((addrlen <= 0) || (packet_set_addr(copy, src, dest, addrlen) == EOK))){
 		copy->order = packet->order;
 		copy->metric = packet->metric;
 		return copy;
 	}else{
-		pq_release( phone, copy->packet_id );
+		pq_release(phone, copy->packet_id);
 		return NULL;
 	}
Index: uspace/srv/net/structures/packet/packet_client.h
===================================================================
--- uspace/srv/net/structures/packet/packet_client.h	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/structures/packet/packet_client.h	(revision aadf01ebd2c032bc8dd43a6e06ae5715e6c2710f)
@@ -59,5 +59,5 @@
  *  @returns NULL if there is not enough memory left.
  */
-#define PACKET_PREFIX( packet, type )	( type * ) packet_prefix(( packet ), sizeof( type ))
+#define PACKET_PREFIX(packet, type)	(type *) packet_prefix((packet), sizeof(type))
 
 /** Allocates the specified type right after the actual packet content and returns its pointer.
@@ -69,5 +69,5 @@
  *  @returns NULL if there is not enough memory left.
  */
-#define PACKET_SUFFIX( packet, type )	( type * ) packet_suffix(( packet ), sizeof( type ))
+#define PACKET_SUFFIX(packet, type)	(type *) packet_suffix((packet), sizeof(type))
 
 /** Trims the actual packet content by the specified prefix and suffix types.
@@ -80,5 +80,5 @@
  *  @returns ENOMEM if there is not enough memory left.
  */
-#define PACKET_TRIM( packet, prefix, suffix )	packet_trim(( packet ), sizeof( prefix ), sizeof( suffix ))
+#define PACKET_TRIM(packet, prefix, suffix)	packet_trim((packet), sizeof(prefix), sizeof(suffix))
 
 /** Allocates the specified space right before the actual packet content and returns its pointer.
@@ -88,5 +88,5 @@
  *  @returns NULL if there is not enough memory left.
  */
-void *	packet_prefix( packet_t packet, size_t length );
+void * packet_prefix(packet_t packet, size_t length);
 
 /** Allocates the specified space right after the actual packet content and returns its pointer.
@@ -96,5 +96,5 @@
  *  @returns NULL if there is not enough memory left.
  */
-void *	packet_suffix( packet_t packet, size_t length );
+void * packet_suffix(packet_t packet, size_t length);
 
 /** Trims the actual packet content by the specified prefix and suffix lengths.
@@ -106,5 +106,5 @@
  *  @returns ENOMEM if there is not enough memory left.
  */
-int	packet_trim( packet_t packet, size_t prefix, size_t suffix );
+int packet_trim(packet_t packet, size_t prefix, size_t suffix);
 
 /** Copies the specified data to the beginning of the actual packet content.
@@ -117,5 +117,5 @@
  *  @returns ENOMEM if there is not enough memory left.
  */
-int	packet_copy_data( packet_t packet, const void * data, size_t length );
+int packet_copy_data(packet_t packet, const void * data, size_t length);
 
 /** Returns the packet identifier.
@@ -124,5 +124,5 @@
  *  @returns Zero (0) if the packet is not valid.
  */
-packet_id_t packet_get_id( const packet_t packet );
+packet_id_t packet_get_id(const packet_t packet);
 
 /** Returns the packet content length.
@@ -131,5 +131,5 @@
  *  @returns Zero (0) if the packet is not valid.
  */
-size_t	packet_get_data_length( const packet_t packet );
+size_t packet_get_data_length(const packet_t packet);
 
 /** Returns the pointer to the beginning of the packet content.
@@ -138,5 +138,5 @@
  *  @returns NULL if the packet is not valid.
  */
-void *	packet_get_data( const packet_t packet );
+void * packet_get_data(const packet_t packet);
 
 /** Returns the stored packet addresses and their length.
@@ -148,5 +148,5 @@
  *  @returns EINVAL if the packet is not valid.
  */
-int	packet_get_addr( const packet_t packet, uint8_t ** src, uint8_t ** dest );
+int packet_get_addr(const packet_t packet, uint8_t ** src, uint8_t ** dest);
 
 /** Sets the packet addresses.
@@ -159,5 +159,5 @@
  *  @returns ENOMEM if there is not enough memory left.
  */
-int	packet_set_addr( packet_t packet, const uint8_t * src, const uint8_t * dest, size_t addr_len );
+int packet_set_addr(packet_t packet, const uint8_t * src, const uint8_t * dest, size_t addr_len);
 
 /** Translates the packet identifier to the packet reference.
@@ -172,5 +172,5 @@
  *  @returns Other error codes as defined for the packet_return() function.
  */
-int packet_translate( int phone, packet_ref packet, packet_id_t packet_id );
+int packet_translate(int phone, packet_ref packet, packet_id_t packet_id);
 
 /** Obtains the packet of the given dimensions.
@@ -184,5 +184,5 @@
  *  @returns NULL on error.
  */
-packet_t packet_get_4( int phone, size_t max_content, size_t addr_len, size_t max_prefix, size_t max_suffix );
+packet_t packet_get_4(int phone, size_t max_content, size_t addr_len, size_t max_prefix, size_t max_suffix);
 
 /** Obtains the packet of the given content size.
@@ -193,5 +193,5 @@
  *  @returns NULL on error.
  */
-packet_t packet_get_1( int phone, size_t content );
+packet_t packet_get_1(int phone, size_t content);
 
 /** Releases the packet queue.
@@ -202,5 +202,5 @@
  *  @param[in] packet_id The packet identifier.
  */
-void pq_release( int phone, packet_id_t packet_id );
+void pq_release(int phone, packet_id_t packet_id);
 
 /** Returns the packet copy.
@@ -212,5 +212,5 @@
  *  @returns NULL on error.
  */
-packet_t	packet_get_copy( int phone, packet_t packet );
+packet_t packet_get_copy(int phone, packet_t packet);
 
 /*@}*/
Index: uspace/srv/net/structures/packet/packet_header.h
===================================================================
--- uspace/srv/net/structures/packet/packet_header.h	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/structures/packet/packet_header.h	(revision aadf01ebd2c032bc8dd43a6e06ae5715e6c2710f)
@@ -43,15 +43,15 @@
  *  @param[in] header The packet header.
  */
-#define PACKET_DATA_LENGTH( header )		(( header )->data_end - ( header )->data_start )
+#define PACKET_DATA_LENGTH(header)		((header)->data_end - (header)->data_start)
 
 /** Returns the maximum packet address length.
  *  @param[in] header The packet header.
  */
-#define PACKET_MAX_ADDRESS_LENGTH( header )		(( header )->dest_addr - ( header )->src_addr )
+#define PACKET_MAX_ADDRESS_LENGTH(header)		((header)->dest_addr - (header)->src_addr)
 
 /** Returns the minimum packet suffix.
  *  @param[in] header The packet header.
  */
-#define PACKET_MIN_SUFFIX( header )		(( header )->length - ( header )->data_start - ( header )->max_content )
+#define PACKET_MIN_SUFFIX(header)		((header)->length - (header)->data_start - (header)->max_content)
 
 /** Packet integrity check magic value.
@@ -64,47 +64,47 @@
 	/** Packet identifier.
 	 */
-	packet_id_t		packet_id;
+	packet_id_t packet_id;
 	/** Packet queue sorting value.
 	 *  The packet queue is sorted the ascending order.
 	 */
-	size_t			order;
+	size_t order;
 	/** Packet metric.
 	 */
-	size_t			metric;
+	size_t metric;
 	/** Previous packet in the queue.
 	 */
-	packet_id_t		previous;
+	packet_id_t previous;
 	/** Next packet in the queue.
 	 */
-	packet_id_t		next;
+	packet_id_t next;
 	/** Total length of the packet.
 	 *  Contains the header, the addresses and the data of the packet.
 	 *  Corresponds to the mapped sharable memory block.
 	 */
-	size_t			length;
+	size_t length;
 	/** Stored source and destination addresses length.
 	 */
-	size_t			addr_len;
+	size_t addr_len;
 	/** Souce address offset in bytes from the beginning of the packet header.
 	 */
-	size_t			src_addr;
+	size_t src_addr;
 	/** Destination address offset in bytes from the beginning of the packet header.
 	 */
-	size_t			dest_addr;
+	size_t dest_addr;
 	/** Reserved data prefix length in bytes.
 	 */
-	size_t			max_prefix;
+	size_t max_prefix;
 	/** Reserved content length in bytes.
 	 */
-	size_t			max_content;
+	size_t max_content;
 	/** Actual data start offset in bytes from the beginning of the packet header.
 	 */
-	size_t			data_start;
+	size_t data_start;
 	/** Actual data end offset in bytes from the beginning of the packet header.
 	 */
-	size_t			data_end;
+	size_t data_end;
 	/** Integrity check magic value.
 	 */
-	int				magic_value;
+	int magic_value;
 };
 
@@ -114,6 +114,6 @@
  *  @returns false otherwise.
  */
-static inline int	packet_is_valid( const packet_t packet ){
-	return packet && ( packet->magic_value == PACKET_MAGIC_VALUE );
+static inline int packet_is_valid(const packet_t packet){
+	return packet && (packet->magic_value == PACKET_MAGIC_VALUE);
 }
 
Index: uspace/srv/net/structures/packet/packet_messages.h
===================================================================
--- uspace/srv/net/structures/packet/packet_messages.h	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/structures/packet/packet_messages.h	(revision aadf01ebd2c032bc8dd43a6e06ae5715e6c2710f)
@@ -69,25 +69,25 @@
 /** Returns the protocol service message parameter.
  */
-#define ARP_GET_PROTO( call )		( services_t ) IPC_GET_ARG2( * call )
+#define ARP_GET_PROTO(call)		(services_t) IPC_GET_ARG2(*call)
 
 /** Returns the packet identifier message parameter.
  */
-#define IPC_GET_ID( call )			( packet_id_t ) IPC_GET_ARG1( * call )
+#define IPC_GET_ID(call)			(packet_id_t) IPC_GET_ARG1(*call)
 
 /** Returns the maximal content length message parameter.
  */
-#define IPC_GET_CONTENT( call )		( size_t ) IPC_GET_ARG1( * call )
+#define IPC_GET_CONTENT(call)		(size_t) IPC_GET_ARG1(*call)
 
 /** Returns the maximal address length message parameter.
  */
-#define IPC_GET_ADDR_LEN( call )	( size_t ) IPC_GET_ARG2( * call )
+#define IPC_GET_ADDR_LEN(call)	(size_t) IPC_GET_ARG2(*call)
 
 /** Returns the maximal prefix length message parameter.
  */
-#define IPC_GET_PREFIX( call )		( size_t ) IPC_GET_ARG3( * call )
+#define IPC_GET_PREFIX(call)		(size_t) IPC_GET_ARG3(*call)
 
 /** Returns the maximal suffix length message parameter.
  */
-#define IPC_GET_SUFFIX( call )		( size_t ) IPC_GET_ARG4( * call )
+#define IPC_GET_SUFFIX(call)		(size_t) IPC_GET_ARG4(*call)
 
 #endif
Index: uspace/srv/net/structures/packet/packet_remote.c
===================================================================
--- uspace/srv/net/structures/packet/packet_remote.c	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/structures/packet/packet_remote.c	(revision aadf01ebd2c032bc8dd43a6e06ae5715e6c2710f)
@@ -60,43 +60,45 @@
  *  @returns Other error codes as defined for the async_share_in_start() function.
  */
-int packet_return( int phone, packet_ref packet, packet_id_t packet_id, size_t size );
+int packet_return(int phone, packet_ref packet, packet_id_t packet_id, size_t size);
 
-int packet_translate( int phone, packet_ref packet, packet_id_t packet_id ){
+int packet_translate(int phone, packet_ref packet, packet_id_t packet_id){
 	ERROR_DECLARE;
 
-	ipcarg_t			size;
-	packet_t			next;
+	ipcarg_t size;
+	packet_t next;
 
-	if( ! packet ) return EINVAL;
-	* packet = pm_find( packet_id );
-	if( !( * packet )){
-		ERROR_PROPAGATE( async_req_1_1( phone, NET_PACKET_GET_SIZE, packet_id, & size ));
-		ERROR_PROPAGATE( packet_return( phone, packet, packet_id, size ));
+	if(! packet){
+		return EINVAL;
 	}
-	if(( ** packet ).next ){
-		return packet_translate( phone, & next, ( ** packet ).next );
+	*packet = pm_find(packet_id);
+	if(!(*packet)){
+		ERROR_PROPAGATE(async_req_1_1(phone, NET_PACKET_GET_SIZE, packet_id, &size));
+		ERROR_PROPAGATE(packet_return(phone, packet, packet_id, size));
+	}
+	if((** packet).next){
+		return packet_translate(phone, &next, (** packet).next);
 	}else return EOK;
 }
 
-int packet_return( int phone, packet_ref packet, packet_id_t packet_id, size_t size ){
+int packet_return(int phone, packet_ref packet, packet_id_t packet_id, size_t size){
 	ERROR_DECLARE;
 
-	aid_t		message;
-	ipc_call_t	answer;
-	ipcarg_t	result;
+	aid_t message;
+	ipc_call_t answer;
+	ipcarg_t result;
 
-	message = async_send_1( phone, NET_PACKET_GET, packet_id, & answer );
-	* packet = ( packet_t ) as_get_mappable_page( size );
-	if( ERROR_OCCURRED( async_share_in_start_0_0( phone, * packet, size ))
-	|| ERROR_OCCURRED( pm_add( * packet ))){
-		munmap( * packet, size );
-		async_wait_for( message, NULL );
+	message = async_send_1(phone, NET_PACKET_GET, packet_id, &answer);
+	*packet = (packet_t) as_get_mappable_page(size);
+	if(ERROR_OCCURRED(async_share_in_start_0_0(phone, * packet, size))
+		|| ERROR_OCCURRED(pm_add(*packet))){
+		munmap(*packet, size);
+		async_wait_for(message, NULL);
 		return ERROR_CODE;
 	}
-	async_wait_for( message, & result );
+	async_wait_for(message, &result);
 	return result;
 }
 
-packet_t packet_get_4( int phone, size_t max_content, size_t addr_len, size_t max_prefix, size_t max_suffix ){
+packet_t packet_get_4(int phone, size_t max_content, size_t addr_len, size_t max_prefix, size_t max_suffix){
 	ERROR_DECLARE;
 
@@ -105,10 +107,10 @@
 	packet_t packet;
 
-	if( ERROR_OCCURRED( async_req_4_2( phone, NET_PACKET_CREATE_4, max_content, addr_len, max_prefix, max_suffix, & packet_id, & size ))){
+	if(ERROR_OCCURRED(async_req_4_2(phone, NET_PACKET_CREATE_4, max_content, addr_len, max_prefix, max_suffix, &packet_id, &size))){
 		return NULL;
 	}
-	packet = pm_find( packet_id );
-	if( ! packet ){
-		if( ERROR_OCCURRED( packet_return( phone, & packet, packet_id, size ))){
+	packet = pm_find(packet_id);
+	if(! packet){
+		if(ERROR_OCCURRED(packet_return(phone, &packet, packet_id, size))){
 			return NULL;
 		}
@@ -117,17 +119,17 @@
 }
 
-packet_t packet_get_1( int phone, size_t content ){
+packet_t packet_get_1(int phone, size_t content){
 	ERROR_DECLARE;
 
-	ipcarg_t	packet_id;
-	ipcarg_t	size;
-	packet_t	packet;
+	ipcarg_t packet_id;
+	ipcarg_t size;
+	packet_t packet;
 
-	if( ERROR_OCCURRED( async_req_1_2( phone, NET_PACKET_CREATE_1, content, & packet_id, & size ))){
+	if(ERROR_OCCURRED(async_req_1_2(phone, NET_PACKET_CREATE_1, content, &packet_id, &size))){
 		return NULL;
 	}
-	packet = pm_find( packet_id );
-	if( ! packet ){
-		if( ERROR_OCCURRED( packet_return( phone, & packet, packet_id, size ))){
+	packet = pm_find(packet_id);
+	if(! packet){
+		if(ERROR_OCCURRED(packet_return(phone, &packet, packet_id, size))){
 			return NULL;
 		}
@@ -136,6 +138,6 @@
 }
 
-void pq_release( int phone, packet_id_t packet_id ){
-	async_msg_1( phone, NET_PACKET_RELEASE, packet_id );
+void pq_release(int phone, packet_id_t packet_id){
+	async_msg_1(phone, NET_PACKET_RELEASE, packet_id);
 }
 
Index: uspace/srv/net/structures/packet/packet_server.c
===================================================================
--- uspace/srv/net/structures/packet/packet_server.c	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/structures/packet/packet_server.c	(revision aadf01ebd2c032bc8dd43a6e06ae5715e6c2710f)
@@ -76,10 +76,10 @@
 	/** Free packet queues.
 	 */
-	packet_t free[ FREE_QUEUES_COUNT ];
+	packet_t free[FREE_QUEUES_COUNT];
 	/** Packet length upper bounds of the free packet queues.
 	 *  The maximal lengths of packets in each queue in the ascending order.
 	 *  The last queue is not limited.
 	 */
-	size_t sizes[ FREE_QUEUES_COUNT ];
+	size_t sizes[FREE_QUEUES_COUNT];
 	/** Total packets allocated.
 	 */
@@ -89,10 +89,10 @@
 		.counter = 1,
 		.waiters = {
-			.prev = & ps_globals.lock.waiters,
-			.next = & ps_globals.lock.waiters,
+			.prev = &ps_globals.lock.waiters,
+			.next = &ps_globals.lock.waiters,
 		}
 	},
-	.free = { NULL, NULL, NULL, NULL, NULL, NULL, NULL },
-	.sizes = { PAGE_SIZE, PAGE_SIZE * 2, PAGE_SIZE * 4, PAGE_SIZE * 8, PAGE_SIZE * 16, PAGE_SIZE * 32, PAGE_SIZE * 64 },
+	.free = {NULL, NULL, NULL, NULL, NULL, NULL, NULL},
+	.sizes = {PAGE_SIZE, PAGE_SIZE * 2, PAGE_SIZE * 4, PAGE_SIZE * 8, PAGE_SIZE * 16, PAGE_SIZE * 32, PAGE_SIZE * 64},
 	.count = 0
 };
@@ -113,5 +113,5 @@
  *  @returns NULL if there is not enough memory left.
  */
-packet_t	packet_get( size_t addr_len, size_t max_prefix, size_t max_content, size_t max_suffix );
+packet_t packet_get(size_t addr_len, size_t max_prefix, size_t max_content, size_t max_suffix);
 
 /** Releases the packet queue.
@@ -120,5 +120,5 @@
  *  @returns ENOENT if there is no such packet.
  */
-int	packet_release_wrapper( packet_id_t packet_id );
+int packet_release_wrapper(packet_id_t packet_id);
 
 /** Releases the packet and returns it to the appropriate free packet queue.
@@ -126,5 +126,5 @@
  *  @param[in] packet The packet to be released.
  */
-void packet_release( packet_t packet );
+void packet_release(packet_t packet);
 
 /** Creates a&nbsp;new packet of dimensions at least as given.
@@ -138,5 +138,5 @@
  *  @returns NULL if there is not enough memory left.
  */
-packet_t	packet_create( size_t length, size_t addr_len, size_t max_prefix, size_t max_content, size_t max_suffix );
+packet_t packet_create(size_t length, size_t addr_len, size_t max_prefix, size_t max_content, size_t max_suffix);
 
 /** Clears and initializes the packet according to the given dimensions.
@@ -147,5 +147,5 @@
  *  @param[in] max_suffix The maximal suffix length in bytes.
  */
-void	packet_init( packet_t packet, size_t addr_len, size_t max_prefix, size_t max_content, size_t max_suffix );
+void packet_init(packet_t packet, size_t addr_len, size_t max_prefix, size_t max_content, size_t max_suffix);
 
 /** Shares the packet memory block.
@@ -157,134 +157,148 @@
  *  @returns Other error codes as defined for the async_share_in_finalize() function.
  */
-int packet_reply( const packet_t packet );
+int packet_reply(const packet_t packet);
 
 /*@}*/
 
-int packet_translate( int phone, packet_ref packet, packet_id_t packet_id ){
-	if( ! packet ) return EINVAL;
-	* packet = pm_find( packet_id );
-	return ( * packet ) ? EOK : ENOENT;
-}
-
-packet_t packet_get_4( int phone, size_t max_content, size_t addr_len, size_t max_prefix, size_t max_suffix ){
-	return packet_get( addr_len, max_prefix, max_content, max_suffix );
-}
-
-packet_t packet_get_1( int phone, size_t content ){
-	return packet_get( DEFAULT_ADDR_LEN, DEFAULT_PREFIX, content, DEFAULT_SUFFIX );
-}
-
-void pq_release( int phone, packet_id_t packet_id ){
-	( void ) packet_release_wrapper( packet_id );
-}
-
-int	packet_server_message( ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count ){
+int packet_translate(int phone, packet_ref packet, packet_id_t packet_id){
+	if(! packet){
+		return EINVAL;
+	}
+	*packet = pm_find(packet_id);
+	return (*packet) ? EOK : ENOENT;
+}
+
+packet_t packet_get_4(int phone, size_t max_content, size_t addr_len, size_t max_prefix, size_t max_suffix){
+	return packet_get(addr_len, max_prefix, max_content, max_suffix);
+}
+
+packet_t packet_get_1(int phone, size_t content){
+	return packet_get(DEFAULT_ADDR_LEN, DEFAULT_PREFIX, content, DEFAULT_SUFFIX);
+}
+
+void pq_release(int phone, packet_id_t packet_id){
+	(void) packet_release_wrapper(packet_id);
+}
+
+int packet_server_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){
 	packet_t packet;
 
-	* answer_count = 0;
-	switch( IPC_GET_METHOD( * call )){
+	*answer_count = 0;
+	switch(IPC_GET_METHOD(*call)){
 		case IPC_M_PHONE_HUNGUP:
 			return EOK;
 		case NET_PACKET_CREATE_1:
-			packet = packet_get( DEFAULT_ADDR_LEN, DEFAULT_PREFIX, IPC_GET_CONTENT( call ), DEFAULT_SUFFIX );
-			if( ! packet ) return ENOMEM;
-			* answer_count = 2;
-			IPC_SET_ARG1( * answer, packet->packet_id );
-			IPC_SET_ARG2( * answer, packet->length );
+			packet = packet_get(DEFAULT_ADDR_LEN, DEFAULT_PREFIX, IPC_GET_CONTENT(call), DEFAULT_SUFFIX);
+			if(! packet){
+				return ENOMEM;
+			}
+			*answer_count = 2;
+			IPC_SET_ARG1(*answer, packet->packet_id);
+			IPC_SET_ARG2(*answer, packet->length);
 			return EOK;
 		case NET_PACKET_CREATE_4:
-			packet = packet_get((( DEFAULT_ADDR_LEN < IPC_GET_ADDR_LEN( call )) ? IPC_GET_ADDR_LEN( call ) : DEFAULT_ADDR_LEN ), DEFAULT_PREFIX + IPC_GET_PREFIX( call ), IPC_GET_CONTENT( call ), DEFAULT_SUFFIX + IPC_GET_SUFFIX( call ));
-			if( ! packet ) return ENOMEM;
-			* answer_count = 2;
-			IPC_SET_ARG1( * answer, packet->packet_id );
-			IPC_SET_ARG2( * answer, packet->length );
+			packet = packet_get(((DEFAULT_ADDR_LEN < IPC_GET_ADDR_LEN(call)) ? IPC_GET_ADDR_LEN(call) : DEFAULT_ADDR_LEN), DEFAULT_PREFIX + IPC_GET_PREFIX(call), IPC_GET_CONTENT(call), DEFAULT_SUFFIX + IPC_GET_SUFFIX(call));
+			if(! packet){
+				return ENOMEM;
+			}
+			*answer_count = 2;
+			IPC_SET_ARG1(*answer, packet->packet_id);
+			IPC_SET_ARG2(*answer, packet->length);
 			return EOK;
 		case NET_PACKET_GET:
-			packet = pm_find( IPC_GET_ID( call ));
-			if( ! packet_is_valid( packet )) return ENOENT;
-			return packet_reply( packet );
+			packet = pm_find(IPC_GET_ID(call));
+			if(! packet_is_valid(packet)){
+				return ENOENT;
+			}
+			return packet_reply(packet);
 		case NET_PACKET_GET_SIZE:
-			packet = pm_find( IPC_GET_ID( call ));
-			if( ! packet_is_valid( packet )) return ENOENT;
-			IPC_SET_ARG1( * answer, packet->length );
-			* answer_count = 1;
+			packet = pm_find(IPC_GET_ID(call));
+			if(! packet_is_valid(packet)){
+				return ENOENT;
+			}
+			IPC_SET_ARG1(*answer, packet->length);
+			*answer_count = 1;
 			return EOK;
 		case NET_PACKET_RELEASE:
-			return packet_release_wrapper( IPC_GET_ID( call ));
+			return packet_release_wrapper(IPC_GET_ID(call));
 	}
 	return ENOTSUP;
 }
 
-int packet_release_wrapper( packet_id_t packet_id ){
-	packet_t	packet;
-
-	packet = pm_find( packet_id );
-	if( ! packet_is_valid( packet )) return ENOENT;
-	fibril_mutex_lock( & ps_globals.lock );
-	pq_destroy( packet, packet_release );
-	fibril_mutex_unlock( & ps_globals.lock );
+int packet_release_wrapper(packet_id_t packet_id){
+	packet_t packet;
+
+	packet = pm_find(packet_id);
+	if(! packet_is_valid(packet)){
+		return ENOENT;
+	}
+	fibril_mutex_lock(&ps_globals.lock);
+	pq_destroy(packet, packet_release);
+	fibril_mutex_unlock(&ps_globals.lock);
 	return EOK;
 }
 
-void packet_release( packet_t packet ){
+void packet_release(packet_t packet){
 	int index;
 	int result;
 
 	// remove debug dump
-//	printf( "packet %d released\n", packet->packet_id );
-	for( index = 0; ( index < FREE_QUEUES_COUNT - 1 ) && ( packet->length > ps_globals.sizes[ index ] ); ++ index );
-	result = pq_add( & ps_globals.free[ index ], packet, packet->length, packet->length );
-	assert( result == EOK );
-}
-
-packet_t packet_get( size_t addr_len, size_t max_prefix, size_t max_content, size_t max_suffix ){
+//	printf("packet %d released\n", packet->packet_id);
+	for(index = 0; (index < FREE_QUEUES_COUNT - 1) && (packet->length > ps_globals.sizes[index]); ++ index);
+	result = pq_add(&ps_globals.free[index], packet, packet->length, packet->length);
+	assert(result == EOK);
+}
+
+packet_t packet_get(size_t addr_len, size_t max_prefix, size_t max_content, size_t max_suffix){
 	int index;
 	packet_t packet;
 	size_t length;
 
-	length = ALIGN_UP( sizeof( struct packet ) + 2 * addr_len + max_prefix + max_content + max_suffix, PAGE_SIZE );
-	fibril_mutex_lock( & ps_globals.lock );
-	for( index = 0; index < FREE_QUEUES_COUNT - 1; ++ index ){
-		if( length <= ps_globals.sizes[ index ] ){
-			packet = ps_globals.free[ index ];
-			while( packet_is_valid( packet ) && ( packet->length < length )){
-				packet = pm_find( packet->next );
-			}
-			if( packet_is_valid( packet )){
-				if( packet == ps_globals.free[ index ] ){
-					ps_globals.free[ index ] = pq_detach( packet );
+	length = ALIGN_UP(sizeof(struct packet) + 2 * addr_len + max_prefix + max_content + max_suffix, PAGE_SIZE);
+	fibril_mutex_lock(&ps_globals.lock);
+	for(index = 0; index < FREE_QUEUES_COUNT - 1; ++ index){
+		if(length <= ps_globals.sizes[index]){
+			packet = ps_globals.free[index];
+			while(packet_is_valid(packet) && (packet->length < length)){
+				packet = pm_find(packet->next);
+			}
+			if(packet_is_valid(packet)){
+				if(packet == ps_globals.free[index]){
+					ps_globals.free[index] = pq_detach(packet);
 				}else{
-					pq_detach( packet );
+					pq_detach(packet);
 				}
-				packet_init( packet, addr_len, max_prefix, max_content, max_suffix );
-				fibril_mutex_unlock( & ps_globals.lock );
+				packet_init(packet, addr_len, max_prefix, max_content, max_suffix);
+				fibril_mutex_unlock(&ps_globals.lock);
 				// remove debug dump
-//				printf( "packet %d got\n", packet->packet_id );
+//				printf("packet %d got\n", packet->packet_id);
 				return packet;
 			}
 		}
 	}
-	packet = packet_create( length, addr_len, max_prefix, max_content, max_suffix );
-	fibril_mutex_unlock( & ps_globals.lock );
+	packet = packet_create(length, addr_len, max_prefix, max_content, max_suffix);
+	fibril_mutex_unlock(&ps_globals.lock);
 	// remove debug dump
-//	printf( "packet %d created\n", packet->packet_id );
+//	printf("packet %d created\n", packet->packet_id);
 	return packet;
 }
 
-packet_t packet_create( size_t length, size_t addr_len, size_t max_prefix, size_t max_content, size_t max_suffix ){
+packet_t packet_create(size_t length, size_t addr_len, size_t max_prefix, size_t max_content, size_t max_suffix){
 	ERROR_DECLARE;
 
-	packet_t	packet;
+	packet_t packet;
 
 	// already locked
-	packet = ( packet_t ) mmap( NULL, length, PROTO_READ | PROTO_WRITE, MAP_SHARED | MAP_ANONYMOUS, 0, 0 );
-	if( packet == MAP_FAILED ) return NULL;
+	packet = (packet_t) mmap(NULL, length, PROTO_READ | PROTO_WRITE, MAP_SHARED | MAP_ANONYMOUS, 0, 0);
+	if(packet == MAP_FAILED){
+		return NULL;
+	}
 	++ ps_globals.count;
 	packet->packet_id = ps_globals.count;
 	packet->length = length;
-	packet_init( packet, addr_len, max_prefix, max_content, max_suffix );
+	packet_init(packet, addr_len, max_prefix, max_content, max_suffix);
 	packet->magic_value = PACKET_MAGIC_VALUE;
-	if( ERROR_OCCURRED( pm_add( packet ))){
-		munmap( packet, packet->length );
+	if(ERROR_OCCURRED(pm_add(packet))){
+		munmap(packet, packet->length);
 		return NULL;
 	}
@@ -292,7 +306,7 @@
 }
 
-void packet_init( packet_t packet, size_t addr_len, size_t max_prefix, size_t max_content, size_t max_suffix ){
+void packet_init(packet_t packet, size_t addr_len, size_t max_prefix, size_t max_content, size_t max_suffix){
 	// clear the packet content
-	bzero((( void * ) packet ) + sizeof( struct packet ), packet->length - sizeof( struct packet ));
+	bzero(((void *) packet) + sizeof(struct packet), packet->length - sizeof(struct packet));
 	// clear the packet header
 	packet->order = 0;
@@ -301,5 +315,5 @@
 	packet->next = 0;
 	packet->addr_len = 0;
-	packet->src_addr = sizeof( struct packet );
+	packet->src_addr = sizeof(struct packet);
 	packet->dest_addr = packet->src_addr + addr_len;
 	packet->max_prefix = max_prefix;
@@ -309,12 +323,16 @@
 }
 
-int packet_reply( const packet_t packet ){
-	ipc_callid_t	callid;
-	size_t			size;
-
-	if( ! packet_is_valid( packet )) return EINVAL;
-	if( async_share_in_receive( & callid, & size ) <= 0 ) return EINVAL;
-	if( size != packet->length ) return ENOMEM;
-	return async_share_in_finalize( callid, packet, PROTO_READ | PROTO_WRITE );
+int packet_reply(const packet_t packet){
+	ipc_callid_t callid;
+	size_t size;
+
+	if(! packet_is_valid(packet)){
+		return EINVAL;
+	}
+	if(async_share_in_receive(&callid, &size) <= 0) return EINVAL;
+	if(size != packet->length){
+		return ENOMEM;
+	}
+	return async_share_in_finalize(callid, packet, PROTO_READ | PROTO_WRITE);
 }
 
Index: uspace/srv/net/structures/packet/packet_server.h
===================================================================
--- uspace/srv/net/structures/packet/packet_server.h	(revision a000878c0dee83a08f032207ffd800c201fca95b)
+++ uspace/srv/net/structures/packet/packet_server.h	(revision aadf01ebd2c032bc8dd43a6e06ae5715e6c2710f)
@@ -56,5 +56,5 @@
  *  @returns Other error codes as defined for the packet_release_wrapper() function.
  */
-int	packet_server_message( ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count );
+int packet_server_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count);
 
 #endif
