Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
msg.h File Reference
#include "bearer.h"

Go to the source code of this file.

Data Structures

struct  tipc_msg
 

Macros

#define TIPC_VERSION   2
 
#define TIPC_CONN_MSG   0
 
#define TIPC_MCAST_MSG   1
 
#define TIPC_NAMED_MSG   2
 
#define TIPC_DIRECT_MSG   3
 
#define SHORT_H_SIZE   24 /* In-cluster basic payload message */
 
#define BASIC_H_SIZE   32 /* Basic payload message */
 
#define NAMED_H_SIZE   40 /* Named payload message */
 
#define MCAST_H_SIZE   44 /* Multicast payload message */
 
#define INT_H_SIZE   40 /* Internal messages */
 
#define MIN_H_SIZE   24 /* Smallest legal TIPC header size */
 
#define MAX_H_SIZE   60 /* Largest possible TIPC header size */
 
#define MAX_MSG_SIZE   (MAX_H_SIZE + TIPC_MAX_USER_MSG_SIZE)
 
#define TIPC_MEDIA_ADDR_OFFSET   5
 
#define BCAST_PROTOCOL   5
 
#define MSG_BUNDLER   6
 
#define LINK_PROTOCOL   7
 
#define CONN_MANAGER   8
 
#define ROUTE_DISTRIBUTOR   9 /* obsoleted */
 
#define CHANGEOVER_PROTOCOL   10
 
#define NAME_DISTRIBUTOR   11
 
#define MSG_FRAGMENTER   12
 
#define LINK_CONFIG   13
 
#define CONN_PROBE   0
 
#define CONN_PROBE_REPLY   1
 
#define CONN_ACK   2
 
#define PUBLICATION   0
 
#define WITHDRAWAL   1
 
#define FIRST_FRAGMENT   0
 
#define FRAGMENT   1
 
#define LAST_FRAGMENT   2
 
#define STATE_MSG   0
 
#define RESET_MSG   1
 
#define ACTIVATE_MSG   2
 
#define DUPLICATE_MSG   0
 
#define ORIGINAL_MSG   1
 
#define DSC_REQ_MSG   0
 
#define DSC_RESP_MSG   1
 

Functions

u32 tipc_msg_tot_importance (struct tipc_msg *m)
 
void tipc_msg_init (struct tipc_msg *m, u32 user, u32 type, u32 hsize, u32 destnode)
 
int tipc_msg_build (struct tipc_msg *hdr, struct iovec const *msg_sect, u32 num_sect, unsigned int total_len, int max_size, int usrmem, struct sk_buff **buf)
 

Macro Definition Documentation

#define ACTIVATE_MSG   2

Definition at line 471 of file msg.h.

#define BASIC_H_SIZE   32 /* Basic payload message */

Definition at line 69 of file msg.h.

#define BCAST_PROTOCOL   5

Definition at line 436 of file msg.h.

#define CHANGEOVER_PROTOCOL   10

Definition at line 441 of file msg.h.

#define CONN_ACK   2

Definition at line 451 of file msg.h.

#define CONN_MANAGER   8

Definition at line 439 of file msg.h.

#define CONN_PROBE   0

Definition at line 449 of file msg.h.

#define CONN_PROBE_REPLY   1

Definition at line 450 of file msg.h.

#define DSC_REQ_MSG   0

Definition at line 482 of file msg.h.

#define DSC_RESP_MSG   1

Definition at line 483 of file msg.h.

#define DUPLICATE_MSG   0

Definition at line 476 of file msg.h.

#define FIRST_FRAGMENT   0

Definition at line 462 of file msg.h.

#define FRAGMENT   1

Definition at line 463 of file msg.h.

#define INT_H_SIZE   40 /* Internal messages */

Definition at line 72 of file msg.h.

#define LAST_FRAGMENT   2

Definition at line 464 of file msg.h.

#define LINK_CONFIG   13

Definition at line 444 of file msg.h.

#define LINK_PROTOCOL   7

Definition at line 438 of file msg.h.

#define MAX_H_SIZE   60 /* Largest possible TIPC header size */

Definition at line 74 of file msg.h.

#define MAX_MSG_SIZE   (MAX_H_SIZE + TIPC_MAX_USER_MSG_SIZE)

Definition at line 76 of file msg.h.

#define MCAST_H_SIZE   44 /* Multicast payload message */

Definition at line 71 of file msg.h.

#define MIN_H_SIZE   24 /* Smallest legal TIPC header size */

Definition at line 73 of file msg.h.

#define MSG_BUNDLER   6

Definition at line 437 of file msg.h.

#define MSG_FRAGMENTER   12

Definition at line 443 of file msg.h.

#define NAME_DISTRIBUTOR   11

Definition at line 442 of file msg.h.

#define NAMED_H_SIZE   40 /* Named payload message */

Definition at line 70 of file msg.h.

#define ORIGINAL_MSG   1

Definition at line 477 of file msg.h.

#define PUBLICATION   0

Definition at line 456 of file msg.h.

#define RESET_MSG   1

Definition at line 470 of file msg.h.

#define ROUTE_DISTRIBUTOR   9 /* obsoleted */

Definition at line 440 of file msg.h.

#define SHORT_H_SIZE   24 /* In-cluster basic payload message */

Definition at line 68 of file msg.h.

#define STATE_MSG   0

Definition at line 469 of file msg.h.

#define TIPC_CONN_MSG   0

Definition at line 60 of file msg.h.

#define TIPC_DIRECT_MSG   3

Definition at line 63 of file msg.h.

#define TIPC_MCAST_MSG   1

Definition at line 61 of file msg.h.

#define TIPC_MEDIA_ADDR_OFFSET   5

Definition at line 78 of file msg.h.

#define TIPC_NAMED_MSG   2

Definition at line 62 of file msg.h.

#define TIPC_VERSION   2

Definition at line 47 of file msg.h.

#define WITHDRAWAL   1

Definition at line 457 of file msg.h.

Function Documentation

int tipc_msg_build ( struct tipc_msg hdr,
struct iovec const msg_sect,
u32  num_sect,
unsigned int  total_len,
int  max_size,
int  usrmem,
struct sk_buff **  buf 
)

tipc_msg_build - create message using specified header and data

Note: Caller must not hold any locks in case copy_from_user() is interrupted!

Returns message data size or errno

Definition at line 75 of file msg.c.

void tipc_msg_init ( struct tipc_msg m,
u32  user,
u32  type,
u32  hsize,
u32  destnode 
)

Definition at line 54 of file msg.c.

u32 tipc_msg_tot_importance ( struct tipc_msg m)

Definition at line 40 of file msg.c.