This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/MSP432E401Y: NDK Routing Table

Part Number: MSP432E401Y

Tool/software: TI-RTOS

Hi,

I'm trying to add a routing table to my configuration. Is this correct?

static void initIp(void *hCfg)
{
	CI_IPNET ip_cfg;
	CI_ROUTE ip_route;


//extern int  CfgAddEntry( void *hCfg, uint32_t Tag, uint32_t Item, uint32_t Mode, int Size, unsigned char *pData, void **phCfgEntry );

	ip_cfg.NetType = 0;
	ip_cfg.IPAddr = inet_addr("192.168.0.100");
	ip_cfg.IPMask = inet_addr("255.255.255.0");
	strncpy(ip_cfg.Domain, "domain.com", sizeof(ip_cfg.Domain));
	CfgAddEntry(hCfg, CFGTAG_IPNET, 1, 0, sizeof(CI_IPNET), (uint8_t*)&ip_cfg, 0);

	ip_route.IPDestAddr = inet_addr("0.0.0.0");
	ip_route.IPDestMask = inet_addr("0.0.0.0");
	ip_route.IPGateAddr = inet_addr("192.168.0.254");
    CfgAddEntry(hCfg, CFGTAG_ROUTE, 0, 0, sizeof(CI_ROUTE), (uint8_t*)&ip_route, 0);

	ip_route.IPDestAddr = inet_addr("10.0.0.0");
	ip_route.IPDestMask = inet_addr("255.255.255.0");
	ip_route.IPGateAddr = inet_addr("192.168.0.1");
    CfgAddEntry(hCfg, CFGTAG_ROUTE, 0, 1, sizeof(CI_ROUTE), (uint8_t*)&ip_route, 0);
}

**Attention** This is a public forum