diff options
author | Ryan Schanzenbacher <ryan@rschanz.org> | 2023-03-08 16:23:48 -0500 |
---|---|---|
committer | Ryan Schanzenbacher <ryan@rschanz.org> | 2023-03-08 16:23:48 -0500 |
commit | ccaa1b97dd76c8f39f3126f554ffe5f247da9963 (patch) | |
tree | 655fb57253646c831f66e0dfe408cbd7bd37e669 | |
parent | 4da4b60f287f4c468befbbec2a047e685ef412b9 (diff) |
removed code that was never used
-rw-r--r-- | packet_dropper_new.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/packet_dropper_new.c b/packet_dropper_new.c index a59a3a4..3033b38 100644 --- a/packet_dropper_new.c +++ b/packet_dropper_new.c | |||
@@ -7,7 +7,6 @@ | |||
7 | #include <linux/ip.h> | 7 | #include <linux/ip.h> |
8 | #include <linux/icmp.h> | 8 | #include <linux/icmp.h> |
9 | #include <linux/if_vlan.h> | 9 | #include <linux/if_vlan.h> |
10 | //#include <arpa/inet.h> | ||
11 | 10 | ||
12 | struct { | 11 | struct { |
13 | __uint(type, BPF_MAP_TYPE_ARRAY); | 12 | __uint(type, BPF_MAP_TYPE_ARRAY); |
@@ -61,9 +60,6 @@ int entry(struct xdp_md *ctx) { | |||
61 | // Determine if we need to further process this packet | 60 | // Determine if we need to further process this packet |
62 | //if (ip_src == 1946091487) { | 61 | //if (ip_src == 1946091487) { |
63 | bpf_printk("Incoming packet: %u\n", icmph->type); | 62 | bpf_printk("Incoming packet: %u\n", icmph->type); |
64 | if (icmph->ttl == 252) { | ||
65 | bpf_printk("Echo request data: %x", pingdata); | ||
66 | } | ||
67 | if (icmph->type == 2 || ip_src == 1946091487) { | 63 | if (icmph->type == 2 || ip_src == 1946091487) { |
68 | // This packet had a destination of 223.255.254.115, do something! | 64 | // This packet had a destination of 223.255.254.115, do something! |
69 | // bpf_printk("Got it!, setting rec..."); // Debug print | 65 | // bpf_printk("Got it!, setting rec..."); // Debug print |