A B C D E F G H I L M N O P R S T U V W

A

ACK - Static variable in class Transport
 
AmphibianManager - class AmphibianManager.
 
AmphibianManager() - Constructor for class AmphibianManager
 
addEvent(long, String, Object, String[], Object[]) - Method in class Manager
 
addEvent(Event) - Method in class SortedEventQueue
Add an event to the queue in a sorted manner.
addLine(String) - Method in class IOThread
 
addLine(String) - Method in class IOThreadEmulator
 
addNeighbor(int, InetAddress, int) - Static method in class TrawlerNodeARPCommands
Return a command to add a neighbor.
addTimer(int, long, Callback) - Method in class Manager
Adds a timer to be fired at deltaT milliseconds in the future
addTimerAt(int, long, Callback) - Method in class Manager
Adds a timer to be fired at time t
addTimerAt(int, long, Callback) - Method in class Simulator
Adds a timer to be fired at time t

B

BROADCAST_ADDRESS - Static variable in class Packet
 
byteArrayToString(byte[]) - Static method in class Utility
Convert a byte[] to a string

C

Callback - class Callback.
Generic class to facilate use of callbacks Also provides a static helper function to get an object of Method that can be passed to the constructor of this class Example: To get a Method object for the method public foo(String str) in class Test: String[] paramTypes = {"java.lang.String"}; Method method = Callback.getMethod("foo", this, paramTypes); Callback cb = new Callback(method, this, "fooTest"); The above code snippet assumes that it is written inside class Test, hence the use of this.
Callback(Method, Object, Object[]) - Constructor for class Callback
Initializes member variables
CommandsParser - class CommandsParser.
CommandsParser -- parses topology and keyboard commands COMMANDS ARE CASE SENSITIVE.
CommandsParser() - Constructor for class CommandsParser
 
callback() - Method in class Event
Returns the callback
close() - Method in class EmulatedNode
Close the the connection to the emulated node
createNewEdge(int, int, EdgeOptions) - Method in class CommandsParser
 
createNewEdge(int, int, EdgeOptions) - Method in class TrawlerCommandsParser
 

D

DATA - Static variable in class Transport
 

E

Edge - class Edge.
Edge stores the specifics about each edge in the topology.
Edge(int, int, EdgeOptions) - Constructor for class Edge
Create a live edge between nodes a and b
EdgeOptions - class EdgeOptions.
Class to represent the edge options: loss rate, delay and bandwidth
EdgeOptions() - Constructor for class EdgeOptions
Initializes loss rate to 0.
EmulatedNode - class EmulatedNode.
Keeps track of information about an emulated node Emulated node uses a TCP socket to talk to the Trawler, but send and receive messages directly to other emulated nodes using UDP.
EmulatedNode(Socket, PrintWriter, int, InetAddress, int) - Constructor for class EmulatedNode
Create a new EmulatedNode
EmulatedNodeServer - class EmulatedNodeServer.
In a seperate thread, this class listens to incoming messages from neighbors and stores the data received
EmulatedNodeServer(DatagramSocket, MultiplexIO) - Constructor for class EmulatedNodeServer
Creates a new EmulatedNodeServer
EmulationCommandsParser - class EmulationCommandsParser.
Parser for the Emulator Emulator is interested in all commands except topology commands
EmulationCommandsParser(Emulator) - Constructor for class EmulationCommandsParser
Create a new parser
Emulator - class Emulator.
Manages an emulated node
Emulator(String, int, int) - Constructor for class Emulator
Create a new emulator
EmulatorARPData - class EmulatorARPData.
Structure for storing data contained in the ARP cache of an emulated node
EmulatorARPData(InetAddress, int) - Constructor for class EmulatorARPData
Create a new structure
EmulatorPacket - class EmulatorPacket.
Packet used by emulated nodes to send data to each other via UDP
EmulatorPacket(int, int, byte[]) - Constructor for class EmulatorPacket
Constructing a new packet
Event - class Event.
An Event is some scheduled task to be performed.
Event(long, Callback) - Constructor for class Event
 
exit(String[]) - Method in class CommandsParser
Call manager.stop() if the command is exit.
exit(String[]) - Method in class EmulationCommandsParser
 
exit(String[]) - Method in class SimulationCommandsParser
 
exit() - Method in class Trawler
Stop the Trawler
exit(String[]) - Method in class TrawlerCommandsParser
 

F

FIN - Static variable in class Transport
 
Fishnet - class Fishnet.
Class with main method that starts up a Manager.
Fishnet() - Constructor for class Fishnet
 
failEdge(int, int) - Method in class CommandsParser
 
failEdge(int, int) - Method in class Topology
Mark the given edge as failed so that we don't use it
failEdge(int, int) - Method in class Trawler
An edge was removed.
failEdge(int, int) - Method in class TrawlerCommandsParser
 
failNode(int) - Method in class CommandsParser
 
failNode(int) - Method in class Topology
Mark the given node as failed, so that we don't use any edge that goes through it
failNode(int) - Method in class Trawler
A node was removed from the topology.
failNode(int) - Method in class TrawlerCommandsParser
 
fishTime() - Static method in class Utility
Return System time in microseconds

G

GetInstance() - Static method in class Topology
Static method for getting an instance of Topology
GetInstance(boolean) - Static method in class Topology
Static method for getting an instance of Topology
GetInstance() - Static method in class Trawler
Static method to get an instance of trawler.
GetInstance(int) - Static method in class Trawler
Static method to get an instance of trawler.
getBW() - Method in class EdgeOptions
Returns the bandwidth
getDelay() - Method in class EdgeOptions
Returns the delay
getDest() - Method in class EmulatorPacket
Get the address of the destination node
getDest() - Method in class Packet
 
getDestAddr() - Method in class PingRequest
 
getDestPort() - Method in class Transport
 
getFishAddr() - Method in class EmulatedNode
Get the fishnet address of this node
getIPAddress() - Method in class EmulatedNode
Get the IP address of the machine that this emulated node is on
getIPAddress() - Method in class EmulatorARPData
Get the IP address
getLiveEdge(int, int) - Method in class Topology
Returns the edge between a and b, if one exists and it is live.
getLossRate() - Method in class EdgeOptions
Returns the loss rate
getMethod(String, Object, String[]) - Static method in class Callback
Helper function to get a Method object which is needed to pass to the constructor of this class
getMsg() - Method in class PingRequest
 
getNeighbors() - Method in class LinkState
 
getNextEvent() - Method in class SortedEventQueue
Return the next Event to happen without removing it from the queue.
getNodeA() - Method in class Edge
Returns node a
getNodeB() - Method in class Edge
Returns node b
getOptions() - Method in class Edge
 
getPacket() - Method in class EmulatedNodeServer
Gets the first packet stored
getPayload() - Method in class EmulatorPacket
Get the payload
getPayload() - Method in class Packet
 
getPayload() - Method in class Transport
 
getPort() - Method in class EmulatedNode
Get the port that this emulated node is using to talk to its neighbors
getPort() - Method in class EmulatorARPData
Get the port
getProtocol() - Method in class Packet
 
getSeq() - Method in class Packet
 
getSeqNum() - Method in class Transport
 
getSrc() - Method in class EmulatorPacket
Get the address of the source node
getSrc() - Method in class Packet
 
getSrcPort() - Method in class Transport
 
getTTL() - Method in class Packet
 
getTimeSent() - Method in class PingRequest
 
getType() - Method in class Transport
 
getWindow() - Method in class Transport
 

H

HEADER_SIZE - Static variable in class EmulatorPacket
 
HEADER_SIZE - Static variable in class Packet
 
HEADER_SIZE - Static variable in class Transport
 
hasPackets() - Method in class EmulatedNodeServer
Tests if there are more packets stored

I

ID - Static variable in class EmulatedNodeServer
 
ID - Static variable in class IOThreadEmulator
 
IOThread - class IOThread.
 
IOThread() - Constructor for class IOThread
 
IOThreadEmulator - class IOThreadEmulator.
 
IOThreadEmulator(MultiplexIO) - Constructor for class IOThreadEmulator
 
invoke() - Method in class Callback
Invokes the callback
isAlive() - Method in class EmulatedNode
Check if the emulated node is still alive
isEdge(int, int) - Method in class Edge
 
isEmpty() - Method in class IOThread
 
isEmpty() - Method in class MultiplexIO
 
isEmpty() - Method in class SortedEventQueue
Checks if the event queue is empty
isLive() - Method in class Edge
 
isNodeAlive(int) - Method in class Topology
Returns true if the given node is alive, else return false
isProtocolValid(int) - Static method in class Protocol
Tests if the given protocol is valid
isValid() - Method in class Packet
Tests if this Packet is valid or not

L

LINK_INFO_PKT - Static variable in class Protocol
 
LinkState - class LinkState.
This manages a link state packet, to convey a list of neighbors around the network for building routing tables.
LinkState(int[]) - Constructor for class LinkState
Creates a new LinkState packet

M

MAX_ADDRESS - Static variable in class Packet
 
MAX_NEIGHBORS - Static variable in class LinkState
 
MAX_NODES_TO_SIMULATE - Static variable in class Simulator
 
MAX_PACKET_SIZE - Static variable in class EmulatorPacket
 
MAX_PACKET_SIZE - Static variable in class Packet
 
MAX_PACKET_SIZE - Static variable in class Transport
 
MAX_PAYLOAD_SIZE - Static variable in class Packet
 
MAX_PAYLOAD_SIZE - Static variable in class Transport
 
MAX_PORT_NUM - Static variable in class Transport
 
MAX_TTL - Static variable in class Packet
 
Manager - class Manager.
Abstract class defining generic routines for running network code under Fishnet
Manager(long) - Constructor for class Manager
Initialize Manager.
MultiplexIO - class MultiplexIO.
 
MultiplexIO() - Constructor for class MultiplexIO
 
main(String[]) - Static method in class Fishnet
The main method.
main(String[]) - Static method in class Trawler
Entry point to start Trawler

N

NAME_PKT - Static variable in class Protocol
 
Node - class Node.
Node -- Class defining the data structures and code for the protocol stack for a node participating in the fishnet This code is under student control; we provide a baseline "hello world" example just to show how it interfaces with the FishNet classes.
Node(Manager, int) - Constructor for class Node
Create a new node
newEdge(int, int, EdgeOptions) - Method in class Topology
Creates a new edge or updates an existing one
now() - Method in class Emulator
Retrieve current time in milliseconds
now() - Method in class Manager
Retrieve current time in milliseconds
now() - Method in class Simulator
Retrieve current time in milliseconds

O

onCommand(String) - Method in class Node
Called by the manager when there is a command for this node from the user.
onReceive(Integer, byte[]) - Method in class Node
Called by the manager when a packet has arrived for this node

P

PING_PKT - Static variable in class Protocol
 
PING_REPLY_PKT - Static variable in class Protocol
 
Packet - class Packet.
Packet defines the Fishnet packet headers and some constants.
Packet(int, int, int, int, int, byte[]) - Constructor for class Packet
Constructing a new packet.
PingRequest - class PingRequest.
Class that stores information about a Ping request that was sent
PingRequest(int, byte[], long) - Constructor for class PingRequest
Initialize member variables
Protocol - class Protocol.
Contains details about the recognized protocols in Fishnet
Protocol() - Constructor for class Protocol
 
pack() - Method in class EmulatorPacket
Convert packet into byte[] for sending over UDP Socket Format: destination address: 8 bits source address: 8 bits packet length: 8 bits payload: <= (MAX_PACKET_SIZE - HEADER_SIZE) bytes
pack() - Method in class LinkState
Packs the LinkState packet
pack() - Method in class Packet
Convert the Packet object into a byte array for sending over the wire.
pack() - Method in class Transport
Convert the Transport packet object into a byte array for sending over the wire.
parseCommonCmds(String[], long) - Method in class CommandsParser
Parses exit, echo, time and node commands Returns how long parsing should be deferred for if time command encountered.
parseFile(String, long) - Method in class CommandsParser
Open and process a topology file.
parseLine(String, long) - Method in class CommandsParser
Process one line of topology file or keyboard input.
parseLine(String, long) - Method in class EmulationCommandsParser
Process one line of topology file or keyboard input.
parseNodeCmd(String[]) - Method in class CommandsParser
 
parseNodeCmd(String[]) - Method in class EmulationCommandsParser
 
parseNodeCmd(String[]) - Method in class SimulationCommandsParser
 
parseNodeCmd(String[]) - Method in class TrawlerCommandsParser
 
parseRemainder(long) - Method in class CommandsParser
Parse the rest of a command file.
parseRestOfTopoFile() - Method in class Simulator
Parses rest of topology file.
parser - Variable in class Manager
 
pingTimedOut() - Method in class Node
Callback method given to manager to invoke when a timer fires.
printStrArray(String[], int, int, PrintStream) - Method in class CommandsParser
 
printStrArray(String[], PrintStream) - Method in class CommandsParser
 
protocolToString(int) - Static method in class Protocol
Returns a string representation of the given protocol.
putEdge(EmulatedNode) - Method in class EmulatedNode
Tell the emulated node about one of its neighbors

R

read() - Method in class MultiplexIO
 
readFishFile(long) - Method in class Manager
Reads one line of the fish commands file and returns how long to delay further parsing if time command was found Call this function after now > 0
readLine() - Method in class IOThread
 
reader - Variable in class Manager
 
receiveAddNeighbor(String, ArrayList) - Static method in class TrawlerNodeARPCommands
Parse an addNeighbor command.
receiveRemoveNeighbor(String) - Static method in class TrawlerNodeARPCommands
Parse a removeNeighbor command
receiveReset(String) - Static method in class TrawlerNodeARPCommands
Parse a reset command
remove(EmulatedNode) - Method in class Trawler
An emulated node has quit so notify its neighbors
removeEdge(int) - Method in class EmulatedNode
Tell the emulated node that one of its neighbors is gone
removeNeighbor(int) - Static method in class TrawlerNodeARPCommands
Return a command to remove a neighbor
removeNextEvent() - Method in class SortedEventQueue
Remove the next Event to happen and remove it from the queue.
reset() - Method in class EmulatedNode
Remove all edge's from this emulated node.
reset() - Static method in class TrawlerNodeARPCommands
Return a command to reset a node
restartEdge(int, int) - Method in class CommandsParser
 
restartEdge(int, int) - Method in class Topology
Restart the given edge so that we can use it again
restartEdge(int, int) - Method in class TrawlerCommandsParser
 
restartNode(int) - Method in class CommandsParser
 
restartNode(int) - Method in class Topology
Mark the given node as ok, so that we can use it again
restartNode(int) - Method in class Trawler
A node rejoined the topology, so we add back in all of its edges.
restartNode(int) - Method in class TrawlerCommandsParser
 
run() - Method in class EmulatedNodeServer
This starts the server
run() - Method in class IOThread
 
run() - Method in class MultiplexIO
 

S

SYN - Static variable in class Transport
 
SimulationCommandsParser - class SimulationCommandsParser.
Parser for the Simulator Simulator is interested in all commands
SimulationCommandsParser(Simulator) - Constructor for class SimulationCommandsParser
Create a new parser
Simulator - class Simulator.
Manages a simulation.
Simulator(int, String) - Constructor for class Simulator
Creates a new simulation
SortedEventQueue - class SortedEventQueue.
This is a list of Events which should kept sorted by the time at which they are to be invoked.
SortedEventQueue() - Constructor for class SortedEventQueue
Create a new empty event queue.
schedulePkt(int, int, long) - Method in class Edge
Figure out when, in microseconds, a packet will arrive at the destination, given a link's bandwidth propogation delay characteristics.
sendNodeMsg(int, String) - Method in class Emulator
Sends the msg to the the specified node
sendNodeMsg(int, String) - Method in class Manager
Sends the msg to the the specified node
sendNodeMsg(int, String) - Method in class Simulator
Sends the msg to the the specified node
sendPkt(int, int, byte[]) - Method in class Emulator
Send the pkt to the specified node
sendPkt(int, int, byte[]) - Method in class Manager
Send the pkt to the specified node
sendPkt(int, int, byte[]) - Method in class Simulator
Send the pkt to the specified node
setBW(int) - Method in class EdgeOptions
Sets the bandwidth
setDelay(long) - Method in class EdgeOptions
Sets the delay
setFishnetFile(String) - Method in class Manager
Sets the fishnet file that commands should be read from
setLossRate(double) - Method in class EdgeOptions
Sets the loss rate
setNode(Node) - Method in class AmphibianManager
 
setOptions(EdgeOptions) - Method in class Edge
Sets the options for the edge
setParams(Object[]) - Method in class Callback
Sets the params to be passed to the method when it is invoked
setParser(CommandsParser) - Method in class Manager
 
setState(boolean) - Method in class Edge
Sets the state of the edge, either live or not live
setTTL(int) - Method in class Packet
Sets the TTL of this packet
setTimescale(double) - Method in class Manager
Sets the amount to scale real time by.
setTimescale(double) - Method in class Simulator
Sets the amount to scale real time by.
skipLine(String) - Method in class CommandsParser
Returns true if line should be skipped, either because its empty or is a comment
sortedEvents - Variable in class Manager
 
start() - Method in class Emulator
Starts the emulated node do: Read commands from the fishnet file if there is one Process any defered events Process 1 pending incoming message.
start() - Method in class Manager
Starts the Manager.
start() - Method in class Node
Called by the manager to start this node up.
start() - Method in class Simulator
Starts the simulation
start(String) - Method in class Trawler
Wait for a node to connect, then: find out if any nodes have left while we were waiting (and if so, update their neighbors so they stop sending them packets) find a free fishnet Address to assign to the new node, and send it to them (by writing to the node's TCP socket) find out which UDP port they are listening to (by reading from the node's TCP socket) tell the node about all its neighbors' IP addresses and port #'s tell all their neighbors with their IP address and port # loop
startEdge(int, int) - Method in class Trawler
 
stop() - Method in class Manager
Stops Fishnet.
stringToByteArray(String) - Static method in class Utility
Convert a string to a byte[]

T

TRANSPORT_PKT - Static variable in class Protocol
 
Topology - class Topology.
Topology class keeps track of connections between nodes.
Transport - class Transport.
This conveys the header for reliable message transfer.
Transport(int, int, int, int, int, byte[]) - Constructor for class Transport
Constructing a new transport packet.
Trawler - class Trawler.
Manages the emulated nodes.
TrawlerCommandsParser - class TrawlerCommandsParser.
Parser for the Trawler Trawler is only interested in topology commands
TrawlerCommandsParser() - Constructor for class TrawlerCommandsParser
Create a new parser
TrawlerNodeARPCommands - class TrawlerNodeARPCommands.
Provides method to create and parse commands sent between the Trawler and the emulated node
TrawlerNodeARPCommands() - Constructor for class TrawlerNodeARPCommands
 
timeToOccur() - Method in class Event
When should this event occur?
toString() - Method in class EmulatedNode
Return a string containing details of this emulated node
toString() - Method in class EmulatorPacket
Return a string representation of this packet
toString() - Method in class Packet
Provides a string representation of the packet.
toString() - Method in class PingRequest
 

U

Utility - class Utility.
Provides some useful static methods
Utility() - Constructor for class Utility
 
unpack(byte[]) - Static method in class EmulatorPacket
Unpacks a byte array to create a EmulatorPacket object Assumes the array has been formatted using pack method
unpack(byte[]) - Static method in class LinkState
Unpacks a packed representation of a LinkState packet
unpack(byte[]) - Static method in class Packet
Unpacks a byte array to create a Packet object Assumes the array has been formatted using pack method in Packet
unpack(byte[]) - Static method in class Transport
Unpacks a byte array to create a Transport object Assumes the array has been formatted using pack method in Transport

V

validAddress(int) - Static method in class Packet
Tests if the address is a valid one

W

write(int) - Method in class MultiplexIO
 

A B C D E F G H I L M N O P R S T U V W