[Pcsclite-cvs-commit] r5101 - /trunk/contrib/ltrace.conf

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Tue Aug 3 09:30:47 UTC 2010


Author: rousseau
Date: Tue Aug  3 09:30:45 2010
New Revision: 5101

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5101
Log:
Configuration file for ltrace(1)

Added:
    trunk/contrib/ltrace.conf   (with props)

Added: trunk/contrib/ltrace.conf
URL: http://svn.debian.org/wsvn/pcsclite/trunk/contrib/ltrace.conf?rev=5101&op=file
==============================================================================
--- trunk/contrib/ltrace.conf (added)
+++ trunk/contrib/ltrace.conf Tue Aug  3 09:30:45 2010
@@ -1,0 +1,118 @@
+; ltrace.conf: Configuration file for ltrace(1)
+; Copyright (C) 2010  Ludovic Rousseau
+; $Id$
+
+;   This program is free software; you can redistribute it and/or modify
+;   it under the terms of the GNU General Public License as published by
+;   the Free Software Foundation; either version 2 of the License, or
+;   (at your option) any later version.
+;
+;   This program is distributed in the hope that it will be useful,
+;   but WITHOUT ANY WARRANTY; without even the implied warranty of
+;   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;   GNU General Public License for more details.
+;
+;   You should have received a copy of the GNU General Public License along
+;   with this program; if not, write to the Free Software Foundation, Inc.,
+;   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+; Usage: ltrace -l/usr/lib/libpcsclite.so [args] binary
+;
+; Installation:
+;  Copy or link the file in ~/.ltrace.conf
+;
+; Limitations:
+; - does not work with pcscd autostart since the setuid bit of pcscd
+;   will not be honored and pcscd will not have the access rights to
+;   create files in /var/run/pcscd/
+
+; Useful arguments
+;      -A maxelts
+;               Maximum number of array elements to print before suppressing the
+;               rest with an ellipsis ("...")
+;
+;      -c     Count  time and calls for each library call and report a summary
+;             on program exit.
+;
+; This argument will generate a statistics table like:
+; % time     seconds  usecs/call     calls      function
+; ------ ----------- ----------- --------- --------------------
+;  43.44    0.111906      111906         1 SCardReconnect
+;  29.36    0.075627       75627         1 SCardDisconnect
+;  18.55    0.047784       47784         1 SCardConnect
+;   4.69    0.012089       12089         1 SCardTransmit
+;   2.54    0.006530        6530         1 SCardControl
+;   0.50    0.001284         256         5 SCardGetAttrib
+;   0.28    0.000733          28        26 pcsc_stringify_error
+;   0.24    0.000613         613         1 SCardEstablishContext
+;   0.10    0.000256         256         1 SCardReleaseContext
+;   0.07    0.000172          28         6 SCardFreeMemory
+;   0.07    0.000169         169         1 SCardStatus
+;   0.06    0.000165          82         2 SCardListReaders
+;   0.05    0.000117         117         1 SCardSetAttrib
+;   0.03    0.000081          81         1 SCardGetStatusChange
+;   0.02    0.000041          20         2 SCardIsValidContext
+;   0.01    0.000021          21         1 SCardListReaderGroups
+; ------ ----------- ----------- --------- --------------------
+; 100.00    0.257588                    52 total
+
+
+; ********************
+; Types and structures
+; ********************
+typedef scope = enum(SCARD_SCOPE_USER=0, SCARD_SCOPE_TERMINAL=1, SCARD_SCOPE_SYSTEM=2)
+
+; use an enum to display the value in hex
+typedef scardcontext = enum();
+
+typedef scardhandle = enum();
+
+typedef atr = array(char, 33);
+
+; typedef struct
+; {
+;     const char *szReader;
+;     void *pvUserData;
+;     unsigned long dwCurrentState;
+;     unsigned long dwEventState;
+;     unsigned long cbAtr;
+;     unsigned char rgbAtr[MAX_ATR_SIZE];
+; }
+; SCARD_READERSTATE;
+typedef scard_readerstate = struct(string, addr, uint, uint, int, atr);
+
+typedef share_mode = enum(SCARD_SHARE_EXCLUSIVE=1, SCARD_SHARE_SHARED=2, SCARD_SHARE_DIREC=3);
+
+typedef protocol = enum(SCARD_PROTOCOL_UNDEFINED=0, SCARD_PROTOCOL_T0=1, SCARD_PROTOCOL_T1=2, SCARD_PROTOCOL_T0_SCARD_PROTOCOL_T1=3 SCARD_PROTOCOL_RAW=4, SCARD_PROTOCOL_T15=8);
+
+typedef scard_io_request = struct(protocol, long);
+
+typedef disposition = enum(SCARD_LEAVE_CARD=0, SCARD_RESET_CARD=1, SCARD_UNPOWER_CARD=2, SCARD_EJECT_CARD=3);
+
+typedef scarderror = enum(SCARD_S_SUCCESS=0, SCARD_E_INVALID_HANDLE=0x80100003, SCARD_E_NO_SERVICE=0x8010001D, SCARD_E_INVALID_HANDLE=-2146435069);
+
+typedef attrib_id = enum(SCARD_ATTR_DEVICE_FRIENDLY_NAME=2147418115, SCARD_ATTR_ATR_STRING=590595, SCARD_ATTR_VENDOR_IFD_VERSION=65794, SCARD_ATTR_MAXINPUT=499719, SCARD_ATTR_VENDOR_NAME=65792);
+
+; *********
+; Functions
+; *********
+scarderror SCardBeginTransaction(scardhandle);
+scarderror SCardCancel(scardcontext);
+scarderror SCardCancelTransaction(scardhandle);
+scarderror SCardConnect(scardcontext, string, share_mode, protocol, +scardhandle*, +protocol*);
+scarderror SCardControl(scardhandle, int, array(char, arg4)*, uint, +array(char, arg6)*, uint, +uint*);
+scarderror SCardDisconnect(scardhandle, disposition);
+scarderror SCardEndTransaction(scardhandle, disposition);
+scarderror SCardEstablishContext(scope, addr, addr, +scardcontext*);
+scarderror SCardFreeMemory(scardcontext, addr);
+scarderror SCardGetAttrib(scardhandle, attrib_id, +array(char, arg4)*, +uint*);
+scarderror SCardGetStatusChange(scardcontext, int, +scard_readerstate*, int);
+scarderror SCardIsValidContext(scardcontext);
+scarderror SCardListReaderGroups(scardcontext, +string*, +uint*);
+scarderror SCardListReaders(scardcontext, string, +string*, +uint*);
+scarderror SCardReconnect(scardhandle, share_mode, protocol, disposition, +protocol*);
+scarderror SCardReleaseContext(scardcontext);
+scarderror SCardSetAttrib(scardhandle, attrib_id, array(char, arg4), uint);
+scarderror SCardStatus(scardhandle, +string*, +uint*, +uint*, +protocol*, +atr*, +uint*);
+scarderror SCardTransmit(scardhandle, scard_io_request*, array(char, arg4)*, uint, +scard_io_request*, char*, +uint*);
+string pcsc_stringify_error(scarderror);

Propchange: trunk/contrib/ltrace.conf
------------------------------------------------------------------------------
    svn:keywords = Id




More information about the Pcsclite-cvs-commit mailing list