SSF.Net
Class Host

java.lang.Object
  |
  +--com.renesys.raceway.SSF.Entity
        |
        +--SSF.OS.ProtocolGraph
              |
              +--SSF.Net.Host
All Implemented Interfaces:
com.renesys.raceway.DML.Configurable
Direct Known Subclasses:
Router

public class Host
extends ProtocolGraph

Network Host: a machine with one or more network interface cards (NICs) through which it interoperates with the world. A host is a ProtocolGraph, which means that it runs a complete network protocol stack. Minimally, this stack must include IP and at least one NIC.


Field Summary
 com.renesys.raceway.DML.Configuration hostConfig
          Cached reference to the configuration that was used to build this host.
 int ID
          Host identifier for the sole purpose of establishing config file mappings.
 java.util.Hashtable interfaceAddresses
          Hashtable mapping IP addresses (Integers) to network interface cards (NICs).
 java.util.Hashtable interfaceNumbers
          Hashtable mapping interface indices (Integers) to network interface cards (NICs).
 Net net
          Top-level Net within which this Host appears
 java.lang.String nhi
          Host address in NHI format ("N:N:N:N:H" where N and H are integer IDs).
 java.lang.String nhi_context
          NHI network context within which this host is defined, relative to which it performs NHI address lookups.
 
Fields inherited from class SSF.OS.ProtocolGraph
description
 
Constructor Summary
Host(Net N, java.lang.String use_nhi, int use_id)
          Host constructor, called by Net.config().
 
Method Summary
 void config(com.renesys.raceway.DML.Configuration cfg)
          Configuration of a network host.
 cidrBlock defined_in_network()
          Return the CIDR block descriptor for the network where this host was defined.
 Net getNet()
          Top-level Net within which this Host appears
 java.lang.String global_nhi_to_ip(java.lang.String nspec)
          Translate global NHI address nspec to an IP address.
 void init()
          init the NICs besides the protocolSessions.
 java.lang.String local_nhi_to_ip(java.lang.String nspec)
          Translate relative NHI address nspec to an IP address.
 java.lang.String toString()
           
 
Methods inherited from class SSF.OS.ProtocolGraph
cpu, SessionForName
 
Methods inherited from class com.renesys.raceway.SSF.Entity
alignment, alignTo, coalignedEntities, inChannels, joinAll, makeIndependent, now, outChannels, pauseAll, playRole, processes, resetSimulation, resumeAll, startAll, startAll, startClient, startClient, startServer, Vx, Yx
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

net

public Net net
Top-level Net within which this Host appears


nhi_context

public java.lang.String nhi_context
NHI network context within which this host is defined, relative to which it performs NHI address lookups. For example, if this host is defined in subnetwork 3 of network 1, nhi_context will equal "1:3".


nhi

public java.lang.String nhi
Host address in NHI format ("N:N:N:N:H" where N and H are integer IDs). Equal to nhi_context+":"+ID.


ID

public int ID
Host identifier for the sole purpose of establishing config file mappings.


interfaceAddresses

public java.util.Hashtable interfaceAddresses
Hashtable mapping IP addresses (Integers) to network interface cards (NICs). For example, to get the local network interface corresponding to IP address "128.36.13.1", one might call
      interfaceAddresses.get(new Integer(IP_s.StrToInt("128.36.13.1")));
 
The


interfaceNumbers

public java.util.Hashtable interfaceNumbers
Hashtable mapping interface indices (Integers) to network interface cards (NICs). For example, to find local network interface number 4, one might call
      interfaceNumbers.get(new Integer(4));


hostConfig

public com.renesys.raceway.DML.Configuration hostConfig
Cached reference to the configuration that was used to build this host.

Constructor Detail

Host

public Host(Net N,
            java.lang.String use_nhi,
            int use_id)
Host constructor, called by Net.config().

Method Detail

getNet

public Net getNet()
Top-level Net within which this Host appears


local_nhi_to_ip

public java.lang.String local_nhi_to_ip(java.lang.String nspec)
Translate relative NHI address nspec to an IP address. For example, to find the IP address of interface 4, host number 1 would call local_nhi_to_ip("1(4)"). Returns an IP address in a.b.c.d format.


global_nhi_to_ip

public java.lang.String global_nhi_to_ip(java.lang.String nspec)
Translate global NHI address nspec to an IP address. For example, to find the IP address of interface 4 of host 1 in subnetwork 3 of network 1, one might call global_nhi_to_ip("1:3:1(4)"). Returns an IP address in a.b.c.d format.


defined_in_network

public cidrBlock defined_in_network()
Return the CIDR block descriptor for the network where this host was defined.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

config

public void config(com.renesys.raceway.DML.Configuration cfg)
            throws com.renesys.raceway.DML.configException
Configuration of a network host.

REQUIRED ATTRIBUTES:

OPTIONAL ATTRIBUTES:

The timeline attribute symbolically identifies a timeline to which the Host should be aligned. If none is specified, the timeline of the containing Net is used, if any. SSF will attempt to assign one processor to each timeline so specified, plus one processor for unspecified alignments, up to the system-dependent maximum.

Specified by:
config in interface com.renesys.raceway.DML.Configurable
Overrides:
config in class ProtocolGraph
com.renesys.raceway.DML.configException

init

public void init()
init the NICs besides the protocolSessions.

Overrides:
init in class ProtocolGraph