SolarCapture C Bindings
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
predicate.h
Go to the documentation of this file.
1 
8 #ifndef __SOLAR_CAPTURE_PREDICATE_H__
9 #define __SOLAR_CAPTURE_PREDICATE_H__
10 
11 
12 struct sc_pkt_predicate;
13 struct sc_packet;
14 
15 
16 typedef int (sc_pkt_predicate_test_fn)(struct sc_pkt_predicate*,
17  struct sc_packet*);
18 
23  sc_pkt_predicate_test_fn* pred_test_fn; /*< the predicate test function it should return 1 (true) or 0 (false) */
24  void* pred_private; /*< field to hold state for the predicate function */
25 };
26 
27 
42 extern int sc_pkt_predicate_alloc(struct sc_pkt_predicate** pred_out,
43  int private_bytes);
44 
51 extern struct sc_object*
53 
60 extern struct sc_pkt_predicate*
62 
63 
64 #endif /* __SOLAR_CAPTURE_PREDICATE_H__ */
65 
struct sc_pkt_predicate * sc_pkt_predicate_from_object(struct sc_object *obj)
Convert a sc_object into a sc_pkt_predicate.
int sc_pkt_predicate_alloc(struct sc_pkt_predicate **pred_out, int private_bytes)
Allocate a packet predicate object.
struct sc_object * sc_pkt_predicate_to_object(struct sc_pkt_predicate *pred)
Convert a sc_pkt_predicate into a sc_object.
A packet predicate object.
Definition: predicate.h:22
Representation of a packet.
Definition: ext_packet.h:56
An opaque object. Use this to pass all types of data that are not ints, doubles or char arrays (see S...