Changeset 14f1db0 in mainline for uspace/srv/net/il/arp/arp.c
- Timestamp:
- 2010-04-09T12:54:57Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a1caa3c2
- Parents:
- 24ab58b3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/il/arp/arp.c
r24ab58b3 r14f1db0 57 57 #include <packet/packet.h> 58 58 #include <packet/packet_client.h> 59 #include <packet_remote.h> 59 60 #include <il_messages.h> 61 #include <il_interface.h> 62 #include <il_local.h> 60 63 #include <arp_messages.h> 61 64 … … 370 373 } 371 374 372 int arp_message(ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count){ 375 int arp_message_standalone(ipc_callid_t callid, ipc_call_t *call, 376 ipc_call_t *answer, int *answer_count) 377 { 373 378 ERROR_DECLARE; 374 379 375 380 measured_string_ref address; 376 381 measured_string_ref translation; … … 378 383 packet_t packet; 379 384 packet_t next; 380 381 // printf("message %d - %d\n", IPC_GET_METHOD(*call), NET_ARP_FIRST); 385 382 386 *answer_count = 0; 383 switch (IPC_GET_METHOD(*call)){387 switch (IPC_GET_METHOD(*call)) { 384 388 case IPC_M_PHONE_HUNGUP: 385 389 return EOK; … … 418 422 return EOK; 419 423 case NET_IL_RECEIVED: 420 if(! ERROR_OCCURRED(packet_translate (arp_globals.net_phone, &packet, IPC_GET_PACKET(call)))){424 if(! ERROR_OCCURRED(packet_translate_remote(arp_globals.net_phone, &packet, IPC_GET_PACKET(call)))){ 421 425 fibril_rwlock_read_lock(&arp_globals.lock); 422 426 do{ … … 424 428 ERROR_CODE = arp_receive_message(IPC_GET_DEVICE(call), packet); 425 429 if(ERROR_CODE != 1){ 426 pq_release (arp_globals.net_phone, packet_get_id(packet));430 pq_release_remote(arp_globals.net_phone, packet_get_id(packet)); 427 431 } 428 432 packet = next; … … 434 438 return arp_mtu_changed_message(IPC_GET_DEVICE(call), IPC_GET_MTU(call)); 435 439 } 440 436 441 return ENOTSUP; 437 442 } … … 570 575 return NULL; 571 576 } 572 packet = packet_get_4 (arp_globals.net_phone, device->packet_dimension.addr_len, device->packet_dimension.prefix, length, device->packet_dimension.suffix);577 packet = packet_get_4_remote(arp_globals.net_phone, device->packet_dimension.addr_len, device->packet_dimension.prefix, length, device->packet_dimension.suffix); 573 578 if(! packet){ 574 579 return NULL; … … 576 581 header = (arp_header_ref) packet_suffix(packet, length); 577 582 if(! header){ 578 pq_release (arp_globals.net_phone, packet_get_id(packet));583 pq_release_remote(arp_globals.net_phone, packet_get_id(packet)); 579 584 return NULL; 580 585 } … … 593 598 memcpy(((uint8_t *) header) + length, target->value, target->length); 594 599 if(packet_set_addr(packet, (uint8_t *) device->addr->value, (uint8_t *) device->broadcast_addr->value, CONVERT_SIZE(char, uint8_t, device->addr->length)) != EOK){ 595 pq_release (arp_globals.net_phone, packet_get_id(packet));600 pq_release_remote(arp_globals.net_phone, packet_get_id(packet)); 596 601 return NULL; 597 602 } … … 619 624 } 620 625 } 621 622 #ifdef CONFIG_NETWORKING_modular623 624 #include <il_standalone.h>625 626 626 627 /** Default thread for new connections. … … 650 651 651 652 /* Process the message */ 652 int res = il_module_message(callid, &call, &answer, &answer_count); 653 int res = il_module_message_standalone(callid, &call, &answer, 654 &answer_count); 653 655 654 656 /* End if said to either by the message or the processing result */ … … 675 677 676 678 /* Start the module */ 677 if (ERROR_OCCURRED(il_module_start (il_client_connection)))679 if (ERROR_OCCURRED(il_module_start_standalone(il_client_connection))) 678 680 return ERROR_CODE; 679 681 … … 681 683 } 682 684 683 #endif /* CONFIG_NETWORKING_modular */684 685 685 /** @} 686 686 */
Note:
See TracChangeset
for help on using the changeset viewer.