Catalyst Development An Introduction to TCP/IP Programming
PreviousNext
  
1.4 Service Ports
  
In addition to the IP address of the remote system, an application also needs to know how to address the specific program that it wishes to communicate with. This is accomplished by specifying a service port, a 16-bit number that uniquely identifies an application running on the system. Instead of numbers, however, service names are usually used instead. Like hostnames, service names are usually matched to port numbers through a local file, commonly called services. This file lists the logical service name, followed by the port number and protocol used by the server.

A number of standard service names are used by Internet-based applications and these are referred to as well-known services. Some common services are: 

  
Service Name Function
echo Used to echo data back to the program that sent it. This is commonly used to test an application to make sure that a network connection can be established successfully.
ftp Used to transfer files between computer systems using the File Transfer Protocol.
telnet Used to provide terminal emulation services for the remote host.
smtp Used to send electronic mail to a remote host using the Simple Mail Transfer Protocol.
  
Remember that a service name or port number is a way to address an application running on a remote host. Because a particular service name is used, it doesn't guarantee that the service is available, just as dialing a telephone number doesn't guarantee that there is someone at home to answer the call.
  
Top
 
Copyright © 1997 Catalyst Development Corporation. All Rights Reserved.