From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: Alon Levy <alevy@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v23 08/11] libcacard: add passthru
Date: Mon, 28 Mar 2011 15:27:49 +0200 [thread overview]
Message-ID: <4D908CD5.5030301@redhat.com> (raw)
In-Reply-To: <1300886393-2799-9-git-send-email-alevy@redhat.com>
On 03/23/11 14:19, Alon Levy wrote:
> diff --git a/libcacard/passthru.c b/libcacard/passthru.c
> new file mode 100644
> index 0000000..d78e2db
> --- /dev/null
> +++ b/libcacard/passthru.c
> @@ -0,0 +1,609 @@
> +/*
> + * implement the applets for the CAC card.
> + *
> + * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
> + * See the COPYING.LIB file in the top-level directory.
> + */
> +#ifdef USE_PASSTHRU
> +#include <stdlib.h>
> +#include <string.h>
> +
> +#include <pcsclite.h>
> +
> +#include "qemu-thread.h"
> +
> +#include "vcard.h"
> +#include "vcard_emul.h"
> +#include "card_7816.h"
> +#include "vreader.h"
> +#include "vcard_emul.h"
> +#include "passthru.h"
> +
> +/*
> + * Passthru applet private data
> + */
> +struct VCardAppletPrivateStruct {
> + char *reader_name;
> + /* pcsc-lite parameters */
> + SCARDHANDLE hCard;
> + uint32_t hProtocol;
> + SCARD_IO_REQUEST *send_io;
> + unsigned char atr[MAX_ATR_SIZE];
> + int atr_len;
> +};
> +
> +static SCARDCONTEXT global_context;
> +
> +#define MAX_RESPONSE_LENGTH 261 /*65537 */
> +/*
> + * handle all the APDU's that are common to all CAC applets
> + */
> +static VCardStatus
> +passthru_process_apdu(VCard *card, VCardAPDU *apdu, VCardResponse **response)
> +{
> + LONG rv;
Where does this odd LONG type come from? I think Windows uses LONG so
having your own type would conflict with that, and of course we don't
really want Windows types directly in QEMU either, so I am curious?
Otherwise the code looks fine.
Cheers,
Jes
next prev parent reply other threads:[~2011-03-28 13:28 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-23 13:19 [Qemu-devel] [PATCH v23 00/11] usb-ccid Alon Levy
2011-03-23 13:19 ` [Qemu-devel] [PATCH v23 01/11] trace: move trace objects from Makefile to Makefile.objs Alon Levy
2011-03-28 11:59 ` Jes Sorensen
2011-03-28 14:26 ` Alon Levy
2011-03-28 14:30 ` Jes Sorensen
2011-03-28 16:00 ` Alon Levy
2011-03-23 13:19 ` [Qemu-devel] [PATCH v23 02/11] qemu-thread.h: include inttypes.h Alon Levy
2011-03-28 11:59 ` Jes Sorensen
2011-03-23 13:19 ` [Qemu-devel] [PATCH v23 03/11] usb-ccid: add CCID bus Alon Levy
2011-03-28 12:01 ` Jes Sorensen
2011-03-28 12:13 ` Alon Levy
2011-03-28 14:28 ` Alon Levy
2011-03-28 14:31 ` Jes Sorensen
2011-03-28 17:44 ` Blue Swirl
2011-03-28 18:00 ` Alon Levy
2011-03-28 18:08 ` Blue Swirl
2011-03-23 13:19 ` [Qemu-devel] [PATCH v23 04/11] introduce libcacard/vscard_common.h Alon Levy
2011-03-28 12:04 ` Jes Sorensen
2011-03-23 13:19 ` [Qemu-devel] [PATCH v23 05/11] ccid: add passthru card device Alon Levy
2011-03-28 12:08 ` Jes Sorensen
2011-03-28 12:14 ` Alon Levy
2011-03-28 13:45 ` Jes Sorensen
2011-03-23 13:19 ` [Qemu-devel] [PATCH v23 06/11] libcacard: initial commit Alon Levy
2011-03-28 12:35 ` Jes Sorensen
2011-03-28 12:42 ` Alon Levy
2011-03-28 13:52 ` Jes Sorensen
2011-03-28 14:43 ` Alon Levy
2011-03-23 13:19 ` [Qemu-devel] [PATCH v23 07/11] libcacard: add vscclient Alon Levy
2011-03-28 12:43 ` Jes Sorensen
2011-03-28 12:51 ` Alon Levy
2011-03-28 13:55 ` Jes Sorensen
2011-03-23 13:19 ` [Qemu-devel] [PATCH v23 08/11] libcacard: add passthru Alon Levy
2011-03-28 13:27 ` Jes Sorensen [this message]
2011-03-28 14:24 ` Alon Levy
2011-03-28 15:21 ` Alon Levy
2011-03-28 15:25 ` Jes Sorensen
2011-03-23 13:19 ` [Qemu-devel] [PATCH v23 09/11] libcacard: add docs Alon Levy
2011-03-28 13:31 ` Jes Sorensen
2011-03-23 13:19 ` [Qemu-devel] [PATCH v23 10/11] ccid: add ccid-card-emulated device Alon Levy
2011-03-28 13:39 ` Jes Sorensen
2011-03-23 13:19 ` [Qemu-devel] [PATCH v23 11/11] ccid: add docs Alon Levy
2011-03-28 13:41 ` Jes Sorensen
2011-03-23 15:32 ` [Qemu-devel] [PATCH v23 00/11] usb-ccid Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D908CD5.5030301@redhat.com \
--to=jes.sorensen@redhat.com \
--cc=alevy@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.