ipv6(3)

πŸ“¦
version 1.0.5 Β· 4 versions
, in ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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 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

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 buffer
  • ip6h β€” Pointer to IPv6 header
  • target β€” 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 object
  • size β€” Size of the buffer (or remaining room in it).
  • ip6h β€” Pointer to a valid IPv6 header.

Returns

same as snprintf

See also

snprintf(3)

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. πŸŒΈπŸŽ€πŸ¦‹