You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Overview

The MAP-T (Mapping of Address and Port using Translation) feature is controlled by two related build flags across the map-t codebase:

  • FEATURE_SUPPORT_MAPT_NAT46 - Primary flag used in DHCP Manager build system
  • FEATURE_MAPT - Flag used in WAN Manager code for runtime features


Build-Time Flags

1. DHCP Manager: FEATURE_SUPPORT_MAPT_NAT46

Location: dhcp-manager/configure.ac 

Enable MAP-T support during DHCP Manager configuration:


./configure --enable-maptsupport=yes

AC_ARG_ENABLE([maptsupport],
             AS_HELP_STRING([--enable-maptsupport],[enable mapt support (default is no)]),
             [
              case "${enableval}" in
               yes) MAPT_SUPPORT_ENABLED=true;;
               no)  MAPT_SUPPORT_ENABLED=false;;
               *) AC_MSG_ERROR([bad value ${enableval} for --enable-maptsupport ]);;
              esac
             ],
             [echo "mapt is disabled"])

AM_CONDITIONAL(FEATURE_SUPPORT_MAPT_NAT46, test "x$MAPT_SUPPORT_ENABLED" = xtrue)

WAN Manager: FEATURE_MAPT

Depends on DISTRO enabled - feature_mapt


Build System Integration


Only compiles dhcpmgr_map_apis.c when FEATURE_SUPPORT_MAPT_NAT46 is enabled

File: source/DHCPMgrUtils/Makefile.am

noinst_LTLIBRARIES = libCcspDhcpMgrUtils.la

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



Data Structures

DHCP Manager: MAP-T Data

typedef struct _COSA_DML_MAPT_DATA
{
   // IPv4 Configuration
   CHAR       RuleIPv4Prefix[BUFLEN_16];       // IPv4 prefix string
   UINT16     RuleIPv4PrefixLen;               // IPv4 prefix length
   CHAR       IPv4AddrString[BUFLEN_16];       // Calculated IPv4 address
   UINT32     IPv4Suffix;                      // IPv4 address suffix

   // IPv6 Configuration
   CHAR       RuleIPv6Prefix[BUFLEN_40];       // IPv6 prefix string
   UCHAR      RuleIPv6PrefixH[BUFLEN_24];      // IPv6 prefix (hex format)
   UINT16     RuleIPv6PrefixLen;               // IPv6 prefix length
   CHAR       IPv6AddrString[BUFLEN_40];       // Calculated IPv6 address

   // Border Relay Configuration
   CHAR       BrIPv6Prefix[BUFLEN_40];         // Border Relay IPv6 address
   UINT16     BrIPv6PrefixLen;                 // BR prefix length

   // Port Mapping Parameters
   UINT16     Psid;                            // Port Set Identifier
   UINT16     PsidLen;                         // PSID length in bits
   UINT32     PsidOffset;                      // PSID offset
   UINT16     IPv4Psid;                        // Calculated IPv4 PSID
   UINT16     IPv4PsidLen;                     // IPv4 PSID length

   // Derived Parameters
   CHAR       PdIPv6Prefix[BUFLEN_40];         // Prefix Delegation prefix
   UINT16     PdIPv6PrefixLen;                 // PD prefix length
   UINT16     EaLen;                           // Embedded Address length
   UINT32     Ratio;                           // Sharing ratio
   BOOLEAN    bFMR;                            // Forwarding Mapping Rule flag
} COSA_DML_MAPT_DATA


WAN Manager: MAP-T Configuration

typedef struct _WANMGR_MAPT_CONFIG_DATA_
{
    int psidValue;
    char ipAddressString[BUFLEN_32];
    char ipLANAddressString[BUFLEN_32];
    int psidLen;
} WANMGR_MAPT_CONFIG_DATA;

typedef struct _DML_WANIFACE_MAP
{
    DML_WAN_IFACE_MAPT_STATUS   MaptStatus;
    CHAR                        Path[BUFLEN_64];
    BOOL                        MaptChanged;
#ifdef FEATURE_MAPT
    ipc_mapt_data_t dhcp6cMAPTparameters;
    WANMGR_MAPT_CONFIG_DATA     MaptConfig;
#endif
} DML_WANIFACE_MAP;


TR-181 Data Model Parameters


Exposed Parameters

  • MapTransportMode - Transport protocol (string, read-only)
  • MapBRPrefix - Border Relay IPv6 prefix (string, read-only)
  • MapRuleIPv4Prefix - IPv4 rule prefix (string, read-only)
  • MapRuleIPv6Prefix - IPv6 rule prefix (string, read-only)
  • MapEALen - Embedded Address length (uint32, read-only)
  • MapPSIDOffset - Port Set ID offset (uint32)
  • MapPSIDLen - Port Set ID length (uint32)

Integration Flow


DHCPv6 Server DHCP Response (Option 95)
          ↓
DHCPv6 Client (dibbler)
          ↓
DHCP Manager (dhcpmgr_map_apis.c)  ← Only if FEATURE_SUPPORT_MAPT_NAT46
    - Parse Option 95
    - Extract suboptions (89, 90, 93)
    - Calculate MAP-T parameters
    - Validate RFC 7599 compliance
          ↓
TR-181 Data Model (Device.DHCPv6.Client.X.X_RDKCENTRAL-COM_RcvOption)
          ↓
Sysevents (mapt_config_flag, mapt_ratio, etc.)
          ↓
WAN Manager (wanmgr_network_monitor.c)  ← Requires FEATURE_MAPT + NAT46_KERNEL_SUPPORT
    - Configure IPv6 routes
    - Set MAP-T MTU (1520)
    - Setup address translation rules
    - Publish telemetry


  • No labels