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

Go to the source code of this file.

Data Structures

struct  tipc_link_name
 

Macros

#define INVALID_SESSION   0x10000
 
#define STARTING_EVT   856384768 /* link processing trigger */
 
#define TRAFFIC_MSG_EVT   560815u /* rx'd ??? */
 
#define TIMEOUT_EVT   560817u /* link timer expired */
 
#define OPEN_MSG   0
 
#define CLOSED_MSG   1
 
#define START_CHANGEOVER   100000u
 

Functions

int tipc_link_is_up (struct tipc_link *l_ptr)
 
int tipc_link_is_active (struct tipc_link *l_ptr)
 
: ptr to link name string

link_find_link - locate link by name

: ptr to area to be filled with ptr to associated node

Caller must hold 'tipc_net_lock' to ensure node and bearer are not deleted; this also prevents link deletion.

Returns pointer to link (or 0 if invalid link name).

struct tipc_linktipc_link_create (struct tipc_node *n_ptr, struct tipc_bearer *b_ptr, const struct tipc_media_addr *media_addr)
 
void tipc_link_delete (struct tipc_link *l_ptr)
 
void tipc_link_wakeup_ports (struct tipc_link *l_ptr, int all)
 
void tipc_link_reset_fragments (struct tipc_link *l_ptr)
 
void tipc_link_stop (struct tipc_link *l_ptr)
 
void tipc_link_reset (struct tipc_link *l_ptr)
 
int tipc_link_send_buf (struct tipc_link *l_ptr, struct sk_buff *buf)
 
int tipc_link_send (struct sk_buff *buf, u32 dest, u32 selector)
 
void tipc_link_send_names (struct list_head *message_list, u32 dest)
 
int tipc_send_buf_fast (struct sk_buff *buf, u32 destnode)
 
int tipc_link_send_sections_fast (struct tipc_port *sender, struct iovec const *msg_sect, const u32 num_sect, unsigned int total_len, u32 destaddr)
 
u32 tipc_link_push_packet (struct tipc_link *l_ptr)
 
void tipc_link_push_queue (struct tipc_link *l_ptr)
 
void tipc_link_retransmit (struct tipc_link *l_ptr, struct sk_buff *buf, u32 retransmits)
 
void tipc_recv_msg (struct sk_buff *head, struct tipc_bearer *b_ptr)
 
u32 tipc_link_defer_pkt (struct sk_buff **head, struct sk_buff **tail, struct sk_buff *buf)
 
void tipc_link_send_proto_msg (struct tipc_link *l_ptr, u32 msg_typ, int probe_msg, u32 gap, u32 tolerance, u32 priority, u32 ack_mtu)
 
void tipc_link_changeover (struct tipc_link *l_ptr)
 
void tipc_link_send_duplicate (struct tipc_link *l_ptr, struct tipc_link *tunnel)
 
void tipc_link_recv_bundle (struct sk_buff *buf)
 
int tipc_link_recv_fragment (struct sk_buff **pending, struct sk_buff **fb, struct tipc_msg **m)
 
void tipc_link_set_queue_limits (struct tipc_link *l_ptr, u32 window)
 
: ptr to link, bearer, or media name

link_cmd_set_value - change priority/tolerance/window for link/bearer/media

: new value of link, bearer, or media setting : which link, bearer, or media attribute to set (TIPC_CMD_SET_LINK_*)

Caller must hold 'tipc_net_lock' to ensure link/bearer/media is not deleted.

Returns 0 if value updated and negative value on error.

struct sk_bufftipc_link_cmd_config (const void *req_tlv_area, int req_tlv_space, u16 cmd)
 
struct sk_bufftipc_link_cmd_reset_stats (const void *req_tlv_area, int req_tlv_space)
 
: link name

tipc_link_stats - print link statistics

: print buffer area : size of print buffer area

Returns length of print buffer data string (or 0 if error)

struct sk_bufftipc_link_cmd_show_stats (const void *req_tlv_area, int req_tlv_space)
 
u32 tipc_link_get_max_pkt (u32 dest, u32 selector)
 

Macro Definition Documentation

#define CLOSED_MSG   1

Definition at line 69 of file link.c.

#define INVALID_SESSION   0x10000

Definition at line 54 of file link.c.

#define OPEN_MSG   0

Definition at line 68 of file link.c.

#define START_CHANGEOVER   100000u

Definition at line 74 of file link.c.

#define STARTING_EVT   856384768 /* link processing trigger */

Definition at line 59 of file link.c.

#define TIMEOUT_EVT   560817u /* link timer expired */

Definition at line 61 of file link.c.

#define TRAFFIC_MSG_EVT   560815u /* rx'd ??? */

Definition at line 60 of file link.c.

Function Documentation

void tipc_link_changeover ( struct tipc_link l_ptr)

Definition at line 2170 of file link.c.

struct sk_buff* tipc_link_cmd_config ( const void req_tlv_area,
int  req_tlv_space,
u16  cmd 
)
read

Definition at line 2774 of file link.c.

struct sk_buff* tipc_link_cmd_reset_stats ( const void req_tlv_area,
int  req_tlv_space 
)
read

Definition at line 2819 of file link.c.

struct sk_buff* tipc_link_cmd_show_stats ( const void req_tlv_area,
int  req_tlv_space 
)
read

Definition at line 2950 of file link.c.

struct tipc_link* tipc_link_create ( struct tipc_node n_ptr,
struct tipc_bearer b_ptr,
const struct tipc_media_addr media_addr 
)
read

tipc_link_create - create a new link : pointer to associated node : pointer to associated bearer : media address to use when sending messages over link

Returns pointer to link.

Definition at line 295 of file link.c.

u32 tipc_link_defer_pkt ( struct sk_buff **  head,
struct sk_buff **  tail,
struct sk_buff buf 
)

tipc_link_defer_pkt - Add out-of-sequence message to deferred reception queue

Returns increase in queue length (i.e. 0 or 1)

Definition at line 1802 of file link.c.

void tipc_link_delete ( struct tipc_link l_ptr)

tipc_link_delete - delete a link : pointer to link

Note: 'tipc_net_lock' is write_locked, bearer is locked. This routine must not grab the node lock until after link timer cancellation to avoid a potential deadlock situation.

Definition at line 375 of file link.c.

u32 tipc_link_get_max_pkt ( u32  dest,
u32  selector 
)

tipc_link_get_max_pkt - get maximum packet size to use when sending to destination : network address of destination node : used to select from set of active links

If no active link can be found, uses default maximum packet size.

Definition at line 2988 of file link.c.

int tipc_link_is_active ( struct tipc_link l_ptr)

Definition at line 154 of file link.c.

int tipc_link_is_up ( struct tipc_link l_ptr)

Definition at line 147 of file link.c.

u32 tipc_link_push_packet ( struct tipc_link l_ptr)

Definition at line 1307 of file link.c.

void tipc_link_push_queue ( struct tipc_link l_ptr)

Definition at line 1387 of file link.c.

void tipc_link_recv_bundle ( struct sk_buff buf)

Definition at line 2365 of file link.c.

int tipc_link_recv_fragment ( struct sk_buff **  pending,
struct sk_buff **  fb,
struct tipc_msg **  m 
)

Definition at line 2504 of file link.c.

void tipc_link_reset ( struct tipc_link l_ptr)

Definition at line 526 of file link.c.

void tipc_link_reset_fragments ( struct tipc_link l_ptr)

tipc_link_reset_fragments - purge link's inbound message fragments queue : pointer to link

Definition at line 484 of file link.c.

void tipc_link_retransmit ( struct tipc_link l_ptr,
struct sk_buff buf,
u32  retransmits 
)

Definition at line 1474 of file link.c.

int tipc_link_send ( struct sk_buff buf,
u32  dest,
u32  selector 
)

Definition at line 929 of file link.c.

int tipc_link_send_buf ( struct tipc_link l_ptr,
struct sk_buff buf 
)

Definition at line 844 of file link.c.

void tipc_link_send_duplicate ( struct tipc_link l_ptr,
struct tipc_link tunnel 
)

Definition at line 2232 of file link.c.

void tipc_link_send_names ( struct list_head message_list,
u32  dest 
)

tipc_link_send_names - send name table entries to new neighbor

Send routine for bulk delivery of name table messages when contact with a new neighbor occurs. No link congestion checking is performed because name table messages must be delivered. The messages must be small enough not to require fragmentation. Called without any locks held.

Definition at line 961 of file link.c.

void tipc_link_send_proto_msg ( struct tipc_link l_ptr,
u32  msg_typ,
int  probe_msg,
u32  gap,
u32  tolerance,
u32  priority,
u32  ack_mtu 
)

Definition at line 1886 of file link.c.

int tipc_link_send_sections_fast ( struct tipc_port sender,
struct iovec const msg_sect,
const u32  num_sect,
unsigned int  total_len,
u32  destaddr 
)

Definition at line 1067 of file link.c.

void tipc_link_set_queue_limits ( struct tipc_link l_ptr,
u32  window 
)

Definition at line 2621 of file link.c.

void tipc_link_stop ( struct tipc_link l_ptr)

tipc_link_stop - purge all inbound and outbound messages associated with link : pointer to link

Definition at line 501 of file link.c.

void tipc_link_wakeup_ports ( struct tipc_link l_ptr,
int  all 
)

Definition at line 432 of file link.c.

void tipc_recv_msg ( struct sk_buff head,
struct tipc_bearer b_ptr 
)

tipc_recv_msg - process TIPC messages arriving from off-node : pointer to message buffer chain : pointer to bearer message arrived on

Invoked with no locks held. Bearer pointer must point to a valid bearer structure (i.e. cannot be NULL), but bearer can be inactive.

Definition at line 1604 of file link.c.

int tipc_send_buf_fast ( struct sk_buff buf,
u32  destnode 
)

Definition at line 1033 of file link.c.