* TCP_IPV4_MATCH macro
@ 2001-08-28 14:43 Aviv Greenberg
0 siblings, 0 replies; only message in thread
From: Aviv Greenberg @ 2001-08-28 14:43 UTC (permalink / raw)
To: linux-kernel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-08-28 14:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-28 14:43 TCP_IPV4_MATCH macro Aviv Greenberg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.