From nobody Mon Sep 16 18:55:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=riseup.net ARC-Seal: i=1; a=rsa-sha256; t=1693756231; cv=none; d=zohomail.com; s=zohoarc; b=cgFCPWpv2CBc4RGnaDUFfwRJxDoT4DCWsM0qd0EHZj3gfaqbH5ZuSQovEQOV1Ecl5x6GS6qshQ3qzeu+VhJMzWp+s9djeLtS+Iu5TJc2qP94RAFkn5gZkX7M1FtMN8UR4k9JHuavYEhFr/7hZYnTa22a8fNh6B4N7gInNlSI2xw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693756231; h=Content-Type: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=VAI0qh+iPo/HoZSMsLHTtsdU/14TW7cOkohFr5ghENU=; b=TzspAjkGHco93AFAuRqoveRE0CQjuQzjsJ9885htqV5+LCG1UlTkAi54r6ARexgn7XWjQTd8GQhgioW4ybLEDB/Dq0C3ZBoGhNoWTmW7MzzkhUMBLJcHCYDUm0ftvPzrF9j3bHSt57t4LlTQW9Di0kgwCQEPPyviOAkilNip+5c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 169375623126430.69228211064467; Sun, 3 Sep 2023 08:50:31 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-260-4yhjylzqO1SUoB8DOfka-w-1; Sun, 03 Sep 2023 11:50:23 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EBF59800193; Sun, 3 Sep 2023 15:50:20 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id D99171460FFA; Sun, 3 Sep 2023 15:50:20 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 98FD11946597; Sun, 3 Sep 2023 15:50:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 6564419465B7 for ; Sun, 3 Sep 2023 15:50:19 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 51315200DA3D; Sun, 3 Sep 2023 15:50:19 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4941820283F1 for ; Sun, 3 Sep 2023 15:50:19 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2A4618F99FD for ; Sun, 3 Sep 2023 15:50:19 +0000 (UTC) Received: from mx0.riseup.net (mx0.riseup.net [198.252.153.6]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-183-or5B6gWuPu25V17U5D8Ljg-1; Sun, 03 Sep 2023 11:50:17 -0400 Received: from fews02-sea.riseup.net (fews02-sea-pn.riseup.net [10.0.1.112]) (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 mx0.riseup.net (Postfix) with ESMTPS id 4Rdx6w11HQz9tDs for ; Sun, 3 Sep 2023 15:50:16 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews02-sea.riseup.net (Postfix) with ESMTPSA id 4Rdx6v040BzFpfK; Sun, 3 Sep 2023 15:50:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693756230; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=VAI0qh+iPo/HoZSMsLHTtsdU/14TW7cOkohFr5ghENU=; b=NYTU4OXJp8mGCiaXyYGOWyom8pbGyQdfQVjuiwikIslQ/QCnXQADoNg+xBKqDpCGzAUSjK ogOkqj8kkekdaqFucwxpLXCIuXt1UYjzoj27jHSe9b1Dy7ueJBsQNSjFj5+p9Nkcno5A/O gHVbLEnNy332wjKiuUygIsMf1nHnE1U= X-MC-Unique: 4yhjylzqO1SUoB8DOfka-w-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: or5B6gWuPu25V17U5D8Ljg-1 X-Riseup-User-ID: DC6FC9361EB4053BCA0D80758FA08694F091C207BFB7D95AF79C6A4BFB5AF54E From: K Shiva Kiran To: libvir-list@redhat.com Subject: [PATCH 07/16] nwfilter: Implement RPC Date: Sun, 3 Sep 2023 21:19:08 +0530 Message-ID: <20230903155034.211476-8-shiva_kr@riseup.net> In-Reply-To: <20230903155034.211476-1-shiva_kr@riseup.net> References: <20230903155034.211476-1-shiva_kr@riseup.net> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: K Shiva Kiran Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: riseup.net Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1693756233412100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: K Shiva Kiran --- src/remote/remote_driver.c | 2 ++ src/remote/remote_protocol.x | 34 +++++++++++++++++++++++++++++++++- src/remote_protocol-structs | 19 +++++++++++++++++++ 3 files changed, 54 insertions(+), 1 deletion(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index b81c9bc611..8f140ef864 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -8278,6 +8278,8 @@ static virNWFilterDriver nwfilter_driver =3D { .nwfilterBindingCreateXML =3D remoteNWFilterBindingCreateXML, /* 4.5.0= */ .nwfilterBindingDelete =3D remoteNWFilterBindingDelete, /* 4.5.0 */ .nwfilterBindingGetXMLDesc =3D remoteNWFilterBindingGetXMLDesc, /* 4.5= .0 */ + .nwfilterSetMetadata =3D remoteNWFilterSetMetadata, /* 9.8.0 */ + .nwfilterGetMetadata =3D remoteNWFilterGetMetadata, /* 9.8.0 */ }; =20 static virConnectDriver connect_driver =3D { diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 7ff059e393..1a4a77a35f 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -1684,6 +1684,25 @@ struct remote_nwfilter_get_xml_desc_ret { remote_nonnull_string xml; }; =20 +struct remote_nwfilter_set_metadata_args { + remote_nonnull_nwfilter nwfilter; + int type; + remote_string metadata; + remote_string key; + remote_string uri; + unsigned int flags; +}; + +struct remote_nwfilter_get_metadata_args { + remote_nonnull_nwfilter nwfilter; + int type; + remote_string uri; + unsigned int flags; +}; + +struct remote_nwfilter_get_metadata_ret { + remote_nonnull_string metadata; +}; =20 /* Interface calls: */ =20 @@ -7008,5 +7027,18 @@ enum remote_procedure { * @generate: both * @acl: network:read */ - REMOTE_PROC_NETWORK_GET_METADATA =3D 445 + REMOTE_PROC_NETWORK_GET_METADATA =3D 445, + + /** + * @generate: both + * @acl: nwfilter:write + * @acl: nwfilter:save + */ + REMOTE_PROC_NWFILTER_SET_METADATA =3D 446, + + /** + * @generate: both + * @acl: nwfilter:read + */ + REMOTE_PROC_NWFILTER_GET_METADATA =3D 447 }; diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs index c07e0af1e6..c3172e3f06 100644 --- a/src/remote_protocol-structs +++ b/src/remote_protocol-structs @@ -1220,6 +1220,23 @@ struct remote_nwfilter_get_xml_desc_args { struct remote_nwfilter_get_xml_desc_ret { remote_nonnull_string xml; }; +struct remote_nwfilter_set_metadata_args { + remote_nonnull_nwfilter nwfilter; + int type; + remote_string metadata; + remote_string key; + remote_string uri; + u_int flags; +}; +struct remote_nwfilter_get_metadata_args { + remote_nonnull_nwfilter nwfilter; + int type; + remote_string uri; + u_int flags; +}; +struct remote_nwfilter_get_metadata_ret { + remote_nonnull_string metadata; +}; struct remote_connect_num_of_interfaces_ret { int num; }; @@ -3736,4 +3753,6 @@ enum remote_procedure { REMOTE_PROC_DOMAIN_FD_ASSOCIATE =3D 443, REMOTE_PROC_NETWORK_SET_METADATA =3D 444, REMOTE_PROC_NETWORK_GET_METADATA =3D 445, + REMOTE_PROC_NWFILTER_SET_METADATA =3D 446, + REMOTE_PROC_NWFILTER_GET_METADATA =3D 447, }; --=20 2.42.0