Finished adapting the client. Cleaned the user code and added getopt. The filter fully works now. Next step: return data to userspace via a map.

This commit is contained in:
h3xduck
2021-11-22 20:02:47 -05:00
parent b04200526c
commit 516e98748c
10 changed files with 98 additions and 160 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -199,18 +199,18 @@ xdp_filter_bpf__create_skeleton(struct xdp_filter_bpf *obj)
\x74\x2e\x31\0\x2e\x72\x6f\x64\x61\x74\x61\0\x6c\x69\x63\x65\x6e\x73\x65\0\x9f\
\xeb\x01\0\x20\0\0\0\0\0\0\0\x14\0\0\0\x14\0\0\0\x4c\x01\0\0\x60\x01\0\0\0\0\0\
\0\x08\0\0\0\x75\0\0\0\x01\0\0\0\0\0\0\0\x07\0\0\0\x10\0\0\0\x75\0\0\0\x14\0\0\
\0\0\0\0\0\x7e\0\0\0\xaa\0\0\0\0\xc4\0\0\x08\0\0\0\x7e\0\0\0\xce\0\0\0\x05\xcc\
\0\0\x30\0\0\0\x7e\0\0\0\xf1\0\0\0\x25\xd8\0\0\x38\0\0\0\x7e\0\0\0\x1b\x01\0\0\
\x29\xd4\0\0\x40\0\0\0\x7e\0\0\0\x4d\x01\0\0\x15\x14\x01\0\x50\0\0\0\x7e\0\0\0\
\x4d\x01\0\0\x09\x14\x01\0\x80\0\0\0\x7e\0\0\0\x7c\x01\0\0\x09\x30\x01\0\x98\0\
\0\0\x7e\0\0\0\xa1\x01\0\0\x0e\x4c\x01\0\xa0\0\0\0\x7e\0\0\0\xa1\x01\0\0\x09\
\x4c\x01\0\xb8\0\0\0\x7e\0\0\0\xc3\x01\0\0\x09\x64\x01\0\xd0\0\0\0\x7e\0\0\0\
\xf7\x01\0\0\x0d\x90\x01\0\xd8\0\0\0\x7e\0\0\0\xf7\x01\0\0\x0d\x90\x01\0\xe0\0\
\0\0\x7e\0\0\0\x23\x02\0\0\x01\xcc\x01\0\xe8\0\0\0\x7e\0\0\0\xf7\x01\0\0\x0d\
\x90\x01\0\xf0\0\0\0\x7e\0\0\0\xf7\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