fix little endian vs big endian in the macros... again... but this time correct
[RRG-proxmark3.git] / client / src / cmdparser.h
blob9b09333299903cceb01f3167ac31079537aff805
1 //-----------------------------------------------------------------------------
2 // Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
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 // Command parser
9 //-----------------------------------------------------------------------------
11 #ifndef CMDPARSER_H__
12 #define CMDPARSER_H__
14 #include "common.h"
16 typedef struct command_s {
17 const char *Name;
18 int (*Parse)(const char *Cmd);
19 bool (*IsAvailable)(void);
20 const char *Help;
21 } command_t;
22 // command_t array are expected to be NULL terminated
24 // helpers for command_t IsAvailable
25 bool AlwaysAvailable(void);
26 bool IfPm3Present(void);
27 bool IfPm3Rdv4Fw(void);
28 bool IfPm3Flash(void);
29 bool IfPm3Smartcard(void);
30 bool IfPm3FpcUsart(void);
31 bool IfPm3FpcUsartHost(void);
32 bool IfPm3FpcUsartHostFromUsb(void);
33 bool IfPm3FpcUsartDevFromUsb(void);
34 bool IfPm3FpcUsartFromUsb(void);
35 bool IfPm3Lf(void);
36 bool IfPm3Hitag(void);
37 bool IfPm3EM4x50(void);
38 bool IfPm3EM4x70(void);
39 bool IfPm3Hfsniff(void);
40 bool IfPm3Hfplot(void);
41 bool IfPm3Iso14443a(void);
42 bool IfPm3Iso14443b(void);
43 bool IfPm3Iso14443(void);
44 bool IfPm3Iso15693(void);
45 bool IfPm3Felica(void);
46 bool IfPm3Legicrf(void);
47 bool IfPm3Iclass(void);
48 bool IfPm3NfcBarcode(void);
49 bool IfPm3Lcd(void);
51 // Print help for each command in the command array
52 void CmdsHelp(const command_t Commands[]);
53 // Print each command in the command array without help
54 void CmdsLS(const command_t Commands[]);
55 // Parse a command line
56 int CmdsParse(const command_t Commands[], const char *Cmd);
57 void dumpCommandsRecursive(const command_t cmds[], int markdown, bool full_help);
59 #endif