Simple Module NA_DelayAttack

Package: nesg.netattacks.attacks.controllers.delayAttack
File: src/attacks/controllers/delayAttack/NA_DelayAttack.ned

C++ definition

Delay attack controller simple module. Two parameters control the attack behavior: the attack probability and the delay time.

See also: NA_Attack, NA_IPv4

Author: Gabriel Maciá Fernández, gmacia@ugr.es

Date: 01/22/2013

NA_DelayAttack

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram:

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

Extends:

Name Type Description
NA_Attack simple module

Base simple module inherited from all attacks modules. Is in charge of set the schedulling parameters, attack activation or not, and what is the type of the attack.

Used in compound modules:

Name Type Description
NA_AttackerAdhocHost compound module

Attacker wireless ad hoc host. Modificated from WirelessHost module. Redefined from INET framework and used as attacker host.

Parameters:

Name Type Default value Description
attackType string "delay"

String with the type of attack

active bool false

Indicates if this attack is active or not in the node

startTime double 0s

Timestamp to start the attack

endTime double 0s

Time instant at which the attack ends, 0 means that the attack will not end during the simulation.

delayAttackProbability double 0

Probability of delaying a packet. Range [0,1].

delayAttackValue double normal(1s, 0.1s)

Random delay time

Properties:

Name Value Description
display i=misc/cloud3,red,100;is=l
class NA_DelayAttack

Source code:

//
// Delay attack controller simple module. Two parameters control the attack behavior:
// the attack probability and the delay time.
//
// @see NA_Attack, NA_IPv4
//
// @author Gabriel Maciá Fernández, gmacia@ugr.es
// @date 01/22/2013
simple NA_DelayAttack extends NA_Attack
{
    parameters:
        @class(NA_DelayAttack);
        @display("i=misc/cloud3,red,100;is=l");

        attackType = "delay";  //Should correspond with the tag located in the hackedModules.ned. e.g. @delay for this attack.
        double delayAttackProbability = default(0); //Probability of delaying a packet. Range [0,1].
        volatile double delayAttackValue @unit(s) = default(normal(1s, 0.1s));//Random delay time
}