Ignore:
File:
1 edited

Legend:

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

    rb4edc96 rfafb8e5  
    11/*
    2  * Copyright (c) 2021 Jiri Svoboda
     2 * Copyright (c) 2012 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    3737#include <adt/list.h>
    3838#include <async.h>
     39#include <stdbool.h>
    3940#include <errno.h>
     41#include <str_error.h>
    4042#include <fibril_synch.h>
    41 #include <inet/eth_addr.h>
    4243#include <inet/iplink_srv.h>
    4344#include <io/log.h>
    4445#include <loc.h>
     46#include <nic_iface.h>
     47#include <stdlib.h>
    4548#include <mem.h>
    46 #include <nic_iface.h>
    47 #include <stdbool.h>
    48 #include <stdlib.h>
    49 #include <str_error.h>
    5049#include "ethip.h"
    5150#include "ethip_nic.h"
     
    194193        }
    195194
    196         eth_addr_decode(nic_address.address, &nic->mac_addr);
     195        addr48(nic_address.address, nic->mac_addr);
    197196
    198197        rc = nic_set_state(nic->sess, NIC_STATE_ACTIVE);
     
    400399                assert(i < count);
    401400
    402                 eth_addr_t mac;
    403                 eth_addr_solicited_node(v6, &mac);
     401                addr48_t mac;
     402                addr48_solicited_node(v6, mac);
    404403
    405404                /* Avoid duplicate addresses in the list */
     
    408407
    409408                for (size_t j = 0; j < i; j++) {
    410                         eth_addr_t mac_entry;
    411                         eth_addr_decode(mac_list[j].address, &mac_entry);
    412                         if (eth_addr_compare(&mac_entry, &mac)) {
     409                        if (addr48_compare(mac_list[j].address, mac)) {
    413410                                found = true;
    414411                                break;
     
    417414
    418415                if (!found) {
    419                         eth_addr_encode(&mac, mac_list[i].address);
     416                        addr48(mac, mac_list[i].address);
    420417                        i++;
    421                 } else {
     418                } else
    422419                        count--;
    423                 }
    424420        }
    425421
Note: See TracChangeset for help on using the changeset viewer.