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

Go to the source code of this file.

Data Structures

struct  user_port
 
struct  tipc_port
 

Macros

#define TIPC_FLOW_CONTROL_WIN   512
 

Typedefs

typedef void(* tipc_msg_err_event )(void *usr_handle, u32 portref, struct sk_buff **buf, unsigned char const *data, unsigned int size, int reason, struct tipc_portid const *attmpt_destid)
 
typedef void(* tipc_named_msg_err_event )(void *usr_handle, u32 portref, struct sk_buff **buf, unsigned char const *data, unsigned int size, int reason, struct tipc_name_seq const *attmpt_dest)
 
typedef void(* tipc_conn_shutdown_event )(void *usr_handle, u32 portref, struct sk_buff **buf, unsigned char const *data, unsigned int size, int reason)
 
typedef void(* tipc_msg_event )(void *usr_handle, u32 portref, struct sk_buff **buf, unsigned char const *data, unsigned int size, unsigned int importance, struct tipc_portid const *origin)
 
typedef void(* tipc_named_msg_event )(void *usr_handle, u32 portref, struct sk_buff **buf, unsigned char const *data, unsigned int size, unsigned int importance, struct tipc_portid const *orig, struct tipc_name_seq const *dest)
 
typedef void(* tipc_conn_msg_event )(void *usr_handle, u32 portref, struct sk_buff **buf, unsigned char const *data, unsigned int size)
 
typedef void(* tipc_continue_event )(void *usr_handle, u32 portref)
 

Functions

struct tipc_porttipc_createport_raw (void *usr_handle, u32(*dispatcher)(struct tipc_port *, struct sk_buff *), void(*wakeup)(struct tipc_port *), const u32 importance)
 
int tipc_reject_msg (struct sk_buff *buf, u32 err)
 
int tipc_send_buf_fast (struct sk_buff *buf, u32 destnode)
 
void tipc_acknowledge (u32 port_ref, u32 ack)
 
int tipc_createport (void *usr_handle, unsigned int importance, tipc_msg_err_event error_cb, tipc_named_msg_err_event named_error_cb, tipc_conn_shutdown_event conn_error_cb, tipc_msg_event msg_cb, tipc_named_msg_event named_msg_cb, tipc_conn_msg_event conn_msg_cb, tipc_continue_event continue_event_cb, u32 *portref)
 
int tipc_deleteport (u32 portref)
 
int tipc_portimportance (u32 portref, unsigned int *importance)
 
int tipc_set_portimportance (u32 portref, unsigned int importance)
 
int tipc_portunreliable (u32 portref, unsigned int *isunreliable)
 
int tipc_set_portunreliable (u32 portref, unsigned int isunreliable)
 
int tipc_portunreturnable (u32 portref, unsigned int *isunreturnable)
 
int tipc_set_portunreturnable (u32 portref, unsigned int isunreturnable)
 
int tipc_publish (u32 portref, unsigned int scope, struct tipc_name_seq const *name_seq)
 
int tipc_withdraw (u32 portref, unsigned int scope, struct tipc_name_seq const *name_seq)
 
int tipc_connect2port (u32 portref, struct tipc_portid const *port)
 
int tipc_disconnect (u32 portref)
 
int tipc_shutdown (u32 ref)
 
int tipc_disconnect_port (struct tipc_port *tp_ptr)
 
int tipc_port_peer_msg (struct tipc_port *p_ptr, struct tipc_msg *msg)
 
int tipc_port_recv_msg (struct sk_buff *buf)
 
int tipc_send (u32 portref, unsigned int num_sect, struct iovec const *msg_sect, unsigned int total_len)
 
int tipc_send2name (u32 portref, struct tipc_name const *name, u32 domain, unsigned int num_sect, struct iovec const *msg_sect, unsigned int total_len)
 
int tipc_send2port (u32 portref, struct tipc_portid const *dest, unsigned int num_sect, struct iovec const *msg_sect, unsigned int total_len)
 
int tipc_send_buf2port (u32 portref, struct tipc_portid const *dest, struct sk_buff *buf, unsigned int dsz)
 
int tipc_multicast (u32 portref, struct tipc_name_seq const *seq, unsigned int section_count, struct iovec const *msg, unsigned int total_len)
 
int tipc_port_reject_sections (struct tipc_port *p_ptr, struct tipc_msg *hdr, struct iovec const *msg_sect, u32 num_sect, unsigned int total_len, int err)
 
struct sk_bufftipc_port_get_ports (void)
 
void tipc_port_recv_proto_msg (struct sk_buff *buf)
 
void tipc_port_recv_mcast (struct sk_buff *buf, struct tipc_port_list *dp)
 
void tipc_port_reinit (void)
 

Variables

spinlock_t tipc_port_list_lock
 

Macro Definition Documentation

#define TIPC_FLOW_CONTROL_WIN   512

Definition at line 45 of file port.h.

Typedef Documentation

typedef void(* tipc_conn_msg_event)(void *usr_handle, u32 portref, struct sk_buff **buf, unsigned char const *data, unsigned int size)

Definition at line 72 of file port.h.

typedef void(* tipc_conn_shutdown_event)(void *usr_handle, u32 portref, struct sk_buff **buf, unsigned char const *data, unsigned int size, int reason)

Definition at line 57 of file port.h.

typedef void(* tipc_continue_event)(void *usr_handle, u32 portref)

Definition at line 76 of file port.h.

typedef void(* tipc_msg_err_event)(void *usr_handle, u32 portref, struct sk_buff **buf, unsigned char const *data, unsigned int size, int reason, struct tipc_portid const *attmpt_destid)

Definition at line 47 of file port.h.

typedef void(* tipc_msg_event)(void *usr_handle, u32 portref, struct sk_buff **buf, unsigned char const *data, unsigned int size, unsigned int importance, struct tipc_portid const *origin)

Definition at line 61 of file port.h.

typedef void(* tipc_named_msg_err_event)(void *usr_handle, u32 portref, struct sk_buff **buf, unsigned char const *data, unsigned int size, int reason, struct tipc_name_seq const *attmpt_dest)

Definition at line 52 of file port.h.

typedef void(* tipc_named_msg_event)(void *usr_handle, u32 portref, struct sk_buff **buf, unsigned char const *data, unsigned int size, unsigned int importance, struct tipc_portid const *orig, struct tipc_name_seq const *dest)

Definition at line 66 of file port.h.

Function Documentation

void tipc_acknowledge ( u32  port_ref,
u32  ack 
)

Definition at line 880 of file port.c.

int tipc_connect2port ( u32  portref,
struct tipc_portid const port 
)

Definition at line 1039 of file port.c.

int tipc_createport ( void usr_handle,
unsigned int  importance,
tipc_msg_err_event  error_cb,
tipc_named_msg_err_event  named_error_cb,
tipc_conn_shutdown_event  conn_error_cb,
tipc_msg_event  msg_cb,
tipc_named_msg_event  named_msg_cb,
tipc_conn_msg_event  conn_msg_cb,
tipc_continue_event  continue_event_cb,
u32 portref 
)

Definition at line 899 of file port.c.

struct tipc_port* tipc_createport_raw ( void usr_handle,
u32(*)(struct tipc_port *, struct sk_buff *)  dispatcher,
void(*)(struct tipc_port *)  wakeup,
const u32  importance 
)
read

tipc_createport_raw - create a generic TIPC port

Returns pointer to (locked) TIPC port, or NULL if unable to create it

Definition at line 213 of file port.c.

int tipc_deleteport ( u32  portref)

Definition at line 260 of file port.c.

int tipc_disconnect ( u32  portref)

Definition at line 1099 of file port.c.

int tipc_disconnect_port ( struct tipc_port tp_ptr)

tipc_disconnect_port - disconnect port from peer

Port must be locked.

Definition at line 1080 of file port.c.

int tipc_multicast ( u32  ref,
struct tipc_name_seq const seq,
u32  num_sect,
struct iovec const msg_sect,
unsigned int  total_len 
)

tipc_multicast - send a multicast message to local and remote destinations

Definition at line 96 of file port.c.

struct sk_buff* tipc_port_get_ports ( void  )
read

Definition at line 627 of file port.c.

int tipc_port_peer_msg ( struct tipc_port p_ptr,
struct tipc_msg msg 
)

tipc_port_peer_msg - verify message was sent by connected port's peer

Handles cases where the node's network address has changed from the default of <0.0.0> to its configured setting.

Definition at line 78 of file port.c.

void tipc_port_recv_mcast ( struct sk_buff buf,
struct tipc_port_list dp 
)

tipc_port_recv_mcast - deliver multicast message to all destination ports

If there is no port list, perform a lookup to create one

Definition at line 161 of file port.c.

int tipc_port_recv_msg ( struct sk_buff buf)

tipc_port_recv_msg - receive message from lower layer and deliver to port user

Definition at line 1133 of file port.c.

void tipc_port_recv_proto_msg ( struct sk_buff buf)

Definition at line 533 of file port.c.

void tipc_port_reinit ( void  )

Definition at line 657 of file port.c.

int tipc_port_reject_sections ( struct tipc_port p_ptr,
struct tipc_msg hdr,
struct iovec const msg_sect,
u32  num_sect,
unsigned int  total_len,
int  err 
)

Definition at line 443 of file port.c.

int tipc_portimportance ( u32  portref,
unsigned int importance 
)

Definition at line 940 of file port.c.

int tipc_portunreliable ( u32  portref,
unsigned int isunreliable 
)

Definition at line 295 of file port.c.

int tipc_portunreturnable ( u32  portref,
unsigned int isunreturnable 
)

Definition at line 324 of file port.c.

int tipc_publish ( u32  portref,
unsigned int  scope,
struct tipc_name_seq const name_seq 
)

Definition at line 968 of file port.c.

int tipc_reject_msg ( struct sk_buff buf,
u32  err 
)

Definition at line 371 of file port.c.

int tipc_send ( u32  ref,
unsigned int  num_sect,
struct iovec const msg_sect,
unsigned int  total_len 
)

tipc_send - send message sections on connection

Definition at line 1182 of file port.c.

int tipc_send2name ( u32  ref,
struct tipc_name const name,
unsigned int  domain,
unsigned int  num_sect,
struct iovec const msg_sect,
unsigned int  total_len 
)

tipc_send2name - send message sections to port name

Definition at line 1220 of file port.c.

int tipc_send2port ( u32  ref,
struct tipc_portid const dest,
unsigned int  num_sect,
struct iovec const msg_sect,
unsigned int  total_len 
)

tipc_send2port - send message sections to port identity

Definition at line 1273 of file port.c.

int tipc_send_buf2port ( u32  ref,
struct tipc_portid const dest,
struct sk_buff buf,
unsigned int  dsz 
)

tipc_send_buf2port - send message buffer to port identity

Definition at line 1315 of file port.c.

int tipc_send_buf_fast ( struct sk_buff buf,
u32  destnode 
)

Definition at line 1033 of file link.c.

int tipc_set_portimportance ( u32  portref,
unsigned int  importance 
)

Definition at line 952 of file port.c.

int tipc_set_portunreliable ( u32  portref,
unsigned int  isunreliable 
)

Definition at line 307 of file port.c.

int tipc_set_portunreturnable ( u32  portref,
unsigned int  isunreturnable 
)

Definition at line 336 of file port.c.

int tipc_shutdown ( u32  ref)

Definition at line 1115 of file port.c.

int tipc_withdraw ( u32  portref,
unsigned int  scope,
struct tipc_name_seq const name_seq 
)

Definition at line 999 of file port.c.

Variable Documentation

spinlock_t tipc_port_list_lock