SolarCapture C Bindings
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
pkt_pool.h
Go to the documentation of this file.
1 
8 #ifndef __SOLAR_CAPTURE_PKT_POOL_H__
9 #define __SOLAR_CAPTURE_PKT_POOL_H__
10 
11 
12 struct sc_pool;
13 struct sc_callback;
14 struct sc_packet_list;
15 struct sc_iovec_ptr;
16 
17 
42 extern int sc_pool_get_packets(struct sc_packet_list* list, struct sc_pool* pool,
43  int min_packets, int max_packets);
44 
45 #if SC_API_VER >= 2
46 
55 extern void sc_pool_return_packets(struct sc_pool* pool,
56  struct sc_packet_list* list);
57 #endif
58 
59 
71 extern void sc_pool_on_threshold(struct sc_pool* pool, struct sc_callback* event,
72  int threshold);
73 
74 
82 extern struct sc_packet* sc_pool_duplicate_packet(struct sc_pool* pool,
83  struct sc_packet* packet,
84  int snap);
85 
86 
103 extern int sc_packet_append_iovec_ptr(struct sc_packet* packet,
104  struct sc_pool* pool,
105  struct sc_iovec_ptr* iovp,
106  int snap);
107 
108 
109 #endif /* __SOLAR_CAPTURE_PKT_POOL_H__ */
110 
void sc_pool_return_packets(struct sc_pool *pool, struct sc_packet_list *list)
Return packets to a pool.
Representation of a packet.
Definition: ext_packet.h:56
int sc_packet_append_iovec_ptr(struct sc_packet *packet, struct sc_pool *pool, struct sc_iovec_ptr *iovp, int snap)
Append data to a packet.
void sc_pool_on_threshold(struct sc_pool *pool, struct sc_callback *event, int threshold)
Request a callback when the pool is refilled.
Definition: iovec.h:18
A list of packets or packet buffers.
Definition: ext_packet_list.h:14
struct sc_packet * sc_pool_duplicate_packet(struct sc_pool *pool, struct sc_packet *packet, int snap)
Duplicate a packet.
A callback object.
Definition: event.h:33
int sc_pool_get_packets(struct sc_packet_list *list, struct sc_pool *pool, int min_packets, int max_packets)
Get packet buffers from a pool.