added classic

This commit is contained in:
wangyu- 2017-09-15 04:07:59 -05:00
parent e01aecd78b
commit fc5cbc9b0c
5 changed files with 1295 additions and 3 deletions

1273
classic.cpp Normal file

File diff suppressed because it is too large Load Diff

18
classic.h Normal file
View File

@ -0,0 +1,18 @@
/*
* classic.h
*
* Created on: Sep 15, 2017
* Author: root
*/
#ifndef CLASSIC_H_
#define CLASSIC_H_
namespace classic
{
int main(int argc, char *argv[]);
}
#endif /* CLASSIC_H_ */

View File

@ -4,6 +4,7 @@
#include "lib/rs.h"
#include "packet.h"
#include "conn_manager.h"
#include "classic.h"
using namespace std;
typedef unsigned long long u64_t; //this works on most platform,avoid using the PRId64

View File

@ -8,7 +8,7 @@ cc_arm= /toolchains/arm-2014.05/bin/arm-none-linux-gnueabi-g++
#cc_bcm2708=/home/wangyu/raspberry/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++
FLAGS= -std=c++11 -Wall -Wextra -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers
SOURCES=main.cpp log.cpp common.cpp lib/fec.c lib/rs.c packet.cpp conn_manager.cpp
SOURCES=main.cpp log.cpp common.cpp lib/fec.c lib/rs.c packet.cpp conn_manager.cpp classic.cpp
NAME=speeder
TARGETS=amd64 arm mips24kc_be x86 mips24kc_le
@ -59,5 +59,5 @@ clean:
rm -f git_version.h
git_version:
echo "const char *gitversion = \"$(shell git rev-parse HEAD)\";" > git_version.h
echo "const char * const gitversion = \"$(shell git rev-parse HEAD)\";" > git_version.h

View File

@ -121,7 +121,7 @@ int remove_seq(char * data,int &data_len)
seq=ntoh64(seq);
if(anti_replay.is_vaild(seq)==0)
{
if(disable_replay_filter==1)
if(disable_replay_filter==1) //todo inefficient code,why did i put it here???
return 0;
mylog(log_trace,"seq %llx dropped bc of replay-filter\n ",seq);
return -1;