Match (de)serialization fixed + tests added
[openflowjava.git] / openflow-protocol-api / src / main / yang / openflow-types.yang
index 2c8e8ae6b7d5a1ef64a8f0f1fbf635320e696cfb..d17f69a807b7290e886a52a7e7dbb40361ed7090 100644 (file)
@@ -46,43 +46,43 @@ module openflow-types {
         ////description "Features of ports available in datapath.";
         //reference "ofp_port_features";
         type bits {
-            bit 10mb_hd { 
+            bit _10mb_hd { 
                 position 0;
                 //description "10 Mb half-duplex rate support.";
             }
-            bit 10mb-fd { 
+            bit _10mb-fd { 
                 position 1;
                 //description "10 Mb full-duplex rate support.";
             }
-            bit 100mb-hd { 
+            bit _100mb-hd { 
                 position 2;
                 //description "100 Mb half-duplex rate support.";
             }
-            bit 100mb-fd { 
+            bit _100mb-fd { 
                 position 3;
                 //description "100 Mb full-duplex rate support.";
             }
-            bit 1gb-hd { 
+            bit _1gb-hd { 
                 position 4;
                 //description "1 Gb half-duplex rate support.";
             }
-            bit 1gb-fd { 
+            bit _1gb-fd { 
                 position 5;
                 //description "1 Gb full-duplex rate support.";
             }
-            bit 10gb-fd { 
+            bit _10gb-fd { 
                 position 6;
                 //description "10 Gb full-duplex rate support.";
             }
-            bit 40gb-fd { 
+            bit _40gb-fd { 
                 position 7;
                 //description "40 Gb full-duplex rate support.";
             }
-            bit 100gb-fd { 
+            bit _100gb-fd { 
                 position 8;
                 //description "100 Gb full-duplex rate support.";
             }
-            bit 1tb-fd { 
+            bit _1tb-fd { 
                 position 9;
                 //description "1 Tb full-duplex rate support.";
             }
@@ -167,16 +167,9 @@ module openflow-types {
     }
 
     identity standard-match-type {
-        deprecated true;
         base oft:match-type-base;
     }
 
-    typedef oxm-match-type {
-        type identityref {
-            base oft:match-type-base;
-        }
-    }
-
     identity instruction {
     }
 
@@ -869,6 +862,21 @@ module openflow-types {
             }
         }
     }
+    
+    typedef table-values {
+        /* ofp_table */
+        type enumeration {
+            enum OFPTT_MAX {            
+              value 254; // 0xfe             
+              description "Last usable table number.";            
+            }
+            enum OFPTT_ALL {
+              value 255; // 0xff
+              description "Wildcard table used for table config, 
+                           flow stats and flow deletes.";
+            }
+        }
+    }
 
        typedef group {
                /* ofp_group - Group numbering. Groups can use any number up to OFPG_MAX.*/
@@ -1356,6 +1364,47 @@ module openflow-types {
         }
     }
     
+    typedef ipv6-exthdr-flags {
+        type bits {
+            bit nonext {
+                description "<No next header> encountered.";
+                position 0;
+            }
+            bit esp {
+                description "Encrypted Sec Payload header present.";
+                position 1;
+            }
+            bit auth {
+                description "Authentication header present.";
+                position 2;
+            }
+            bit dest {
+                description "1 or 2 dest headers present.";
+                position 3;
+            }
+            bit frag {
+                description "Fragment header present.";
+                position 4;
+            }
+            bit router {
+                description "Router header present.";
+                position 5;
+            }
+            bit hop {
+                description "Hop-by-hop header present.";
+                position 6;
+            }
+            bit unrep {
+                description "Unexpected repeats encountered.";
+                position 7;
+            }
+            bit unseq {
+                description "Unexpected sequencing encountered.";
+                position 8;
+            }
+        }
+    }
+    
 // OPENFLOW v1.0 STRUCTURES
     // Structures under this line are needed to support OpenFlow version 1.0 
     // wire protocol 0x01;
@@ -1540,7 +1589,7 @@ module openflow-types {
             enum LOCAL {
                 value 65534; // 0xfffe
             }
-            enum ANY {
+            enum NONE {
                 value 65535; // 0xffff
             }
         }
@@ -1601,24 +1650,19 @@ module openflow-types {
                 position 2;
             }
             bit stp_listen {
-                //description "Live for Fast Failover Group.";
-                position 8;
+                //description "Not learning or relaying frames.";
             }
             bit stp_learn {
-                //description "Live for Fast Failover Group.";
-                position 8;
+                //description "Learning but not relaying frames.";
             }
             bit stp_forward {
-                //description "Live for Fast Failover Group.";
-                position 8;
+                //description "Learning and relaying frames.";
             }
             bit stp_block {
-                //description "Live for Fast Failover Group.";
-                position 8;
+                //description "Not part of spanning tree.";
             }
             bit stp_mask {
-                //description "Live for Fast Failover Group.";
-                position 8;
+                //description "Bit mask for OFPPS_STP_* values.";
             }
         }
     }
@@ -1627,31 +1671,31 @@ module openflow-types {
         ////description "Features of ports available in datapath.";
         //reference "ofp_port_features";
         type bits {
-            bit 10mb-hd { 
+            bit _10mb-hd { 
                 position 0;
                 //description "10 Mb half-duplex rate support.";
             }
-            bit 10mb-fd { 
+            bit _10mb-fd { 
                 position 1;
                 //description "10 Mb full-duplex rate support.";
             }
-            bit 100mb-hd { 
+            bit _100mb-hd { 
                 position 2;
                 //description "100 Mb half-duplex rate support.";
             }
-            bit 100mb-fd { 
+            bit _100mb-fd { 
                 position 3;
                 //description "100 Mb full-duplex rate support.";
             }
-            bit 1gb-hd { 
+            bit _1gb-hd { 
                 position 4;
                 //description "1 Gb half-duplex rate support.";
             }
-            bit 1gb-fd { 
+            bit _1gb-fd { 
                 position 5;
                 //description "1 Gb full-duplex rate support.";
             }
-            bit 10gb-fd { 
+            bit _10gb-fd { 
                 position 6;
                 //description "10 Gb full-duplex rate support.";
             }
@@ -1796,47 +1840,33 @@ module openflow-types {
         type bits {
             bit IN_PORT {
                 position 0;
-                /* Switch input port. */
             }
             bit DL_VLAN {
                 position 1;
-                /* Switch input port. */
             }
             bit DL_SRC {
                 position 2;
-                /* Switch input port. */
             }
             bit DL_DST {
                 position 3;
-                /* Switch input port. */
             }
             bit DL_TYPE {
                 position 4;
-                /* Switch input port. */
             }
             bit NW_PROTO {
                 position 5;
-                /* Switch input port. */
             }
             bit TP_SRC {
                 position 6;
-                /* Switch input port. */
             }
             bit TP_DST {
                 position 7;
-                /* Switch input port. */
             }
             bit DL_VLAN_PCP {
                 position 20;
-                /* Switch input port. */
             }
             bit NW_TOS {
                 position 21;
-                /* Switch input port. */
-            }
-            bit ALL {
-                position 22;
-                /* Switch input port. */
             }
         }
     }