From f40eabb01163f383e2471942da45f32361031e39 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 14 May 2012 13:14:14 +0200 Subject: add pkt_buff and protocol helper functions Signed-off-by: Pablo Neira Ayuso --- include/libnetfilter_queue/libnetfilter_queue_tcp.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 include/libnetfilter_queue/libnetfilter_queue_tcp.h (limited to 'include/libnetfilter_queue/libnetfilter_queue_tcp.h') diff --git a/include/libnetfilter_queue/libnetfilter_queue_tcp.h b/include/libnetfilter_queue/libnetfilter_queue_tcp.h new file mode 100644 index 0000000..cc965f5 --- /dev/null +++ b/include/libnetfilter_queue/libnetfilter_queue_tcp.h @@ -0,0 +1,18 @@ +#ifndef _LIBNFQUEUE_TCP_H_ +#define _LIBNFQUEUE_TCP_H_ + +struct pkt_buff; + +struct tcphdr *nfq_tcp_get_hdr(struct pkt_buff *pktb); +void *nfq_tcp_get_payload(struct tcphdr *tcph, struct pkt_buff *pktb); +unsigned int nfq_tcp_get_payload_len(struct tcphdr *tcph, struct pkt_buff *pktb); + +struct iphdr; +struct ip6_hdr; + +void nfq_tcp_compute_checksum_ipv4(struct tcphdr *tcph, struct iphdr *iph); +void nfq_tcp_compute_checksum_ipv6(struct tcphdr *tcph, struct ip6_hdr *ip6h); + +int nfq_tcp_snprintf(char *buf, size_t size, const struct tcphdr *tcp); + +#endif -- cgit v1.2.3