.TH "otherfns" 3 "Thu Jan 28 2021" "Version 1.0.5" "libnetfilter_queue" \" -*- nroff -*- .ad l .nh .SH NAME otherfns \- Other functions .SH SYNOPSIS .br .PP .SS "Modules" .in +1c .ti -1c .RI "\fBInternal functions\fP" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "unsigned int \fBpktb_tailroom\fP (struct pkt_buff *pktb)" .br .ti -1c .RI "uint8_t * \fBpktb_mac_header\fP (struct pkt_buff *pktb)" .br .ti -1c .RI "uint8_t * \fBpktb_network_header\fP (struct pkt_buff *pktb)" .br .ti -1c .RI "uint8_t * \fBpktb_transport_header\fP (struct pkt_buff *pktb)" .br .in -1c .SH "Detailed Description" .PP The library provides a number of other functions which many user-space programs will never need\&. These divide into 2 groups: .br .IP "1." 4 Functions to get values of members of opaque \fBstruct pktbuff\fP, described below .br .IP "2." 4 Internal functions, described in Module \fBInternal functions\fP .PP .SH "Function Documentation" .PP .SS "uint8_t* pktb_mac_header (struct pkt_buff * pktb)" pktb_mac_header - get address of layer 2 header (if any) .PP \fBParameters\fP .RS 4 \fIpktb\fP Pointer to userspace packet buffer .RE .PP \fBReturns\fP .RS 4 Pointer to MAC header or NULL if no such header present\&. .br Only packet buffers in family \fBAF_BRIDGE\fP have a non-NULL MAC header\&. .RE .PP .PP Definition at line 233 of file pktbuff\&.c\&. .SS "uint8_t* pktb_network_header (struct pkt_buff * pktb)" pktb_network_header - get address of layer 3 header .PP \fBParameters\fP .RS 4 \fIpktb\fP Pointer to userspace packet buffer .RE .PP \fBReturns\fP .RS 4 Pointer to layer 3 header or NULL if the packet buffer was created with an unsupported family .RE .PP .PP Definition at line 245 of file pktbuff\&.c\&. .SS "unsigned int pktb_tailroom (struct pkt_buff * pktb)" pktb_tailroom - get room available for packet expansion .PP \fBParameters\fP .RS 4 \fIpktb\fP Pointer to userspace packet buffer .RE .PP \fBReturns\fP .RS 4 room in bytes after the tail of the packet buffer .br This starts off as the \fBextra\fP argument to \fBpktb_alloc()\fP\&. Programmers should ensure this \fBextra\fP argument is sufficient for any packet mangle, as packet buffers cannot be expanded dynamically\&. .RE .PP .PP Definition at line 220 of file pktbuff\&.c\&. .SS "uint8_t* pktb_transport_header (struct pkt_buff * pktb)" pktb_transport_header - get address of layer 4 header (if known) .PP \fBParameters\fP .RS 4 \fIpktb\fP Pointer to userspace packet buffer .RE .PP \fBReturns\fP .RS 4 Pointer to layer 4 header or NULL if not (yet) set .RE .PP \fBNote\fP .RS 4 Unlike the lower-level headers, it is the programmer's responsibility to create the level 4 (transport) header pointer by caling e\&.g\&. \fBnfq_ip_set_transport_header()\fP .RE .PP .PP Definition at line 260 of file pktbuff\&.c\&. .SH "Author" .PP Generated automatically by Doxygen for libnetfilter_queue from the source code\&.