Ignore:
File:
1 edited

Legend:

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

    rf9b2cb4c rd8b47eca  
    11/*
    2  * Copyright (c) 2013 Jiri Svoboda
     2 * Copyright (c) 2012 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    3030#include <assert.h>
    3131#include <errno.h>
     32#include <net/socket_codes.h>
    3233#include <inet/inet.h>
    3334#include <ipc/inet.h>
    3435#include <ipc/services.h>
    3536#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        
    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        
     50        int rc = async_connect_to_me(exch, 0, 0, 0, inet_cb_conn, NULL);
    5551        async_exchange_end(exch);
    5652       
     
    8783                return ENOENT;
    8884       
    89         inet_sess = loc_service_connect(inet_svc, INTERFACE_INET,
     85        inet_sess = loc_service_connect(EXCHANGE_SERIALIZE, inet_svc,
    9086            IPC_FLAG_BLOCKING);
    9187        if (inet_sess == NULL)
     
    115111       
    116112        ipc_call_t answer;
    117         aid_t req = async_send_4(exch, INET_SEND, dgram->iplink, dgram->tos,
    118             ttl, df, &answer);
     113        aid_t req = async_send_3(exch, INET_SEND, dgram->tos, ttl, df,
     114            &answer);
    119115       
    120116        int rc = async_data_write_start(exch, &dgram->src, sizeof(inet_addr_t));
     
    181177       
    182178        dgram.tos = IPC_GET_ARG1(*icall);
    183         dgram.iplink = IPC_GET_ARG2(*icall);
    184179       
    185180        ipc_callid_t callid;
     
    230225       
    231226        rc = inet_ev_ops->recv(&dgram);
    232         free(dgram.data);
    233227        async_answer_0(iid, rc);
    234228}
Note: See TracChangeset for help on using the changeset viewer.