inet_* functions in kernel?

Ed Schouten ed at 80386.nl
Tue Jul 13 08:49:45 UTC 2010


Hi Bartosz,

* Bartosz Marcin Kojak <bartek at 6bone.be> wrote:
> I want to be able to write rules for module through sysctl (rule
> will contain IP addresses in human-readable format, e.g.
> "uid:1002:192.168.2.3") and I'm wondering how to translate addresses
> to network byte order without inet_* functions.

Wouldn't it be possible to do the conversion in userspace and write
something like a struct sockaddr_storage/in_addr_t/etc to the kernel?
That way you can avoid the string handling in kernel space entirely.

-- 
 Ed Schouten <ed at 80386.nl>
 WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20100713/b3f1d75c/attachment.pgp


More information about the freebsd-hackers mailing list