All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface link.Link

public interface Link
Interface for a generic link (broadcast or point-to-point). Links connect nodes.

See Also:
Node

Method Index

 o AddNode(Node)
Add a node to the link.
 o MTU()
The maximum number of data bytes a packet may contain.
 o RemoveNode(Node)
Remove a node from the link.
 o TransmitPacket(LinkPacket, Node)
Transmit a packet on the link.

Methods

 o TransmitPacket
 public abstract void TransmitPacket(LinkPacket p,
                                     Node n)
Transmit a packet on the link. Block until transmission is complete. Does not necessarily block until the packet is received (depending on the latency on the link).

Parameters:
p - the packet to transmit
n - the node transmitting the packet
See Also:
LinkPacket
 o MTU
 public abstract int MTU()
The maximum number of data bytes a packet may contain. Packets with too much data are blindly dropped

Returns:
the maximum transmission unit, in bytes
 o AddNode
 public abstract void AddNode(Node n)
Add a node to the link. From this point on, this node will receive any packets sent on this link.

Parameters:
n - the node to add as a receiver
 o RemoveNode
 public abstract void RemoveNode(Node n)
Remove a node from the link. This node will no longer receive packets sent on this link. No error should occur if the node is not currently receiving packets.

Parameters:
n - the node to remove as a receiver

All Packages  Class Hierarchy  This Package  Previous  Next  Index