Package jpcap.packet

Examples of jpcap.packet.UDPPacket


      System.exit(0);
    }
    int index=Integer.parseInt(args[0]);
    JpcapSender sender=JpcapSender.openDevice(devices[index]);

    UDPPacket p=new UDPPacket(12345,54321);
    p.setIPv4Parameter(0,false,false,false,0,false,false,false,0,1010101,100,IPPacket.IPPROTO_UDP,
      InetAddress.getByName("www.yahoo.com"),InetAddress.getByName("www.google.com"));
    p.data="data".getBytes();

    EthernetPacket ether=new EthernetPacket();
    ether.frametype=EthernetPacket.ETHERTYPE_IP;
View Full Code Here

TOP

Related Classes of jpcap.packet.UDPPacket

Copyright © 2018 www.massapicom. 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.