network: add new DHCPv6 message types and options

Gives enum definitions for the DHCPv6 options from RFC9527 and RFC 9686
and the new message types defined in RFC 9686.
This commit is contained in:
ssoss
2025-07-31 05:41:53 +09:00
committed by Yu Watanabe
parent 0d229ef102
commit 1e55da38aa
3 changed files with 13 additions and 3 deletions
+4
View File
@@ -210,6 +210,10 @@ bool dhcp6_option_can_request(uint16_t option) {
case SD_DHCP6_OPTION_V6_DOTS_ADDRESS:
case SD_DHCP6_OPTION_IPV6_ADDRESS_ANDSF:
case SD_DHCP6_OPTION_V6_DNR:
case SD_DHCP6_OPTION_REGISTERED_DOMAIN:
case SD_DHCP6_OPTION_FORWARD_DIST_MANAGER:
case SD_DHCP6_OPTION_REVERSE_DIST_MANAGER:
case SD_DHCP6_OPTION_ADDR_REG_ENABLE:
return true;
default:
return false;
+2
View File
@@ -98,6 +98,8 @@ typedef enum DHCP6MessageType {
DHCP6_MESSAGE_DISCONNECT = 33, /* RFC 8156 */
DHCP6_MESSAGE_STATE = 34, /* RFC 8156 */
DHCP6_MESSAGE_CONTACT = 35, /* RFC 8156 */
DHCP6_MESSAGE_ADDR_REG_INFORM = 36, /* RFC 9686 */
DHCP6_MESSAGE_ADDR_REG_REPLY = 37, /* RFC 9686 */
_DHCP6_MESSAGE_TYPE_MAX,
_DHCP6_MESSAGE_TYPE_INVALID = -EINVAL,
} DHCP6MessageType;
+7 -3
View File
@@ -165,9 +165,13 @@ enum {
SD_DHCP6_OPTION_SLAP_QUAD = 140, /* RFC 8948 */
SD_DHCP6_OPTION_V6_DOTS_RI = 141, /* RFC 8973 */
SD_DHCP6_OPTION_V6_DOTS_ADDRESS = 142, /* RFC 8973 */
SD_DHCP6_OPTION_IPV6_ADDRESS_ANDSF = 143, /* RFC 6153 */
SD_DHCP6_OPTION_V6_DNR = 144 /* RFC 9463 */
/* option codes 145-65535 are unassigned */
SD_DHCP6_OPTION_IPV6_ADDRESS_ANDSF = 143, /* RFC 6153 */
SD_DHCP6_OPTION_V6_DNR = 144, /* RFC 9463 */
SD_DHCP6_OPTION_REGISTERED_DOMAIN = 145, /* RFC 9527 */
SD_DHCP6_OPTION_FORWARD_DIST_MANAGER = 146, /* RFC 9527 */
SD_DHCP6_OPTION_REVERSE_DIST_MANAGER = 147, /* RFC 9527 */
SD_DHCP6_OPTION_ADDR_REG_ENABLE = 148 /* RFC 9686 */
/* option codes 149-65535 are unassigned */
};
_SD_END_DECLARATIONS;