Open SCAP Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
_seap-packetq.h
1 #ifndef _SEAP_PACKETQ_H
2 #define _SEAP_PACKETQ_H
3 
4 #include <stdint.h>
5 #include <pthread.h>
6 #include "_seap-packet.h"
7 
9  struct SEAP_packetq_item *next;
10  struct SEAP_packetq_item *prev;
11  SEAP_packet_t *packet;
12 };
13 
14 #define SEAP_PACKETQ_DONTFREE 0x00000001
15 
16 typedef struct {
17  pthread_mutex_t lock;
18  uint32_t flags;
19  int count;
20 
21  struct SEAP_packetq_item *first;
22  struct SEAP_packetq_item *last;
24 
25 int SEAP_packetq_init(SEAP_packetq_t *queue);
26 void SEAP_packetq_free(SEAP_packetq_t *queue);
27 
28 struct SEAP_packetq_item *SEAP_packetq_item_new(void);
29 void SEAP_packetq_item_free(struct SEAP_packetq_item *i, bool freepacket);
30 
31 int SEAP_packetq_get(SEAP_packetq_t *queue, SEAP_packet_t **packet_dst);
32 int SEAP_packetq_put(SEAP_packetq_t *queue, SEAP_packet_t *packet);
33 
34 int SEAP_packetq_count(SEAP_packetq_t *queue);
35 
36 #endif /* _SEAP_PACKETQ_H */
Definition: _seap-packetq.h:8
Definition: _seap-packetq.h:16
Definition: _seap-packet.h:41