Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
cfpkt_skbuff.c File Reference
#include <linux/string.h>
#include <linux/skbuff.h>
#include <linux/hardirq.h>
#include <linux/export.h>
#include <net/caif/cfpkt.h>

Go to the source code of this file.

Data Structures

struct  cfpktq
 
struct  cfpkt
 
struct  cfpkt_priv_data
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ":%s(): " fmt, __func__
 
#define PKT_PREFIX   48
 
#define PKT_POSTFIX   2
 
#define PKT_LEN_WHEN_EXTENDING   128
 
#define PKT_ERROR(pkt, errmsg)
 

Functions

struct cfpktcfpkt_fromnative (enum caif_direction dir, void *nativepkt)
 
 EXPORT_SYMBOL (cfpkt_fromnative)
 
voidcfpkt_tonative (struct cfpkt *pkt)
 
 EXPORT_SYMBOL (cfpkt_tonative)
 
struct cfpktcfpkt_create (u16 len)
 
void cfpkt_destroy (struct cfpkt *pkt)
 
bool cfpkt_more (struct cfpkt *pkt)
 
int cfpkt_peek_head (struct cfpkt *pkt, void *data, u16 len)
 
int cfpkt_extr_head (struct cfpkt *pkt, void *data, u16 len)
 
 EXPORT_SYMBOL (cfpkt_extr_head)
 
int cfpkt_extr_trail (struct cfpkt *pkt, void *dta, u16 len)
 
int cfpkt_pad_trail (struct cfpkt *pkt, u16 len)
 
int cfpkt_add_body (struct cfpkt *pkt, const void *data, u16 len)
 
int cfpkt_addbdy (struct cfpkt *pkt, u8 data)
 
int cfpkt_add_head (struct cfpkt *pkt, const void *data2, u16 len)
 
 EXPORT_SYMBOL (cfpkt_add_head)
 
int cfpkt_add_trail (struct cfpkt *pkt, const void *data, u16 len)
 
u16 cfpkt_getlen (struct cfpkt *pkt)
 
u16 cfpkt_iterate (struct cfpkt *pkt, u16(*iter_func)(u16, void *, u16), u16 data)
 
int cfpkt_setlen (struct cfpkt *pkt, u16 len)
 
struct cfpktcfpkt_append (struct cfpkt *dstpkt, struct cfpkt *addpkt, u16 expectlen)
 
struct cfpktcfpkt_split (struct cfpkt *pkt, u16 pos)
 
bool cfpkt_erroneous (struct cfpkt *pkt)
 
struct caif_payload_infocfpkt_info (struct cfpkt *pkt)
 
 EXPORT_SYMBOL (cfpkt_info)
 
void cfpkt_set_prio (struct cfpkt *pkt, int prio)
 
 EXPORT_SYMBOL (cfpkt_set_prio)
 

Macro Definition Documentation

#define PKT_ERROR (   pkt,
  errmsg 
)
Value:
do { \
cfpkt_priv(pkt)->erronous = true; \
skb_reset_tail_pointer(&pkt->skb); \
pr_warn(errmsg); \
} while (0)

Definition at line 18 of file cfpkt_skbuff.c.

#define PKT_LEN_WHEN_EXTENDING   128

Definition at line 17 of file cfpkt_skbuff.c.

#define PKT_POSTFIX   2

Definition at line 16 of file cfpkt_skbuff.c.

#define PKT_PREFIX   48

Definition at line 15 of file cfpkt_skbuff.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ":%s(): " fmt, __func__

Definition at line 7 of file cfpkt_skbuff.c.

Function Documentation

int cfpkt_add_body ( struct cfpkt pkt,
const void data,
u16  len 
)

Definition at line 177 of file cfpkt_skbuff.c.

int cfpkt_add_head ( struct cfpkt pkt,
const void data2,
u16  len 
)

Definition at line 230 of file cfpkt_skbuff.c.

int cfpkt_add_trail ( struct cfpkt pkt,
const void data,
u16  len 
)
inline

Definition at line 257 of file cfpkt_skbuff.c.

int cfpkt_addbdy ( struct cfpkt pkt,
u8  data 
)
inline

Definition at line 225 of file cfpkt_skbuff.c.

struct cfpkt* cfpkt_append ( struct cfpkt dstpkt,
struct cfpkt addpkt,
u16  expectlen 
)
read

Definition at line 309 of file cfpkt_skbuff.c.

struct cfpkt* cfpkt_create ( u16  len)
read

Definition at line 96 of file cfpkt_skbuff.c.

void cfpkt_destroy ( struct cfpkt pkt)

Definition at line 101 of file cfpkt_skbuff.c.

bool cfpkt_erroneous ( struct cfpkt pkt)

Definition at line 388 of file cfpkt_skbuff.c.

int cfpkt_extr_head ( struct cfpkt pkt,
void data,
u16  len 
)

Definition at line 124 of file cfpkt_skbuff.c.

int cfpkt_extr_trail ( struct cfpkt pkt,
void dta,
u16  len 
)

Definition at line 150 of file cfpkt_skbuff.c.

struct cfpkt* cfpkt_fromnative ( enum caif_direction  dir,
void nativepkt 
)
read

Definition at line 66 of file cfpkt_skbuff.c.

u16 cfpkt_getlen ( struct cfpkt pkt)
inline

Definition at line 262 of file cfpkt_skbuff.c.

struct caif_payload_info* cfpkt_info ( struct cfpkt pkt)
read

Definition at line 393 of file cfpkt_skbuff.c.

u16 cfpkt_iterate ( struct cfpkt pkt,
u16(*)(u16, void *, u16 iter_func,
u16  data 
)
inline

Definition at line 268 of file cfpkt_skbuff.c.

bool cfpkt_more ( struct cfpkt pkt)
inline

Definition at line 107 of file cfpkt_skbuff.c.

int cfpkt_pad_trail ( struct cfpkt pkt,
u16  len 
)

Definition at line 172 of file cfpkt_skbuff.c.

int cfpkt_peek_head ( struct cfpkt pkt,
void data,
u16  len 
)

Definition at line 113 of file cfpkt_skbuff.c.

void cfpkt_set_prio ( struct cfpkt pkt,
int  prio 
)

cfpkt_set_prio - set priority for a CAIF packet.

: The CAIF packet to be adjusted. : one of TC_PRIO_ constants.

Definition at line 399 of file cfpkt_skbuff.c.

int cfpkt_setlen ( struct cfpkt pkt,
u16  len 
)

Definition at line 285 of file cfpkt_skbuff.c.

struct cfpkt* cfpkt_split ( struct cfpkt pkt,
u16  pos 
)
read

Definition at line 350 of file cfpkt_skbuff.c.

void* cfpkt_tonative ( struct cfpkt pkt)

Definition at line 74 of file cfpkt_skbuff.c.

EXPORT_SYMBOL ( cfpkt_fromnative  )
EXPORT_SYMBOL ( cfpkt_tonative  )
EXPORT_SYMBOL ( cfpkt_extr_head  )
EXPORT_SYMBOL ( cfpkt_add_head  )
EXPORT_SYMBOL ( cfpkt_info  )
EXPORT_SYMBOL ( cfpkt_set_prio  )