Package org.jnetpcap.protocol.network

Examples of org.jnetpcap.protocol.network.Icmp.type()


    assertTrue(packet.hasHeader(ip, 1));
    assertTrue(packet.hasHeader(Udp.ID));
    assertTrue(packet.hasHeader(Payload.ID));

    // Check specific values
    assertEquals(3, icmp.type());
    assertEquals(3, icmp.code());
    assertEquals(0x2731, icmp.checksum());
    assertEquals(0, unreach.reserved());

    assertEquals(0x8724, ip.checksum());
View Full Code Here


    assertTrue(packet.hasHeader(IEEE802dot1q.ID, 0));
    assertTrue(packet.hasHeader(Ip4.ID));
    assertTrue(packet.hasHeader(icmp));
    assertTrue(icmp.hasSubHeader(echo));

    assertEquals(8, icmp.type());
    assertEquals(0, icmp.code());
    assertEquals(0x10FD, icmp.checksum());

    assertEquals(0xd001, echo.id());
    assertEquals(0x811e, echo.sequence());
View Full Code Here

    @SuppressWarnings("unused")
    TextFormatter out = new TextFormatter();
//    out.format(echo, Detail.MULTI_LINE_FULL_DETAIL);

    assertEquals(0, icmp.type());
    assertEquals(0, icmp.code());
    assertEquals(0x18FD, icmp.checksum());

    assertEquals(0xd001, echo.id());
    assertEquals(0x811e, echo.sequence());
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.