EDGESEC
0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
|
File containing the implementation of the packet queue utilities. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../../../utils/allocs.h"
#include "../../../utils/log.h"
#include "../../../utils/os.h"
#include "packet_decoder.h"
#include "packet_queue.h"
Functions | |
struct packet_queue * | init_packet_queue (void) |
Initialises and empty packet queue. More... | |
struct packet_queue * | push_packet_queue (struct packet_queue *queue, struct tuple_packet tp) |
Pushes a packet in the packet queue. More... | |
struct packet_queue * | pop_packet_queue (struct packet_queue *queue) |
Extract the first packet from the packet queueu. More... | |
void | free_packet_tuple (struct tuple_packet *tp) |
Frees an allocated packet tuple. More... | |
void | free_packet_queue_el (struct packet_queue *el) |
Delete a packet entry. More... | |
void | free_packet_queue (struct packet_queue *queue) |
Frees the packet queue. More... | |
ssize_t | get_packet_queue_length (struct packet_queue *queue) |
Returns the packet queue length. More... | |
int | is_packet_queue_empty (struct packet_queue *queue) |
Checks if packet queue is empty. More... | |
File containing the implementation of the packet queue utilities.
void free_packet_queue | ( | struct packet_queue * | queue | ) |
Frees the packet queue.
queue | The pointer to the packet queue |
void free_packet_queue_el | ( | struct packet_queue * | el | ) |
Delete a packet entry.
el | The packet queue entry |
void free_packet_tuple | ( | struct tuple_packet * | tp | ) |
Frees an allocated packet tuple.
tp | The pointer to the packet tuple |
ssize_t get_packet_queue_length | ( | struct packet_queue * | queue | ) |
Returns the packet queue length.
queue | The pointer to the packet queue |
struct packet_queue* init_packet_queue | ( | void | ) |
Initialises and empty packet queue.
int is_packet_queue_empty | ( | struct packet_queue * | queue | ) |
Checks if packet queue is empty.
queue | The pointer to the packet queue |
struct packet_queue* pop_packet_queue | ( | struct packet_queue * | queue | ) |
Extract the first packet from the packet queueu.
queue | The packet queue |
struct packet_queue* push_packet_queue | ( | struct packet_queue * | queue, |
struct tuple_packet | tp | ||
) |
Pushes a packet in the packet queue.
queue | The packet queue |
tp | The packet tuple |