Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4588 → Rev 4589

/branches/network/uspace/srv/net/il/ip/ip_client.c
67,5 → 67,22
return EOK;
}
 
int ip_client_process_packet( packet_t packet, ip_protocol_t * protocol, ip_ttl_t * ttl, ip_tos_t * tos, int * dont_fragment, size_t * ipopt_length ){
ip_header_ref header;
 
header = ( ip_header_ref ) packet_get_data( packet );
if( ! header ) return ENOMEM;
if( protocol ) * protocol = header->protocol;
if( ttl ) * ttl = header->ttl;
if( tos ) * tos = header->tos;
if( dont_fragment ) * dont_fragment = header->flags & IPFLAG_DONT_FRAGMENT;
if( ipopt_length ){
* ipopt_length = header->ihl * 4 - sizeof( ip_header_t );
return packet_trim( packet, sizeof( ip_header_t ), 0 );
}else{
return packet_trim( packet, header->ihl * 4, 0 );
}
}
 
/** @}
*/