SWAT MAGAZINE ISSUE EIGHTEEN: JUNE 1999 ============================================ NETWORK INTERFACE ============================================ Author : Netw0rk Bug E-Mail : bug@netw0rk.freeserve.co.uk Date : JUNE 1999 ============================================ OK, I am going to talk about Netw0rk Interface this month. This layer transmits and receives datagrams over a particular physical netw0rk and is specific to the characteristics of that netw0rk - e.g. WAN's, Ethernet LAN's, The Internet? SLIP/PPP ^^^^^^^^ IP is designed for routing in a large netw0rk. Many home and small business users only own a single modem and dial up into the Internet via a normal telephone line. The server that they dial requires all the sophistication of IP for its connection to the Internet but only requires a simpler system to interface to the dial up line. The first protocol to allow telephone/modem connections to TCP/IP was SLIP (Serial Line Internet Protocol) and an improved version is PPP (Point To Point Protocol). This consists of a driver to the computer's serial port and out to a SLIP or PPP server. PORT NUMBERS ^^^^^^^^^^^^ A server processes many different stations at any one time. Each process has to be identified with a particular station to ensure that datagrams do not get hopelessly mixed. Each process is identified by a 16-bit port number and this is generated by the aplication process initiating the contact. The more popular server aplications are allocated their own port numbers like TELNET for example which is on port 23 and FTP on port 21. A computer wishing to initiate a file transfer would specify its own port number as, say 4321, while requesting a remote port 21. WINSOCK ^^^^^^^ The combination of address and port number is referred to as a "Socket". The TCP/IP software is known as the "Protocol Stack" and is implemented as either a DOS TSR, a Windows 3.1 DLL or a Windows 95/98 VxD. The trumpet Winsock package and windows 95 both provide SLIP and PPP drivers. Winsock (Windows Socket Application Programming Interface) is the interface between a Windows version of a client aplication, such as FTP, and the TCP/IP protocol stack. The appliction calls routines from the Winsock DLL and it calls routines from the TCP/IP drivers. Each commercial implementation of a TCP/IP ptotocol stack will supply its own Winsock.dll to work with its own proprietary brand of stack. In this way, writers of applications do not need to know what stack is in use, since it will always communicate with the winsock DLL and let it carry out the operations to the stack. Applications that do not make use of Winsock have to write their own interface to the TCP/IP protocol stack.