Package | Description |
---|---|
sime | |
sime.tcp |
Modifier and Type | Class and Description |
---|---|
class |
Endpoint
This class implements a simple TCP endpoint that is composed
of sender and receiver objects.
|
class |
Link
A full-duplex communication link that connects two network nodes.
|
class |
Router
This class is a simple simulation of a network router.
|
Modifier and Type | Field and Description |
---|---|
NetworkElement |
Packet.destinationAddr
Destination address, to which this packet is sent.
|
protected NetworkElement |
Link.node1
Nodes
Link.node1 and Link.node2 connected by this link. |
protected NetworkElement |
Link.node2 |
Modifier and Type | Field and Description |
---|---|
protected java.util.HashMap<NetworkElement,Link> |
Router.forwardingTable
Router's forwarding table maps the destination node
(found in the Packet header) to the outgoing link.
|
Modifier and Type | Method and Description |
---|---|
void |
Router.addForwardingTableEntry(NetworkElement node_,
Link outgoingLink_)
Adds another entry into the router's forwarding table.
|
protected void |
Link.deliverArrivedPackets(java.util.ArrayList<Packet> packets_,
double[] packetDelays_,
NetworkElement node_,
double lastTimeProcessCalled_)
Helper method to deliver the packets that propagated
through the link and arrived to the other end, if any.
Note that we assume that the packets are enqueued on the first-come-first-served basis, so their delays are sorted in an ascending order. |
void |
Router.handle(NetworkElement source_,
Packet receivedPacket_)
Buffers the incoming packet in the router memory.
|
abstract void |
NetworkElement.handle(NetworkElement source_,
Packet packet_)
The method to receive packets from a lower-layer protocol.
|
void |
Link.handle(NetworkElement dummySource_,
Packet dummyPacket_)
Link does not "handle" incoming
packets, so this method does nothing.
|
void |
Endpoint.handle(NetworkElement source_,
Packet packet_)
Handle the data segments received from the remote endpoint.
|
(package private) void |
Router.OutputPort.handleIncomingPacket(NetworkElement source_,
Packet receivedPacket_)
Handles an incoming packet that is heading out on this
output port.
|
void |
Router.send(NetworkElement dummySource_,
Packet dummyPacket_)
Currently does nothing.
|
abstract void |
NetworkElement.send(NetworkElement source_,
Packet packet_)
The method to send data from an upper-layer protocol.
Note that parameter source_ is usually ignored
but Link.send(NetworkElement, Packet) uses it to
distinguish the nodes connected to its ends. |
void |
Link.send(NetworkElement source_,
Packet packet_)
The link just accepts any new packets given to it
and enqueues the new packet behind any existing packets.
|
void |
Endpoint.send(NetworkElement source_,
Packet newDataPkt_)
"Sends" segments by passing them to the network layer protocol object.
|
Constructor and Description |
---|
Link(Simulator simulator_,
java.lang.String name_,
NetworkElement node1_,
NetworkElement node2_)
Constructor.
|
Link(Simulator simulator_,
java.lang.String name_,
NetworkElement node1_,
NetworkElement node2_,
double transmissionTime_,
double propagationTime_)
Constructor.
|
Packet(NetworkElement destinationAddr_,
byte[] dataPayload_)
Constructor.
|
Constructor and Description |
---|
Segment(NetworkElement destinationAddr_,
int rcvWindow_,
int ackSeqNum_)
Constructor for acknowledgment-only segments (zero data payload).
|
Segment(NetworkElement destinationAddr_,
int rcvWindow_,
int seqNum_,
byte[] dataPayload_)
Constructor for data-only segments.
|
Segment(NetworkElement destinationAddr_,
int rcvWindow_,
int seqNum_,
byte[] dataPayload_,
int ackSeqNum_)
Constructor for both data and acknowledgment segments,
i.e., an acknowledgment is piggybacked on a data segment
going to the same destination.
|