Wireshark-dev: [Wireshark-dev] Windows: Specific icons for capture interfaces (using a name heu
Date Prev · Date Next · Thread Prev · Thread Next
From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Sat, 31 Jan 2009 00:22:57 +0100
Hi!

Another patch I had lying around for months ...


The following will only have an effect on Windows based systems (I know to little about Unix systems to do it right here) ...


If you have more than one or two capture interfaces (especially with the usually long capture interface names on Windows), it's sometimes hard to trigger the right capture interface.

So my idea was instead of displaying a generic interface icon, display a "topic" icon like modem, wireless, network plug, ...


My "easy solution" was to look at the capture interface name for specific strings. The heuristics are currently very basic and consists only of a strstr "search" for:

modem icon: "generic dialup"
wireless icon: "wireless", "802.11"
network plug icon: <any other>

What I'm still missing is a good icon for "virtual network interfaces" (like the VMWare ones).

It would be easy to extend this with additional topics, user specified heuristics, ...


I know this is a heuristic and therefore not perfect, but my guess is that we can get very far with this simplistic approach.


Please report any undetected modem or wireless interfaces ...

Regards, ULFL

P.S: I know, the "right" solution would probably be to look at the interface type from NDIS (or even better include this into libpcap), but that would require a lot more work and I don't know if that returns the right results under any circumstances either.

P.P.S: The wireless icon doesn't look very good, mainly because of the conversion from .png to .xpm (because xpm has a very limited alpha channel). As we dropped GTK1.x, maybe it's time to switch over to png?