EDGESEC
0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
|
File containing the definition of the pcap queue utilities. More...
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <pcap.h>
#include <string.h>
#include <list.h>
#include "../../../utils/attributes.h"
Go to the source code of this file.
Data Structures | |
struct | pcap_queue |
pcap queueu structure definition More... | |
Macros | |
#define | __must_free_pcap_queue __must_check |
Functions | |
struct pcap_queue * | push_pcap_queue (struct pcap_queue *queue, struct pcap_pkthdr *header, uint8_t *packet) |
Pushes a packet in the pcap queue. More... | |
struct pcap_queue * | pop_pcap_queue (struct pcap_queue *queue) |
Extract the first pcap element from the pcap queueu. More... | |
void | free_pcap_queue_el (struct pcap_queue *el) |
Delete a pcap entry. More... | |
ssize_t | get_pcap_queue_length (struct pcap_queue *queue) |
Returns the pcap queue length. More... | |
void | free_pcap_queue (struct pcap_queue *queue) |
Frees the pcap queue. More... | |
int | is_pcap_queue_empty (struct pcap_queue *queue) |
Checks if pcap queue is empty. More... | |
__must_free_pcap_queue struct pcap_queue * | init_pcap_queue (void) |
Initialises an empty pcap queue. More... | |
File containing the definition of the pcap queue utilities.
#define __must_free_pcap_queue __must_check |
void free_pcap_queue | ( | struct pcap_queue * | queue | ) |
Frees the pcap queue.
queue | The pointer to the pcap queue |
void free_pcap_queue_el | ( | struct pcap_queue * | el | ) |
Delete a pcap entry.
el | The pcap queue entry |
ssize_t get_pcap_queue_length | ( | struct pcap_queue * | queue | ) |
Returns the pcap queue length.
queue | The pointer to the pcap queue |
__must_free_pcap_queue struct pcap_queue* init_pcap_queue | ( | void | ) |
Initialises an empty pcap queue.
NULL
on error. You must free this using free_pcap_queue(). int is_pcap_queue_empty | ( | struct pcap_queue * | queue | ) |
Checks if pcap queue is empty.
queue | The pointer to the packet queue |
struct pcap_queue* pop_pcap_queue | ( | struct pcap_queue * | queue | ) |
Extract the first pcap element from the pcap queueu.
queue | The pcap queue |
struct pcap_queue* push_pcap_queue | ( | struct pcap_queue * | queue, |
struct pcap_pkthdr * | header, | ||
uint8_t * | packet | ||
) |
Pushes a packet in the pcap queue.
queue | The pcap queue |
header | The pcap header |
packet | The pcap packet |