Browse Source

[4107] Added several comments.

Tomek Mrugalski 9 years ago
parent
commit
e15b2e1ebc
2 changed files with 9 additions and 4 deletions
  1. 3 3
      src/lib/dhcp/dhcp6.h
  2. 6 1
      src/lib/dhcp/std_option_defs.h

+ 3 - 3
src/lib/dhcp/dhcp6.h

@@ -222,7 +222,8 @@ extern const int dhcpv6_type_name_max;
 // Taken from http://www.iana.org/assignments/enterprise-numbers
 // Taken from http://www.iana.org/assignments/enterprise-numbers
 #define ENTERPRISE_ID_ISC 2495
 #define ENTERPRISE_ID_ISC 2495
 
 
-/* DHCPv4-over-DHCPv6 (RFC 7341) inter-process communication */
+/* DHCPv4-over-DHCPv6 (RFC 7341) inter-process communication. These are option
+   codes for the ISC vendor specific options used in 4o6 */
 #define ISC_V6_4O6_INTERFACE                 60000
 #define ISC_V6_4O6_INTERFACE                 60000
 #define ISC_V6_4O6_SRC_ADDRESS               60001
 #define ISC_V6_4O6_SRC_ADDRESS               60001
 
 
@@ -301,8 +302,7 @@ extern const int dhcpv6_type_name_max;
 #define IRT_DEFAULT     86400
 #define IRT_DEFAULT     86400
 #define IRT_MINIMUM     600
 #define IRT_MINIMUM     600
 
 
-/* DHCPv4-query message flags */
-
+/* DHCPv4-query message flags (see RFC7341) */
 #define DHCPV4_QUERY_FLAGS_UNICAST (1 << 23)
 #define DHCPV4_QUERY_FLAGS_UNICAST (1 << 23)
 
 
 #endif /* DHCP6_H */
 #endif /* DHCP6_H */

+ 6 - 1
src/lib/dhcp/std_option_defs.h

@@ -374,7 +374,12 @@ const OptionDefParams OPTION_DEF_PARAMS6[] = {
 const int OPTION_DEF_PARAMS_SIZE6  =
 const int OPTION_DEF_PARAMS_SIZE6  =
     sizeof(OPTION_DEF_PARAMS6) / sizeof(OPTION_DEF_PARAMS6[0]);
     sizeof(OPTION_DEF_PARAMS6) / sizeof(OPTION_DEF_PARAMS6[0]);
 
 
-/// @brief Definitions of private DHCPv6 options
+/// @brief Definitions of vendor-specific DHCPv6 options, defined by ISC.
+/// 4o6-* options are used for inter-process communication. For details, see
+/// http://kea.isc.org/wiki/Dhcp4o6Design
+///
+/// @todo: As those options are defined by ISC, they do not belong in std_option_defs.h.
+///        We need to move them to a separate file, e.g. isc_option_defs.h
 const OptionDefParams ISC_V6_DEFS[] = {
 const OptionDefParams ISC_V6_DEFS[] = {
     { "4o6-interface", ISC_V6_4O6_INTERFACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
     { "4o6-interface", ISC_V6_4O6_INTERFACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
     { "4o6-source-address", ISC_V6_4O6_SRC_ADDRESS, OPT_IPV6_ADDRESS_TYPE, false, NO_RECORD_DEF, "" }
     { "4o6-source-address", ISC_V6_4O6_SRC_ADDRESS, OPT_IPV6_ADDRESS_TYPE, false, NO_RECORD_DEF, "" }