Changes between Version 2 and Version 3 of Internal/OpenFlow/miscOF


Ignore:
Timestamp:
Apr 8, 2013, 9:53:46 PM (12 years ago)
Author:
akoshibe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/OpenFlow/miscOF

    v2 v3  
    1111 * A good way to track packets and transactions between datapath and controller is via buffer Id for switch-initiated conversations, and by XID for controller-initiated transactions. A caveat is that the buffer ID is only applicable to a subset of messages e.g. !PacketIns and !PacketOuts. A -1 buffer ID indicates a controller-generated packet (e.g. by a flow pushing tool or via a REST API for static flows). 
    1212
    13  * making !FlowMods. If not building a match object from a !PacketIn, make sure to not forget to invert the wildcard bit for the field you are setting. The default match is wildcarded to all.
     13 * making !FlowMods. If not building a match object from a !PacketIn, make sure to not forget to invert the wildcard bit for the field you are setting. The default match is wildcarded to all. For example, to make a match object that only inspects source MAC address of an Ethernet header:
     14   {{{
     15    (1)    OFMatch m1 = new OFMatch();
     16    (2)    m1.setDataLayerSource(hwaddr);
     17           m1.setWildcards(OFMatch.OFPFW_ALL & ~OFMatch.OFPFW_DL_SRC);
     18
     19    (3)    flowmod.setmatch(m1);   //and other params as necessary
     20   }}}
     21   
     22