gtpc1m2xTransmission Control Protocol/Internet Protocol

TCP/IP Network Services Database File

The TCP/IP network services database is created from information you define in a file called /etc/services. The /etc/services file contains entries for each application in the database. To set up or modify the TCP/IP network services database, do the following:

  1. Create or modify the /etc/services file by doing one of the following:
    • Use the ZFILE commands to create or update the file directly on your TPF system.
    • Create or modify the file on another system and use Trivial File Transfer Protocol (TFTP) or File Transfer Protocol (FTP) to transfer the file to the basic subsystem (BSS) of your TPF system.
  2. From the BSS, enter ZIPDB REFRESH to refresh the file and copy it to core storage. The definitions take effect immediately after you enter this command.
    Note:
    Information from the TCP/IP network services database file is also read into core storage during system restart.

See TPF Operations for information about the ZFILE and ZIPDB commands.

To prevent port number conflicts with client sockets, define all TPF TCP/IP server applications that have a port number in the range 1024-5000 in the TCP/IP network services database.

TCP/IP Network Services Database File Syntax

You can define a maximum of 1000 applications in the TCP/IP network services database file. Each line of the /etc/services file has the following syntax:


applname
is the 1- to 9-character name of the application to be defined in the TCP/IP network services database. Do not define an application with the name of OTHER; this name is reserved for IBM use.

port
is the port associated with the specified application.

protocol
is the protocol associated with the specified application. Specify one of the following:

TCP
specifies the Transmission Control Protocol (TCP).

UDP
specifies the User Datagram Protocol (UDP).

tos-tosval
specifies the differentiated services codepoint value to use for the network priority of outbound TPF IP packets for the specified application, where tosval is a value from 0 to 255. If you do not specify this parameter, the value defined by the IPTOS parameter on the SNAKEY macro is used.

weight-weightval
specifies the weighting factor to use when counting the messages for the specified application, where weightval is a value from 1 to 1000. A value of 100 equals one message. If you do not specify this parameter, messages will be counted as socket reads and writes. See Data Collection and Reduction for more information about how TCP/IP messages are counted.

#comment
is a comment associated with this entry. You can also code a comment on a separate input line. In general, blank lines and lines beginning with a # symbol are ignored.

The following shows some sample entries:

rip          520/udp    weight-50             #RIP
smtp          25/tcp                          #Simple Mail Transfer Protocol
mq          1414/tcp    tos-5 weight-100      #MQ Series
dns           53/udp    tos-10                #DNS
 

TCP/IP Network Services Database File Example

Figure 22 shows an example of a TPF /etc/services file with definitions for the TCP/IP server applications that are shipped with the TPF system. Table 6 provides information about the definition of input and output messages for each of these applications.

Figure 22. /etc/services File Example. In this example, port1 and port2 represent the server ports that are defined for the RPC and TPFAR applications in your TPF system.


ftp-data           20/tcp    weight-100      #FTP data 
ftp-ctl            21/tcp    weight-100      #FTP control 
smtp               25/tcp    weight-100      #Simple Mail Transfer Protocol
dns                53/udp    weight-100      #DNS 
tftp               69/udp    weight-100      #Trivial File Transfer 
http               80/tcp    weight-100      #World Wide Web 
pop3              110/tcp    weight-100      #Post Office Protocol - Version 3 
imap              143/tcp    weight-100      #Internet Message Access Protocol 
snmp              161/udp    weight-100      #SNMP 
snmp-trap         162/udp    weight-100      #SNMP trap 
matipa            350/tcp    weight-100      #MATIP Type A 
matipb            351/tcp    weight-100      #MATIP Type B 
https             443/tcp    weight-100      #Secure HTTP 
rip               520/udp    weight-100      #RIP 
mq               1414/tcp    weight-100      #MQ 
ipbridge         9500/tcp    weight-100      #IPBRIDGE 
rpc             port1/tcp    weight-100      #RPC 
tpfar           port2/tcp    weight-100      #TPFAR

Table 6. Message Definitions for TPF TCP/IP Server Applications

Application Input Message Definition Output Message Definition
FTP-DATA File transferred to the TPF system by using FTP File sent from the TPF system by using FTP
FTP-CTL FTP connection request received FTP connection request accepted
SMTP Mail message received Mail message sent
DNS DNS request received Response to a DNS request sent
TFTP File transferred to the TPF system by using TFTP File sent from the TPF system by using TFTP
HTTP Each HTTP request received Response to an HTTP request sent
POP3 POP3 command received POP3 command response sent
IMAP IMAP command received IMAP command response sent
SNMP SNMP request received SNMP response sent
SNMP-TRAP N/A SNMP trap sent to the SNMP manager
MATIPA Each MATIP Type A message received Each MATIP Type A message sent
MATIPB Each MATIP Type B message received Each MATIP Type B message sent
HTTPS Each secure HTTP request received Response to a secure HTTP request sent
RIP RIP request received RIP response or unsolicited RIP message sent
MQ Each MQSeries message received Each MQSeries message sent
IPBRIDGE Each input message sent over the IP bridge Each output message sent over the IP bridge
RPC Each RPC message received from the client Each RPC message sent to the client
TPFAR SQL response received from DB2 SQL request that causes a flow to DB2