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

Forward input to output, and a copy of input to the 'tap' output with optional filtering.

Detailed Description

Forward input to output and a copy of input to the 'tap' output. If a BPF or predicate filter is specified, only packets matching the filter are duplicated to the 'tap' output.

The node can be placed in one of two modes:

  • default:
    • Input packets are always forwarded to "" immediately.
    • If buffers are available, they are copied to "tap" immediately, otherwise they never go to tap.
  • Reliable:
    • If buffers are available, all packets are forwarded to "" and "tap" immediately.
    • If not, they are delayed until buffers are available and then forwarded to "" and "tap" at that point.

Note: In reliable mode this node can potentially create a backlog large enough to provoke drops in an upstream node or VI.

Arguments

Argument Optional? Default Type Description
snap Yes 0 SC_PARAM_INT Copy at most n bytes of the duplicated frames, set to 0 to disable.
reliable Yes 0 SC_PARAM_INT Set to 1/0 to enable/disable reliable mode.
bpf Yes NULL SC_PARAM_STR Filter to select packets to duplicate in BPF format.
predicate Yes NULL SC_PARAM_OBJ Predicate object to select packets to duplicate.

Note: At most one of bpf and predicate may be specified.

Named Input Links

None

Output Links

Link Description
"" All packets are sent down this link.
"tap" The copy of the input.