There was recently some confusion in this thread about exactly how to create a FlowMod with for network sources/destinations with a CIDR netmask (and some of the advice given was not current). Here is a code example that works:
...
title | OFMatch Wildcards Example |
---|
...
| This documentation is for pre-v1.0 |
...
releases |
...
of |
...
Floodlight, |
...
such |
...
as |
...
v0.9 |
...
and |
...
v0.91. |
...
Wildcards |
...
are |
...
handled |
...
for |
...
you |
...
behind |
...
the |
...
scenes |
...
in |
...
Floodlight |
...
v1.0. |
...
Code Block | ||
---|---|---|
| ||
OFMatch match = new OFMatch() match.setNetworkSource(IPv4.toIPv4Address("192.168.12.0")); // (1) match.setNetworkDestination(IPv4.toIPv4Address("10.0.0.0")); // (2) match.setWildcards(Wildcards.FULL.withNwSrcMask(24).withNwDstMask(8)); // (3) |
...