Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
port.c File Reference
#include "core.h"
#include "config.h"
#include "port.h"
#include "name_table.h"

Go to the source code of this file.

Macros

#define PROBING_INTERVAL   3600000 /* [ms] => 1 h */
 
#define CONFIRMED   0
 
#define PROBING   1
 
#define MAX_REJECT_SIZE   1024
 

Functions

 DEFINE_SPINLOCK (tipc_port_list_lock)
 
int tipc_port_peer_msg (struct tipc_port *p_ptr, struct tipc_msg *msg)
 
int tipc_multicast (u32 ref, struct tipc_name_seq const *seq, u32 num_sect, struct iovec const *msg_sect, unsigned int total_len)
 
void tipc_port_recv_mcast (struct sk_buff *buf, struct tipc_port_list *dp)
 
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_deleteport (u32 ref)
 
int tipc_portunreliable (u32 ref, unsigned int *isunreliable)
 
int tipc_set_portunreliable (u32 ref, unsigned int isunreliable)
 
int tipc_portunreturnable (u32 ref, unsigned int *isunrejectable)
 
int tipc_set_portunreturnable (u32 ref, unsigned int isunrejectable)
 
int tipc_reject_msg (struct sk_buff *buf, u32 err)
 
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)
 
void tipc_port_recv_proto_msg (struct sk_buff *buf)
 
struct sk_bufftipc_port_get_ports (void)
 
void tipc_port_reinit (void)
 
void tipc_acknowledge (u32 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_portimportance (u32 ref, unsigned int *importance)
 
int tipc_set_portimportance (u32 ref, unsigned int imp)
 
int tipc_publish (u32 ref, unsigned int scope, struct tipc_name_seq const *seq)
 
int tipc_withdraw (u32 ref, unsigned int scope, struct tipc_name_seq const *seq)
 
int tipc_connect2port (u32 ref, struct tipc_portid const *peer)
 
int tipc_disconnect_port (struct tipc_port *tp_ptr)
 
int tipc_disconnect (u32 ref)
 
int tipc_shutdown (u32 ref)
 
int tipc_port_recv_msg (struct sk_buff *buf)
 
int tipc_send (u32 ref, unsigned int num_sect, struct iovec const *msg_sect, unsigned int total_len)
 
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)
 
int tipc_send2port (u32 ref, struct tipc_portid const *dest, unsigned int num_sect, struct iovec const *msg_sect, unsigned int total_len)
 
int tipc_send_buf2port (u32 ref, struct tipc_portid const *dest, struct sk_buff *buf, unsigned int dsz)
 

Macro Definition Documentation

#define CONFIRMED   0

Definition at line 44 of file port.c.

#define MAX_REJECT_SIZE   1024

Definition at line 47 of file port.c.

#define PROBING   1

Definition at line 45 of file port.c.

#define PROBING_INTERVAL   3600000 /* [ms] => 1 h */

Definition at line 43 of file port.c.

Function Documentation

DEFINE_SPINLOCK ( tipc_port_list_lock  )
void tipc_acknowledge ( u32  ref,
u32  ack 
)

Definition at line 880 of file port.c.

int tipc_connect2port ( u32  ref,
struct tipc_portid const peer 
)

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  ref)

Definition at line 260 of file port.c.

int tipc_disconnect ( u32  ref)

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  ref,
unsigned int importance 
)

Definition at line 940 of file port.c.

int tipc_portunreliable ( u32  ref,
unsigned int isunreliable 
)

Definition at line 295 of file port.c.

int tipc_portunreturnable ( u32  ref,
unsigned int isunrejectable 
)

Definition at line 324 of file port.c.

int tipc_publish ( u32  ref,
unsigned int  scope,
struct tipc_name_seq const 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_set_portimportance ( u32  ref,
unsigned int  imp 
)

Definition at line 952 of file port.c.

int tipc_set_portunreliable ( u32  ref,
unsigned int  isunreliable 
)

Definition at line 307 of file port.c.

int tipc_set_portunreturnable ( u32  ref,
unsigned int  isunrejectable 
)

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  ref,
unsigned int  scope,
struct tipc_name_seq const seq 
)

Definition at line 999 of file port.c.