patch-2.0.31 linux/include/linux/kernel.h

Next file: linux/include/linux/kernelcapi.h
Previous file: linux/include/linux/isdnif.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.30/linux/include/linux/kernel.h linux/include/linux/kernel.h
@@ -68,6 +68,16 @@
  */
 #define fsuser() (current->fsuid == 0)
 
+/*
+ *      Display an IP address in readable format. 
+ */
+  
+#define NIPQUAD(addr) \
+        (((addr) >> 0)  & 0xff), \
+        (((addr) >> 8)  & 0xff), \
+        (((addr) >> 16) & 0xff), \
+        (((addr) >> 24) & 0xff)
+
 #endif /* __KERNEL__ */
 
 #define SI_LOAD_SHIFT	16

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov