1、errno打印错误信息
2、发包时寻找发包网卡根据routdir方向,而非指定某个网卡是客户端
This commit is contained in:
liuyang
2018-07-18 10:37:20 +08:00
parent 9d6b266f97
commit 1b80c39df7
2 changed files with 194 additions and 27 deletions

8
kni.h
View File

@@ -60,11 +60,14 @@
#define KNI_ACTION_EXIT "exit..."
//init profile info
#define KNI_CONF_MAXLEN 256
#define KNI_CONF_MAXLEN 1024
#define KNI_CONF_FILENAME "./kniconf/kni.conf"
#define KNI_CONF_MODE "Module"
#define KNI_CONF_FILENAME_MAIN "./conf/main.conf"
#define KNI_OFFSET_ROUTDIR 1
#define KNI_OFFSET_CARDNAME 3
#define KNI_CARD_NUM 2
@@ -355,9 +358,10 @@ struct kni_tcp_state
struct args_read_tun
{
int thread_seq;
int thread_seq; //in
int iprevers; //in
int iplen; //in
int routdir; //out
char* a_packet; //in
unsigned char smac[KNI_MACADDR_LEN]; //out
unsigned char dmac[KNI_MACADDR_LEN]; //ouit