![Texas TMS320C6000 Programmer'S Reference Manual Download Page 104](http://html.mh-extra.com/html/texas/tms320c6000/tms320c6000_programmers-reference-manual_1093844104.webp)
Generic Support Calls
5-2
5.1
Generic Support Calls
5.1.1
Synopsis
This section contains a selection of functions that can be very useful when pro-
gramming network applications. Some are standard Berkeley while others are
custom to the stack – designed to save the programmer the time and trouble
of programming directly to the stack API.
5.1.2
Function Overview
The following is a summary of the support functions described in this section:
inet_addr()
Convert a string to a 32 bit IP address
in network format
inet_aton()
Convert a string to an in_addr structure
record
NtAddNetwork()
Add a host network to a logical interface
handle
NtRemoveNetwork()
Remove a network added with NtAdd-
Network()
NtAddStaticGateway()
Add a static gateway route to the route
table
NtRemoveStaticGateway()
Remove a static gateway route
NtIfIdx2Ip()
Get the IP host address assigned to a
physical interface index
NtGetPublicHost()
Get the system public IP address and
domain name
NtIPN2Str()
Convert 32 bit IP address in network
format to string
5.1.3
Network Tools Support API Functions
Return 32-bit binary Network Ordered IPv4 Address
inet_addr
Syntax
IPN inet_addr( char *strptr );
Parameter(s)
strptr
Pointer character string
Return Value
IP address or NULL
Description
This function converts an IP address printed in a character string to a 32bit net-
work ordered IP address value. Note that leading 0’s in the address string are
interpreted as octal. The function returns NULL on failure.