Smart Home firewall
Profile-based Smart Home firewall
Functions | Variables
rule_utils.c File Reference

Unit tests for the rule utilitaries. More...

#include <stdio.h>
#include <stdint.h>
#include <sys/time.h>
#include "rule_utils.h"
#include <CUnit/CUnit.h>
#include <CUnit/Basic.h>
Include dependency graph for rule_utils.c:

Functions

void test_counter_read_microseconds ()
 Test the reading of the current time in microseconds.
 
void test_counter_duration_init ()
 Test the duration counter initialization.
 
void test_exec_nft_cmd ()
 Test the execution of an nftables command.
 
void test_exec_nft_cmd_verbose ()
 Test the verbose execution of an nftables command.
 
void test_get_nft_handle ()
 Test the retrieval of an nftables handle.
 
void test_delete_nft_rule_by_handle ()
 Test the deletion of an nftables rule by its handle value.
 
void test_delete_nft_rule ()
 Test the deletion of an nftables rule by its string.
 
void test_counter_read_packets ()
 Test the reading of the packets value of an nftables counter.
 
void test_counter_read_bytes ()
 Test the reading of the bytes value of an nftables counter.
 
int main (int argc, char const *argv[])
 

Variables

int16_t rule_handle
 

Detailed Description

Unit tests for the rule utilitaries.

Date
2022-11-02

Function Documentation

◆ main()

int main ( int  argc,
char const *  argv[] 
)

Test suite entry point.