mirror of
https://github.com/wangyu-/UDPspeeder.git
synced 2025-01-19 06:19:34 +08:00
added classic
This commit is contained in:
parent
e01aecd78b
commit
fc5cbc9b0c
1273
classic.cpp
Normal file
1273
classic.cpp
Normal file
File diff suppressed because it is too large
Load Diff
18
classic.h
Normal file
18
classic.h
Normal 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_ */
|
1
main.cpp
1
main.cpp
@ -4,6 +4,7 @@
|
|||||||
#include "lib/rs.h"
|
#include "lib/rs.h"
|
||||||
#include "packet.h"
|
#include "packet.h"
|
||||||
#include "conn_manager.h"
|
#include "conn_manager.h"
|
||||||
|
#include "classic.h"
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
typedef unsigned long long u64_t; //this works on most platform,avoid using the PRId64
|
typedef unsigned long long u64_t; //this works on most platform,avoid using the PRId64
|
||||||
|
4
makefile
4
makefile
@ -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++
|
#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
|
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
|
NAME=speeder
|
||||||
TARGETS=amd64 arm mips24kc_be x86 mips24kc_le
|
TARGETS=amd64 arm mips24kc_be x86 mips24kc_le
|
||||||
@ -59,5 +59,5 @@ clean:
|
|||||||
rm -f git_version.h
|
rm -f git_version.h
|
||||||
|
|
||||||
git_version:
|
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
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ int remove_seq(char * data,int &data_len)
|
|||||||
seq=ntoh64(seq);
|
seq=ntoh64(seq);
|
||||||
if(anti_replay.is_vaild(seq)==0)
|
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;
|
return 0;
|
||||||
mylog(log_trace,"seq %llx dropped bc of replay-filter\n ",seq);
|
mylog(log_trace,"seq %llx dropped bc of replay-filter\n ",seq);
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user