summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHideaki Yoshifuji <yoshfuji@linux-ipv6.org>2003-05-19 09:48:44 -0700
committerDavid S. Miller <davem@nuts.ninka.net>2003-05-19 09:48:44 -0700
commit362807fc1df8a70a9fafc0b4cb137452d4120dfe (patch)
tree3cf9650b081e1909a9b80cf5e4c35457cc44c6f2 /include
parentfa7c9b6402c5805e20e5ef7af5f0c910b515d9d7 (diff)
[IPV6]: Move NIP6 macro into general header.
Diffstat (limited to 'include')
-rw-r--r--include/linux/kernel.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 121df411b092..131edf4cdbb4 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -134,6 +134,16 @@ extern void dump_stack(void);
((unsigned char *)&addr)[2], \
((unsigned char *)&addr)[3]
+#define NIP6(addr) \
+ ntohs((addr).s6_addr16[0]), \
+ ntohs((addr).s6_addr16[1]), \
+ ntohs((addr).s6_addr16[2]), \
+ ntohs((addr).s6_addr16[3]), \
+ ntohs((addr).s6_addr16[4]), \
+ ntohs((addr).s6_addr16[5]), \
+ ntohs((addr).s6_addr16[6]), \
+ ntohs((addr).s6_addr16[7])
+
#if defined(__LITTLE_ENDIAN)
#define HIPQUAD(addr) \
((unsigned char *)&addr)[3], \