ProbabilisticBroadcast

Package: inet.networklayer.probabilistic

ProbabilisticBroadcast

simple module

Multi-hop ad-hoc data dissemination protocol based on probabilistic broadcast.

This method reduces the number of packets sent on the channel (reducing the broadcast storm problem) at the risk of some nodes not receiving the data. It is particularly interesting for mobile networks. Parameter maxNbBcast sets the maximum number of broadcast transmissions of a packet, parameter beta gives the transmission probability for each attempt, parameter bcperiod sets the time between two transmission attempts. Parameter maxFirstBcastBackoff sets a backoff window before first transmission attempt, and parameter timeInQueueAfterDeath sets the time during which a node remembers a packet whose time to live (TTL) expired, avoiding retransmitting it in case it comes back in the network because of some problem.

Inheritance diagram

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

Known subclasses

Name Type Description
AdaptiveProbabilisticBroadcast simple module

Multi-hop ad-hoc data dissemination protocol based on probabilistic broadcast, with adaptive parameters.

Extends

Name Type Description
NetworkProtocolBase simple module

Module base for different network protocols.

Parameters

Name Type Default value Description
interfaceTableModule string
headerLength int 96b

length of the network packet header (in bits)

bcperiod double 2 s

period between two probabilistic broadcast attempts

beta double 0.8

probability of broadcast for each attempt

maxNbBcast int 1

maximal number of broadcast attempts for each packet.

maxFirstBcastBackoff double 1 s

maximal back-off before first broadcast attempt [seconds]. if don't want to use this parameter, simply set it to a value that is greater than bcperiod.

timeToLive double 10 s
timeInQueueAfterDeath double 60 s

How many seconds the message should be kept in queue after its died. That way the message is known if the node receives one of its copy that isn't dead because of TTL de-synchronization due to MAC backoff, propagation delay and clock drift.

Properties

Name Value Description
display i=block/fork
class ProbabilisticBroadcast

Gates

Name Direction Size Description
transportIn input
transportOut output
queueIn input
queueOut output

Signals

Name Type Unit
packetReceivedFromUpper cPacket
packetReceivedFromLower cPacket
packetDropped cPacket
packetSentToLower cPacket
packetSentToUpper cPacket

Scheduled messages (observed)

msgkindctrltagsmsgnamecontext
omnetpp::cMessage0broadcastTimer

Direct method calls (observed)

call tofunctioninfo
MessageDispatcherinet::MessageDispatcher::arrivedarrived
MessageDispatcherinet::MessageDispatcher::handleRegisterProtocolhandleRegisterProtocol
MessageDispatcherinet::MessageDispatcher::handleRegisterServicehandleRegisterService
InterfaceTableinet::InterfaceTable::findFirstNonLoopbackInterfacefindFirstNonLoopbackInterface

Called methods (observed)

functioninfocall from
inet::ProbabilisticBroadcast::handleRegisterProtocolhandleRegisterProtocolMessageDispatcher
inet::ProbabilisticBroadcast::handleRegisterServicehandleRegisterServiceMessageDispatcher

Incoming messages (observed)

gatemsgkindctrlsrcModuletags
queueInPacket0EthernetEncapsulationDispatchProtocolReq, InterfaceInd, MacAddressInd, PacketProtocolTag
transportInPacket0PingAppDispatchProtocolReq, L3AddressReq, PacketProtocolTag, SocketReq
transportInPacket0EchoProtocolDispatchProtocolReq, L3AddressReq, PacketProtocolTag
transportInRequest1L3SocketBindCommandPingAppDispatchProtocolReq, SocketReq

Outgoing messages (observed)

gatemsgkindctrldestModuletags
queueOutPacket0EthernetEncapsulationDispatchProtocolInd, DispatchProtocolReq, InterfaceReq, MacAddressReq, PacketProtocolTag, InterfaceInd?, L3AddressReq?, MacAddressInd?, SocketReq?
transportOutPacket0PingAppDispatchProtocolInd, DispatchProtocolReq, InterfaceInd, L3AddressInd, MacAddressInd, MacAddressReq, NetworkProtocolInd, PacketProtocolTag, SocketInd
transportOutPacket0EchoProtocolDispatchProtocolInd, DispatchProtocolReq, InterfaceInd, L3AddressInd, MacAddressInd, MacAddressReq, NetworkProtocolInd, PacketProtocolTag

Packet operations (observed)

chunkTypepacketAction
trim
ProbabilisticBroadcastHeaderinsertAtFront, peekAtFront, popAtFront, removeAtFront

Shared Tagging operations (observed)

tagTypetagAction
DispatchProtocolIndaddTagIfAbsent
DispatchProtocolReqaddTagIfAbsent
InterfaceReqaddTagIfAbsent
L3AddressIndaddTagIfAbsent, getTag
MacAddressIndgetTag
MacAddressReqaddTagIfAbsent
NetworkProtocolIndaddTagIfAbsent
PacketProtocolTagaddTagIfAbsent, getTag
SocketIndaddTagIfAbsent
SocketReqgetTag

Tagging operations (observed)

tagTypetagAction
inet::Ipv4InterfaceDatafindTag
inet::Ipv6InterfaceDatafindTag
inet::NextHopInterfaceDatafindTag

Source code

//
// Multi-hop ad-hoc data dissemination protocol based on probabilistic broadcast.
//
// This method reduces the number of packets sent on the channel (reducing the
// broadcast storm problem) at the risk of some nodes not receiving the data.
// It is particularly interesting for mobile networks.
// Parameter maxNbBcast sets the maximum number of broadcast transmissions of a packet,
// parameter beta gives the transmission probability for each attempt,
// parameter bcperiod sets the time between two transmission attempts.
// Parameter maxFirstBcastBackoff sets a backoff window before first transmission attempt,
// and parameter timeInQueueAfterDeath sets the time during which a node remembers
// a packet whose time to live (TTL) expired, avoiding retransmitting it in case it comes back
// in the network because of some problem.
//
simple ProbabilisticBroadcast extends NetworkProtocolBase like INetworkProtocol
{
    parameters:
        @class(ProbabilisticBroadcast);
        int headerLength @unit(b) = default(96b); // length of the network packet header (in bits)
        // period between two probabilistic broadcast attempts
        double bcperiod @unit(s) = default(2 s);
        // probability of broadcast for each attempt
        double beta = default(0.8);
        // maximal number of broadcast attempts for each packet.
        int maxNbBcast = default(1);
        // maximal back-off before first broadcast attempt [seconds].
        // if don't want to use this parameter, simply set it
        // to a value that is greater than bcperiod.
        double maxFirstBcastBackoff @unit(s) = default(1 s);

        double timeToLive @unit(s) = default(10 s);
        // How many seconds the message should be kept in queue after its died.
        // That way the message is known if the node receives one of its
        // copy that isn't dead because of TTL de-synchronization due to
        // MAC backoff, propagation delay and clock drift.
        double timeInQueueAfterDeath @unit(s) = default(60 s);
}

File: src/inet/networklayer/probabilistic/ProbabilisticBroadcast.ned