Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4242 → Rev 4243

/branches/network/uspace/srv/net/structures/packet/packet_client.c
118,17 → 118,17
size_t padding;
 
if( ! packet_is_valid( packet )) return EINVAL;
if( packet->addr_len >= addr_len ) return ENOMEM;
if( packet->addr_len < addr_len ) return ENOMEM;
padding = packet->addr_len - addr_len;
if( src ){
memcpy(( void * ) packet + packet->src_addr, src, addr_len );
bzero(( void * ) packet + packet->src_addr + addr_len, padding );
if( padding ) bzero(( void * ) packet + packet->src_addr + addr_len, padding );
}else{
bzero(( void * ) packet + packet->src_addr + addr_len, packet->addr_len );
}
if( dest ){
memcpy(( void * ) packet + packet->dest_addr, dest, addr_len );
bzero(( void * ) packet + packet->dest_addr + addr_len, padding );
if( padding ) bzero(( void * ) packet + packet->dest_addr + addr_len, padding );
}else{
bzero(( void * ) packet + packet->dest_addr + addr_len, packet->addr_len );
}
173,7 → 173,7
unsigned int size;
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, ( ipcarg_t * ) & packet_id, & size ))
|| ERROR_OCCURRED( packet_return( phone, & packet, packet_id, size ))){
return NULL;
}
187,7 → 187,7
unsigned int 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, ( ipcarg_t * ) & packet_id, & size ))
|| ERROR_OCCURRED( packet_return( phone, & packet, packet_id, size ))){
return NULL;
}