Package org.jnetpcap.packet

Examples of org.jnetpcap.packet.JPacket.order()


   * @return header's stored checksum
   */
  @Field(length = 4 * BYTE, format = "%x", display = "FCS")
  public long checksum() {
    final JPacket packet = getPacket();
    packet.order(ByteOrder.BIG_ENDIAN);
    return packet.getUInt(getPostfixOffset());
  }

  /**
   * Calculates a checksum using protocol specification for a header. Checksums
View Full Code Here


   * @return header's stored checksum
   */
  @Field(length = 4 * BYTE, format = "%x", display = "FCS")
  public long checksum() {
    final JPacket packet = getPacket();
    packet.order(ByteOrder.BIG_ENDIAN);
    return packet.getUInt(getPostfixOffset());
  }

  /**
   * Sets the checksum, Ethernet.FCS field in the last 4 bytes of the packet
View Full Code Here

    if (getPostfixLength() < 4) {
      return false;
    }

    final JPacket packet = getPacket();
    packet.order(ByteOrder.BIG_ENDIAN);

    packet.setUInt(packet.size() - 4, crc);

    return true;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.