Fixed buffer initialization errors, as reported in http://www.proxmark.org/forum...
[legacy-proxmark3.git] / armsrc / mifaresniff.h
blob22daffee7b04ec74247b493c99addeb9088e4859
1 //-----------------------------------------------------------------------------
2 // Merlok - June 2012
3 //
4 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
5 // at your option, any later version. See the LICENSE.txt file for the text of
6 // the license.
7 //-----------------------------------------------------------------------------
8 // Routines to support mifare classic sniffer.
9 //-----------------------------------------------------------------------------
11 #ifndef __MIFARESNIFF_H
12 #define __MIFARESNIFF_H
14 #include "proxmark3.h"
15 #include "apps.h"
16 #include "util.h"
17 #include "string.h"
19 #include "iso14443crc.h"
20 #include "iso14443a.h"
21 #include "crapto1.h"
22 #include "mifareutil.h"
23 #include "common.h"
25 #define SNF_INIT 0
26 #define SNF_NO_FIELD 1
27 #define SNF_WUPREQ 2
28 #define SNF_ATQA 3
29 #define SNF_ANTICOL1 4
30 #define SNF_UID1 5
31 #define SNF_ANTICOL2 6
32 #define SNF_UID2 7
33 #define SNF_SAK 8
34 #define SNF_CARD_IDLE 9
35 #define SNF_CARD_CMD 10
36 #define SNF_CARD_RESP 11
38 #define SNF_UID_4 0
39 #define SNF_UID_7 0
41 bool MfSniffInit(void);
42 bool RAMFUNC MfSniffLogic(const uint8_t *data, uint16_t len, uint8_t *parity, uint16_t bitCnt, bool reader);
43 bool RAMFUNC MfSniffSend(uint16_t maxTimeoutMs);
44 bool intMfSniffSend();
45 bool MfSniffEnd(void);
47 #endif