Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ typedef unsigned long ULONG;
#define DHCPV6_OPT_82 82 // OPTION_SOL_MAX_RT: Solicite Maximum Retry Time
#define DHCPV6_OPT_23 23 // OPTION_SOL_MAX_RT: Solicite Maximum Retry Time
#define DHCPV6_OPT_95 95 // OPTION_SOL_MAX_RT: Solicite Maximum Retry Time
#define DHCPV6_OPT_94 94
#define DHCPV6_OPT_24 24 // OPTION_DOMAIN_LIST
#define DHCPV6_OPT_83 83 // OPTION_INF_MAX_RT
#define DHCPV6_OPT_17 17 // OPTION_VENDOR_OPTS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#define DHCPv6_OPTION_NTP "SRV_OPTION31"
#define DHCPv6_OPTION_DSLITE "SRV_OPTION64"
#define DHCPv6_OPTION_MAPT "SRV_OPTION95"
#define DHCPv6_OPTION_MAPE "SRV_OPTION94"

#if 0 // Uncomment the following code to enable plugin logs

Expand Down Expand Up @@ -238,6 +239,18 @@ static int get_and_fill_env_data_dhcp6(DHCPv6_PLUGIN_MSG *dhcpv6_data, char *inp
DHCPMGR_LOG_INFO("[%s-%d] MAP-T configuration is missing\n", __FUNCTION__, __LINE__);
}

/** MAP-E Configuration */
if ((env = getenv(DHCPv6_OPTION_MAPE)) != NULL)
{
strncpy((char *) dhcpv6_data->mape.Container, env, sizeof(dhcpv6_data->mape.Container));
DHCPMGR_LOG_INFO("[%s-%d] MAP-E configuration is updated\n", __FUNCTION__, __LINE__);
dhcpv6_data->mape.Assigned = true;
}
else
{
DHCPMGR_LOG_INFO("[%s-%d] MAP-E configuration is missing\n", __FUNCTION__, __LINE__);
}

/** Vendor Specific Information */
if ((env = getenv(DHCPv6_VENDOR_SPEC)) != NULL)
{
Expand Down
4 changes: 1 addition & 3 deletions source/DHCPClientUtils/DHCPv6Client/dhcpv6_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,11 @@ typedef struct _DHCPv6_PLUGIN_MSG
unsigned char Container[BUFLEN_256]; /* MAP-T option 95 in hex format*/
}mapt;

#if 0
//TODO: MAPE support not added yet
//MAPE
struct {
bool Assigned; /**< Have we been assigned mape config ? */
unsigned char Container[BUFLEN_256]; /* MAP-E option 94 in hex format*/
}mape;
#endif

//Vendor Specific Options
struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ static int dibbler_get_req_options(FILE * fout, dhcp_opt_list * req_opt_list)
fputs(args, fout);
break;

case DHCPV6_OPT_94:
snprintf(args, sizeof(args), "\n\toption 00%d hex \n", opt_list->dhcp_opt);
fputs(args, fout);
break;

case DHCPV6_OPT_64:
fputs("\n\toption aftr\n", fout);
break;
Expand Down
6 changes: 1 addition & 5 deletions source/DHCPMgrUtils/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ libCcspDhcpMgrUtils_la_CPPFLAGS = -I$(top_srcdir)/source/DHCPMgrUtils/include \
-I$(top_srcdir)/source/DHCPMgrInterface/include \
-I$(top_srcdir)/source/DHCPServerUtils/utils/include

libCcspDhcpMgrUtils_la_SOURCES = cosa_common_util.c helpers.c dhcpmgr_recovery_handler.c dhcpmgr_controller.c dhcp_lease_monitor_thrd.c dhcpmgr_v4_lease_handler.c dhcpmgr_v6_lease_handler.c

if FEATURE_SUPPORT_MAPT_NAT46
libCcspDhcpMgrUtils_la_SOURCES += dhcpmgr_map_apis.c
endif
libCcspDhcpMgrUtils_la_SOURCES = cosa_common_util.c helpers.c dhcpmgr_recovery_handler.c dhcpmgr_controller.c dhcp_lease_monitor_thrd.c dhcpmgr_v4_lease_handler.c dhcpmgr_map_apis.c dhcpmgr_v6_lease_handler.c

libCcspDhcpMgrUtils_la_LIBADD = -lccsp_common -ltelemetry_msgsender -lulog -lsyscfg -lsysevent -ltime_conversion -lprint_uptime \
${top_builddir}/source/DHCPClientUtils/DHCPv4Client/libCcspDhcpMgr_Dhcpv4Client.la \
Expand Down
Loading