Add getChecksum() to the AD-SAL TCP class
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / packet / TCP.java
index 4b2badd..8253ac4 100644 (file)
@@ -230,4 +230,12 @@ public class TCP extends Packet {
         return (BitBufferHelper.getShort(fieldValues.get(DESTPORT)));
     }
 
+    /**
+     * Get the stored checksum value of the TCP header
+     * @return short - the checksum
+     */
+    public short getChecksum() {
+        return (BitBufferHelper.getShort(fieldValues.get(CHECKSUM)));
+    }
+
 }