From patchwork Thu Jun 30 08:40:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Asias He X-Patchwork-Id: 932222 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5U8iM5t029005 for ; Thu, 30 Jun 2011 08:44:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758743Ab1F3IoU (ORCPT ); Thu, 30 Jun 2011 04:44:20 -0400 Received: from mail-iw0-f174.google.com ([209.85.214.174]:43568 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751611Ab1F3IoN (ORCPT ); Thu, 30 Jun 2011 04:44:13 -0400 Received: by mail-iw0-f174.google.com with SMTP id 6so1718423iwn.19 for ; Thu, 30 Jun 2011 01:44:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=0ie7OZhu+PzGFqoF+YUO4VMB296a/YIkFR8Dn4c3/Gg=; b=nZK3C6POCe0+me4veWxVim909TJuesa+AhpCSzBzKhVESePyuvwNArlbJegDRhz0IG k92ZNPSDGYVZOuvoPBA17blUZfa0VDQo+1GDJAUtAUG0nlChLBO1MiP+FlUTIX5pNaiH L2hQTKN2oe0Sk+vo35VCZhAtEKyct/lihbyww= Received: by 10.42.199.203 with SMTP id et11mr1944656icb.257.1309423453167; Thu, 30 Jun 2011 01:44:13 -0700 (PDT) Received: from localhost.localdomain ([219.224.169.130]) by mx.google.com with ESMTPS id d6sm1967338icx.1.2011.06.30.01.44.09 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 30 Jun 2011 01:44:12 -0700 (PDT) From: Asias He To: Pekka Enberg Cc: Cyrill Gorcunov , Ingo Molnar , Sasha Levin , Prasad Joshi , kvm@vger.kernel.org, Asias He Subject: [PATCH v2 06/31] kvm tools: Introduce struct uip_udp to present UDP package Date: Thu, 30 Jun 2011 16:40:54 +0800 Message-Id: <1309423279-3093-7-git-send-email-asias.hejun@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1309423279-3093-1-git-send-email-asias.hejun@gmail.com> References: <1309423279-3093-1-git-send-email-asias.hejun@gmail.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 30 Jun 2011 08:44:23 +0000 (UTC) Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/tools/kvm/include/kvm/uip.h b/tools/kvm/include/kvm/uip.h index b9fa932..e220403 100644 --- a/tools/kvm/include/kvm/uip.h +++ b/tools/kvm/include/kvm/uip.h @@ -60,6 +60,21 @@ struct uip_icmp { u16 seq; } __attribute__((packed)); +struct uip_udp { + /* + * FIXME: IP Options (IP hdr len > 20 bytes) are not supported + */ + struct uip_ip ip; + u16 sport; + u16 dport; + /* + * len = UDP hdr + UDP payload + */ + u16 len; + u16 csum; + u8 payload[0]; +} __attribute__((packed)); + struct uip_info { struct list_head udp_socket_head; struct list_head tcp_socket_head;