Loading...
Searching...
No Matches
IEEE EUI-48 identifier

Definition and IPv6 IID conversion for IEEE EUI-48 identifiers. More...

Detailed Description

Definition and IPv6 IID conversion for IEEE EUI-48 identifiers.

Files

file  eui48.h
 Definition and IPv6 IID conversion for IEEE EUI-48 identifiers.
 

Data Structures

struct  eui48_t
 Data type to represent an EUI-48. More...
 

Functions

static void eui48_set_local (eui48_t *addr)
 Set the locally administrated bit in the EUI-48 address.
 
static void eui48_clear_group (eui48_t *addr)
 Clear the group address bit to signal the address as individual address.
 
static void eui48_to_eui64 (eui64_t *eui64, const eui48_t *addr)
 Generates an EUI-64 from a 48-bit device address.
 
static void eui64_to_eui48 (eui48_t *eui48, const eui64_t *addr)
 Generates an EUI-48 from a 64-bit device address.
 
static void eui48_to_ipv6_iid (eui64_t *iid, const eui48_t *addr)
 Generates an IPv6 interface identifier from a 48-bit device address.
 
static void eui48_from_ipv6_iid (eui48_t *addr, const eui64_t *iid)
 Convert a 64-bit IPv6 IID into a EUI-48 device address.
 

EUI-48 bit flags contained in the first octet

See also
IEEE 802-2001 section 9.2
#define EUI48_LOCAL_FLAG   0x02
 Locally administered address.
 
#define EUI48_GROUP_FLAG   0x01
 Group type address.
 

Macro Definition Documentation

◆ EUI48_GROUP_FLAG

#define EUI48_GROUP_FLAG   0x01

Group type address.

Definition at line 54 of file eui48.h.

◆ EUI48_LOCAL_FLAG

#define EUI48_LOCAL_FLAG   0x02

Locally administered address.

Definition at line 49 of file eui48.h.

Function Documentation

◆ eui48_clear_group()

static void eui48_clear_group ( eui48_t addr)
inlinestatic

Clear the group address bit to signal the address as individual address.

See also
IEEE 802-2001 section 9.2
Parameters
addrethernet address

Definition at line 77 of file eui48.h.

◆ eui48_from_ipv6_iid()

static void eui48_from_ipv6_iid ( eui48_t addr,
const eui64_t iid 
)
inlinestatic

Convert a 64-bit IPv6 IID into a EUI-48 device address.

Parameters
[out]addrthe resulting EUI-48
[in]iida 64-bit IPv6 interface identifier

Definition at line 149 of file eui48.h.

◆ eui48_set_local()

static void eui48_set_local ( eui48_t addr)
inlinestatic

Set the locally administrated bit in the EUI-48 address.

See also
IEEE 802-2001 section 9.2
Parameters
addrethernet address

Definition at line 64 of file eui48.h.

◆ eui48_to_eui64()

static void eui48_to_eui64 ( eui64_t eui64,
const eui48_t addr 
)
inlinestatic

Generates an EUI-64 from a 48-bit device address.

See also
RFC 2464, section 4
Parameters
[out]eui64the resulting EUI-64.
[in]addra 48-bit device address

Definition at line 90 of file eui48.h.

◆ eui48_to_ipv6_iid()

static void eui48_to_ipv6_iid ( eui64_t iid,
const eui48_t addr 
)
inlinestatic

Generates an IPv6 interface identifier from a 48-bit device address.

Note
The IPv6 IID is derived from the EUI-64 by flipping the U/L bit.
See also
RFC 2464, section 4
RFC 4291, section 2.5.1
Parameters
[out]iidthe resulting EUI-64.
[in]addra 48-bit device address

Definition at line 137 of file eui48.h.

◆ eui64_to_eui48()

static void eui64_to_eui48 ( eui48_t eui48,
const eui64_t addr 
)
inlinestatic

Generates an EUI-48 from a 64-bit device address.

Warning
The resulting EUI-48 is not guaranteed to be unique and, hence, marked as only locally unique.
Parameters
[out]eui48the resulting EUI-48.
[in]addra 64-bit device address

Definition at line 111 of file eui48.h.