inet_hashtables.h (39d8cda76cfb1178455f9d196b39e773878e6c05) | inet_hashtables.h (3b1e0a655f8eba44ab1ee2a1068d169ccfb853b9) |
---|---|
1/* 2 * INET An implementation of the TCP/IP protocol suite for the LINUX 3 * operating system. INET is implemented using the BSD Socket 4 * interface as the means of communication with the user level. 5 * 6 * Authors: Lotsa people, from code originally in tcp 7 * 8 * This program is free software; you can redistribute it and/or --- 300 unchanged lines hidden (view full) --- 309 ((__force __u64)(__be32)(__daddr))); 310#else /* __LITTLE_ENDIAN */ 311#define INET_ADDR_COOKIE(__name, __saddr, __daddr) \ 312 const __addrpair __name = (__force __addrpair) ( \ 313 (((__force __u64)(__be32)(__daddr)) << 32) | \ 314 ((__force __u64)(__be32)(__saddr))); 315#endif /* __BIG_ENDIAN */ 316#define INET_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif)\ | 1/* 2 * INET An implementation of the TCP/IP protocol suite for the LINUX 3 * operating system. INET is implemented using the BSD Socket 4 * interface as the means of communication with the user level. 5 * 6 * Authors: Lotsa people, from code originally in tcp 7 * 8 * This program is free software; you can redistribute it and/or --- 300 unchanged lines hidden (view full) --- 309 ((__force __u64)(__be32)(__daddr))); 310#else /* __LITTLE_ENDIAN */ 311#define INET_ADDR_COOKIE(__name, __saddr, __daddr) \ 312 const __addrpair __name = (__force __addrpair) ( \ 313 (((__force __u64)(__be32)(__daddr)) << 32) | \ 314 ((__force __u64)(__be32)(__saddr))); 315#endif /* __BIG_ENDIAN */ 316#define INET_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif)\ |
317 (((__sk)->sk_hash == (__hash)) && ((__sk)->sk_net == (__net)) && \ | 317 (((__sk)->sk_hash == (__hash)) && sock_net((__sk)) == (__net) && \ |
318 ((*((__addrpair *)&(inet_sk(__sk)->daddr))) == (__cookie)) && \ 319 ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \ 320 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) 321#define INET_TW_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif)\ | 318 ((*((__addrpair *)&(inet_sk(__sk)->daddr))) == (__cookie)) && \ 319 ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \ 320 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) 321#define INET_TW_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif)\ |
322 (((__sk)->sk_hash == (__hash)) && ((__sk)->sk_net == (__net)) && \ | 322 (((__sk)->sk_hash == (__hash)) && sock_net((__sk)) == (__net) && \ |
323 ((*((__addrpair *)&(inet_twsk(__sk)->tw_daddr))) == (__cookie)) && \ 324 ((*((__portpair *)&(inet_twsk(__sk)->tw_dport))) == (__ports)) && \ 325 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) 326#else /* 32-bit arch */ 327#define INET_ADDR_COOKIE(__name, __saddr, __daddr) 328#define INET_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif) \ | 323 ((*((__addrpair *)&(inet_twsk(__sk)->tw_daddr))) == (__cookie)) && \ 324 ((*((__portpair *)&(inet_twsk(__sk)->tw_dport))) == (__ports)) && \ 325 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) 326#else /* 32-bit arch */ 327#define INET_ADDR_COOKIE(__name, __saddr, __daddr) 328#define INET_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif) \ |
329 (((__sk)->sk_hash == (__hash)) && ((__sk)->sk_net == (__net)) && \ | 329 (((__sk)->sk_hash == (__hash)) && sock_net((__sk)) == (__net) && \ |
330 (inet_sk(__sk)->daddr == (__saddr)) && \ 331 (inet_sk(__sk)->rcv_saddr == (__daddr)) && \ 332 ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \ 333 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) 334#define INET_TW_MATCH(__sk, __net, __hash,__cookie, __saddr, __daddr, __ports, __dif) \ | 330 (inet_sk(__sk)->daddr == (__saddr)) && \ 331 (inet_sk(__sk)->rcv_saddr == (__daddr)) && \ 332 ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \ 333 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) 334#define INET_TW_MATCH(__sk, __net, __hash,__cookie, __saddr, __daddr, __ports, __dif) \ |
335 (((__sk)->sk_hash == (__hash)) && ((__sk)->sk_net == (__net)) && \ | 335 (((__sk)->sk_hash == (__hash)) && sock_net((__sk)) == (__net) && \ |
336 (inet_twsk(__sk)->tw_daddr == (__saddr)) && \ 337 (inet_twsk(__sk)->tw_rcv_saddr == (__daddr)) && \ 338 ((*((__portpair *)&(inet_twsk(__sk)->tw_dport))) == (__ports)) && \ 339 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) 340#endif /* 64-bit arch */ 341 342/* 343 * Sockets in TCP_CLOSE state are _always_ taken out of the hash, so we need --- 55 unchanged lines hidden --- | 336 (inet_twsk(__sk)->tw_daddr == (__saddr)) && \ 337 (inet_twsk(__sk)->tw_rcv_saddr == (__daddr)) && \ 338 ((*((__portpair *)&(inet_twsk(__sk)->tw_dport))) == (__ports)) && \ 339 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) 340#endif /* 64-bit arch */ 341 342/* 343 * Sockets in TCP_CLOSE state are _always_ taken out of the hash, so we need --- 55 unchanged lines hidden --- |