On Tue, Apr 15, 2014 at 12:05:46PM -0400, Stefan Berger wrote:
> On 04/15/2014 10:30 AM, Daniel P. Berrange wrote:
> >On Tue, Apr 15, 2014 at 10:06:22AM -0400, Stefan Berger wrote:
> >>On 04/08/2014 11:37 AM, Daniel P. Berrange wrote:
> >>>+bool virNWFilterRuleIsProtocolEthernet(virNWFilterRuleDefP
On 04/15/2014 10:30 AM, Daniel P. Berrange wrote:
On Tue, Apr 15, 2014 at 10:06:22AM -0400, Stefan Berger wrote:
On 04/08/2014 11:37 AM, Daniel P. Berrange wrote:
+bool virNWFilterRuleIsProtocolEthernet(virNWFilterRuleDefPtr rule)
+{
+if (rule->prtclType >= VIR_NWFILTER_RULE_PROTOCOL_NONE &
On Tue, Apr 15, 2014 at 10:06:22AM -0400, Stefan Berger wrote:
> On 04/08/2014 11:37 AM, Daniel P. Berrange wrote:
> >+bool virNWFilterRuleIsProtocolEthernet(virNWFilterRuleDefPtr rule)
> >+{
> >+if (rule->prtclType >= VIR_NWFILTER_RULE_PROTOCOL_NONE &&
> >+rule->prtclType <= VIR_NWFILT
On 04/08/2014 11:37 AM, Daniel P. Berrange wrote:
+bool virNWFilterRuleIsProtocolEthernet(virNWFilterRuleDefPtr rule)
+{
+if (rule->prtclType >= VIR_NWFILTER_RULE_PROTOCOL_NONE &&
+rule->prtclType <= VIR_NWFILTER_RULE_PROTOCOL_IPV6)
+return true;
+return false;
+}
I get
On 04/08/2014 11:37 AM, Daniel P. Berrange wrote:
Add virNWFilterRuleIsProtocol{Ethernet,IPv4,IPv6} helper methods
to avoid having to write a giant switch statements with many cases.
Signed-off-by: Daniel P. Berrange
ACK
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.c
Add virNWFilterRuleIsProtocol{Ethernet,IPv4,IPv6} helper methods
to avoid having to write a giant switch statements with many cases.
Signed-off-by: Daniel P. Berrange
---
src/conf/nwfilter_conf.c | 27 ++
src/conf/nwfilter_conf.h | 14
src/l