]>
cvs.zerfleddert.de Git - proxmark3-svn/blob - client/cmdmain.c
a45e343017172dd58cb4bc778f1086dfa176ffc9
1 //-----------------------------------------------------------------------------
2 // Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
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
7 //-----------------------------------------------------------------------------
8 // Main command parser entry point
9 //-----------------------------------------------------------------------------
18 #include "cmdparser.h"
19 #include "proxmark3.h"
28 #include "util_posix.h"
29 #include "cmdscript.h"
32 static int CmdHelp(const char *Cmd
);
33 static int CmdQuit(const char *Cmd
);
36 static command_t CommandTable
[] =
38 {"help", CmdHelp
, 1, "This help. Use '<command> help' for details of a particular command."},
39 {"data", CmdData
, 1, "{ Plot window / data buffer manipulation... }"},
40 {"hf", CmdHF
, 1, "{ High Frequency commands... }"},
41 {"hw", CmdHW
, 1, "{ Hardware commands... }"},
42 {"lf", CmdLF
, 1, "{ Low Frequency commands... }"},
43 {"script",CmdScript
,1, "{ Scripting commands }"},
44 {"quit", CmdQuit
, 1, "Exit program"},
45 {"exit", CmdQuit
, 1, "Exit program"},
49 command_t
* getTopLevelCommandTable()
54 int CmdHelp(const char *Cmd
)
56 CmdsHelp(CommandTable
);
60 int CmdQuit(const char *Cmd
)
65 //-----------------------------------------------------------------------------
66 // Entry point into our code: called whenever the user types a command and
67 // then presses Enter, which the full command line that they typed.
68 //-----------------------------------------------------------------------------
69 int CommandReceived(char *Cmd
) {
70 return CmdsParse(CommandTable
, Cmd
);