Table Of Contents
Table Of Contents

Requesting Protocol-Specific Behavior Based on Packet Data

The ContentBasedTagger module, similarly to PacketTagger, attaches protocol-specific request tags to packets based on their content, according to the configured packet filter and packet data filter.

In this example network, an active packet source (ActivePacketSource) generates 1-byte and 2-byte packets randomly. The packet source pushes packets into the tagger (ContentBasedTagger), which is configured to attach a hop limit tag to 1-byte packets. Packets are consumed by a passive packet sink (PassivePacketSink).

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

*.producer.packetLength = intuniform(1B,2B)
*.producer.productionInterval = 1s
*.tagger.packetFilter = expr(totalLength == 1B)
*.tagger.hopLimit = 1