06 2016 档案

摘要:#include<stdio.h>#include<nids.h>#include<string.h>#include <sys/socket.h>#include <netinet/in.h>#include <arpa/inet.h>#include<stdlib.h>#include<neti 阅读全文
posted @ 2016-06-23 15:36 soyosuyang 阅读(862) 评论(0) 推荐(0)
摘要:warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Wformat=] 例如: printf("%s", ctime((const time_t *)&protocol_hea 阅读全文
posted @ 2016-06-20 21:06 soyosuyang 阅读(210) 评论(0) 推荐(0)
摘要:char*inet_ntoa(struct in_addr in)将一个IP转换成一个互联网标准点分格式的字符串。 我把 inet_ntoa 需要的头文件加上去: #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet. 阅读全文
posted @ 2016-06-20 21:02 soyosuyang 阅读(1036) 评论(0) 推荐(0)
摘要:法一: 指定可用网卡: nids_params.device="lo"; 法二: nids.h中有这么一段: struct nids_chksum_ctl { u_int netaddr; u_int mask; u_int action; u_int reserved; }; extern voi 阅读全文
posted @ 2016-06-20 20:53 soyosuyang 阅读(772) 评论(0) 推荐(0)