Package net.sourceforge.jpcap.capture

Examples of net.sourceforge.jpcap.capture.PacketCapture


      String name = (String)it.next();

      if (!name.substring(0,2).equals("lo")) { //ignore loopback? (lo, lo0)     
       
        //CREATE CAPTURE INSTANCE
        packetcapture = new PacketCapture();
        try {
          packetcapture.open(name, SNAP_LENGTH, true, PacketCapture.DEFAULT_TIMEOUT);
         
        //if we've gotten this far it generally means the machine has network adapters
        //that we can see, but they are offline for some reason (cable unplugged, etc.)
View Full Code Here


            try {
//                String m_device = "eth1";
                String m_device = nf2.getIfaceName();

                // Step 1:  Instantiate Capturing Engine
                m_pcap = new PacketCapture();

                // Step 2:  Check for devices
                System.out.println("Capturing on "+m_device);

                // Step 3:  Open Device for Capturing (requires root)
View Full Code Here

TOP

Related Classes of net.sourceforge.jpcap.capture.PacketCapture

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.