|
EDGESEC
0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
|
File containing the implementation of the pcap queue utilities. More...
#include <stdio.h>#include <stdlib.h>#include <pcap.h>#include <string.h>#include "../../../utils/allocs.h"#include "../../../utils/log.h"#include "../../../utils/os.h"#include "pcap_queue.h"Functions | |
| struct pcap_queue * | init_pcap_queue (void) |
| Initialises an empty pcap queue. More... | |
| 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... | |
| void | free_pcap_queue (struct pcap_queue *queue) |
| Frees the pcap queue. More... | |
| ssize_t | get_pcap_queue_length (struct pcap_queue *queue) |
| Returns the pcap queue length. More... | |
| int | is_pcap_queue_empty (struct pcap_queue *queue) |
| Checks if pcap queue is empty. More... | |
File containing the implementation of the pcap queue utilities.
| 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 |
| 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 |