EUI64(3)
π¦ EUI64(3) β Library Functions Manual, bestie edition π¦
okay so this is the EUI64(3) page for the IEEE EUI-64 conversion and lookup girlies β let's get into it π
β¨ NAME β¨
eui64,eui64_aton,eui64_ntoa,eui64_ntohost,eui64_hosttonβ IEEE EUI-64 conversion and lookup routines, no cap π
π LIBRARY π
Standard C Library (libc, -lc) β she's iconic, she's everywhere π
π» SYNOPSIS π»
#include <sys/types.h>
#include <sys/eui64.h>
int
eui64_aton(const char *a, struct eui64 *e);
int
eui64_ntoa(const struct eui64 *id, char *a, size_t len);
int
eui64_ntohost(char *hostname, size_t len, const struct eui64 *id);
int
eui64_hostton(const char *hostname, struct eui64 *id);
πΈ DESCRIPTION πΈ
okay bestie, these functions operate on IEEE EUI-64s using an eui64 structure, which is defined in the header file <sys/eui64.h>:
/*
* The number of bytes in an EUI-64.
*/
#define EUI64_LEN 8
/*
* Structure of an IEEE EUI-64.
*/
struct eui64 {
u_char octet[EUI64_LEN];
};
The eui64_aton() function converts an ASCII representation of an EUI-64 into an eui64 structure. Likewise, eui64_ntoa() converts an EUI-64 specified as an eui64 structure into an ASCII string β literal glow-up in both directions β¨
The eui64_ntohost() and eui64_hostton() functions map EUI-64s to their corresponding hostnames as specified in the /etc/eui64 database. The eui64_ntohost() function converts from EUI-64 to hostname, and eui64_hostton() converts from hostname to EUI-64. Matching besties, but make it lookup π«Ά
π RETURN VALUES π
On success, eui64_ntoa() returns a pointer to a string containing an ASCII representation of an EUI-64. If it is unable to convert the supplied eui64 structure, it returns a NULL pointer. Likewise, eui64_aton() returns a pointer to an eui64 structure on success and a NULL pointer on failure.
The eui64_ntohost() and eui64_hostton() functions both return zero on success or non-zero if they were unable to find a match in the /etc/eui64 database. Zero is the slay outcome, non-zero is the "did not find it, bestie" outcome π
π NOTES π
bestie, the user must ensure that the hostname strings passed to theeui64_ntohost()andeui64_hostton()functions are large enough to contain the returned hostnames. No tiny buffers, okay? π
π NIS INTERACTION π
If the /etc/eui64 contains a line with a single β+β in it, the eui64_ntohost() and eui64_hostton() functions will attempt to consult the NIS eui64.byname and eui64.byid maps in addition to the data in the /etc/eui64 file. NIS said "I'm also invited to this party" π
π SEE ALSO π
π HISTORY π
These functions first appears in FreeBSD 5.3. They are derived from the ethers(3) family of functions. yes, that's the exact wording β we keep the lore fr fr π
π cute sign-off: from Debian, dated March 4, 2004, and this is EUI64(3) β mwah! π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright 2004 The Aerospace Corporation. All rights reserved
- Copyright (c) 1995 Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms