test_class.declarator: pktSerialized = new byte[] { 0x45, 0x20,
              0x00, 0x34, 0x1d, (byte) 0x85, 0x00, 0x00, 0x32, 0x06,
              0x31, 0x1e, 0x4a, 0x7d, 0x2d, 0x6d, (byte) 0xc0, (byte) 0xa8,
              0x01, 0x6f, 0x03, (byte) 0xe1, (byte) 0xc0, 0x32, (byte) 0xe3, (byte) 0xad,
              (byte) 0xee, (byte) 0x88, (byte) 0xb7, (byte) 0xda, (byte) 0xd8, 0x24, (byte) 0x80, 0x10,
              0x01, 0x0b, 0x59, 0x33, 0x00, 0x00, 0x01, 0x01,
              0x08, 0x0a, 0x20, (byte) 0x9a, 0x41, 0x04, 0x07, 0x76,
              0x53, 0x1f}
test_class.modifier: private
test_class.original_string: private byte[] pktSerialized = new byte[] { 0x45, 0x20,
              0x00, 0x34, 0x1d, (byte) 0x85, 0x00, 0x00, 0x32, 0x06,
              0x31, 0x1e, 0x4a, 0x7d, 0x2d, 0x6d, (byte) 0xc0, (byte) 0xa8,
              0x01, 0x6f, 0x03, (byte) 0xe1, (byte) 0xc0, 0x32, (byte) 0xe3, (byte) 0xad,
              (byte) 0xee, (byte) 0x88, (byte) 0xb7, (byte) 0xda, (byte) 0xd8, 0x24, (byte) 0x80, 0x10,
              0x01, 0x0b, 0x59, 0x33, 0x00, 0x00, 0x01, 0x01,
              0x08, 0x0a, 0x20, (byte) 0x9a, 0x41, 0x04, 0x07, 0x76,
              0x53, 0x1f};
test_class.type: byte[]
test_class.var_name: pktSerialized
test_class.file: src/agents/apps/floodlight/floodlight-1.0/src/test/java/net/floodlightcontroller/packet/TCPTest.java
test_class.identifier: TCPTest
test_case.body: @Test
      public void testDeserialize() throws PacketParsingException {
          IPacket packet = new IPv4();
          packet.deserialize(pktSerialized, 0, pktSerialized.length);
          byte[] pktSerialized1 = packet.serialize();
          assertTrue(Arrays.equals(pktSerialized, pktSerialized1));
      }
test_case.class_method_signature: TCPTest.testDeserialize()
test_case.full_signature: @Test public void testDeserialize()
test_case.identifier: testDeserialize
test_case.invocations: deserialize serialize assertTrue equals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDeserialize()
focal_class.declarator: sourcePort
focal_class.modifier: protected
focal_class.original_string: protected TransportPort sourcePort;
focal_class.type: TransportPort
focal_class.var_name: sourcePort
focal_class.declarator: destinationPort
focal_class.modifier: protected
focal_class.original_string: protected TransportPort destinationPort;
focal_class.type: TransportPort
focal_class.var_name: destinationPort
focal_class.declarator: sequence
focal_class.modifier: protected
focal_class.original_string: protected int sequence;
focal_class.type: int
focal_class.var_name: sequence
focal_class.declarator: acknowledge
focal_class.modifier: protected
focal_class.original_string: protected int acknowledge;
focal_class.type: int
focal_class.var_name: acknowledge
focal_class.declarator: dataOffset
focal_class.modifier: protected
focal_class.original_string: protected byte dataOffset;
focal_class.type: byte
focal_class.var_name: dataOffset
focal_class.declarator: flags
focal_class.modifier: protected
focal_class.original_string: protected short flags;
focal_class.type: short
focal_class.var_name: flags
focal_class.declarator: windowSize
focal_class.modifier: protected
focal_class.original_string: protected short windowSize;
focal_class.type: short
focal_class.var_name: windowSize
focal_class.declarator: checksum
focal_class.modifier: protected
focal_class.original_string: protected short checksum;
focal_class.type: short
focal_class.var_name: checksum
focal_class.declarator: urgentPointer
focal_class.modifier: protected
focal_class.original_string: protected short urgentPointer;
focal_class.type: short
focal_class.var_name: urgentPointer
focal_class.declarator: options
focal_class.modifier: protected
focal_class.original_string: protected byte[] options;
focal_class.type: byte[]
focal_class.var_name: options
focal_class.file: src/agents/apps/floodlight/floodlight-1.0/src/main/java/net/floodlightcontroller/packet/TCP.java
focal_class.identifier: TCP
focal_class.class_method_signature: TCP.getSourcePort()
focal_class.full_signature: public TransportPort getSourcePort()
focal_class.identifier: getSourcePort
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: TransportPort
focal_class.signature: TransportPort getSourcePort()
focal_class.class_method_signature: TCP.setSourcePort(TransportPort sourcePort)
focal_class.full_signature: public TCP setSourcePort(TransportPort sourcePort)
focal_class.identifier: setSourcePort
focal_class.modifiers: public
focal_class.parameters: (TransportPort sourcePort)
focal_class.return: TCP
focal_class.signature: TCP setSourcePort(TransportPort sourcePort)
focal_class.class_method_signature: TCP.setSourcePort(int sourcePort)
focal_class.full_signature: public TCP setSourcePort(int sourcePort)
focal_class.identifier: setSourcePort
focal_class.modifiers: public
focal_class.parameters: (int sourcePort)
focal_class.return: TCP
focal_class.signature: TCP setSourcePort(int sourcePort)
focal_class.class_method_signature: TCP.getDestinationPort()
focal_class.full_signature: public TransportPort getDestinationPort()
focal_class.identifier: getDestinationPort
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: TransportPort
focal_class.signature: TransportPort getDestinationPort()
focal_class.class_method_signature: TCP.setDestinationPort(TransportPort destinationPort)
focal_class.full_signature: public TCP setDestinationPort(TransportPort destinationPort)
focal_class.identifier: setDestinationPort
focal_class.modifiers: public
focal_class.parameters: (TransportPort destinationPort)
focal_class.return: TCP
focal_class.signature: TCP setDestinationPort(TransportPort destinationPort)
focal_class.class_method_signature: TCP.setDestinationPort(int destinationPort)
focal_class.full_signature: public TCP setDestinationPort(int destinationPort)
focal_class.identifier: setDestinationPort
focal_class.modifiers: public
focal_class.parameters: (int destinationPort)
focal_class.return: TCP
focal_class.signature: TCP setDestinationPort(int destinationPort)
focal_class.class_method_signature: TCP.getChecksum()
focal_class.full_signature: public short getChecksum()
focal_class.identifier: getChecksum
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: short
focal_class.signature: short getChecksum()
focal_class.class_method_signature: TCP.getSequence()
focal_class.full_signature: public int getSequence()
focal_class.identifier: getSequence
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getSequence()
focal_class.class_method_signature: TCP.setSequence(int seq)
focal_class.full_signature: public TCP setSequence(int seq)
focal_class.identifier: setSequence
focal_class.modifiers: public
focal_class.parameters: (int seq)
focal_class.return: TCP
focal_class.signature: TCP setSequence(int seq)
focal_class.class_method_signature: TCP.getAcknowledge()
focal_class.full_signature: public int getAcknowledge()
focal_class.identifier: getAcknowledge
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getAcknowledge()
focal_class.class_method_signature: TCP.setAcknowledge(int ack)
focal_class.full_signature: public TCP setAcknowledge(int ack)
focal_class.identifier: setAcknowledge
focal_class.modifiers: public
focal_class.parameters: (int ack)
focal_class.return: TCP
focal_class.signature: TCP setAcknowledge(int ack)
focal_class.class_method_signature: TCP.getDataOffset()
focal_class.full_signature: public byte getDataOffset()
focal_class.identifier: getDataOffset
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: byte
focal_class.signature: byte getDataOffset()
focal_class.class_method_signature: TCP.setDataOffset(byte offset)
focal_class.full_signature: public TCP setDataOffset(byte offset)
focal_class.identifier: setDataOffset
focal_class.modifiers: public
focal_class.parameters: (byte offset)
focal_class.return: TCP
focal_class.signature: TCP setDataOffset(byte offset)
focal_class.class_method_signature: TCP.getFlags()
focal_class.full_signature: public short getFlags()
focal_class.identifier: getFlags
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: short
focal_class.signature: short getFlags()
focal_class.class_method_signature: TCP.setFlags(short flags)
focal_class.full_signature: public TCP setFlags(short flags)
focal_class.identifier: setFlags
focal_class.modifiers: public
focal_class.parameters: (short flags)
focal_class.return: TCP
focal_class.signature: TCP setFlags(short flags)
focal_class.class_method_signature: TCP.getWindowSize()
focal_class.full_signature: public short getWindowSize()
focal_class.identifier: getWindowSize
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: short
focal_class.signature: short getWindowSize()
focal_class.class_method_signature: TCP.setWindowSize(short windowSize)
focal_class.full_signature: public TCP setWindowSize(short windowSize)
focal_class.identifier: setWindowSize
focal_class.modifiers: public
focal_class.parameters: (short windowSize)
focal_class.return: TCP
focal_class.signature: TCP setWindowSize(short windowSize)
focal_class.class_method_signature: TCP.getTcpChecksum()
focal_class.full_signature: public short getTcpChecksum()
focal_class.identifier: getTcpChecksum
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: short
focal_class.signature: short getTcpChecksum()
focal_class.class_method_signature: TCP.setTcpChecksum(short checksum)
focal_class.full_signature: public TCP setTcpChecksum(short checksum)
focal_class.identifier: setTcpChecksum
focal_class.modifiers: public
focal_class.parameters: (short checksum)
focal_class.return: TCP
focal_class.signature: TCP setTcpChecksum(short checksum)
focal_class.class_method_signature: TCP.resetChecksum()
focal_class.full_signature: @Override public void resetChecksum()
focal_class.identifier: resetChecksum
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void resetChecksum()
focal_class.class_method_signature: TCP.getUrgentPointer(short urgentPointer)
focal_class.full_signature: public short getUrgentPointer(short urgentPointer)
focal_class.identifier: getUrgentPointer
focal_class.modifiers: public
focal_class.parameters: (short urgentPointer)
focal_class.return: short
focal_class.signature: short getUrgentPointer(short urgentPointer)
focal_class.class_method_signature: TCP.setUrgentPointer(short urgentPointer)
focal_class.full_signature: public TCP setUrgentPointer(short urgentPointer)
focal_class.identifier: setUrgentPointer
focal_class.modifiers: public
focal_class.parameters: (short urgentPointer)
focal_class.return: TCP
focal_class.signature: TCP setUrgentPointer(short urgentPointer)
focal_class.class_method_signature: TCP.getOptions()
focal_class.full_signature: public byte[] getOptions()
focal_class.identifier: getOptions
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: byte[]
focal_class.signature: byte[] getOptions()
focal_class.class_method_signature: TCP.setOptions(byte[] options)
focal_class.full_signature: public TCP setOptions(byte[] options)
focal_class.identifier: setOptions
focal_class.modifiers: public
focal_class.parameters: (byte[] options)
focal_class.return: TCP
focal_class.signature: TCP setOptions(byte[] options)
focal_class.class_method_signature: TCP.setChecksum(short checksum)
focal_class.full_signature: public TCP setChecksum(short checksum)
focal_class.identifier: setChecksum
focal_class.modifiers: public
focal_class.parameters: (short checksum)
focal_class.return: TCP
focal_class.signature: TCP setChecksum(short checksum)
focal_class.class_method_signature: TCP.serialize()
focal_class.full_signature: public byte[] serialize()
focal_class.identifier: serialize
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: byte[]
focal_class.signature: byte[] serialize()
focal_class.class_method_signature: TCP.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: TCP.equals(Object obj)
focal_class.full_signature: @Override public boolean equals(Object obj)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object obj)
focal_class.return: boolean
focal_class.signature: boolean equals(Object obj)
focal_class.class_method_signature: TCP.deserialize(byte[] data, int offset, int length)
focal_class.full_signature: @Override public IPacket deserialize(byte[] data, int offset, int length)
focal_class.identifier: deserialize
focal_class.modifiers: @Override public
focal_class.parameters: (byte[] data, int offset, int length)
focal_class.return: IPacket
focal_class.signature: IPacket deserialize(byte[] data, int offset, int length)
focal_class.superclass: extends BasePacket
focal_method.body: @Override
      public IPacket deserialize(byte[] data, int offset, int length)
              throws PacketParsingException {
          ByteBuffer bb = ByteBuffer.wrap(data, offset, length);
          this.sourcePort = TransportPort.of((int) (bb.getShort() & 0xffff)); // short will be signed, pos or neg
          this.destinationPort = TransportPort.of((int) (bb.getShort() & 0xffff)); // convert range 0 to 65534, not -32768 to 32767
          this.sequence = bb.getInt();
          this.acknowledge = bb.getInt();
          this.flags = bb.getShort();
          this.dataOffset = (byte) ((this.flags >> 12) & 0xf);
          if (this.dataOffset < 5) {
              throw new PacketParsingException("Invalid tcp header length < 20");
          }
          this.flags = (short) (this.flags & 0x1ff);
          this.windowSize = bb.getShort();
          this.checksum = bb.getShort();
          this.urgentPointer = bb.getShort();
          if (this.dataOffset > 5) {
              int optLength = (dataOffset << 2) - 20;
              if (bb.limit() < bb.position()+optLength) {
                  optLength = bb.limit() - bb.position();
              }
              try {
                  this.options = new byte[optLength];
                  bb.get(this.options, 0, optLength);
              } catch (IndexOutOfBoundsException e) {
                  this.options = null;
              }
          }
  
          this.payload = new Data();
          int remLength = bb.limit()-bb.position();
          this.payload = payload.deserialize(data, bb.position(), remLength);
          this.payload.setParent(this);
          return this;
      }
focal_method.class_method_signature: TCP.deserialize(byte[] data, int offset, int length)
focal_method.full_signature: @Override public IPacket deserialize(byte[] data, int offset, int length)
focal_method.identifier: deserialize
focal_method.invocations: wrap of getShort of getShort getInt getInt getShort getShort getShort getShort limit position limit position get limit position deserialize position setParent
focal_method.modifiers: @Override public
focal_method.parameters: (byte[] data, int offset, int length)
focal_method.return: IPacket
focal_method.signature: IPacket deserialize(byte[] data, int offset, int length)