aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ip.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-14 23:51:49 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:22:50 -0500
commit714e85be3557222bc25f69c252326207c900a7db (patch)
treecb59a6d0a94245dc8575507386af1be31dd7fad9 /include/net/ip.h
parent252e33467a3b016f20dd8df12269cef3b167f21e (diff)
[IPV6]: Assorted trivial endianness annotations.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip.h')
-rw-r--r--include/net/ip.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/net/ip.h b/include/net/ip.h
index 949fa8683626..412e8114667d 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -123,7 +123,7 @@ extern int ip4_datagram_connect(struct sock *sk,
123 * multicast packets. 123 * multicast packets.
124 */ 124 */
125 125
126static inline void ip_tr_mc_map(u32 addr, char *buf) 126static inline void ip_tr_mc_map(__be32 addr, char *buf)
127{ 127{
128 buf[0]=0xC0; 128 buf[0]=0xC0;
129 buf[1]=0x00; 129 buf[1]=0x00;
@@ -238,9 +238,9 @@ static inline void ip_select_ident_more(struct iphdr *iph, struct dst_entry *dst
238 * Map a multicast IP onto multicast MAC for type ethernet. 238 * Map a multicast IP onto multicast MAC for type ethernet.
239 */ 239 */
240 240
241static inline void ip_eth_mc_map(u32 addr, char *buf) 241static inline void ip_eth_mc_map(__be32 naddr, char *buf)
242{ 242{
243 addr=ntohl(addr); 243 __u32 addr=ntohl(naddr);
244 buf[0]=0x01; 244 buf[0]=0x01;
245 buf[1]=0x00; 245 buf[1]=0x00;
246 buf[2]=0x5e; 246 buf[2]=0x5e;
@@ -256,13 +256,14 @@ static inline void ip_eth_mc_map(u32 addr, char *buf)
256 * Leave P_Key as 0 to be filled in by driver. 256 * Leave P_Key as 0 to be filled in by driver.
257 */ 257 */
258 258
259static inline void ip_ib_mc_map(u32 addr, char *buf) 259static inline void ip_ib_mc_map(__be32 naddr, char *buf)
260{ 260{
261 __u32 addr;
261 buf[0] = 0; /* Reserved */ 262 buf[0] = 0; /* Reserved */
262 buf[1] = 0xff; /* Multicast QPN */ 263 buf[1] = 0xff; /* Multicast QPN */
263 buf[2] = 0xff; 264 buf[2] = 0xff;
264 buf[3] = 0xff; 265 buf[3] = 0xff;
265 addr = ntohl(addr); 266 addr = ntohl(naddr);
266 buf[4] = 0xff; 267 buf[4] = 0xff;
267 buf[5] = 0x12; /* link local scope */ 268 buf[5] = 0x12; /* link local scope */
268 buf[6] = 0x40; /* IPv4 signature */ 269 buf[6] = 0x40; /* IPv4 signature */