libnetfilter_queue  1.0.3
Functions
IPv6 helper functions

Functions

struct ip6_hdr * nfq_ip6_get_hdr (struct pkt_buff *pktb)
 
int nfq_ip6_set_transport_header (struct pkt_buff *pktb, struct ip6_hdr *ip6h, uint8_t target)
 
int nfq_ip6_snprintf (char *buf, size_t size, const struct ip6_hdr *ip6h)
 

Detailed Description

Function Documentation

struct ip6_hdr* nfq_ip6_get_hdr ( struct pkt_buff *  pktb)

nfq_ip6_get_hdr - get IPv6 header

Parameters
pktbpointer to user-space network packet buffer

This funcion returns NULL if an invalid header is found. On sucess, it returns a valid pointer to the header.

Definition at line 36 of file ipv6.c.

int nfq_ip6_set_transport_header ( struct pkt_buff *  pktb,
struct ip6_hdr *  ip6h,
uint8_t  target 
)

nfq_ip6_set_transport_header - set transport header pointer for IPv6 packet

Parameters
pktbpointer to user-space network packet buffer
ip6hpointer to IPv6 header
targetprotocol number to find transport header (ie. IPPROTO_*)

This function returns 1 if the protocol has been found and the transport header has been set. Otherwise, it returns 0.

Definition at line 64 of file ipv6.c.

int nfq_ip6_snprintf ( char *  buf,
size_t  size,
const struct ip6_hdr *  ip6h 
)

nfq_ip6_snprintf - print IPv6 header into one buffer in iptables LOG format

Parameters
bufpointer to buffer that is used to print the object
sizesize of the buffer (or remaining room in it).
ip6_hdrpointer to a valid IPv6 header.

Definition at line 127 of file ipv6.c.