Re: Dotted decimal to long conversion?
Re: Dotted decimal to long conversion?
- Subject: Re: Dotted decimal to long conversion?
- From: Mike Smith <email@hidden>
- Date: Wed, 10 Aug 2005 17:16:24 -0700
You might also consider ascii2addr()
In any case, you don't want to be doing this inside the kernel.
Prepare a sockaddr_t
or similar in userland; this allows you to support resolution by name
as well as address,
which is a highly preferable behaviour.
= Mike
On Aug 10, 2005, at 12:01 PM, Allen Smith wrote:
inet_aton?
On Wednesday 10 August 2005 11:55 am, Allan Hoeltje wrote:
Is there a kernel or network utility function for converting a dotted
"255.255.255.255" IP string address to unsigned long? I've
searched with
the proper buzz words but can't seem to find anything but I am
sure I saw
such a function in the literature somewhere. Sure, I can hack up a
cool
function using shifts and four calls to strtol but there must be a
better
way that is more efficient and accounts for endian issues.
-Allan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40bigboy.lotaris.org
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden