Changeset 8a9a41e in mainline for uspace/srv/net/ethip/pdu.c


Ignore:
Timestamp:
2021-10-24T08:28:43Z (3 years ago)
Author:
GitHub <noreply@…>
Children:
f628215
Parents:
2ce943a (diff), cd981f2a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Erik Kučák <35500848+Riko196@…> (2021-10-24 08:28:43)
git-committer:
GitHub <noreply@…> (2021-10-24 08:28:43)
Message:

Merge branch 'HelenOS:master' into master

File:
1 edited

Legend:

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

    r2ce943a r8a9a41e  
    11/*
    2  * Copyright (c) 2012 Jiri Svoboda
     2 * Copyright (c) 2021 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    6060
    6161        hdr = (eth_header_t *)data;
    62         addr48(frame->src, hdr->src);
    63         addr48(frame->dest, hdr->dest);
     62        eth_addr_encode(&frame->src, hdr->src);
     63        eth_addr_encode(&frame->dest, hdr->dest);
    6464        hdr->etype_len = host2uint16_t_be(frame->etype_len);
    6565
     
    9393                return ENOMEM;
    9494
    95         addr48(hdr->src, frame->src);
    96         addr48(hdr->dest, frame->dest);
     95        eth_addr_decode(hdr->src, &frame->src);
     96        eth_addr_decode(hdr->dest, &frame->dest);
    9797        frame->etype_len = uint16_t_be2host(hdr->etype_len);
    9898
     
    140140        pfmt->proto_addr_size = IPV4_ADDR_SIZE;
    141141        pfmt->opcode = host2uint16_t_be(fopcode);
    142         addr48(packet->sender_hw_addr, pfmt->sender_hw_addr);
     142        eth_addr_encode(&packet->sender_hw_addr, pfmt->sender_hw_addr);
    143143        pfmt->sender_proto_addr =
    144144            host2uint32_t_be(packet->sender_proto_addr);
    145         addr48(packet->target_hw_addr, pfmt->target_hw_addr);
     145        eth_addr_encode(&packet->target_hw_addr, pfmt->target_hw_addr);
    146146        pfmt->target_proto_addr =
    147147            host2uint32_t_be(packet->target_proto_addr);
     
    203203        }
    204204
    205         addr48(pfmt->sender_hw_addr, packet->sender_hw_addr);
     205        eth_addr_decode(pfmt->sender_hw_addr, &packet->sender_hw_addr);
    206206        packet->sender_proto_addr =
    207207            uint32_t_be2host(pfmt->sender_proto_addr);
    208         addr48(pfmt->target_hw_addr, packet->target_hw_addr);
     208        eth_addr_decode(pfmt->target_hw_addr, &packet->target_hw_addr);
    209209        packet->target_proto_addr =
    210210            uint32_t_be2host(pfmt->target_proto_addr);
Note: See TracChangeset for help on using the changeset viewer.