-
Notifications
You must be signed in to change notification settings - Fork 81
AggregatePacketCounter
AggregatePacketCounter — Click element; counts packets per packet number and aggregate annotation
AggregatePacketCounter([keywords PACKETNO])
Ports: 1 or more inputs, 1 or more outputs
Processing: agnostic
Drivers: userlevel
Maintains counts of how many packets seen for each aggregate value and packet number. Elements such as FromCapDump, AggregateIP and AggregateIPFlows set the aggregate annotation; FromCapDump sets the packet number annotation too.
AggregatePacketCounter may have any number of inputs, but always has the same number of outputs as inputs. Packets arriving on input port N are emitted on output port N. The element maintains separate counts for each input. See the example for how this can be used.
Keyword arguments are:
- ANNO — Annotation name. Defines which packet number annotation to examine. Normal choices are PACKET_NUMBER, SEQUENCE_NUMBER, or NONE (do not examine any annotation), but any 4-byte annotation may be used. By default, the PACKET_NUMBER annotation is used.
- count (read-only) — Returns the total number of packets seen.
- received AGG (read-only) — Returns a newline-separated list of packet numbers in aggregate AGG that were received on any input.
- undelivered AGG (read-only) — Returns a newline-separated list of packet numbers in aggregate AGG that were received on input 0, but not received on input 1. Only available if the element has at least two inputs.
- clear (write-only) — Resets all counts to zero.
The aggregate identifier is stored in host byte order. Thus, the aggregate ID corresponding to IP address 128.0.0.0 is 2147483648.
Only available in user-level processes.
This configuration reads sender- and receiver-side packets from 'cap' dumps, and writes the packet numbers of any undelivered packets to /tmp/x. It depends on FromCapDump's aggregate, packet number, and paint annotations (note the use of CheckPaint to ignore acknowledgements).
sender_trace :: FromCapDump(0.s, STOP true, AGGREGATE 1);
receiver_trace :: FromCapDump(0.r, STOP true, AGGREGATE 1);
counter :: AggregatePacketCounter;
sender_trace -> CheckPaint(0) -> [0] counter [0] -> Discard;
receiver_trace -> CheckPaint(0) -> [1] counter [1] -> Discard;
DriverManager(wait_pause, wait_pause,
save counter.undelivered1 /tmp/x);
AggregateCounter, FromCapDump, AggregateIP, AggregateIPFlows
Generated by click-elem2man from ../elements/analysis/aggpktcounter.hh:10
on 2018/10/03.