SolarCapture C Bindings
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
Functions
stream.h File Reference

This header file defines sc_stream objects for directing packets to a sc_vi instance. A packet must match all the stream criteria for it to be directed by the stream to an sc_vi instance. More...

Go to the source code of this file.

Functions

int sc_stream_alloc (struct sc_stream **stream_out, const struct sc_attr *attr, struct sc_session *scs)
 Create a new stream object for this session. More...
 
int sc_stream_free (struct sc_stream *stream)
 Free a previously created stream. More...
 
int sc_stream_reset (struct sc_stream *stream)
 Remove all stream filters. More...
 
int sc_stream_set_str (struct sc_stream *stream, const char *str)
 Configure the stream to capture all packets matching the specified filter string. This is the preferred way of adding filters to a stream. More...
 
int sc_stream_all (struct sc_stream *stream)
 Configure this stream to capture all packets that haven't been caught by another stream. More...
 
int sc_stream_mismatch (struct sc_stream *stream)
 Configure this stream to capture all packets that haven't been caught by another stream and are not requested by the kernel network stack. More...
 
int sc_stream_ip_dest_hostport (struct sc_stream *stream, int protocol, const char *dhost, const char *dport)
 Configure this stream to capture all packets with the matching protocol, destination hostname and destination port. More...
 
int sc_stream_ip_source_hostport (struct sc_stream *stream, const char *shost, const char *sport)
 Configure this stream to capture all packets with the matching protocol, source hostname and source port. More...
 
int sc_stream_eth_dhost (struct sc_stream *stream, const uint8_t *mac_addr)
 Configure this stream to capture all packets with the matching destination MAC address. More...
 
int sc_stream_eth_vlan_id (struct sc_stream *stream, int vlan_id)
 Configure this stream to capture all packets with the matching VLAN ID. More...
 
int sc_stream_eth_shost (struct sc_stream *stream, const uint8_t *mac_addr)
 Configure this stream to capture all packets with the matching source MAC address. More...
 
int sc_stream_eth_type (struct sc_stream *stream, uint16_t eth_type)
 Configrue this stream to capture all packets with the matching ethernet type. More...
 
int sc_stream_ip_dest_host (struct sc_stream *stream, const char *dhost)
 Configure this stream to capture all packets with matching destination hostname. More...
 
int sc_stream_ip_dest_port (struct sc_stream *stream, const char *dport)
 Configure this stream to capture all packets with matching destination port. More...
 
int sc_stream_ip_source_host (struct sc_stream *stream, const char *shost)
 Configure this stream to capture all packets with matching source hostname. More...
 
int sc_stream_ip_source_port (struct sc_stream *stream, const char *sport)
 Configure this stream to capture all packets with matching source port. More...
 
int sc_stream_ip_protocol (struct sc_stream *stream, int protocol)
 Configure this stream to capture all packets with matching IP protocol. More...
 

Detailed Description

This header file defines sc_stream objects for directing packets to a sc_vi instance. A packet must match all the stream criteria for it to be directed by the stream to an sc_vi instance.