AT-NFC 2.1 (win) AT-NFC kernel set

nfc_ep_data.h
Go to the documentation of this file.
1 #ifndef NFC_EP_DATA_H
2 #define NFC_EP_DATA_H
3
4 /* *************************** NFC Entry Point data definitions **************************** */
8 /* ***************************************************************************************** */
9
10 /* set struct alignment */
11 #include <emv_platform_set_align.h>
12
13 /* ***************************************************************************************** */
18 /* ***************************************************************************************** */
19
20 /* ************************************* Checksum Types ************************************ */
23 #define NFC_CHECKSUM_BINARY 0x00
24 #define NFC_CHECKSUM_CONFIG 0x01
25 #define NFC_CHECKSUM_FULL_CONFIG 0x02
29 /* ***************************************************************************************** */
34 #define NFC_EP_MASK_STATUS_CHECK 0x0001
35 #define NFC_EP_MASK_ZERO_AMOUNT 0x0002
36 #define NFC_EP_MASK_ZERO_AMOUNT_OFFLINE 0x0004
37 #define NFC_EP_MASK_RDR_CLESS_LIMIT 0x0008
38 #define NFC_EP_MASK_RDR_CLESS_FLOOR_LIMIT 0x0010
39 #define NFC_EP_MASK_RDR_CVM_REQ_LIMIT 0x0020
40 #define NFC_EP_MASK_TTQ 0x0040
41 #define NFC_EP_MASK_EXT_SEL_SUPPORT 0x0080
48 #define NFC_EP_PRE_STATUS_CHECK_REQUESTED 0x0001
49 #define NFC_EP_PRE_CLESS_APP_NOT_ALLOWED 0x0002
50 #define NFC_EP_PRE_ZERO_AMOUNT 0x0004
51 #define NFC_EP_PRE_RDR_CVM_REQ_LIMIT_EXCEEDED 0x0008
52 #define NFC_EP_PRE_RDR_CLESS_FLOOR_LIMIT_EXCEEDED 0x0010
57 /* ***************************************************************************************** */
58 /* EP preprocessing data struct version ID */
65 #define NFC_EP_PRE_VERSION 0x01
67 /* ***************************************************************************************** */
68
69 /* ***************************************************************************************** */
70 /* reset EP preprocessing data macro */
75 #define NFC_EP_PRE_RESET(DATA, SIZE) \
76 do \
77 { \
78 KER_MEM_SET(DATA, SIZE, 0, SIZE); \
79 (DATA)->usSize = SIZE; \
80 (DATA)->btVersion = NFC_EP_PRE_VERSION; \
81 (DATA)->pConfigData = KER_NULL; \
82 (DATA)->pTranData = KER_NULL; \
83 } while (0)
84
85 /* ********************* Entry Point preprocessing data definitions ************************ */
91 typedef struct tag_NFC_EP_PRE_DATA
92 {
93 KER_INT16U usSize;
94 KER_BYTE btVersion;
96 KER_BYTE ar_btAID[16];
97 KER_BYTE btAIDLen;
99 KER_BYTE ar_btKernelID[8];
100 KER_BYTE btKernelIDLen;
102 KER_TLV* pConfigData;
103 KER_TLV* pTranData;
105 KER_INT16U usPreDataPresentMask;
106 KER_INT16U usPreDataSetMask;
108 KER_BYTE ar_btTTQ[4];
110 KER_BYTE ar_btLimitClessTran[4];
111 KER_BYTE ar_btLimitClessFloor[4];
112 KER_BYTE ar_btLimitCVMRequired[4];
114 KER_INT16U usPreprocIndicators;
115 KER_BYTE ar_btCopyTTQ[4];
116 }NFC_EP_PRE_DATA;
119 /* ***************************************************************************************** */
120 /* EP Card PPSE data struct version ID */
127 #define NFC_EP_PPSE_VERSION 0x01
129 /* ***************************************************************************************** */
130
131 /* ***************************************************************************************** */
132 /* reset PPSE data macro */
137 #define NFC_EP_PPSE_RESET(DATA, SIZE) \
138 do \
139 { \
140 KER_MEM_SET(DATA, SIZE, 0, SIZE); \
141 (DATA)->usSize = SIZE; \
142 (DATA)->btVersion = NFC_EP_PPSE_VERSION; \
143 } while (0)
144
145 /* ***************************************************************************************** */
152 typedef struct tag_NFC_EP_PPSE_DATA
153 {
154 KER_INT16U usSize;
155 KER_BYTE btVersion;
157 KER_BYTE ar_bt4F[16];
158 KER_BYTE bt4FLen;
159 KER_BYTE bt9F29Len;
161 KER_BYTE bt87;
162 } NFC_EP_PPSE_DATA;
165 /* ***************************************************************************************** */
166 /* transaction EP indicators */
173 #define NFC_TRAN_EP_IND_EXT_SELECTION 0x0001
174 #define NFC_TRAN_EP_IND_EP_RESTART_FLAG 0x0002
175 #define NFC_TRAN_EP_IND_CD_CVM_RESTART 0x0004
177 /* ***************************************************************************************** */
178
179 /* ***************************************************************************************** */
180 /* EP Tran data struct version ID */
187 #define NFC_EP_TRAN_DATA_VERSION 0x0001
189 /* ***************************************************************************************** */
190
191 /* ***************************************************************************************** */
192 /* reset Tran data macro */
197 #define NFC_EP_TRAN_DATA_RESET(DATA, SIZE) \
198 do \
199 { \
200 KER_MEM_SET(DATA, SIZE, 0, SIZE); \
201 (DATA)->usSize = SIZE; \
202 (DATA)->btVersion = NFC_EP_TRAN_DATA_VERSION; \
203 (DATA)->pTermTranData = KER_NULL; \
204 (DATA)->pTermTranDataTLV = KER_NULL; \
205 (DATA)->pbt84 = KER_NULL; \
206 (DATA)->pbtCPLC = KER_NULL; \
207 (DATA)->btEpStart = NFC_OUTCOME_START_TYPE_NA; \
208 } while (0)
209
210 /* external tran data struct, defined in nfc_ext_data.h */
211 typedef struct tag_NFC_EXT_TERM_TRAN_DATA NFC_EXT_TERM_TRAN_DATA;
212
213 /* ***************************************************************************************** */
220 typedef struct tag_NFC_EP_TRAN_DATA
221 {
222 KER_INT16U usSize;
223 KER_BYTE btVersion;
225 KER_INT16U usEpIndicators;
227 const NFC_EXT_TERM_TRAN_DATA* pTermTranData;
228 const KER_TLV* pTermTranDataTLV;
230 KER_BYTE ar_btUN[4];
231 KER_BYTE ar_bt96[8];
233 KER_BYTE ar_btLangPref[8];
234 KER_BYTE btLangPrefLen;
236 KER_INT16U usSW1SW2;
238 KER_BYTE ar_btSelectResp[EMV_RESP_APDU_MAX_SIZE];
239 KER_INT16U usSelectRespLen;
241 const KER_BYTE* pbt84;
242 KER_INT16U us84Len;
244 const KER_BYTE* pbtCPLC;
245 KER_INT16U usCPLCLen;
247 KER_BYTE btEpStart;
248 } NFC_EP_TRAN_DATA;
252 /* ***************************************************************************************** */
253 /* EP Tran restart data struct version ID */
260 #define NFC_EP_RESTART_DATA_VERSION 0x0001
262 /* ***************************************************************************************** */
263
264 /* ***************************************************************************************** */
265 /* reset Tran data macro */
270 #define NFC_EP_RESTART_DATA_RESET(DATA, SIZE) \
271 do \
272 { \
273 KER_MEM_SET(DATA, SIZE, 0, SIZE); \
274 (DATA)->usSize = SIZE; \
275 (DATA)->btVersion = NFC_EP_RESTART_DATA_VERSION; \
276 (DATA)->btEpStart = NFC_OUTCOME_START_TYPE_NA; \
277 } while (0)
278
279 /* ***************************************************************************************** */
286 typedef struct tag_NFC_EP_RESTART_DATA
287 {
288 KER_INT16U usSize;
289 KER_BYTE btVersion;
291 KER_INT16U usSW1SW2;
293 KER_BYTE ar_btSelectResp[EMV_RESP_APDU_MAX_SIZE];
294 KER_INT16U usSelectRespLen;
296 KER_BYTE btEpStart;
297 } NFC_EP_RESTART_DATA;
300 /* *************************************** nfcTran ***************************************** */
301 typedef struct tag_KER_TRAN KER_TRAN;
302
303 /* restore struct alignment */
304 #include <emv_platform_restore_align.h>
305
306 #endif /* NFC_EP_DATA_H */
emv_platform_restore_align.h
emv_platform_set_align.h
EMV_RESP_APDU_MAX_SIZE
#define EMV_RESP_APDU_MAX_SIZE
Definition: emv_const.h:40
KER_BYTE
uint8_t KER_BYTE
Definition: emv_platform.h:70
KER_INT16U
unsigned short KER_INT16U
Definition: emv_platform.h:61
KER_TRAN
struct tag_KER_TRAN KER_TRAN
Kernel internal transaction data structure.
Definition: emv_data.h:251
NFC_EP_PPSE_DATA
struct tag_NFC_EP_PPSE_DATA NFC_EP_PPSE_DATA
EP PPSE Card data used for certain combination.
NFC_EP_TRAN_DATA
struct tag_NFC_EP_TRAN_DATA NFC_EP_TRAN_DATA
EP Transaction data.
NFC_EP_PRE_DATA
struct tag_NFC_EP_PRE_DATA NFC_EP_PRE_DATA
EP preprocessing data version 1.
NFC_EP_RESTART_DATA
struct tag_NFC_EP_RESTART_DATA NFC_EP_RESTART_DATA
EP Transaction restart data.
tag_KER_TLV
TLV container structure.
Definition: emv_data.h:63
tag_NFC_EP_PPSE_DATA
EP PPSE Card data used for certain combination.
Definition: nfc_ep_data.h:153
tag_NFC_EP_PPSE_DATA::usSize
KER_INT16U usSize
Definition: nfc_ep_data.h:154
tag_NFC_EP_PPSE_DATA::btVersion
KER_BYTE btVersion
Definition: nfc_ep_data.h:155
tag_NFC_EP_PPSE_DATA::bt4FLen
KER_BYTE bt4FLen
Definition: nfc_ep_data.h:158
tag_NFC_EP_PPSE_DATA::bt87
KER_BYTE bt87
Definition: nfc_ep_data.h:161
tag_NFC_EP_PPSE_DATA::bt9F29Len
KER_BYTE bt9F29Len
Definition: nfc_ep_data.h:159
tag_NFC_EP_PPSE_DATA::ar_bt4F
KER_BYTE ar_bt4F[16]
Definition: nfc_ep_data.h:157
tag_NFC_EP_PRE_DATA
EP preprocessing data version 1.
Definition: nfc_ep_data.h:92
tag_NFC_EP_PRE_DATA::btKernelIDLen
KER_BYTE btKernelIDLen
Definition: nfc_ep_data.h:100
tag_NFC_EP_PRE_DATA::ar_btLimitClessTran
KER_BYTE ar_btLimitClessTran[4]
Definition: nfc_ep_data.h:110
tag_NFC_EP_PRE_DATA::usSize
KER_INT16U usSize
Definition: nfc_ep_data.h:93
tag_NFC_EP_PRE_DATA::ar_btTTQ
KER_BYTE ar_btTTQ[4]
Definition: nfc_ep_data.h:108
tag_NFC_EP_PRE_DATA::btVersion
KER_BYTE btVersion
Definition: nfc_ep_data.h:94
tag_NFC_EP_PRE_DATA::usPreDataPresentMask
KER_INT16U usPreDataPresentMask
Definition: nfc_ep_data.h:105
tag_NFC_EP_PRE_DATA::btAIDLen
KER_BYTE btAIDLen
Definition: nfc_ep_data.h:97
tag_NFC_EP_PRE_DATA::pConfigData
KER_TLV * pConfigData
Definition: nfc_ep_data.h:102
tag_NFC_EP_PRE_DATA::ar_btKernelID
KER_BYTE ar_btKernelID[8]
Definition: nfc_ep_data.h:99
tag_NFC_EP_PRE_DATA::usPreprocIndicators
KER_INT16U usPreprocIndicators
Definition: nfc_ep_data.h:114
tag_NFC_EP_PRE_DATA::ar_btLimitClessFloor
KER_BYTE ar_btLimitClessFloor[4]
Definition: nfc_ep_data.h:111
tag_NFC_EP_PRE_DATA::usPreDataSetMask
KER_INT16U usPreDataSetMask
Definition: nfc_ep_data.h:106
tag_NFC_EP_PRE_DATA::pTranData
KER_TLV * pTranData
Definition: nfc_ep_data.h:103
tag_NFC_EP_PRE_DATA::ar_btCopyTTQ
KER_BYTE ar_btCopyTTQ[4]
Definition: nfc_ep_data.h:115
tag_NFC_EP_PRE_DATA::ar_btAID
KER_BYTE ar_btAID[16]
Definition: nfc_ep_data.h:96
tag_NFC_EP_PRE_DATA::ar_btLimitCVMRequired
KER_BYTE ar_btLimitCVMRequired[4]
Definition: nfc_ep_data.h:112
tag_NFC_EP_RESTART_DATA
EP Transaction restart data.
Definition: nfc_ep_data.h:287
tag_NFC_EP_RESTART_DATA::usSize
KER_INT16U usSize
Definition: nfc_ep_data.h:288
tag_NFC_EP_RESTART_DATA::ar_btSelectResp
KER_BYTE ar_btSelectResp[EMV_RESP_APDU_MAX_SIZE]
Definition: nfc_ep_data.h:293
tag_NFC_EP_RESTART_DATA::btEpStart
KER_BYTE btEpStart
Definition: nfc_ep_data.h:296
tag_NFC_EP_RESTART_DATA::btVersion
KER_BYTE btVersion
Definition: nfc_ep_data.h:289
tag_NFC_EP_RESTART_DATA::usSelectRespLen
KER_INT16U usSelectRespLen
Definition: nfc_ep_data.h:294
tag_NFC_EP_RESTART_DATA::usSW1SW2
KER_INT16U usSW1SW2
Definition: nfc_ep_data.h:291
tag_NFC_EP_TRAN_DATA
EP Transaction data.
Definition: nfc_ep_data.h:221
tag_NFC_EP_TRAN_DATA::ar_bt96
KER_BYTE ar_bt96[8]
Definition: nfc_ep_data.h:231
tag_NFC_EP_TRAN_DATA::usSize
KER_INT16U usSize
Definition: nfc_ep_data.h:222
tag_NFC_EP_TRAN_DATA::ar_btSelectResp
KER_BYTE ar_btSelectResp[EMV_RESP_APDU_MAX_SIZE]
Definition: nfc_ep_data.h:238
tag_NFC_EP_TRAN_DATA::pbt84
const KER_BYTE * pbt84
Definition: nfc_ep_data.h:241
tag_NFC_EP_TRAN_DATA::pTermTranDataTLV
const KER_TLV * pTermTranDataTLV
Definition: nfc_ep_data.h:228
tag_NFC_EP_TRAN_DATA::usEpIndicators
KER_INT16U usEpIndicators
Definition: nfc_ep_data.h:225
tag_NFC_EP_TRAN_DATA::btEpStart
KER_BYTE btEpStart
Definition: nfc_ep_data.h:247
tag_NFC_EP_TRAN_DATA::btVersion
KER_BYTE btVersion
Definition: nfc_ep_data.h:223
tag_NFC_EP_TRAN_DATA::btLangPrefLen
KER_BYTE btLangPrefLen
Definition: nfc_ep_data.h:234
tag_NFC_EP_TRAN_DATA::pTermTranData
const NFC_EXT_TERM_TRAN_DATA * pTermTranData
Definition: nfc_ep_data.h:227
tag_NFC_EP_TRAN_DATA::usSelectRespLen
KER_INT16U usSelectRespLen
Definition: nfc_ep_data.h:239
tag_NFC_EP_TRAN_DATA::ar_btLangPref
KER_BYTE ar_btLangPref[8]
Definition: nfc_ep_data.h:233
tag_NFC_EP_TRAN_DATA::ar_btUN
KER_BYTE ar_btUN[4]
Definition: nfc_ep_data.h:230
tag_NFC_EP_TRAN_DATA::usCPLCLen
KER_INT16U usCPLCLen
Definition: nfc_ep_data.h:245
tag_NFC_EP_TRAN_DATA::pbtCPLC
const KER_BYTE * pbtCPLC
Definition: nfc_ep_data.h:244
tag_NFC_EP_TRAN_DATA::us84Len
KER_INT16U us84Len
Definition: nfc_ep_data.h:242
tag_NFC_EP_TRAN_DATA::usSW1SW2
KER_INT16U usSW1SW2
Definition: nfc_ep_data.h:236
tag_NFC_EXT_TERM_TRAN_DATA
Terminal transaction data structure.
Definition: nfc_ext_data.h:83