Re: question about change in inet_ntoa.c
- From: Giorgos Keramidas <keramida@xxxxxxxxxxxxxxx>
- Date: Tue, 26 Feb 2008 12:39:53 +0200
On 2008-02-26 11:51, ithilgore <ithilgore.fbsd@xxxxxxxxx> wrote:
Giorgos Keramidas wrote:
I don't see ucp[] in RELENG_6, RELENG_7 or CURRENT. Where did you get
the version shown as `7.0-RC1' above?
I got the source code from the ftp.freebsd.org and I just downloaded
7.0-RC3 to be certain.
Both in 7.0-RC1 and in 7.0-RC3 in src/sys/libkern/ is the following code of
inet_ntoa.c :
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: src/sys/libkern/inet_ntoa.c,v 1.6 2005/01/07 00:24:32
imp Exp $");
That's libkern. It's part of the kernel code, and it cannot depend on
the same basic assumptions as /usr/src/lib/libc code.
The kernel version of sprintf() is implemented in sys/kern/subr_prf.c.
.....followed by the reentrant version of inet_ntoa : inet_ntoa_r
On the other hand, in version 4.11 RELEASE in
/usr/src/lib/libc/net/inet_ntoa.c &
inet_ntop.c (actually it is inet_ntop.c code but with the same
functionality) which is
called by inet_ntoa there is :
This, on the other hand, is userlevel code. There is a userlevel
implementation of the printf() family of functions in libc.
The two versions do not necessarily work in an 100% compatible manner,
so it's probably a slightly bad idea to 'fix' kernel code to use the
libc/userlevel style of sprintf("%u....").
_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"
- References:
- question about change in inet_ntoa.c
- From: ithilgore
- Re: question about change in inet_ntoa.c
- From: ithilgore
- Re: question about change in inet_ntoa.c
- From: Giorgos Keramidas
- Re: question about change in inet_ntoa.c
- From: ithilgore
- question about change in inet_ntoa.c
- Prev by Date: IPv6 in Jail
- Next by Date: Re: question about change in inet_ntoa.c
- Previous by thread: Re: question about change in inet_ntoa.c
- Next by thread: Re: question about change in inet_ntoa.c
- Index(es):