Changeset b4edc96 in mainline for uspace/srv/net/ethip/ethip_nic.c


Ignore:
Timestamp:
2021-08-08T09:20:20Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3e6bca8
Parents:
d5ed54b
Message:

Rename and move addr48_t to eth_addr_t

File:
1 edited

Legend:

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

    rd5ed54b rb4edc96  
    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         mac48_decode(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                         addr48_t mac_entry;
    410                         mac48_decode(mac_list[j].address, &mac_entry);
    411                         if (addr48_compare(&mac_entry, &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)) {
    412413                                found = true;
    413414                                break;
     
    416417
    417418                if (!found) {
    418                         mac48_encode(&mac, mac_list[i].address);
     419                        eth_addr_encode(&mac, mac_list[i].address);
    419420                        i++;
    420421                } else {
Note: See TracChangeset for help on using the changeset viewer.