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

Converts PCAP file format to SolarCapture packets on output.

Detailed Description

This node converts PCAP file format to SolarCapture packets on output.

The input can either be a file on disk (by setting the "filename" arg) or a file descriptor (by setting the "fd" arg). Alternatively if neither are given then the input packets are interpreted as a binary stream of PCAP formatted packets and de-encapsulated.

By default the input is streamed to the output. If prefill=all-input then the node only starts emitting packets when it has read in the whole input file. Note that if the packet pool is not large enough to buffer the whole input then an error message will be emitted and the process will exit.

If prefill=all-buffers then the node starts emitting packets when it has read in the whole input file, or when the packet pool is exhausted, whichever happens first.

Arguments

Argument Optional? Default Type Description
filename Yes SC_PARAM_STR The name of a PCAP file to read packet data from. (If fd is also set then this name is just informational).
fd Yes SC_PARAM_INT File descriptor to read PCAP formatted packet data from.
prefill Yes "none" SC_PARAM_STR Whether to stream input to output or buffer. One of: "none", "all-input" or "all-buffers".
signal_eof Yes 1 SC_PARAM_INT Set to 0 to prevent this node from signalling end-of-stream at the end of the file.

Output Links

Link Description
"" The unpacked stream of packets with one sc_packet per packet in the PCAP.
"input" The PCAP format stream.