Examples of ArpHeader


Examples of org.pcap4j.packet.ArpPacket.ArpHeader

    );
  }

  @Test
  public void testGetHeader() {
    ArpHeader h = packet.getHeader();
    assertEquals(hardwareType, h.getHardwareType());
    assertEquals(protocolType, h.getProtocolType());
    assertEquals(hardwareLength, h.getHardwareLength());
    assertEquals(hardwareLength, (byte)h.getHardwareLengthAsInt());
    assertEquals(protocolLength, h.getProtocolLength());
    assertEquals(protocolLength, (byte)h.getProtocolLengthAsInt());
    assertEquals(dstHardwareAddr, h.getDstHardwareAddr());
    assertEquals(srcHardwareAddr, h.getSrcHardwareAddr());
    assertEquals(dstProtocolAddr, h.getDstProtocolAddr());
    assertEquals(srcProtocolAddr, h.getSrcProtocolAddr());
    assertEquals(operation, h.getOperation());

    ArpPacket.Builder ab = packet.getBuilder();
    ArpPacket p;

    ab.hardwareLength((byte)0);
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.