From patchwork Wed Nov 25 18:49:01 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark McLoughlin X-Patchwork-Id: 39454 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 624DE1007D1 for ; Thu, 26 Nov 2009 07:28:24 +1100 (EST) Received: from localhost ([127.0.0.1]:40938 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDOTN-00084Z-KH for incoming@patchwork.ozlabs.org; Wed, 25 Nov 2009 15:28:21 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NDNkU-00036k-Nh for qemu-devel@nongnu.org; Wed, 25 Nov 2009 14:41:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NDNkQ-0002xw-0X for qemu-devel@nongnu.org; Wed, 25 Nov 2009 14:41:58 -0500 Received: from [199.232.76.173] (port=54180 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDNkP-0002xP-Nq for qemu-devel@nongnu.org; Wed, 25 Nov 2009 14:41:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:18536) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NDNkO-0005Q4-TW for qemu-devel@nongnu.org; Wed, 25 Nov 2009 14:41:53 -0500 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nAPIqNNE028306 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 25 Nov 2009 13:52:24 -0500 Received: from blaa.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nAPIqMqY027238; Wed, 25 Nov 2009 13:52:23 -0500 Received: by blaa.localdomain (Postfix, from userid 500) id 5D517B0B2; Wed, 25 Nov 2009 18:49:40 +0000 (GMT) From: Mark McLoughlin To: qemu-devel@nongnu.org Date: Wed, 25 Nov 2009 18:49:01 +0000 Message-Id: <1259174977-26212-9-git-send-email-markmc@redhat.com> In-Reply-To: <1259174977-26212-1-git-send-email-markmc@redhat.com> References: <1259174977-26212-1-git-send-email-markmc@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Mark McLoughlin Subject: [Qemu-devel] [PATCH 08/44] net: introduce NetClientInfo X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This structure holds data which is common to all instances of a given net client type/model. Signed-off-by: Mark McLoughlin --- net.h | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/net.h b/net.h index 9ffcfe3..56c5849 100644 --- a/net.h +++ b/net.h @@ -42,6 +42,17 @@ typedef ssize_t (NetReceiveIOV)(VLANClientState *, const struct iovec *, int); typedef void (NetCleanup) (VLANClientState *); typedef void (LinkStatusChanged)(VLANClientState *); +typedef struct NetClientInfo { + net_client_type type; + size_t size; + NetReceive *receive; + NetReceive *receive_raw; + NetReceiveIOV *receive_iov; + NetCanReceive *can_receive; + NetCleanup *cleanup; + LinkStatusChanged *link_status_changed; +} NetClientInfo; + struct VLANClientState { net_client_type type; NetReceive *receive;