Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jul 2010 10:49:44 +0200
From:      Ed Schouten <ed@80386.nl>
To:        Bartosz Marcin Kojak <bartek@6bone.be>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: inet_* functions in kernel?
Message-ID:  <20100713084944.GV1742@hoeg.nl>
In-Reply-To: <op.vfq2agwbwe5x3k@brtk-mob>
References:  <op.vfq2agwbwe5x3k@brtk-mob>

next in thread | previous in thread | raw e-mail | index | archive | help

--Tln/wzp9jsNjmSUr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Bartosz,

* Bartosz Marcin Kojak <bartek@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.

--=20
 Ed Schouten <ed@80386.nl>
 WWW: http://80386.nl/

--Tln/wzp9jsNjmSUr
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (FreeBSD)

iEYEARECAAYFAkw8KKgACgkQ52SDGA2eCwVThwCeIC9mztFeRHj08V2F1va/R8n8
Fr4An1Y1JMKHsdlTs7C3W1B4KMW6Ftyz
=wn6b
-----END PGP SIGNATURE-----

--Tln/wzp9jsNjmSUr--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100713084944.GV1742>