FreeCalypso > hg > fc-sim-sniff
annotate sw/sniff-dec/command.c @ 41:118a12e9483b
simtrace3-sniff-dec started
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 31 Aug 2023 08:46:23 +0000 |
parents | |
children | b0524d1dc6ef |
rev | line source |
---|---|
41
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * Here we implement decoding of command APDU exchanges. |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 */ |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 #include <sys/types.h> |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 #include <stdio.h> |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 #include <stdlib.h> |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 #include <string.h> |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 #include <strings.h> |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 #include "state.h" |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 extern char linebuf[]; |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 extern int lineno; |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 extern unsigned rx_byte; |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 extern int state; |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 void |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 start_cmd_header() |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 { |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 printf("input line %d: command header, end of implementation so far\n", |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 lineno); |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 exit(0); |
118a12e9483b
simtrace3-sniff-dec started
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 } |