|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.DrclObj
drcl.comp.Component
drcl.inet.CoreServiceLayer
The container class of the core service layer in the Inet architecture. The core service layer encapsulates the functionality of the network layer and below. It maintains information of the nodes and provides services through defined service ports for the upper layer protocols to access/manipulate the information. In addition, it spontaneously sends out various types of events through defined event ports. The details of the information, the services and the events are described below.
RTEntry) and the keys (RTKey)
to the entries.
InterfaceInfo to record the information of neighbors
that can be accessed at that interface.
| SERVICE | CONTRACT | PORT |
| Packet Sending | PktSending
| ports in the "up" port group |
| Packet Delivery | PktDelivery
| ports in the "up" port group |
| ID Lookup | IDLookup
| .service_id@ |
| ID Configuration | IDConfig
| .service_id@ |
| Route Lookup | RTLookup
| .service_rt@ |
| Route Configuration | RTConfig
| .service_rt@ |
| Interface/Neighbor Query | IFQuery
| .service_if@ |
| PacketFilter Configuration | ConfigSwitch
| .service_configswitch@ |
| Multicast Service ( = ID Configuration) | IDConfig
| .service_mcast@ |
| Trace Route | TraceRTPkt
| 1000@up |
| EVENT NAME | EVENT OBJECT | PORT | DESCRIPTION |
| Packet Arrival | The arriving packet (Packet)
| .pktarrival@ | Exported for every arriving packet no matter it is from local or network. |
| Identity Added | The identities being added (LongObj/long[])
| .id@ | Exported when a node ID (address)/IDs is/are added. |
| Identity Removed | The identities being removed (LongObj/long[])
| .id@ | Exported when a node ID (address)/IDs is/are removed. |
| Route Entry Added | The entry being added (RTEntry)
| .rt_ucast@ .rt_mcast@ | Exported when a routing entry is added. |
| Route Entry Removed | The entry being removed (RTEntry)
| .rt_ucast@ .rt_mcast@ | Exported when a routing entry is removed. |
| Route Entry Modified | A two-element array that consists of the old and the new entries
(RTEntry)
| .rt_ucast@ .rt_mcast@ | Exported when a routing entry is modified. |
| Neighbor Up | Information of the neighbor (NetAddress)
| .if@ .vif@ | Exported when a neighbor is discovered at an interface. |
| Neighbor Down | Information of the neighbor (NetAddress)
| .if@ .vif@ | Exported when a neighbor is lost at an interface. |
| Multicast Host | The multicast host event
(McastHostEvent.Message)
| .mcastHost@ | Exported when the first member joins or last member leaves a multicast group at an interface |
This class also provides a set of methods to directly access/manipulate the information at a script environment.
CSLBuilder,
Serialized Form| Nested Class Summary |
| Nested classes inherited from class drcl.comp.Component |
Component.Locks |
| Field Summary |
| Constructor Summary | |
CoreServiceLayer()
|
|
CoreServiceLayer(java.lang.String id_)
|
|
| Method Summary | |
abstract void |
addAddress(long addr_)
Adds an identity to this core service layer. |
abstract void |
addRTEntry(RTKey key_,
RTEntry entry_,
double timeout_)
Adds a routing entry to this core service layer. |
abstract double |
getBandwidth(int ifIndex_)
Returns the bandwidth of the specified interface. |
abstract java.lang.String |
getBufferMode(int ifIndex_)
|
abstract int |
getBufferSize(int ifIndex_)
Returns the buffer size of the specified interface. |
abstract long |
getDefaultAddress()
Returns the default identity in this core service layer. |
abstract InterfaceInfo |
getInterfaceInfo(int ifIndex_)
Returns the interface information of the specified interface. |
abstract InterfaceInfo[] |
getInterfaceInfos()
Returns all the interface information in an array. |
abstract double |
getLinkPropDelay(int ifIndex_)
Returns the emulated link propagation delay. |
abstract int |
getMTU(int ifIndex_)
Returns the MTU of the specified interface. |
abstract Port[][] |
getNAMPacketEventPorts()
Returns the ports that output packets that are to be enqueued in and dequeued/dropped from the buffer. |
abstract int |
getNumOfInterfaces()
Returns the number of interfaces including virtual ones. |
abstract int |
getNumOfPhysicalInterfaces()
Returns the number of physical interfaces |
abstract boolean |
hasRoutingCapability()
|
java.lang.String |
info()
Returns information regarding this component. |
abstract boolean |
isLinkEmulationEnabled(int ifIndex_)
|
abstract void |
removeAddress(long addr_)
Removes an identity from this core service layer. |
abstract void |
removeRTEntry(RTKey key_)
Removes a routing entry from this core service layer. |
abstract RTEntry[] |
retrieveAllRTEntries()
Retrieves all RT entries from this core service layer. |
abstract java.lang.Object |
retrieveRTEntry(RTKey key_,
java.lang.String matchMethod_)
Retrieves an RT entry/RT entries from this core service layer. |
abstract void |
setBandwidth(double bw_)
Sets the bandwidth of all the interfaces. |
abstract void |
setBandwidth(int ifindex_,
double bw_)
Sets the bandwidth of the specified interface. |
abstract void |
setBuffer(int ifindex_,
int bs_,
java.lang.String mode_)
Sets the buffer size of the specified interface. |
abstract void |
setBuffer(int bs_,
java.lang.String mode_)
Sets the buffer size of all the interfaces. |
abstract void |
setBufferMode(int ifindex_,
java.lang.String mode_)
Sets the buffer mode of the specified interface. |
abstract void |
setBufferMode(java.lang.String mode_)
Sets the buffer mode of all the interfaces. |
abstract void |
setBufferSize(int bs_)
Sets the buffer size of all the interfaces. |
abstract void |
setBufferSize(int ifindex_,
int bs_)
Sets the buffer size of the specified interface. |
abstract void |
setInterfaceInfo(int ifindex_,
InterfaceInfo if_)
Sets the interface information at the specified interface. |
abstract void |
setInterfaceInfos(InterfaceInfo[] aa_)
Sets the interface information of all the interfaces. |
abstract void |
setLinkEmulationEnabled(int ifIndex_,
boolean enabled_)
|
abstract void |
setLinkPropDelay(int ifIndex_,
double delay_)
Sets the emulated link propagation delay. |
abstract void |
setMTU(int ifindex_,
int mtu_)
Sets the MTU of the specified interface. |
abstract void |
setMTUs(int mtu_)
Sets the MTUs of all interfaces. |
abstract void |
setupVIF(int vifindex_,
long dest_,
int mtu_)
|
abstract void |
setupVIF(int vifindex_,
long src_,
long dest_,
int mtu_)
|
| Methods inherited from class drcl.DrclObj |
clone |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public CoreServiceLayer()
public CoreServiceLayer(java.lang.String id_)
| Method Detail |
public abstract boolean hasRoutingCapability()
public java.lang.String info()
Component
info in class Componentpublic abstract void addAddress(long addr_)
public abstract long getDefaultAddress()
public abstract void removeAddress(long addr_)
public abstract void setInterfaceInfo(int ifindex_,
InterfaceInfo if_)
public abstract void setInterfaceInfos(InterfaceInfo[] aa_)
public abstract InterfaceInfo getInterfaceInfo(int ifIndex_)
public abstract InterfaceInfo[] getInterfaceInfos()
public abstract void setBandwidth(int ifindex_,
double bw_)
public abstract double getBandwidth(int ifIndex_)
public abstract void setBandwidth(double bw_)
public abstract void setBufferSize(int bs_)
bs_ - buffer size in bytes or packets depending on the mode.
public abstract void setBuffer(int bs_,
java.lang.String mode_)
bs_ - buffer size in bytes or packets depending on the mode.mode_ - can be either "packet" or "byte"
public abstract void setBuffer(int ifindex_,
int bs_,
java.lang.String mode_)
bs_ - buffer size in bytes or packets depending on the mode.mode_ - can be either "packet" or "byte"
public abstract void setBufferSize(int ifindex_,
int bs_)
bs_ - buffer size in bytes or packets depending on the mode.public abstract void setBufferMode(java.lang.String mode_)
mode_ - can be either "packet" or "byte".
public abstract void setBufferMode(int ifindex_,
java.lang.String mode_)
mode_ - can be either "packet" or "byte".
public abstract void setMTU(int ifindex_,
int mtu_)
public abstract void setMTUs(int mtu_)
public abstract java.lang.String getBufferMode(int ifIndex_)
public abstract int getBufferSize(int ifIndex_)
getBufferMode(int)public abstract int getMTU(int ifIndex_)
public abstract void setLinkPropDelay(int ifIndex_,
double delay_)
public abstract double getLinkPropDelay(int ifIndex_)
public abstract void setLinkEmulationEnabled(int ifIndex_,
boolean enabled_)
public abstract boolean isLinkEmulationEnabled(int ifIndex_)
public abstract int getNumOfInterfaces()
public abstract int getNumOfPhysicalInterfaces()
public abstract void addRTEntry(RTKey key_,
RTEntry entry_,
double timeout_)
public abstract void removeRTEntry(RTKey key_)
public abstract java.lang.Object retrieveRTEntry(RTKey key_,
java.lang.String matchMethod_)
RTEntry[] if matchMethod_ is
MATCH_ALL
or MATCH_WILDCARD.RTKey,
RTEntry,
Mappublic abstract RTEntry[] retrieveAllRTEntries()
RTEntry[].RTKey,
RTEntry
public abstract void setupVIF(int vifindex_,
long dest_,
int mtu_)
public abstract void setupVIF(int vifindex_,
long src_,
long dest_,
int mtu_)
public abstract Port[][] getNAMPacketEventPorts()
|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||