Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/inet.c

    rd8b47eca rf9b2cb4c  
    11/*
    2  * Copyright (c) 2012 Jiri Svoboda
     2 * Copyright (c) 2013 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    3030#include <assert.h>
    3131#include <errno.h>
    32 #include <net/socket_codes.h>
    3332#include <inet/inet.h>
    3433#include <ipc/inet.h>
    3534#include <ipc/services.h>
    3635#include <loc.h>
     36#include <stdlib.h>
    3737
    3838static void inet_cb_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg);
     
    4848        ipc_call_t answer;
    4949        aid_t req = async_send_0(exch, INET_CALLBACK_CREATE, &answer);
    50         int rc = async_connect_to_me(exch, 0, 0, 0, inet_cb_conn, NULL);
     50       
     51        port_id_t port;
     52        int rc = async_create_callback_port(exch, INTERFACE_INET_CB, 0, 0,
     53            inet_cb_conn, NULL, &port);
     54       
    5155        async_exchange_end(exch);
    5256       
     
    8387                return ENOENT;
    8488       
    85         inet_sess = loc_service_connect(EXCHANGE_SERIALIZE, inet_svc,
     89        inet_sess = loc_service_connect(inet_svc, INTERFACE_INET,
    8690            IPC_FLAG_BLOCKING);
    8791        if (inet_sess == NULL)
     
    111115       
    112116        ipc_call_t answer;
    113         aid_t req = async_send_3(exch, INET_SEND, dgram->tos, ttl, df,
    114             &answer);
     117        aid_t req = async_send_4(exch, INET_SEND, dgram->iplink, dgram->tos,
     118            ttl, df, &answer);
    115119       
    116120        int rc = async_data_write_start(exch, &dgram->src, sizeof(inet_addr_t));
     
    177181       
    178182        dgram.tos = IPC_GET_ARG1(*icall);
     183        dgram.iplink = IPC_GET_ARG2(*icall);
    179184       
    180185        ipc_callid_t callid;
     
    225230       
    226231        rc = inet_ev_ops->recv(&dgram);
     232        free(dgram.data);
    227233        async_answer_0(iid, rc);
    228234}
Note: See TracChangeset for help on using the changeset viewer.