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: Thu, 11 Aug 2005 10:26:28 -0700
On Aug 10, 2005, at 6: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?
There are lots of things that shouldn't be done in the kernel; as a
general
rule, anything that can be done outside the kernel should not be done
inside.
Any time you find yourself thinking "this would be so much easier if
I could read
or write a file, or use this library function, or run this other
program" you should
rethink whether you want to be doing what you're doing inside the
kernel at all.
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?
Is there any reason that you need to do this in the kernel? Why not use
BPF for your filtering and do the rest of your work entirely in user
space?
= 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