Now the scons part.
TestDir='tests'
-target = 'p2tp'
+target = 'swift'
source = [ 'bin64.cpp','sha1.cpp','hashtree.cpp','datagram.cpp','bins.cpp',
- 'transfer.cpp', 'p2tp.cpp', 'sendrecv.cpp', 'send_control.cpp',
+ 'transfer.cpp', 'swift.cpp', 'sendrecv.cpp', 'send_control.cpp',
'compat/hirestimeofday.cpp', 'compat.cpp', 'compat/util.cpp']
env = Environment()
# Make sure scons finds std MSVC include files
if not 'INCLUDE' in os.environ:
- print "p2tp: Please run scons in a Visual Studio Command Prompt"
+ print "swift: Please run scons in a Visual Studio Command Prompt"
sys.exit(-1)
include = os.environ['INCLUDE']
Import("libpath")
cpppath = env["CPPPATH"]
-libs = ['p2tp'] + libs # order is important, crypto needs to be last
+libs = ['swift'] + libs # order is important, crypto needs to be last
if sys.platform == "win32":
cpppath = ".."
*/
#include <stdio.h>
#include "hashtree.h"
+#include "swift.h"
int main (int argn, char** args) {
cpppath = env["CPPPATH"]
if DEBUG and sys.platform == "win32":
- libs = ['p2tp','gtestd'] + libs # order is important, crypto needs to be last
+ libs = ['swift','gtestd'] + libs # order is important, crypto needs to be last
else:
- libs = ['p2tp','gtest'] + libs # order is important, crypto needs to be last
+ libs = ['swift','gtest'] + libs # order is important, crypto needs to be last
if sys.platform == "win32":
cpppath = ".."
#include <vector>
#include <deque>
#include "datagram.h"
-#include "p2tp.h"
+#include "swift.h"
#include <gtest/gtest.h>
-using namespace p2tp;
+using namespace swift;
using namespace std;
/**
int main (int argc, char** argv) {
int opt;
- p2tp::LibraryInit();
+ swift::LibraryInit();
printf("Warning: use the script to set up dummynet!\n");
testing::InitGoogleTest(&argc, argv);
dest_addr = htonl(INADDR_LOOPBACK);