src/org/jnetpcap/winpcap/WinPcap.java
public static int findAllDevsEx(String source,
			WinPcapRmtAuth auth,
			List<PcapIf> alldevs,
			Appendable errbuf) throws IOException {
		final int r = findAllDevsEx(source, auth, alldevs, getBuf());

		toAppendable(getBuf(), errbuf);

		return r;
	}
/**
	 * Create a list of network devices that can be opened with pcap_open(). </p>
	 * <p>
	 * This function is a superset of the old 'pcap_findalldevs()', which is
	 * obsolete, and which allows listing only the devices present on the local
	 * machine. Vice versa, pcap_findalldevs_ex() allows listing the devices
	 * present on a remote machine as well. Additionally, it can list all the pcap
	 * files available into a given folder. Moreover, pcap_findalldevs_ex() is
	 * platform independent, since it relies on the standard pcap_findalldevs() to
	 * get addresses on the local machine.
	 * </p>
	 * <p>
	 * In case the function has to list the interfaces on a remote machine, it
	 * opens a new control connection toward that machine, it retrieves the
	 * interfaces, and it drops the connection. However, if this function detects
	 * that the remote machine is in 'active' mode, the connection is not dropped
	 * and the existing socket is used.
	 * </p>
	 * <p>
	 * The 'source' is a parameter that tells the function where the lookup has to
	 * be done and it uses the same syntax of the pcap_open().
	 * </p>
	 * <p>
	 * Differently from the pcap_findalldevs(), the interface names (pointed by
	 * the alldevs->name and the other ones in the linked list) are already ready
	 * to be used in the pcap_open() call. Vice versa, the output that comes from
	 * pcap_findalldevs() must be formatted with the new pcap_createsrcstr()
	 * before passing the source identifier to the pcap_open().
	 * </p>
	 * <p>
	 * The error message is returned in the 'errbuf' variable. An error could be
	 * due to several reasons:
	 * <ul>
	 * <li>libpcap/WinPcap was not installed on the local/remote host
	 * <li>the user does not have enough privileges to list the devices / files
	 * <li>a network problem
	 * <li>the RPCAP version negotiation failed
	 * <li>other errors (not enough memory and others).
	 * </ul>
	 * </p>
	 * <p>
	 * Warning:<br>
	 * There may be network devices that cannot be opened with pcap_open() by the
	 * process calling pcap_findalldevs(), because, for example, that process
	 * might not have sufficient privileges to open them for capturing; if so,
	 * those devices will not appear on the list. The interface list must be
	 * deallocated manually by using the pcap_freealldevs().
	 * </p>
	 * 
	 * @param source
	 *          a char* buffer that keeps the 'source localtion', according to the
	 *          new WinPcap syntax. This source will be examined looking for
	 *          adapters (local or remote) (e.g. source can be 'rpcap://' for
	 *          local adapters or 'rpcap://host:port' for adapters on a remote
	 *          host) or pcap files (e.g. source can be 'file://c:/myfolder/').
	 *          The strings that must be prepended to the 'source' in order to
	 *          define if we want local/remote adapters or files is defined in the
	 *          new Source Specification Syntax
	 * @param auth
	 *          a pointer to a pcap_rmtauth structure. This pointer keeps the
	 *          information required to authenticate the RPCAP connection to the
	 *          remote host. This parameter is not meaningful in case of a query
	 *          to the local host: in that case it can be NULL.
	 * @param alldevs
	 *          a list of all the network interfaces
	 * @param errbuf
	 *          error message (in case there is one)
	 * @return '0' if everything is fine, '-1' if some errors occurred; this
	 *         function returns '-1' also in case the system does not have any
	 *         interface to list
	 * @throws IOException
	 *           Signals that an I/O exception has occurred.
	 * @since 1.2
	 */
Create a list of network devices that can be opened with pcap_open(). 

This function is a superset of the old 'pcap_findalldevs()', which is
obsolete, and which allows listing only the devices present on the local
machine. Vice versa, pcap_findalldevs_ex() allows listing the devices
present on a remote machine as well. Additionally, it can list all the pcap
files available into a given folder. Moreover, pcap_findalldevs_ex() is
platform independent, since it relies on the standard pcap_findalldevs() to
get addresses on the local machine.


In case the function has to list the interfaces on a remote machine, it
opens a new control connection toward that machine, it retrieves the
interfaces, and it drops the connection. However, if this function detects
that the remote machine is in 'active' mode, the connection is not dropped
and the existing socket is used.


The 'source' is a parameter that tells the function where the lookup has to
be done and it uses the same syntax of the pcap_open().


Differently from the pcap_findalldevs(), the interface names (pointed by
the alldevs->name and the other ones in the linked list) are already ready
to be used in the pcap_open() call. Vice versa, the output that comes from
pcap_findalldevs() must be formatted with the new pcap_createsrcstr()
before passing the source identifier to the pcap_open().


The error message is returned in the 'errbuf' variable. An error could be
due to several reasons:

libpcap/WinPcap was not installed on the local/remote host
the user does not have enough privileges to list the devices / files
a network problem
the RPCAP version negotiation failed
other errors (not enough memory and others).



Warning:
There may be network devices that cannot be opened with pcap_open() by the
process calling pcap_findalldevs(), because, for example, that process
might not have sufficient privileges to open them for capturing; if so,
those devices will not appear on the list. The interface list must be
deallocated manually by using the pcap_freealldevs().

@param source
a char* buffer that keeps the 'source localtion', according to the
new WinPcap syntax. This source will be examined looking for
adapters (local or remote)  or pcap files .
The strings that must be prepended to the 'source' in order to
define if we want local/remote adapters or files is defined in the
new Source Specification Syntax
@param auth
a pointer to a pcap_rmtauth structure. This pointer keeps the
information required to authenticate the RPCAP connection to the
remote host. This parameter is not meaningful in case of a query
to the local host: in that case it can be NULL.
Create a list of network devices that can be opened with pcap_open () . This function is a superset of the old ' pcap_findalldevs () ' which is obsolete and which allows listing only the devices present on the local machine . Vice versa pcap_findalldevs_ex () allows listing the devices present on a remote machine as well . Additionally it can list all the pcap files available into a given folder . Moreover pcap_findalldevs_ex () is platform independent since it relies on the standard pcap_findalldevs () to get addresses on the local machine . In case the function has to list the interfaces on a remote machine it opens a new control connection toward that machine it retrieves the interfaces and it drops the connection . However if this function detects that the remote machine is in ' active ' mode the connection is not dropped and the existing socket is used . The ' source ' is a parameter that tells the function where the lookup has to be done and it uses the same syntax of the pcap_open () . Differently from the pcap_findalldevs () the interface names ( pointed by the alldevs - > name and the other ones in the linked list ) are already ready to be used in the pcap_open () call . Vice versa the output that comes from pcap_findalldevs () must be formatted with the new pcap_createsrcstr () before passing the source identifier to the pcap_open () . The error message is returned in the ' errbuf ' variable . An error could be due to several reasons : libpcap / WinPcap was not installed on the local / remote host the user does not have enough privileges to list the devices / files a network problem the RPCAP version negotiation failed other errors ( not enough memory and others ) . Warning : There may be network devices that cannot be opened with pcap_open () by the process calling pcap_findalldevs () because for example that process might not have sufficient privileges to open them for capturing ; if so those devices will not appear on the list . The interface list must be deallocated manually by using the pcap_freealldevs () . @param source a char * buffer that keeps the ' source localtion ' according to the new WinPcap syntax . This source will be examined looking for adapters ( local or remote ) or pcap files . The strings that must be prepended to the ' source ' in order to define if we want local / remote adapters or files is defined in the new Source Specification Syntax @param auth a pointer to a pcap_rmtauth structure . This pointer keeps the information required to authenticate the RPCAP connection to the remote host . This parameter is not meaningful in case of a query to the local host : in that case it can be NULL .
public static int findAllDevsEx(String source,
			WinPcapRmtAuth auth,
			List<PcapIf> alldevs,
			Appendable errbuf) throws IOException {
		final int r = findAllDevsEx(source, auth, alldevs, getBuf());
		toAppendable(getBuf(), errbuf);
		return r;
	}
public static int findAllDevsEx ( String source , WinPcapRmtAuth auth , List < PcapIf > alldevs , Appendable errbuf ) throws IOException { final int r = findAllDevsEx ( source , auth , alldevs , getBuf ( ) ) ; toAppendable ( getBuf ( ) , errbuf ) ; return r ; }
Create a list of network devices that can be opened with pcap_open().
Create a list of network devices that can be opened with pcap_open () .