dumsockc GPL Application

Dumsockc stands for the client of the dumsocks server. This GPL application will connect and send/receive data from/to any dumsocks server. This application uses either TCP sockets or QNX native message passing as the IPC. Note that any mention of QNX in this document refers to the QNX 4.x OS.

The application also uses the socloc APIs to interface to the socloc server.

Dumsockc is a command line text application. All commands and all common socket codes for socket servers have been implemented by command keywords. Note that the QNX version of this application does not use or require socloc.

The dumsocks server understands only a limited number of command codes. All command codes that the dumsocks server understands have been implemented in the dumsockc client.

Since dumsockc program uses the socloc APIs (TCP only), you first must create the socloc startup file which should contain a list of suggested socloc servers. The list may be incomplete but at least one entry must describe an active socloc server. The socloc startup file must be located in the current directory when you execute the dumsockc program.

When dumsockc is executed, it will attempt to connect to a socloc server listed in the socloc startup file. The application will then attempt to find a running dumsocks server. Once a proper connection has been established to both servers, the current socloc config list will be obtained from the socloc server. This list will be used to replace the socloc config list loaded from the socloc startup file.

The dumsockc program can maintain two current connections at the same time. One connection is for the socloc server and the other is a connection to the dumsocks server. When commands are issued they could apply to the socloc server or the dumsocks server. Any dumsocks server you wish to communicate with must already be running and registered with the socloc server. The program works by presenting a status line and command prompt. The user then enters a command followed by enter or return. Here is the basic format of the status line:

dumsockc/dh[dp]

Where dh is the current dumsocks server host and dp is the TCP port number. The details of the current socloc server are not part of the status line (although there are commands to obtain the current socloc server details).

Here is a list of all dumsockc commands:

The dumsockc application can be compiled on all stated platforms except DOS where there is no TCP IPC method. Under the Linux/Unix/QNX operating systems, the dumsockc application can be compiled using the mkdumsockc script.

Dumsockc Commands

Here are all of the dumsockc commands in the order that they are presented in the source module :

term

Syntax     : term passwd
Used With  : dumsocks server
IPC        : all
Parameters :
      Name : passwd
Description: termination password

This command will attempt to send a termination request to the current dumsocks server. The passwd must exactly match the server termination password (including case). Upon success, this command will cause a socket server to terminate. In order for this command to function properly, the dumsocks server must be able to interpret the common socket code SOCKET_SEND_TERM.

status

Syntax     : status
Used With  : dumsocks server
IPC        : all

This command will send a status request to the current dumsocks server. In order for this command to function properly, the dumsocks server must be able to interpret the common socket code SOCKET_SEND_STATUS.

client.log.on

Syntax     : client.log.on [lfname]
Used With  : dumsockc client
IPC        : all
Parameters :
      Name : lfname
Description: client log destination (file name or sys_log

This command will turn dumsockc client logging on. The optional log destination (lfname) can be used to specify a file name if local logging is desired or sys_log if the system log server is desired. If lfname is not present, the default log file (DUM_LOG_FILE as defined in dumsockc.c) will be used. A check will be made to make sure that client logging is not already on. If client logging is on and you wish to change the log file, you must stop the log first by using the client.log.off command.

client.log.off

Syntax     : client.log.off
Used With  : dumsockc client
IPC        : all

This command will turn dumsockc client logging off. A check will be made to make sure that client logging is not already off.

client.log.status

Syntax     : client.log.status
Used With  : dumsockc client
IPC        : all

This command will obtain the current client log status (on or off).

server.log.on

Syntax     : server.log.on [lfname]
Used With  : dumsocks server
IPC        : all
Parameters :
      Name : lfname
Description: server log destination (file name or sys_log)

This command will turn dumsocks server logging on. The optional log destination (lfname) can be used to specify a file name or sys_log. Remember that the server log file is maintained by the dumsocks server and must be specified in accordance with the server platform. If lfname is not present, the default log file for that server will be used. A check will be made to make sure that server logging is not already on. If server logging is on and you wish to change the log file, you must stop the log first by using the server.log.off command.

server.log.off

Syntax     : server.log.off
Used With  : dumsocks server
IPC        : all

This command will turn logging off on the current dumsocks server. A check will be made to make sure that server logging is not already off. In order for this command to function properly, the dumsocks server must be able to interpret the common socket code SOCKET_SEND_LOG_OFF.

server.log.status

Syntax     : server.log.status
Used With  : dumsocks server
IPC        : all

This command will obtain the current dumsocks server log status (on or off).

socloc.log.on

Syntax     : socloc.log.on [lfname]
Used With  : socloc server
IPC        : TCP
Parameters :
      Name : lfname
Description: server log file name

This command will turn socloc server logging on. The optional log file name (lfname) can be used to specify a file name. Remember that the server log file is maintained by the socloc server and must be specified in accordance with the server platform. If lfname is not present, the default log file for that server will be used. A check will be made to make sure that server logging is not already on. If server logging is on and you wish to change the log file, you must stop the log first by using the socloc.log.off command. In order for this command to function properly, the socloc server must be able to interpret the common socket code SOCKET_SEND_LOG_ON.

Note that you may not set the socloc server log to sys_log (the system log server).

socloc.log.off

Syntax     : socloc.log.off
Used With  : socloc server
IPC        : TCP

This command will turn logging off on the current socloc server. A check will be made to make sure that server logging is not already off. In order for this command to function properly, the socloc server must be able to interpret the common socket code SOCKET_SEND_LOG_OFF.

socloc.log.status

Syntax     : socloc.log.status
Used With  : socloc server
IPC        : TCP

This command will obtain the current socloc server log status (on or off). In order for this command to function properly, the socloc server must be able to interpret the common socket code SOCKET_SEND_LOG_STATUS.

connect

TCP Syntax : connect sconnect
QNX Syntax : connect
Used With  : dumsocks server
IPC        : all
Parameters :
      Name : sconnect
Description: connect string

This command will establish a connection to a dumsocks server overriding any current dumsocks server connection. Note that only a connection to a dumsocks server is allowed and therefore, the service parameter of the connect string is not allowed.

socloc.get.list

Syntax     : socloc.get.list
Used With  : socloc server
IPC        : TCP

This command will obtain the current socloc server socket server list. The list will be displayed on the dumsockc client screen.

socloc.config.get.list

Syntax     : socloc.config.get.list
Used With  : socloc server
IPC        : TCP

This command will obtain the current socloc server config list. The list will be displayed on the dumsockc client screen.

socloc.get

Syntax     : socloc.get
Used With  : socloc server
IPC        : TCP

This command will obtain the current socloc server details including the host name, TCP port number and optionally the IP address. These details are obtained from the main socloc API module.

socloc.version

Syntax     : socloc.version
Used With  : socloc server
IPC        : TCP

This command will obtain the current socloc server version string. In order for this command to function properly, the socloc server must be able to interpret the common socket code SOCKET_SEND_VERSION.

version

Syntax     : version
Used With  : dumsocks server
IPC        : all

This command will obtain the current dumsocks server version string. In order for this command to function properly, the dumsocks server must be able to interpret the common socket code SOCKET_SEND_VERSION.

socloc.trans.num

Syntax     : socloc.trans.num
Used With  : socloc server
IPC        : TCP

This command will fetch and display the transaction count of the current socloc server. In order for this command to function properly, the socloc server must be able to interpret the common socket code SOCKET_SEND_TRANS_NUM.

socloc.connect.num

Syntax     : socloc.connect.num
Used With  : socloc server
IPC        : TCP

This command will fetch and display the connection count of the current socloc server. In order for this command to function properly, the socloc server must be able to interpret the common socket code SOCKET_SEND_CONNECT_NUM.

trans.num

Syntax     : trans.num
Used With  : server
IPC        : all

This command will fetch and display the transaction count of the current server. In order for this command to function properly, the server must be able to interpret the common socket code SOCKET_SEND_TRANS_NUM.

connect.num

Syntax     : connect.num
Used With  : server
IPC        : TCP

This command will fetch and display the connection count of the current server. In order for this command to function properly, the server must be able to interpret the common socket code SOCKET_SEND_CONNECT_NUM.

Goto Top | Future Lab Home | Contact Webmaster | Feedback

Copyright © 2000-2006 Future Lab, Last Updated Jun 25, 2006