Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/inet/src/iplink.c

    redeee9f rec7902d  
    11/*
    2  * Copyright (c) 2021 Jiri Svoboda
     2 * Copyright (c) 2012 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup libinet
     29/** @addtogroup libc
    3030 * @{
    3131 */
     
    3838#include <assert.h>
    3939#include <errno.h>
     40#include <inet/iplink.h>
    4041#include <inet/addr.h>
    41 #include <inet/eth_addr.h>
    42 #include <inet/iplink.h>
    4342#include <ipc/iplink.h>
    4443#include <ipc/services.h>
     
    116115        aid_t req = async_send_0(exch, IPLINK_SEND6, &answer);
    117116
    118         errno_t rc = async_data_write_start(exch, &sdu->dest, sizeof(eth_addr_t));
     117        errno_t rc = async_data_write_start(exch, &sdu->dest, sizeof(addr48_t));
    119118        if (rc != EOK) {
    120119                async_exchange_end(exch);
     
    154153}
    155154
    156 errno_t iplink_get_mac48(iplink_t *iplink, eth_addr_t *mac)
     155errno_t iplink_get_mac48(iplink_t *iplink, addr48_t *mac)
    157156{
    158157        async_exch_t *exch = async_exchange_begin(iplink->sess);
     
    161160        aid_t req = async_send_0(exch, IPLINK_GET_MAC48, &answer);
    162161
    163         errno_t rc = async_data_read_start(exch, mac, sizeof(eth_addr_t));
     162        errno_t rc = async_data_read_start(exch, mac, sizeof(addr48_t));
    164163
    165164        loc_exchange_end(exch);
     
    176175}
    177176
    178 errno_t iplink_set_mac48(iplink_t *iplink, eth_addr_t *mac)
     177errno_t iplink_set_mac48(iplink_t *iplink, addr48_t mac)
    179178{
    180179        async_exch_t *exch = async_exchange_begin(iplink->sess);
     
    183182        aid_t req = async_send_0(exch, IPLINK_GET_MAC48, &answer);
    184183
    185         errno_t rc = async_data_read_start(exch, mac, sizeof(eth_addr_t));
     184        errno_t rc = async_data_read_start(exch, mac, sizeof(addr48_t));
    186185
    187186        loc_exchange_end(exch);
     
    265264static void iplink_ev_change_addr(iplink_t *iplink, ipc_call_t *icall)
    266265{
    267         eth_addr_t *addr;
     266        addr48_t *addr;
    268267        size_t size;
    269268
    270269        errno_t rc = async_data_write_accept((void **) &addr, false,
    271             sizeof(eth_addr_t), sizeof(eth_addr_t), 0, &size);
     270            sizeof(addr48_t), sizeof(addr48_t), 0, &size);
    272271        if (rc != EOK) {
    273272                async_answer_0(icall, rc);
     
    275274        }
    276275
    277         rc = iplink->ev_ops->change_addr(iplink, addr);
     276        rc = iplink->ev_ops->change_addr(iplink, *addr);
    278277        free(addr);
    279278        async_answer_0(icall, EOK);
Note: See TracChangeset for help on using the changeset viewer.