| Kea 3.0.2-git

docsis3_option_defs.h
Go to the documentation of this file.
1// Copyright (C) 2013-2021 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef DOCSIS3_OPTION_DEFS_H
8#define DOCSIS3_OPTION_DEFS_H
9
10#include <dhcp/std_option_defs.h>
11#include <dhcp/option_data_types.h>
12
14#define DOCSIS3_V4_OPTION_SPACE "docsis3-v4"
15#define DOCSIS3_V6_OPTION_SPACE "docsis3-v6"
16
17 namespace isc {
18 namespace dhcp {
19
20#define VENDOR_ID_CABLE_LABS 4491
21
22#define DOCSIS3_V4_ORO 1
23#define DOCSIS3_V4_TFTP_SERVERS 2
24
26 const OptionDefParams DOCSIS3_V4_OPTION_DEFINITIONS[] = {
27 { "oro", DOCSIS3_V4_ORO,
28 DOCSIS3_V4_OPTION_SPACE, OPT_UINT8_TYPE, true, NO_RECORD_DEF, "" },
29 { "tftp-servers", DOCSIS3_V4_TFTP_SERVERS,
30 DOCSIS3_V4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" }
31};
32
34 const int DOCSIS3_V4_OPTION_DEFINITIONS_SIZE =
35 sizeof(DOCSIS3_V4_OPTION_DEFINITIONS) /
36 sizeof(DOCSIS3_V4_OPTION_DEFINITIONS[0]);
37
39#define DOCSIS3_V6_ORO 1
40#define DOCSIS3_V6_DEVICE_TYPE 2
41#define DOCSIS3_V6_VENDOR_NAME 10
42#define DOCSIS3_V6_TFTP_SERVERS 32
43#define DOCSIS3_V6_CONFIG_FILE 33
44#define DOCSIS3_V6_SYSLOG_SERVERS 34
45#define DOCSIS3_V6_DEVICE_ID 36
46#define DOCSIS3_V6_TIME_SERVERS 37
47#define DOCSIS3_V6_TIME_OFFSET 38
48
49// The following DOCSIS3 options are inserted by the CMTS (which acts as
50// a relay agent)
51#define DOCSIS3_V6_CMTS_CM_MAC 1026
52
54 const OptionDefParams DOCSIS3_V6_OPTION_DEFINITIONS[] = {
55 { "oro", DOCSIS3_V6_ORO,
56 DOCSIS3_V6_OPTION_SPACE, OPT_UINT16_TYPE, true, NO_RECORD_DEF, "" },
57 { "device-type", DOCSIS3_V6_DEVICE_TYPE,
58 DOCSIS3_V6_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
59 { "vendor-type", DOCSIS3_V6_VENDOR_NAME,
60 DOCSIS3_V6_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
61 { "tftp-servers", DOCSIS3_V6_TFTP_SERVERS,
62 DOCSIS3_V6_OPTION_SPACE, OPT_IPV6_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
63 { "time-servers", DOCSIS3_V6_TIME_SERVERS,
64 DOCSIS3_V6_OPTION_SPACE, OPT_IPV6_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
65 { "config-file", DOCSIS3_V6_CONFIG_FILE,
66 DOCSIS3_V6_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
67 { "syslog-servers", DOCSIS3_V6_SYSLOG_SERVERS,
68 DOCSIS3_V6_OPTION_SPACE, OPT_IPV6_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
69 { "device-id", DOCSIS3_V6_DEVICE_ID,
70 DOCSIS3_V6_OPTION_SPACE, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
71 { "time-offset", DOCSIS3_V6_TIME_OFFSET,
72 DOCSIS3_V6_OPTION_SPACE, OPT_INT32_TYPE, false, NO_RECORD_DEF, "" },
73 { "cmts-cm-mac", DOCSIS3_V6_CMTS_CM_MAC,
74 DOCSIS3_V6_OPTION_SPACE, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" }
75 // @todo add definitions for all remaining options.
76};
77
79 const int DOCSIS3_V6_OPTION_DEFINITIONS_SIZE =
80 sizeof(DOCSIS3_V6_OPTION_DEFINITIONS) /
81 sizeof(DOCSIS3_V6_OPTION_DEFINITIONS[0]);
82
84 extern const char* DOCSIS3_CLASS_EROUTER;
85 extern const char* DOCSIS3_CLASS_MODEM;
86
87} // namespace dhcp
88} // namespace isc
89
90#endif // DOCSIS3_OPTION_DEFS_H
DOCSIS3_V6_TFTP_SERVERS
#define DOCSIS3_V6_TFTP_SERVERS
Definition docsis3_option_defs.h:42
DOCSIS3_V6_SYSLOG_SERVERS
#define DOCSIS3_V6_SYSLOG_SERVERS
Definition docsis3_option_defs.h:44
DOCSIS3_V6_VENDOR_NAME
#define DOCSIS3_V6_VENDOR_NAME
Definition docsis3_option_defs.h:41
DOCSIS3_V6_ORO
#define DOCSIS3_V6_ORO
Definition docsis3_option_defs.h:39
DOCSIS3_V4_ORO
#define DOCSIS3_V4_ORO
Definition docsis3_option_defs.h:22
DOCSIS3_V6_OPTION_SPACE
#define DOCSIS3_V6_OPTION_SPACE
Definition docsis3_option_defs.h:15
DOCSIS3_V4_OPTION_SPACE
#define DOCSIS3_V4_OPTION_SPACE
global docsis3 option spaces
Definition docsis3_option_defs.h:14
DOCSIS3_V6_CMTS_CM_MAC
#define DOCSIS3_V6_CMTS_CM_MAC
Definition docsis3_option_defs.h:51
DOCSIS3_V6_TIME_OFFSET
#define DOCSIS3_V6_TIME_OFFSET
Definition docsis3_option_defs.h:47
DOCSIS3_V6_TIME_SERVERS
#define DOCSIS3_V6_TIME_SERVERS
Definition docsis3_option_defs.h:46
DOCSIS3_V6_DEVICE_TYPE
#define DOCSIS3_V6_DEVICE_TYPE
Definition docsis3_option_defs.h:40
DOCSIS3_V4_TFTP_SERVERS
#define DOCSIS3_V4_TFTP_SERVERS
Definition docsis3_option_defs.h:23
DOCSIS3_V6_DEVICE_ID
#define DOCSIS3_V6_DEVICE_ID
Definition docsis3_option_defs.h:45
DOCSIS3_V6_CONFIG_FILE
#define DOCSIS3_V6_CONFIG_FILE
Definition docsis3_option_defs.h:43
isc::dhcp::DOCSIS3_V4_OPTION_DEFINITIONS
const OptionDefParams DOCSIS3_V4_OPTION_DEFINITIONS[]
Definitions of standard DHCPv4 options.
Definition docsis3_option_defs.h:26
isc::dhcp::DOCSIS3_CLASS_EROUTER
const char * DOCSIS3_CLASS_EROUTER
The class as specified in vendor-class option by the devices.
Definition libdhcp++.cc:94
isc::dhcp::OPT_IPV6_ADDRESS_TYPE
@ OPT_IPV6_ADDRESS_TYPE
Definition option_data_types.h:57
isc::dhcp::OPT_STRING_TYPE
@ OPT_STRING_TYPE
Definition option_data_types.h:60
isc::dhcp::OPT_UINT16_TYPE
@ OPT_UINT16_TYPE
Definition option_data_types.h:53
isc::dhcp::OPT_BINARY_TYPE
@ OPT_BINARY_TYPE
Definition option_data_types.h:47
isc::dhcp::OPT_UINT8_TYPE
@ OPT_UINT8_TYPE
Definition option_data_types.h:52
isc::dhcp::OPT_INT32_TYPE
@ OPT_INT32_TYPE
Definition option_data_types.h:51
isc::dhcp::OPT_IPV4_ADDRESS_TYPE
@ OPT_IPV4_ADDRESS_TYPE
Definition option_data_types.h:56
isc::dhcp::DOCSIS3_V6_OPTION_DEFINITIONS_SIZE
const int DOCSIS3_V6_OPTION_DEFINITIONS_SIZE
Number of option definitions defined.
Definition docsis3_option_defs.h:79
isc::dhcp::DOCSIS3_CLASS_MODEM
const char * DOCSIS3_CLASS_MODEM
DOCSIS3.0 compatible cable modem.
Definition libdhcp++.cc:91
isc::dhcp::DOCSIS3_V4_OPTION_DEFINITIONS_SIZE
const int DOCSIS3_V4_OPTION_DEFINITIONS_SIZE
Number of option definitions defined.
Definition docsis3_option_defs.h:34
isc::dhcp::DOCSIS3_V6_OPTION_DEFINITIONS
const OptionDefParams DOCSIS3_V6_OPTION_DEFINITIONS[]
Definitions of standard DHCPv6 options.
Definition docsis3_option_defs.h:54
isc
Defines the logger used by the top-level component of kea-lfc.
Definition agent_parser.cc:148
option_data_types.h
std_option_defs.h
NO_RECORD_DEF
#define NO_RECORD_DEF
Definition std_option_defs.h:58
isc::dhcp::OptionDefParams
Parameters being used to make up an option definition.
Definition option_data_types.h:70