Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
ud_header.c File Reference
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/export.h>
#include <linux/if_ether.h>
#include <rdma/ib_pack.h>

Go to the source code of this file.

Macros

#define STRUCT_FIELD(header, field)
 

Functions

void ib_ud_header_init (int payload_bytes, int lrh_present, int eth_present, int vlan_present, int grh_present, int immediate_present, struct ib_ud_header *header)
 
 EXPORT_SYMBOL (ib_ud_header_init)
 
int ib_ud_header_pack (struct ib_ud_header *header, void *buf)
 
 EXPORT_SYMBOL (ib_ud_header_pack)
 
int ib_ud_header_unpack (void *buf, struct ib_ud_header *header)
 
 EXPORT_SYMBOL (ib_ud_header_unpack)
 

Macro Definition Documentation

#define STRUCT_FIELD (   header,
  field 
)
Value:
.struct_offset_bytes = offsetof(struct ib_unpacked_ ## header, field), \
.struct_size_bytes = sizeof ((struct ib_unpacked_ ## header *) 0)->field, \
.field_name = #header ":" #field

Definition at line 41 of file ud_header.c.

Function Documentation

EXPORT_SYMBOL ( ib_ud_header_init  )
EXPORT_SYMBOL ( ib_ud_header_pack  )
EXPORT_SYMBOL ( ib_ud_header_unpack  )
void ib_ud_header_init ( int  payload_bytes,
int  lrh_present,
int  eth_present,
int  vlan_present,
int  grh_present,
int  immediate_present,
struct ib_ud_header header 
)

ib_ud_header_init - Initialize UD header structure :Length of packet payload : specify if LRH is present : specify if Eth header is present : packet is tagged vlan :GRH flag (if non-zero, GRH will be included) : specify if immediate data is present :Structure to initialize

Definition at line 226 of file ud_header.c.

int ib_ud_header_pack ( struct ib_ud_header header,
void buf 
)

ib_ud_header_pack - Pack UD header struct into wire format :UD header struct :Buffer to pack into

ib_ud_header_pack() packs the UD header structure into wire format in the buffer .

Definition at line 289 of file ud_header.c.

int ib_ud_header_unpack ( void buf,
struct ib_ud_header header 
)

ib_ud_header_unpack - Unpack UD header struct from wire format :UD header struct :Buffer to pack into

ib_ud_header_pack() unpacks the UD header structure from wire format in the buffer .

Definition at line 340 of file ud_header.c.