next up previous
Next: 6.0.1 The Socket() call Up: Simulation Environment Overview 15-441 Previous: 5.3 Getting packets received


6 The Socket API

The socket layer provides an API (application program interface) for user programs to access the networking functionality of the kernel. In project 1, you wrote your FTP server using the socket API provided by the Solaris kernel, for example, socket(), bind(), accept(), etc. These calls are ``system calls'' provided by the kernel so that user programs can use kernel functionalities.

For user programs to interface to the simulator, you can use the following socket calls: Socket(), Close(), Bind(), Read(), Write(), Sendto(), Recvfrom(), and Setsockopt(). Their prototypes are defined in $PDIR/include/Socket.h (this header file should be included by user programs, not your kernel). There are two important issues regarding these calls:



Subsections
next up previous
Next: 6.0.1 The Socket() call Up: Simulation Environment Overview 15-441 Previous: 5.3 Getting packets received