AdhocHost

Package: inet.node.inet

AdhocHost

compound module

A wireless host containing routing, mobility and energy components. Supports IPv4 network protocol, TCP, UDP, and SCTP as transport protocol. This is a typical mobile node which can participate in adhoc routing and may have TCP/UDP applications installed. Supports ICMP (ping) too.

  • By default contains a single wireless card, however it can be configured by the numWlanInterfaces parameter. Wirless card type is configured by the **.wlan[*].typename parameter. see: inet.linklayer.ieee80211 or other modules implementing ~IWirelessInterface
  • Node(1,2) mobility can be set using **.mobility.typename see: inet.mobility and ~IMobility
NodeStatus IClock IEnergyStorage IEnergyManagement IEnergyGenerator IMobility IMeasurer PcapRecorder InterfaceTable IIeee8022Llc MessageDispatcher IProtocolLayer MessageDispatcher IEthernetLayer IIeee8021qLayer IIeee8021rLayer MessageDispatcher ILoopbackInterface IWirelessInterface IPppInterface IEthernetInterface ITunnelInterface IVirtualInterface 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.

Used in

Name Type Description
AggregationShowcase network (no description)
AnalogModelShowcaseDistanceNetwork network (no description)
AnalogModelShowcaseDistanceNetwork_ network (no description)
AnalogModelShowcaseNoiseNetwork network (no description)
AntennaDirectionalSelectivityExample network (no description)
BlockAckShowcase network (no description)
CoexistenceShowcase network (no description)
CommunicationCacheExample network (no description)
ComplexConfiguratorNetwork network (no description)
CorruptionModeExample network (no description)
Crosstalk network (no description)
CrosstalkShowcaseBaseNetwork network (no description)
DataLinkVisualizerActivityLevelShowcase network (no description)
DataLinkVisualizerEnablingWirelessShowcase network (no description)
DirectionalAntennasShowcase network (no description)
DynamicRadioNetwork network (no description)
ErrorRateShowcase network (no description)
ErrorRateTest network (no description)
FragmentationShowcase network (no description)
Ieee80211LevelofDetailShowcase network (no description)
InstrumentShowcase network (no description)
InterfaceTableVisualizationAdvancedFeaturesShowcase network (no description)
Layered80211 network (no description)
LayeredApsk network (no description)
MacTest network (no description)
MediumActivityInterferingSignalsShowcase network (no description)
MediumActivityMultipleNodesShowcase network (no description)
MobilityVisualizerShowcase network (no description)
Net network (no description)
Net80211 network (no description)
ObjectCacheTest network (no description)
ObstacleIntersectionTest network (no description)
ObstacleTest network (no description)
PacketDropArpResolutionFailedShowcase network (no description)
PacketDropMacRetryLimitReachedShowcase network (no description)
PathLossShowcase network (no description)
PcapRecordingShowcase network (no description)
PhysicalLinkVisualizerEnablingShowcase network (no description)
PhysicalLinkVisualizerMobileShowcase network (no description)
PowerConsumptionShowcase network (no description)
PowerNetwork network (no description)
QosThroughput network (no description)
RegressionTestingTutorialWireless network (no description)
Scenario network (no description)
SpectrumShowcasePowerDensityMapNetwork network (no description)
SpectrumShowcaseSpectrumFigureSpectrogramNetwork network (no description)
StatisticVisualizationPacketErrorRateShowcase network (no description)
StatisticVisualizationPingRttShowcase network (no description)
StylingShowcase network (no description)
SubmoduleInformationVisualizationShowcase network (no description)
Synchronized network (no description)
TransportPathVisualizerSimpleWirelessShowcase network (no description)
TxopShowcase network (no description)

Known subclasses

Name Type Description
AodvRouter compound module

It models a ~WirelessHost extended with ~Aodv submodule.

DsdvRouter compound module

A DSDV router.

DymoRouter compound module (no description)
GpsrRouter compound module (no description)
ManetRouter compound module (no description)

Extends

Name Type Description
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

recordPcap bool false
numPcapRecorders int recordPcap ? 1 : 0
numLoInterfaces int 1
numWlanInterfaces int 1
numEthInterfaces int 0

minimum number of ethernet interfaces

numPppInterfaces int 0

minimum number of PPP interfaces

numTunInterfaces int 0
numVirtInterfaces int 0
fcsMode string "declared"
hasIpv4 bool true
hasIpv6 bool false
hasGn bool false
forwarding bool true
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
class NodeBase
display i=device/cellphone

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 true

whether to log packets on the module output

pcapRecorder.pcapFile string ""

the PCAP file to be written

pcapRecorder.fileFormat string "pcapng"
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[*]"

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 object "*"

which packets are considered, matches all packets by default

pcapRecorder.helpers string ""

usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper"

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

cb.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

cb.forwardServiceRegistration bool true
cb.forwardProtocolRegistration bool true
bl.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

bl.forwardServiceRegistration bool true
bl.forwardProtocolRegistration bool true
li.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

li.forwardServiceRegistration bool true
li.forwardProtocolRegistration bool true
eth.bitrate double
nl.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

nl.forwardServiceRegistration bool true
nl.forwardProtocolRegistration bool true
tn.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

tn.forwardServiceRegistration bool true
tn.forwardProtocolRegistration bool true
at.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

at.forwardServiceRegistration bool true
at.forwardProtocolRegistration bool true

Source code

//
// A wireless host containing routing, mobility and energy components. Supports
// IPv4 network protocol, TCP, UDP, and SCTP as transport protocol.
// This is a typical mobile node which can participate in adhoc routing
// and may have TCP/UDP applications installed. Supports ICMP (ping) too.
//
// - By default contains a single wireless card, however it can be configured
//   by the numWlanInterfaces parameter. Wirless card type is configured by the
//   **.wlan[*].typename parameter. see:  inet.linklayer.ieee80211 or other
//   modules implementing ~IWirelessInterface
// - Node mobility can be set using **.mobility.typename
//   see: inet.mobility and ~IMobility
//
module AdhocHost extends WirelessHost
{
    parameters:
        @display("i=device/cellphone");
        wlan[*].mgmt.typename = default("Ieee80211MgmtAdhoc");
        wlan[*].agent.typename = default("");
        forwarding = default(true);
}

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