Date: Thu, 23 Sep 2004 02:14:00 +0200 From: Max Laier <max@love2party.net> To: freebsd-arch@freebsd.org Cc: freebsd-net@freebsd.org Subject: Re: Global (non _KERNEL) place for sockaddr_union? Message-ID: <200409230214.08477.max@love2party.net> In-Reply-To: <200409200250.49518.max@love2party.net> References: <200409200250.49518.max@love2party.net>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Monday 20 September 2004 02:50, Max Laier wrote: > Hi, > > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/71836 is the symptom. Now I > am looking for a clean solution to it. What is needed is an include file > that defines union sockaddr_union in a way that is useable from kernel and > userland. Historically it seems that this union first apeared in context of > ipsec within the kernel. pf has adopted it, but uses it in the userland as > well. I am sure that it can be usefull in a lot of places that have to deal > with/store different address formats. > > My question now is, what would be a good place to define this? Are there > any fromal standarts that might define it already? (Couldn't find anything) > Is there anything else that I must consider? > > At some point I though netinet/in.h might be a good place, but that'd > require inclusion of sys/socket.h, which certainly is not a good solution. > > Opinions? Ideas? As no real solution has come up and we couldn't agree what to do with it either, I'll resort to an easy hack: http://people.freebsd.org/~mlaier/sockaddr_union.fix.diff This will fix the issue and not create new problems. With the small exception for userland programs that try to include <netipsec/keydb.h> before <net/pfvar.h> and make use of sockaddr_union. Those programs do not exist, however, and have been broken before. Any objections? [ I know it's ugly already. ] -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBUhVQXyyEoT62BG0RAoYnAJ9SzMK7ZPV3NYZ36DYJlj53KFNqjgCfQ2YO J3R7FE7EG21pdyvCi0DM6aA= =I8lU -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409230214.08477.max>
