*
* @throws UnknownHostException
* the unknown host exception
*/
public void testSendPacketUsingJBuffer() throws UnknownHostException {
JPacket packet =
new JMemoryPacket(JProtocol.ETHERNET_ID,
"0016b6c13cb10021 5db0456c08004500 "
+ "00340e8e40008006 9c54c0a80165d822 "
+ "b5b1c1cf005020ce 4303000000008002 "
+ "2000d94300000204 05b4010303020101 " + "0402");
InetAddress dst = InetAddress.getByName("201.1.1.1");
InetAddress src = InetAddress.getByName("192.168.1.1");
Ip4 ip = packet.getHeader(new Ip4());
Tcp tcp = packet.getHeader(new Tcp());
ip.destination(dst.getAddress());
ip.source(src.getAddress());
ip.checksum(ip.calculateChecksum());
tcp.checksum(tcp.calculateChecksum());
packet.scan(Ethernet.ID);
System.out.println(packet);
List<PcapIf> alldevs = new ArrayList<PcapIf>(); // Will be filled with NICs
StringBuilder errbuf = new StringBuilder(); // For any error msgs
/***************************************************************************