Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
llc_conn.h File Reference
#include <linux/timer.h>
#include <net/llc_if.h>
#include <net/sock.h>
#include <linux/llc.h>

Go to the source code of this file.

Data Structures

struct  llc_timer
 
struct  llc_sock
 

Macros

#define LLC_EVENT   1
 
#define LLC_PACKET   2
 
#define LLC2_P_TIME   2
 
#define LLC2_ACK_TIME   1
 
#define LLC2_REJ_TIME   3
 
#define LLC2_BUSY_TIME   3
 

Functions

struct sockllc_sk_alloc (struct net *net, int family, gfp_t priority, struct proto *prot)
 
void llc_sk_free (struct sock *sk)
 
void llc_sk_reset (struct sock *sk)
 
int llc_conn_state_process (struct sock *sk, struct sk_buff *skb)
 
void llc_conn_send_pdu (struct sock *sk, struct sk_buff *skb)
 
void llc_conn_rtn_pdu (struct sock *sk, struct sk_buff *skb)
 
void llc_conn_resend_i_pdu_as_cmd (struct sock *sk, u8 nr, u8 first_p_bit)
 
void llc_conn_resend_i_pdu_as_rsp (struct sock *sk, u8 nr, u8 first_f_bit)
 
int llc_conn_remove_acked_pdus (struct sock *conn, u8 nr, u16 *how_many_unacked)
 
struct sockllc_lookup_established (struct llc_sap *sap, struct llc_addr *daddr, struct llc_addr *laddr)
 
void llc_sap_add_socket (struct llc_sap *sap, struct sock *sk)
 
void llc_sap_remove_socket (struct llc_sap *sap, struct sock *sk)
 
u8 llc_data_accept_state (u8 state)
 
void llc_build_offset_table (void)
 

Macro Definition Documentation

#define LLC2_ACK_TIME   1

Definition at line 23 of file llc_conn.h.

#define LLC2_BUSY_TIME   3

Definition at line 25 of file llc_conn.h.

#define LLC2_P_TIME   2

Definition at line 22 of file llc_conn.h.

#define LLC2_REJ_TIME   3

Definition at line 24 of file llc_conn.h.

#define LLC_EVENT   1

Definition at line 19 of file llc_conn.h.

#define LLC_PACKET   2

Definition at line 20 of file llc_conn.h.

Function Documentation

void llc_build_offset_table ( void  )

llc_build_offset_table - builds offset table of connection

Fills offset table of connection state transition table (llc_offset_table).

Definition at line 660 of file llc_conn.c.

int llc_conn_remove_acked_pdus ( struct sock sk,
u8  nr,
u16 how_many_unacked 
)

llc_conn_remove_acked_pdus - Removes acknowledged pdus from tx queue : active connection nr: NR how_many_unacked: size of pdu_unack_q after removing acked pdus

Removes acknowledged pdus from transmit queue (pdu_unack_q). Returns the number of pdus that removed from queue.

Definition at line 312 of file llc_conn.c.

void llc_conn_resend_i_pdu_as_cmd ( struct sock sk,
u8  nr,
u8  first_p_bit 
)

llc_conn_resend_i_pdu_as_cmd - resend all all unacknowledged I PDUs : active connection : NR : p_bit value of first pdu

Resend all unacknowledged I PDUs, starting with the NR; send first as command PDU with P bit equal first_p_bit; if more than one send subsequent as command PDUs with P bit equal zero (0).

Definition at line 229 of file llc_conn.c.

void llc_conn_resend_i_pdu_as_rsp ( struct sock sk,
u8  nr,
u8  first_f_bit 
)

llc_conn_resend_i_pdu_as_rsp - Resend all unacknowledged I PDUs : active connection. : NR : f_bit value of first pdu.

Resend all unacknowledged I PDUs, starting with the NR; send first as response PDU with F bit equal first_f_bit; if more than one send subsequent as response PDUs with F bit equal zero (0).

Definition at line 272 of file llc_conn.c.

void llc_conn_rtn_pdu ( struct sock sk,
struct sk_buff skb 
)

llc_conn_rtn_pdu - sends received data pdu to upper layer : Active connection : Received data frame

Sends received data pdu to upper layer (by using indicate function). Prepares service parameters (prim and prim_data). calling indication function will be done in llc_conn_state_process.

Definition at line 212 of file llc_conn.c.

void llc_conn_send_pdu ( struct sock sk,
struct sk_buff skb 
)

Definition at line 196 of file llc_conn.c.

int llc_conn_state_process ( struct sock sk,
struct sk_buff skb 
)

llc_conn_state_process - sends event to connection state machine : connection : occurred event

Sends an event to connection state machine. After processing event (executing it's actions and changing state), upper layer will be indicated or confirmed, if needed. Returns 0 for success, 1 for failure. The socket lock has to be held before calling this function.

Definition at line 59 of file llc_conn.c.

u8 llc_data_accept_state ( u8  state)

llc_data_accept_state - designates if in this state data can be sent. : state of connection.

Returns 0 if data can be sent, 1 otherwise.

Definition at line 629 of file llc_conn.c.

struct sock* llc_lookup_established ( struct llc_sap sap,
struct llc_addr daddr,
struct llc_addr laddr 
)
read

Definition at line 533 of file llc_conn.c.

void llc_sap_add_socket ( struct llc_sap sap,
struct sock sk 
)

llc_sap_add_socket - adds a socket to a SAP : SAP : socket

This function adds a socket to the hash tables of a SAP.

Definition at line 713 of file llc_conn.c.

void llc_sap_remove_socket ( struct llc_sap sap,
struct sock sk 
)

llc_sap_remove_socket - removes a socket from SAP : SAP : socket

This function removes a connection from the hash tables of a SAP if the connection was in this list.

Definition at line 737 of file llc_conn.c.

struct sock* llc_sk_alloc ( struct net net,
int  family,
gfp_t  priority,
struct proto prot 
)
read

llc_sk_alloc - Allocates LLC sock : upper layer protocol family : for allocation (GFP_KERNEL, GFP_ATOMIC, etc)

Allocates a LLC sock and initializes it. Returns the new LLC sock or NULL if there's no memory available for one

Definition at line 934 of file llc_conn.c.

void llc_sk_free ( struct sock sk)

llc_sk_free - Frees a LLC socket - socket to free

Frees a LLC socket

Definition at line 957 of file llc_conn.c.

void llc_sk_reset ( struct sock sk)

llc_sk_reset - resets a connection : LLC socket to reset

Resets a connection to the out of service state. Stops its timers and frees any frames in the queues of the connection.

Definition at line 994 of file llc_conn.c.