mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
Add xdp-synproxy to bpf-examples
this code is from kernel bpf selftests xdp synproxy, removed the tc part for simplicity, shows an exmaple of using libxdp to attach xdp synproxy program on network interface. if port is not in allowed ports, the packet will be dropped by xdp synproxy by default, this would break tcp connections to ports that user does not want to do synproxy, change the default to allow connection pass through. Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
This commit is contained in:
@ -1,6 +1,13 @@
|
||||
#ifndef __VMLINUX_COMMON_H__
|
||||
#define __VMLINUX_COMMON_H__
|
||||
|
||||
enum {
|
||||
false = 0,
|
||||
true = 1,
|
||||
};
|
||||
|
||||
typedef _Bool bool;
|
||||
|
||||
struct list_head {
|
||||
struct list_head *next;
|
||||
struct list_head *prev;
|
||||
|
Reference in New Issue
Block a user