In computing, a port (derived from seaport) is usually an interface where data is sent and received. An exception is a software port (derived from transport), which is software that has been "transported" to another computer system (see below for details).
|Table of contents|
2 Network Port
3 I/O or Machine Port
4 Software Port
A hardware port is an outlet on a piece of equipment into which a plug or cable connects. For instance, a computer may have a keyboard port, into which the keyboard is connected.
A network port is an interface for communicating with a computer program over a network. Network ports are usually numbered and a network implemetation like TCP or UDP will attach a port number to data it sends; the receiving implementation will use the attached port number to figure out which computer program to send the data to.
- See also: List of well known ports
I/O or Machine PortNearly all processor families use the same assembly instructions for both memory access and hardware I/O (see memory-mapped I/O for details). However, Intel microprocessors have assembly instructions (IN and OUT) that are used specifically for hardware I/O. These instructions figure out which hardware device to communicate with using the concept of an I/O port or machine port. These ports are numbered based on which hardware device they refer to.
Intel microprocessors generally allow one octet to be sent or received during each instruction. The hardware device decides how to interpret data sent to it and what data to send to the processor. For example, a common use is to ask a hardware device which byte (in a data transfer) it will be sending next.
Software is sometimes written for specific processors, operating systems, or programming interfaces. A software port is software that has been changed to work on another system. See porting for details.