Changeset b4edc96 in mainline for uspace/lib/inet/src/eth_addr.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/lib/inet/src/eth_addr.c

    rd5ed54b rb4edc96  
    3838#include <mem.h>
    3939
    40 void mac48_encode(addr48_t *addr, void *buf)
     40const eth_addr_t eth_addr_broadcast = {
     41        0xff, 0xff, 0xff, 0xff, 0xff, 0xff
     42};
     43
     44void eth_addr_encode(eth_addr_t *addr, void *buf)
    4145{
    4246        uint8_t *bp = (uint8_t *)buf;
     
    4549}
    4650
    47 void mac48_decode(const void *buf, addr48_t *addr)
     51void eth_addr_decode(const void *buf, eth_addr_t *addr)
    4852{
    4953        const uint8_t *bp = (uint8_t *)buf;
     
    5256}
    5357
     58/** Compare ethernet addresses.
     59 *
     60 * @return Non-zero if equal, zero if not equal.
     61 */
     62int eth_addr_compare(const eth_addr_t *a, const eth_addr_t *b)
     63{
     64        return memcmp(a->b, b->b, ETH_ADDR_SIZE) == 0;
     65}
     66
    5467/** @}
    5568 */
Note: See TracChangeset for help on using the changeset viewer.