Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: Re: [Ethereal-dev] patches to add interface descriptions

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Nathan Jennings <njen@xxxxxxxxxxxxx>
Date: Wed, 02 Jul 2003 21:47:41 -0400
Guy Harris wrote:

On Wednesday, July 2, 2003, at 6:01 PM, Nathan Jennings wrote:

Attached are patch files I've created with "cvs diff" against anon cvs
as of yesterday morning. The patches add an optional interfaces description string to the capture preferences dialog. The description string looks like:

eth0(eth0 descr),eth1(eth1 descr),...


So does this add the ability for the *user* to add a description, over and above whatever description the OS supplies, if any?

Yes, I should have said "user-defined" description string.

If so, then perhaps it should default that description to the one the OS supplies, and let the user override that, rather than having two descriptions on OSes where the OS supplies one (currently only Windows, but at some point libpcap might dig up descriptions on some UNIXes) - the OS description is often just a model name, and an explicit user-supplied description might render the OS description unnecessary (not that a model name is all that useful on a multi-homed machine with multiple interfaces of the same type anyway).

Yeah, I thought about that too... the OS may provide a description. But, like you mentioned, sometimes you may have two or more of the same type/brand of NIC and that's not helpful. At least in my case. I was looking for something that would identify the "network" that the NIC is connected to by name. For instance, if I click the dropdown combo, I was wanting to see:

(web DMZ switch) eth1
(outside Internet hub) eth2
(internal LAN switch) eth3
...

> That might be simpler than having two description strings for
> interfaces.

As far as implementing the above, when I first started I thought this may become too complicated. It took me awhile to find a clean entry point. I'd never looked at the code before. :o(

What ended up being great about it was the code to remove the description from the device name was already there (strrchr()) for Windows. And, as long as I prepended the description, it was OK as is without me adding anything additional. I put a comment regarding this in the code. We could do this for the OS NIC names like you suggested above too (as a default?).

-Nathan