<term><varname>Token=</varname></term>
<listitem>
<para>Specifies an optional address generation mode for the Stateless Address
- Autoconfiguration (SLAAC). Supported modes are <literal>static</literal> and
- <literal>prefixstable</literal>.</para>
+ Autoconfiguration (SLAAC). Supported modes are <literal>eui64</literal>,
+ <literal>static</literal>, and <literal>prefixstable</literal>.</para>
+
+ <para>When the mode is set to <literal>eui64</literal>, then the EUI-64 algorithm will be
+ used to generate an address for that prefix.</para>
<para>When the mode is set to <literal>static</literal>, an IPv6 address must be
specified after a colon (<literal>:</literal>), and the lower bits of the supplied
the all previous assignments are cleared.</para>
<para>Examples:
- <programlisting>Token=::1a:2b:3c:4d
+ <programlisting>Token=eui64
+Token=::1a:2b:3c:4d
Token=static:::1a:2b:3c:4d
Token=prefixstable
Token=prefixstable:2002:da8:1::</programlisting></para>
#define NDISC_APP_ID SD_ID128_MAKE(13,ac,81,a7,d5,3f,49,78,92,79,5d,0c,29,3a,bc,7e)
typedef enum AddressGenerationType {
+ ADDRESS_GENERATION_EUI64,
ADDRESS_GENERATION_STATIC,
ADDRESS_GENERATION_PREFIXSTABLE,
_ADDRESS_GENERATION_TYPE_MAX,
struct in6_addr addr, *copy;
switch (j->type) {
+ case ADDRESS_GENERATION_EUI64:
+ generate_eui64_address(link, &masked, &addr);
+ break;
+
case ADDRESS_GENERATION_STATIC:
memcpy(addr.s6_addr, masked.s6_addr, 8);
memcpy(addr.s6_addr + 8, j->address.s6_addr + 8, 8);
return 0;
}
+ } else if (streq(rvalue, "eui64")) {
+ type = ADDRESS_GENERATION_EUI64;
+ p = NULL;
} else {
type = ADDRESS_GENERATION_STATIC;
}
switch (type) {
+ case ADDRESS_GENERATION_EUI64:
+ assert(in6_addr_is_null(&buffer.in6));
+ break;
+
case ADDRESS_GENERATION_STATIC:
/* Only last 64 bits are used. */
memzero(buffer.in6.s6_addr, 8);