From patchwork Mon Apr 22 15:04:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alon Levy X-Patchwork-Id: 238569 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9A2A52C00BA for ; Tue, 23 Apr 2013 01:11:53 +1000 (EST) Received: from localhost ([::1]:36580 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUIPH-0007uI-OC for incoming@patchwork.ozlabs.org; Mon, 22 Apr 2013 11:11:51 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUIJI-00012t-VI for qemu-devel@nongnu.org; Mon, 22 Apr 2013 11:05:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUIJD-0001bt-S2 for qemu-devel@nongnu.org; Mon, 22 Apr 2013 11:05:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18857) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUIJC-0001bg-RJ for qemu-devel@nongnu.org; Mon, 22 Apr 2013 11:05:35 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3MF5Y34017356 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 22 Apr 2013 11:05:34 -0400 Received: from localhost.localdomain (vpn1-6-224.ams2.redhat.com [10.36.6.224]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3MF4xH4020026; Mon, 22 Apr 2013 11:05:33 -0400 From: Alon Levy To: qemu-devel@nongnu.org Date: Mon, 22 Apr 2013 18:04:49 +0300 Message-Id: <1366643098-2566-20-git-send-email-alevy@redhat.com> In-Reply-To: <1366643098-2566-1-git-send-email-alevy@redhat.com> References: <1366643098-2566-1-git-send-email-alevy@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: mlureau@redhat.com Subject: [Qemu-devel] [PATCH v3 19/28] libcacard: change default ATR X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Alon Levy --- libcacard/vcardt.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libcacard/vcardt.h b/libcacard/vcardt.h index 538bdde..3b9a619 100644 --- a/libcacard/vcardt.h +++ b/libcacard/vcardt.h @@ -26,9 +26,17 @@ typedef struct VCardEmulStruct VCardEmul; #define MAX_CHANNEL 4 /* create an ATR with appropriate historical bytes */ -#define VCARD_ATR_PREFIX(size) 0x3b, 0x66+(size), 0x00, 0xff, \ - 'V', 'C', 'A', 'R', 'D', '_' +#define TS_DIRECT_CONVENTION 0x3b +#define TA_PRESENT 0x10 +#define TB_PRESENT 0x20 +#define TC_PRESENT 0x40 +#define TD_PRESENT 0x80 +#define VCARD_ATR_PREFIX(size) \ + TS_DIRECT_CONVENTION, \ + TD_PRESENT + (6 + size), \ + 0x00, \ + 'V', 'C', 'A', 'R', 'D', '_' typedef enum { VCARD_DONE,