Article Figure 1 Figure 2 Listing 1 Listing 2
Listing 3 Listing 4 Listing 5 sep2006.tar

Listing 1 Start of the networking class

import jpcap.NetworkInterface;
import jpcap.JpcapCaptor;

public class networking {

        /*  define the device to be a global array of NetworkInterfaces */

    NetworkInterface[] devices= null;
 
        /*  Our constructor that gets the list of NetworkInterfaces and 
            populates the devices array */   

    public networking() {
    devices=JpcapCaptor.getDeviceList();
    }

        /*  Returns the array of NetworkInfaces for the system */

    public NetworkInterface[] getNetowrkInterfaces() {
        return devices;
   }
}