site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com -josh On Aug 11, 2005, at 10:26 AM, Mike Smith wrote: On Aug 10, 2005, at 6:23 PM, Allan Hoeltje wrote: = Mike This email sent to jgraessley@apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com What Mike says is correct. Don't do something inside the kernel unless you absolutely can't do it anywhere else. Having said that, there is an inet_aton available in the kernel. inet_ntop is also available. 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? _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/jgraessley% 40apple.com smime.p7s