Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
llc_pdu.h File Reference
#include <linux/if_ether.h>

Go to the source code of this file.

Data Structures

struct  llc_pdu_sn
 
struct  llc_pdu_un
 
struct  llc_xid_info
 
struct  llc_frmr_info
 

Macros

#define LLC_PDU_LEN_I   4 /* header and 2 control bytes */
 
#define LLC_PDU_LEN_S   4
 
#define LLC_PDU_LEN_U   3 /* header and 1 control byte */
 
#define LLC_GLOBAL_SAP   0xFF
 
#define LLC_NULL_SAP   0x00 /* not network-layer visible */
 
#define LLC_MGMT_INDIV   0x02 /* station LLC mgmt indiv addr */
 
#define LLC_MGMT_GRP   0x03 /* station LLC mgmt group addr */
 
#define LLC_RDE_SAP   0xA6 /* route ... */
 
#define LLC_ISO_RESERVED_SAP   0x02
 
#define LLC_SAP_GROUP_DSAP   0x01
 
#define LLC_SAP_RESP_SSAP   0x01
 
#define LLC_PDU_GROUP_DSAP_MASK   0x01
 
#define LLC_PDU_IS_GROUP_DSAP(pdu)   ((pdu->dsap & LLC_PDU_GROUP_DSAP_MASK) ? 0 : 1)
 
#define LLC_PDU_IS_INDIV_DSAP(pdu)   (!(pdu->dsap & LLC_PDU_GROUP_DSAP_MASK) ? 0 : 1)
 
#define LLC_PDU_CMD_RSP_MASK   0x01
 
#define LLC_PDU_CMD   0
 
#define LLC_PDU_RSP   1
 
#define LLC_PDU_IS_CMD(pdu)   ((pdu->ssap & LLC_PDU_RSP) ? 0 : 1)
 
#define LLC_PDU_IS_RSP(pdu)   ((pdu->ssap & LLC_PDU_RSP) ? 1 : 0)
 
#define LLC_PDU_TYPE_I_MASK   0x01 /* 16-bit control field */
 
#define LLC_PDU_TYPE_S_MASK   0x03
 
#define LLC_PDU_TYPE_U_MASK   0x03 /* 8-bit control field */
 
#define LLC_PDU_TYPE_MASK   0x03
 
#define LLC_PDU_TYPE_I   0 /* first bit */
 
#define LLC_PDU_TYPE_S   1 /* first two bits */
 
#define LLC_PDU_TYPE_U   3 /* first two bits */
 
#define LLC_PDU_TYPE_IS_I(pdu)   ((!(pdu->ctrl_1 & LLC_PDU_TYPE_I_MASK)) ? 1 : 0)
 
#define LLC_PDU_TYPE_IS_U(pdu)   (((pdu->ctrl_1 & LLC_PDU_TYPE_U_MASK) == LLC_PDU_TYPE_U) ? 1 : 0)
 
#define LLC_PDU_TYPE_IS_S(pdu)   (((pdu->ctrl_1 & LLC_PDU_TYPE_S_MASK) == LLC_PDU_TYPE_S) ? 1 : 0)
 
#define LLC_U_PF_BIT_MASK   0x10 /* P/F bit mask */
 
#define LLC_U_PF_IS_1(pdu)   ((pdu->ctrl_1 & LLC_U_PF_BIT_MASK) ? 1 : 0)
 
#define LLC_U_PF_IS_0(pdu)   ((!(pdu->ctrl_1 & LLC_U_PF_BIT_MASK)) ? 1 : 0)
 
#define LLC_U_PDU_CMD_MASK   0xEC /* cmd/rsp mask */
 
#define LLC_U_PDU_CMD(pdu)   (pdu->ctrl_1 & LLC_U_PDU_CMD_MASK)
 
#define LLC_U_PDU_RSP(pdu)   (pdu->ctrl_1 & LLC_U_PDU_CMD_MASK)
 
#define LLC_1_PDU_CMD_UI   0x00 /* Type 1 cmds/rsps */
 
#define LLC_1_PDU_CMD_XID   0xAC
 
#define LLC_1_PDU_CMD_TEST   0xE0
 
#define LLC_2_PDU_CMD_SABME   0x6C /* Type 2 cmds/rsps */
 
#define LLC_2_PDU_CMD_DISC   0x40
 
#define LLC_2_PDU_RSP_UA   0x60
 
#define LLC_2_PDU_RSP_DM   0x0C
 
#define LLC_2_PDU_RSP_FRMR   0x84
 
#define LLC_XID_FMT_ID   0x81 /* first byte must be this */
 
#define LLC_XID_CLASS_ZEROS_MASK   0xE0 /* these must be zeros */
 
#define LLC_XID_CLASS_MASK   0x1F /* AND with byte to get below */
 
#define LLC_XID_NULL_CLASS_1   0x01 /* if NULL LSAP...use these */
 
#define LLC_XID_NULL_CLASS_2   0x03
 
#define LLC_XID_NULL_CLASS_3   0x05
 
#define LLC_XID_NULL_CLASS_4   0x07
 
#define LLC_XID_NNULL_TYPE_1   0x01 /* if non-NULL LSAP...use these */
 
#define LLC_XID_NNULL_TYPE_2   0x02
 
#define LLC_XID_NNULL_TYPE_3   0x04
 
#define LLC_XID_NNULL_TYPE_1_2   0x03
 
#define LLC_XID_NNULL_TYPE_1_3   0x05
 
#define LLC_XID_NNULL_TYPE_2_3   0x06
 
#define LLC_XID_NNULL_ALL   0x07
 
#define LLC_XID_RW_MASK   0xFE /* AND with value to get below */
 
#define LLC_XID_MIN_RW   0x02 /* lowest-order bit always zero */
 
#define LLC_2_SEQ_NBR_MODULO   ((u8) 128)
 
#define LLC_I_GET_NS(pdu)   (u8)((pdu->ctrl_1 & 0xFE) >> 1)
 
#define LLC_I_GET_NR(pdu)   (u8)((pdu->ctrl_2 & 0xFE) >> 1)
 
#define LLC_I_PF_BIT_MASK   0x01
 
#define LLC_I_PF_IS_0(pdu)   ((!(pdu->ctrl_2 & LLC_I_PF_BIT_MASK)) ? 1 : 0)
 
#define LLC_I_PF_IS_1(pdu)   ((pdu->ctrl_2 & LLC_I_PF_BIT_MASK) ? 1 : 0)
 
#define LLC_S_PDU_CMD_MASK   0x0C
 
#define LLC_S_PDU_CMD(pdu)   (pdu->ctrl_1 & LLC_S_PDU_CMD_MASK)
 
#define LLC_S_PDU_RSP(pdu)   (pdu->ctrl_1 & LLC_S_PDU_CMD_MASK)
 
#define LLC_2_PDU_CMD_RR   0x00 /* rx ready cmd */
 
#define LLC_2_PDU_RSP_RR   0x00 /* rx ready rsp */
 
#define LLC_2_PDU_CMD_REJ   0x08 /* reject PDU cmd */
 
#define LLC_2_PDU_RSP_REJ   0x08 /* reject PDU rsp */
 
#define LLC_2_PDU_CMD_RNR   0x04 /* rx not ready cmd */
 
#define LLC_2_PDU_RSP_RNR   0x04 /* rx not ready rsp */
 
#define LLC_S_PF_BIT_MASK   0x01
 
#define LLC_S_PF_IS_0(pdu)   ((!(pdu->ctrl_2 & LLC_S_PF_BIT_MASK)) ? 1 : 0)
 
#define LLC_S_PF_IS_1(pdu)   ((pdu->ctrl_2 & LLC_S_PF_BIT_MASK) ? 1 : 0)
 
#define PDU_SUPV_GET_Nr(pdu)   ((pdu->ctrl_2 & 0xFE) >> 1)
 
#define PDU_GET_NEXT_Vr(sn)   (++sn & ~LLC_2_SEQ_NBR_MODULO)
 
#define FRMR_INFO_LENGTH   5 /* 5 bytes of information */
 
#define FRMR_INFO_SET_REJ_CNTRL(info, rej_ctrl)
 
#define FRMR_INFO_SET_Vs(info, vs)   (info->curr_ssv = (((u8) vs) << 1))
 
#define FRMR_INFO_SET_Vr(info, vr)   (info->curr_rsv = (((u8) vr) << 1))
 
#define FRMR_INFO_SET_C_R_BIT(info, cr)   (info->curr_rsv |= (((u8) cr) & 0x01))
 
#define FRMR_INFO_SET_INVALID_PDU_CTRL_IND(info, ind)   (info->ind_bits = ((info->ind_bits & 0xFE) | (((u8) ind) & 0x01)))
 
#define FRMR_INFO_SET_INVALID_PDU_INFO_IND(info, ind)   (info->ind_bits = ( (info->ind_bits & 0xFD) | (((u8) ind) & 0x02)))
 
#define FRMR_INFO_SET_PDU_INFO_2LONG_IND(info, ind)   (info->ind_bits = ( (info->ind_bits & 0xFB) | (((u8) ind) & 0x04)))
 
#define FRMR_INFO_SET_PDU_INVALID_Nr_IND(info, ind)   (info->ind_bits = ( (info->ind_bits & 0xF7) | (((u8) ind) & 0x08)))
 
#define FRMR_INFO_SET_PDU_INVALID_Ns_IND(info, ind)   (info->ind_bits = ( (info->ind_bits & 0xEF) | (((u8) ind) & 0x10)))
 

Functions

void llc_pdu_set_cmd_rsp (struct sk_buff *skb, u8 type)
 
void llc_pdu_set_pf_bit (struct sk_buff *skb, u8 bit_value)
 
void llc_pdu_decode_pf_bit (struct sk_buff *skb, u8 *pf_bit)
 
void llc_pdu_init_as_disc_cmd (struct sk_buff *skb, u8 p_bit)
 
void llc_pdu_init_as_i_cmd (struct sk_buff *skb, u8 p_bit, u8 ns, u8 nr)
 
void llc_pdu_init_as_rej_cmd (struct sk_buff *skb, u8 p_bit, u8 nr)
 
void llc_pdu_init_as_rnr_cmd (struct sk_buff *skb, u8 p_bit, u8 nr)
 
void llc_pdu_init_as_rr_cmd (struct sk_buff *skb, u8 p_bit, u8 nr)
 
void llc_pdu_init_as_sabme_cmd (struct sk_buff *skb, u8 p_bit)
 
void llc_pdu_init_as_dm_rsp (struct sk_buff *skb, u8 f_bit)
 
void llc_pdu_init_as_frmr_rsp (struct sk_buff *skb, struct llc_pdu_sn *prev_pdu, u8 f_bit, u8 vs, u8 vr, u8 vzyxw)
 
void llc_pdu_init_as_rr_rsp (struct sk_buff *skb, u8 f_bit, u8 nr)
 
void llc_pdu_init_as_rej_rsp (struct sk_buff *skb, u8 f_bit, u8 nr)
 
void llc_pdu_init_as_rnr_rsp (struct sk_buff *skb, u8 f_bit, u8 nr)
 
void llc_pdu_init_as_ua_rsp (struct sk_buff *skb, u8 f_bit)
 

Variables

struct llc_pdu_sn __packed
 

Macro Definition Documentation

#define FRMR_INFO_LENGTH   5 /* 5 bytes of information */

Definition at line 149 of file llc_pdu.h.

#define FRMR_INFO_SET_C_R_BIT (   info,
  cr 
)    (info->curr_rsv |= (((u8) cr) & 0x01))

Definition at line 173 of file llc_pdu.h.

#define FRMR_INFO_SET_INVALID_PDU_CTRL_IND (   info,
  ind 
)    (info->ind_bits = ((info->ind_bits & 0xFE) | (((u8) ind) & 0x01)))

Definition at line 180 of file llc_pdu.h.

#define FRMR_INFO_SET_INVALID_PDU_INFO_IND (   info,
  ind 
)    (info->ind_bits = ( (info->ind_bits & 0xFD) | (((u8) ind) & 0x02)))

Definition at line 183 of file llc_pdu.h.

#define FRMR_INFO_SET_PDU_INFO_2LONG_IND (   info,
  ind 
)    (info->ind_bits = ( (info->ind_bits & 0xFB) | (((u8) ind) & 0x04)))

Definition at line 186 of file llc_pdu.h.

#define FRMR_INFO_SET_PDU_INVALID_Nr_IND (   info,
  ind 
)    (info->ind_bits = ( (info->ind_bits & 0xF7) | (((u8) ind) & 0x08)))

Definition at line 189 of file llc_pdu.h.

#define FRMR_INFO_SET_PDU_INVALID_Ns_IND (   info,
  ind 
)    (info->ind_bits = ( (info->ind_bits & 0xEF) | (((u8) ind) & 0x10)))

Definition at line 192 of file llc_pdu.h.

#define FRMR_INFO_SET_REJ_CNTRL (   info,
  rej_ctrl 
)
Value:
info->rej_pdu_ctrl = ((*((u8 *) rej_ctrl) & \
LLC_PDU_TYPE_U) != LLC_PDU_TYPE_U ? \
(u16)*((u16 *) rej_ctrl) : \
(((u16) *((u8 *) rej_ctrl)) & 0x00FF))

Definition at line 155 of file llc_pdu.h.

#define FRMR_INFO_SET_Vr (   info,
  vr 
)    (info->curr_rsv = (((u8) vr) << 1))

Definition at line 167 of file llc_pdu.h.

#define FRMR_INFO_SET_Vs (   info,
  vs 
)    (info->curr_ssv = (((u8) vs) << 1))

Definition at line 166 of file llc_pdu.h.

#define LLC_1_PDU_CMD_TEST   0xE0

Definition at line 77 of file llc_pdu.h.

#define LLC_1_PDU_CMD_UI   0x00 /* Type 1 cmds/rsps */

Definition at line 75 of file llc_pdu.h.

#define LLC_1_PDU_CMD_XID   0xAC

Definition at line 76 of file llc_pdu.h.

#define LLC_2_PDU_CMD_DISC   0x40

Definition at line 80 of file llc_pdu.h.

#define LLC_2_PDU_CMD_REJ   0x08 /* reject PDU cmd */

Definition at line 135 of file llc_pdu.h.

#define LLC_2_PDU_CMD_RNR   0x04 /* rx not ready cmd */

Definition at line 137 of file llc_pdu.h.

#define LLC_2_PDU_CMD_RR   0x00 /* rx ready cmd */

Definition at line 133 of file llc_pdu.h.

#define LLC_2_PDU_CMD_SABME   0x6C /* Type 2 cmds/rsps */

Definition at line 79 of file llc_pdu.h.

#define LLC_2_PDU_RSP_DM   0x0C

Definition at line 82 of file llc_pdu.h.

#define LLC_2_PDU_RSP_FRMR   0x84

Definition at line 83 of file llc_pdu.h.

#define LLC_2_PDU_RSP_REJ   0x08 /* reject PDU rsp */

Definition at line 136 of file llc_pdu.h.

#define LLC_2_PDU_RSP_RNR   0x04 /* rx not ready rsp */

Definition at line 138 of file llc_pdu.h.

#define LLC_2_PDU_RSP_RR   0x00 /* rx ready rsp */

Definition at line 134 of file llc_pdu.h.

#define LLC_2_PDU_RSP_UA   0x60

Definition at line 81 of file llc_pdu.h.

#define LLC_2_SEQ_NBR_MODULO   ((u8) 128)

Definition at line 116 of file llc_pdu.h.

#define LLC_GLOBAL_SAP   0xFF

Definition at line 22 of file llc_pdu.h.

#define LLC_I_GET_NR (   pdu)    (u8)((pdu->ctrl_2 & 0xFE) >> 1)

Definition at line 120 of file llc_pdu.h.

#define LLC_I_GET_NS (   pdu)    (u8)((pdu->ctrl_1 & 0xFE) >> 1)

Definition at line 119 of file llc_pdu.h.

#define LLC_I_PF_BIT_MASK   0x01

Definition at line 122 of file llc_pdu.h.

#define LLC_I_PF_IS_0 (   pdu)    ((!(pdu->ctrl_2 & LLC_I_PF_BIT_MASK)) ? 1 : 0)

Definition at line 124 of file llc_pdu.h.

#define LLC_I_PF_IS_1 (   pdu)    ((pdu->ctrl_2 & LLC_I_PF_BIT_MASK) ? 1 : 0)

Definition at line 125 of file llc_pdu.h.

#define LLC_ISO_RESERVED_SAP   0x02

Definition at line 29 of file llc_pdu.h.

#define LLC_MGMT_GRP   0x03 /* station LLC mgmt group addr */

Definition at line 25 of file llc_pdu.h.

#define LLC_MGMT_INDIV   0x02 /* station LLC mgmt indiv addr */

Definition at line 24 of file llc_pdu.h.

#define LLC_NULL_SAP   0x00 /* not network-layer visible */

Definition at line 23 of file llc_pdu.h.

#define LLC_PDU_CMD   0

Definition at line 42 of file llc_pdu.h.

#define LLC_PDU_CMD_RSP_MASK   0x01

Definition at line 41 of file llc_pdu.h.

#define LLC_PDU_GROUP_DSAP_MASK   0x01

Definition at line 34 of file llc_pdu.h.

#define LLC_PDU_IS_CMD (   pdu)    ((pdu->ssap & LLC_PDU_RSP) ? 0 : 1)

Definition at line 44 of file llc_pdu.h.

#define LLC_PDU_IS_GROUP_DSAP (   pdu)    ((pdu->dsap & LLC_PDU_GROUP_DSAP_MASK) ? 0 : 1)

Definition at line 35 of file llc_pdu.h.

#define LLC_PDU_IS_INDIV_DSAP (   pdu)    (!(pdu->dsap & LLC_PDU_GROUP_DSAP_MASK) ? 0 : 1)

Definition at line 37 of file llc_pdu.h.

#define LLC_PDU_IS_RSP (   pdu)    ((pdu->ssap & LLC_PDU_RSP) ? 1 : 0)

Definition at line 45 of file llc_pdu.h.

#define LLC_PDU_LEN_I   4 /* header and 2 control bytes */

Definition at line 18 of file llc_pdu.h.

#define LLC_PDU_LEN_S   4

Definition at line 19 of file llc_pdu.h.

#define LLC_PDU_LEN_U   3 /* header and 1 control byte */

Definition at line 20 of file llc_pdu.h.

#define LLC_PDU_RSP   1

Definition at line 43 of file llc_pdu.h.

#define LLC_PDU_TYPE_I   0 /* first bit */

Definition at line 53 of file llc_pdu.h.

#define LLC_PDU_TYPE_I_MASK   0x01 /* 16-bit control field */

Definition at line 48 of file llc_pdu.h.

#define LLC_PDU_TYPE_IS_I (   pdu)    ((!(pdu->ctrl_1 & LLC_PDU_TYPE_I_MASK)) ? 1 : 0)

Definition at line 57 of file llc_pdu.h.

#define LLC_PDU_TYPE_IS_S (   pdu)    (((pdu->ctrl_1 & LLC_PDU_TYPE_S_MASK) == LLC_PDU_TYPE_S) ? 1 : 0)

Definition at line 63 of file llc_pdu.h.

#define LLC_PDU_TYPE_IS_U (   pdu)    (((pdu->ctrl_1 & LLC_PDU_TYPE_U_MASK) == LLC_PDU_TYPE_U) ? 1 : 0)

Definition at line 60 of file llc_pdu.h.

#define LLC_PDU_TYPE_MASK   0x03

Definition at line 51 of file llc_pdu.h.

#define LLC_PDU_TYPE_S   1 /* first two bits */

Definition at line 54 of file llc_pdu.h.

#define LLC_PDU_TYPE_S_MASK   0x03

Definition at line 49 of file llc_pdu.h.

#define LLC_PDU_TYPE_U   3 /* first two bits */

Definition at line 55 of file llc_pdu.h.

#define LLC_PDU_TYPE_U_MASK   0x03 /* 8-bit control field */

Definition at line 50 of file llc_pdu.h.

#define LLC_RDE_SAP   0xA6 /* route ... */

Definition at line 26 of file llc_pdu.h.

#define LLC_S_PDU_CMD (   pdu)    (pdu->ctrl_1 & LLC_S_PDU_CMD_MASK)

Definition at line 130 of file llc_pdu.h.

#define LLC_S_PDU_CMD_MASK   0x0C

Definition at line 129 of file llc_pdu.h.

#define LLC_S_PDU_RSP (   pdu)    (pdu->ctrl_1 & LLC_S_PDU_CMD_MASK)

Definition at line 131 of file llc_pdu.h.

#define LLC_S_PF_BIT_MASK   0x01

Definition at line 140 of file llc_pdu.h.

#define LLC_S_PF_IS_0 (   pdu)    ((!(pdu->ctrl_2 & LLC_S_PF_BIT_MASK)) ? 1 : 0)

Definition at line 141 of file llc_pdu.h.

#define LLC_S_PF_IS_1 (   pdu)    ((pdu->ctrl_2 & LLC_S_PF_BIT_MASK) ? 1 : 0)

Definition at line 142 of file llc_pdu.h.

#define LLC_SAP_GROUP_DSAP   0x01

Definition at line 30 of file llc_pdu.h.

#define LLC_SAP_RESP_SSAP   0x01

Definition at line 31 of file llc_pdu.h.

#define LLC_U_PDU_CMD (   pdu)    (pdu->ctrl_1 & LLC_U_PDU_CMD_MASK)

Definition at line 72 of file llc_pdu.h.

#define LLC_U_PDU_CMD_MASK   0xEC /* cmd/rsp mask */

Definition at line 71 of file llc_pdu.h.

#define LLC_U_PDU_RSP (   pdu)    (pdu->ctrl_1 & LLC_U_PDU_CMD_MASK)

Definition at line 73 of file llc_pdu.h.

#define LLC_U_PF_BIT_MASK   0x10 /* P/F bit mask */

Definition at line 67 of file llc_pdu.h.

#define LLC_U_PF_IS_0 (   pdu)    ((!(pdu->ctrl_1 & LLC_U_PF_BIT_MASK)) ? 1 : 0)

Definition at line 69 of file llc_pdu.h.

#define LLC_U_PF_IS_1 (   pdu)    ((pdu->ctrl_1 & LLC_U_PF_BIT_MASK) ? 1 : 0)

Definition at line 68 of file llc_pdu.h.

#define LLC_XID_CLASS_MASK   0x1F /* AND with byte to get below */

Definition at line 94 of file llc_pdu.h.

#define LLC_XID_CLASS_ZEROS_MASK   0xE0 /* these must be zeros */

Definition at line 93 of file llc_pdu.h.

#define LLC_XID_FMT_ID   0x81 /* first byte must be this */

Definition at line 90 of file llc_pdu.h.

#define LLC_XID_MIN_RW   0x02 /* lowest-order bit always zero */

Definition at line 112 of file llc_pdu.h.

#define LLC_XID_NNULL_ALL   0x07

Definition at line 107 of file llc_pdu.h.

#define LLC_XID_NNULL_TYPE_1   0x01 /* if non-NULL LSAP...use these */

Definition at line 101 of file llc_pdu.h.

#define LLC_XID_NNULL_TYPE_1_2   0x03

Definition at line 104 of file llc_pdu.h.

#define LLC_XID_NNULL_TYPE_1_3   0x05

Definition at line 105 of file llc_pdu.h.

#define LLC_XID_NNULL_TYPE_2   0x02

Definition at line 102 of file llc_pdu.h.

#define LLC_XID_NNULL_TYPE_2_3   0x06

Definition at line 106 of file llc_pdu.h.

#define LLC_XID_NNULL_TYPE_3   0x04

Definition at line 103 of file llc_pdu.h.

#define LLC_XID_NULL_CLASS_1   0x01 /* if NULL LSAP...use these */

Definition at line 96 of file llc_pdu.h.

#define LLC_XID_NULL_CLASS_2   0x03

Definition at line 97 of file llc_pdu.h.

#define LLC_XID_NULL_CLASS_3   0x05

Definition at line 98 of file llc_pdu.h.

#define LLC_XID_NULL_CLASS_4   0x07

Definition at line 99 of file llc_pdu.h.

#define LLC_XID_RW_MASK   0xFE /* AND with value to get below */

Definition at line 110 of file llc_pdu.h.

#define PDU_GET_NEXT_Vr (   sn)    (++sn & ~LLC_2_SEQ_NBR_MODULO)

Definition at line 145 of file llc_pdu.h.

#define PDU_SUPV_GET_Nr (   pdu)    ((pdu->ctrl_2 & 0xFE) >> 1)

Definition at line 144 of file llc_pdu.h.

Function Documentation

void llc_pdu_decode_pf_bit ( struct sk_buff skb,
u8 pf_bit 
)

llc_pdu_decode_pf_bit - extracs poll/final bit from LLC header : input skb that p/f bit must be extracted from it : poll/final bit (0 or 1)

This function extracts poll/final bit from LLC header (based on type of PDU). In I or S pdus, p/f bit is right bit of fourth byte in header. In U pdus p/f bit is fifth bit of third byte.

Definition at line 63 of file llc_pdu.c.

void llc_pdu_init_as_disc_cmd ( struct sk_buff skb,
u8  p_bit 
)

llc_pdu_init_as_disc_cmd - Builds DISC PDU : Address of the skb to build : The P bit to set in the PDU

Builds a pdu frame as a DISC command.

Definition at line 89 of file llc_pdu.c.

void llc_pdu_init_as_dm_rsp ( struct sk_buff skb,
u8  f_bit 
)

llc_pdu_init_as_dm_rsp - builds DM response pdu : Address of the skb to build : The F bit to set in the PDU

Builds a pdu frame as a DM response.

Definition at line 200 of file llc_pdu.c.

void llc_pdu_init_as_frmr_rsp ( struct sk_buff skb,
struct llc_pdu_sn prev_pdu,
u8  f_bit,
u8  vs,
u8  vr,
u8  vzyxw 
)

llc_pdu_init_as_frmr_rsp - builds FRMR response PDU : Address of the frame to build : The rejected PDU frame : The F bit to set in the PDU : tx state vari value for the data link conn at the rejecting LLC : rx state var value for the data link conn at the rejecting LLC : completely described in the IEEE Std 802.2 document (Pg 55)

Builds a pdu frame as a FRMR response.

Definition at line 220 of file llc_pdu.c.

void llc_pdu_init_as_i_cmd ( struct sk_buff skb,
u8  p_bit,
u8  ns,
u8  nr 
)

llc_pdu_init_as_i_cmd - builds I pdu : Address of the skb to build : The P bit to set in the PDU : The sequence number of the data PDU : The seq. number of the expected I PDU from the remote

Builds a pdu frame as an I command.

Definition at line 107 of file llc_pdu.c.

void llc_pdu_init_as_rej_cmd ( struct sk_buff skb,
u8  p_bit,
u8  nr 
)

llc_pdu_init_as_rej_cmd - builds REJ PDU : Address of the skb to build : The P bit to set in the PDU : The seq. number of the expected I PDU from the remote

Builds a pdu frame as a REJ command.

Definition at line 126 of file llc_pdu.c.

void llc_pdu_init_as_rej_rsp ( struct sk_buff skb,
u8  f_bit,
u8  nr 
)

llc_pdu_init_as_rej_rsp - builds REJ response pdu : Address of the skb to build : The F bit to set in the PDU : The seq. number of the expected data PDU from the remote

Builds a pdu frame as a REJ response.

Definition at line 275 of file llc_pdu.c.

void llc_pdu_init_as_rnr_cmd ( struct sk_buff skb,
u8  p_bit,
u8  nr 
)

llc_pdu_init_as_rnr_cmd - builds RNR pdu : Address of the skb to build : The P bit to set in the PDU : The seq. number of the expected I PDU from the remote

Builds a pdu frame as an RNR command.

Definition at line 146 of file llc_pdu.c.

void llc_pdu_init_as_rnr_rsp ( struct sk_buff skb,
u8  f_bit,
u8  nr 
)

llc_pdu_init_as_rnr_rsp - builds RNR response pdu : Address of the frame to build : The F bit to set in the PDU : The seq. number of the expected data PDU from the remote

Builds a pdu frame as an RNR response.

Definition at line 295 of file llc_pdu.c.

void llc_pdu_init_as_rr_cmd ( struct sk_buff skb,
u8  p_bit,
u8  nr 
)

llc_pdu_init_as_rr_cmd - Builds RR pdu : Address of the skb to build : The P bit to set in the PDU : The seq. number of the expected I PDU from the remote

Builds a pdu frame as an RR command.

Definition at line 166 of file llc_pdu.c.

void llc_pdu_init_as_rr_rsp ( struct sk_buff skb,
u8  f_bit,
u8  nr 
)

llc_pdu_init_as_rr_rsp - builds RR response pdu : Address of the skb to build : The F bit to set in the PDU : The seq. number of the expected data PDU from the remote

Builds a pdu frame as an RR response.

Definition at line 255 of file llc_pdu.c.

void llc_pdu_init_as_sabme_cmd ( struct sk_buff skb,
u8  p_bit 
)

llc_pdu_init_as_sabme_cmd - builds SABME pdu : Address of the skb to build : The P bit to set in the PDU

Builds a pdu frame as an SABME command.

Definition at line 184 of file llc_pdu.c.

void llc_pdu_init_as_ua_rsp ( struct sk_buff skb,
u8  f_bit 
)

llc_pdu_init_as_ua_rsp - builds UA response pdu : Address of the frame to build : The F bit to set in the PDU

Builds a pdu frame as a UA response.

Definition at line 314 of file llc_pdu.c.

void llc_pdu_set_cmd_rsp ( struct sk_buff skb,
u8  type 
)

Definition at line 21 of file llc_pdu.c.

void llc_pdu_set_pf_bit ( struct sk_buff skb,
u8  bit_value 
)

pdu_set_pf_bit - sets poll/final bit in LLC header : input frame that p/f bit must be set into it. : poll/final bit (0 or 1).

This function sets poll/final bit in LLC header (based on type of PDU). in I or S pdus, p/f bit is right bit of fourth byte in header. in U pdus p/f bit is fifth bit of third byte.

Definition at line 35 of file llc_pdu.c.

Variable Documentation