~ubuntu-branches/ubuntu/jaunty/pcsc-lite/jaunty-security

« back to all changes in this revision

Viewing changes to pcsc-lite/src/atrhandler.h

  • Committer: Bazaar Package Importer
  • Author(s): Ludovic Rousseau
  • Date: 2005-11-27 18:04:59 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051127180459-qrex2gzpq9d8jexd
Tags: 1.2.9-beta9-1
* New upstream version
* debian/compat: change from 3 to 4

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * This keeps track of smartcard protocols, timing issues
3
 
 * and ATR handling.
4
 
 *
5
 
 * MUSCLE SmartCard Development ( http://www.linuxnet.com )
6
 
 *
7
 
 * Copyright (C) 1999
8
 
 *  David Corcoran <corcoran@linuxnet.com>
9
 
 *
10
 
 * $Id: atrhandler.h,v 1.4 2003/10/18 17:19:36 aet-guest Exp $
11
 
 */
12
 
 
13
 
#ifndef __atrhandler_h__
14
 
#define __atrhandler_h__
15
 
 
16
 
#ifdef __cplusplus
17
 
extern "C"
18
 
{
19
 
#endif
20
 
 
21
 
#define SCARD_CONVENTION_DIRECT  0x0001
22
 
#define SCARD_CONVENTION_INVERSE 0x0002
23
 
 
24
 
        typedef struct _SMARTCARD_EXTENSION
25
 
        {
26
 
 
27
 
                struct _ATR
28
 
                {
29
 
                        DWORD Length;
30
 
                        UCHAR Value[MAX_ATR_SIZE];
31
 
                        DWORD HistoryLength;
32
 
                        UCHAR HistoryValue[MAX_ATR_SIZE];
33
 
                }
34
 
                ATR;
35
 
 
36
 
                DWORD ReadTimeout;
37
 
 
38
 
                struct _CardCapabilities
39
 
                {
40
 
                        UCHAR AvailableProtocols;
41
 
                        UCHAR CurrentProtocol;
42
 
                        UCHAR Convention;
43
 
                        USHORT ETU;
44
 
 
45
 
                        struct _PtsData
46
 
                        {
47
 
                                UCHAR F1;
48
 
                                UCHAR D1;
49
 
                                UCHAR I1;
50
 
                                UCHAR P1;
51
 
                                UCHAR N1;
52
 
                        }
53
 
                        PtsData;
54
 
 
55
 
                        struct _T1
56
 
                        {
57
 
                                USHORT BGT;
58
 
                                USHORT BWT;
59
 
                                USHORT CWT;
60
 
                                USHORT CGT;
61
 
                                USHORT WT;
62
 
                        }
63
 
                        T1;
64
 
 
65
 
                        struct _T0
66
 
                        {
67
 
                                USHORT BGT;
68
 
                                USHORT BWT;
69
 
                                USHORT CWT;
70
 
                                USHORT CGT;
71
 
                                USHORT WT;
72
 
                        }
73
 
                        T0;
74
 
 
75
 
                }
76
 
                CardCapabilities;
77
 
 
78
 
                /*
79
 
                 * PREADER_CONNECTION psReaderConnection; 
80
 
                 */
81
 
 
82
 
        }
83
 
        SMARTCARD_EXTENSION, *PSMARTCARD_EXTENSION;
84
 
 
85
 
        /*
86
 
         * Decodes the ATR and fills the structure 
87
 
         */
88
 
 
89
 
        short ATRDecodeAtr(PSMARTCARD_EXTENSION psExtension,
90
 
                PUCHAR pucAtr, DWORD dwLength);
91
 
 
92
 
#ifdef __cplusplus
93
 
}
94
 
#endif
95
 
 
96
 
#endif                                                  /* __atrhandler_h__ */