nachos.network
Class NetProcess

java.lang.Object
  |
  +--nachos.userprog.UserProcess
        |
        +--nachos.vm.VMProcess
              |
              +--nachos.network.NetProcess

public class NetProcess
extends VMProcess

A VMProcess that supports networking syscalls.


Fields inherited from class nachos.userprog.UserProcess
coff, numPages, pageTable, stackPages
 
Constructor Summary
NetProcess()
          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

NetProcess

public NetProcess()
Allocate a new process.
Method Detail

handleSyscall

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);
Overrides:
handleSyscall in class VMProcess
Parameters:
syscall - the syscall number.
a0 - the first syscall argument.
a1 - the second syscall argument.
a2 - the third syscall argument.
a3 - the fourth syscall argument.
Returns:
the value to be returned to the user.