Date: Sat, 28 Jul 2001 13:51:03 -0700 From: Terry Lambert <tlambert2@mindspring.com> To: Anjali Kulkarni <anjali@indranetworks.com> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: inet_aton Message-ID: <3B6325B7.D6CBC67A@mindspring.com> References: <002d01c11728$d34723b0$0a00a8c0@indranet>
next in thread | previous in thread | raw e-mail | index | archive | help
> Anjali Kulkarni wrote: > > Hi, > > I want to use the function inet_aton() in the kernel code. > However, I found no kernel equivalent of this function int > the freebsd sources. I could find inet_ntoa(), but not > inet_aton(). Is it named by some other name or how can I > locate it? The kernel is not linked against the resolver library, which is where the network address manipulation functions come from (in FreeBSD, the resolver library has been rolled into libc; this is traditional, but makes it very hard to upgrade to newer versions when needed. In FreeBSD, the kernel isn't linked against the C library, either). You should pass in sockaddr structures, not strings, to the kernel, if you wish to pass network addresses to the kernel. As a general policy issue, I think that passing strings into the kernel for any reason is a bad idea. We tolerate it where we must (path name lookups), but any place else that takes a string is bad news (e.g. we will eventually get around to fixing mount at some point in the future). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B6325B7.D6CBC67A>