Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (24 sloc) 643 Bytes
#ifndef __XDP_NSEC_COMMON_H
#define __XDP_NSEC_COMMON_H
/* Exit return codes */
#define EXIT_OK 0
#define EXIT_FAIL 1
#define EXIT_FAIL_OPTION 2
#define EXIT_FAIL_XDP 3
#define EXIT_FAIL_MAP 20
#define EXIT_FAIL_MAP_KEY 21
#define EXIT_FAIL_MAP_FILE 22
#define EXIT_FAIL_MAP_FS 23
#define EXIT_FAIL_IP 30
#define EXIT_FAIL_PORT 31
#define EXIT_FAIL_BPF 40
#define EXIT_FAIL_BPF_ELF 41
#define EXIT_FAIL_BPF_RELOCATE 42
#define CMD_SIZE 16
#define CMD_PORT 9000
/* Export eBPF map for IPv4 blacklist as a file
* Gotcha need to mount:
* mount -t bpf bpf /sys/fs/bpf/
*/
static const char *file_cmd = "/sys/fs/bpf/nsec";
#endif