ipv6(3)
π ipv6 β IPv6 helper functions π
okay bestie, welcome to ipv6(3) from the libnetfilter_queue library manual π«Ά this is the page where all the IPv6 helper functions live. no cap, it's a lil short but every single one of these is lowkey doing the most for your packet mangling era β¨
πΈ SYNOPSIS πΈ
here's the whole squad, signatures exactly as they are, don't come for me:
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_mangle (struct pkt_buff *pktb, unsigned int dataoff,
unsigned int match_offset, unsigned int match_len, const char
*rep_buffer, unsigned int rep_len)
int nfq_ip6_snprintf (char *buf, size_t size, const struct ip6_hdr
*ip6h)
β¨ Detailed Description β¨
these are the helper functions that deal with IPv6 packets. that's the vibe. that's the whole thing. π
π Function Documentation π
π¦ struct ip6_hdr * nfq_ip6_get_hdr (struct pkt_buff * pktb) π¦
nfq_ip6_get_hdr β get IPv6 header. literally just grabs it for you, main character energy.
Parameters
pktbβ Pointer to user-space network packet buffer
Returns
pointer to IPv6 header if a valid header found, else NULL.
Definition at line 36 of file ipv6.c.
π int nfq_ip6_mangle (struct pkt_buff * pktb, unsigned int dataoff, unsigned int match_offset, unsigned int match_len, const char * rep_buffer, unsigned int rep_len) π
nfq_ip6_mangle β mangle IPv6 packet buffer. yes bestie, we're editing the packet, this is the iconic one π₯
Parameters
pktbβ Pointer to user-space network packet bufferdataoffβ Offset to layer 4 headermatch_offsetβ Offset to content that you want to manglematch_lenβ Length of the existing content you want to manglerep_bufferβ Pointer to data you want to use to replace current contentrep_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 (if necessary)
Definition at line 131 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. pointing the pointer where it needs to be, we love a glow-up π«Ά
Parameters
pktbβ Pointer to user-space network packet bufferip6hβ Pointer to IPv6 headertargetβ Protocol number to find transport header (ie.IPPROTO_*)
Returns
1 if the protocol has been found and the transport header has been set, else 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. it's giving aesthetic, it's giving readable output π
Parameters
bufβ Pointer to buffer that is used to print the objectsizeβ Size of the buffer (or remaining room in it).ip6hβ Pointer to a valid IPv6 header.
Returns
same as snprintf
See also
Definition at line 158 of file ipv6.c.
π§ Author π§
Generated automatically by Doxygen for libnetfilter_queue from the source code. (not a human, just a robot doing its lil thing, no thoughts head empty β)
k that's the whole page bestie, go forth and mangle some IPv6 packets responsibly π β¨
and finally, the sign-off cuties: this was libnetfilter_queue, Version 1.0.5, and this page is ipv6(3) β dated with that version, periodt. πΈππ¦
π¦ where this page comes from
- ubuntu noble: libnetfilter-queue-doc 1.0.5-4build1 Β· GPL-2.0-or-later
- ubuntu questing: libnetfilter-queue-doc 1.0.5-4build1
- ubuntu resolute: libnetfilter-queue-doc 1.0.5-4build2 Β· GPL-2.0-or-later
- ubuntu stonking: libnetfilter-queue-doc 1.0.5-4build2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms