-
Notifications
You must be signed in to change notification settings - Fork 82
Search
Tom Barbette edited this page Nov 25, 2022
·
2 revisions
Search — Click element; Strip the head of the packet up to pattern to be found in the packet content.
Search()
Batching: Batching natively supported
Ports: 1 input, 1-2 outputs
Processing: push
- PATTERN — The string to search. The packet "data" pointer will be placed after
- STRIP_AFTER — Go after the pattern instead of before
- ANNO — An annotation where to place the number of skipped bytes
- SET_ANNO — Set the above annotation or not.
Use this to get rid of all headers up to some pattern, like a HTTP \n\r:
s :: Search("\n\r\n\r") //Strips to the end of the pattern
-> Print("HTTP REQUEST PAYLOAD") //So Print will show the content
-> UntripAnno(); //Go back to where we were
s[1] -> Print("Malformed HTTP");
Generated by click-elem2man from ../elements/standard/search.hh:7
on 2022/11/25.