-
Notifications
You must be signed in to change notification settings - Fork 82
StringClassifier
StringClassifier — Click element; classifies packets by contents
StringClassifier(STRING_1, ..., STRING_1)
Batching: Batching natively supported
Ports: 1 input, any number of outputs
Processing: push
Drivers: userlevel
Classifies packets according to exect string. The StringClassifier has N outputs, each associated with the corresponding string from the configuration string. The pattern match will be done based on all the Packet's content.
You should assume that the strings are scanned in order, and the packet is sent to the output corresponding to the first matching pattern. Thus more specific patterns should come before less specific ones. If no match is found the packet is discarded.
It's better to enclose each string with a pair of "
For example,
StringClassifier("xnet",
"hello",
"ynet");
creates an element with three outputs. The first output will match a packet with the word xnet anywhere in it's content. The second output will match a packet with the word hello anywhere in it's content. The third output will match a packet with the word ynet anywhere in it's content.
-
pattern0 (read/write) —
Returns or sets the element's pattern 0. There are as many
pattern
handlers as there are output ports.
Classifier, IPFilter, CheckIPHeader, MarkIPHeader, CheckIPHeader2, tcpdump
Generated by click-elem2man from ../elements/ids/stringclassifier.hh:7
on 2022/11/25.