Skip to content

Commit

Permalink
net/ethernet: remove get_iid() function
Browse files Browse the repository at this point in the history
the fuctionality was moved into eui48_to_ipv6_iid()
  • Loading branch information
haukepetersen committed Dec 6, 2018
1 parent 64a451a commit dd97764
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions sys/include/net/ethernet.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,29 +47,6 @@ extern "C" {
*/
#define ETHERNET_MAX_LEN (ETHERNET_FRAME_LEN + ETHERNET_FCS_LEN)

/**
* @brief Generates an IPv6 interface identifier from a 48-bit MAC address.
*
* @see <a href="https://tools.ietf.org/html/rfc2464#section-4">
* RFC 2464, section 4
* </a>
*
* @param[out] eui64 The resulting EUI-64.
* @param[in] mac A 48-bit MAC address. Is expected to be at least
* @ref ETHERNET_ADDR_LEN long.
*/
static inline void ethernet_get_iid(eui64_t *eui64, const uint8_t *mac)
{
eui64->uint8[0] = mac[0] ^ 0x02;
eui64->uint8[1] = mac[1];
eui64->uint8[2] = mac[2];
eui64->uint8[3] = 0xff;
eui64->uint8[4] = 0xfe;
eui64->uint8[5] = mac[3];
eui64->uint8[6] = mac[4];
eui64->uint8[7] = mac[5];
}

#ifdef __cplusplus
}
#endif
Expand Down

0 comments on commit dd97764

Please sign in to comment.