Thread (33 messages) 33 messages, 7 authors, 2002-10-25

Re: [PATCH] IPv6: Allow Both IPv6 and IPv4 Sockets on the Same Port Number (IPV6_V6ONLY Support)

From: <hidden>
Date: 2002-10-03 03:47:45
Also in: lkml

Quoting YOSHIFUJI Hideaki / $B5HF#1QL@(B [off-list ref]: 
 
+#define IN6_IS_ADDR_V4MAPPED(a)				\ 
+	((((a)->s6_addr32[0]) == 0) &&			\ 
+	 (((a)->s6_addr32[1]) == 0) &&			\ 
+	 (((a)->s6_addr32[2]) == __constant_htonl(0x0000ffff))) 
 
Please use plain htonl, __constant_htonl is only needed in static 
initializations, in all other cases with constants as a parameter it 
generates the same code as htonl, so lets prefer using the shorter, 
more readable format. 
 
- Arnaldo 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help