提交 44242cce 编写于 作者: J John Ferlan

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.
上级 d82aee6a
...@@ -560,50 +560,74 @@ struct domUpdateCBStruct { ...@@ -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
virNWFilterDefPtr def); virNWFilterSaveDef(const char *configDir,
virNWFilterDefPtr def);
int virNWFilterDeleteDef(const char *configDir, int
virNWFilterDefPtr def); virNWFilterDeleteDef(const char *configDir,
virNWFilterDefPtr def);
virNWFilterDefPtr virNWFilterDefParseNode(xmlDocPtr xml, virNWFilterDefPtr
xmlNodePtr root); virNWFilterDefParseNode(xmlDocPtr xml,
xmlNodePtr root);
char *virNWFilterDefFormat(const virNWFilterDef *def); char *
virNWFilterDefFormat(const virNWFilterDef *def);
int virNWFilterSaveXML(const char *configDir, int
virNWFilterDefPtr def, virNWFilterSaveXML(const char *configDir,
const char *xml); virNWFilterDefPtr def,
const char *xml);
int virNWFilterSaveConfig(const char *configDir, int
virNWFilterDefPtr def); virNWFilterSaveConfig(const char *configDir,
virNWFilterDefPtr def);
char *virNWFilterConfigFile(const char *dir, char *
const char *name); virNWFilterConfigFile(const char *dir,
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
void *data); virNWFilterConfLayerInit(virDomainObjListIterator domUpdateCB,
typedef void (*virNWFilterVoidCall)(void); void *opaque);
void
virNWFilterConfLayerShutdown(void);
int
virNWFilterInstFiltersOnAllVMs(void);
typedef int
(*virNWFilterRebuild)(virDomainObjListIterator domUpdateCB,
void *data);
typedef void
(*virNWFilterVoidCall)(void);
typedef struct _virNWFilterCallbackDriver virNWFilterCallbackDriver; typedef struct _virNWFilterCallbackDriver virNWFilterCallbackDriver;
typedef virNWFilterCallbackDriver *virNWFilterCallbackDriverPtr; typedef virNWFilterCallbackDriver *virNWFilterCallbackDriverPtr;
...@@ -615,18 +639,29 @@ struct _virNWFilterCallbackDriver { ...@@ -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);
void
virNWFilterCallbackDriversLock(void);
void
virNWFilterCallbackDriversUnlock(void);
char *
virNWFilterPrintTCPFlags(uint8_t flags);
char *virNWFilterPrintTCPFlags(uint8_t flags); bool
virNWFilterRuleIsProtocolIPv4(virNWFilterRuleDefPtr rule);
bool
virNWFilterRuleIsProtocolIPv6(virNWFilterRuleDefPtr rule);
bool virNWFilterRuleIsProtocolIPv4(virNWFilterRuleDefPtr rule); bool
bool virNWFilterRuleIsProtocolIPv6(virNWFilterRuleDefPtr rule); virNWFilterRuleIsProtocolEthernet(virNWFilterRuleDefPtr rule);
bool virNWFilterRuleIsProtocolEthernet(virNWFilterRuleDefPtr rule);
VIR_ENUM_DECL(virNWFilterRuleAction); VIR_ENUM_DECL(virNWFilterRuleAction);
VIR_ENUM_DECL(virNWFilterRuleDirection); VIR_ENUM_DECL(virNWFilterRuleDirection);
......
...@@ -57,29 +57,38 @@ struct _virNWFilterDriverState { ...@@ -57,29 +57,38 @@ struct _virNWFilterDriverState {
bool watchingFirewallD; bool watchingFirewallD;
}; };
void virNWFilterObjListFree(virNWFilterObjListPtr nwfilters); void
virNWFilterObjListFree(virNWFilterObjListPtr nwfilters);
void virNWFilterObjRemove(virNWFilterObjListPtr nwfilters, void
virNWFilterObjPtr nwfilter); virNWFilterObjRemove(virNWFilterObjListPtr nwfilters,
virNWFilterObjPtr nwfilter);
void virNWFilterObjFree(virNWFilterObjPtr obj); void virNWFilterObjFree(virNWFilterObjPtr obj);
virNWFilterObjPtr virNWFilterObjFindByUUID(virNWFilterObjListPtr nwfilters, virNWFilterObjPtr
const unsigned char *uuid); virNWFilterObjFindByUUID(virNWFilterObjListPtr nwfilters,
const unsigned char *uuid);
virNWFilterObjPtr virNWFilterObjFindByName(virNWFilterObjListPtr nwfilters, virNWFilterObjPtr
const char *name); virNWFilterObjFindByName(virNWFilterObjListPtr nwfilters,
const char *name);
virNWFilterObjPtr virNWFilterObjAssignDef(virNWFilterObjListPtr nwfilters, virNWFilterObjPtr
virNWFilterDefPtr def); virNWFilterObjAssignDef(virNWFilterObjListPtr nwfilters,
virNWFilterDefPtr def);
int virNWFilterTestUnassignDef(virNWFilterObjPtr nwfilter); int
virNWFilterTestUnassignDef(virNWFilterObjPtr nwfilter);
int virNWFilterLoadAllConfigs(virNWFilterObjListPtr nwfilters, int
const char *configDir); virNWFilterLoadAllConfigs(virNWFilterObjListPtr nwfilters,
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 */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册