Changeset 79ae36dd in mainline for uspace/lib/net/il/ip_remote.c


Ignore:
Timestamp:
2011-06-08T19:01:55Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0eff68e
Parents:
764d71e
Message:

new async framework with integrated exchange tracking

  • strict isolation between low-level IPC and high-level async framework with integrated exchange tracking
    • each IPC connection is represented by an async_sess_t structure
    • each IPC exchange is represented by an async_exch_t structure
    • exchange management is either based on atomic messages (EXCHANGE_ATOMIC), locking (EXCHANGE_SERIALIZE) or connection cloning (EXCHANGE_CLONE)
  • async_obsolete: temporary compatibility layer to keep old async clients working (several pieces of code are currently broken, but only non-essential functionality)
  • IPC_M_PHONE_HANGUP is now method no. 0 (for elegant boolean evaluation)
  • IPC_M_DEBUG_ALL has been renamed to IPC_M_DEBUG
  • IPC_M_PING has been removed (VFS protocol now has VFS_IN_PING)
  • console routines in libc have been rewritten for better abstraction
  • additional use for libc-private header files (FILE structure opaque to the client)
  • various cstyle changes (typos, indentation, missing externs in header files, improved comments, etc.)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/net/il/ip_remote.c

    r764d71e r79ae36dd  
    4444#include <packet_client.h>
    4545#include <generic.h>
    46 
     46#include <async_obsolete.h>
    4747#include <ipc/services.h>
    4848#include <ipc/il.h>
     
    6666    in_addr_t address, in_addr_t netmask, in_addr_t gateway)
    6767{
    68         return (int) async_req_4_0(ip_phone, NET_IP_ADD_ROUTE,
     68        return (int) async_obsolete_req_4_0(ip_phone, NET_IP_ADD_ROUTE,
    6969            (sysarg_t) device_id, (sysarg_t) gateway.s_addr,
    7070            (sysarg_t) address.s_addr, (sysarg_t) netmask.s_addr);
     
    150150       
    151151        ipc_call_t answer;
    152         aid_t message_id = async_send_1(ip_phone, NET_IP_GET_ROUTE,
     152        aid_t message_id = async_obsolete_send_1(ip_phone, NET_IP_GET_ROUTE,
    153153            (sysarg_t) protocol, &answer);
    154154       
    155         if ((async_data_write_start(ip_phone, destination, addrlen) == EOK) &&
    156             (async_data_read_start(ip_phone, headerlen,
     155        if ((async_obsolete_data_write_start(ip_phone, destination, addrlen) == EOK) &&
     156            (async_obsolete_data_read_start(ip_phone, headerlen,
    157157            sizeof(*headerlen)) == EOK) && (*headerlen > 0)) {
    158158                *header = malloc(*headerlen);
    159159                if (*header) {
    160                         if (async_data_read_start(ip_phone, *header,
     160                        if (async_obsolete_data_read_start(ip_phone, *header,
    161161                            *headerlen) != EOK)
    162162                                free(*header);
     
    243243    in_addr_t gateway)
    244244{
    245         return (int) async_req_2_0(ip_phone, NET_IP_SET_GATEWAY,
     245        return (int) async_obsolete_req_2_0(ip_phone, NET_IP_SET_GATEWAY,
    246246            (sysarg_t) device_id, (sysarg_t) gateway.s_addr);
    247247}
Note: See TracChangeset for help on using the changeset viewer.