The TCP configuration API library module has the file name ipconfig.c. This module provides high level management of TCP configuration details. Both client and server applications can make use of the TCP configuration API. The use of this module is not mandatory. This module contains no socket function calls. Note that any mention of QNX in this document refers to the QNX 4.x OS.
Since the Future Lab QNX platform software does not use TCP for interprocess communication (QNX native message passing is the IPC), this module is not available for QNX.
This module is obsolete and not used by any of the Future Lab GPL software. With the introduction of socloc and the TCP configuration management that it provides, this module is no longer necessary. This module is not going to be removed as it might come to be of some use.
Here is a list of functions in the TCP client socket API library module:
As mentioned above, this module does not call any socket functions. It is possible to use this module by itself, but this does not make any sense unless you just need to read and parse the TCP configuration file. Typically, the following modules are required along with this module:
Just make sure you compile and link this module along with the other required modules.
TCP configuration details are contained in an ASCII file with each line specifying a keyword and a single value. The IPC configuration file can contain two settings. They are:
Port specifies the port that the server listens to. Host is the host name of the server. Note that the port number must be a valid decimal number and the host name must be quoted (single or double quotes, but they must match) if it contains a space.
A server application only uses the port item (as the current machine host name becomes the host name of the server). A client application uses both configuration items.
This method of managing TCP configuration details requires a TCP configuration file to be present with both the client and server. In addition, if the client needs to connect to multiple socket servers, a TCP configuration file will be required for each socket server. Socloc was built to solve all TCP configuration issues.
This module requires the header files:
Prototype : int ipc_config_read(char *fname, char *host_name, int *port) Parameters : Name : fname Description: drive/path/name of TCP config file Name : host_name Description: host name of server Name : port Description: port number of server Returns : IPC_CONFIG_OK upon success, error code otherwise
This function will read and parse the TCP configuration file. If the read/parse was successful, the host name and port number will be loaded. Codes that this function returns are defined in ipconfig.h.
Prototype : void ipc_config_code_string(int ret, char *mes) Parameters : Name : ret Description: IPC config code Name : mes Description: English message buffer
This function will translate a TCP configuration code to English.