Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4742 → Rev 4743

/branches/network/uspace/srv/net/structures/packet/packet.h
52,23 → 52,6
*/
typedef packet_t * packet_ref;
 
/** Type of the received packet.
*/
enum packet_type{
/** The packet is from the local subsystem.
*/
PACKET_SELF,
/** The packet is for all hosts.
*/
PACKET_BROADCAST,
/** The packet target complies with the local subsystem filter.
*/
PACKET_MULTICAST,
/** The packet is for the local subsystem from other host.
*/
PACKET_OTHERHOST
};
 
/** @name Packet management system interface
*/
/*@{*/
/branches/network/uspace/srv/net/structures/packet/packet_server.c
223,6 → 223,8
void packet_release( packet_t packet ){
int index;
 
// 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 );
ps_globals.free[ index ] = pq_add( ps_globals.free[ index ], packet, packet->length, packet->length );
assert( ps_globals.free[ index ] );
249,6 → 251,8
}
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 );
return packet;
}
}
255,6 → 259,8
}
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 );
return packet;
}