[PATCH] net: add more sockopt options

Mike Frysinger vapier at gentoo.org
Fri Jan 31 03:13:29 UTC 2014


On Friday, January 31, 2014 04:24:50 Dmitry V. Levin wrote:
> On Thu, Jan 30, 2014 at 06:53:43PM -0500, Mike Frysinger wrote:
> > This syncs with the defines as available in linux-3.13.
> 
> Applied, thanks.
> 
> Wouldn't it be better to keep these constants sorted the same way as
> they are sorted in uapi/linux/in.h?

they mostly are.  at least, that's how i imported them.  the problem is that 
strace supports more than just Linux which means there are more defines than 
just what's in uapi/linux/in.h.  we also can't sort it alphabetically because 
there are some compat defines that Linux carries but we don't want to decode 
first (e.g. IP_ORIGDSTADDR and IP_RECVORIGDSTADDR).

what would help i think with maintaining these files is a little macro that i 
use in other projects of mine:
	#define Q(x) { x, #x },
then the lists become:
static const struct xlat domains[] = {
	Q(PF_UNSPEC)
	Q(PF_LOCAL)
	Q(PF_UNIX)
	...
};
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20140130/9b55bfd4/attachment.bin>


More information about the Strace-devel mailing list