Lines Matching +full:0 +full:xfe

24 #define LLC_GLOBAL_SAP	0xFF
25 #define LLC_NULL_SAP 0x00 /* not network-layer visible */
26 #define LLC_MGMT_INDIV 0x02 /* station LLC mgmt indiv addr */
27 #define LLC_MGMT_GRP 0x03 /* station LLC mgmt group addr */
28 #define LLC_RDE_SAP 0xA6 /* route ... */
31 #define LLC_ISO_RESERVED_SAP 0x02
32 #define LLC_SAP_GROUP_DSAP 0x01
33 #define LLC_SAP_RESP_SSAP 0x01
36 #define LLC_PDU_GROUP_DSAP_MASK 0x01
38 ((pdu->dsap & LLC_PDU_GROUP_DSAP_MASK) ? 0 : 1)
40 (!(pdu->dsap & LLC_PDU_GROUP_DSAP_MASK) ? 0 : 1)
43 #define LLC_PDU_CMD_RSP_MASK 0x01
44 #define LLC_PDU_CMD 0
46 #define LLC_PDU_IS_CMD(pdu) ((pdu->ssap & LLC_PDU_RSP) ? 0 : 1)
47 #define LLC_PDU_IS_RSP(pdu) ((pdu->ssap & LLC_PDU_RSP) ? 1 : 0)
50 #define LLC_PDU_TYPE_I_MASK 0x01 /* 16-bit control field */
51 #define LLC_PDU_TYPE_S_MASK 0x03
52 #define LLC_PDU_TYPE_U_MASK 0x03 /* 8-bit control field */
53 #define LLC_PDU_TYPE_MASK 0x03
55 #define LLC_PDU_TYPE_I 0 /* first bit */
61 ((!(pdu->ctrl_1 & LLC_PDU_TYPE_I_MASK)) ? 1 : 0)
64 (((pdu->ctrl_1 & LLC_PDU_TYPE_U_MASK) == LLC_PDU_TYPE_U) ? 1 : 0)
67 (((pdu->ctrl_1 & LLC_PDU_TYPE_S_MASK) == LLC_PDU_TYPE_S) ? 1 : 0)
70 #define LLC_U_PF_BIT_MASK 0x10 /* P/F bit mask */
71 #define LLC_U_PF_IS_1(pdu) ((pdu->ctrl_1 & LLC_U_PF_BIT_MASK) ? 1 : 0)
72 #define LLC_U_PF_IS_0(pdu) ((!(pdu->ctrl_1 & LLC_U_PF_BIT_MASK)) ? 1 : 0)
74 #define LLC_U_PDU_CMD_MASK 0xEC /* cmd/rsp mask */
78 #define LLC_1_PDU_CMD_UI 0x00 /* Type 1 cmds/rsps */
79 #define LLC_1_PDU_CMD_XID 0xAC
80 #define LLC_1_PDU_CMD_TEST 0xE0
82 #define LLC_2_PDU_CMD_SABME 0x6C /* Type 2 cmds/rsps */
83 #define LLC_2_PDU_CMD_DISC 0x40
84 #define LLC_2_PDU_RSP_UA 0x60
85 #define LLC_2_PDU_RSP_DM 0x0C
86 #define LLC_2_PDU_RSP_FRMR 0x84
93 #define LLC_XID_FMT_ID 0x81 /* first byte must be this */
96 #define LLC_XID_CLASS_ZEROS_MASK 0xE0 /* these must be zeros */
97 #define LLC_XID_CLASS_MASK 0x1F /* AND with byte to get below */
99 #define LLC_XID_NULL_CLASS_1 0x01 /* if NULL LSAP...use these */
100 #define LLC_XID_NULL_CLASS_2 0x03
101 #define LLC_XID_NULL_CLASS_3 0x05
102 #define LLC_XID_NULL_CLASS_4 0x07
104 #define LLC_XID_NNULL_TYPE_1 0x01 /* if non-NULL LSAP...use these */
105 #define LLC_XID_NNULL_TYPE_2 0x02
106 #define LLC_XID_NNULL_TYPE_3 0x04
107 #define LLC_XID_NNULL_TYPE_1_2 0x03
108 #define LLC_XID_NNULL_TYPE_1_3 0x05
109 #define LLC_XID_NNULL_TYPE_2_3 0x06
110 #define LLC_XID_NNULL_ALL 0x07
113 #define LLC_XID_RW_MASK 0xFE /* AND with value to get below */
115 #define LLC_XID_MIN_RW 0x02 /* lowest-order bit always zero */
122 #define LLC_I_GET_NS(pdu) (u8)((pdu->ctrl_1 & 0xFE) >> 1)
123 #define LLC_I_GET_NR(pdu) (u8)((pdu->ctrl_2 & 0xFE) >> 1)
125 #define LLC_I_PF_BIT_MASK 0x01
127 #define LLC_I_PF_IS_0(pdu) ((!(pdu->ctrl_2 & LLC_I_PF_BIT_MASK)) ? 1 : 0)
128 #define LLC_I_PF_IS_1(pdu) ((pdu->ctrl_2 & LLC_I_PF_BIT_MASK) ? 1 : 0)
132 #define LLC_S_PDU_CMD_MASK 0x0C
136 #define LLC_2_PDU_CMD_RR 0x00 /* rx ready cmd */
137 #define LLC_2_PDU_RSP_RR 0x00 /* rx ready rsp */
138 #define LLC_2_PDU_CMD_REJ 0x08 /* reject PDU cmd */
139 #define LLC_2_PDU_RSP_REJ 0x08 /* reject PDU rsp */
140 #define LLC_2_PDU_CMD_RNR 0x04 /* rx not ready cmd */
141 #define LLC_2_PDU_RSP_RNR 0x04 /* rx not ready rsp */
143 #define LLC_S_PF_BIT_MASK 0x01
144 #define LLC_S_PF_IS_0(pdu) ((!(pdu->ctrl_2 & LLC_S_PF_BIT_MASK)) ? 1 : 0)
145 #define LLC_S_PF_IS_1(pdu) ((pdu->ctrl_2 & LLC_S_PF_BIT_MASK) ? 1 : 0)
147 #define PDU_SUPV_GET_Nr(pdu) ((pdu->ctrl_2 & 0xFE) >> 1)
162 (((u16) *((u8 *) rej_ctrl)) & 0x00FF))
167 * bit remains zero (0))
176 #define FRMR_INFO_SET_C_R_BIT(info, cr) (info->curr_rsv |= (((u8) cr) & 0x01))
184 (info->ind_bits = ((info->ind_bits & 0xFE) | (((u8) ind) & 0x01)))
187 (info->ind_bits = ( (info->ind_bits & 0xFD) | (((u8) ind) & 0x02)))
190 (info->ind_bits = ( (info->ind_bits & 0xFB) | (((u8) ind) & 0x04)))
193 (info->ind_bits = ( (info->ind_bits & 0xF7) | (((u8) ind) & 0x08)))
196 (info->ind_bits = ( (info->ind_bits & 0xEF) | (((u8) ind) & 0x10)))
229 * @cr: command/response bit (0 or 1).
290 *ssap = llc_pdu_un_hdr(skb)->ssap & 0xFE; in llc_pdu_decode_ssap()
303 *dsap = llc_pdu_un_hdr(skb)->dsap & 0xFE; in llc_pdu_decode_dsap()
362 u8 fmt_id; /* always 0x81 for LLC */
386 xid_info->fmt_id = LLC_XID_FMT_ID; /* 0x81 */ in llc_pdu_init_as_xid_cmd()