Ethereal-dev: Re: [Ethereal-dev] Re: [Ethereal-cvs] rev 16411: /trunk/: pcap-util-unix.c

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Tue, 15 Nov 2005 00:46:44 -0800
Ulf Lamping wrote:

IMHO it's not a good idea to use eth_close most of the time and only at some places just use close only.

This way:
it's harder to understand why sometimes close and sometimes eth_close is needed
it's hard to find missing wrapper occurrences using grep
if code is copied, it's likely to miss using eth_close when it's needed (but you'll get an error on the Win side, so it's quickly fixed)

Saying all this, if we have a wrapper layer we should use it at all appropriate places, even if it's not required at the specific place.

Even if the descriptor wasn't opened with a wrapper? In pcap-util-unix.c, the descriptor was opened with socket().