From nobody Tue Oct 28 17:28:41 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1760423865; cv=none; d=zohomail.com; s=zohoarc; b=GY83YPHvEhZdD4refolB+qeWU1IJBiq7LLVMrtB1FEAjgmTaG9aCixz1BfOGGe8ToBRVfmT9UTPeyGO8RABD8ivmPDWmTGk5VAPglySlf3kJyeM+4VHUVaKKA/p/J9f/LiW94GQxMxFm66Iq7AornaNaX2RUmM7frSC4J3NGBn4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760423865; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=J9b5yQaBqq15YgjhvRgzatiLUXFk+g69UpEHdpdCCYE=; b=AEOZ4BTVxgufRyxBLotq4Ma25pb59cOTGpyfDgOCVBx1UYZsrATXtdGFhR9YUF81JObfEs07LQ589KWS/9G8AyKwhJVKjpcl5ozKPBzDyq5+KOeGLFfEoqB9vkCYw2mg7fpuE5Wni4sOfVogDxBY2I4U1hT/wk48EDPI2I2vQMs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1760423865338291.87858307510805; Mon, 13 Oct 2025 23:37:45 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 6F438442BF; Tue, 14 Oct 2025 02:37:44 -0400 (EDT) Received: from [172.19.199.20] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 87303442D5; Tue, 14 Oct 2025 02:35:08 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id C212743DB1; Tue, 14 Oct 2025 02:31:59 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id E4CF244266 for ; Tue, 14 Oct 2025 02:31:58 -0400 (EDT) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-65-dJhVN2XiOEq4z0VKf-xSCA-1; Tue, 14 Oct 2025 02:31:57 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4BA441954102 for ; Tue, 14 Oct 2025 06:31:56 +0000 (UTC) Received: from localhost.localdomain (unknown [10.43.3.236]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A809C300018D for ; Tue, 14 Oct 2025 06:31:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1760423518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=J9b5yQaBqq15YgjhvRgzatiLUXFk+g69UpEHdpdCCYE=; b=At/6I+BhMab6adonsFJTnl4wcvQhnsMVazqxr6WfpV6OY8U7Lhr97pc7hZibIngLTq1gx9 wi+N4/kZyCrdQsaAiHmduQrEs0jAswjP/cRNJhjHqRIwYRyLoTkeGjuQagIlAExqWiejiG PRvILMEspY2nSHk5FBzrZXNLVtxUdEI= X-MC-Unique: dJhVN2XiOEq4z0VKf-xSCA-1 X-Mimecast-MFC-AGG-ID: dJhVN2XiOEq4z0VKf-xSCA_1760423516 To: devel@lists.libvirt.org Subject: [PATCH 3/8] wireshark: Move WIRESHARK_VERSION macro definition Date: Tue, 14 Oct 2025 08:31:42 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: K79c8SZ2pZvP5m5H6kMR4XTSYcwngOYSnMsim7s0yrk_1760423516 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 3ETCCDGAT426O4GZIFKL7QDSZYZDYNU2 X-Message-ID-Hash: 3ETCCDGAT426O4GZIFKL7QDSZYZDYNU2 X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1760423865743158501 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Soon, other parts of the wireshark code will need to differentiate wrt wireshark version. Therefore, move the WIRESHARK_VERSION macro definition among with its deps into packet-libvirt.h. Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa --- tools/wireshark/src/packet-libvirt.h | 14 ++++++++++++++ tools/wireshark/src/plugin.c | 14 -------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tools/wireshark/src/packet-libvirt.h b/tools/wireshark/src/pac= ket-libvirt.h index 14e6e13696..15cfcb0534 100644 --- a/tools/wireshark/src/packet-libvirt.h +++ b/tools/wireshark/src/packet-libvirt.h @@ -19,5 +19,19 @@ =20 #pragma once =20 +#ifdef WITH_WS_VERSION +# include +#else +# include +# define WIRESHARK_VERSION_MAJOR VERSION_MAJOR +# define WIRESHARK_VERSION_MINOR VERSION_MINOR +# define WIRESHARK_VERSION_MICRO VERSION_MICRO +#endif + +#define WIRESHARK_VERSION \ + ((WIRESHARK_VERSION_MAJOR * 1000 * 1000) + \ + (WIRESHARK_VERSION_MINOR * 1000) + \ + (WIRESHARK_VERSION_MICRO)) + void proto_register_libvirt(void); void proto_reg_handoff_libvirt(void); diff --git a/tools/wireshark/src/plugin.c b/tools/wireshark/src/plugin.c index 19b25e7b1a..64317b5280 100644 --- a/tools/wireshark/src/plugin.c +++ b/tools/wireshark/src/plugin.c @@ -12,15 +12,6 @@ =20 #include =20 -#ifdef WITH_WS_VERSION -# include -#else -# include -# define WIRESHARK_VERSION_MAJOR VERSION_MAJOR -# define WIRESHARK_VERSION_MINOR VERSION_MINOR -# define WIRESHARK_VERSION_MICRO VERSION_MICRO -#endif - #define HAVE_PLUGINS 1 #include /* plugins are DLLs */ @@ -32,11 +23,6 @@ /* Let the plugin version be the version of libvirt */ #define PLUGIN_VERSION VERSION =20 -#define WIRESHARK_VERSION \ - ((WIRESHARK_VERSION_MAJOR * 1000 * 1000) + \ - (WIRESHARK_VERSION_MINOR * 1000) + \ - (WIRESHARK_VERSION_MICRO)) - #if WIRESHARK_VERSION < 2005000 =20 WS_DLL_PUBLIC_DEF const gchar version[] =3D VERSION; --=20 2.49.1