On Wednesday 2008-04-09 15:42, Patrick McHardy wrote: >> > >> In this case, I'd just follow AF_ suit. >> Especially since NAME_MAX=256, PATH_MAX=4096 for example, > > Thats a bad example. > >> _MAX is more often the total size rather than the last element. >> (The more even since loops use for (; x < MAX; ) >> rather than for (; x<= MAX;) as can probably be seen >> in a lot of userspace code.) > > Which is in my opinion a sign of poor coding and leads to > off-by-ones. Please don't redefine the meaning of maximum. > I don't think so. Ask a person on the street: What's the maximum number of AFs Linux knows about? S/He would answer 34, counting up in front of you: - “it knows UNSPEC, IPV4, IPV6, ... and RXRPC, makes for a total of 34 AFs” So since that just came to my mind, how about using the somewhat odd one NFPROTO_TOTAL? -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html