inet_* functions in kernel?

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

Hi Bartosz,

* Bartosz Marcin Kojak <bartek at> 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:") 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>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url :

More information about the freebsd-hackers mailing list