SolarCapture C Bindings User Guide  SF-115721-CD
Draft 2A
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
sc_filter Node Reference

Node to filter packets, directing all matched packets to one output, and all other packets to another output.

Detailed Description

This node directs all matched packets to one output and all other packets to another output. The filter can be provided via a BPF string, or via a sc_pkt_predicate object.

Arguments

Argument Optional? Default Type Description
bpf Yes NULL SC_PARAM_STR Filter string in Berkeley Packet Filter format.
predicate Yes NULL SC_PARAM_OBJ An SC_OBJ_PKT_PREDICATE to use as a filter.

Note: Exactly one of bpf and predicate must be set.

Named Input Links

None

Output Links

Link Description
"" Packets matched by the filter.
"not_matched" Packets not matched by the filter.

Exposed Statistics

Statistics exposed by the sc_filter, sc_range_filter and sc_timestamp_filter nodes.

Name Type Data Type Description
pkts_rejected uint64_t pkt_count The number of packets not matched by the filter.