This is automatically generated documentation. Edit after the "COMMENTS" heading; changes to the main body will be lost.
AggregateCounter -- Click element; counts packets per aggregate annotation
AggregateCounter([KEYWORDS])
Ports: 1-2 inputs, 1-2 outputs
Processing: agnostic
Drivers: userlevel
Package: analysis (core)
AggregateCounter maintains counts of how many packets or bytes it has seen for each aggregate value. Each aggregate annotation value gets a different count. Call its write_file or write_text_file write handler to get a dump of the information. The freeze handler, and the AGGREGATE_FREEZE and COUNT_FREEZE keyword arguments, can put AggregateCounter in a frozen state. Frozen AggregateCounters only update existing counters; they do not create new counters for previously unseen aggregate values. AggregateCounter may have one or two inputs. The optional second input is always frozen. (It is only useful when the element is push.) It may also have two outputs. If so, and the element is push, then packets that were counted are emitted on the first output, while other packets are emitted on the second output. Keyword arguments are:
-', meaning standard out. Write a packed binary file containing all current data to the specified filename. The format is a couple text lines, followed by a line containing '!packed_le' or '!packed_be', followed by N 8-byte records. In each record, bytes 1-4 are the aggregate, and bytes 5-8 are the count. Both values are 32-bit integers. The byte order is indicated by the '!packed' line: '!packed_le' means little-endian, '!packed_be' means big-endian.-', meaning standard out. Write a text file containing all current data to the specified filename. The format is a couple text lines, followed by N data lines, each containing the aggregate ID in decimal, a space, then the count in decimal.-', meaning standard out. Write a text file containing all current data to the specified filename. The format is as in write_text_file, except that aggregate IDs are printed as IP addresses.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 an IP summary dump in from standard input, aggregates based on destination IP address, and counts packets. When the dump is done, Click will write the aggregate counter's data to standard output, in text form.
FromIPSummaryDump(-, STOP true)
-> AggregateIP(ip dst)
-> ac :: AggregateCounter
-> Discard;
DriverManager(wait_pause,
write ac.write_text_file -);
AggregateIP, AggregatePacketCounter, FromIPSummaryDump, FromDump
Generated by 'click-elem2man' from '../elements/analysis/aggcounter.hh' on 24/May/2007.