Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4349 → Rev 4350

/branches/network/uspace/srv/net/il/ip/ip_header.h
110,7 → 110,7
/** This field indicates the next level protocol used in the data portion of the internet datagram.
*/
uint8_t protocol;
/** A checksum on the header only.
/** A checksum of the header only.
* Since some header fields change (e.g., time to live), this is recomputed and verified at each point that the internet header is processed.
* The checksum algorithm is: The checksum field is the 16~bit one's complement of the one's complement sum of all 16~bit words in the header.
* For purposes of computing the checksum, the value of the checksum field is zero.
124,7 → 124,14
uint32_t destination_address;
} __attribute__ ((packed));
 
/** Type definition of the internet option header.
* @see ip_header
*/
typedef struct ip_option ip_option_t;
 
/** Type definition of the internet option header pointer.
* @see ip_header
*/
typedef ip_option * ip_option_ref;
 
/** Internet option header.
/branches/network/uspace/srv/net/il/ip/ip.c
91,7 → 91,7
return EOK;
}
 
int ip_device_req( int il_phone, device_id_t device_id, services_t service ){
int ip_device_req( int il_phone, device_id_t device_id, services_t netif ){
ERROR_DECLARE;
 
ip_netif_ref ip_netif;
149,9 → 149,9
}
net_free_settings( configuration, data );
}
ip_netif->phone = bind_service( service, ip_netif->device_id, SERVICE_IP, 0, ip_driver_receiver );
ip_netif->phone = bind_service( netif, ip_netif->device_id, SERVICE_IP, 0, ip_driver_receiver );
if( ip_netif->phone < 0 ){
printf( "Failed to contact the nil service %d\n", service );
printf( "Failed to contact the nil service %d\n", netif );
free( ip_netif );
return ip_netif->phone;
}
158,7 → 158,7
if( ip_netif->arp ){
configuration[ 0 ].value = ( char * ) & ip_netif->address;
configuration[ 0 ].length = CONVERT_SIZE( in_addr_t, char, 1 );
if( ERROR_OCCURRED( arp_device_req( ip_netif->arp->phone, ip_netif->device_id, SERVICE_IP, service, & configuration[ 0 ] ))){
if( ERROR_OCCURRED( arp_device_req( ip_netif->arp->phone, ip_netif->device_id, SERVICE_IP, netif, & configuration[ 0 ] ))){
free( ip_netif );
return ERROR_CODE;
}