https://github.com/cppcoffee/drops
Drops are base Linux XDP use to proactive defense TCP-SYN flood.
https://github.com/cppcoffee/drops
Last synced: about 1 year ago
JSON representation
Drops are base Linux XDP use to proactive defense TCP-SYN flood.
- Host: GitHub
- URL: https://github.com/cppcoffee/drops
- Owner: cppcoffee
- Created: 2018-08-08T07:43:48.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-09-21T14:00:58.000Z (over 4 years ago)
- Last Synced: 2025-04-01T06:03:10.709Z (about 1 year ago)
- Language: C
- Homepage:
- Size: 10.7 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## About
The drops are base Linux XDP use to proactive defense TCP-SYN flood.
when SYN package count greater than RX_SYN_LIMIT, accept 10 drops 30 package.
## Build dependencies
### Compiling requires having installed:
clang >= version 3.4.0
llvm >= version 3.7.1
Note that LLVM's tool 'llc' must support target 'bpf', list version and supported targets with command: llc --version
## Manually compiling LLVM with 'bpf' support
Since version 3.7.0, LLVM adds a proper LLVM backend target for the BPF bytecode architecture.
By default llvm will build all non-experimental backends including bpf. To generate a smaller llc binary one can use:
```
-DLLVM_TARGETS_TO_BUILD="BPF"
```
Quick sniplet for manually compiling LLVM and clang (build dependencies are cmake and gcc-c++):
```shell
$ git clone http://llvm.org/git/llvm.git
$ cd llvm/tools
$ git clone --depth 1 http://llvm.org/git/clang.git
$ cd ..; mkdir build; cd build
$ cmake .. -DLLVM_TARGETS_TO_BUILD="BPF;X86"
$ make -j $(getconf _NPROCESSORS_ONLN)
```