Guy Harris <guy@xxxxxxxxxxxx> - Mon, Nov 10, 2003:
> [ a lot of very clear explanations ]
I was fearing to read what you explained, and I have to face the
problem:
. I can select an interface by Device or by tethereal's id ;
. tethereal id's aren't constants through versions of ethereal or
libpcap ;
. Device names are listed with a non-constant format.
It seems my options are:
. use jpcap/libpcap to get device listings and find a way to confront
them to tethereal's output ;
. patch tethereal to list interfaces in an intelligent way.
1/ seems wore like a hack to me, and with 2/ I fear the need of some
libpcap hacking too.
Any suggestions appreciated, right now I'll stick to the menu where
the user has to select the interface manually, each time the software
starts.
> With newer versions of libpcap/WinPcap, there's "pcap_findalldevs()".
> I don't know whether any of the Java interfaces to libpcap/WinPcap,
> such as jpcap, support it. They probably should (and should fall back
> on the mechanisms "pcap_findalldevs()" uses, if "pcap_findalldevs()"
> itself isn't present).
I came across jpcap a while ago, but my interest was in Ethereal's
protocol knowledge. I've developped marshallers/serializers for the
protocols I need but I still don't want to go with libpcap: it would
require IP defragmentation, TCP reassembly, and other similar low-level
network handling, prone to errors, with a lot of efforts for almost
nothing.
I guess it would'nt surprise anybody that I'm dreaming of libethereal
every night before my eyes close... ;)
--
Lo�c Minier <lool@xxxxxxxx>