OFPortDesc: add convenience method to access BsnPortGenerationId
diff --git a/java_gen/templates/custom/interface/OFPortDesc.java b/java_gen/templates/custom/interface/OFPortDesc.java
index ecf39f3..247464d 100644
--- a/java_gen/templates/custom/interface/OFPortDesc.java
+++ b/java_gen/templates/custom/interface/OFPortDesc.java
@@ -1,2 +1,23 @@
- // Additional method
- boolean isEnabled();
\ No newline at end of file
+ // Additional methods
+
+ /**
+ * Returns true if the port is up, i.e., it's neither administratively
+ * down nor link down. It currently does NOT take STP state into
+ * consideration
+ * @return whether the port is up
+ */
+ boolean isEnabled();
+
+ /**
+ * Returns the current generation ID of this port.
+ *
+ * The generationId is reported by the switch as a @{link OFPortDescProp} in
+ * @link{OFPortDescStatsReply} and @link{OFPortStatus} messages. If the
+ * current OFPortDesc does not contain a generation Id, returns U64.ZERO;
+ *
+ * For OpenFlow versions earlier than 1.4, always returns U64.ZERO;
+ *
+ * @return the generation ID or U64.ZERO if not reported
+ * @since 1.4
+ */
+ public U64 getBsnGenerationId();