Add getChecksum() to the AD-SAL TCP class
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / packet / TCP.java
index 4b2badd92db8baa5cde25a3dbb8a7e2f40d9967a..8253ac46d3f5405ace57da8022be90a183645a68 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)));
+    }
+
 }