![]() |
![]() |
High level NDK stack configuration and settings. Use this module to configure stack size, task priority, operating mode of the NDK scheduler, and user hook functions.
General.ipv6 = false; | // Enable IPv6 support |
General.hostname = 'tisoc'; | // Hostname |
General.maxNumSocks = 10; | // Maximum Number of Sockets |
General.localIPAddrConfig = 'Use DHCP to Obtain IP Address'; | // Local IP Address Configuration |
General.staticIPAddr = '0.0.0.0'; | // Static IP Address |
General.ipMask = '255.255.255.0'; | // IP Mask |
General.gatewayIpAddr = '0.0.0.0'; | // Gateway IP Address |
General.domainName = 'demo.net'; | // Domain Name |
General.dhcpcServReportFxn = ''; | // Service Report Function Used by DHCP |
General.tcpTxBufSize = 8192; | // TCP Transmit Buffer Size |
General.tcpRxBufSize = 8192; | // TCP Receive Buffer Size (Copy Mode) |
General.tcpRxBufLimit = 8192; | // TCP Receive Size Maximum (Non-Copy Mode) |
General.udpRxBufSize = 8192; | // UDP Receive Buffer Size |
General.beginHook = ''; | // Network Stack Begin Callback |
General.initHook = ''; | // Network Stack Initialization Callback |
General.rebootHook = ''; | // Network Stack Reboot Callback |
General.deleteHook = ''; | // Network Stack Delete Callback |
General.networkOpenHook = ''; | // Network Start Callback |
General.networkCloseHook = ''; | // Network Stop Callback |
General.networkIPAddrHook = ''; | // Network IP Address Callback |
General.numPBMFrames = 10; | // Number of PBM Frames |
General.pbmFrameBufSize = 1536; | // PBM Frame Buffer Size |
General.pbmDataSection = '.bss:NDK_PACKETMEM'; | // PBM Data Section |
General.pageSize = 3072; | // Page Size |
General.numPages = 6; | // Number of Pages |
General.bufDataSection = '.bss:NDK_MMBUFFER'; | // Buffer Data Section |
General.enableExtDNS = false; | // Enable External DNS Server |
General.externDNSServIPAddr = '0.0.0.0'; | // External DNS Server IP Address |
General.netTaskSchedulerTaskPri = 'NC_PRIORITY_LOW'; | // Network Task Scheduler Task Priority |
General.ndkTickPeriod = 100; | // NDK Tick Period |
General.netSchedulerOpMode = 'NC_OPMODE_INTERRUPT'; | // Network Scheduler Operating Mode |
General.stackThreadPriLevel = 5; | // Stack Thread Priority Level |
General.ndkThreadStkSize = 8192; | // Stack Thread Stack Size |
General.lowPriTaskPriLevel = 3; | // Low Priority Tasks Priority Level |
General.lowPriTaskDefStkSize = 3072; | // Low Priority Tasks Default Stack Size |
General.normPriTaskPriLevel = 5; | // Normal Priority Tasks Priority Level |
General.normPriTaskDefStkSize = 4096; | // Normal Priority Tasks Default Stack Size |
General.highPriTaskPriLevel = 7; | // High Priority Tasks Priority Level |
General.highPriTaskDefStkSize = 5120; | // High Priority Tasks Default Stack Size |
General.kernPriLevel = 9; | // Kernel Priority Level |
General.stackThreadUser = ''; | // User NDK thread function |
General.enableCodeGeneration = true; | // Enable Code Generation |
Enable IPv6 support
[General.ipv6 = false]
|
Hostname
[General.hostname = 'tisoc']
|
Add our device hostname to configuration (to be claimed in all connected domains)
This translates directly into the following runtime call to CfgAddEntry().
unsigned char *hostname = YOUR_CONFIGURED_VALUE;
CfgAddEntry(hCfg, CFGTAG_SYSINFO, CFGITEM_DHCP_HOSTNAME, 0,
strlen(hostname), hostname, 0);
Maximum Number of Sockets
[General.maxNumSocks = 10]
|
Local IP Address Configuration
[General.localIPAddrConfig = 'Use DHCP to Obtain IP Address']
|
Valid options include the following:
'Use DHCP to Obtain IP Address' |
| |
'Enable Static IP Address' |
| |
'Do Not Configure an IP Address' |
|
Static IP Address
[General.staticIPAddr = '0.0.0.0']
|
Gateway IP Address
[General.gatewayIpAddr = '0.0.0.0']
|
Domain Name
[General.domainName = 'demo.net']
|
Service Report Function Used by DHCP
[General.dhcpcServReportFxn = '']
|
TCP Transmit Buffer Size
[General.tcpTxBufSize = 8192]
|
Sets the default size (in bytes) of the TCP send buffer
This translates directly into the following runtime call to CfgAddEntry().
uint32_t transmitBufSize = YOUR_CONFIGURED_VALUE;
CfgAddEntry(hCfg, CFGTAG_IP, CFGITEM_IP_SOCKTCPTXBUF, CFG_ADDMODE_UNIQUE,
sizeof(uint32_t), (unsigned char *)&transmitBufSize, NULL);
TCP Receive Buffer Size (Copy Mode)
[General.tcpRxBufSize = 8192]
|
Sets the default size (in bytes) of the TCP receive buffer
This translates directly into the following runtime call to CfgAddEntry().
uint32_t receiveBufSize = YOUR_CONFIGURED_VALUE;
CfgAddEntry(hCfg, CFGTAG_IP, CFGITEM_IP_SOCKTCPRXBUF, CFG_ADDMODE_UNIQUE,
sizeof(uint32_t), (unsigned char *)&receiveBufSize, NULL);
TCP Receive Size Maximum (Non-Copy Mode)
[General.tcpRxBufLimit = 8192]
|
Sets the default size (in bytes) of the maximum TCP receive buffer
This translates directly into the following runtime call to CfgAddEntry().
uint32_t receiveBufLimit = YOUR_CONFIGURED_VALUE;
CfgAddEntry(hCfg, CFGTAG_IP, CFGITEM_IP_SOCKTCPRXLIMIT, CFG_ADDMODE_UNIQUE,
sizeof(uint32_t), (unsigned char *)&receiveBufLimit, NULL);
UDP Receive Buffer Size
[General.udpRxBufSize = 8192]
|
Sets the default size (in bytes) of the maximum UDP receive buffer
This translates directly into the following runtime call to CfgAddEntry().
uint32_t udpRxBufSize = YOUR_CONFIGURED_VALUE;
CfgAddEntry(hCfg, CFGTAG_IP, CFGITEM_IP_SOCKUDPRXLIMIT, CFG_ADDMODE_UNIQUE,
sizeof(uint32_t), (unsigned char *)&udpRxBufSize, NULL);
Network Stack Begin Callback
[General.beginHook = '']
|
Optional user defined callback function, called from the NDK stack thread, at the very beginning of the stack thread's execution. This callback is called before the call to NC_SystemOpen(). It will not be passed any arguments.
For more information on stack thread callbacks see the NDK User's Guide.
Network Stack Initialization Callback
[General.initHook = '']
|
Optional user defined callback function, called from the NDK stack thread, as the stack thread is initializing. This callback is called immediately after the stack thread has created a new configuration, CfgNew(), and will be passed the handle to that configuration
For more information on stack thread callbacks see the NDK User's Guide.
Network Stack Reboot Callback
[General.rebootHook = '']
|
Optional user defined callback function, called from the NDK stack thread, when the stack is about to reboot. This function will run immediately after the return from NC_NetStart() and within the while() loop which contains the NC_NetStart() call. It will be passed a handle to the configuration as well as the valued returned from NC_NetStart.
For more information on stack thread callbacks see the NDK User's Guide.
Network Stack Delete Callback
[General.deleteHook = '']
|
Optional user defined callback function, called from the NDK stack thread, when the stack is about to be destroyed. This function will run immediately after exiting from the while() loop which contains the call to NC_NetStart(), but before the subsequent calls to CfgFree(hCfg) and NC_SystemClose(). It will be passed a handle to the configuration as well as the valued returned from NC_NetStart.
For more information on stack thread hooks see the NDK User's Guide.
Network Start Callback
[General.networkOpenHook = '']
|
Optional "Network Start" callback, called when the stack is ready to begin the creation of any application supplied network tasks.
Note that this callback is called during the early stages of the stack startup, and must return in order for the stack to resume operations. It is not passed any arguments.
This callback is internally passed, as the NetStartCb argument, to NC_NetStart() in the config-generated stack thread. For more information, see the NDK API Reference on NC_NetStart().
Network Stop Callback
[General.networkCloseHook = '']
|
Optional "Network Stop" callback, called when the stack is about to shut down. It is not passed any arguments.
This callback is internally passed, as the NetStopCb argument, to NC_NetStart() in the config-generated stack thread. For more information, see the NDK API Reference on NC_NetStart().
Network IP Address Callback
[General.networkIPAddrHook = '']
|
Optional "IP Address" callback, called when an IP address is added to, or removed from, the system. It is passed IPAddr, IfIdx, fAdd arguments.
This callback is internally passed, as the NetIPCb argument, to NC_NetStart() in the config-generated stack thread. For more information, see the NDK API Reference on NC_NetStart().
Number of PBM Frames
[General.numPBMFrames = 10]
|
Sets the number of frames in the Packet Buffer Manager
For more information on the Packet Buffer Manager see the NDK User's Guide.
PBM Frame Buffer Size
[General.pbmFrameBufSize = 1536]
|
Sets the frame buffer size in the Packet Buffer Manager
For more information on the Packet Buffer Manager see the NDK User's Guide.
PBM Data Section
[General.pbmDataSection = '.bss:NDK_PACKETMEM']
|
Defines the memory section used to place the the PBM frame buffer array.
For more information on the Packet Buffer Manager see the NDK User's Guide.
Page Size
[General.pageSize = 3072]
|
Sets the page size for the NDK's memory allocation system.
For more information on the memory allocation system see the NDK User's Guide.
Number of Pages
[General.numPages = 6]
|
Sets the number of pages for the NDK's memory allocation system.
For more information on the memory allocation system see the NDK User's Guide.
Buffer Data Section
[General.bufDataSection = '.bss:NDK_MMBUFFER']
|
Defines the memory section used to place the Memory Manager's allocation pool buffer
For more information on the memory allocation system see the NDK User's Guide.
Enable External DNS Server
[General.enableExtDNS = false]
|
Enable this option if you would like to manually configure an external DNS server rather than receiving one from the DHCP client.
Selecting this option will unlock the External DNS Server IP Address option.
External DNS Server IP Address
[General.externDNSServIPAddr = '0.0.0.0']
|
Use this to specify which external DNS server to use.
This generates the code detailed in the Statically Defined DNS Server section of the NDK User's Guide. Note that you are responsible for writing the code in the DHCP Client's Service Report Function.
Network Task Scheduler Task Priority
[General.netTaskSchedulerTaskPri = 'NC_PRIORITY_LOW']
|
Set the NDK scheduler Task's priority relative to other networking Tasks in the system.
This translates directly into the following runtime call to NC_SystemOpen().
int priority = YOUR_CONFIGURED_VALUE;
rc = NC_SystemOpen(priority, NC_OPMODE_INTERRUPT );
Valid options include the following:
'NC_PRIORITY_LOW' | Low Priority | |
'NC_PRIORITY_HIGH' | High Priority |
NDK Tick Period
[General.ndkTickPeriod = 100]
|
Lets you adjust the NDK heartbeat rate
The default is 100ms, and is created with POSIX apis, so it will function the same in both TIRTOS and FreeRTOS.
Network Scheduler Operating Mode
[General.netSchedulerOpMode = 'NC_OPMODE_INTERRUPT']
|
Set to either Polling Mode (NC_OPMODE_POLLING) or Interrupt Mode (NC_OPMODE_INTERRUPT), and determines when the scheduler attempts to execute. Interrupt mode is used in the vast majority of applications. Note that polling mode attempts to run continuously, so when polling is used, a low priority must be used.
This translates directly into the following runtime call to NC_SystemOpen().
int mode = YOUR_CONFIGURED_VALUE;
rc = NC_SystemOpen(NC_PRIORITY_HIGH, mode);
Valid options include the following:
'NC_OPMODE_POLLING' | Polling | |
'NC_OPMODE_INTERRUPT' | Interrupt |
Stack Thread Priority Level
[General.stackThreadPriLevel = 5]
|
Sets the priority of the generated NDK task ndkStackThread()
This function will ultimately startup the stack
Stack Thread Stack Size
[General.ndkThreadStkSize = 8192]
|
Sets the stack size of the generated NDK task ndkStackThread()
This function will ultimately startup the stack
Low Priority Tasks Priority Level
[General.lowPriTaskPriLevel = 3]
|
Allows you to configure the priority level for network tasks
Set the priority for the macro OS_TASKPRILOW that is used in the call to TaskCreate().
For more information on NDK task priorities see the NDK User's Guide.
Low Priority Tasks Default Stack Size
[General.lowPriTaskDefStkSize = 3072]
|
Allows you to configure the stack size for network tasks
Set the priority for the macro OS_TASKSTKLOW that is used in the call to TaskCreate().
Normal Priority Tasks Priority Level
[General.normPriTaskPriLevel = 5]
|
Allows you to configure the priority level for network tasks
Set the priority for the macro OS_TASKPRINORM that is used in the call to TaskCreate().
For more information on NDK task priorities see the NDK User's Guide.
Normal Priority Tasks Default Stack Size
[General.normPriTaskDefStkSize = 4096]
|
Allows you to configure the stack size for network tasks
Set the priority for the macro OS_TASKSTKNORM that is used in the call to TaskCreate().
High Priority Tasks Priority Level
[General.highPriTaskPriLevel = 7]
|
Allows you to configure the priority level for network tasks
Set the priority for the macro OS_TASKPRIHIGH that is used in the call to TaskCreate().
For more information on NDK task priorities see the NDK User's Guide.
High Priority Tasks Default Stack Size
[General.highPriTaskDefStkSize = 5120]
|
Allows you to configure the stack size for network tasks
Set the priority for the macro OS_TASKSTKHIGH that is used in the call to TaskCreate().
Kernel Priority Level
[General.kernPriLevel = 9]
|
Allows you to configure the NDK kernel level priority.
Note that this only applies when the stack is configured to use priority exclusion (not semaphores).
Tasks enter kernel mode during an llEnter()/llExit() block, during which their priority will be raised to the level specified in this configuration parameter.
For more information on llEnter()/llExit(). See the NDK User's Guide.
User NDK thread function
[General.stackThreadUser = '']
|
User defined stack function that will run instead of the generated ndkStackThread.
Only use your own stack thread if you do not want any of the generated SysConfig content involved with starting up the stack.
If set, the user is responsible for defining the NDK stack thread, which has no return value and has two parameters of type uintptr_t.
For example (C code):
void MYMODULE_stackThreadUser(uintptr_t arg0, uintptr_t arg1);
The user is also responsible for creating the RTOS Clock instance for the NDK 100ms heartbeat, calling appropriate NC_* APIs, and adding the appropriate C run time configuration code that matches the settings of the BIOS config file in the function. (e.g. if configuring the Ip module, the stack thread must call NC_SystemOpen(), 'ti_ndk_config_ip_init(hCfg)', etc.).
For more information on the requirements for a user stack thread see the NDK User's Guide
Enable Code Generation
[General.enableCodeGeneration = true]
|
Only disable this if you know what you are doing. Disableing will prevent any of the NDK stack thread from generating.
This setting is similar to the "User NDK thread function" setting, except it will not even generate the code to start a stack thread.
This module configures the NIMU Device Table by enumerating all your desired network interfaces into the table. This table is required for any NDK application.
You can also configure the IP Options for each NDK Interface here.
If you have already defined NIMU_DEVICE_TABLE_ENTRY NIMUDeviceTable[]
in
your application code you do not need to use this module, however you will also
have to manually configure each table entry's IP Options.
inst.$name = 'CONFIG_NIMU_{num}'; | // Name |
inst.device = 'EMAC'; | // Device |
inst.custom = ''; | // Custom NIMU .init function |
inst.localIPAddrConfig = 'Use DHCP to Obtain IP Address'; | // Local IP Address Configuration |
inst.staticIPAddr = '0.0.0.0'; | // Static IP Address |
inst.ipMask = '255.255.255.0'; | // IP Mask |
inst.gatewayIpAddr = '0.0.0.0'; | // Gateway IP Address |
inst.domainName = 'demo.net'; | // Domain Name |
inst.dhcpcServReportFxn = ''; | // Service Report Function used by DHCP |
Device
[inst.device = 'EMAC' ]
|
Choose the desired interface:
EMAC - Automatically selects the NIMU EMAC driver for your device
Custom - Allows you to manually specify the .init
function for a
NIMU driver.
This option is equivalent to creating a NIMU Device Table entry and setting its .init member.
For more information on NIMU Device Table entries see the NDK User's Guide
Valid options include the following:
'EMAC' |
| |
'Custom' |
|
Custom NIMU .init function
[inst.custom = '' ]
|
Name of the user made .init function to place in the NIMU Device Table. The .init function must be defined in the application code.
This option is equivalent to setting the .init member of a NIMU Device Table entry. .init must point to a valid init function in a NIMU driver.
For more information on NIMU drivers visit the NDK User's Guide
Local IP Address Configuration
[inst.localIPAddrConfig = 'Use DHCP to Obtain IP Address' ]
|
The method to obtain an IP address.
Valid options include the following:
'Use DHCP to Obtain IP Address' |
| |
'Enable Static IP Address' |
| |
'Do Not Configure an IP Address' |
|
Static IP Address
[inst.staticIPAddr = '0.0.0.0' ]
|
The static IPv4 address to be used.
The IP Mask must be set in conjunction with this setting. This translates directly into the following runtime call to. CfgAddEntry().
char *LocalIPAddr = YOUR_CONFIGURED_ADDRESS_VALUE;
char *LocalIPMask = YOUR_CONFIGURED_MASK_VALUE;
char *DomainName = YOUR_CONFIGURED_DOMAIN_VALUE;
/* setup manual IP address */
memset(&NA, 0, sizeof(NA));
NA.IPAddr = inet_addr(LocalIPAddr);
NA.IPMask = inet_addr(LocalIPMask);
strcpy(NA.Domain, DomainName);
NA.NetType = 0;
CfgAddEntry(hCfg, CFGTAG_IPNET, 1, 0,
sizeof(CI_IPNET), (unsigned char *)&NA, 0);
IP Mask
[inst.ipMask = '255.255.255.0' ]
|
Used for manual/static IP configuration. If configuring a static IP, this must be set to a valid ipMask value.
The IP Mask must be set in conjunction with the static IP address setting. This translates directly into the following runtime call to. CfgAddEntry().
char *LocalIPAddr = YOUR_CONFIGURED_ADDRESS_VALUE;
char *LocalIPMask = YOUR_CONFIGURED_MASK_VALUE;
char *DomainName = YOUR_CONFIGURED_DOMAIN_VALUE;
/* setup manual IP address */
memset(&NA, 0, sizeof(NA));
NA.IPAddr = inet_addr(LocalIPAddr);
NA.IPMask = inet_addr(LocalIPMask);
strcpy(NA.Domain, DomainName);
NA.NetType = 0;
CfgAddEntry(hCfg, CFGTAG_IPNET, 1, 0,
sizeof(CI_IPNET), (unsigned char *)&NA, 0);
Gateway IP Address
[inst.gatewayIpAddr = '0.0.0.0' ]
|
Used for manual/static IP configuration. If configuring a static IP, this must be set to the IP address of the gateway.
The gateway IP address must be set in conjunction with the static IP address setting. This translates directly into the following runtime call to. CfgAddEntry().
char *GatewayIP = YOUR_CONFIGURED_VALUE;
memset(&RT, 0, sizeof(RT));
RT.IPDestAddr = 0;
RT.IPDestMask = 0;
RT.IPGateAddr = inet_addr(GatewayIP);
CfgAddEntry(hCfg, CFGTAG_ROUTE, 0, 0,
sizeof(CI_ROUTE), (unsigned char *)&RT, 0);
Domain Name
[inst.domainName = 'demo.net' ]
|
Used for manual/static IP configuration. If configuring a static IP, this must be set to the IP address of the gateway.
The domain name must be set in conjunction with the static IP address setting. This translates directly into the following runtime call to. CfgAddEntry().
char *LocalIPAddr = YOUR_CONFIGURED_ADDRESS_VALUE;
char *LocalIPMask = YOUR_CONFIGURED_MASK_VALUE;
char *DomainName = YOUR_CONFIGURED_DOMAIN_VALUE;
/* setup manual IP address */
memset(&NA, 0, sizeof(NA));
NA.IPAddr = inet_addr(LocalIPAddr);
NA.IPMask = inet_addr(LocalIPMask);
strcpy(NA.Domain, DomainName);
NA.NetType = 0;
CfgAddEntry(hCfg, CFGTAG_IPNET, 1, 0,
sizeof(CI_IPNET), (unsigned char *)&NA, 0);
Service Report Function used by DHCP
[inst.dhcpcServReportFxn = '' ]
|
Optional, user defined service report function to handle DHCP client reports. Note that multiple services (e.g. DNS Server and DHCP Client) can use the same service report function. This function is needed if configuring an external DNS server.
If set, this service report function must be provided by the application, and the function signature must match this prototype:
extern void userDHCPClientServReportFxn(uint32_t item, uint32_t status,
uint32_t report, void *h);
Information on adding your own service report report function can be found in the NDK User's Guide.
If you are configuring an external DNS server you will need to add the code detailed in the following section of the NDK User's Guide to the service report function.
Create and configure DNS Server instances. Multiple DNS server instances are supported, but each one must be configured to have a unique IP address. This means only one instance can be bound to "Any IP Address"
inst.setDNSSIP = 'Any IP Address'; | // Set DNS Server IP Address: |
inst.servReportFxn = ''; | // Service Report Function |
Set DNS Server IP Address:
[inst.setDNSSIP = 'Any IP Address' ]
|
Use this option to choose which device IP address(es) the DNS server will bind itself too.
Any IP Addresses - Binds the service to any IP address on the target. Equivalent to setting IP Address to "0.0.0.0"
By Interface ID - Allows you to choose an interface ID, and the DNS Service will bind to whatever IP that interface receives.
This setting manipulates the common argument structure for NDK services. It alters the Mode field documentated in NDK API Guide.
Valid options include the following:
'Any IP Address' |
| |
'By NDK Interface' |
|
Service Report Function
[inst.servReportFxn = '' ]
|
Optional, user defined service report function to handle DNS Server reports. Note that multiple services (e.g. DNS Server and DHCP Server) can use the same service report function.
If set, this service report function must be provided by the application, and the function signature must match this prototype:
extern void userDNSServerServReportFxn(uint32_t item, uint32_t status,
uint32_t report, void *h);
For more information on service report functions see the NDK User's Guide.
Create and configure DHCP server instances. Multiple DHCP Server instances are supported, but each one must be configured to have a unique NDK Interface.
inst.reportLocalDomainName = false; | // Report Local Domain Name |
inst.reportLocalDNSS = false; | // Report Ourselves as the Local DNS Server |
inst.ifIdx = 1; | // Interface ID |
inst.ipAddrPoolBase = '192.168.1.2'; | // IP Address Pool Base |
inst.ipAddrPoolCount = '253'; | // IP Address Pool Count |
inst.servReportFxn = ''; | // Service Report Function |
Report Local Domain Name
[inst.reportLocalDomainName = false ]
|
Causes DHCPS to report the local domain name assigned to the virtual network to clients. If this flag is not set, DHCPS reports the public domain name to clients
More information on the DHCP Server flags can be found in the NDK API Flag.
Report Ourselves as the Local DNS Server
[inst.reportLocalDNSS = false ]
|
Causes DHCPS to report its own IP address as the local DNS server to clients. If this flag is not set, DHCPS reports the DNS servers as contained in the SYSINFO portion of the configuration.
More information on the DHCP Server flags can be found in the NDK API Flag.
Interface ID
[inst.ifIdx = 1 ]
|
IP Address Pool Base
[inst.ipAddrPoolBase = '192.168.1.2' ]
|
The first IP address (in dotted decimal notation) of the address pool.
More information on the DHCP Server Service can be found in the NDK API Flag.
IP Address Pool Count
[inst.ipAddrPoolCount = '253' ]
|
The number of addresses in the address pool.
More information on the DHCP Server Service can be found in the NDK API Flag.
Service Report Function
[inst.servReportFxn = '' ]
|
Optional, user defined service report function to handle DHCP Server reports. Note that multiple services (e.g. Telnet Server and DHCP Server) can use the same service report function.
If set, this service report function must be provided by the application, and the function signature must match this prototype:
extern void userDHCPServerServReportFxn(uint32_t item, uint32_t status,
uint32_t report, void *h);
For more information on service report functions see the NDK User's Guide.
Create and configure NAT Service. Only one NAT Service instance is supported. The NAT Service needs to be associated with a unique NDK Interface
inst.virtualIpAddr = '0.0.0.0'; | // Virtual IP Address |
inst.virtualIPMask = '255.255.255.0'; | // Virtual IP Mask |
inst.mtu = '1500'; | // MTU |
inst.servReportFxn = ''; | // Service Report Function |
Virtual IP Address
[inst.virtualIpAddr = '0.0.0.0' ]
|
Sets the NAT Group virtual network address
More information on the NAT Service can be found in the NDK API Guide.
Virtual IP Mask
[inst.virtualIPMask = '255.255.255.0' ]
|
Sets the subnet mask of NAT Group virtual network
More information on the NAT Service can be found in the NDK API Guide.
Sets the IP MTU Limit (1500 for Ethernet, 1492 for PPPoE, etc.)
More information on the NAT Service can be found in the NDK API Guide.
Service Report Function
[inst.servReportFxn = '' ]
|
Optional, user defined service report function to handle NAT Server reports. Note that multiple services (e.g. NAT Server and DHCP Server) can use the same service report function.
If set, this service report function must be provided by the application, and the function signature must match this prototype:
extern void userNATServerServReportFxn(uint32_t item, uint32_t status,
uint32_t report, void *h);
For more information on service report functions see the NDK User's Guide.
Create and configure Telnet server instances. Multiple Telnet server instances are supported, but each one must be configured to have a unique port number.
inst.setTelnetIP = 'Any IP Address'; | // Set Telnet IP Address: |
inst.maxCon = 8; | // Maximum Connections |
inst.port = 23; | // Port |
inst.servReportFxn = ''; | // Service Report Function |
inst.callbackFxn = 'ConsoleOpen'; | // Callback Function |
Set Telnet IP Address:
[inst.setTelnetIP = 'Any IP Address' ]
|
Use this option to choose which device IP address(es) the Telnet server will bind itself too.
Any IP Addresses - Binds the service to any IP address on the target. Equivalent to setting the IP Address to "0.0.0.0"
By NDK Interface - Allows you to choose an interface ID, and the Telnet Service will bind to whatever IP that interface receives.
This setting manipulates the common argument structure for NDK services. It alters the Mode field documentated in NDK API Guide.
Valid options include the following:
'Any IP Address' |
| |
'By NDK Interface' |
|
Maximum Connections
[inst.maxCon = 8 ]
|
Sets the maximum number of connections allowed by the telnet server. Must fall between 1 and 24.
More information on the Telnet Server Service can be found in the NDK API Guide.
Port
[inst.port = 23 ]
|
The port number that telnet will accept connections. Typically this port will be 23.
More information on the Telnet Server Service can be found in the NDK API Guide.
Service Report Function
[inst.servReportFxn = '' ]
|
Optional, user defined service report function to handle Telnet Server reports. Note that multiple services (e.g. Telnet Server and DHCP Server) can use the same service report function.
If set, this service report function must be provided by the application, and the function signature must match this prototype:
extern void userTelnetServiceServReportFxn(uint32_t item, uint32_t status,
uint32_t report, void *h);
For more information on service report functions see the NDK User's Guide.
Callback Function
[inst.callbackFxn = 'ConsoleOpen' ]
|
Service report function used by the Telnet server. The default value will use the report function generated by SysConfig.
Information on adding your own service report function can be found in the NDK User's Guide.
SysConfig configuration scripts consist of a sequence of assignments to configuration parameters defined by the modules used in an application. There are two types of assignments: assignments to module-level configuration parameters (that apply to all instances of the module) and assignments to instance-level configuration parameters (which are specific to the instance alone). All configuration parameters have a default value that's used in the event that it's not explicitly set in the configuration script.
Synopsis lines of the form
MOD.paramName = defaultValue
|
Similarily,
inst.paramName = defaultValue
|
For example, the following is a snippet of a SysConfg script that configures the GPIO module and a GPIO instance.