Skip to content

Commit 9402a40

Browse files
committed
initial release of the software into public domain
0 parents  commit 9402a40

Some content is hidden

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

68 files changed

+14786
-0
lines changed

LICENSE.txt

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2018-2019, Ericsson
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
* Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Makefile

+187
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
2+
###
3+
###
4+
### ######################################################################
5+
### ####### #########
6+
### #### SSS PPPP I N N DDDD U U M M PPPP ####
7+
### # S P P I NN N D D U U MM MM P P #
8+
### # SSS PPPP I N NN N D D U U M M M PPPP #
9+
### # S P I N NN D D U U M M P #
10+
### #### SSS P I N N DDDD UUU M M P ####
11+
### ####### #########
12+
### ######################################################################
13+
###
14+
### SPINDUMP (C) 2018-2019 BY ERICSSON RESEARCH
15+
### AUTHOR: JARI ARKKO
16+
###
17+
###
18+
19+
SPINDUMP_LIB_HEADERS = spindump_util.h \
20+
spindump_packet.h \
21+
spindump_protocols.h \
22+
spindump_capture.h \
23+
spindump_connections_structs.h \
24+
spindump_connections.h \
25+
spindump_connections_set.h \
26+
spindump_connections_set_iterator.h \
27+
spindump_table_structs.h \
28+
spindump_table.h \
29+
spindump_analyze.h \
30+
spindump_analyze_icmp.h \
31+
spindump_analyze_tcp.h \
32+
spindump_analyze_udp.h \
33+
spindump_analyze_dns.h \
34+
spindump_analyze_coap.h \
35+
spindump_analyze_tls_parser.h \
36+
spindump_analyze_quic.h \
37+
spindump_analyze_quic_parser.h \
38+
spindump_analyze_aggregate.h \
39+
spindump_reversedns.h \
40+
spindump_rtt.h \
41+
spindump_mid.h \
42+
spindump_seq.h \
43+
spindump_spin.h \
44+
spindump_spin_structs.h \
45+
spindump_stats.h \
46+
spindump_remote.h \
47+
spindump_report.h \
48+
spindump_main.h
49+
SPINDUMP_LIB_SOURCES = spindump_util.c \
50+
spindump_capture.c \
51+
spindump_connections.c \
52+
spindump_connections_print.c \
53+
spindump_connections_new.c \
54+
spindump_connections_search.c \
55+
spindump_connections_set.c \
56+
spindump_connections_set_iterator.c \
57+
spindump_packet.c \
58+
spindump_protocols.c \
59+
spindump_table.c \
60+
spindump_analyze.c \
61+
spindump_analyze_icmp.c \
62+
spindump_analyze_tcp.c \
63+
spindump_analyze_udp.c \
64+
spindump_analyze_dns.c \
65+
spindump_analyze_coap.c \
66+
spindump_analyze_tls_parser.c \
67+
spindump_analyze_quic.c \
68+
spindump_analyze_quic_parser.c \
69+
spindump_analyze_aggregate.c \
70+
spindump_reversedns.c \
71+
spindump_rtt.c \
72+
spindump_mid.c \
73+
spindump_seq.c \
74+
spindump_spin.c \
75+
spindump_stats.c \
76+
spindump_remote.c \
77+
spindump_report.c
78+
SPINDUMP_LIB_OBJECTS = spindump_util.o \
79+
spindump_connections.o \
80+
spindump_connections_print.o \
81+
spindump_connections_new.o \
82+
spindump_connections_search.o \
83+
spindump_connections_set.o \
84+
spindump_connections_set_iterator.o \
85+
spindump_packet.o \
86+
spindump_protocols.o \
87+
spindump_table.o \
88+
spindump_analyze.o \
89+
spindump_analyze_icmp.o \
90+
spindump_analyze_tcp.o \
91+
spindump_analyze_udp.o \
92+
spindump_analyze_dns.o \
93+
spindump_analyze_coap.o \
94+
spindump_analyze_tls_parser.o \
95+
spindump_analyze_quic.o \
96+
spindump_analyze_quic_parser.o \
97+
spindump_analyze_aggregate.o \
98+
spindump_rtt.o \
99+
spindump_mid.o \
100+
spindump_seq.o \
101+
spindump_spin.o \
102+
spindump_stats.o
103+
SPINDUMP_CMD_SOURCES = spindump_main.c
104+
SPINDUMP_CMD_OBJECTS = spindump_main.o
105+
SPINDUMP_CMDLIB_OBJECTS = spindump_capture.o \
106+
spindump_reversedns.o \
107+
spindump_remote.o \
108+
spindump_report.o
109+
SPINDUMP_TST_SOURCES = spindump_test.c
110+
SPINDUMP_TST_OBJECTS = spindump_test.o
111+
SPINDUMP_LIB = spindump.a
112+
SPINDUMP_CMDLIB = spindumpcmd.a
113+
SPINDUMP_CMD = spindump
114+
SPINDUMP_TST = spindump_test
115+
SPINDUMP_TAR = spindump.tar.gz
116+
SPINDUMP_OTHER_SOURCES = Makefile \
117+
README.md
118+
SPINDUMP_ALL_SOURCES = $(SPINDUMP_LIB_HEADERS) \
119+
$(SPINDUMP_LIB_SOURCES) \
120+
$(SPINDUMP_CMD_SOURCES) \
121+
$(SPINDUMP_TST_SOURCES) \
122+
$(SPINDUMP_OTHER_SOURCES)
123+
CFLAGS = -Wall --pedantic $(OPTFLAGS)
124+
OPTFLAGS = -O3
125+
#OPTFLAGS = -g
126+
LDFLAGS = -lpcap -lncurses -lm
127+
CC = gcc
128+
LD = $(CC)
129+
AR = ar
130+
131+
all: $(SPINDUMP_LIB) \
132+
$(SPINDUMP_LIB) \
133+
$(SPINDUMP_CMD) \
134+
$(SPINDUMP_TST) \
135+
$(SPINDUMP_TAR)
136+
137+
$(SPINDUMP_CMD): $(SPINDUMP_CMD_OBJECTS) \
138+
$(SPINDUMP_CMDLIB) \
139+
$(SPINDUMP_LIB)
140+
$(LD) -o $(SPINDUMP_CMD) $(SPINDUMP_CMD_OBJECTS) $(SPINDUMP_CMDLIB) $(SPINDUMP_LIB) $(LDFLAGS)
141+
142+
$(SPINDUMP_TST): $(SPINDUMP_TST_OBJECTS) \
143+
$(SPINDUMP_LIB)
144+
$(LD) -o $(SPINDUMP_TST) $(SPINDUMP_TST_OBJECTS) $(SPINDUMP_LIB) $(LDFLAGS)
145+
./$(SPINDUMP_TST)
146+
147+
$(SPINDUMP_LIB_OBJECTS): $(SPINDUMP_LIB_HEADERS) \
148+
$(SPINDUMP_OTHER_SOURCES)
149+
150+
$(SPINDUMP_CMD_OBJECTS): $(SPINDUMP_LIB_HEADERS) \
151+
$(SPINDUMP_OTHER_SOURCES)
152+
153+
$(SPINDUMP_CMDLIB_OBJECTS): $(SPINDUMP_LIB_HEADERS) \
154+
$(SPINDUMP_OTHER_SOURCES)
155+
156+
$(SPINDUMP_LIB): $(SPINDUMP_LIB_OBJECTS)
157+
$(AR) -crv $(SPINDUMP_LIB) $(SPINDUMP_LIB_OBJECTS)
158+
159+
$(SPINDUMP_CMDLIB): $(SPINDUMP_CMDLIB_OBJECTS)
160+
$(AR) -crv $(SPINDUMP_CMDLIB) $(SPINDUMP_CMDLIB_OBJECTS)
161+
162+
.c.o:
163+
$(CC) -c $(CFLAGS) $<
164+
165+
$(SPINDUMP_TAR): $(SPINDUMP_ALL_SOURCES)
166+
-rm -f $(SPINDUMP_TAR)
167+
tar czf $(SPINDUMP_TAR) $(SPINDUMP_ALL_SOURCES)
168+
169+
test: $(SPINDUMP_TST)
170+
171+
install: $(SPINDUMP_CMD)
172+
cp -f $(SPINDUMP_CMD) /usr/local/bin/$(SPINDUMP_CMD)
173+
174+
uninstall:
175+
rm -f /usr/local/bin/$(SPINDUMP_CMD)
176+
177+
wc:
178+
wc $(SPINDUMP_ALL_SOURCES)
179+
180+
clean:
181+
-rm -f $(SPINDUMP_TAR)
182+
-rm -f $(SPINDUMP_LIB)
183+
-rm -f $(SPINDUMP_CMDLIB)
184+
-rm -f $(SPINDUMP_LIB_OBJECTS) $(SPINDUMP_CMD_OBJECTS) $(SPINDUMP_TST_OBJECTS)
185+
-rm -f $(SPINDUMP_CMD) $(SPINDUMP_TST)
186+
-rm -f spindump.debug
187+

0 commit comments

Comments
 (0)