packet.setUByte(14 + 0, 0x45);
System.out.println(packet.toHexdump());
packet.setUByte(14 + 9, 0x11); //UDP
System.out.println(packet.toHexdump());
packet.scan(JProtocol.ETHERNET_ID);
Ethernet eth = packet.getHeader(new Ethernet());
Ip4 ip = packet.getHeader(new Ip4());
Udp udp = packet.getHeader(new Udp());
// udp.transferFrom(getFakeData(1460)); //Generate Random bytes
eth.destination(new byte[] {(byte) 0xaa, 0x0c, 0x08, 11, 22, 33});
eth.source(new byte[] {(byte) 0xaa, 0x0c, 0x08, 11, 22, 34});
ip.flags(0);
ip.tos(0);
ip.source(new byte[] {(byte) 192, (byte) 168, 18, (byte) 218});
ip.setByteArray(16, new byte[] {(byte) 192,(byte) 168, 18, (byte) 219});