Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/dhcp/dhcp.c

    r8d58fca r3e6bca8  
    11/*
    2  * Copyright (c) 2013 Jiri Svoboda
     2 * Copyright (c) 2021 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    4242#include <fibril_synch.h>
    4343#include <inet/addr.h>
     44#include <inet/eth_addr.h>
    4445#include <inet/dnsr.h>
    4546#include <inet/inetcfg.h>
     
    157158        hdr->op = op_bootrequest;
    158159        hdr->htype = 1; /* AHRD_ETHERNET */
    159         hdr->hlen = sizeof(addr48_t);
     160        hdr->hlen = ETH_ADDR_SIZE;
    160161        hdr->xid = host2uint32_t_be(42);
    161162        hdr->flags = flag_broadcast;
    162163
    163         addr48(dlink->link_info.mac_addr, hdr->chaddr);
     164        eth_addr_encode(&dlink->link_info.mac_addr, hdr->chaddr);
    164165        hdr->opt_magic = host2uint32_t_be(dhcp_opt_magic);
    165166
     
    185186        hdr->flags = flag_broadcast;
    186187        hdr->ciaddr = host2uint32_t_be(offer->oaddr.addr);
    187         addr48(dlink->link_info.mac_addr, hdr->chaddr);
     188        eth_addr_encode(&dlink->link_info.mac_addr, hdr->chaddr);
    188189        hdr->opt_magic = host2uint32_t_be(dhcp_opt_magic);
    189190
Note: See TracChangeset for help on using the changeset viewer.