1 | /*
|
---|
2 | protocol_t0.h
|
---|
3 | ISO 7816 T=0 Transport Protocol definitions
|
---|
4 |
|
---|
5 | This file is part of the Unix driver for Towitoko smartcard readers
|
---|
6 | Copyright (C) 2000 Carlos Prados <cprados@yahoo.com>
|
---|
7 |
|
---|
8 | This version is modified by doz21 to work in a special manner ;)
|
---|
9 |
|
---|
10 | This library is free software; you can redistribute it and/or
|
---|
11 | modify it under the terms of the GNU Lesser General Public
|
---|
12 | License as published by the Free Software Foundation; either
|
---|
13 | version 2 of the License, or (at your option) any later version.
|
---|
14 |
|
---|
15 | This library is distributed in the hope that it will be useful,
|
---|
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
18 | Lesser General Public License for more details.
|
---|
19 |
|
---|
20 | You should have received a copy of the GNU Lesser General Public
|
---|
21 | License along with this library; if not, write to the Free Software
|
---|
22 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
23 | */
|
---|
24 |
|
---|
25 | #ifndef _PROTOCOL_T0_
|
---|
26 | #define _PROTOCOL_T0_
|
---|
27 |
|
---|
28 | #include "defines.h"
|
---|
29 | #include "icc_async.h"
|
---|
30 | #include "apdu.h"
|
---|
31 | #include "pps.h"
|
---|
32 |
|
---|
33 | /*
|
---|
34 | * Exported constants definition
|
---|
35 | */
|
---|
36 |
|
---|
37 | /* Return codes */
|
---|
38 | #define PROTOCOL_T0_OK 0 /* Command OK */
|
---|
39 | #define PROTOCOL_T0_NULL_ERROR 1 /* Maximum NULL's reachec */
|
---|
40 | #define PROTOCOL_T0_ICC_ERROR 2 /* ICC comunication error */
|
---|
41 | #define PROTOCOL_T0_IFD_ERROR 3 /* IFD comunication error */
|
---|
42 | #define PROTOCOL_T0_ERROR 4 /* T=0 Protocol Error */
|
---|
43 |
|
---|
44 | /*
|
---|
45 | * Exported datatypes definition
|
---|
46 | */
|
---|
47 |
|
---|
48 | /*
|
---|
49 | * Exported functions declaration
|
---|
50 | */
|
---|
51 |
|
---|
52 | /* Send a command and return a response */
|
---|
53 | extern int Protocol_T0_Command (APDU_Cmd * cmd, APDU_Rsp ** rsp);
|
---|
54 | extern int Protocol_T14_Command (APDU_Cmd * cmd, APDU_Rsp ** rsp);
|
---|
55 |
|
---|
56 | #endif /* _PROTOCOL_T0_ */
|
---|
57 |
|
---|