From nobody Thu Nov 28 10:35:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 152484289855080.09866436062634; Fri, 27 Apr 2018 08:28:18 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F336E7B123; Fri, 27 Apr 2018 15:28:16 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B0AB316D2D; Fri, 27 Apr 2018 15:28:16 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 27DA6180BAD3; Fri, 27 Apr 2018 15:28:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3RFPKjs032258 for ; Fri, 27 Apr 2018 11:25:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id E8FCE83B77; Fri, 27 Apr 2018 15:25:19 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.42.22.189]) by smtp.corp.redhat.com (Postfix) with ESMTP id 563C5AB583; Fri, 27 Apr 2018 15:25:19 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Fri, 27 Apr 2018 16:25:02 +0100 Message-Id: <20180427152513.28928-4-berrange@redhat.com> In-Reply-To: <20180427152513.28928-1-berrange@redhat.com> References: <20180427152513.28928-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 03/14] nwfilter: remove virNWFilterHashTable typedefs entirely X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 27 Apr 2018 15:28:17 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 All the code now just uses the virHashTablePtr type directly. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Jiri Denemark --- src/conf/domain_conf.c | 2 +- src/conf/domain_conf.h | 2 +- src/conf/nwfilter_conf.h | 2 +- src/conf/nwfilter_ipaddrmap.c | 2 +- src/conf/nwfilter_params.c | 26 ++++++++++----------- src/conf/nwfilter_params.h | 23 ++++++++----------- src/nwfilter/nwfilter_dhcpsnoop.c | 6 ++--- src/nwfilter/nwfilter_dhcpsnoop.h | 2 +- src/nwfilter/nwfilter_gentech_driver.c | 42 +++++++++++++++++-------------= ---- src/nwfilter/nwfilter_gentech_driver.h | 4 ++-- src/nwfilter/nwfilter_learnipaddr.c | 6 ++--- src/nwfilter/nwfilter_learnipaddr.h | 4 ++-- src/nwfilter/nwfilter_tech_driver.h | 2 +- tests/nwfilterxml2firewalltest.c | 24 +++++++++---------- 14 files changed, 72 insertions(+), 75 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 627058a144..bdda11c599 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -10868,7 +10868,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlop= t, char *vhostuser_type =3D NULL; char *trustGuestRxFilters =3D NULL; char *vhost_path =3D NULL; - virNWFilterHashTablePtr filterparams =3D NULL; + virHashTablePtr filterparams =3D NULL; virDomainActualNetDefPtr actual =3D NULL; xmlNodePtr oldnode =3D ctxt->node; virDomainChrSourceReconnectDef reconnect =3D {0}; diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 3c7eccb8ca..b954f4d462 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1057,7 +1057,7 @@ struct _virDomainNetDef { virNetDevIPInfo guestIP; virDomainDeviceInfo info; char *filter; - virNWFilterHashTablePtr filterparams; + virHashTablePtr filterparams; virNetDevBandwidthPtr bandwidth; virNetDevVlan vlan; int trustGuestRxFilters; /* enum virTristateBool */ diff --git a/src/conf/nwfilter_conf.h b/src/conf/nwfilter_conf.h index f960bf3d56..a31db6d3ff 100644 --- a/src/conf/nwfilter_conf.h +++ b/src/conf/nwfilter_conf.h @@ -501,7 +501,7 @@ typedef struct _virNWFilterIncludeDef virNWFilterInclud= eDef; typedef virNWFilterIncludeDef *virNWFilterIncludeDefPtr; struct _virNWFilterIncludeDef { char *filterref; - virNWFilterHashTablePtr params; + virHashTablePtr params; }; =20 =20 diff --git a/src/conf/nwfilter_ipaddrmap.c b/src/conf/nwfilter_ipaddrmap.c index a921d7cfd6..14a62c1a74 100644 --- a/src/conf/nwfilter_ipaddrmap.c +++ b/src/conf/nwfilter_ipaddrmap.c @@ -36,7 +36,7 @@ #define VIR_FROM_THIS VIR_FROM_NWFILTER =20 static virMutex ipAddressMapLock =3D VIR_MUTEX_INITIALIZER; -static virNWFilterHashTablePtr ipAddressMap; +static virHashTablePtr ipAddressMap; =20 =20 /* Add an IP address to the list of IP addresses an interface is diff --git a/src/conf/nwfilter_params.c b/src/conf/nwfilter_params.c index ee9c063941..ffffc6bae8 100644 --- a/src/conf/nwfilter_params.c +++ b/src/conf/nwfilter_params.c @@ -348,7 +348,7 @@ virNWFilterVarCombIterEntryInit(virNWFilterVarCombIterE= ntryPtr cie, =20 static int virNWFilterVarCombIterAddVariable(virNWFilterVarCombIterEntryPtr cie, - virNWFilterHashTablePtr hash, + virHashTablePtr hash, const virNWFilterVarAccess *varAccess) { virNWFilterVarValuePtr varValue; @@ -415,7 +415,7 @@ virNWFilterVarCombIterAddVariable(virNWFilterVarCombIte= rEntryPtr cie, */ static bool virNWFilterVarCombIterEntryAreUniqueEntries(virNWFilterVarCombIterEntryPtr= cie, - virNWFilterHashTablePtr hash) + virHashTablePtr hash) { size_t i, j; virNWFilterVarValuePtr varValue, tmp; @@ -473,7 +473,7 @@ virNWFilterVarCombIterEntryAreUniqueEntries(virNWFilter= VarCombIterEntryPtr cie, * be created. */ virNWFilterVarCombIterPtr -virNWFilterVarCombIterCreate(virNWFilterHashTablePtr hash, +virNWFilterVarCombIterCreate(virHashTablePtr hash, virNWFilterVarAccessPtr *varAccess, size_t nVarAccess) { @@ -631,14 +631,14 @@ hashDataFree(void *payload, const void *name ATTRIBUT= E_UNUSED) } =20 =20 -virNWFilterHashTablePtr +virHashTablePtr virNWFilterHashTableCreate(int n) { return virHashCreate(n, hashDataFree); } =20 struct addToTableStruct { - virNWFilterHashTablePtr target; + virHashTablePtr target; int errOccurred; }; =20 @@ -668,8 +668,8 @@ addToTable(void *payload, const void *name, void *data) =20 =20 int -virNWFilterHashTablePutAll(virNWFilterHashTablePtr src, - virNWFilterHashTablePtr dest) +virNWFilterHashTablePutAll(virHashTablePtr src, + virHashTablePtr dest) { struct addToTableStruct atts =3D { .target =3D dest, @@ -698,8 +698,8 @@ virNWFilterVarValueCompare(const void *a, const void *b) } =20 bool -virNWFilterHashTableEqual(virNWFilterHashTablePtr a, - virNWFilterHashTablePtr b) +virNWFilterHashTableEqual(virHashTablePtr a, + virHashTablePtr b) { return virHashEqual(a, b, virNWFilterVarValueCompare); } @@ -723,13 +723,13 @@ virNWFilterParseVarValue(const char *val) return virNWFilterVarValueCreateSimpleCopyValue(val); } =20 -virNWFilterHashTablePtr +virHashTablePtr virNWFilterParseParamAttributes(xmlNodePtr cur) { char *nam, *val; virNWFilterVarValuePtr value; =20 - virNWFilterHashTablePtr table =3D virNWFilterHashTableCreate(0); + virHashTablePtr table =3D virNWFilterHashTableCreate(0); if (!table) return NULL; =20 @@ -791,7 +791,7 @@ virNWFilterFormatParameterNameSorter(const virHashKeyVa= luePair *a, =20 int virNWFilterFormatParamAttributes(virBufferPtr buf, - virNWFilterHashTablePtr table, + virHashTablePtr table, const char *filterref) { virHashKeyValuePairPtr items; @@ -1023,7 +1023,7 @@ virNWFilterVarAccessGetIntIterId(const virNWFilterVar= Access *vap) =20 bool virNWFilterVarAccessIsAvailable(const virNWFilterVarAccess *varAccess, - const virNWFilterHashTable *hash) + const virHashTable *hash) { const char *varName =3D virNWFilterVarAccessGetVarName(varAccess); const char *res; diff --git a/src/conf/nwfilter_params.h b/src/conf/nwfilter_params.h index b24f023633..9bdf65c033 100644 --- a/src/conf/nwfilter_params.h +++ b/src/conf/nwfilter_params.h @@ -63,19 +63,16 @@ int virNWFilterVarValueAddValue(virNWFilterVarValuePtr = val, char *value); int virNWFilterVarValueAddValueCopy(virNWFilterVarValuePtr val, const char= *value); int virNWFilterVarValueDelValue(virNWFilterVarValuePtr val, const char *va= lue); =20 -typedef virHashTable virNWFilterHashTable; -typedef virHashTable *virNWFilterHashTablePtr; - -virNWFilterHashTablePtr virNWFilterParseParamAttributes(xmlNodePtr cur); +virHashTablePtr virNWFilterParseParamAttributes(xmlNodePtr cur); int virNWFilterFormatParamAttributes(virBufferPtr buf, - virNWFilterHashTablePtr table, + virHashTablePtr table, const char *filterref); =20 -virNWFilterHashTablePtr virNWFilterHashTableCreate(int n); -int virNWFilterHashTablePutAll(virNWFilterHashTablePtr src, - virNWFilterHashTablePtr dest); -bool virNWFilterHashTableEqual(virNWFilterHashTablePtr a, - virNWFilterHashTablePtr b); +virHashTablePtr virNWFilterHashTableCreate(int n); +int virNWFilterHashTablePutAll(virHashTablePtr src, + virHashTablePtr dest); +bool virNWFilterHashTableEqual(virHashTablePtr a, + virHashTablePtr b); =20 # define VALID_VARNAME \ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_" @@ -123,7 +120,7 @@ virNWFilterVarAccessType virNWFilterVarAccessGetType( unsigned int virNWFilterVarAccessGetIterId(const virNWFilterVarAccess *vap= ); unsigned int virNWFilterVarAccessGetIndex(const virNWFilterVarAccess *vap); bool virNWFilterVarAccessIsAvailable(const virNWFilterVarAccess *vap, - const virNWFilterHashTable *hash); + const virHashTable *hash); =20 typedef struct _virNWFilterVarCombIterEntry virNWFilterVarCombIterEntry; typedef virNWFilterVarCombIterEntry *virNWFilterVarCombIterEntryPtr; @@ -139,12 +136,12 @@ struct _virNWFilterVarCombIterEntry { typedef struct _virNWFilterVarCombIter virNWFilterVarCombIter; typedef virNWFilterVarCombIter *virNWFilterVarCombIterPtr; struct _virNWFilterVarCombIter { - virNWFilterHashTablePtr hashTable; + virHashTablePtr hashTable; size_t nIter; virNWFilterVarCombIterEntry iter[0]; }; virNWFilterVarCombIterPtr virNWFilterVarCombIterCreate( - virNWFilterHashTablePtr hash, + virHashTablePtr hash, virNWFilterVarAccessPtr *vars, size_t nVars); =20 diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcp= snoop.c index d23cad3b75..aec68ab847 100644 --- a/src/nwfilter/nwfilter_dhcpsnoop.c +++ b/src/nwfilter/nwfilter_dhcpsnoop.c @@ -141,7 +141,7 @@ struct _virNWFilterSnoopReq { char ifkey[VIR_IFKEY_LEN]; virMacAddr macaddr; char *filtername; - virNWFilterHashTablePtr vars; + virHashTablePtr vars; virNWFilterDriverStatePtr driver; /* start and end of lease list, ordered by lease time */ virNWFilterSnoopIPLeasePtr start; @@ -1595,7 +1595,7 @@ virNWFilterDHCPSnoopReq(virNWFilterTechDriverPtr tech= driver, const unsigned char *vmuuid, const virMacAddr *macaddr, const char *filtername, - virNWFilterHashTablePtr filterparams, + virHashTablePtr filterparams, virNWFilterDriverStatePtr driver) { virNWFilterSnoopReqPtr req; @@ -2239,7 +2239,7 @@ virNWFilterDHCPSnoopReq(virNWFilterTechDriverPtr tech= driver ATTRIBUTE_UNUSED, const unsigned char *vmuuid ATTRIBUTE_UNUSED, const virMacAddr *macaddr ATTRIBUTE_UNUSED, const char *filtername ATTRIBUTE_UNUSED, - virNWFilterHashTablePtr filterparams ATTRIBUTE_UNU= SED, + virHashTablePtr filterparams ATTRIBUTE_UNUSED, virNWFilterDriverStatePtr driver ATTRIBUTE_UNUSED) { virReportError(VIR_ERR_INTERNAL_ERROR, diff --git a/src/nwfilter/nwfilter_dhcpsnoop.h b/src/nwfilter/nwfilter_dhcp= snoop.h index 3ef96fa4e1..a5925de40a 100644 --- a/src/nwfilter/nwfilter_dhcpsnoop.h +++ b/src/nwfilter/nwfilter_dhcpsnoop.h @@ -35,7 +35,7 @@ int virNWFilterDHCPSnoopReq(virNWFilterTechDriverPtr tech= driver, const unsigned char *vmuuid, const virMacAddr *macaddr, const char *filtername, - virNWFilterHashTablePtr filterparams, + virHashTablePtr filterparams, virNWFilterDriverStatePtr driver); void virNWFilterDHCPSnoopEnd(const char *ifname); #endif /* __NWFILTER_DHCPSNOOP_H */ diff --git a/src/nwfilter/nwfilter_gentech_driver.c b/src/nwfilter/nwfilter= _gentech_driver.c index 130a366d67..0735426734 100644 --- a/src/nwfilter/nwfilter_gentech_driver.c +++ b/src/nwfilter/nwfilter_gentech_driver.c @@ -142,7 +142,7 @@ virNWFilterRuleInstFree(virNWFilterRuleInstPtr inst) * Adds a couple of standard keys (MAC, IP) to the hash table. */ static int -virNWFilterVarHashmapAddStdValues(virNWFilterHashTablePtr table, +virNWFilterVarHashmapAddStdValues(virHashTablePtr table, char *macaddr, const virNWFilterVarValue *ipaddr) { @@ -191,11 +191,11 @@ virNWFilterVarHashmapAddStdValues(virNWFilterHashTabl= ePtr table, * * Returns pointer to hashmap, NULL if an error occurred. */ -virNWFilterHashTablePtr +virHashTablePtr virNWFilterCreateVarHashmap(char *macaddr, const virNWFilterVarValue *ipaddr) { - virNWFilterHashTablePtr table =3D virNWFilterHashTableCreate(0); + virHashTablePtr table =3D virNWFilterHashTableCreate(0); if (!table) return NULL; =20 @@ -208,7 +208,7 @@ virNWFilterCreateVarHashmap(char *macaddr, =20 =20 /** - * Convert a virNWFilterHashTable into a string of comma-separated + * Convert a virHashTable into a string of comma-separated * variable names. */ struct printString @@ -278,11 +278,11 @@ virNWFilterPrintVars(virHashTablePtr vars, * Creates a new hash table with contents of var1 and var2 added where * contents of var2 will overwrite those of var1. */ -static virNWFilterHashTablePtr -virNWFilterCreateVarsFrom(virNWFilterHashTablePtr vars1, - virNWFilterHashTablePtr vars2) +static virHashTablePtr +virNWFilterCreateVarsFrom(virHashTablePtr vars1, + virHashTablePtr vars2) { - virNWFilterHashTablePtr res =3D virNWFilterHashTableCreate(0); + virHashTablePtr res =3D virNWFilterHashTableCreate(0); if (!res) return NULL; =20 @@ -330,7 +330,7 @@ virNWFilterInstReset(virNWFilterInstPtr inst) static int virNWFilterDefToInst(virNWFilterDriverStatePtr driver, virNWFilterDefPtr def, - virNWFilterHashTablePtr vars, + virHashTablePtr vars, enum instCase useNewFilter, bool *foundNewFilter, virNWFilterInstPtr inst); @@ -338,7 +338,7 @@ virNWFilterDefToInst(virNWFilterDriverStatePtr driver, static int virNWFilterRuleDefToRuleInst(virNWFilterDefPtr def, virNWFilterRuleDefPtr rule, - virNWFilterHashTablePtr vars, + virHashTablePtr vars, virNWFilterInstPtr inst) { virNWFilterRuleInstPtr ruleinst; @@ -371,13 +371,13 @@ virNWFilterRuleDefToRuleInst(virNWFilterDefPtr def, static int virNWFilterIncludeDefToRuleInst(virNWFilterDriverStatePtr driver, virNWFilterIncludeDefPtr inc, - virNWFilterHashTablePtr vars, + virHashTablePtr vars, enum instCase useNewFilter, bool *foundNewFilter, virNWFilterInstPtr inst) { virNWFilterObjPtr obj; - virNWFilterHashTablePtr tmpvars =3D NULL; + virHashTablePtr tmpvars =3D NULL; virNWFilterDefPtr childdef; virNWFilterDefPtr newChilddef; int ret =3D -1; @@ -452,7 +452,7 @@ virNWFilterIncludeDefToRuleInst(virNWFilterDriverStateP= tr driver, static int virNWFilterDefToInst(virNWFilterDriverStatePtr driver, virNWFilterDefPtr def, - virNWFilterHashTablePtr vars, + virHashTablePtr vars, enum instCase useNewFilter, bool *foundNewFilter, virNWFilterInstPtr inst) @@ -487,8 +487,8 @@ virNWFilterDefToInst(virNWFilterDriverStatePtr driver, =20 static int virNWFilterDetermineMissingVarsRec(virNWFilterDefPtr filter, - virNWFilterHashTablePtr vars, - virNWFilterHashTablePtr missing_vars, + virHashTablePtr vars, + virHashTablePtr missing_vars, int useNewFilter, virNWFilterDriverStatePtr driver) { @@ -498,7 +498,7 @@ virNWFilterDetermineMissingVarsRec(virNWFilterDefPtr fi= lter, virNWFilterDefPtr next_filter; virNWFilterDefPtr newNext_filter; virNWFilterVarValuePtr val; - virNWFilterHashTablePtr tmpvars; + virHashTablePtr tmpvars; =20 for (i =3D 0; i < filter->nentries; i++) { virNWFilterRuleDefPtr rule =3D filter->filterEntries[i]->rule; @@ -600,7 +600,7 @@ virNWFilterDoInstantiate(const unsigned char *vmuuid, const char *ifname, int ifindex, const char *linkdev, - virNWFilterHashTablePtr vars, + virHashTablePtr vars, enum instCase useNewFilter, bool *foundNewFilter, bool teardownOld, @@ -616,7 +616,7 @@ virNWFilterDoInstantiate(const unsigned char *vmuuid, const char *learning; bool reportIP =3D false; =20 - virNWFilterHashTablePtr missing_vars =3D virNWFilterHashTableCreate(0); + virHashTablePtr missing_vars =3D virNWFilterHashTableCreate(0); =20 memset(&inst, 0, sizeof(inst)); =20 @@ -754,7 +754,7 @@ virNWFilterInstantiateFilterUpdate(virNWFilterDriverSta= tePtr driver, const char *linkdev, const virMacAddr *macaddr, const char *filtername, - virNWFilterHashTablePtr filterparams, + virHashTablePtr filterparams, enum instCase useNewFilter, bool forceWithPendingReq, bool *foundNewFilter) @@ -763,7 +763,7 @@ virNWFilterInstantiateFilterUpdate(virNWFilterDriverSta= tePtr driver, const char *drvname =3D EBIPTABLES_DRIVER_ID; virNWFilterTechDriverPtr techdriver; virNWFilterObjPtr obj; - virNWFilterHashTablePtr vars, vars1; + virHashTablePtr vars, vars1; virNWFilterDefPtr filter; virNWFilterDefPtr newFilter; char vmmacaddr[VIR_MAC_STRING_BUFLEN] =3D {0}; @@ -896,7 +896,7 @@ virNWFilterInstantiateFilterLate(virNWFilterDriverState= Ptr driver, const char *linkdev, const virMacAddr *macaddr, const char *filtername, - virNWFilterHashTablePtr filterparams) + virHashTablePtr filterparams) { int rc; bool foundNewFilter =3D false; diff --git a/src/nwfilter/nwfilter_gentech_driver.h b/src/nwfilter/nwfilter= _gentech_driver.h index 71924879a2..67092157b8 100644 --- a/src/nwfilter/nwfilter_gentech_driver.h +++ b/src/nwfilter/nwfilter_gentech_driver.h @@ -53,11 +53,11 @@ int virNWFilterInstantiateFilterLate(virNWFilterDriverS= tatePtr driver, const char *linkdev, const virMacAddr *macaddr, const char *filtername, - virNWFilterHashTablePtr filterparams); + virHashTablePtr filterparams); =20 int virNWFilterTeardownFilter(const virDomainNetDef *net); =20 -virNWFilterHashTablePtr virNWFilterCreateVarHashmap(char *macaddr, +virHashTablePtr virNWFilterCreateVarHashmap(char *macaddr, const virNWFilterVarValue *value); =20 int virNWFilterDomainFWUpdateCB(virDomainObjPtr vm, diff --git a/src/nwfilter/nwfilter_learnipaddr.c b/src/nwfilter/nwfilter_le= arnipaddr.c index f5b94cf27d..2401857ddb 100644 --- a/src/nwfilter/nwfilter_learnipaddr.c +++ b/src/nwfilter/nwfilter_learnipaddr.c @@ -692,14 +692,14 @@ virNWFilterLearnIPAddress(virNWFilterTechDriverPtr te= chdriver, const char *linkdev, const virMacAddr *macaddr, const char *filtername, - virNWFilterHashTablePtr filterparams, + virHashTablePtr filterparams, virNWFilterDriverStatePtr driver, enum howDetect howDetect) { int rc; virThread thread; virNWFilterIPAddrLearnReqPtr req =3D NULL; - virNWFilterHashTablePtr ht =3D NULL; + virHashTablePtr ht =3D NULL; =20 if (howDetect =3D=3D 0) return -1; @@ -781,7 +781,7 @@ virNWFilterLearnIPAddress(virNWFilterTechDriverPtr tech= driver ATTRIBUTE_UNUSED, const char *linkdev ATTRIBUTE_UNUSED, const virMacAddr *macaddr ATTRIBUTE_UNUSED, const char *filtername ATTRIBUTE_UNUSED, - virNWFilterHashTablePtr filterparams ATTRIBUTE_U= NUSED, + virHashTablePtr filterparams ATTRIBUTE_UNUSED, virNWFilterDriverStatePtr driver ATTRIBUTE_UNUSE= D, enum howDetect howDetect ATTRIBUTE_UNUSED) { diff --git a/src/nwfilter/nwfilter_learnipaddr.h b/src/nwfilter/nwfilter_le= arnipaddr.h index b93ed38cff..dc4c0d110f 100644 --- a/src/nwfilter/nwfilter_learnipaddr.h +++ b/src/nwfilter/nwfilter_learnipaddr.h @@ -44,7 +44,7 @@ struct _virNWFilterIPAddrLearnReq { char linkdev[IF_NAMESIZE]; virMacAddr macaddr; char *filtername; - virNWFilterHashTablePtr filterparams; + virHashTablePtr filterparams; virNWFilterDriverStatePtr driver; enum howDetect howDetect; =20 @@ -58,7 +58,7 @@ int virNWFilterLearnIPAddress(virNWFilterTechDriverPtr te= chdriver, const char *linkdev, const virMacAddr *macaddr, const char *filtername, - virNWFilterHashTablePtr filterparams, + virHashTablePtr filterparams, virNWFilterDriverStatePtr driver, enum howDetect howDetect); =20 diff --git a/src/nwfilter/nwfilter_tech_driver.h b/src/nwfilter/nwfilter_te= ch_driver.h index bc30496644..d2ac0077db 100644 --- a/src/nwfilter/nwfilter_tech_driver.h +++ b/src/nwfilter/nwfilter_tech_driver.h @@ -39,7 +39,7 @@ struct _virNWFilterRuleInst { virNWFilterChainPriority chainPriority; virNWFilterRuleDefPtr def; virNWFilterRulePriority priority; - virNWFilterHashTablePtr vars; + virHashTablePtr vars; }; =20 =20 diff --git a/tests/nwfilterxml2firewalltest.c b/tests/nwfilterxml2firewallt= est.c index a51ad9412a..043b7d170e 100644 --- a/tests/nwfilterxml2firewalltest.c +++ b/tests/nwfilterxml2firewalltest.c @@ -147,11 +147,11 @@ static const char *commonRules[] =3D { }; =20 =20 -static virNWFilterHashTablePtr -virNWFilterCreateVarsFrom(virNWFilterHashTablePtr vars1, - virNWFilterHashTablePtr vars2) +static virHashTablePtr +virNWFilterCreateVarsFrom(virHashTablePtr vars1, + virHashTablePtr vars2) { - virNWFilterHashTablePtr res =3D virNWFilterHashTableCreate(0); + virHashTablePtr res =3D virNWFilterHashTableCreate(0); if (!res) return NULL; =20 @@ -199,13 +199,13 @@ virNWFilterInstReset(virNWFilterInstPtr inst) =20 static int virNWFilterDefToInst(const char *xml, - virNWFilterHashTablePtr vars, + virHashTablePtr vars, virNWFilterInstPtr inst); =20 static int virNWFilterRuleDefToRuleInst(virNWFilterDefPtr def, virNWFilterRuleDefPtr rule, - virNWFilterHashTablePtr vars, + virHashTablePtr vars, virNWFilterInstPtr inst) { virNWFilterRuleInstPtr ruleinst; @@ -238,10 +238,10 @@ virNWFilterRuleDefToRuleInst(virNWFilterDefPtr def, =20 static int virNWFilterIncludeDefToRuleInst(virNWFilterIncludeDefPtr inc, - virNWFilterHashTablePtr vars, + virHashTablePtr vars, virNWFilterInstPtr inst) { - virNWFilterHashTablePtr tmpvars =3D NULL; + virHashTablePtr tmpvars =3D NULL; int ret =3D -1; char *xml; =20 @@ -270,7 +270,7 @@ virNWFilterIncludeDefToRuleInst(virNWFilterIncludeDefPt= r inc, =20 static int virNWFilterDefToInst(const char *xml, - virNWFilterHashTablePtr vars, + virHashTablePtr vars, virNWFilterInstPtr inst) { size_t i; @@ -326,7 +326,7 @@ static void testRemoveCommonRules(char *rules) } =20 =20 -static int testSetOneParameter(virNWFilterHashTablePtr vars, +static int testSetOneParameter(virHashTablePtr vars, const char *name, const char *value) { @@ -350,7 +350,7 @@ static int testSetOneParameter(virNWFilterHashTablePtr = vars, return ret; } =20 -static int testSetDefaultParameters(virNWFilterHashTablePtr vars) +static int testSetDefaultParameters(virHashTablePtr vars) { if (testSetOneParameter(vars, "IPSETNAME", "tck_test") < 0 || testSetOneParameter(vars, "A", "1.1.1.1") || @@ -374,7 +374,7 @@ static int testCompareXMLToArgvFiles(const char *xml, { char *actualargv =3D NULL; virBuffer buf =3D VIR_BUFFER_INITIALIZER; - virNWFilterHashTablePtr vars =3D virNWFilterHashTableCreate(0); + virHashTablePtr vars =3D virNWFilterHashTableCreate(0); virNWFilterInst inst; int ret =3D -1; =20 --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list