From owner-freebsd-hackers Tue Jul 31 9:29:41 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id 16B6A37B401; Tue, 31 Jul 2001 09:29:38 -0700 (PDT) (envelope-from julian@elischer.org) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id LAA34991; Tue, 31 Jul 2001 11:21:59 -0700 (PDT) Date: Tue, 31 Jul 2001 11:21:58 -0700 (PDT) From: Julian Elischer To: Anjali Kulkarni Cc: Mike Smith , freebsd-hackers@freebsd.org Subject: Re: inet_aton In-Reply-To: <007601c11999$865df600$0a00a8c0@indranet> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I think Warner Losh may have already done this.... On Tue, 31 Jul 2001, Anjali Kulkarni wrote: > Hi, > > Thanks for your response. > The reason I am trying to use inet_aton is because I am writing a kernel > proxy which connects to a webserver etc. etc. > So, I need to convert the server's ip address to the network byte address, > and hence I need to use this function. I do not see how else I can get the > network address from the ip address I have, except by using inet_aton??? > > Thanks, > Anjali > > ----- Original Message ----- > From: Mike Smith > To: Anjali Kulkarni > Cc: > Sent: Sunday, July 29, 2001 1:52 AM > Subject: Re: inet_aton > > > > > 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? > > > > If you are trying to parse an ascii internet address in the kernel, > > you're quite possibly making a bad design mistake - why is it still in > > text format? If you're passing it in from another program, you should be > > passing a sockaddr struct. > > > > Failing that, you'll just have to steal the code from libc and bring it > > in yourself. > > > > -- > > ... every activity meets with opposition, everyone who acts has his > > rivals and unfortunately opponents also. But not because people want > > to be opponents, rather because the tasks and relationships force > > people to take different points of view. [Dr. Fritz Todt] > > V I C T O R Y N O T V E N G E A N C E > > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message