libnetfilter_queue
1.0.3
|
Functions | |
struct iphdr * | nfq_ip_get_hdr (struct pkt_buff *pktb) |
int | nfq_ip_set_transport_header (struct pkt_buff *pktb, struct iphdr *iph) |
void | nfq_ip_set_checksum (struct iphdr *iph) |
int | nfq_ip_mangle (struct pkt_buff *pkt, unsigned int dataoff, unsigned int match_offset, unsigned int match_len, const char *rep_buffer, unsigned int rep_len) |
int | nfq_ip_snprintf (char *buf, size_t size, const struct iphdr *iph) |
struct iphdr* nfq_ip_get_hdr | ( | struct pkt_buff * | pktb | ) |
int nfq_ip_mangle | ( | struct pkt_buff * | pkt, |
unsigned int | dataoff, | ||
unsigned int | match_offset, | ||
unsigned int | match_len, | ||
const char * | rep_buffer, | ||
unsigned int | rep_len | ||
) |
nfq_ip_mangle - mangle IPv4 packet buffer
pktb | pointer to network packet buffer |
dataoff | offset to layer 4 header |
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 |
void nfq_ip_set_checksum | ( | struct iphdr * | iph | ) |
int nfq_ip_set_transport_header | ( | struct pkt_buff * | pktb, |
struct iphdr * | iph | ||
) |
int nfq_ip_snprintf | ( | char * | buf, |
size_t | size, | ||
const struct iphdr * | iph | ||
) |
nfq_pkt_snprintf_ip - print IPv4 header into buffer in iptables LOG format
buf | pointer to buffer that will be used to print the header |
size | size of the buffer (or remaining room in it) |
ip | pointer to a valid IPv4 header |
This function returns the number of bytes that would have been written in case that there is enough room in the buffer. Read snprintf manpage for more information to know more about this strange behaviour.