Changeset f14291b in mainline for uspace/srv/net/il/arp/arp.c
- Timestamp:
- 2010-10-19T20:55:53Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a93d79a
- Parents:
- 1882525 (diff), a7a85d16 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/il/arp/arp.c
r1882525 rf14291b 45 45 #include <ipc/ipc.h> 46 46 #include <ipc/services.h> 47 48 #include <net_err.h> 49 #include <net_messages.h> 50 #include <net_modules.h> 51 #include <net_byteorder.h> 52 #include <net_device.h> 47 #include <ipc/net.h> 48 #include <ipc/arp.h> 49 #include <ipc/il.h> 50 #include <byteorder.h> 51 #include <err.h> 52 53 #include <net/modules.h> 54 #include <net/device.h> 53 55 #include <arp_interface.h> 54 56 #include <nil_interface.h> 55 57 #include <protocol_map.h> 56 58 #include <adt/measured_strings.h> 57 #include < packet/packet.h>58 #include <packet /packet_client.h>59 #include <net/packet.h> 60 #include <packet_client.h> 59 61 #include <packet_remote.h> 60 #include <il_messages.h>61 62 #include <il_interface.h> 62 63 #include <il_local.h> 63 #include <arp_messages.h>64 64 65 65 #include "arp.h" … … 227 227 printf("Device %d cleared\n", device_id); 228 228 fibril_rwlock_write_unlock(&arp_globals.lock); 229 return EOK;230 }231 232 int arp_connect_module(services_t service){233 if(service != SERVICE_ARP){234 return EINVAL;235 }236 229 return EOK; 237 230 } … … 543 536 } 544 537 545 task_id_t arp_task_get_id(void){546 return task_get_id();547 }548 549 538 measured_string_ref arp_translate_message(device_id_t device_id, services_t protocol, measured_string_ref target){ 550 539 arp_device_ref device; … … 603 592 nil_send_msg(device->phone, device_id, packet, SERVICE_ARP); 604 593 return NULL; 605 }606 607 int arp_translate_req(int arp_phone, device_id_t device_id, services_t protocol, measured_string_ref address, measured_string_ref * translation, char ** data){608 measured_string_ref tmp;609 610 fibril_rwlock_read_lock(&arp_globals.lock);611 tmp = arp_translate_message(device_id, protocol, address);612 if(tmp){613 *translation = measured_string_copy(tmp);614 fibril_rwlock_read_unlock(&arp_globals.lock);615 if(*translation){616 *data = (** translation).value;617 return EOK;618 }else{619 return ENOMEM;620 }621 }else{622 fibril_rwlock_read_unlock(&arp_globals.lock);623 return ENOENT;624 }625 594 } 626 595
Note:
See TracChangeset
for help on using the changeset viewer.