ir: add enum_by_name to OFProtocol
diff --git a/loxi_ir.py b/loxi_ir.py
index 4176303..a70f041 100644
--- a/loxi_ir.py
+++ b/loxi_ir.py
@@ -66,6 +66,9 @@
     def class_by_name(self, name):
         return find(lambda ofclass: ofclass.name == name, self.classes)
 
+    def enum_by_name(self, name):
+        return find(lambda enum: enum.name == name, self.enums)
+
 """
 An OpenFlow class