Table Of Contents
Table Of Contents

Requesting Protocol-Specific Behavior for Packets

This step demonstrates the PacketTagger module, which attaches various protocol-specific request tags to packets. Several of the request tags available in INET can be attached, such as the following:

  • Request to send the packet via a particular interface

  • Request to use a specific transmission power when transmitting the packet

  • etc.

For the list of tags that can be attached, see the parameters of PacketTagger.

The packet tagger module has a filter class to filter which packets to attach a tag onto. By default, packets are not filtered.

In this step, packets are produced periodically by an active packet source (ActivePacketSource). The packets pass through a packet tagger which attaches a HopLimitReq tag. The packets are consumed by a passive packet sink (PassivePacketSink).

network TaggerTutorialStep
        producer: ActivePacketSource {
        tagger: PacketTagger {
        consumer: PassivePacketSink {
        producer.out -->;
        tagger.out -->;
[Config Tagger]
network = TaggerTutorialStep
sim-time-limit = 10s

*.producer.packetLength = 1B
*.producer.productionInterval = 1s
*.tagger.hopLimit = 1