Use this command to add an Internet server application entry to the
Internet daemon configuration file (IDCF).
- Server-sname
- specifies the Internet server application name, where sname is
from 1 to 10 alphanumeric characters.
- PROCid-procid
- specifies the processor identifier (ID) for which the IDCF entry is being
defined, where procid is a valid TPF processor ID. If you do
not specify this parameter, the processor ID of the processor from which you
enter this command is used. If you specify a processor other than the
one from which you enter this command, the specified processor must
be inactive.
- Note:
- Do not specify this parameter in a loosely coupled complex where some
processors are using a TPF image that includes 32-way loosely coupled
processor support and other processors are using an image that does
not.
- PGM-progname
- specifies the name of the Internet server application program, where
progname is a 4-character TPF program name.
- MODEL
- specifies the process model used by the Internet server application
program, where:
- WAIT
- specifies that the Internet server application is an iterative or
single-thread program. The Internet daemon listener starts the Internet
server application process with the tpf_fork function and will not
start any more occurrences of the Internet server application process until
the one that is running ends.
- NOWAIT
- specifies that the Internet server application is a concurrent or a
multithread program. The Internet daemon listener starts the Internet
server application process with the tpf_fork function and will
continue to start more occurrences of the Internet server application process
until the value specified with the MAXPROC parameter is reached. If the
value for the MAXPROC parameter is 0, there is no limit.
- AOR
- specifies that the Internet server application is a concurrent or a
multithread program. The AOR process model can be used only for TCP
servers, not UDP servers. The Internet daemon listener starts the
Internet server application process with the activate_on_receipt
function or the activate_on_receipt_with_length function if
AORLENGTH is nonzero, and will continue to start more occurrences of the
Internet server application process until the TPF system cannot handle any
more occurrences.
- NOLISTEN
- specifies that the Internet daemon only starts the Internet server
application. The Internet daemon does not create or monitor any
sockets, nor does it monitor the server application.
- DAEMON
- specifies that the Internet server application is an iterative or
single-thread program. The Internet daemon listener starts the Internet
server application process with the tpf_fork function and will not
start any more occurrences of the Internet server application process until
the one that is running ends. The Internet daemon does not create,
bind, or monitor a socket for this process model. Because the
tpf_fork function returns a process ID, with the DAEMON process
model you can stop a process by using the ZINET STOP command. If the
child process exits before a ZINET STOP command is entered, the parent process
will automatically attempt to activate a new child process.
- Note:
- When using this process model, ensure that your Internet server application
uses the signal function to enable the SIGTERM signal.
- RPC
- specifies that the Internet daemon only starts the Internet server
application. The Internet daemon does not create or monitor any
sockets, nor does it monitor the server application.
- PORT-portnum
- specifies the protocol port number to which the Internet daemon listener
will bind the Internet server application socket, where portnum is a
number from 1 to 65 535.
- Protocol
- specifies the transport protocol that the Internet server application
uses, where:
- TCP
- specifies Transmission Control Protocol (TCP).
- UDP
- specifies User Datagram Protocol (UDP).
- BACKlog-bklogval
- specifies the maximum number of connection requests that can be queued to
a TCP Internet server application before connection requests are rejected
(referred to as the listen backlog value), where bklogval is a number
from 1 to 32 767.
- Note:
- The maximum listen backlog value for TCP/IP offload support is 5. If
the Internet server application is started in a TCP/IP offload environment and
the BACKLOG parameter is set to a value greater than 5, the Internet server
application will use a value of 5.
- IP
- specifies the Internet Protocol (IP) address to which the Internet daemon
listener binds the Internet server application socket, where:
- ANY
- binds the Internet server application socket to INADDR_ANY.
- ipaddr
- is the numeric IP address. To specify more local IP addresses for
an Internet server application, use the ZINET ALTER command with the ADDIP
parameter. An Internet server application can have a maximum of 20
local IP addresses. The Internet daemon will create and monitor a
socket for each IP address.
- ACTivation
- specifies how the Internet server application is started, where:
- AUTO
- instructs the Internet daemon to automatically start the Internet server
application when the Internet daemon is started.
- OPER
- requires you to enter the ZINET START command to start the Internet server
application. The Internet daemon monitor will not create the Internet
daemon listener for the Internet server application until you enter a ZINET
START command.
- PARM-parms
- specifies a parameter string to be passed to the Internet server
application, where parms is a 1- to 8-alphanumeric character
string.
- STATE
- specifies the lowest TPF system state in which the Internet server
application is allowed to run, where:
- NORM
- specifies NORM state.
- CRAS
- specifies CRAS state.
The Internet daemon does not start the Internet server application until
the TPF system reaches the specified state. If the TPF system cycles
below the specified state, the Internet daemon will stop the Internet server
application.
- AORLength-aorl
- specifies the value of the length parameter to be used with the
activate_on_receipt_with_length function call, where aorl
is a number from 0 to 32 767. This parameter only has meaning
when the model type is AOR. If a value of zero is specified or the
default is taken the, activate_on_receipt function is used.
- TIMEout-time
- specifies the amount of time, in seconds, the Internet daemon listener
will allow an Internet server application process instance to exist, where
time is a number from 0 to 32 000.
If you do not specify this parameter or if you specify a value of 0, the
Internet daemon listener will not restrict the time it takes an Internet
server application process instance to run.
If you specify a value greater than 0, you must enable SIGTERM signals in
your Internet server application because if a timeout occurs, the Internet
daemon sends a SIGTERM signal to the Internet server application. Use
the signal function to enable signals in your applications.
See TPF C/C++ Language Support User's Guide for
more information about the signal function.
- MAXPROC-procnum
- specifies the maximum number of Internet server application process
instances for every IP address that the Internet daemon listener allows in the
TPF system, where procnum is a number from 0 to 1000. If the
Internet server application is defined with IP-ANY, the value specified for
the MAXPROC parameter is the limit. If the Internet server application
is defined with more than one IP address, the value specified for the MAXPROC
parameter applies to each IP address.
The MAXPROC parameter is useful only when you specify NOWAIT for the MODEL
parameter. If you specify WAIT for the MODEL parameter, the Internet
daemon listener will use a value of 1 for MAXPROC.
If you specify NOWAIT for the MODEL parameter, and you do not specify the
MAXPROC parameter or you specify a value of 0, the Internet daemon listener
will use a value of 1000.
- SERVErrors-srverr
- specifies the number of Internet server application process instances that
can end in error before the Internet daemon listener stops the Internet server
application, where number is a number from 0 to
32 000.
This is the number of times the Internet daemon listener will allow the
Internet server application to end in error during the sampling interval
specified by the SERVETIME parameter. If the error rate is exceeded,
the Internet daemon listener stops the Internet server application.
Once the Internet server application has been stopped, you must enter the
ZINET START command to start the Internet server application again.
If you do not specify this parameter or if you specify a value of 0, the
Internet daemon listener will not maintain an error rate threshold for the
Internet server application.
- SERVETime-srvint
- specifies the sampling time interval, in seconds, that the Internet daemon
listener uses to determine the Internet server application error rate
threshold, where interval is a number from 0 to
32 000.
If you do not specify this parameter or if you specify a value of 0, the
Internet daemon listener will not maintain an error rate threshold for the
Internet server application.
- USER-username
- specifies the user name of the Internet server application, where
username is a 1- to 20-character alphanumeric name. You must
specify one of the TPF-supplied user names listed in the TPF C/C++ Language Support User's Guide for this
parameter.
The Internet daemon uses the specified user name to retrieve information
about the Internet server application from the password file. The
Internet server application is started with the user ID, group ID, and working
directory information found in the password file entry.
- Note:
- The user name entered is converted to lowercase; for example, if you
enter USER-HTTP, the user name will be stored and displayed as http.
- XPARM-args
- passes a string of parameter data to the argv parameter of the
main function defined in the specified Internet server application
program, where args is the string of parameter data. The
string is case sensitive and can contain any alphanumeric or special
characters. End the string with a new-line character (the Enter
key).
If you specify this parameter, it must be the last parameter in
the command entry and you must specify a string of parameter
data; specifying a NULL string will cause problems when starting the
Internet server application.
The following example defines the Trivial File Transfer Protocol (TFTP)
server application to the IDCF.
The following example defines the Apache (HTTP) server application to the
IDCF. The -f argument will be passed to the QZZ8 program in the
argv parameter of the main function.