From 2088f593d4824975a496203c754185340c5340f9 Mon Sep 17 00:00:00 2001 From: bol-van Date: Thu, 8 Jan 2026 11:55:51 +0300 Subject: [PATCH] nfqws2: remove unused code --- nfq2/darkmagic.c | 10 ---------- nfq2/darkmagic.h | 4 ---- 2 files changed, 14 deletions(-) diff --git a/nfq2/darkmagic.c b/nfq2/darkmagic.c index abbfe8a..81bc70a 100644 --- a/nfq2/darkmagic.c +++ b/nfq2/darkmagic.c @@ -51,11 +51,6 @@ uint32_t net16_add(uint16_t netorder_value, uint16_t cpuorder_increment) return htons(ntohs(netorder_value)+cpuorder_increment); } -bool ip_has_df(const struct ip *ip) -{ - return ip && !!(ntohs(ip->ip_off) & IP_DF); -} - uint8_t *tcp_find_option(struct tcphdr *tcp, uint8_t kind) { uint8_t *t = (uint8_t*)(tcp+1); @@ -80,11 +75,6 @@ uint8_t *tcp_find_option(struct tcphdr *tcp, uint8_t kind) } return NULL; } -uint32_t *tcp_find_timestamps(struct tcphdr *tcp) -{ - uint8_t *t = tcp_find_option(tcp, TCP_KIND_TS); - return (t && t[1]==10) ? (uint32_t*)(t+2) : NULL; -} uint8_t tcp_find_scale_factor(const struct tcphdr *tcp) { uint8_t *scale = tcp_find_option((struct tcphdr*)tcp, TCP_KIND_SCALE); diff --git a/nfq2/darkmagic.h b/nfq2/darkmagic.h index 25b7761..3dcab06 100644 --- a/nfq2/darkmagic.h +++ b/nfq2/darkmagic.h @@ -80,15 +80,11 @@ void extract_ports(const struct tcphdr *tcphdr, const struct udphdr *udphdr, uin void extract_endpoints(const struct ip *ip,const struct ip6_hdr *ip6hdr,const struct tcphdr *tcphdr,const struct udphdr *udphdr, struct sockaddr_storage *src, struct sockaddr_storage *dst); bool extract_dst(const uint8_t *data, size_t len, struct sockaddr* dst); uint8_t *tcp_find_option(struct tcphdr *tcp, uint8_t kind); -uint32_t *tcp_find_timestamps(struct tcphdr *tcp); uint8_t tcp_find_scale_factor(const struct tcphdr *tcp); uint16_t tcp_find_mss(const struct tcphdr *tcp); bool tcp_synack_segment(const struct tcphdr *tcphdr); bool tcp_syn_segment(const struct tcphdr *tcphdr); -bool ip_has_df(const struct ip *ip); - - bool make_writeable_dir(); bool ensure_file_access(const char *filename); #ifdef __CYGWIN__