Ethereal-dev: Re: [Ethereal-dev] interface options patch II

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Tue, 9 Sep 2003 22:47:13 -0700
On Tue, Sep 09, 2003 at 03:19:15PM +0100, Graham Bloice wrote:
> get_interface_list() returns a string such as "ASUSTek/Broadcom 440x 10/100
> Integrated Controller (Microsoft's Packet Scheduler):
> \Device\Packet_{F30D9BC7-81C8-4FF1-B98E-DDE87A2DB765}" which comprises of
> two parts, the hardware description and the interface name.  It would appear
> that the only reliable separator is the string ": \".
> 
> As the new code places the ethereal description in parentheses, it seems the
> code to extract it from the preferences gets confused by the parentheses in
> the hardware description.

I've checked in a change that makes "get_interface_list()" not return a
list of names.  Instead, it now returns a list of structures containing:

	a pointer to an interface name;

	a pointer that's either null or points to an interface
	description;

which eliminates the need for any code to split the two of them apart. 
Instead, code that needs to combine them into a single line or single
string does so itself.

(This is *not* in 0.9.15, as it was checked in after 0.9.15 was built;
it's only in CVS.)

I have not yet tested it on Windows; I will be doing that soon.