StandardHost

Package: inet.node.inet

StandardHost

compound module

IPv4 host with SCTP, TCP, UDP layers and applications. IP forwarding is disabled by default (see forwarding).

  • Can be connected via ethernet interface to other nodes using the ethg gate. By default full-duplex connections are supported only (twisted pair). Set **.eth[*].typename="EthernetInterface" for a full/half-duplex CSMA/CD implementation (coaxial cable)
  • By default contains no wireless cards, however it can be configured by the numWlanInterfaces parameter. Wireless card type is configured by the **.wlan[*].typename parameter. see: inet.linklayer.ieee80211 or other modules implementing IWirelessInterface
  • Also external interfaces can be configured for HW in the loop simulation using the numExtInterfaces parameter and setting the type using **.ext[*].typename in the INI file. see: ExtInterface and IExternalInterface
  • If wireless card is present, node mobility can be set using *.*.mobility.typename see: inet.mobility and IMobility
NodeStatus IEnergyStorage IEnergyManagement IEnergyGenerator IMobility PcapRecorder InterfaceTable ILoopbackInterface IWirelessInterface IPppInterface IEthernetInterface IExternalInterface ITunnelInterface IVlanInterface INetworkLayer INetworkLayer INetworkLayer MessageDispatcher IUdp ITcp ISctp MessageDispatcher IApp MessageDispatcher

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Extends

Name Type Description
ApplicationLayerNodeBase compound module (no description)

Known subclasses

Name Type Description
PacketDrillHost compound module

IPv4 host with SCTP, TCP, UDP layers and a packetdrill application. The application has a direct connection to the TunInterface.

RtpHost compound module

TODO document!

SctpNatRouter compound module

SCTP NAT router

StandardHost6 compound module

IPv6 host with TCP, SCTP and UDP layers and applications. see StandardHost for configuration.

WirelessHost compound module

Models a host with (default) one wireless (802.11) card in infrastructure mode. This module is basically a StandardHost with an Ieee80211Interface with mgmt.typename = Ieee80211MgmtSta added. It should be used in conjunction with AccessPoint, or any other AP model which contains Ieee80211Interface with mgmt.typename = Ieee80211MgmtAp.

Parameters

Name Type Default value Description
hasStatus bool false
osgModel string ""

3D model for OSG visualization, no 3D model by default

osgModelColor string ""

tint color, no colorization by default

canvasImage string ""

image for canvas visualization, no image by default

canvasImageColor string ""

tint color, no colorization by default

numPcapRecorders int 0
numLoInterfaces int 1
numWlanInterfaces int 0
numEthInterfaces int 0

minimum number of ethernet interfaces

numExtInterfaces int 0
numPppInterfaces int 0

minimum number of PPP interfaces

numTunInterfaces int 0
numVlanInterfaces int 0
hasIpv4 bool true
hasIpv6 bool false
hasGn bool false
forwarding bool false
multicastForwarding bool false
hasUdp bool firstAvailableOrEmpty("Udp") != ""
hasTcp bool firstAvailableOrEmpty("Tcp", "TcpLwip", "TcpNsc") != ""
hasSctp bool false
numApps int 0

Properties

Name Value Description
networkNode
labels node
display i=device/pc2

Gates

Name Direction Size Description
radioIn [ ] input numWlanInterfaces
pppg [ ] inout numPppInterfaces
ethg [ ] inout numEthInterfaces

Unassigned submodule parameters

Name Type Default value Description
status.initialStatus string "UP"

TODO @signal, @statistic

pcapRecorder.verbose bool false

whether to log packets on the module output

pcapRecorder.pcapFile string ""

the PCAP file to be written

pcapRecorder.pcapNetwork int 0

the network type header field in the PCAP file, see http://www.tcpdump.org/linktypes.html (1=ethernet, 204=ppp, 105=IEEE 802.11, ...)

pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

pcapRecorder.moduleNamePatterns string "wlan[*] eth[*] ppp[*] ext[*]"

space-separated list of sibling module names to listen on

pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

pcapRecorder.dumpProtocols string "ethernetmac ppp ieee80211mac"

space-separated list of protocol names as defined in the Protocol class

pcapRecorder.packetFilter string "*"

which packets are considered, matches all packets by default

pcapRecorder.packetDataFilter string "*"

which packets are considered based on the data they contain, matches all packets by default

pcapRecorder.alwaysFlush bool false

flush the pcapFile after each write to ensure that all packets are captured in case of a crash

pcapRecorder.displayStringTextFormat string "rec: %n pks"
interfaceTable.displayAddresses bool false

whether to display IP addresses on links

Source code

//
// IPv4 host with SCTP, TCP, UDP layers and applications.
// IP forwarding is disabled by default (see forwarding).
// - Can be connected via ethernet interface to other nodes using
//   the ethg gate. By default full-duplex connections are supported
//   only (twisted pair). Set **.eth[*].typename="EthernetInterface" for
//   a full/half-duplex CSMA/CD implementation (coaxial cable)
// - By default contains no wireless cards, however it can be configured
//   by the numWlanInterfaces parameter. Wireless card type is configured by the
//   **.wlan[*].typename parameter. see:  inet.linklayer.ieee80211 or other
//   modules implementing ~IWirelessInterface
// - Also external interfaces can be configured for HW in the loop simulation
//   using the numExtInterfaces parameter and setting the type using
//   **.ext[*].typename in the INI file. see: ~ExtInterface and ~IExternalInterface
// - If wireless card is present, node mobility can be set using *.*.mobility.typename
//   see: inet.mobility and ~IMobility
//
module StandardHost extends ApplicationLayerNodeBase
{
    parameters:
        @display("i=device/pc2");
        @figure[submodules];
        forwarding = default(false);  // disable routing by default
        ipv4.arp.proxyArpInterfaces = default(""); // proxy arp is disabled on hosts by default
        *.routingTableModule = default("^.ipv4.routingTable");
}

File: src/inet/node/inet/StandardHost.ned