Package org.jnetpcap.protocol.network

Examples of org.jnetpcap.protocol.network.Ip4.destination()


    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);
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.