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

Go to the source code of this file.

Macros

#define LLC_DATAUNIT_PRIM   1
 
#define LLC_CONN_PRIM   2
 
#define LLC_DATA_PRIM   3
 
#define LLC_DISC_PRIM   4
 
#define LLC_RESET_PRIM   5
 
#define LLC_FLOWCONTROL_PRIM   6 /* Not supported at this time */
 
#define LLC_DISABLE_PRIM   7
 
#define LLC_XID_PRIM   8
 
#define LLC_TEST_PRIM   9
 
#define LLC_SAP_ACTIVATION   10
 
#define LLC_SAP_DEACTIVATION   11
 
#define LLC_NBR_PRIMITIVES   11
 
#define LLC_IND   1
 
#define LLC_CONFIRM   2
 
#define LLC_PRIM_TYPE_REQ   1
 
#define LLC_PRIM_TYPE_IND   2
 
#define LLC_PRIM_TYPE_RESP   3
 
#define LLC_PRIM_TYPE_CONFIRM   4
 
#define LLC_RESET_REASON_REMOTE   1
 
#define LLC_RESET_REASON_LOCAL   2
 
#define LLC_DISC_REASON_RX_DM_RSP_PDU   0
 
#define LLC_DISC_REASON_RX_DISC_CMD_PDU   1
 
#define LLC_DISC_REASON_ACK_TMR_EXP   2
 
#define LLC_STATUS_CONN   0 /* connect confirm & reset confirm */
 
#define LLC_STATUS_DISC   1 /* connect confirm & reset confirm */
 
#define LLC_STATUS_FAILED   2 /* connect confirm & reset confirm */
 
#define LLC_STATUS_IMPOSSIBLE   3 /* connect confirm */
 
#define LLC_STATUS_RECEIVED   4 /* data conn */
 
#define LLC_STATUS_REMOTE_BUSY   5 /* data conn */
 
#define LLC_STATUS_REFUSE   6 /* data conn */
 
#define LLC_STATUS_CONFLICT   7 /* disconnect conn */
 
#define LLC_STATUS_RESET_DONE   8 /* */
 

Functions

int llc_establish_connection (struct sock *sk, u8 *lmac, u8 *dmac, u8 dsap)
 
int llc_build_and_send_pkt (struct sock *sk, struct sk_buff *skb)
 
int llc_send_disc (struct sock *sk)
 

Macro Definition Documentation

#define LLC_CONFIRM   2

Definition at line 37 of file llc_if.h.

#define LLC_CONN_PRIM   2

Definition at line 23 of file llc_if.h.

#define LLC_DATA_PRIM   3

Definition at line 24 of file llc_if.h.

#define LLC_DATAUNIT_PRIM   1

Definition at line 22 of file llc_if.h.

#define LLC_DISABLE_PRIM   7

Definition at line 28 of file llc_if.h.

#define LLC_DISC_PRIM   4

Definition at line 25 of file llc_if.h.

#define LLC_DISC_REASON_ACK_TMR_EXP   2

Definition at line 52 of file llc_if.h.

#define LLC_DISC_REASON_RX_DISC_CMD_PDU   1

Definition at line 51 of file llc_if.h.

#define LLC_DISC_REASON_RX_DM_RSP_PDU   0

Definition at line 50 of file llc_if.h.

#define LLC_FLOWCONTROL_PRIM   6 /* Not supported at this time */

Definition at line 27 of file llc_if.h.

#define LLC_IND   1

Definition at line 36 of file llc_if.h.

#define LLC_NBR_PRIMITIVES   11

Definition at line 34 of file llc_if.h.

#define LLC_PRIM_TYPE_CONFIRM   4

Definition at line 43 of file llc_if.h.

#define LLC_PRIM_TYPE_IND   2

Definition at line 41 of file llc_if.h.

#define LLC_PRIM_TYPE_REQ   1

Definition at line 40 of file llc_if.h.

#define LLC_PRIM_TYPE_RESP   3

Definition at line 42 of file llc_if.h.

#define LLC_RESET_PRIM   5

Definition at line 26 of file llc_if.h.

#define LLC_RESET_REASON_LOCAL   2

Definition at line 47 of file llc_if.h.

#define LLC_RESET_REASON_REMOTE   1

Definition at line 46 of file llc_if.h.

#define LLC_SAP_ACTIVATION   10

Definition at line 31 of file llc_if.h.

#define LLC_SAP_DEACTIVATION   11

Definition at line 32 of file llc_if.h.

#define LLC_STATUS_CONFLICT   7 /* disconnect conn */

Definition at line 62 of file llc_if.h.

#define LLC_STATUS_CONN   0 /* connect confirm & reset confirm */

Definition at line 55 of file llc_if.h.

#define LLC_STATUS_DISC   1 /* connect confirm & reset confirm */

Definition at line 56 of file llc_if.h.

#define LLC_STATUS_FAILED   2 /* connect confirm & reset confirm */

Definition at line 57 of file llc_if.h.

#define LLC_STATUS_IMPOSSIBLE   3 /* connect confirm */

Definition at line 58 of file llc_if.h.

#define LLC_STATUS_RECEIVED   4 /* data conn */

Definition at line 59 of file llc_if.h.

#define LLC_STATUS_REFUSE   6 /* data conn */

Definition at line 61 of file llc_if.h.

#define LLC_STATUS_REMOTE_BUSY   5 /* data conn */

Definition at line 60 of file llc_if.h.

#define LLC_STATUS_RESET_DONE   8 /* */

Definition at line 63 of file llc_if.h.

#define LLC_TEST_PRIM   9

Definition at line 30 of file llc_if.h.

#define LLC_XID_PRIM   8

Definition at line 29 of file llc_if.h.

Function Documentation

int llc_build_and_send_pkt ( struct sock sk,
struct sk_buff skb 
)

llc_build_and_send_pkt - Connection data sending for upper layers. : connection : packet to send

This function is called when upper layer wants to send data using connection oriented communication mode. During sending data, connection will be locked and received frames and expired timers will be queued. Returns 0 for success, -ECONNABORTED when the connection already closed and -EBUSY when sending data is not permitted in this state or LLC has send an I pdu with p bit set to 1 and is waiting for it's response.

Definition at line 42 of file llc_if.c.

int llc_establish_connection ( struct sock sk,
u8 lmac,
u8 dmac,
u8  dsap 
)

llc_establish_connection - Called by upper layer to establish a conn : connection : local mac address : destination mac address : destination sap

Upper layer calls this to establish an LLC connection with a remote machine. This function packages a proper event and sends it connection component state machine. Success or failure of connection establishment will inform to upper layer via calling it's confirm function and passing proper information.

Definition at line 79 of file llc_if.c.

int llc_send_disc ( struct sock sk)

llc_send_disc - Called by upper layer to close a connection : connection to be closed

Upper layer calls this when it wants to close an established LLC connection with a remote machine. This function packages a proper event and sends it to connection component state machine. Returns 0 for success, 1 otherwise.

Definition at line 125 of file llc_if.c.