ubuntu安装jdk全过程(仅供参考)
时间:2007-08-09
来源:互联网
  代码:
  #include <stdio.h>
#include "nids.h"
#include <time.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <malloc.h>
#include <string.h>
#include <stdlib.h>
  
  
void tcp_connect_callback(struct tcp_stream* ftp_control_stream,void **arg);
  
  
//////////////////////////////////zhu han shu de fen ge xian//////////////////////////////////
  
  
int main()
  
{
  
if (!nids_init())
  
{
  
printf("error:%s\n",nids_errbuf);
  
exit(1);
  
}
  
nids_register_tcp(tcp_connect_callback);
  
nids_run();
return 0;
  
}
  
//////////////////////////////////han shu shi xian de fen ge xian/////////////////////////////////
  
  
  
  
void tcp_connect_callback(struct tcp_stream* ftp_control_stream,void **arg)
  
{
  
struct half_stream *hlf = NULL;//半连接指针,取数据时用
  
  
printf("Now in callback");
  
     
  
switch(ftp_control_stream->nids_state)
  
{
  
case NIDS_JUST_EST:
  
ftp_control_stream->client.collect++;
  
ftp_control_stream->server.collect++;
  
ftp_control_stream->client.collect_urg++;
  
ftp_control_stream->server.collect_urg++;
  
return ;
  
case NIDS_DATA:
  
printf("data\n");
if( ftp_control_stream->server.count_new )
{
printf("SERVER in\n");
hlf = &ftp_control_stream->server;
}
else
{
printf("Client in\n");
hlf = &ftp_control_stream->client;
}
return ;
break;
  
default:
  
break;
  
}//switch
  
         
  
return;
  
}
#include "nids.h"
#include <time.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <malloc.h>
#include <string.h>
#include <stdlib.h>
void tcp_connect_callback(struct tcp_stream* ftp_control_stream,void **arg);
//////////////////////////////////zhu han shu de fen ge xian//////////////////////////////////
int main()
{
if (!nids_init())
{
printf("error:%s\n",nids_errbuf);
exit(1);
}
nids_register_tcp(tcp_connect_callback);
nids_run();
return 0;
}
//////////////////////////////////han shu shi xian de fen ge xian/////////////////////////////////
void tcp_connect_callback(struct tcp_stream* ftp_control_stream,void **arg)
{
struct half_stream *hlf = NULL;//半连接指针,取数据时用
printf("Now in callback");
switch(ftp_control_stream->nids_state)
{
case NIDS_JUST_EST:
ftp_control_stream->client.collect++;
ftp_control_stream->server.collect++;
ftp_control_stream->client.collect_urg++;
ftp_control_stream->server.collect_urg++;
return ;
case NIDS_DATA:
printf("data\n");
if( ftp_control_stream->server.count_new )
{
printf("SERVER in\n");
hlf = &ftp_control_stream->server;
}
else
{
printf("Client in\n");
hlf = &ftp_control_stream->client;
}
return ;
break;
default:
break;
}//switch
return;
}
编译的时候:gcc -o test test.c -lnids -lpcap -lnet
可是运行的时候只能够抓到发送到自己机器的数据包,而自己机器向外发的数据包都漏了
环境:Ubuntu7.04 libnids1.21
3Q Very
我在另外一台机器试国
没有问题
但是这台机器死活不对
求救!!!!!!!
作者: 木鱼 发布时间: 2007-08-09
             我装完之后运行libnids源码包中的sample里的例子,都抓不到包,你碰到过这样的情况吗?怎么解决的            
            作者: qyanchen 发布时间: 2011-11-17
  代码:
  #include <stdio.h>
#include "nids.h"
#include <time.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <malloc.h>
#include <string.h>
#include <stdlib.h>
  
  
void tcp_connect_callback(struct tcp_stream* ftp_control_stream,void **arg);
  
  
//////////////////////////////////zhu han shu de fen ge xian//////////////////////////////////
  
  
int main()
  
{
  
if (!nids_init())
  
{
  
printf("error:%s\n",nids_errbuf);
  
exit(1);
  
}
  
nids_register_tcp(tcp_connect_callback);
  
nids_run();
return 0;
  
}
  
//////////////////////////////////han shu shi xian de fen ge xian/////////////////////////////////
  
  
  
  
void tcp_connect_callback(struct tcp_stream* ftp_control_stream,void **arg)
  
{
  
struct half_stream *hlf = NULL;//半连接指针,取数据时用
  
  
printf("Now in callback");
  
     
  
switch(ftp_control_stream->nids_state)
  
{
  
case NIDS_JUST_EST:
  
ftp_control_stream->client.collect++;
  
ftp_control_stream->server.collect++;
  
ftp_control_stream->client.collect_urg++;
  
ftp_control_stream->server.collect_urg++;
  
return ;
  
case NIDS_DATA:
  
printf("data\n");
if( ftp_control_stream->server.count_new )
{
printf("SERVER in\n");
hlf = &ftp_control_stream->server;
}
else
{
printf("Client in\n");
hlf = &ftp_control_stream->client;
}
return ;
break;
  
default:
  
break;
  
}//switch
  
         
  
return;
  
}
#include "nids.h"
#include <time.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <malloc.h>
#include <string.h>
#include <stdlib.h>
void tcp_connect_callback(struct tcp_stream* ftp_control_stream,void **arg);
//////////////////////////////////zhu han shu de fen ge xian//////////////////////////////////
int main()
{
if (!nids_init())
{
printf("error:%s\n",nids_errbuf);
exit(1);
}
nids_register_tcp(tcp_connect_callback);
nids_run();
return 0;
}
//////////////////////////////////han shu shi xian de fen ge xian/////////////////////////////////
void tcp_connect_callback(struct tcp_stream* ftp_control_stream,void **arg)
{
struct half_stream *hlf = NULL;//半连接指针,取数据时用
printf("Now in callback");
switch(ftp_control_stream->nids_state)
{
case NIDS_JUST_EST:
ftp_control_stream->client.collect++;
ftp_control_stream->server.collect++;
ftp_control_stream->client.collect_urg++;
ftp_control_stream->server.collect_urg++;
return ;
case NIDS_DATA:
printf("data\n");
if( ftp_control_stream->server.count_new )
{
printf("SERVER in\n");
hlf = &ftp_control_stream->server;
}
else
{
printf("Client in\n");
hlf = &ftp_control_stream->client;
}
return ;
break;
default:
break;
}//switch
return;
}
编译的时候:gcc -o test test.c -lnids -lpcap -lnet
可是运行的时候只能够抓到发送到自己机器的数据包,而自己机器向外发的数据包都漏了
环境:Ubuntu7.04 libnids1.21
3Q Very
我在另外一台机器试国
没有问题
但是这台机器死活不对
求救!!!!!!!
作者: 木鱼 发布时间: 2007-08-09
             我装完之后运行libnids源码包中的sample里的例子,都抓不到包,你碰到过这样的情况吗?怎么解决的            
            作者: qyanchen 发布时间: 2011-11-17
  代码:
  #include <stdio.h>
#include "nids.h"
#include <time.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <malloc.h>
#include <string.h>
#include <stdlib.h>
  
  
void tcp_connect_callback(struct tcp_stream* ftp_control_stream,void **arg);
  
  
//////////////////////////////////zhu han shu de fen ge xian//////////////////////////////////
  
  
int main()
  
{
  
if (!nids_init())
  
{
  
printf("error:%s\n",nids_errbuf);
  
exit(1);
  
}
  
nids_register_tcp(tcp_connect_callback);
  
nids_run();
return 0;
  
}
  
//////////////////////////////////han shu shi xian de fen ge xian/////////////////////////////////
  
  
  
  
void tcp_connect_callback(struct tcp_stream* ftp_control_stream,void **arg)
  
{
  
struct half_stream *hlf = NULL;//半连接指针,取数据时用
  
  
printf("Now in callback");
  
     
  
switch(ftp_control_stream->nids_state)
  
{
  
case NIDS_JUST_EST:
  
ftp_control_stream->client.collect++;
  
ftp_control_stream->server.collect++;
  
ftp_control_stream->client.collect_urg++;
  
ftp_control_stream->server.collect_urg++;
  
return ;
  
case NIDS_DATA:
  
printf("data\n");
if( ftp_control_stream->server.count_new )
{
printf("SERVER in\n");
hlf = &ftp_control_stream->server;
}
else
{
printf("Client in\n");
hlf = &ftp_control_stream->client;
}
return ;
break;
  
default:
  
break;
  
}//switch
  
         
  
return;
  
}
#include "nids.h"
#include <time.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <malloc.h>
#include <string.h>
#include <stdlib.h>
void tcp_connect_callback(struct tcp_stream* ftp_control_stream,void **arg);
//////////////////////////////////zhu han shu de fen ge xian//////////////////////////////////
int main()
{
if (!nids_init())
{
printf("error:%s\n",nids_errbuf);
exit(1);
}
nids_register_tcp(tcp_connect_callback);
nids_run();
return 0;
}
//////////////////////////////////han shu shi xian de fen ge xian/////////////////////////////////
void tcp_connect_callback(struct tcp_stream* ftp_control_stream,void **arg)
{
struct half_stream *hlf = NULL;//半连接指针,取数据时用
printf("Now in callback");
switch(ftp_control_stream->nids_state)
{
case NIDS_JUST_EST:
ftp_control_stream->client.collect++;
ftp_control_stream->server.collect++;
ftp_control_stream->client.collect_urg++;
ftp_control_stream->server.collect_urg++;
return ;
case NIDS_DATA:
printf("data\n");
if( ftp_control_stream->server.count_new )
{
printf("SERVER in\n");
hlf = &ftp_control_stream->server;
}
else
{
printf("Client in\n");
hlf = &ftp_control_stream->client;
}
return ;
break;
default:
break;
}//switch
return;
}
编译的时候:gcc -o test test.c -lnids -lpcap -lnet
可是运行的时候只能够抓到发送到自己机器的数据包,而自己机器向外发的数据包都漏了
环境:Ubuntu7.04 libnids1.21
3Q Very
我在另外一台机器试国
没有问题
但是这台机器死活不对
求救!!!!!!!
作者: 木鱼 发布时间: 2007-08-09
             我装完之后运行libnids源码包中的sample里的例子,都抓不到包,你碰到过这样的情况吗?怎么解决的            
            作者: qyanchen 发布时间: 2011-11-17
 相关阅读 更多  
      
    热门阅读
-  
 office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
          阅读:74
 -  
 如何安装mysql8.0
          阅读:31
 -  
 Word快速设置标题样式步骤详解
          阅读:28
 -  
 20+道必知必会的Vue面试题(附答案解析)
          阅读:37
 -  
 HTML如何制作表单
          阅读:22
 -  
 百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
          阅读:31
 -  
 ET文件格式和XLS格式文件之间如何转化?
          阅读:24
 -  
 react和vue的区别及优缺点是什么
          阅读:121
 -  
 支付宝人脸识别如何关闭?
          阅读:21
 -  
 腾讯微云怎么修改照片或视频备份路径?
          阅读:28
 















