fix one too small
[RRG-proxmark3.git] / client / src / cmdhf14a.h
blob7b5bc48bed26935c9666eb1b64338bbf3a2c940f
1 //-----------------------------------------------------------------------------
2 // Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
3 //
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.
8 //
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 // High frequency ISO14443A commands
17 //-----------------------------------------------------------------------------
19 #ifndef CMDHF14A_H__
20 #define CMDHF14A_H__
22 #include "common.h"
23 #include "pm3_cmd.h" //hf14a_config
24 #include "mifare.h" // structs
26 // structure and database for uid -> tagtype lookups
27 typedef struct {
28 uint8_t uid;
29 const char *desc;
30 } manufactureName_t;
32 typedef struct {
33 const char *aid;
34 const uint8_t aid_length;
35 const char *desc;
36 const char *hint;
37 } hintAIDList_t;
39 typedef enum {
40 MTNONE = 0,
41 MTCLASSIC = 1,
42 MTMINI = 2,
43 MTDESFIRE = 4,
44 MTPLUS = 8,
45 MTULTRALIGHT = 16,
46 HID_SEOS = 32,
47 MTOTHER = 64,
48 MTEMV = 128,
49 MTFUDAN = 256,
50 MTISO18092 = 512,
51 MT424 = 1024,
52 } nxp_mifare_type_t;
54 int CmdHF14A(const char *Cmd);
55 int CmdHF14ASniff(const char *Cmd); // used by hf topaz sniff
56 int CmdHF14ASim(const char *Cmd); // used by hf mfu sim
57 int CmdHF14ANdefRead(const char *Cmd); // used by cmdnfc.c
58 int CmdHF14ANdefFormat(const char *Cmd); // used by cmdnfc.c
59 int CmdHF14ANdefWrite(const char *Cmd); // used by cmdnfc.c
61 int detect_nxp_card(uint8_t sak, uint16_t atqa, uint64_t select_status);
63 int hf14a_getconfig(hf14a_config *config);
64 int hf14a_setconfig(hf14a_config *config, bool verbose);
65 int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search);
66 int infoHF14A4Applications(bool verbose);
67 const char *getTagInfo(uint8_t uid);
68 int Hf14443_4aGetCardData(iso14a_card_select_t *card);
69 int ExchangeAPDU14a(const uint8_t *datain, int datainlen, bool activateField, bool leaveSignalON, uint8_t *dataout, int maxdataoutlen, int *dataoutlen);
70 int ExchangeRAW14a(uint8_t *datain, int datainlen, bool activateField, bool leaveSignalON, uint8_t *dataout, int maxdataoutlen, int *dataoutlen, bool silentMode);
72 iso14a_polling_parameters_t iso14a_get_polling_parameters(bool use_ecp, bool use_magsafe);
73 int SelectCard14443A_4(bool disconnect, bool verbose, iso14a_card_select_t *card);
74 int SelectCard14443A_4_WithParameters(bool disconnect, bool verbose, iso14a_card_select_t *card, iso14a_polling_parameters_t *polling_parameters);
76 bool Get_apdu_in_framing(void);
77 void Set_apdu_in_framing(bool v);
78 #endif