Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/ethip/ethip_nic.c

    rfafb8e5 rb4edc96  
    11/*
    2  * Copyright (c) 2012 Jiri Svoboda
     2 * Copyright (c) 2021 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    3737#include <adt/list.h>
    3838#include <async.h>
    39 #include <stdbool.h>
    4039#include <errno.h>
    41 #include <str_error.h>
    4240#include <fibril_synch.h>
     41#include <inet/eth_addr.h>
    4342#include <inet/iplink_srv.h>
    4443#include <io/log.h>
    4544#include <loc.h>
     45#include <mem.h>
    4646#include <nic_iface.h>
     47#include <stdbool.h>
    4748#include <stdlib.h>
    48 #include <mem.h>
     49#include <str_error.h>
    4950#include "ethip.h"
    5051#include "ethip_nic.h"
     
    193194        }
    194195
    195         addr48(nic_address.address, nic->mac_addr);
     196        eth_addr_decode(nic_address.address, &nic->mac_addr);
    196197
    197198        rc = nic_set_state(nic->sess, NIC_STATE_ACTIVE);
     
    399400                assert(i < count);
    400401
    401                 addr48_t mac;
    402                 addr48_solicited_node(v6, mac);
     402                eth_addr_t mac;
     403                eth_addr_solicited_node(v6, &mac);
    403404
    404405                /* Avoid duplicate addresses in the list */
     
    407408
    408409                for (size_t j = 0; j < i; j++) {
    409                         if (addr48_compare(mac_list[j].address, mac)) {
     410                        eth_addr_t mac_entry;
     411                        eth_addr_decode(mac_list[j].address, &mac_entry);
     412                        if (eth_addr_compare(&mac_entry, &mac)) {
    410413                                found = true;
    411414                                break;
     
    414417
    415418                if (!found) {
    416                         addr48(mac, mac_list[i].address);
     419                        eth_addr_encode(&mac, mac_list[i].address);
    417420                        i++;
    418                 } else
     421                } else {
    419422                        count--;
     423                }
    420424        }
    421425
Note: See TracChangeset for help on using the changeset viewer.