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
 
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.
addNeighborOptions(int, InetAddress, int, EdgeOptions) - Static method in class TrawlerNodeARPCommands
 
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
AmphibianManager - Class in <Unnamed>
 
AmphibianManager() - Constructor for class AmphibianManager
 

B

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

C

Callback - Class in <Unnamed>
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
callback() - Method in class Event
Returns the callback
close() - Method in class EmulatedNode
Close the the connection to the emulated node
CommandsParser - Class in <Unnamed>
CommandsParser -- parses topology and keyboard commands COMMANDS ARE CASE SENSITIVE.
CommandsParser() - Constructor for class CommandsParser
 
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 in <Unnamed>
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 in <Unnamed>
Class to represent the edge options: loss rate, delay and bandwidth
EdgeOptions() - Constructor for class EdgeOptions
Initializes loss rate to 0.
EmulatedLink - Class in <Unnamed>
A class for physical link emulation
EmulatedLink(EdgeOptions) - Constructor for class EmulatedLink
Create an emulated physical link
EmulatedNode - Class in <Unnamed>
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 in <Unnamed>
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 in <Unnamed>
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 in <Unnamed>
Manages an emulated node
Emulator(String, int, int) - Constructor for class Emulator
Create a new emulator
EmulatorARPData - Class in <Unnamed>
Structure for storing data contained in the ARP cache of an emulated node
EmulatorARPData(InetAddress, int) - Constructor for class EmulatorARPData
Create a new structure
EmulatorARPData(InetAddress, int, EdgeOptions) - Constructor for class EmulatorARPData
 
EmulatorPacket - Class in <Unnamed>
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 in <Unnamed>
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

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
 
FIN - Static variable in class Transport
 
Fishnet - Class in <Unnamed>
Class with main method that starts up a Manager.
Fishnet() - Constructor for class Fishnet
 
fishTime() - Static method in class Utility
Return System time in microseconds

G

getBT() - Method in class EdgeOptions
Returns the buffering time
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
 
getEmulatedLink() - Method in class EmulatorARPData
Return the emulated physical link, or null if no emulation
getFishAddr() - Method in class EmulatedNode
Get the fishnet address of this node
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.
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
 
getTimeSent() - Method in class PingRequest
 
getTTL() - Method in class Packet
 
getType() - Method in class Transport
 
getWindow() - Method in class Transport
 

H

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

I

ID - Static variable in class EmulatedNodeServer
 
ID - Static variable in class IOThreadEmulator
 
invoke() - Method in class Callback
Invokes the callback
IOThread - Class in <Unnamed>
 
IOThread() - Constructor for class IOThread
 
IOThreadEmulator - Class in <Unnamed>
 
IOThreadEmulator(MultiplexIO) - Constructor for class IOThreadEmulator
 
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
isValidToSend() - Method in class Packet
Tests if this Packet is valid to send A valid packet may have TTL = 0, but a "valid to send" packet cannot have TTL = 0

L

LINK_INFO_PKT - Static variable in class Protocol
 
LinkState - Class in <Unnamed>
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

main(String[]) - Static method in class Fishnet
The main method.
main(String[]) - Static method in class Trawler
Entry point to start Trawler
Manager - Class in <Unnamed>
Abstract class defining generic routines for running network code under Fishnet
Manager(long) - Constructor for class Manager
Initialize Manager.
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
 
MultiplexIO - Class in <Unnamed>
 
MultiplexIO() - Constructor for class MultiplexIO
 

N

NAME_PKT - Static variable in class Protocol
 
newEdge(int, int, EdgeOptions) - Method in class Topology
Creates a new edge or updates an existing one
Node - Class in <Unnamed>
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
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

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.
Packet - Class in <Unnamed>
Packet defines the Fishnet packet headers and some constants.
Packet(int, int, int, int, int, byte[]) - Constructor for class Packet
Constructing a new packet.
packetDropped() - Method in class Manager
Called upon when a packet is dropped due to buffer overflow
packetLost() - Method in class Manager
Called upon when a packet is lost due to transmission error
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
 
parser - Variable in class Manager
 
parseRemainder(long) - Method in class CommandsParser
Parse the rest of a command file.
parseRestOfTopoFile() - Method in class Simulator
Parses rest of topology file.
physicalSend(DatagramPacket) - Method in class Emulator
 
PING_PKT - Static variable in class Protocol
 
PING_REPLY_PKT - Static variable in class Protocol
 
PingRequest - Class in <Unnamed>
Class that stores information about a Ping request that was sent
PingRequest(int, byte[], long) - Constructor for class PingRequest
Initialize member variables
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
 
Protocol - Class in <Unnamed>
Contains details about the recognized protocols in Fishnet
Protocol() - Constructor for class Protocol
 
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
 
reader - Variable in class Manager
 
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
 
receiveAddNeighbor(String, ArrayList) - Static method in class TrawlerNodeARPCommands
Parse an addNeighbor command.
receiveAddNeighborOptions(String, ArrayList) - Static method in class TrawlerNodeARPCommands
Parse an addNeighbor command with edge options.
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

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.
schedulePkt(Manager, 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 buffer characteristics.
schedulePkt(Manager, int, long) - Method in class EmulatedLink
Figure out when, in microseconds, a packet should be physically send out to 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
setBT(long) - Method in class EdgeOptions
Sets the buffering time
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
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.
setTTL(int) - Method in class Packet
Sets the TTL of this packet
SimulationCommandsParser - Class in <Unnamed>
Parser for the Simulator Simulator is interested in all commands
SimulationCommandsParser(Simulator) - Constructor for class SimulationCommandsParser
Create a new parser
Simulator - Class in <Unnamed>
Manages a simulation.
Simulator(int, String) - Constructor for class Simulator
Creates a new simulation
skipLine(String) - Method in class CommandsParser
Returns true if line should be skipped, either because its empty or is a comment
SortedEventQueue - Class in <Unnamed>
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.
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[]
SYN - Static variable in class Transport
 

T

timeToOccur() - Method in class Event
When should this event occur?
Topology - Class in <Unnamed>
Topology class keeps track of connections between nodes.
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
 
Transport - Class in <Unnamed>
This conveys the header for reliable message transfer.
Transport(int, int, int, int, int, byte[]) - Constructor for class Transport
Constructing a new transport packet.
TRANSPORT_PKT - Static variable in class Protocol
 
Trawler - Class in <Unnamed>
Manages the emulated nodes.
TrawlerCommandsParser - Class in <Unnamed>
Parser for the Trawler Trawler is only interested in topology commands
TrawlerCommandsParser() - Constructor for class TrawlerCommandsParser
Create a new parser
TrawlerNodeARPCommands - Class in <Unnamed>
Provides method to create and parse commands sent between the Trawler and the emulated node
TrawlerNodeARPCommands() - Constructor for class TrawlerNodeARPCommands
 

U

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
Utility - Class in <Unnamed>
Provides some useful static methods
Utility() - Constructor for class Utility
 

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