All Packages Class Hierarchy This Package Previous Next Index
Class network.NetworkPacket
java.lang.Object
|
+----link.LinkPacket
|
+----network.NetworkPacket
- public class NetworkPacket
- extends LinkPacket
The extra data carried by a network-level packet. This
extends the LinkPacket structure in the link
package, from which it inherits the field
public byte[] data;
The network level adds addressing. NetworkPacket
is extended by the reliability layer with sequence numbers
and control bits.
Like all packets, NetworkPacket implements a toString
for use by packet tracing.
While you are programming in the network level, feel free
to add reasonable fields here.
- See Also:
- LinkPacket
-
destinationAddr
- Address of the packet's intended recipient
-
sourceAddr
- Address of the packet's sender
-
timeToLive
- Maximum number of hops before this packet dies
-
NetworkPacket()
- Constructor for some default setup.
-
toString()
- Make a string for packet trace messages.
sourceAddr
public Address sourceAddr
- Address of the packet's sender
destinationAddr
public Address destinationAddr
- Address of the packet's intended recipient
timeToLive
public int timeToLive
- Maximum number of hops before this packet dies
NetworkPacket
public NetworkPacket()
- Constructor for some default setup. The defaults are
toString
public String toString()
- Make a string for packet trace messages. Should be short
- Overrides:
- toString in class LinkPacket
All Packages Class Hierarchy This Package Previous Next Index