summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ip/Makefile8
-rw-r--r--ip/ip.c17
2 files changed, 25 insertions, 0 deletions
diff --git a/ip/Makefile b/ip/Makefile
new file mode 100644
index 0000000..4256be9
--- /dev/null
+++ b/ip/Makefile
@@ -0,0 +1,8 @@
+# $Id$
+
+PROG= ip
+CFLAGS+= -Wall
+NOMAN=
+BINDIR= /var/www/cgi-bin
+
+.include <bsd.prog.mk>
diff --git a/ip/ip.c b/ip/ip.c
new file mode 100644
index 0000000..fd68cf4
--- /dev/null
+++ b/ip/ip.c
@@ -0,0 +1,17 @@
+/* $Id$ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main()
+{
+ char *ra;
+
+ printf("Content-type: %s\r\n\r\n", "text/plain");
+
+ if (ra = getenv("REMOTE_ADDR"))
+ printf("%s\n", ra);
+
+ return 0;
+}