Re: inet_aton() Bug or feature?

2002-10-03 Thread Ian Lister
On Thu, 3 Oct 2002, Leo Bicknell wrote: >In a message written on Thu, Oct 03, 2002 at 12:55:15PM -0700, Crist J. Clark wrote: >> This is a feature not a bug since it is documented in inet_aton(3), >> >> All numbers supplied as ``parts'' in a `.' notati

Re: inet_aton() Bug or feature?

2002-10-03 Thread Leo Bicknell
In a message written on Fri, Oct 04, 2002 at 11:19:16AM +0930, Daniel O'Connor wrote: > I would imagine this behaviour is like it is because that is how atoi > and friends work.. Absolutely. I think this is the unintended consequence sort of bug, not the programmer goofed sort of bug. :) I'd de

Re: inet_aton() Bug or feature?

2002-10-03 Thread Daniel O'Connor
On Fri, 2002-10-04 at 11:08, Leo Bicknell wrote: > 0xff00 was hex, > 0123456701234567 was octal, > 010.010.010.010 was 4 decimal parts > > I was very surprised from the poster that 192.168.0.010 might actually > be 192.168.0.8. I would imagine this behaviour is like it is because that

Re: inet_aton() Bug or feature?

2002-10-03 Thread Leo Bicknell
In a message written on Thu, Oct 03, 2002 at 12:55:15PM -0700, Crist J. Clark wrote: > This is a feature not a bug since it is documented in inet_aton(3), > > All numbers supplied as ``parts'' in a `.' notation may be decimal, > octal, or hexadecimal, as

Re: inet_aton() Bug or feature?

2002-10-03 Thread Crist J. Clark
ome investigation I found that both ping and arp use > inet_aton() libc call to interpret their command arguments > into networkformat.Futher,inet_aton()uses > strtoul(c,&endptr, 0) for each octet in IP address to > convert string representation of number t

inet_aton() Bug or feature?

2002-10-03 Thread Artem Okounev
that both ping and arp use inet_aton() libc call to interpret their command arguments intonetworkformat.Futher,inet_aton()uses strtoul(c,&endptr, 0) for each octet in IP address to convert string representation of number to unsigned long. Why not to use strtoul(x, x

Re: inet_aton

2001-07-31 Thread Warner Losh
In message <[EMAIL PROTECTED]> Julian Elischer writes: : hmm I thought it was you doing an in-kernel proxy? : ah no wait it was an in-kernel server? : (wasn't it?) Neither. You have me confused with someone else. Warner To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-

Re: inet_aton

2001-07-31 Thread Julian Elischer
hmm I thought it was you doing an in-kernel proxy? ah no wait it was an in-kernel server? (wasn't it?) On Tue, 31 Jul 2001, Warner Losh wrote: > In message <[EMAIL PROTECTED]> Julian >Elischer writes: > : I think Warner Losh may have already done this > > I don't think I've done this. > >

Re: inet_aton

2001-07-31 Thread Warner Losh
In message <[EMAIL PROTECTED]> Julian Elischer writes: : I think Warner Losh may have already done this I don't think I've done this. Warner To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Re: inet_aton

2001-07-31 Thread Julian Elischer
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 conve

Re: inet_aton

2001-07-31 Thread Terry Lambert
nel which has a remote server's ip-address string, and I need to connect > to the remote server, so I need to use inet_aton. In general, string manipulation in the kernel is a bad idea. The problem is that C strings are subject to buffer overflows, etc., and dragging them into the

Re: inet_aton

2001-07-31 Thread Anjali Kulkarni
;s ip-address string, and I need to connect to the remote server, so I need to use inet_aton. Anjali - Original Message - From: Terry Lambert <[EMAIL PROTECTED]> To: Anjali Kulkarni <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, July 29, 2001 2:21 AM

Re: inet_aton

2001-07-31 Thread Anjali Kulkarni
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 ca

Re: inet_aton

2001-07-28 Thread Julian Elischer
Mike Smith wrote: > > > 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 c

Re: inet_aton

2001-07-28 Thread Terry Lambert
> 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

Re: inet_aton

2001-07-28 Thread Mike Smith
> 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 pa

inet_aton

2001-07-27 Thread Anjali Kulkarni
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?   Thanks, Anjali