Table Of Contents
Table Of Contents

Content-Based Filtering (Active Sink)

This step is very similar to the previous one, but packets are popped from the filter by an active packet sink (ActivePacketSink), and provided by a passive packet source (PassivePacketSource).

network Filter2TutorialStep
        provider: PassivePacketSource {
        filter: ContentBasedFilter {
        collector: ActivePacketSink {
    connections allowunconnected:
        provider.out -->;
        filter.out -->;
[Config Filter2]
network = Filter2TutorialStep
sim-time-limit = 10s

*.provider.packetLength = intuniform(1B, 2B)
*.collector.collectionInterval = 1s
*.filter.packetFilter = expr(totalLength == 1B)