From nobody Wed Nov 19 13:37:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1616037243; cv=none; d=zohomail.com; s=zohoarc; b=STwSDxn2Xe/aYe39AypbHM3s3VEMZ3qZrpL8Qn2h7/TeAzjMjWqDK+X+faeJKj7iLuOjfzjS458mD9r8dESqE0QhGXDc85h2FnvBSTPLk73lI6Gtw/5TwkuG3M3rWC++sohQpb8mZ89sRBP+VbMxrPSryyi0j7dJr/M+6WspPz8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616037243; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=C9v1NpZ5VHvynVbbfAdNS3b+K0uY1UWba43SIF95jAY=; b=WNA0RqHvePsIlATqtWATtipQOO4nMfTiLDeO8t1koSlIZcSKJ6S6SJEOQVA24/5g/yFnBn6YEETW7ST+nRnFE2lPGKyxztUJZFIk2U8cUeSj+QEcEAnur9QCyURQd3juWX18m5pLX+LlYHwZjhCGjOwgVoesKU8S0tX8Vi5C8RE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 161603724369333.8130277696481; Wed, 17 Mar 2021 20:14:03 -0700 (PDT) Received: from localhost ([::1]:60226 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMj6o-0000U5-Kd for importer@patchew.org; Wed, 17 Mar 2021 23:14:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55278) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMj3f-0004Ha-7g for qemu-devel@nongnu.org; Wed, 17 Mar 2021 23:10:47 -0400 Received: from mga09.intel.com ([134.134.136.24]:54700) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMj3d-0005sv-G2 for qemu-devel@nongnu.org; Wed, 17 Mar 2021 23:10:47 -0400 Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2021 20:10:41 -0700 Received: from unknown (HELO localhost.localdomain) ([10.239.13.19]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2021 20:10:39 -0700 IronPort-SDR: c3R9nWlKCrpn0Up6ZR0+hXMUTobzLAZ5g2DjJGdq223P300KFTgaf2SGFKnjQ+iHzUHtd+/tOH 9RBrsIqksZwQ== X-IronPort-AV: E=McAfee;i="6000,8403,9926"; a="189681337" X-IronPort-AV: E=Sophos;i="5.81,257,1610438400"; d="scan'208";a="189681337" IronPort-SDR: VToqeDUO/HLPVVKLiEpM9uaE4O0aGDCyCu+pYPJAaz77fnIxLXcLQJiPrxI2weSBAPqKgTGD61 rqtfOkWsaKCg== X-IronPort-AV: E=Sophos;i="5.81,257,1610438400"; d="scan'208";a="412898213" From: Zhang Chen To: Jason Wang , qemu-dev , Eric Blake , "Dr. David Alan Gilbert" , Markus Armbruster , Lukas Straub Subject: [PATCH V3 2/7] qapi/net.json: Add L4_Connection definition Date: Thu, 18 Mar 2021 11:04:55 +0800 Message-Id: <20210318030500.55352-3-chen.zhang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210318030500.55352-1-chen.zhang@intel.com> References: <20210318030500.55352-1-chen.zhang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=134.134.136.24; envelope-from=chen.zhang@intel.com; helo=mga09.intel.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhang Chen , Zhang Chen Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Add L4_Connection struct for other QMP commands. Except protocol field is necessary, other fields are optional. Signed-off-by: Zhang Chen --- qapi/net.json | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/qapi/net.json b/qapi/net.json index dc4c87dc7b..b4958447f2 100644 --- a/qapi/net.json +++ b/qapi/net.json @@ -744,3 +744,29 @@ ## { 'enum': 'IP_PROTOCOL', 'data': [ 'tcp', 'udp', 'dccp', 'sctp', 'udplite', 'icmp', 'igmp', 'ipv6' ] } + +## +# @L4_Connection: +# +# Layer 4 network connection. +# +# Just for IPv4. +# +# @protocol: Transport layer protocol like TCP/UDP... +# +# @id: For specific module with Qemu object ID, If there is no such part, +# it means global rules. +# +# @src_ip: Source IP. +# +# @dst_ip: Destination IP. +# +# @src_port: Source port. +# +# @dst_port: Destination port. +# +# Since: 6.0 +## +{ 'struct': 'L4_Connection', + 'data': { 'protocol': 'IP_PROTOCOL', '*id': 'str', '*src_ip': 'str', '*d= st_ip': 'str', + '*src_port': 'int', '*dst_port': 'int' } } --=20 2.25.1