有的win2000机器上,运行完全正常,有的win2000上只能抓到进来的包,一个出去的包也没抓到,实在不明白原因。
双贴200分求助!
双贴200分求助!
解决方案 »
- 如果创建占据框架客户区的子窗口,类似工具栏,状态栏 WTL工程
- vc++初学者的问题
- 问一下窗体最小化的问题,急
- 滚动条问题,在线等,还有另外40分在另一个帖子
- ===50分求解:大型的系统程序框架用MFC的wizard生成缺乏稳定性么?应该如何做呢
- 请问在VC里面怎么获得一个按钮的ID和标题?
- 求助高手:如何从VOB文件中提取字幕??
- 如何将CString类对象转换成COleVariant类对象????????
- CreateFileMapping创建的共享内存是不是删不掉 有什么API可以删除吗
- 有谁写过梯级洪水调节的程序(结合数据库的),请这走!
- 如何获取保存在硬盘上的网页内的全部链接! 100分
- 如何知道对话框中的控件数据发生了改变
可我现在就是要发给自己的数据包啊,sigh
既然它只不过是调用了recv函数而已,当然只能接收数据包,那么它如何可能截获到你发送的数据包呢?如果你确实想截获发送的数据包,你应该使用驱动或者使用现成的winpcap,而不是使用raw socket来接收(注意:只是接收而已)数据包。
我的冬冬里面,这点时间可要命啊。
搜索这个版的旧贴,事实确实如此
帅哥,贴出来,200分贡献给你。:D理论上的东西和实际有区别的,我发现不止我一个人问这个问题了;
"如何可能"确实发生了.
++++++++++++++++++++++++
猪哥哥:
给点相关的帖子嘛;
I am registered to access MSDN managed newsgroups now and I am waiting for the support from MS Professionals.
The question:As I wrote in older thread, we create a sniffer, based on raw sockets with the netcard in promiscuous mode.Fragment of our code:socket( AF_INET, SOCK_RAW , IPPROTO_IP ) ;
setsockopt( rawsocket , SOL_SOCKET , SO_RCVTIMEO, (const char *)&rcvtimeo , sizeof(rcvtimeo) );
bind(rawsocket,(PSOCKADDR)&sa, sizeof(sa));
ioctlsocket( rawsocket, SIO_RCVALL, &flag));
recv(rawsocket, (char*)(buffer) , sizeof(buffer), 0 );There is the problem to capture outgoing traffic from own computer. We see only incoming IP packets.
We tested the program on Windows 2000, Windows XP Professional and Windows 2003 Server
There is the problem only on Windows XP Professional (SP1). The tests was run on some computers with different network cards and connected to different network devices.
After we've upgraded Windows XP Professional (SP1) to Windows XP SP2 Beta Build 2082, the problem had vanished completely. It was done on some computers with Windows XP Professional (SP1) and effect was same.But we have some doubts about it. May be we done something improperly?Could anybody say something about the problem and give me a reference to Windows XP Professional bugs list, corrected in SP2 Beta, or article about the problem?
Expand AllCollapse All
================================
Hi Denis,
I have it reproed with your code and a sniffer of mine. I find the key to this problem is kB818043 "L2TP/IPSec NAT-T Update for Windows XP and Windows
2000". (you can find the update information on sp1 at http://support.microsoft.com/?id=818043#5)
This update enhances the current functionality of L2TP and IPSec, but it breaks the raw socket as we saw in our tests.Fortunately, it has been fixed in the XP sp2b (since the sp2 is not officially released, the update list is not available at present. Thanks).Best regards,
Rhett Gong [MSFT]
Microsoft Online Partner SupportThis posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only. Thanks.
===========================================