Skip to content

Instantly share code, notes, and snippets.

View akostrikov's full-sized avatar

Александр Костриков akostrikov

View GitHub Profile
@akostrikov
akostrikov / tcp_psh.c
Created January 26, 2022 17:11 — forked from teknoraver/tcp_psh.c
Sample XDP/tc program, sets the TCP PSH flag on some TCP packets
#include <stdint.h>
#include <arpa/inet.h>
#include <asm/byteorder.h>
#include <linux/bpf.h>
#include <linux/if_ether.h>
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/pkt_cls.h>
/*