netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
pktbuff.c File Reference
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <netinet/if_ether.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include "internal.h"
Include dependency graph for pktbuff.c:

Functions

struct pkt_buffpktb_alloc (int family, void *data, size_t len, size_t extra)
 pktb_alloc - allocate a new packet buffer More...
 
 EXPORT_SYMBOL (pktb_alloc)
 
uint8_t * pktb_data (struct pkt_buff *pktb)
 pktb_data - return pointer to the beginning of the packet buffer More...
 
 EXPORT_SYMBOL (pktb_data)
 
uint32_t pktb_len (struct pkt_buff *pktb)
 pktb_len - return length of the packet buffer More...
 
 EXPORT_SYMBOL (pktb_len)
 
void pktb_free (struct pkt_buff *pktb)
 pktb_free - release packet buffer More...
 
 EXPORT_SYMBOL (pktb_free)
 
void pktb_push (struct pkt_buff *pktb, unsigned int len)
 pktb_push - update pointer to the beginning of the packet buffer More...
 
 EXPORT_SYMBOL (pktb_push)
 
void pktb_pull (struct pkt_buff *pktb, unsigned int len)
 pktb_pull - update pointer to the beginning of the packet buffer More...
 
 EXPORT_SYMBOL (pktb_pull)
 
void pktb_put (struct pkt_buff *pktb, unsigned int len)
 pktb_put - add extra bytes to the tail of the packet buffer More...
 
 EXPORT_SYMBOL (pktb_put)
 
void pktb_trim (struct pkt_buff *pktb, unsigned int len)
 pktb_trim - set new length for this packet buffer More...
 
 EXPORT_SYMBOL (pktb_trim)
 
unsigned int pktb_tailroom (struct pkt_buff *pktb)
 pktb_tailroom - get room in bytes in the tail of the packet buffer More...
 
 EXPORT_SYMBOL (pktb_tailroom)
 
uint8_t * pktb_mac_header (struct pkt_buff *pktb)
 pktb_mac_header - return pointer to layer 2 header (if any) More...
 
 EXPORT_SYMBOL (pktb_mac_header)
 
uint8_t * pktb_network_header (struct pkt_buff *pktb)
 pktb_network_header - return pointer to layer 3 header More...
 
 EXPORT_SYMBOL (pktb_network_header)
 
uint8_t * pktb_transport_header (struct pkt_buff *pktb)
 pktb_transport_header - return pointer to layer 4 header (if any) More...
 
 EXPORT_SYMBOL (pktb_transport_header)
 
int pktb_mangle (struct pkt_buff *pkt, unsigned int dataoff, unsigned int match_offset, unsigned int match_len, const char *rep_buffer, unsigned int rep_len)
 
 EXPORT_SYMBOL (pktb_mangle)
 
bool pktb_mangled (const struct pkt_buff *pkt)
 pktb_mangled - return true if packet has been mangled More...
 
 EXPORT_SYMBOL (pktb_mangled)