Man page - nfq_tcp_mangle_ipv6(3)
Packages contains this manual
- nfq_set_queue_maxlen(3)
- nfq_fd(3)
- nfq_set_mode(3)
- nfq_get_physoutdev(3)
- nfq_nlmsg_cfg_put_params(3)
- nfq_nlmsg_cfg_put_qmaxlen(3)
- nfq_get_nfmark(3)
- nfq_get_payload(3)
- nfq_get_physindev_name(3)
- nfq_get_secctx(3)
- nfq_unbind_pf(3)
- nfq_get_physoutdev_name(3)
- nfq_set_verdict_batch(3)
- nfq_nlmsg_verdict_put_pkt(3)
- nfq_set_verdict_batch2(3)
- nfq_get_outdev_name(3)
- nfq_get_outdev(3)
- nfq_set_verdict2(3)
- nfq_get_msg_packet_hdr(3)
- nfq_get_timestamp(3)
- nfq_udp_get_payload(3)
- pktb_alloc(3)
- nfq_create_queue(3)
- nfq_snprintf_xml(3)
- nfq_get_physindev(3)
- nfq_destroy_queue(3)
- nfq_set_verdict(3)
- nfq_ip6_get_hdr(3)
- nfq_tcp_get_hdr(3)
- pktb_network_header(3)
- nfq_ip6_snprintf(3)
- nfq_bind_pf(3)
- nfq_set_verdict_mark(3)
- nfq_nlmsg_verdict_put_mark(3)
- nfq_get_indev_name(3)
- nfq_get_gid(3)
- pktb_mangle(3)
- pktb_mangled(3)
- pktb_trim(3)
- nfq_udp_mangle_ipv4(3)
- nfq_nlmsg_parse(3)
- nfq_ip_get_hdr(3)
- nfq_set_queue_flags(3)
- nfq_udp_get_hdr(3)
- nfq_udp_mangle_ipv6(3)
- nfq_tcp_mangle_ipv4(3)
- nfq_ip_snprintf(3)
- nfq_get_indev(3)
- pktb_push(3)
- nfq_nlmsg_cfg_put_cmd(3)
- pktb_transport_header(3)
- pktb_pull(3)
- nfq_udp_compute_checksum_ipv4(3)
- nfq_tcp_compute_checksum_ipv4(3)
- nfq_handle_packet(3)
- pktb_free(3)
- pktb_put(3)
- pktb_data(3)
- nfq_udp_compute_checksum_ipv6(3)
- nfq_close(3)
- nfq_udp_snprintf(3)
- nfq_ip_mangle(3)
- nfq_nlmsg_verdict_put(3)
- nfq_tcp_snprintf(3)
- pktb_mac_header(3)
- nfq_get_packet_hw(3)
- nfq_get_skbinfo(3)
- nfq_nlmsg_put(3)
- nfq_tcp_mangle_ipv6(3)
- nfq_ip_set_transport_header(3)
- nfq_get_uid(3)
- nfq_tcp_get_payload(3)
- nfq_ip6_set_transport_header(3)
- nfq_ip_set_checksum(3)
- nfq_tcp_compute_checksum_ipv6(3)
- nfq_tcp_get_payload_len(3)
- pktb_len(3)
- nfq_open(3)
- nfq_ip6_mangle(3)
- nfq_udp_get_payload_len(3)
- pktb_tailroom(3)
apt-get install libnetfilter-queue-doc
Manual
tcp
NAMESYNOPSIS
Modules
Functions
Detailed Description
Function Documentation
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_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)
int nfq_tcp_snprintf (char * buf, size_t size, const struct tcphdr * tcph)
Author
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
pktb pointer to user-space network packet buffer
Returns
validated pointer to the TCP header or NULL if the TCP header was not set or if a minimal length check fails.
Note
You have to call nfq_ip_set_transport_header() or nfq_ip6_set_transport_header() first to set the TCP header.
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
tcph
pointer to the TCP
header
pktb
pointer to user-space network packet buffer
Returns
Pointer to the TCP payload, or NULL if malformed TCP packet.
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
tcph
pointer to the TCP
header
pktb
pointer to user-space network packet buffer
Returns
Length of TCP payload (user data)
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
pktb
pointer to network
packet buffer
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
1 for success and 0 for failure. See pktb_mangle() for failure case
Note
This function updates the IPv4 length and recalculates the IPv4 & TCP checksums for you.
Warning
After changing the length of a TCP message, the application will need to mangle sequence numbers in both directions until another change puts them in sync again
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
pktb
Pointer to network
packet buffer
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
1 for success and 0 for failure. See pktb_mangle() for failure case
Note
This function updates the IPv6 length and recalculates the TCP checksum for you.
Warning
After changing the length of a TCP message, the application will need to mangle sequence numbers in both directions until another change puts them in sync again
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
buf
pointer to buffer
that is used to print the object
size
size of the buffer (or remaining room in it).
tcph
pointer to a valid tcp header.
Returns
Same as snprintf
See also
snprintf (3)
Definition at line 160 of file tcp.c .
Author
Generated automatically by Doxygen for libnetfilter_queue from the source code.