Changeset 858fc90 in mainline for uspace/srv/net/il/arp/arp_remote.c


Ignore:
Timestamp:
2010-03-15T19:35:25Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6092b56e
Parents:
92307f1 (diff), 4684368 (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.
Message:

Merge from bzr://bzr.helenos.org/head.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/il/arp/arp_remote.c

    r92307f1 r858fc90  
    5252#include "arp_messages.h"
    5353
    54 int arp_device_req( int arp_phone, device_id_t device_id, services_t protocol, services_t netif, measured_string_ref address ){
    55         aid_t                   message_id;
    56         ipcarg_t                result;
    57 
    58         message_id = async_send_3( arp_phone, NET_ARP_DEVICE, ( ipcarg_t ) device_id, protocol, netif, NULL );
    59         measured_strings_send( arp_phone, address, 1 );
    60         async_wait_for( message_id, & result );
    61         return ( int ) result;
     54int arp_connect_module(services_t service){
     55        if(service != SERVICE_ARP){
     56                return EINVAL;
     57        }
     58        return connect_to_service(SERVICE_ARP);
    6259}
    6360
    64 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 ){
    65         return generic_translate_req( arp_phone, NET_ARP_TRANSLATE, device_id, protocol, address, 1, translation, data );
     61int arp_clean_cache_req(int arp_phone){
     62        return (int) async_req_0_0(arp_phone, NET_ARP_CLEAN_CACHE);
    6663}
    6764
    68 int arp_clear_device_req( int arp_phone, device_id_t device_id ){
    69         return ( int ) async_req_1_0( arp_phone, NET_ARP_CLEAR_DEVICE, ( ipcarg_t ) device_id );
     65int arp_clear_address_req(int arp_phone, device_id_t device_id, services_t protocol, measured_string_ref address){
     66        aid_t message_id;
     67        ipcarg_t result;
     68
     69        message_id = async_send_2(arp_phone, NET_ARP_CLEAR_ADDRESS, (ipcarg_t) device_id, protocol, NULL);
     70        measured_strings_send(arp_phone, address, 1);
     71        async_wait_for(message_id, &result);
     72        return (int) result;
    7073}
    7174
    72 int arp_clear_address_req( int arp_phone, device_id_t device_id, services_t protocol, measured_string_ref address ){
    73         aid_t                   message_id;
    74         ipcarg_t                result;
    75 
    76         message_id = async_send_2( arp_phone, NET_ARP_CLEAR_ADDRESS, ( ipcarg_t ) device_id, protocol, NULL );
    77         measured_strings_send( arp_phone, address, 1 );
    78         async_wait_for( message_id, & result );
    79         return ( int ) result;
     75int arp_clear_device_req(int arp_phone, device_id_t device_id){
     76        return (int) async_req_1_0(arp_phone, NET_ARP_CLEAR_DEVICE, (ipcarg_t) device_id);
    8077}
    8178
    82 int arp_clean_cache_req( int arp_phone ){
    83         return ( int ) async_req_0_0( arp_phone, NET_ARP_CLEAN_CACHE );
     79int arp_device_req(int arp_phone, device_id_t device_id, services_t protocol, services_t netif, measured_string_ref address){
     80        aid_t message_id;
     81        ipcarg_t result;
     82
     83        message_id = async_send_3(arp_phone, NET_ARP_DEVICE, (ipcarg_t) device_id, protocol, netif, NULL);
     84        measured_strings_send(arp_phone, address, 1);
     85        async_wait_for(message_id, &result);
     86        return (int) result;
    8487}
    8588
    86 int arp_connect_module( services_t service ){
    87         if( service != SERVICE_ARP ) return EINVAL;
    88         return connect_to_service( SERVICE_ARP );
     89task_id_t arp_task_get_id(void){
     90        return 0;
    8991}
    9092
    91 task_id_t arp_task_get_id( void ){
    92         return 0;
     93int arp_translate_req(int arp_phone, device_id_t device_id, services_t protocol, measured_string_ref address, measured_string_ref * translation, char ** data){
     94        return generic_translate_req(arp_phone, NET_ARP_TRANSLATE, device_id, protocol, address, 1, translation, data);
    9395}
    9496
Note: See TracChangeset for help on using the changeset viewer.