Skip to content

Commit 328684d

Browse files
committed
Implemented GPLv3 license. Implemented git_version.c. Closes appneta#3.
1 parent b035de7 commit 328684d

Some content is hidden

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

123 files changed

+2098
-2447
lines changed

LICENSE

Lines changed: 681 additions & 0 deletions
Large diffs are not rendered by default.

Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ dlt_names:
4646
cat @SAVEFILE_C@ | $(top_builddir)/scripts/dlt2name.pl src/dlt_names.h
4747

4848
version:
49-
-rm -f src/common/svn_version.c
50-
cd src/common && make svn_version.c
49+
-rm -f src/common/git_version.c
50+
cd src/common && make git_version.c
5151

5252
distclean-local:
5353
-rm -rf autom4te.cache doxygen

Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,8 +786,8 @@ dlt_names:
786786
cat @SAVEFILE_C@ | $(top_builddir)/scripts/dlt2name.pl src/dlt_names.h
787787

788788
version:
789-
-rm -f src/common/svn_version.c
790-
cd src/common && make svn_version.c
789+
-rm -f src/common/git_version.c
790+
cd src/common && make git_version.c
791791

792792
distclean-local:
793793
-rm -rf autom4te.cache doxygen

docs/CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ $Id$
22

33
??/??/2013 Version 3.5.0
44
- Implement pseudo-CRC to improve tcpedit performance (appneta #8)
5+
- Switch from BSD to GPLv3 license (appneta #5)
56
- Add --fast-flows option to tcpreplay (appneta #4)
67
- Removed sleep-accel option (appneta #2)
78
- Enhance accuracy and performance of --mbps option (appneta #2)

docs/CREDIT

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
$Id$
22

33
tcpreplay and it's associated utilities (tcpprep, tcprewrite and flowreplay)
4-
were designed and written by Aaron Turner, and maintained by Fred Klassen
5-
of AppNeta Inc.
4+
were designed and written by Aaron Turner, and maintained and updated by
5+
Fred Klassen of AppNeta Inc.
66

77
This product includes software developed by the University of California,
88
Berkeley, Lawrence Berkeley Laboratory and its contributors.

docs/HACKING

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ was significantly long ago, this document may be out of date.]
99
If you contribute code the following will happen:
1010
a) You will be given credit in the CREDITS file
1111
b) Your code will be licensed under the same license as that of tcpreplay
12-
c) You will be assigning your copyright to me- Aaron Turner
12+
c) You will be assigning your copyright to Aaron Turner
13+
and Fred Klassen - Appneta Inc.
1314

1415
If you have any questions regarding any of the three above stipulations,
1516
feel free to email the list at: [email protected]
@@ -49,7 +50,7 @@ The file layout is pretty simple:
4950
libtcpedit supports a plugin based architecture for handling different DLT
5051
types. If you wish to add support for another DLT type, you should read:
5152

52-
http://tcpreplay.synfin.net/trac/wiki/tcpeditDeveloper
53+
http://tcpreplay.synfin.net/wiki/tcpeditDeveloper
5354

5455
Which contains information on creating new DLT plugins.
5556

docs/LICENSE

Lines changed: 0 additions & 31 deletions
This file was deleted.

lib/strlcpy.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
* Copyright (c) 2001-2010 Aaron Turner <aturner at synfin dot net>
3+
* Copyright (c) 2013 Fred Klassen <fklassen at appneta dot com> - AppNeta Inc.
4+
*
5+
* The Tcpreplay Suite of tools is free software: you can redistribute it
6+
* and/or modify it under the terms of the GNU General Public License as
7+
* published by the Free Software Foundation, either version 3 of the
8+
* License, or with the authors permission any later version.
9+
*
10+
* The Tcpreplay Suite is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with the Tcpreplay Suite. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
119
#ifndef _STRLCPY_H_
220
#define _STRLCPY_H_
321

src/.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,4 @@ flowreplay
88
tcpbridge
99
defines.h
1010
config.h
11-
tcpedit_stub.h
12-
*.1
1311
*_opts.c

src/bridge.c

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,21 @@
11
/* $Id$ */
22

33
/*
4-
* Copyright (c) 2001-2010 Aaron Turner.
5-
* All rights reserved.
4+
* Copyright (c) 2001-2010 Aaron Turner <aturner at synfin dot net>
5+
* Copyright (c) 2013 Fred Klassen <fklassen at appneta dot com> - AppNeta Inc.
66
*
7-
* Redistribution and use in source and binary forms, with or without
8-
* modification, are permitted provided that the following conditions
9-
* are met:
7+
* The Tcpreplay Suite of tools is free software: you can redistribute it
8+
* and/or modify it under the terms of the GNU General Public License as
9+
* published by the Free Software Foundation, either version 3 of the
10+
* License, or with the authors permission any later version.
1011
*
11-
* 1. Redistributions of source code must retain the above copyright
12-
* notice, this list of conditions and the following disclaimer.
13-
* 2. Redistributions in binary form must reproduce the above copyright
14-
* notice, this list of conditions and the following disclaimer in the
15-
* documentation and/or other materials provided with the distribution.
16-
* 3. Neither the names of the copyright owners 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.
12+
* The Tcpreplay Suite is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
1916
*
20-
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
21-
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22-
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23-
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24-
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
26-
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27-
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
28-
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29-
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
30-
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17+
* You should have received a copy of the GNU General Public License
18+
* along with the Tcpreplay Suite. If not, see <http://www.gnu.org/licenses/>.
3119
*/
3220

3321
#include "config.h"

src/bridge.h

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,24 @@
11
/* $Id$ */
22

33
/*
4-
* Copyright (c) 2001-2010 Aaron Turner.
5-
* All rights reserved.
4+
* Copyright (c) 2001-2010 Aaron Turner <aturner at synfin dot net>
5+
* Copyright (c) 2013 Fred Klassen <fklassen at appneta dot com> - AppNeta Inc.
66
*
7-
* Redistribution and use in source and binary forms, with or without
8-
* modification, are permitted provided that the following conditions
9-
* are met:
7+
* The Tcpreplay Suite of tools is free software: you can redistribute it
8+
* and/or modify it under the terms of the GNU General Public License as
9+
* published by the Free Software Foundation, either version 3 of the
10+
* License, or with the authors permission any later version.
1011
*
11-
* 1. Redistributions of source code must retain the above copyright
12-
* notice, this list of conditions and the following disclaimer.
13-
* 2. Redistributions in binary form must reproduce the above copyright
14-
* notice, this list of conditions and the following disclaimer in the
15-
* documentation and/or other materials provided with the distribution.
16-
* 3. Neither the names of the copyright owners 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.
12+
* The Tcpreplay Suite is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
1916
*
20-
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
21-
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22-
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23-
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24-
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
26-
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27-
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
28-
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29-
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
30-
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17+
* You should have received a copy of the GNU General Public License
18+
* along with the Tcpreplay Suite. If not, see <http://www.gnu.org/licenses/>.
3119
*/
3220

21+
3322
#ifndef __BRIDGE_H__
3423
#define __BRIDGE_H__
3524

src/common.h

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
* Copyright (c) 2001-2010 Aaron Turner <aturner at synfin dot net>
3+
* Copyright (c) 2013 Fred Klassen <fklassen at appneta dot com> - AppNeta Inc.
4+
*
5+
* The Tcpreplay Suite of tools is free software: you can redistribute it
6+
* and/or modify it under the terms of the GNU General Public License as
7+
* published by the Free Software Foundation, either version 3 of the
8+
* License, or with the authors permission any later version.
9+
*
10+
* The Tcpreplay Suite is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with the Tcpreplay Suite. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
119
#ifndef __COMMON_H__
220
#define __COMMON_H__
321
#include <assert.h>
@@ -22,7 +40,7 @@
2240
#include "common/sendpacket.h"
2341
#include "common/interface.h"
2442

25-
const char *svn_version(void); /* svn_version.c */
43+
const char *git_version(void); /* git_version.c */
2644

2745
#endif
2846

src/common/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
cmake_install.cmake
22
git_version.c
3-
svn_version.c

src/common/Makefile.am

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# $Id: Makefile.am 1621 2006-11-09 07:01:37Z aturner $
22
noinst_LIBRARIES = libcommon.a
33

4-
BUILT_SOURCES = svn_version.c
4+
BUILT_SOURCES = git_version.c
55

6-
svn_version.c:
7-
$(ECHO) -n 'const char SVN_Version[] = "' > svn_version.c
8-
svnversion -n ../.. >> svn_version.c
9-
$(ECHO) '";' >> svn_version.c
10-
$(ECHO) 'const char *svn_version(void) {' >> svn_version.c
11-
$(ECHO) ' return SVN_Version;' >> svn_version.c
12-
$(ECHO) '}' >> svn_version.c
6+
git_version.c:
7+
$(ECHO) -n 'const char GIT_Version[] = "git:' > git_version.c
8+
git describe --always --abbrev=0 --dirty | tr -d '\n' | tr -d '\r' >> git_version.c
9+
$(ECHO) '";' >> git_version.c
10+
$(ECHO) 'const char *git_version(void) {' >> git_version.c
11+
$(ECHO) ' return GIT_Version;' >> git_version.c
12+
$(ECHO) '}' >> git_version.c
1313

1414
libcommon_a_SOURCES = cidr.c err.c list.c cache.c services.c get.c \
1515
fakepcap.c fakepcapnav.c fakepoll.c xX.c utils.c \
16-
timer.c svn_version.c abort.c sendpacket.c \
16+
timer.c git_version.c abort.c sendpacket.c \
1717
dlt_names.c mac.c interface.c rdtsc.c
1818

1919
if ENABLE_TCPDUMP
@@ -33,4 +33,4 @@ noinst_HEADERS = cidr.h err.h list.h cache.h services.h get.h \
3333

3434
MOSTLYCLEANFILES = *~
3535

36-
MAINTAINERCLEANFILES = Makefile.in svn_version.c
36+
MAINTAINERCLEANFILES = Makefile.in git_version.c

src/common/Makefile.in

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ libcommon_a_AR = $(AR) $(ARFLAGS)
5555
@SYSTEM_STRLCPY_FALSE@libcommon_a_DEPENDENCIES = ../../lib/libstrl.a
5656
am__libcommon_a_SOURCES_DIST = cidr.c err.c list.c cache.c services.c \
5757
get.c fakepcap.c fakepcapnav.c fakepoll.c xX.c utils.c timer.c \
58-
svn_version.c abort.c sendpacket.c dlt_names.c mac.c \
58+
git_version.c abort.c sendpacket.c dlt_names.c mac.c \
5959
interface.c rdtsc.c tcpdump.c
6060
@ENABLE_TCPDUMP_TRUE@am__objects_1 = tcpdump.$(OBJEXT)
6161
am_libcommon_a_OBJECTS = cidr.$(OBJEXT) err.$(OBJEXT) list.$(OBJEXT) \
6262
cache.$(OBJEXT) services.$(OBJEXT) get.$(OBJEXT) \
6363
fakepcap.$(OBJEXT) fakepcapnav.$(OBJEXT) fakepoll.$(OBJEXT) \
6464
xX.$(OBJEXT) utils.$(OBJEXT) timer.$(OBJEXT) \
65-
svn_version.$(OBJEXT) abort.$(OBJEXT) sendpacket.$(OBJEXT) \
65+
git_version.$(OBJEXT) abort.$(OBJEXT) sendpacket.$(OBJEXT) \
6666
dlt_names.$(OBJEXT) mac.$(OBJEXT) interface.$(OBJEXT) \
6767
rdtsc.$(OBJEXT) $(am__objects_1)
6868
libcommon_a_OBJECTS = $(am_libcommon_a_OBJECTS)
@@ -238,10 +238,10 @@ top_srcdir = @top_srcdir@
238238

239239
# $Id: Makefile.am 1621 2006-11-09 07:01:37Z aturner $
240240
noinst_LIBRARIES = libcommon.a
241-
BUILT_SOURCES = svn_version.c
241+
BUILT_SOURCES = git_version.c
242242
libcommon_a_SOURCES = cidr.c err.c list.c cache.c services.c get.c \
243243
fakepcap.c fakepcapnav.c fakepoll.c xX.c utils.c timer.c \
244-
svn_version.c abort.c sendpacket.c dlt_names.c mac.c \
244+
git_version.c abort.c sendpacket.c dlt_names.c mac.c \
245245
interface.c rdtsc.c $(am__append_1)
246246
AM_CFLAGS = -I.. -I../.. $(LNAV_CFLAGS) @LDNETINC@
247247
@SYSTEM_STRLCPY_FALSE@libcommon_a_LIBADD = ../../lib/libstrl.a
@@ -251,7 +251,7 @@ noinst_HEADERS = cidr.h err.h list.h cache.h services.h get.h \
251251
dlt_names.h mac.h interface.h rdtsc.h
252252

253253
MOSTLYCLEANFILES = *~
254-
MAINTAINERCLEANFILES = Makefile.in svn_version.c
254+
MAINTAINERCLEANFILES = Makefile.in git_version.c
255255
all: $(BUILT_SOURCES)
256256
$(MAKE) $(AM_MAKEFLAGS) all-am
257257

@@ -310,13 +310,13 @@ distclean-compile:
310310
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fakepcapnav.Po@am__quote@
311311
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fakepoll.Po@am__quote@
312312
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get.Po@am__quote@
313+
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/git_version.Po@am__quote@
313314
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interface.Po@am__quote@
314315
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Po@am__quote@
315316
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mac.Po@am__quote@
316317
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdtsc.Po@am__quote@
317318
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendpacket.Po@am__quote@
318319
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/services.Po@am__quote@
319-
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/svn_version.Po@am__quote@
320320
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpdump.Po@am__quote@
321321
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer.Po@am__quote@
322322
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@
@@ -552,13 +552,13 @@ uninstall-am:
552552
pdf pdf-am ps ps-am tags uninstall uninstall-am
553553

554554

555-
svn_version.c:
556-
$(ECHO) -n 'const char SVN_Version[] = "' > svn_version.c
557-
svnversion -n ../.. >> svn_version.c
558-
$(ECHO) '";' >> svn_version.c
559-
$(ECHO) 'const char *svn_version(void) {' >> svn_version.c
560-
$(ECHO) ' return SVN_Version;' >> svn_version.c
561-
$(ECHO) '}' >> svn_version.c
555+
git_version.c:
556+
$(ECHO) -n 'const char GIT_Version[] = "git:' > git_version.c
557+
git describe --always --abbrev=0 --dirty | tr -d '\n' | tr -d '\r' >> git_version.c
558+
$(ECHO) '";' >> git_version.c
559+
$(ECHO) 'const char *git_version(void) {' >> git_version.c
560+
$(ECHO) ' return GIT_Version;' >> git_version.c
561+
$(ECHO) '}' >> git_version.c
562562

563563
# Tell versions [3.59,3.63) of GNU make to not export all variables.
564564
# Otherwise a system limit (for SysV at least) may be exceeded.

0 commit comments

Comments
 (0)