drcl.inet.data
Class InterfaceInfo
java.lang.Object
drcl.DrclObj
drcl.inet.data.InterfaceInfo
- All Implemented Interfaces:
- java.lang.Cloneable, InetConstants, ObjectDuplicable, java.io.Serializable
- public class InterfaceInfo
- extends DrclObj
- implements InetConstants
Defines the information of an interface of a network node.
The information includes the network address (NetAddress)
of the node seen from that interface, the network addresses of
the neighbor nodes that can be reached from that interface, the maximum
transmission unit (MTU), the bandwidth, and the interface type.
The interface type is not defined in INET, and should be interpreted by
the upper layer protocols. Since this information is shared by multiple
protocols, they must have consensus of its definition.
This class provides a set of methods to augment (addPeerNetAddress(drcl.inet.data.NetAddress, double))
and remove (removePeerNetAddress(drcl.inet.data.NetAddress)) a neighbor. It also provides methods
to retrieve the local network address and the neighbor network addresses, and
to query if a network address is one of the neighbors that can be reached from
that interface.
The information of all the interfaces is stored and maintained
at the core service layer in the Inet architecture, in which
the protocols make use of the IFQuery
contract to access the information from the core service layer.
- See Also:
NetAddress,
IFQuery,
CoreServiceLayer,
Serialized Form
| Fields inherited from interface drcl.inet.InetConstants |
BYTE_MODE, DEFAULT_BANDWIDTH, DEFAULT_BUFFER_SIZE, DEFAULT_MTU, EVENT_ID_CHANGED_PORT_ID, EVENT_IDENTITY_ADDED, EVENT_IDENTITY_REMOVED, EVENT_IF_NEIGHBOR_DOWN, EVENT_IF_NEIGHBOR_UP, EVENT_IF_PORT_ID, EVENT_LINK_BROKEN, EVENT_LINK_BROKEN_PORT_ID, EVENT_MCAST_HOST_PORT_ID, EVENT_PKT_ARRIVAL, EVENT_PKT_ARRIVAL_PORT_ID, EVENT_RT_ENTRY_ADDED, EVENT_RT_ENTRY_MODIFIED, EVENT_RT_ENTRY_REMOVED, EVENT_RT_MCAST_CHANGED_PORT_ID, EVENT_RT_UCAST_CHANGED_PORT_ID, EVENT_VIF_NEIGHBOR_DOWN, EVENT_VIF_NEIGHBOR_UP, EVENT_VIF_PORT_ID, HOST_ENTRY_EXT, ID_CSL, MCAST_QUERY_PORT_ID, PACKET_MODE, PID_AODV, PID_DV, PID_DVMRP, PID_HELLO, PID_IGMP, PID_OSPF, PID_RSVP, PID_TCP, PID_UDP, SERVICE_CONFIGSW_PORT_ID, SERVICE_ID_PORT_ID, SERVICE_IF_PORT_ID, SERVICE_MCAST_PORT_ID, SERVICE_RT_PORT_ID, UCAST_QUERY_PORT_ID |
|
Constructor Summary |
InterfaceInfo()
|
InterfaceInfo(int type_)
|
InterfaceInfo(int mtu_,
double bw_,
int bufferSize_)
|
InterfaceInfo(int type_,
long localAddress_,
long localAddressMask_,
int mtu_,
double bw_,
int bufferSize_)
|
InterfaceInfo(long localAddr_,
long mask_)
|
InterfaceInfo(long localAddress_,
long localAddressMask_,
int mtu_,
double bw_,
int bufferSize_)
|
InterfaceInfo(NetAddress local_)
|
InterfaceInfo(NetAddress local_,
NetAddress[] peer_,
double[] timeout_)
|
InterfaceInfo(NetAddress local_,
NetAddress peer_,
double timeout_)
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
local
public NetAddress local
peers
public NetAddress[] peers
InterfaceInfo
public InterfaceInfo(long localAddr_,
long mask_)
InterfaceInfo
public InterfaceInfo(NetAddress local_)
InterfaceInfo
public InterfaceInfo(int type_)
InterfaceInfo
public InterfaceInfo(NetAddress local_,
NetAddress[] peer_,
double[] timeout_)
InterfaceInfo
public InterfaceInfo(NetAddress local_,
NetAddress peer_,
double timeout_)
InterfaceInfo
public InterfaceInfo(int mtu_,
double bw_,
int bufferSize_)
- Parameters:
mtu_ - set to the default value if a negative value is given.bw_ - set to the default value if a negative value is given.bufferSize_ - set to the default value if a negative value is given.- See Also:
InetConstants.DEFAULT_MTU,
InetConstants.DEFAULT_BUFFER_SIZE,
InetConstants.DEFAULT_BANDWIDTH
InterfaceInfo
public InterfaceInfo(long localAddress_,
long localAddressMask_,
int mtu_,
double bw_,
int bufferSize_)
- Parameters:
mtu_ - set to the default value if a negative value is given.bw_ - set to the default value if a negative value is given.bufferSize_ - set to the default value if a negative value is given.- See Also:
InetConstants.DEFAULT_MTU,
InetConstants.DEFAULT_BUFFER_SIZE,
InetConstants.DEFAULT_BANDWIDTH
InterfaceInfo
public InterfaceInfo(int type_,
long localAddress_,
long localAddressMask_,
int mtu_,
double bw_,
int bufferSize_)
- Parameters:
mtu_ - set to the default value if a negative value is given.bw_ - set to the default value if a negative value is given.bufferSize_ - set to the default value if a negative value is given.- See Also:
InetConstants.DEFAULT_MTU,
InetConstants.DEFAULT_BUFFER_SIZE,
InetConstants.DEFAULT_BANDWIDTH
InterfaceInfo
public InterfaceInfo()
duplicate
public void duplicate(java.lang.Object source_)
- Description copied from class:
DrclObj
- opies the content of the
source_ object to this object.
he subclass must implement this method to realize DrclObj.clone().
- Specified by:
duplicate in interface ObjectDuplicable- Overrides:
duplicate in class DrclObj
getLocalNetAddress
public NetAddress getLocalNetAddress()
setLocalNetAddress
public void setLocalNetAddress(NetAddress addr_)
getPeerNetAddresses
public NetAddress[] getPeerNetAddresses()
addPeerNetAddress
public void addPeerNetAddress(NetAddress addr_,
double timeout_)
removePeerNetAddress
public void removePeerNetAddress(NetAddress addr_)
getPeerTimeouts
public double[] getPeerTimeouts()
setPeerNetAddresses
public void setPeerNetAddresses(NetAddress[] addrs_)
containsPeer
public boolean containsPeer(NetAddress addr_)
containsPeer
public boolean containsPeer(long addr_)
setTimeout
public void setTimeout(NetAddress addr_,
double timeout_)
resetTimeout
public void resetTimeout()
getMTU
public int getMTU()
setMTU
public void setMTU(int mtu_)
getBandwidth
public double getBandwidth()
setBandwidth
public void setBandwidth(double bw_)
getBufferSize
public int getBufferSize()
setBufferSize
public void setBufferSize(int bs_)
getType
public int getType()
- Returns the interface type.
setType
public void setType(int type_)
- Sets the interface type.
toString
public java.lang.String toString()
- Overrides:
toString in class DrclObj
Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved. ~ To J-Sim Home ~