metaonly module ti.ndk.config.Nat

NDK Network Address Translation (NAT) settings and configuration

Configuration settings sourced in ti/ndk/config/Nat.xdc
var Nat = xdc.useModule('ti.ndk.config.Nat');
module-wide constants & types
per-instance config parameters
    var params = new Nat.Params// Instance config-params object;
        params.pCbSrv// Nat service reporting function = Void(*)(Int,Int,Int,Void*) "&ti_ndk_config_Global_serviceReport";
        params.virtualMask// Specifies the subnet mask of the NAT group virtual network = String "255.255.254.0";
per-instance creation
    var inst = Nat.create// Create an instance-object(params);
 
 
const Nat.CIS_FLG_CALLBYIP

Specifies that the service should be invoked by IP address

Configuration settings
const Nat.CIS_FLG_CALLBYIP = 0x0004;
 
 
const Nat.CIS_FLG_IFIDXVALID

Specifies if the IfIdx field is valid

Configuration settings
const Nat.CIS_FLG_IFIDXVALID = 0x0001;
 
 
const Nat.CIS_FLG_RESOLVEIP

Requests that IfIdx be resolved to an IP address before service execution is initiated

Configuration settings
const Nat.CIS_FLG_RESOLVEIP = 0x0002;
 
 
const Nat.CIS_FLG_RESTARTIPTERM

A service that is dependent on a valid IP address (as determined by the RESOLVEIP flag) is shut down if the IP address becomes invalid

Configuration settings
const Nat.CIS_FLG_RESTARTIPTERM = 0x0008;
 
DETAILS
When this flag is set, the service will be restarted when a new address becomes available. Otherwise; the service will not be restarted.
Instance Config Parameters

Configuration settings
var params = new Nat.Params;
// Instance config-params object
    params.ifIdx = Int 1;
    // The physical device index on which the NAT server shall be executed. Must be greater than zero
    params.mode = Int 0;
    // Set of flags which represent the desired behavior of the telnet Server
    params.mtu = Int 1500;
    // Specifies the IP MTU limit (1500 for ethernet, 1492 for PPPoE, ...)
    params.pCbSrv = Void(*)(Int,Int,Int,Void*) "&ti_ndk_config_Global_serviceReport";
    // Nat service reporting function
    params.virtualIpAddr = String null;
    // Specifies the NAT group virtual network IP address
    params.virtualMask = String "255.255.254.0";
    // Specifies the subnet mask of the NAT group virtual network
 
config Nat.Params.ifIdx  // instance

The physical device index on which the NAT server shall be executed. Must be greater than zero

Configuration settings
var params = new Nat.Params;
  ...
params.ifIdx = Int 1;
 
 
config Nat.Params.mode  // instance

Set of flags which represent the desired behavior of the telnet Server

Configuration settings
var params = new Nat.Params;
  ...
params.mode = Int 0;
 
DETAILS
The following flag values may be set either individually, or by or-ing flags together:
  • CIS_FLG_IFIDXVALID - specifies if the IfIdx field is valid.
  • CIS_FLG_RESOLVEIP - Requests that IfIdx be resolved to an IP address before service execution is initiated.
  • CIS_FLG_CALLBYIP - Specifies that the service should be invoked by IP address
  • CIS_FLG_RESTARTIPTERM - A service that is dependent on a valid IP address.
 
config Nat.Params.mtu  // instance

Specifies the IP MTU limit (1500 for ethernet, 1492 for PPPoE, ...)

Configuration settings
var params = new Nat.Params;
  ...
params.mtu = Int 1500;
 
 
config Nat.Params.pCbSrv  // instance

Nat service reporting function

Configuration settings
var params = new Nat.Params;
  ...
params.pCbSrv = Void(*)(Int,Int,Int,Void*) "&ti_ndk_config_Global_serviceReport";
 
 
config Nat.Params.virtualIpAddr  // instance

Specifies the NAT group virtual network IP address

Configuration settings
var params = new Nat.Params;
  ...
params.virtualIpAddr = String null;
 
 
config Nat.Params.virtualMask  // instance

Specifies the subnet mask of the NAT group virtual network

Configuration settings
var params = new Nat.Params;
  ...
params.virtualMask = String "255.255.254.0";
 
Static Instance Creation

Configuration settings
var params = new Nat.Params;
// Allocate instance config-params
params.config =   ...
// Assign individual configs
 
var inst = Nat.create(params);
// Create an instance-object
generated on Tue, 25 Aug 2020 01:58:55 GMT