Changeset 61bfc370 in mainline for uspace/srv/net/il/arp/arp.c
- Timestamp:
- 2011-01-07T18:57:55Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e08a733
- Parents:
- 7c34b28f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/il/arp/arp.c
r7c34b28f r61bfc370 215 215 (*proto)->service = service; 216 216 (*proto)->addr = address; 217 (*proto)->addr_data = (uint8_t *)address->value;217 (*proto)->addr_data = address->value; 218 218 219 219 rc = arp_addr_initialize(&(*proto)->addresses); … … 267 267 free(proto->addr_data); 268 268 proto->addr = address; 269 proto->addr_data = (uint8_t *)address->value;269 proto->addr_data = address->value; 270 270 } else { 271 271 rc = arp_proto_create(&proto, protocol, address); … … 482 482 des_hw = src_proto + header->protocol_length; 483 483 des_proto = des_hw + header->hardware_length; 484 trans = arp_addr_find(&proto->addresses, (char *)src_proto,484 trans = arp_addr_find(&proto->addresses, src_proto, 485 485 header->protocol_length); 486 486 /* Exists? */ … … 493 493 if (proto->addr->length != header->protocol_length) 494 494 return EINVAL; 495 if (!str_lcmp(proto->addr->value, (char *) des_proto,496 495 496 if (!bcmp(proto->addr->value, des_proto, proto->addr->length)) { 497 497 /* Not already updated? */ 498 498 if (!trans) { … … 502 502 trans->hw_addr = NULL; 503 503 fibril_condvar_initialize(&trans->cv); 504 rc = arp_addr_add(&proto->addresses, (char *)src_proto,504 rc = arp_addr_add(&proto->addresses, src_proto, 505 505 header->protocol_length, trans); 506 506 if (rc != EOK) { … … 510 510 } 511 511 if (!trans->hw_addr) { 512 trans->hw_addr = measured_string_create_bulk( 513 (char *) src_hw,header->hardware_length);512 trans->hw_addr = measured_string_create_bulk(src_hw, 513 header->hardware_length); 514 514 if (!trans->hw_addr) 515 515 return ENOMEM; 516 516 517 517 /* Notify the fibrils that wait for the translation. */ 518 518 fibril_condvar_broadcast(&trans->cv); … … 681 681 measured_string_t *address; 682 682 measured_string_t *translation; 683 char*data;683 uint8_t *data; 684 684 packet_t *packet; 685 685 packet_t *next; … … 748 748 749 749 case NET_IL_RECEIVED: 750 750 751 rc = packet_translate_remote(arp_globals.net_phone, &packet, 751 752 IPC_GET_PACKET(call));
Note:
See TracChangeset
for help on using the changeset viewer.