Class NetProcess

  extended by nachos.userprog.UserProcess
      extended by nachos.vm.VMProcess
          extended by

public class NetProcess
extends VMProcess

A VMProcess that supports networking syscalls.

Field Summary
Fields inherited from class nachos.userprog.UserProcess
coff, numPages, pageTable, stackPages
Constructor Summary
          Allocate a new process.
Method Summary
 int handleSyscall(int syscall, int a0, int a1, int a2, int a3)
          Handle a syscall exception.
Methods inherited from class nachos.vm.VMProcess
handleException, loadSections, restoreState, saveState, unloadSections
Methods inherited from class nachos.userprog.UserProcess
execute, initRegisters, newUserProcess, readVirtualMemory, readVirtualMemory, readVirtualMemoryString, writeVirtualMemory, writeVirtualMemory
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public NetProcess()
Allocate a new process.

Method Detail


public int handleSyscall(int syscall,
                         int a0,
                         int a1,
                         int a2,
                         int a3)
Handle a syscall exception. Called by handleException(). The syscall argument identifies which syscall the user executed:
syscall#syscall prototype
11int connect(int host, int port);
12int accept(int port);

handleSyscall in class UserProcess
syscall - the syscall number.
a0 - the first syscall argument.
a1 - the second syscall argument.
a2 - the third syscall argument.
a3 - the fourth syscall argument.
the value to be returned to the user.