282,8 → 282,8 |
free( proto ); |
return index; |
} |
printf( "New protocol added:\n\tdevice id\t= %d\n\tproto\t= %d", device_id, protocol ); |
} |
printf( "Cache of the existing device %d cleaned\n", device->device_id ); |
}else{ |
index = hardware_map( service ); |
if( ! index ) return ENOENT; |
350,7 → 350,7 |
free( device ); |
return ERROR_CODE; |
} |
printf( "New device registered:\n\tid\t= %d\n\ttype\t= 0x%x\n\tservice\t= %d\n", device->device_id, device->hardware, device->service ); |
printf( "New device registered:\n\tid\t= %d\n\ttype\t= 0x%x\n\tservice\t= %d\n\tproto\t= %d\n", device->device_id, device->hardware, device->service, protocol ); |
} |
rwlock_write_unlock( & arp_globals.lock ); |
return EOK; |
432,7 → 432,7 |
memcpy( hw_source->value, src_hw, hw_source->length ); |
} |
// is my protocol address? |
if( proto->addr->length != CONVERT_SIZE( uint8_t, char, header->hardware_length )){ |
if( proto->addr->length != CONVERT_SIZE( uint8_t, char, header->protocol_length )){ |
return EINVAL; |
} |
if( ! str_lcmp( proto->addr->value, ( char * ) des_proto, proto->addr->length )){ |
446,7 → 446,7 |
header->operation = htons( ARPOP_REPLY ); |
memcpy( des_proto, src_proto, header->protocol_length ); |
memcpy( src_proto, proto->addr->value, header->protocol_length ); |
memcpy( src_hw, des_hw, header->hardware_length ); |
memcpy( src_hw, device->addr->value, device->addr_len ); |
memcpy( des_hw, hw_source->value, header->hardware_length ); |
packet_set_addr( packet, src_hw, des_hw, header->hardware_length ); |
nil_send_msg( device->phone, device_id, packet, SERVICE_ARP ); |