table of contents
tcp(3) | libnetfilter_queue | tcp(3) |
NAME¶
tcp - TCP helper functions
SYNOPSIS¶
Modules¶
Internal TCP functions
Functions¶
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)
int nfq_tcp_snprintf (char *buf, size_t size, const struct tcphdr
*tcph)
int nfq_tcp_mangle_ipv4 (struct pkt_buff *pktb, unsigned int
match_offset, unsigned int match_len, const char *rep_buffer, unsigned int
rep_len)
int nfq_tcp_mangle_ipv6 (struct pkt_buff *pktb, unsigned int
match_offset, unsigned int match_len, const char *rep_buffer, unsigned int
rep_len)
Detailed Description¶
Function Documentation¶
struct tcphdr * nfq_tcp_get_hdr (struct pkt_buff * pktb)¶
nfq_tcp_get_hdr - get the TCP header
Parameters
Returns
Note
Definition at line 43 of file tcp.c.
void * nfq_tcp_get_payload (struct tcphdr * tcph, struct pkt_buff * pktb)¶
nfq_tcp_get_payload - get the TCP packet payload
Parameters
pktb pointer to user-space network packet buffer
Returns
Definition at line 62 of file tcp.c.
unsigned int nfq_tcp_get_payload_len (struct tcphdr * tcph, struct pkt_buff * pktb)¶
nfq_tcp_get_payload_len - get the tcp packet payload
Parameters
pktb pointer to user-space network packet buffer
Returns
Definition at line 84 of file tcp.c.
int nfq_tcp_mangle_ipv4 (struct pkt_buff * pktb, 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
Parameters
match_offset offset to content that you want to mangle
match_len length of the existing content you want to mangle
rep_buffer pointer to data you want to use to replace current content
rep_len length of data you want to use to replace current content
Returns
Note
Warning
Definition at line 219 of file tcp.c.
int nfq_tcp_mangle_ipv6 (struct pkt_buff * pktb, unsigned int match_offset, unsigned int match_len, const char * rep_buffer, unsigned int rep_len)¶
nfq_tcp_mangle_ipv6 - Mangle TCP/IPv6 packet buffer
Parameters
match_offset Offset from start of TCP data of content that you want to mangle
match_len Length of the existing content you want to mangle
rep_buffer Pointer to data you want to use to replace current content
rep_len Length of data you want to use to replace current content
Returns
Note
Warning
Definition at line 254 of file tcp.c.
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
Parameters
size size of the buffer (or remaining room in it).
tcph pointer to a valid tcp header.
Returns
See also
Definition at line 160 of file tcp.c.
Author¶
Generated automatically by Doxygen for libnetfilter_queue from the source code.
Wed Aug 9 2023 | Version 1.0.5 |