In tcp.h line 238 :
#define TCP_IPV4_MATCH(__sk, __cookie, __saddr, __daddr, __ports, __dif)\
(((__sk)->daddr == (__saddr)) && \
((__sk)->rcv_saddr == (__daddr)) && \
((*((__u32 *)&((__sk)->dport)))== (__ports)) && \
(!((__sk)->bound_dev_if) || ((__sk)->bound_dev_if == (__dif))))
the ((*((__u32 *)&((__sk)->dport))) part is nasty because it assumes that the
next field in the structure is 'num'. Why not use the TCP_COMBINED_PORTS
for that.? There are other such nasties in the macros there.
An alternative would be a nice comment in the sock structure.
Alexey ? DaveM ? Someone ? :)
-- - Aviv Greeberg - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Fri Aug 31 2001 - 21:00:29 EST