conf: Alter coding style of nwfilter function prototypes

In an effort to be consistent with the source module, alter the function
prototypes to follow the similar style of source with the "type" on one
line followed by the function name and arguments on subsequent lines with
with argument getting it's own line.
This commit is contained in:
John Ferlan 2017-03-02 12:58:41 -05:00
parent d82aee6add
commit 44242cce02
2 changed files with 94 additions and 50 deletions

View File

@ -560,50 +560,74 @@ struct domUpdateCBStruct {
}; };
void virNWFilterRuleDefFree(virNWFilterRuleDefPtr def); void
virNWFilterRuleDefFree(virNWFilterRuleDefPtr def);
void virNWFilterDefFree(virNWFilterDefPtr def); void
virNWFilterDefFree(virNWFilterDefPtr def);
int virNWFilterTriggerVMFilterRebuild(void); int
virNWFilterTriggerVMFilterRebuild(void);
int virNWFilterSaveDef(const char *configDir, int
virNWFilterSaveDef(const char *configDir,
virNWFilterDefPtr def); virNWFilterDefPtr def);
int virNWFilterDeleteDef(const char *configDir, int
virNWFilterDeleteDef(const char *configDir,
virNWFilterDefPtr def); virNWFilterDefPtr def);
virNWFilterDefPtr virNWFilterDefParseNode(xmlDocPtr xml, virNWFilterDefPtr
virNWFilterDefParseNode(xmlDocPtr xml,
xmlNodePtr root); xmlNodePtr root);
char *virNWFilterDefFormat(const virNWFilterDef *def); char *
virNWFilterDefFormat(const virNWFilterDef *def);
int virNWFilterSaveXML(const char *configDir, int
virNWFilterSaveXML(const char *configDir,
virNWFilterDefPtr def, virNWFilterDefPtr def,
const char *xml); const char *xml);
int virNWFilterSaveConfig(const char *configDir, int
virNWFilterSaveConfig(const char *configDir,
virNWFilterDefPtr def); virNWFilterDefPtr def);
char *virNWFilterConfigFile(const char *dir, char *
virNWFilterConfigFile(const char *dir,
const char *name); const char *name);
virNWFilterDefPtr virNWFilterDefParseString(const char *xml); virNWFilterDefPtr
virNWFilterDefPtr virNWFilterDefParseFile(const char *filename); virNWFilterDefParseString(const char *xml);
void virNWFilterWriteLockFilterUpdates(void); virNWFilterDefPtr
void virNWFilterReadLockFilterUpdates(void); virNWFilterDefParseFile(const char *filename);
void virNWFilterUnlockFilterUpdates(void);
int virNWFilterConfLayerInit(virDomainObjListIterator domUpdateCB, void *opaque); void
void virNWFilterConfLayerShutdown(void); virNWFilterWriteLockFilterUpdates(void);
int virNWFilterInstFiltersOnAllVMs(void); void
virNWFilterReadLockFilterUpdates(void);
void
virNWFilterUnlockFilterUpdates(void);
typedef int (*virNWFilterRebuild)(virDomainObjListIterator domUpdateCB, int
virNWFilterConfLayerInit(virDomainObjListIterator domUpdateCB,
void *opaque);
void
virNWFilterConfLayerShutdown(void);
int
virNWFilterInstFiltersOnAllVMs(void);
typedef int
(*virNWFilterRebuild)(virDomainObjListIterator domUpdateCB,
void *data); void *data);
typedef void (*virNWFilterVoidCall)(void);
typedef void
(*virNWFilterVoidCall)(void);
typedef struct _virNWFilterCallbackDriver virNWFilterCallbackDriver; typedef struct _virNWFilterCallbackDriver virNWFilterCallbackDriver;
typedef virNWFilterCallbackDriver *virNWFilterCallbackDriverPtr; typedef virNWFilterCallbackDriver *virNWFilterCallbackDriverPtr;
@ -615,18 +639,29 @@ struct _virNWFilterCallbackDriver {
virNWFilterVoidCall vmDriverUnlock; virNWFilterVoidCall vmDriverUnlock;
}; };
void virNWFilterRegisterCallbackDriver(virNWFilterCallbackDriverPtr); void
void virNWFilterUnRegisterCallbackDriver(virNWFilterCallbackDriverPtr); virNWFilterRegisterCallbackDriver(virNWFilterCallbackDriverPtr);
void virNWFilterCallbackDriversLock(void);
void virNWFilterCallbackDriversUnlock(void);
void
virNWFilterUnRegisterCallbackDriver(virNWFilterCallbackDriverPtr);
char *virNWFilterPrintTCPFlags(uint8_t flags); void
virNWFilterCallbackDriversLock(void);
void
virNWFilterCallbackDriversUnlock(void);
bool virNWFilterRuleIsProtocolIPv4(virNWFilterRuleDefPtr rule); char *
bool virNWFilterRuleIsProtocolIPv6(virNWFilterRuleDefPtr rule); virNWFilterPrintTCPFlags(uint8_t flags);
bool virNWFilterRuleIsProtocolEthernet(virNWFilterRuleDefPtr rule);
bool
virNWFilterRuleIsProtocolIPv4(virNWFilterRuleDefPtr rule);
bool
virNWFilterRuleIsProtocolIPv6(virNWFilterRuleDefPtr rule);
bool
virNWFilterRuleIsProtocolEthernet(virNWFilterRuleDefPtr rule);
VIR_ENUM_DECL(virNWFilterRuleAction); VIR_ENUM_DECL(virNWFilterRuleAction);
VIR_ENUM_DECL(virNWFilterRuleDirection); VIR_ENUM_DECL(virNWFilterRuleDirection);

View File

@ -57,29 +57,38 @@ struct _virNWFilterDriverState {
bool watchingFirewallD; bool watchingFirewallD;
}; };
void virNWFilterObjListFree(virNWFilterObjListPtr nwfilters); void
virNWFilterObjListFree(virNWFilterObjListPtr nwfilters);
void virNWFilterObjRemove(virNWFilterObjListPtr nwfilters, void
virNWFilterObjRemove(virNWFilterObjListPtr nwfilters,
virNWFilterObjPtr nwfilter); virNWFilterObjPtr nwfilter);
void virNWFilterObjFree(virNWFilterObjPtr obj); void virNWFilterObjFree(virNWFilterObjPtr obj);
virNWFilterObjPtr virNWFilterObjFindByUUID(virNWFilterObjListPtr nwfilters, virNWFilterObjPtr
virNWFilterObjFindByUUID(virNWFilterObjListPtr nwfilters,
const unsigned char *uuid); const unsigned char *uuid);
virNWFilterObjPtr virNWFilterObjFindByName(virNWFilterObjListPtr nwfilters, virNWFilterObjPtr
virNWFilterObjFindByName(virNWFilterObjListPtr nwfilters,
const char *name); const char *name);
virNWFilterObjPtr virNWFilterObjAssignDef(virNWFilterObjListPtr nwfilters, virNWFilterObjPtr
virNWFilterObjAssignDef(virNWFilterObjListPtr nwfilters,
virNWFilterDefPtr def); virNWFilterDefPtr def);
int virNWFilterTestUnassignDef(virNWFilterObjPtr nwfilter); int
virNWFilterTestUnassignDef(virNWFilterObjPtr nwfilter);
int virNWFilterLoadAllConfigs(virNWFilterObjListPtr nwfilters, int
virNWFilterLoadAllConfigs(virNWFilterObjListPtr nwfilters,
const char *configDir); const char *configDir);
void virNWFilterObjLock(virNWFilterObjPtr obj); void
virNWFilterObjLock(virNWFilterObjPtr obj);
void virNWFilterObjUnlock(virNWFilterObjPtr obj); void
virNWFilterObjUnlock(virNWFilterObjPtr obj);
#endif /* VIRNWFILTEROBJ_H */ #endif /* VIRNWFILTEROBJ_H */