1 //-----------------------------------------------------------------------------
2 // Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // See LICENSE.txt for the text of the license.
15 //-----------------------------------------------------------------------------
16 // ISO 18002 / FeliCa type prototyping
17 //-----------------------------------------------------------------------------
23 typedef enum FELICA_COMMAND
{
24 FELICA_CONNECT
= (1 << 0),
25 FELICA_NO_DISCONNECT
= (1 << 1),
26 FELICA_RAW
= (1 << 3),
27 FELICA_APPEND_CRC
= (1 << 5),
28 FELICA_NO_SELECT
= (1 << 6),
31 //-----------------------------------------------------------------------------
33 //-----------------------------------------------------------------------------
34 // IDm = ID manufacturer
35 // mc = manufactureCode
36 // mc1 mc2 u1 u2 u3 u4 u5 u6
37 // PMm = Product manufacturer
41 // maximum response time =
42 // B3(request service)
43 // B4(request response)
49 // ServiceCode 2bytes (access-rights)
50 // FileSystem = 1 Block = 16 bytes
60 uint8_t servicecode
[2];
61 } PACKED felica_card_select_t
;
68 } PACKED felica_frame_response_t
;
71 uint8_t status_flag1
[1];
72 uint8_t status_flag2
[1];
73 } PACKED felica_status_flags_t
;
76 felica_frame_response_t frame_response
;
77 uint8_t node_number
[1];
78 uint8_t node_key_versions
[2];
79 } PACKED felica_request_service_response_t
;
82 felica_frame_response_t frame_response
;
84 } PACKED felica_request_request_response_t
;
87 felica_frame_response_t frame_response
;
88 felica_status_flags_t status_flags
;
89 uint8_t number_of_block
[1];
90 uint8_t block_data
[16];
91 uint8_t block_element_number
[1];
92 } PACKED felica_read_without_encryption_response_t
;
95 felica_frame_response_t frame_response
;
96 felica_status_flags_t status_flags
;
97 } PACKED felica_status_response_t
;
100 felica_frame_response_t frame_response
;
101 uint8_t number_of_systems
[1];
102 uint8_t system_code_list
[32];
103 } PACKED felica_syscode_response_t
;
106 felica_frame_response_t frame_response
;
107 felica_status_flags_t status_flags
;
108 uint8_t format_version
[1];
109 uint8_t basic_version
[2];
110 uint8_t number_of_option
[1];
111 uint8_t option_version_list
[4];
112 } PACKED felica_request_spec_response_t
;
115 felica_frame_response_t frame_response
;
118 } PACKED felica_auth1_response_t
;
125 } PACKED felica_auth2_response_t
;