test_class.declarator: pktSerialized = 
              new byte[] { 0x45, 0x00,
                           0x00, 0x2e, 0x41, (byte) 0xbe, 0x40, 0x00, 0x40, 0x06,
                           (byte) 0xd4, (byte) 0xf0, (byte) 0xc0, (byte) 0xa8, 
                           0x02, (byte) 0xdb, (byte) 0xd0, 0x55,
                           (byte) 0x90, 0x42, (byte) 0xd5, 0x48, 0x01, (byte) 
                           0xbb, (byte) 0xe3, 0x50,
                           (byte) 0xb2, 0x2f, (byte) 0xfc, (byte) 0xf8, 
                           (byte) 0xa8, 0x2c, 0x50, 0x18,
                           (byte) 0xff, (byte) 0xff, 0x24, 0x3c, 0x00, 
                           0x00, 0x14, 0x03,
                           0x01, 0x00, 0x01, 0x01
      }
test_class.original_string: byte[] pktSerialized = 
              new byte[] { 0x45, 0x00,
                           0x00, 0x2e, 0x41, (byte) 0xbe, 0x40, 0x00, 0x40, 0x06,
                           (byte) 0xd4, (byte) 0xf0, (byte) 0xc0, (byte) 0xa8, 
                           0x02, (byte) 0xdb, (byte) 0xd0, 0x55,
                           (byte) 0x90, 0x42, (byte) 0xd5, 0x48, 0x01, (byte) 
                           0xbb, (byte) 0xe3, 0x50,
                           (byte) 0xb2, 0x2f, (byte) 0xfc, (byte) 0xf8, 
                           (byte) 0xa8, 0x2c, 0x50, 0x18,
                           (byte) 0xff, (byte) 0xff, 0x24, 0x3c, 0x00, 
                           0x00, 0x14, 0x03,
                           0x01, 0x00, 0x01, 0x01
      };
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/IPv4Test.java
test_class.identifier: IPv4Test
test_case.body: @Test
      public void testToIPv4Address() {
          int intIp = 0xc0a80001;
          String stringIp = "192.168.0.1";
          byte[] byteIp = new byte[] {(byte)192, (byte)168, (byte)0, (byte)1};
          assertEquals(intIp, IPv4.toIPv4Address(stringIp));
          assertEquals(intIp, IPv4.toIPv4Address(byteIp));
          assertTrue(Arrays.equals(byteIp, IPv4.toIPv4AddressBytes(intIp)));
          assertTrue(Arrays.equals(byteIp, IPv4.toIPv4AddressBytes(stringIp)));
      }
test_case.class_method_signature: IPv4Test.testToIPv4Address()
test_case.full_signature: @Test public void testToIPv4Address()
test_case.identifier: testToIPv4Address
test_case.invocations: assertEquals toIPv4Address assertEquals toIPv4Address assertTrue equals toIPv4AddressBytes assertTrue equals toIPv4AddressBytes
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testToIPv4Address()
focal_class.declarator: protocolClassMap
focal_class.modifier: public static
focal_class.original_string: public static Map<IpProtocol, Class<? extends IPacket>> protocolClassMap;
focal_class.type: Map<IpProtocol, Class<? extends IPacket>>
focal_class.var_name: protocolClassMap
focal_class.declarator: IPV4_FLAGS_MOREFRAG = 0x1
focal_class.modifier: public static final
focal_class.original_string: public static final byte IPV4_FLAGS_MOREFRAG = 0x1;
focal_class.type: byte
focal_class.var_name: IPV4_FLAGS_MOREFRAG
focal_class.declarator: IPV4_FLAGS_DONTFRAG = 0x2
focal_class.modifier: public static final
focal_class.original_string: public static final byte IPV4_FLAGS_DONTFRAG = 0x2;
focal_class.type: byte
focal_class.var_name: IPV4_FLAGS_DONTFRAG
focal_class.declarator: IPV4_FLAGS_MASK = 0x7
focal_class.modifier: public static final
focal_class.original_string: public static final byte IPV4_FLAGS_MASK = 0x7;
focal_class.type: byte
focal_class.var_name: IPV4_FLAGS_MASK
focal_class.declarator: IPV4_FLAGS_SHIFT = 13
focal_class.modifier: public static final
focal_class.original_string: public static final byte IPV4_FLAGS_SHIFT = 13;
focal_class.type: byte
focal_class.var_name: IPV4_FLAGS_SHIFT
focal_class.declarator: IPV4_OFFSET_MASK = (1 << IPV4_FLAGS_SHIFT) - 1
focal_class.modifier: public static final
focal_class.original_string: public static final short IPV4_OFFSET_MASK = (1 << IPV4_FLAGS_SHIFT) - 1;
focal_class.type: short
focal_class.var_name: IPV4_OFFSET_MASK
focal_class.declarator: version
focal_class.modifier: protected
focal_class.original_string: protected byte version;
focal_class.type: byte
focal_class.var_name: version
focal_class.declarator: headerLength
focal_class.modifier: protected
focal_class.original_string: protected byte headerLength;
focal_class.type: byte
focal_class.var_name: headerLength
focal_class.declarator: diffServ
focal_class.modifier: protected
focal_class.original_string: protected byte diffServ;
focal_class.type: byte
focal_class.var_name: diffServ
focal_class.declarator: totalLength
focal_class.modifier: protected
focal_class.original_string: protected short totalLength;
focal_class.type: short
focal_class.var_name: totalLength
focal_class.declarator: identification
focal_class.modifier: protected
focal_class.original_string: protected short identification;
focal_class.type: short
focal_class.var_name: identification
focal_class.declarator: flags
focal_class.modifier: protected
focal_class.original_string: protected byte flags;
focal_class.type: byte
focal_class.var_name: flags
focal_class.declarator: fragmentOffset
focal_class.modifier: protected
focal_class.original_string: protected short fragmentOffset;
focal_class.type: short
focal_class.var_name: fragmentOffset
focal_class.declarator: ttl
focal_class.modifier: protected
focal_class.original_string: protected byte ttl;
focal_class.type: byte
focal_class.var_name: ttl
focal_class.declarator: protocol
focal_class.modifier: protected
focal_class.original_string: protected IpProtocol protocol;
focal_class.type: IpProtocol
focal_class.var_name: protocol
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: sourceAddress
focal_class.modifier: protected
focal_class.original_string: protected IPv4Address sourceAddress;
focal_class.type: IPv4Address
focal_class.var_name: sourceAddress
focal_class.declarator: destinationAddress
focal_class.modifier: protected
focal_class.original_string: protected IPv4Address destinationAddress;
focal_class.type: IPv4Address
focal_class.var_name: destinationAddress
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.declarator: isTruncated
focal_class.modifier: protected
focal_class.original_string: protected boolean isTruncated;
focal_class.type: boolean
focal_class.var_name: isTruncated
focal_class.declarator: isFragment
focal_class.modifier: protected
focal_class.original_string: protected boolean isFragment;
focal_class.type: boolean
focal_class.var_name: isFragment
focal_class.file: src/agents/apps/floodlight/floodlight-1.0/src/main/java/net/floodlightcontroller/packet/IPv4.java
focal_class.identifier: IPv4
focal_class.class_method_signature: IPv4.IPv4()
focal_class.full_signature: public  IPv4()
focal_class.identifier: IPv4
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  IPv4()
focal_class.class_method_signature: IPv4.getVersion()
focal_class.full_signature: public byte getVersion()
focal_class.identifier: getVersion
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: byte
focal_class.signature: byte getVersion()
focal_class.class_method_signature: IPv4.setVersion(byte version)
focal_class.full_signature: public IPv4 setVersion(byte version)
focal_class.identifier: setVersion
focal_class.modifiers: public
focal_class.parameters: (byte version)
focal_class.return: IPv4
focal_class.signature: IPv4 setVersion(byte version)
focal_class.class_method_signature: IPv4.getHeaderLength()
focal_class.full_signature: public byte getHeaderLength()
focal_class.identifier: getHeaderLength
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: byte
focal_class.signature: byte getHeaderLength()
focal_class.class_method_signature: IPv4.getDiffServ()
focal_class.full_signature: public byte getDiffServ()
focal_class.identifier: getDiffServ
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: byte
focal_class.signature: byte getDiffServ()
focal_class.class_method_signature: IPv4.setDiffServ(byte diffServ)
focal_class.full_signature: public IPv4 setDiffServ(byte diffServ)
focal_class.identifier: setDiffServ
focal_class.modifiers: public
focal_class.parameters: (byte diffServ)
focal_class.return: IPv4
focal_class.signature: IPv4 setDiffServ(byte diffServ)
focal_class.class_method_signature: IPv4.getTotalLength()
focal_class.full_signature: public short getTotalLength()
focal_class.identifier: getTotalLength
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: short
focal_class.signature: short getTotalLength()
focal_class.class_method_signature: IPv4.getIdentification()
focal_class.full_signature: public short getIdentification()
focal_class.identifier: getIdentification
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: short
focal_class.signature: short getIdentification()
focal_class.class_method_signature: IPv4.isTruncated()
focal_class.full_signature: public boolean isTruncated()
focal_class.identifier: isTruncated
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isTruncated()
focal_class.class_method_signature: IPv4.setTruncated(boolean isTruncated)
focal_class.full_signature: public void setTruncated(boolean isTruncated)
focal_class.identifier: setTruncated
focal_class.modifiers: public
focal_class.parameters: (boolean isTruncated)
focal_class.return: void
focal_class.signature: void setTruncated(boolean isTruncated)
focal_class.class_method_signature: IPv4.isFragment()
focal_class.full_signature: public boolean isFragment()
focal_class.identifier: isFragment
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isFragment()
focal_class.class_method_signature: IPv4.setFragment(boolean isFrag)
focal_class.full_signature: public void setFragment(boolean isFrag)
focal_class.identifier: setFragment
focal_class.modifiers: public
focal_class.parameters: (boolean isFrag)
focal_class.return: void
focal_class.signature: void setFragment(boolean isFrag)
focal_class.class_method_signature: IPv4.setIdentification(short identification)
focal_class.full_signature: public IPv4 setIdentification(short identification)
focal_class.identifier: setIdentification
focal_class.modifiers: public
focal_class.parameters: (short identification)
focal_class.return: IPv4
focal_class.signature: IPv4 setIdentification(short identification)
focal_class.class_method_signature: IPv4.getFlags()
focal_class.full_signature: public byte getFlags()
focal_class.identifier: getFlags
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: byte
focal_class.signature: byte getFlags()
focal_class.class_method_signature: IPv4.setFlags(byte flags)
focal_class.full_signature: public IPv4 setFlags(byte flags)
focal_class.identifier: setFlags
focal_class.modifiers: public
focal_class.parameters: (byte flags)
focal_class.return: IPv4
focal_class.signature: IPv4 setFlags(byte flags)
focal_class.class_method_signature: IPv4.getFragmentOffset()
focal_class.full_signature: public short getFragmentOffset()
focal_class.identifier: getFragmentOffset
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: short
focal_class.signature: short getFragmentOffset()
focal_class.class_method_signature: IPv4.setFragmentOffset(short fragmentOffset)
focal_class.full_signature: public IPv4 setFragmentOffset(short fragmentOffset)
focal_class.identifier: setFragmentOffset
focal_class.modifiers: public
focal_class.parameters: (short fragmentOffset)
focal_class.return: IPv4
focal_class.signature: IPv4 setFragmentOffset(short fragmentOffset)
focal_class.class_method_signature: IPv4.getTtl()
focal_class.full_signature: public byte getTtl()
focal_class.identifier: getTtl
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: byte
focal_class.signature: byte getTtl()
focal_class.class_method_signature: IPv4.setTtl(byte ttl)
focal_class.full_signature: public IPv4 setTtl(byte ttl)
focal_class.identifier: setTtl
focal_class.modifiers: public
focal_class.parameters: (byte ttl)
focal_class.return: IPv4
focal_class.signature: IPv4 setTtl(byte ttl)
focal_class.class_method_signature: IPv4.getProtocol()
focal_class.full_signature: public IpProtocol getProtocol()
focal_class.identifier: getProtocol
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: IpProtocol
focal_class.signature: IpProtocol getProtocol()
focal_class.class_method_signature: IPv4.setProtocol(IpProtocol protocol)
focal_class.full_signature: public IPv4 setProtocol(IpProtocol protocol)
focal_class.identifier: setProtocol
focal_class.modifiers: public
focal_class.parameters: (IpProtocol protocol)
focal_class.return: IPv4
focal_class.signature: IPv4 setProtocol(IpProtocol protocol)
focal_class.class_method_signature: IPv4.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: IPv4.setChecksum(short checksum)
focal_class.full_signature: public IPv4 setChecksum(short checksum)
focal_class.identifier: setChecksum
focal_class.modifiers: public
focal_class.parameters: (short checksum)
focal_class.return: IPv4
focal_class.signature: IPv4 setChecksum(short checksum)
focal_class.class_method_signature: IPv4.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: IPv4.getSourceAddress()
focal_class.full_signature: public IPv4Address getSourceAddress()
focal_class.identifier: getSourceAddress
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: IPv4Address
focal_class.signature: IPv4Address getSourceAddress()
focal_class.class_method_signature: IPv4.setSourceAddress(IPv4Address sourceAddress)
focal_class.full_signature: public IPv4 setSourceAddress(IPv4Address sourceAddress)
focal_class.identifier: setSourceAddress
focal_class.modifiers: public
focal_class.parameters: (IPv4Address sourceAddress)
focal_class.return: IPv4
focal_class.signature: IPv4 setSourceAddress(IPv4Address sourceAddress)
focal_class.class_method_signature: IPv4.setSourceAddress(int sourceAddress)
focal_class.full_signature: public IPv4 setSourceAddress(int sourceAddress)
focal_class.identifier: setSourceAddress
focal_class.modifiers: public
focal_class.parameters: (int sourceAddress)
focal_class.return: IPv4
focal_class.signature: IPv4 setSourceAddress(int sourceAddress)
focal_class.class_method_signature: IPv4.setSourceAddress(String sourceAddress)
focal_class.full_signature: public IPv4 setSourceAddress(String sourceAddress)
focal_class.identifier: setSourceAddress
focal_class.modifiers: public
focal_class.parameters: (String sourceAddress)
focal_class.return: IPv4
focal_class.signature: IPv4 setSourceAddress(String sourceAddress)
focal_class.class_method_signature: IPv4.getDestinationAddress()
focal_class.full_signature: public IPv4Address getDestinationAddress()
focal_class.identifier: getDestinationAddress
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: IPv4Address
focal_class.signature: IPv4Address getDestinationAddress()
focal_class.class_method_signature: IPv4.setDestinationAddress(IPv4Address destinationAddress)
focal_class.full_signature: public IPv4 setDestinationAddress(IPv4Address destinationAddress)
focal_class.identifier: setDestinationAddress
focal_class.modifiers: public
focal_class.parameters: (IPv4Address destinationAddress)
focal_class.return: IPv4
focal_class.signature: IPv4 setDestinationAddress(IPv4Address destinationAddress)
focal_class.class_method_signature: IPv4.setDestinationAddress(int destinationAddress)
focal_class.full_signature: public IPv4 setDestinationAddress(int destinationAddress)
focal_class.identifier: setDestinationAddress
focal_class.modifiers: public
focal_class.parameters: (int destinationAddress)
focal_class.return: IPv4
focal_class.signature: IPv4 setDestinationAddress(int destinationAddress)
focal_class.class_method_signature: IPv4.setDestinationAddress(String destinationAddress)
focal_class.full_signature: public IPv4 setDestinationAddress(String destinationAddress)
focal_class.identifier: setDestinationAddress
focal_class.modifiers: public
focal_class.parameters: (String destinationAddress)
focal_class.return: IPv4
focal_class.signature: IPv4 setDestinationAddress(String destinationAddress)
focal_class.class_method_signature: IPv4.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: IPv4.setOptions(byte[] options)
focal_class.full_signature: public IPv4 setOptions(byte[] options)
focal_class.identifier: setOptions
focal_class.modifiers: public
focal_class.parameters: (byte[] options)
focal_class.return: IPv4
focal_class.signature: IPv4 setOptions(byte[] options)
focal_class.class_method_signature: IPv4.serialize()
focal_class.full_signature: @Override public byte[] serialize()
focal_class.identifier: serialize
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: byte[]
focal_class.signature: byte[] serialize()
focal_class.class_method_signature: IPv4.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.class_method_signature: IPv4.toIPv4Address(String ipAddress)
focal_class.full_signature: public static int toIPv4Address(String ipAddress)
focal_class.identifier: toIPv4Address
focal_class.modifiers: public static
focal_class.parameters: (String ipAddress)
focal_class.return: int
focal_class.signature: int toIPv4Address(String ipAddress)
focal_class.class_method_signature: IPv4.toIPv4Address(byte[] ipAddress)
focal_class.full_signature: public static int toIPv4Address(byte[] ipAddress)
focal_class.identifier: toIPv4Address
focal_class.modifiers: public static
focal_class.parameters: (byte[] ipAddress)
focal_class.return: int
focal_class.signature: int toIPv4Address(byte[] ipAddress)
focal_class.class_method_signature: IPv4.fromIPv4Address(int ipAddress)
focal_class.full_signature: public static String fromIPv4Address(int ipAddress)
focal_class.identifier: fromIPv4Address
focal_class.modifiers: public static
focal_class.parameters: (int ipAddress)
focal_class.return: String
focal_class.signature: String fromIPv4Address(int ipAddress)
focal_class.class_method_signature: IPv4.fromIPv4AddressCollection(Collection<Integer> ipAddresses)
focal_class.full_signature: public static String fromIPv4AddressCollection(Collection<Integer> ipAddresses)
focal_class.identifier: fromIPv4AddressCollection
focal_class.modifiers: public static
focal_class.parameters: (Collection<Integer> ipAddresses)
focal_class.return: String
focal_class.signature: String fromIPv4AddressCollection(Collection<Integer> ipAddresses)
focal_class.class_method_signature: IPv4.toIPv4AddressBytes(String ipAddress)
focal_class.full_signature: public static byte[] toIPv4AddressBytes(String ipAddress)
focal_class.identifier: toIPv4AddressBytes
focal_class.modifiers: public static
focal_class.parameters: (String ipAddress)
focal_class.return: byte[]
focal_class.signature: byte[] toIPv4AddressBytes(String ipAddress)
focal_class.class_method_signature: IPv4.toIPv4AddressBytes(int ipAddress)
focal_class.full_signature: public static byte[] toIPv4AddressBytes(int ipAddress)
focal_class.identifier: toIPv4AddressBytes
focal_class.modifiers: public static
focal_class.parameters: (int ipAddress)
focal_class.return: byte[]
focal_class.signature: byte[] toIPv4AddressBytes(int ipAddress)
focal_class.class_method_signature: IPv4.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: IPv4.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.superclass: extends BasePacket
focal_method.body: public static int toIPv4Address(String ipAddress) {
          if (ipAddress == null)
              throw new IllegalArgumentException("Specified IPv4 address must" +
                  "contain 4 sets of numerical digits separated by periods");
          String[] octets = ipAddress.split("\\.");
          if (octets.length != 4)
              throw new IllegalArgumentException("Specified IPv4 address must" +
                  "contain 4 sets of numerical digits separated by periods");
  
          int result = 0;
          for (int i = 0; i < 4; ++i) {
              int oct = Integer.valueOf(octets[i]);
              if (oct > 255 || oct < 0)
                  throw new IllegalArgumentException("Octet values in specified" +
                          " IPv4 address must be 0 <= value <= 255");
              result |=  oct << ((3-i)*8);
          }
          return result;
      }
focal_method.class_method_signature: IPv4.toIPv4Address(String ipAddress)
focal_method.full_signature: public static int toIPv4Address(String ipAddress)
focal_method.identifier: toIPv4Address
focal_method.invocations: split valueOf
focal_method.modifiers: public static
focal_method.parameters: (String ipAddress)
focal_method.return: int
focal_method.signature: int toIPv4Address(String ipAddress)