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_udp.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 include/libnetfilter_queue/libnetfilter_queue_udp.h (limited to 'include/libnetfilter_queue/libnetfilter_queue_udp.h') diff --git a/include/libnetfilter_queue/libnetfilter_queue_udp.h b/include/libnetfilter_queue/libnetfilter_queue_udp.h new file mode 100644 index 0000000..e1aeb73 --- /dev/null +++ b/include/libnetfilter_queue/libnetfilter_queue_udp.h @@ -0,0 +1,15 @@ +#ifndef _LIBNFQUEUE_UDP_H_ +#define _LIBNFQUEUE_UDP_H_ + +struct pkt_buff; + +struct udphdr *nfq_udp_get_hdr(struct pkt_buff *pktb); +void *nfq_udp_get_payload(struct udphdr *udph, struct pkt_buff *pktb); +unsigned int nfq_udp_get_payload_len(struct udphdr *udph, struct pkt_buff *pktb); + +void nfq_udp_compute_checksum_ipv4(struct udphdr *udph, struct iphdr *iph); +void nfq_udp_compute_checksum_ipv6(struct udphdr *udph, struct ip6_hdr *ip6h); + +int nfq_udp_snprintf(char *buf, size_t size, const struct udphdr *udp); + +#endif -- cgit v1.2.3