logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

otherfns - Other functions

Author

       Generated automatically by Doxygen for libnetfilter_queue from the source code.

libnetfilter_queue                                Version 1.0.5                                      otherfns(3)

Detailed Description

       The library provides a number of other functions which many user-space programs will never need. These
       divide into 2 groups:

       1.  Functions to get values of members of opaque structpktbuff, described below

       2.  Internal functions, described in Module Internalfunctions

Function Documentation

uint8_t*pktb_mac_header(structpkt_buff*pktb)
       pktb_mac_header - get address of layer 2 header (if any)

       Parameterspktb Pointer to userspace packet buffer

       Returns
           Pointer to MAC header or NULL if no such header present.
           Only packet buffers in family AF_BRIDGE have a non-NULL MAC header.

       Definition at line 233 of file pktbuff.c.

   uint8_t*pktb_network_header(structpkt_buff*pktb)
       pktb_network_header - get address of layer 3 header

       Parameterspktb Pointer to userspace packet buffer

       Returns
           Pointer to layer 3 header or NULL if the packet buffer was created with an unsupported family

       Definition at line 245 of file pktbuff.c.

   unsignedintpktb_tailroom(structpkt_buff*pktb)
       pktb_tailroom - get room available for packet expansion

       Parameterspktb Pointer to userspace packet buffer

       Returns
           room in bytes after the tail of the packet buffer
           This  starts off as the extra argument to pktb_alloc(). Programmers should ensure this extra argument
           is sufficient for any packet mangle, as packet buffers cannot be expanded dynamically.

       Definition at line 220 of file pktbuff.c.

   uint8_t*pktb_transport_header(structpkt_buff*pktb)
       pktb_transport_header - get address of layer 4 header (if known)

       Parameterspktb Pointer to userspace packet buffer

       Returns
           Pointer to layer 4 header or NULL if not (yet) set

       Note
           Unlike the lower-level headers,  it  is  the  programmer's  responsibility  to  create  the  level  4
           (transport) header pointer by caling e.g. nfq_ip_set_transport_header()

       Definition at line 260 of file pktbuff.c.

Name

       otherfns - Other functions

Synopsis

ModulesInternalfunctionsFunctions
       unsigned int pktb_tailroom (struct pkt_buff *pktb)
       uint8_t * pktb_mac_header (struct pkt_buff *pktb)
       uint8_t * pktb_network_header (struct pkt_buff *pktb)
       uint8_t * pktb_transport_header (struct pkt_buff *pktb)

See Also