Skip to content

Commit 3337034

Browse files
committed
Initial import of iputils
Obtained from <ftp://ftp.inr.ac.ru/ip-routing/iputils-ss020927.tar.gz>. Signed-off-by: YOSHIFUJI Hideaki <[email protected]>
0 parents  commit 3337034

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+14363
-0
lines changed

INSTALL

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
make
3+
make html
4+
make man
5+
lynx doc/iputils.html
6+
Read...
7+
8+
9+
10+
If the first "make" fails, no problems:
11+
12+
make html
13+
lynx doc/iputils.html
14+
Read section "Installation notes"...
15+
16+
17+
18+
But if "make html" fails too, check that DocBook package is installed
19+
on your machine. If it is installed, and nevertheless "make" does not work,
20+
delete iputils and go to sleep. The next day repeat. If even full reset
21+
did not help, I bring apologies. :-)
22+
23+
24+

Makefile

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Path to parent kernel include files directory
2+
KERNEL_INCLUDE=/usr/src/linux/include
3+
LIBC_INCLUDE=/usr/include
4+
5+
DEFINES=
6+
7+
#options if you have a bind>=4.9.4 libresolv (or, maybe, glibc)
8+
LDLIBS=-lresolv
9+
ADDLIB=
10+
11+
ifeq ($(LIBC_INCLUDE)/socketbits.h,$(wildcard $(LIBC_INCLUDE)/socketbits.h))
12+
ifeq ($(LIBC_INCLUDE)/net/if_packet.h,$(wildcard $(LIBC_INCLUDE)/net/if_packet.h))
13+
GLIBCFIX=-Iinclude-glibc -include include-glibc/glibc-bugs.h
14+
endif
15+
endif
16+
ifeq ($(LIBC_INCLUDE)/bits/socket.h,$(wildcard $(LIBC_INCLUDE)/bits/socket.h))
17+
GLIBCFIX=-Iinclude-glibc -include include-glibc/glibc-bugs.h
18+
endif
19+
20+
21+
#options if you compile with libc5, and without a bind>=4.9.4 libresolv
22+
# NOT AVAILABLE. Please, use libresolv.
23+
24+
CC=gcc
25+
# What a pity, all new gccs are buggy and -Werror does not work. Sigh.
26+
#CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g -Werror
27+
CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
28+
CFLAGS=$(CCOPT) $(GLIBCFIX) -I$(KERNEL_INCLUDE) -I../include $(DEFINES)
29+
30+
IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
31+
IPV6_TARGETS=tracepath6 traceroute6 ping6
32+
TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS)
33+
34+
all: check-kernel $(TARGETS)
35+
36+
37+
tftpd: tftpd.o tftpsubs.o
38+
ping: ping.o ping_common.o
39+
ping6: ping6.o ping_common.o
40+
ping.o ping6.o ping_common.o: ping_common.h
41+
tftpd.o tftpsubs.o: tftp.h
42+
43+
rdisc_srv: rdisc_srv.o
44+
45+
rdisc_srv.o: rdisc.c
46+
$(CC) $(CFLAGS) -DRDISC_SERVER -o rdisc_srv.o rdisc.c
47+
48+
49+
check-kernel:
50+
ifeq ($(KERNEL_INCLUDE),)
51+
@echo "Please, set correct KERNEL_INCLUDE"; false
52+
else
53+
@set -e; \
54+
if [ ! -r $(KERNEL_INCLUDE)/linux/autoconf.h ]; then \
55+
echo "Please, set correct KERNEL_INCLUDE"; false; fi
56+
endif
57+
58+
modules: check-kernel
59+
$(MAKE) KERNEL_INCLUDE=$(KERNEL_INCLUDE) -C Modules
60+
61+
man:
62+
$(MAKE) -C doc man
63+
64+
html:
65+
$(MAKE) -C doc html
66+
67+
clean:
68+
@rm -f *.o $(TARGETS)
69+
@$(MAKE) -C Modules clean
70+
@$(MAKE) -C doc clean
71+
72+
snapshot: clean
73+
@if [ ! -e RELNOTES.xxyyzz ]; then echo "Where are RELNOTES?"; exit 1; fi
74+
@if [ "`uname -n`" != "mops" ]; then echo "Not authorized to advance snapshot"; exit 1; fi
75+
@if [ "`pwd`" != "/home/src/BH/hash/iputils" ]; then echo "Wrong place to do snapshot"; exit 1; fi
76+
@if [ -e RELNOTES.bak ]; then echo "Not clean; check tree"; exit 1; fi
77+
@cp RELNOTES RELNOTES.bak
78+
@date "+[%y%m%d]" > RELNOTES
79+
@cat RELNOTES.xxyyzz >> RELNOTES
80+
@echo >> RELNOTES
81+
@cat RELNOTES.bak >> RELNOTES
82+
@date "+static char SNAPSHOT[] = \"%y%m%d\";" > SNAPSHOT.h
83+
@$(MAKE) -C doc snapshot
84+
@rm -f RELNOTES.xxyyzz RELNOTES.bak
85+
@make man
86+
@cd ..; tar c iputils | gzip -9c > `date +iputils-ss%y%m%d.tar.gz`
87+

Modules/Makefile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
KERNEL_INCLUDE=/usr/src/linux/include
2+
3+
4+
CC=gcc
5+
CCOPT=-O2 -Wstrict-prototypes -Wall -Werror -fno-strict-aliasing -fno-common
6+
CFLAGS=-DMODULE -D__KERNEL__ -I$(KERNEL_INCLUDE) $(CCOPT)
7+
8+
9+
all: pg3.o
10+
11+
clean:
12+
@rm -f *.o

0 commit comments

Comments
 (0)