Changes in uspace/srv/net/il/arp/arp.c [4eca056:fb04cba8] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/il/arp/arp.c
r4eca056 rfb04cba8 83 83 * @param[in] device The device specific data. 84 84 */ 85 static void arp_clear_device(arp_device_ t *device)85 static void arp_clear_device(arp_device_ref device) 86 86 { 87 87 int count; 88 arp_proto_ t *proto;88 arp_proto_ref proto; 89 89 90 90 for (count = arp_protos_count(&device->protos) - 1; count >= 0; … … 105 105 { 106 106 int count; 107 arp_device_ t *device;107 arp_device_ref device; 108 108 109 109 fibril_rwlock_write_lock(&arp_globals.lock); … … 126 126 127 127 static int arp_clear_address_req(int arp_phone, device_id_t device_id, 128 services_t protocol, measured_string_ t *address)129 { 130 arp_device_ t *device;131 arp_proto_ t *proto;128 services_t protocol, measured_string_ref address) 129 { 130 arp_device_ref device; 131 arp_proto_ref proto; 132 132 133 133 fibril_rwlock_write_lock(&arp_globals.lock); … … 150 150 static int arp_clear_device_req(int arp_phone, device_id_t device_id) 151 151 { 152 arp_device_ t *device;152 arp_device_ref device; 153 153 154 154 fibril_rwlock_write_lock(&arp_globals.lock); … … 174 174 * @returns ENOMEM if there is not enough memory left. 175 175 */ 176 static int arp_proto_create(arp_proto_ t **proto, services_t service,177 measured_string_ t *address)176 static int arp_proto_create(arp_proto_ref *proto, services_t service, 177 measured_string_ref address) 178 178 { 179 179 int rc; 180 180 181 *proto = (arp_proto_ t *) malloc(sizeof(arp_proto_t));181 *proto = (arp_proto_ref) malloc(sizeof(arp_proto_t)); 182 182 if (!*proto) 183 183 return ENOMEM; … … 213 213 */ 214 214 static int arp_device_message(device_id_t device_id, services_t service, 215 services_t protocol, measured_string_ t *address)216 { 217 arp_device_ t *device;218 arp_proto_ t *proto;215 services_t protocol, measured_string_ref address) 216 { 217 arp_device_ref device; 218 arp_proto_ref proto; 219 219 hw_type_t hardware; 220 220 int index; … … 260 260 261 261 /* Create a new device */ 262 device = (arp_device_ t *) malloc(sizeof(arp_device_t));262 device = (arp_device_ref) malloc(sizeof(arp_device_t)); 263 263 if (!device) { 264 264 fibril_rwlock_write_unlock(&arp_globals.lock); … … 381 381 static int arp_mtu_changed_message(device_id_t device_id, size_t mtu) 382 382 { 383 arp_device_ t *device;383 arp_device_ref device; 384 384 385 385 fibril_rwlock_write_lock(&arp_globals.lock); … … 418 418 { 419 419 size_t length; 420 arp_header_ t *header;421 arp_device_ t *device;422 arp_proto_ t *proto;423 measured_string_ t *hw_source;420 arp_header_ref header; 421 arp_device_ref device; 422 arp_proto_ref proto; 423 measured_string_ref hw_source; 424 424 uint8_t *src_hw; 425 425 uint8_t *src_proto; … … 436 436 return ENOENT; 437 437 438 header = (arp_header_ t *) packet_get_data(packet);438 header = (arp_header_ref) packet_get_data(packet); 439 439 if ((ntohs(header->hardware) != device->hardware) || 440 440 (length < sizeof(arp_header_t) + header->hardware_length * 2U + … … 523 523 * @returns NULL if the hardware address is not found in the cache. 524 524 */ 525 static measured_string_ t *525 static measured_string_ref 526 526 arp_translate_message(device_id_t device_id, services_t protocol, 527 measured_string_ t *target)528 { 529 arp_device_ t *device;530 arp_proto_ t *proto;531 measured_string_ t *addr;527 measured_string_ref target) 528 { 529 arp_device_ref device; 530 arp_proto_ref proto; 531 measured_string_ref addr; 532 532 size_t length; 533 533 packet_t packet; 534 arp_header_ t *header;534 arp_header_ref header; 535 535 536 536 if (!target) … … 561 561 return NULL; 562 562 563 header = (arp_header_ t *) packet_suffix(packet, length);563 header = (arp_header_ref) packet_suffix(packet, length); 564 564 if (!header) { 565 565 pq_release_remote(arp_globals.net_phone, packet_get_id(packet)); … … 612 612 ipc_call_t *answer, int *answer_count) 613 613 { 614 measured_string_ t *address;615 measured_string_ t *translation;614 measured_string_ref address; 615 measured_string_ref translation; 616 616 char *data; 617 617 packet_t packet;
Note:
See TracChangeset
for help on using the changeset viewer.