luid.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Freie Universität Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
53 #ifndef LUID_H
54 #define LUID_H
55 
56 #include <stddef.h>
57 
58 #include "net/eui48.h"
59 #include "net/eui64.h"
60 #include "net/netdev.h"
61 
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
65 
70 #ifndef LUID_BACKUP_SEED
71 #define LUID_BACKUP_SEED 0x23
72 #endif
73 
89 void luid_get(void *buf, size_t len);
90 
104 void luid_get_lb(void *buf, size_t len);
105 
117 void luid_get_short(network_uint16_t *addr);
118 
129 void luid_get_eui48(eui48_t *addr);
130 
142 void luid_netdev_get_eui48(const netdev_t *netdev, eui48_t *addr);
143 
154 void luid_get_eui64(eui64_t *addr);
155 
167 void luid_netdev_get_eui64(const netdev_t *netdev, eui64_t *addr);
168 
183 void luid_custom(void *buf, size_t len, int gen);
184 
196 void luid_base(void *buf, size_t len);
197 
198 #ifdef __cplusplus
199 }
200 #endif
201 
202 #endif /* LUID_H */
203 
luid_custom
void luid_custom(void *buf, size_t len, int gen)
Get a custom unique ID based on a user given generator value.
luid_get_eui64
void luid_get_eui64(eui64_t *addr)
Get a unique EUI64 address.
be_uint16_t
A 16 bit integer in big endian aka network byte order.
Definition: byteorder.h:77
luid_netdev_get_eui64
void luid_netdev_get_eui64(const netdev_t *netdev, eui64_t *addr)
Get a unique EUI64 address.
eui48_t
Data type to represent an EUI-48.
Definition: eui48.h:35
luid_get
void luid_get(void *buf, size_t len)
Get a unique ID.
luid_get_eui48
void luid_get_eui48(eui48_t *addr)
Get a unique EUI48 address.
luid_get_short
void luid_get_short(network_uint16_t *addr)
Get a unique short unicast address.
netdev.h
Definitions low-level network driver interface.
luid_netdev_get_eui48
void luid_netdev_get_eui48(const netdev_t *netdev, eui48_t *addr)
Get a unique EUI48 address.
netdev
Structure to hold driver state.
Definition: netdev.h:302
eui64_t
Data type to represent an EUI-64.
Definition: eui64.h:55
eui64.h
EUI-64 data type definition.
luid_get_lb
void luid_get_lb(void *buf, size_t len)
Get a unique ID with change in the last byte.
luid_base
void luid_base(void *buf, size_t len)
Get a LUID base value.
eui48.h
Definition and IPv6 IID conversion for IEEE EUI-48 identifiers.