Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations
drbd_tag_magic.h File Reference
#include <linux/drbd_nl.h>

Go to the source code of this file.

Data Structures

struct  tag
 

Macros

#define TT_END   0
 
#define TT_REMOVED   0xE000
 
#define NL_PACKET(name, number, fields)   P_ ## name = number,
 
#define NL_RESPONSE(name, number)   P_ ## name = number,
 
#define NL_INTEGER(pn, pr, member)
 
#define NL_INT64(pn, pr, member)
 
#define NL_BIT(pn, pr, member)
 
#define NL_STRING(pn, pr, member, len)
 
#define NL_PACKET(name, number, fields)   struct name ## _tag_len_struct { fields };
 
#define NL_INTEGER(pn, pr, member)   int member; int tag_and_len ## member;
 
#define NL_INT64(pn, pr, member)   __u64 member; int tag_and_len ## member;
 
#define NL_BIT(pn, pr, member)   unsigned char member:1; int tag_and_len ## member;
 
#define NL_STRING(pn, pr, member, len)
 
#define NL_PACKET(name, number, fields)   2 fields ,
 
#define NL_INTEGER(pn, pr, member)   + 4 + 4
 
#define NL_INT64(pn, pr, member)   + 4 + 8
 
#define NL_BIT(pn, pr, member)   + 4 + 1
 
#define NL_STRING(pn, pr, member, len)   + 4 + (len)
 
#define TT_MASK   0xC000
 
#define TT_INTEGER   0x0000
 
#define TT_INT64   0x4000
 
#define TT_BIT   0x8000
 
#define TT_STRING   0xC000
 
#define T_MANDATORY   0x2000
 
#define T_MAY_IGNORE   0x0000
 
#define TN_MASK   0x1fff
 
#define tag_type(T)   ((T) & TT_MASK)
 
#define tag_number(T)   ((T) & TN_MASK)
 
#define NL_PACKET(name, number, fields)   fields
 
#define NL_INTEGER(pn, pr, member)   T_ ## member = pn | TT_INTEGER | pr ,
 
#define NL_INT64(pn, pr, member)   T_ ## member = pn | TT_INT64 | pr ,
 
#define NL_BIT(pn, pr, member)   T_ ## member = pn | TT_BIT | pr ,
 
#define NL_STRING(pn, pr, member, len)   T_ ## member = pn | TT_STRING | pr ,
 
#define NL_PACKET(name, number, fields)   fields
 
#define NL_INTEGER(pn, pr, member)   [ pn ] = { #member, TT_INTEGER | pr, sizeof(int) },
 
#define NL_INT64(pn, pr, member)   [ pn ] = { #member, TT_INT64 | pr, sizeof(__u64) },
 
#define NL_BIT(pn, pr, member)   [ pn ] = { #member, TT_BIT | pr, sizeof(int) },
 
#define NL_STRING(pn, pr, member, len)   [ pn ] = { #member, TT_STRING | pr, (len) },
 

Enumerations

enum  packet_types { P_nl_after_last_packet }
 
enum  drbd_tags
 

Macro Definition Documentation

#define NL_BIT (   pn,
  pr,
  member 
)

Definition at line 63 of file drbd_tag_magic.h.

#define NL_BIT (   pn,
  pr,
  member 
)    unsigned char member:1; int tag_and_len ## member;

Definition at line 63 of file drbd_tag_magic.h.

#define NL_BIT (   pn,
  pr,
  member 
)    + 4 + 1

Definition at line 63 of file drbd_tag_magic.h.

#define NL_BIT (   pn,
  pr,
  member 
)    T_ ## member = pn | TT_BIT | pr ,

Definition at line 63 of file drbd_tag_magic.h.

#define NL_BIT (   pn,
  pr,
  member 
)    [ pn ] = { #member, TT_BIT | pr, sizeof(int) },

Definition at line 63 of file drbd_tag_magic.h.

#define NL_INT64 (   pn,
  pr,
  member 
)

Definition at line 62 of file drbd_tag_magic.h.

#define NL_INT64 (   pn,
  pr,
  member 
)    __u64 member; int tag_and_len ## member;

Definition at line 62 of file drbd_tag_magic.h.

#define NL_INT64 (   pn,
  pr,
  member 
)    + 4 + 8

Definition at line 62 of file drbd_tag_magic.h.

#define NL_INT64 (   pn,
  pr,
  member 
)    T_ ## member = pn | TT_INT64 | pr ,

Definition at line 62 of file drbd_tag_magic.h.

#define NL_INT64 (   pn,
  pr,
  member 
)    [ pn ] = { #member, TT_INT64 | pr, sizeof(__u64) },

Definition at line 62 of file drbd_tag_magic.h.

#define NL_INTEGER (   pn,
  pr,
  member 
)

Definition at line 61 of file drbd_tag_magic.h.

#define NL_INTEGER (   pn,
  pr,
  member 
)    int member; int tag_and_len ## member;

Definition at line 61 of file drbd_tag_magic.h.

#define NL_INTEGER (   pn,
  pr,
  member 
)    + 4 + 4

Definition at line 61 of file drbd_tag_magic.h.

#define NL_INTEGER (   pn,
  pr,
  member 
)    T_ ## member = pn | TT_INTEGER | pr ,

Definition at line 61 of file drbd_tag_magic.h.

#define NL_INTEGER (   pn,
  pr,
  member 
)    [ pn ] = { #member, TT_INTEGER | pr, sizeof(int) },

Definition at line 61 of file drbd_tag_magic.h.

#define NL_PACKET (   name,
  number,
  fields 
)    P_ ## name = number,

Definition at line 75 of file drbd_tag_magic.h.

#define NL_PACKET (   name,
  number,
  fields 
)    struct name ## _tag_len_struct { fields };

Definition at line 75 of file drbd_tag_magic.h.

#define NL_PACKET (   name,
  number,
  fields 
)    2 fields ,

Definition at line 75 of file drbd_tag_magic.h.

#define NL_PACKET (   name,
  number,
  fields 
)    fields

Definition at line 75 of file drbd_tag_magic.h.

#define NL_PACKET (   name,
  number,
  fields 
)    fields

Definition at line 75 of file drbd_tag_magic.h.

#define NL_RESPONSE (   name,
  number 
)    P_ ## name = number,

Definition at line 10 of file drbd_tag_magic.h.

#define NL_STRING (   pn,
  pr,
  member,
  len 
)

Definition at line 64 of file drbd_tag_magic.h.

#define NL_STRING (   pn,
  pr,
  member,
  len 
)
Value:
unsigned char member[len]; int member ## _len; \
int tag_and_len ## member;

Definition at line 64 of file drbd_tag_magic.h.

#define NL_STRING (   pn,
  pr,
  member,
  len 
)    + 4 + (len)

Definition at line 64 of file drbd_tag_magic.h.

#define NL_STRING (   pn,
  pr,
  member,
  len 
)    T_ ## member = pn | TT_STRING | pr ,

Definition at line 64 of file drbd_tag_magic.h.

#define NL_STRING (   pn,
  pr,
  member,
  len 
)    [ pn ] = { #member, TT_STRING | pr, (len) },

Definition at line 64 of file drbd_tag_magic.h.

#define T_MANDATORY   0x2000

Definition at line 50 of file drbd_tag_magic.h.

#define T_MAY_IGNORE   0x0000

Definition at line 51 of file drbd_tag_magic.h.

#define tag_number (   T)    ((T) & TN_MASK)

Definition at line 56 of file drbd_tag_magic.h.

#define tag_type (   T)    ((T) & TT_MASK)

Definition at line 55 of file drbd_tag_magic.h.

#define TN_MASK   0x1fff

Definition at line 52 of file drbd_tag_magic.h.

#define TT_BIT   0x8000

Definition at line 47 of file drbd_tag_magic.h.

#define TT_END   0

Definition at line 4 of file drbd_tag_magic.h.

#define TT_INT64   0x4000

Definition at line 46 of file drbd_tag_magic.h.

#define TT_INTEGER   0x0000

Definition at line 45 of file drbd_tag_magic.h.

#define TT_MASK   0xC000

Definition at line 44 of file drbd_tag_magic.h.

#define TT_REMOVED   0xE000

Definition at line 5 of file drbd_tag_magic.h.

#define TT_STRING   0xC000

Definition at line 48 of file drbd_tag_magic.h.

Enumeration Type Documentation

enum drbd_tags

Definition at line 60 of file drbd_tag_magic.h.

Enumerator:
P_nl_after_last_packet 

Definition at line 8 of file drbd_tag_magic.h.