org.openflow.protocol
Class FlowWildcards

java.lang.Object
  extended by org.openflow.protocol.FlowWildcards

public class FlowWildcards
extends java.lang.Object

Flow wildcards. Equivalent to ofp_flow_wildcards.

Author:
David Underhill

Nested Class Summary
static class FlowWildcards.Wildcard
           
 
Constructor Summary
FlowWildcards()
           
FlowWildcards(int bitfield)
           
 
Method Summary
static java.lang.String bitCountToString(int numBitsMasked)
          Returns the netmask with the specified number of bits masked
 boolean equals(java.lang.Object o)
           
 int getAssociatedBits()
          returns the bits representing this wildcard
 int getWildcardIPDstBitsMasked()
          Gets the number of bits in the IP destination address which are wildcarded
 int getWildcardIPSrcBitsMasked()
          Gets the number of bits in the IP source address which are wildcarded
 int hashCode()
           
 boolean isSet(FlowWildcards.Wildcard w)
          Returns whether the bit for Wildcard w is set in bitfield
 boolean isWildcardAll()
          Whether to wildcard on everything
 boolean isWildcardEthernetDst()
          Whether to wildcard on destination MAC address
 boolean isWildcardEthernetSrc()
          Whether to wildcard on source MAC address
 boolean isWildcardEthernetType()
          Whether to wildcard on Ethernet type
 boolean isWildcardInputPort()
          Whether to wildcard on input port
 boolean isWildcardIPDst()
          Whether to wildcard on destination IP address
 boolean isWildcardIPProtocol()
          Whether to wildcard on IP protocol
 boolean isWildcardIPSrc()
          Whether to wildcard on source IP address
 boolean isWildcardPortDst()
          Whether to wildcard on TCP/UDP destination port
 boolean isWildcardPortSrc()
          Whether to wildcard on TCP/UDP source port
 boolean isWildcardVLAN()
          Whether to wildcard on VLAN
 void set(FlowWildcards.Wildcard w, boolean enable)
          Sets whether the bit for Wildcard w is set in bitfield
 void set(int bitfield)
          Sets all of the wiidcard bits directly
 void setWildcardAll()
          Enables all wildcards
 void setWildcardEthernetDst(boolean enable)
          Set whether to wildcard on destination MAC address
 void setWildcardEthernetSrc(boolean enable)
          Set whether to wildcard on source MAC address
 void setWildcardEthernetType(boolean enable)
          Set whether to wildcard on Ethernet type
 void setWildcardInputPort(boolean enable)
          Set whether to wildcard on input port
 void setWildcardIPDst(int numBitsToMask)
          Sets whether to wildcard on IP destination address (0 => no wildcard).
 void setWildcardIPProtocol(boolean enable)
          Set whether to wildcard on IP protocol
 void setWildcardIPSrc(int numBitsToMask)
          Sets whether to wildcard on IP source address (0 => no wildcard).
 void setWildcardPortDst(boolean enable)
          Set whether to wildcard on TCP/UDP destination port
 void setWildcardPortSrc(boolean enable)
          Set whether to wildcard on TCP/UDP source port
 void setWildcardVLAN(boolean enable)
          Set whether to wildcard on VLAN
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FlowWildcards

public FlowWildcards()

FlowWildcards

public FlowWildcards(int bitfield)
Method Detail

getAssociatedBits

public int getAssociatedBits()
returns the bits representing this wildcard


isSet

public boolean isSet(FlowWildcards.Wildcard w)
Returns whether the bit for Wildcard w is set in bitfield


set

public void set(FlowWildcards.Wildcard w,
                boolean enable)
Sets whether the bit for Wildcard w is set in bitfield


set

public void set(int bitfield)
Sets all of the wiidcard bits directly


isWildcardInputPort

public boolean isWildcardInputPort()
Whether to wildcard on input port


setWildcardInputPort

public void setWildcardInputPort(boolean enable)
Set whether to wildcard on input port


isWildcardVLAN

public boolean isWildcardVLAN()
Whether to wildcard on VLAN


setWildcardVLAN

public void setWildcardVLAN(boolean enable)
Set whether to wildcard on VLAN


isWildcardEthernetSrc

public boolean isWildcardEthernetSrc()
Whether to wildcard on source MAC address


setWildcardEthernetSrc

public void setWildcardEthernetSrc(boolean enable)
Set whether to wildcard on source MAC address


isWildcardEthernetDst

public boolean isWildcardEthernetDst()
Whether to wildcard on destination MAC address


setWildcardEthernetDst

public void setWildcardEthernetDst(boolean enable)
Set whether to wildcard on destination MAC address


isWildcardEthernetType

public boolean isWildcardEthernetType()
Whether to wildcard on Ethernet type


setWildcardEthernetType

public void setWildcardEthernetType(boolean enable)
Set whether to wildcard on Ethernet type


isWildcardIPProtocol

public boolean isWildcardIPProtocol()
Whether to wildcard on IP protocol


setWildcardIPProtocol

public void setWildcardIPProtocol(boolean enable)
Set whether to wildcard on IP protocol


isWildcardPortSrc

public boolean isWildcardPortSrc()
Whether to wildcard on TCP/UDP source port


setWildcardPortSrc

public void setWildcardPortSrc(boolean enable)
Set whether to wildcard on TCP/UDP source port


isWildcardPortDst

public boolean isWildcardPortDst()
Whether to wildcard on TCP/UDP destination port


setWildcardPortDst

public void setWildcardPortDst(boolean enable)
Set whether to wildcard on TCP/UDP destination port


isWildcardIPSrc

public boolean isWildcardIPSrc()
Whether to wildcard on source IP address


setWildcardIPSrc

public void setWildcardIPSrc(int numBitsToMask)
Sets whether to wildcard on IP source address (0 => no wildcard).


getWildcardIPSrcBitsMasked

public int getWildcardIPSrcBitsMasked()
Gets the number of bits in the IP source address which are wildcarded


isWildcardIPDst

public boolean isWildcardIPDst()
Whether to wildcard on destination IP address


setWildcardIPDst

public void setWildcardIPDst(int numBitsToMask)
Sets whether to wildcard on IP destination address (0 => no wildcard).


getWildcardIPDstBitsMasked

public int getWildcardIPDstBitsMasked()
Gets the number of bits in the IP destination address which are wildcarded


isWildcardAll

public boolean isWildcardAll()
Whether to wildcard on everything


setWildcardAll

public void setWildcardAll()
Enables all wildcards


bitCountToString

public static java.lang.String bitCountToString(int numBitsMasked)
Returns the netmask with the specified number of bits masked


hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object