增加subscribe ip扫描, 重构maat部分代码

This commit is contained in:
崔一鸣
2019-09-24 16:49:31 +08:00
parent b0bbde41b0
commit 92436d0c1b
7 changed files with 231 additions and 107 deletions

View File

@@ -22,6 +22,17 @@ int kni_addr_trans_v6(struct stream_tuple4_v6 *tuple4, char *output, int len){
return 0;
}
char* kni_strdup(const char* s){
char*d=NULL;
if(s==NULL){
return NULL;
}
d=(char*)malloc(strlen(s)+1);
memcpy(d,s,strlen(s)+1);
return d;
}
uint16_t kni_ip_checksum(const void *buf, size_t hdr_len){
unsigned long sum = 0;
const uint16_t *ip1;