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

    rd5ed54b rb4edc96  
    3737#include <errno.h>
    3838#include <inet/addr.h>
     39#include <inet/eth_addr.h>
    3940#include <stdio.h>
    4041#include <stddef.h>
     
    5455const addr32_t addr32_broadcast_all_hosts = 0xffffffff;
    5556
    56 const addr48_t addr48_broadcast = {
    57         0xff, 0xff, 0xff, 0xff, 0xff, 0xff
    58 };
    59 
    60 static const addr48_t inet_addr48_solicited_node = {
     57static const eth_addr_t inet_eth_addr_solicited_node = {
    6158        0x33, 0x33, 0xff, 0, 0, 0
    6259};
     
    7774}
    7875
    79 /** Compare addr48.
    80  *
    81  * @return Non-zero if equal, zero if not equal.
    82  */
    83 int addr48_compare(const addr48_t *a, const addr48_t *b)
    84 {
    85         return memcmp(a->b, b->b, 6) == 0;
    86 }
    87 
    8876/** Compare addr128.
    8977 *
     
    10189 *
    10290 */
    103 void addr48_solicited_node(const addr128_t ip, addr48_t *mac)
    104 {
    105         memcpy(&mac->b[0], &inet_addr48_solicited_node.b[0], 3);
     91void eth_addr_solicited_node(const addr128_t ip, eth_addr_t *mac)
     92{
     93        memcpy(&mac->b[0], &inet_eth_addr_solicited_node.b[0], 3);
    10694        memcpy(&mac->b[3], ip + 13, 3);
    10795}
Note: See TracChangeset for help on using the changeset viewer.