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

Next file: linux/include/linux/openpic.h
Previous file: linux/include/linux/if_arcnet.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.53/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