Re: Dotted decimal to long conversion?
Re: Dotted decimal to long conversion?
- Subject: Re: Dotted decimal to long conversion?
- From: Peter Lovell <email@hidden>
- Date: Thu, 11 Aug 2005 10:35:13 -0400
I suspect that he really meant that it would be better not to do it
in the kernel if it can be avoided. Obviously, sometimes you can't
avoid it.
In the kernel you have to be a lot more careful about validating the
input characters and length etc etc etc. So, avoid it if you can and
be extra careful if you can't.
Regards.....Peter
On Aug 10, 2005, at 9:23 PM, Allan Hoeltje wrote:
Sorry if this is a dumb question but why shouldn't I be doing this
in the
kernel? Can you be a little more specific?
My situation is I am examining SIP packets which contain an IP
address in
dotted decimal string form. I want to be able to now monitor IP
packets
that have that specific address in the source IP address field.
How else do
I get from dotted string to in_addr_t?
-Allan
"Mike Smith" <email@hidden> wrote on 8/10/05 5:16 PM:
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
_______________________________________________
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