Re: Dotted decimal to long conversion?
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com User-agent: Microsoft-Entourage/10.1.4.030702.0 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" <drivers@mu.org> 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 (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
participants (1)
-
Allan Hoeltje