add_definitions(-DEXT_CER_ID=${EXT_CER_ID})
endif(${EXT_CER_ID})
-if(${EXT_S46})
- add_definitions(-DEXT_S46=${EXT_S46})
-endif(${EXT_S46})
-
add_executable(odhcp6c src/odhcp6c.c src/dhcpv6.c src/ra.c src/script.c src/md5.c)
target_link_libraries(odhcp6c resolv)
g) Information-Refresh Options
h) Configurable SOL_MAX_RT
i) DS-Lite AFTR-Name Option
- j) Prefix Class (experimental)
- k) CER-ID (experimental)
- l) Softwire address and port mapped clients (experimental)
+ j) Softwire address and port mapped clients (MAP, LW4over6)
+ k) Prefix Class (experimental)
+ l) CER-ID (experimental)
4. Support for requesting and parsing Router Advertisements
a) parsing of prefixes, routes, MTU and RDNSS options
#ifdef EXT_CER_ID
htons(DHCPV6_OPT_CER_ID),
#endif
-#ifdef EXT_S46
htons(DHCPV6_OPT_S46_CONT_MAPE),
htons(DHCPV6_OPT_S46_CONT_MAPT),
htons(DHCPV6_OPT_S46_CONT_LW),
-#endif
};
odhcp6c_add_state(STATE_ORO, oro, sizeof(oro));
}
odhcp6c_add_state(STATE_CER, &cer_id->addr, sizeof(any));
passthru = false;
#endif
-#ifdef EXT_S46
} else if (otype == DHCPV6_OPT_S46_CONT_MAPT) {
odhcp6c_add_state(STATE_S46_MAPT, odata, olen);
passthru = false;
} else if (otype == DHCPV6_OPT_S46_CONT_LW) {
odhcp6c_add_state(STATE_S46_LW, odata, olen);
passthru = false;
-#endif
} else if (otype == DHCPV6_OPT_CLIENTID ||
otype == DHCPV6_OPT_SERVERID ||
otype == DHCPV6_OPT_IA_TA ||
/* draft-donley-dhc-cer-id-option-03 */
DHCPV6_OPT_CER_ID = EXT_CER_ID,
#endif
-#ifdef EXT_S46
- /* draft-ietf-softwire-map-dhcp-07 */
- DHCPV6_OPT_S46_RULE = EXT_S46,
- DHCPV6_OPT_S46_BR = EXT_S46 + 1,
- DHCPV6_OPT_S46_DMR = EXT_S46 + 2,
- DHCPV6_OPT_S46_V4V6BIND = EXT_S46 + 3,
- DHCPV6_OPT_S46_PORTPARAMS = EXT_S46 + 4,
- DHCPV6_OPT_S46_CONT_MAPE = EXT_S46 + 5,
- DHCPV6_OPT_S46_CONT_MAPT = EXT_S46 + 6,
- DHCPV6_OPT_S46_CONT_LW = EXT_S46 + 7,
-#endif
+ /* draft-ietf-softwire-map-dhcp-08 */
+ DHCPV6_OPT_S46_RULE = 89,
+ DHCPV6_OPT_S46_BR = 90,
+ DHCPV6_OPT_S46_DMR = 91,
+ DHCPV6_OPT_S46_V4V6BIND = 92,
+ DHCPV6_OPT_S46_PORTPARAMS = 93,
+ DHCPV6_OPT_S46_CONT_MAPE = 94,
+ DHCPV6_OPT_S46_CONT_MAPT = 95,
+ DHCPV6_OPT_S46_CONT_LW = 96,
};
enum dhcpv6_opt_npt {
putenv(buf);
}
-#ifdef EXT_S46
+
static void s46_to_env_portparams(const uint8_t *data, size_t len, FILE *fp)
{
uint8_t *odata;
}
}
}
-#endif
+
static void s46_to_env(enum odhcp6c_state state, const uint8_t *data, size_t len)
{
fputs(name, fp);
fputc('=', fp);
-#ifdef EXT_S46
const char *type = (state == STATE_S46_MAPE) ? "map-e" :
(state == STATE_S46_MAPT) ? "map-t" : "lw4o6";
fputc(' ', fp);
}
-#else
- if (data && len) {}
-#endif
fclose(fp);
putenv(str);