Commit Graph

31 Commits

Author SHA1 Message Date
Christian Deacon
b3530e3e68 Use per CPU array map for filter rules to increase performance. 2023-11-12 21:35:22 +00:00
Christian Deacon
d088b4b157 Implement support for LibXDP and improve code. 2023-06-06 21:20:19 +00:00
Phil
7b577e9548 Optimizing main loop (#35)
* Mem leak fix

Memleak fix for strdup()

* Typo fix

forgot ;

* Optimizing Main Loop

Filtersmap will only be updated if there is a newer version of our config.

* Include sys/stat.h

* Added myself in the credits

Thanks for the trust
2023-01-21 17:18:11 -05:00
Phil
48b52ae645 strdup() mem leak fix (#33)
* Mem leak fix

Memleak fix for strdup()

* Typo fix

forgot ;
2023-01-18 11:44:29 -06:00
gamemann
96d8a7079f Use memcpy() to simplify and optimize code. 2022-09-07 09:24:09 +00:00
gamemann
8a77f1d4ec Add IPv6 addresses to list menu. 2022-08-27 16:17:29 +00:00
gamemann
1c41ac296b Add TCP ECE and CWR flags support. 2022-08-27 15:56:29 +00:00
gamemann
4c3f6950f9 Make help menu cleaner. 2022-08-27 15:37:29 +00:00
gamemann
6092ca3337 Add correct line breaks into help menu. 2021-12-15 20:51:50 +00:00
gamemann
5012fc9ff8 Add time flag for how long to run the program for. 2021-12-15 20:51:23 +00:00
gamemann
21b15badf6 Allocate stats with MAX_CPUS and check for NULL index to attempt to fix seg fault on issue #10. 2021-12-06 16:54:20 +00:00
gamemann
3ebb0a763b We don't need to pass using reference. 2021-12-06 16:38:47 +00:00
gamemann
ef996a6596 Check BPF stats map lookup result. 2021-12-06 16:37:39 +00:00
gamemann
ed89cfed28 Only set ifindex in attributes if hardware offload is set. 2021-11-12 21:23:44 +00:00
gamemann
56831eed67 Set interface index in BPF attributes. 2021-11-12 19:55:25 +00:00
gamemann
ccd4f921bf Add comments. 2021-11-12 19:54:55 +00:00
gamemann
a6db73d335 Rework BPF object loading logic. 2021-11-12 19:54:04 +00:00
gamemann
8527ed163c We no longer need to free config structure. 2021-11-12 18:05:47 +00:00
gamemann
bee4377a80 Use bpf_prog_load_xattr() function for loading BPF object file instead. 2021-11-12 17:55:49 +00:00
gamemann
8089cfff0e Rename variables. 2021-11-12 17:46:12 +00:00
gamemann
99daa2d6f5 Change filename variable to const. 2021-11-12 17:40:13 +00:00
gamemann
bcfaccb71e Add comments to functions. 2021-11-12 17:30:35 +00:00
gamemann
becaeb4b34 Add SKB flag to help output. 2021-11-12 17:22:19 +00:00
gamemann
a521cc1f6f Rename variable and function names, use different integer types, and organize code. 2021-11-12 17:21:30 +00:00
gamemann
2d9138b8d9 Rename variable and structure names. 2021-11-12 16:58:14 +00:00
gamemann
aa85496ced Rename config functions. 2021-11-12 16:51:29 +00:00
gamemann
b0f60b05db Rename function names. 2021-11-12 16:48:26 +00:00
gamemann
ad588f74d5 Implement new command line and XDP attach functionality. 2021-11-12 16:46:49 +00:00
gamemann
637eea978d Use different paths for libbpf. 2021-11-12 16:21:49 +00:00
gamemann
24a7cf5c0c Rename include paths. 2021-11-12 15:53:01 +00:00
gamemann
b66d43b8cb Rename main program. 2021-11-12 15:52:14 +00:00