Package org.jnetpcap.packet

Examples of org.jnetpcap.packet.PcapPacket.toHexdump()


      PcapPacket p1 = l1.get(i);
      PcapPacket p2 = l2.get(i);

      if (p1.size() != p2.size()) {
        System.out.printf("#%d p1=%d p2=%d\n%s\n%s\n", i, l1.size(), l2.size(),
            p1.toHexdump(), p2.toHexdump());

        System.out.println(p1.toString());
        System.out.println(p2.toString());
      }
View Full Code Here


                  .toDebugString());

          System.out.println("---------------------------");

          System.out.printf(
              "P2: %s\nheader2=%s\n\nstate2=%s\npacket2=%s\n\nip2=%s\n\n", p2
                  .toHexdump(), p2.getCaptureHeader().toDebugString(), p2
                  .getState().toDebugString(), p2.toDebugString(), ip2
                  .toDebugString());

          System.out.println("p1-p2.memory.diff=\n"
View Full Code Here

   */
  public void testIcmpDestUnreachable() {
    // Wireshark packet # 29 (1-based)
    PcapPacket packet = TestUtils.getPcapPacket("tests/test-afs.pcap", 29 - 1);

    System.out.println(packet.toHexdump(128, false, false, true));
    System.out.println(packet.getState().toDebugString());

    Ip4 ip = new Ip4();
    Icmp icmp = new Icmp(); // Need an instance so we can check on sub header
    Icmp.DestinationUnreachable unreach = new Icmp.DestinationUnreachable();
View Full Code Here

  public void testDiameterHeader() {
    Diameter diameter = new Diameter(); // Need an instance so we can check on sub header
    // Wireshark packet # 29 (1-based)
    PcapPacket packet = TestUtils.getPcapPacket("tests/tc_TC_IDPRE_EXT0140.pcap", 43 - 1);

    System.out.println(packet.toHexdump(128, false, false, true));

    long map = packet.getState().get64BitHeaderMap(0);
   
    JRegistry.addBindings(Diameter.class);
    System.out.println(JRegistry.toDebugString());
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.