[PATCH] Interface description
Antoine Brodin
antoine at FreeBSD.org
Mon Jan 25 22:33:10 UTC 2010
On Mon, Jan 25, 2010 at 11:10 PM, Xin LI <delphij at delphij.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I have revised the patchset based on feedback received. This version:
>
> - Unbreak the case when libpcap is being built for pre-ifdescr world.
> - Documents the descr and -descr primitives for ifconfig(8), they are
> intended for OpenBSD compatibility.
> - Simplify and concentrate memory allocation in ifconfig(8)
> - Document the use of nul terminated buffer and the meaning of length
> parameter
> - Use char* instead of sbuf and simplify the logic in kernel part.
>
> Hopefully this version would address all problems raised by reviewers.
> Comments?
A few comments:
in contrib/libpcap/inet.c:
I think "int s;" can stay under #ifdef SIOCGIFDESCR
in sbin/ifconfig/ifconfig.c:
do {
...
if (...) {
descrlen *= 2;
continue;
}
...
} while (0);
I think there is no retry with larger buffer (while (0))
Perhaps you want while (1) + some breaks
Cheers,
Antoine
More information about the freebsd-net
mailing list