qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: Alon Levy <alevy@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v23 05/11] ccid: add passthru card device
Date: Mon, 28 Mar 2011 14:08:45 +0200	[thread overview]
Message-ID: <4D907A4D.1000103@redhat.com> (raw)
In-Reply-To: <1300886393-2799-6-git-send-email-alevy@redhat.com>

On 03/23/11 14:19, Alon Levy wrote:
> The passthru ccid card is a device sitting on the usb-ccid bus and
> using a chardevice to communicate with a remote device using the
> VSCard protocol defined in libcacard/vscard_common.h
> 
> Usage docs available in following patch in docs/ccid.txt
> 
> Signed-off-by: Alon Levy <alevy@redhat.com>
> 
> ---
[snip]

> +static void ccid_card_vscard_send_error(PassthruState *s,
> +                    uint32_t reader_id, VSCErrorCode code)
> +{
> +    VSCMsgError msg = {.code = htonl(code)};
> +
> +    ccid_card_vscard_send_msg(
> +        s, VSC_Error, reader_id, (uint8_t *)&msg, sizeof(msg));
> +}
> +
> +static void ccid_card_vscard_send_init(PassthruState *s)
> +{
> +    VSCMsgInit msg = {
> +        .version = htonl(VSCARD_VERSION),
> +        .magic = VSCARD_MAGIC,
> +        .capabilities = {0}
> +    };
> +

If this goes over the wire, don't you need to htonl(VSCARD_MAGIC) here
if someone tries to run passthrough from a big endian system to a little
endian system, or vice versa?

Otherwise it looks ok to me.

Cheers,
Jes

  reply	other threads:[~2011-03-28 12:09 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 [this message]
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
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=4D907A4D.1000103@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).