diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-05-14 13:14:14 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-08-06 14:49:55 +0200 |
commit | f40eabb01163f383e2471942da45f32361031e39 (patch) | |
tree | 1a27a16cac2e83bb6fada0db0a8e0deb1b68f5ac /include/libnetfilter_queue/libnetfilter_queue_tcp.h | |
parent | a0c885ae5a79457aa592cb70c27a7dee619762a4 (diff) |
add pkt_buff and protocol helper functions
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/libnetfilter_queue/libnetfilter_queue_tcp.h')
-rw-r--r-- | include/libnetfilter_queue/libnetfilter_queue_tcp.h | 18 |
1 files changed, 18 insertions, 0 deletions
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 |