Skip to content

Commit 9f1010e

Browse files
committed
initialize repo
0 parents  commit 9f1010e

27 files changed

+2873
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.*.d
2+
*.o
3+
sr

.vscode/._.browse.VC.db

299 Bytes
Binary file not shown.

.vscode/.browse.VC.db

220 KB
Binary file not shown.

319.tar

10 KB
Binary file not shown.

Makefile

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
#------------------------------------------------------------------------------
2+
# File: Makefile
3+
#
4+
# Note: This Makefile requires GNU make.
5+
#
6+
# (c) 2001,2000 Stanford University
7+
#
8+
#------------------------------------------------------------------------------
9+
10+
all : sr
11+
12+
CC = gcc
13+
14+
OSTYPE = $(shell uname)
15+
16+
ifeq ($(OSTYPE),CYGWIN_NT-5.1)
17+
ARCH = -D_CYGWIN_
18+
endif
19+
20+
ifeq ($(OSTYPE),Linux)
21+
ARCH = -D_LINUX_
22+
SOCK = -lnsl -lresolv
23+
endif
24+
25+
ifeq ($(OSTYPE),SunOS)
26+
ARCH = -D_SOLARIS_
27+
SOCK = -lnsl -lsocket -lresolv
28+
endif
29+
30+
ifeq ($(OSTYPE),Darwin)
31+
ARCH = -D_DARWIN_
32+
SOCK = -lresolv
33+
endif
34+
35+
CFLAGS = -g -Wall -std=gnu99 -D_DEBUG_ -DVNL $(ARCH)
36+
37+
LIBS= $(SOCK) -lm
38+
PFLAGS= -follow-child-processes=yes -cache-dir=/tmp/${USER}
39+
PURIFY= purify ${PFLAGS}
40+
41+
sr_SRCS = vnlconn.c sr_router.c sr_main.c \
42+
sr_if.c sr_rt.c sr_vns_comm.c \
43+
sr_dumper.c sha1.c
44+
45+
sr_OBJS = $(patsubst %.c,%.o,$(sr_SRCS))
46+
sr_DEPS = $(patsubst %.c,.%.d,$(sr_SRCS))
47+
48+
$(sr_OBJS) : %.o : %.c
49+
$(CC) -c $(CFLAGS) $< -o $@
50+
51+
$(sr_DEPS) : .%.d : %.c
52+
$(CC) -MM $(CFLAGS) $< > $@
53+
54+
include $(sr_DEPS)
55+
56+
sr : $(sr_OBJS)
57+
$(CC) $(CFLAGS) -o sr $(sr_OBJS) $(LIBS)
58+
59+
sr.purify : $(sr_OBJS)
60+
$(PURIFY) $(CC) $(CFLAGS) -o sr.purify $(sr_OBJS) $(LIBS)
61+
62+
.PHONY : clean clean-deps dist
63+
64+
clean:
65+
rm -f *.o *~ core sr *.dump *.tar tags
66+
67+
clean-deps:
68+
rm -f .*.d
69+
70+
dist-clean: clean clean-deps
71+
rm -f .*.swp sr_stub.tar.gz
72+
73+
dist: dist-clean
74+
(cd ..; tar -X stub/exclude -cvf sr_stub.tar stub/; gzip sr_stub.tar); \
75+
mv ../sr_stub.tar.gz .
76+
77+
tags:
78+
ctags *.c

auth_key

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.................................................................

rtable

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
0.0.0.0 172.29.10.105 0.0.0.0 eth0
2+
172.29.10.96 0.0.0.0 255.255.255.248 eth1
3+
172.29.10.112 0.0.0.0 255.255.255.248 eth2

0 commit comments

Comments
 (0)