netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
tcp.c File Reference
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <arpa/inet.h>
#include <netinet/ip.h>
#include <netinet/ip6.h>
#include <netinet/tcp.h>
#include <libnetfilter_queue/libnetfilter_queue.h>
#include <libnetfilter_queue/libnetfilter_queue_tcp.h>
#include <libnetfilter_queue/libnetfilter_queue_ipv4.h>
#include <libnetfilter_queue/pktbuff.h>
#include "internal.h"
Include dependency graph for tcp.c:

Data Structures

union  tcp_word_hdr
 

Macros

#define tcp_flag_word(tp)   ( ((union tcp_word_hdr *)(tp))->words[3])
 
#define TCP_RESERVED_BITS   htonl(0x0F000000)
 

Functions

struct tcphdr * nfq_tcp_get_hdr (struct pkt_buff *pktb)
 nfq_tcp_get - get the TCP header More...
 
 EXPORT_SYMBOL (nfq_tcp_get_hdr)
 
void * nfq_tcp_get_payload (struct tcphdr *tcph, struct pkt_buff *pktb)
 nfq_tcp_get_payload - get the TCP packet payload More...
 
 EXPORT_SYMBOL (nfq_tcp_get_payload)
 
unsigned int nfq_tcp_get_payload_len (struct tcphdr *tcph, struct pkt_buff *pktb)
 nfq_tcp_get_payload_len - get the tcp packet payload More...
 
 EXPORT_SYMBOL (nfq_tcp_get_payload_len)
 
void nfq_tcp_compute_checksum_ipv4 (struct tcphdr *tcph, struct iphdr *iph)
 nfq_tcp_set_checksum_ipv4 - computes IPv4/TCP packet checksum More...
 
 EXPORT_SYMBOL (nfq_tcp_compute_checksum_ipv4)
 
void nfq_tcp_compute_checksum_ipv6 (struct tcphdr *tcph, struct ip6_hdr *ip6h)
 nfq_tcp_set_checksum_ipv6 - computes IPv6/TCP packet checksum More...
 
 EXPORT_SYMBOL (nfq_tcp_compute_checksum_ipv6)
 
int nfq_tcp_snprintf (char *buf, size_t size, const struct tcphdr *tcph)
 nfq_pkt_snprintf_tcp_hdr - print tcp header into one buffer in a humnan readable way More...
 
 EXPORT_SYMBOL (nfq_tcp_snprintf)
 
int nfq_tcp_mangle_ipv4 (struct pkt_buff *pkt, unsigned int match_offset, unsigned int match_len, const char *rep_buffer, unsigned int rep_len)
 nfq_tcp_mangle_ipv4 - mangle TCP/IPv4 packet buffer More...
 
 EXPORT_SYMBOL (nfq_tcp_mangle_ipv4)
 

Macro Definition Documentation

#define TCP_RESERVED_BITS   htonl(0x0F000000)

Referenced by nfq_tcp_snprintf().