netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
IPv6 helper functions

Functions

struct ip6_hdr * nfq_ip6_get_hdr (struct pkt_buff *pktb)
 nfq_ip6_get_hdr - get IPv6 header More...
 
 EXPORT_SYMBOL (nfq_ip6_get_hdr)
 
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 More...
 
 EXPORT_SYMBOL (nfq_ip6_set_transport_header)
 
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 More...
 
 EXPORT_SYMBOL (nfq_ip6_snprintf)
 

Detailed Description

Function Documentation

EXPORT_SYMBOL ( nfq_ip6_get_hdr  )
EXPORT_SYMBOL ( nfq_ip6_set_transport_header  )
EXPORT_SYMBOL ( nfq_ip6_snprintf  )
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.

References pkt_buff::network_header, NULL, and pkt_buff::tail.

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.

References NULL, offsetof, pkt_buff::tail, and pkt_buff::transport_header.

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.