ChinaUnix.net
相关文章推荐:

libnet发阻断包

libnet 写了一个icmp echo 的 小程序。 当送的数目到了1000多一点的时候,会出现下面的错误: libnet_write: libnet_write_raw_ipv4(): -1 bytes No buffer space available. 我需要送几千个,如何能做到呢? 前提是不希望改kernel 里接收的buffer 的大小。

by lydialydia - C/C++ - 2007-08-04 21:44:18 阅读(2230) 回复(2)

相关讨论

我的机器为192.168.0.79 在该机上运行我的程序: 用libnet产生一个tcp syn送出去. 的源地址为192.168.0.115, 源mac为192.168.0.115的mac, 目的地址为自己, 即192.168.0.79, 目的mac为192.168.0.79的mac. 结果用ethereal没有看到应答. 如把目的地址和mac地址改为其他机器(如:192.168.0.89), 则可以收到应答. why?

by yyy_3 - 数据安全 - 2006-08-12 00:41:51 阅读(2308) 回复(8)

我的机器为192.168.0.79\r\n在该机上运行我的程序: 用libnet产生一个tcp syn送出去. 的源地址为192.168.0.115, 源mac为192.168.0.115的mac, 目的地址为自己, 即192.168.0.79, 目的mac为192.168.0.79的mac.\r\n\r\n结果用ethereal没有看到应答.\r\n\r\n如把目的地址和mac地址改为其他机器(如:192.168.0.89), 则可以收到应答. \r\n\r\nwhy?

by yyy_3 - 攻防交流区 - 2006-08-12 00:41:51 阅读(3372) 回复(4)

linux系统下, libnet送的以太网广播桢,其他机器可以收到,就是本机UDP接收程序收不到,哪位知道啊,急急急急急急急急急急急急急~~~ :em16:

by GOODJOBLIKE - 网络技术 - 2013-07-30 17:19:04 阅读(907) 回复(0)

本帖最后由 空灵静世 于 2010-05-14 08:59 编辑 代码如下: /* * main.c * * Created on: 2010-5-13 * Author: root */ #include #include #include #include <libnet.h> int main(){ int packet_size; libnet_t *l; libnet_ptag_t tcp_protocol_tag = 0; libnet_ptag_t ip_protocol_tag = 0; libnet_ptag_t ethreal_protocol_tag = 0; u_short protocol=IPPROTO_TCP; ...

by 空灵静世 - C/C++ - 2010-05-14 13:38:38 阅读(1209) 回复(1)

//编译方式gcc arp.c -lnet //arp.c #include stdio.h> #include libnet.h> #define MAC_ADDR_LEN 6 #define IP_ADDR_LEN 4 //向同一网络内所有机器送ARP REPLY,告诉他们,23.23.23.2Z在00:df:17:17:17:f2那里 int main(int argc, char *argv[]) { libnet_t *l = NULL; // libnet context char *device = "eth0"; char err_buf[libnet_ERRBUF_SIZE]; libnet_ptag_t p_tag; unsigned char src_mac[MAC_A...

by brain2007 - 网络技术文档中心 - 2009-07-09 23:40:33 阅读(1352) 回复(0)

这个是我自己构造的,全部内容如下: 00 d0 f8 fd 67 7b 00 e0 4c 8b bf e7 88 8e 01 02 00 00 ff ff 37 77 ff 84 d7 b7 43 84 d7 b7 80 ff ff ff ff ff ff ff ff a4 d8 00 00 13 11 38 30 32 31 78 2e 65 78 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 1f 00 00 01 00 00 13 11 00 28 1a 28 00 00 13 11 17 22 64 91 60 60 65 65 69 61 64 64 94 93 91 92 96 65 95 64 68 91 62 68 62 94 9a d6...

by nait - C/C++ - 2005-10-21 10:35:31 阅读(1429) 回复(2)

Adding a new packet builder, static header size, no checksum Adding a new packet building module to libnet is usually pretty simple. The following short document details how to add a packet builder to libnet for a protocol that has a static header size and does not require a checksum. We'll use the Sebek protocol as an example to walk through the process. Make sure you have a good reference for ...

网络技术

by brain2007 - 网络技术文档中心 - 2007-08-15 16:31:18 阅读(974) 回复(0)

能从主函数得到的就是服务器的IP自己客户端的IP 想在一个子函数里面实现tcp送 自己改了一段代码如下: #include #include #include #include<libnet.h> tcp() { int c ; u_char *cp; libnet_t *l; libnet_ptag_t t; char *payload; char *HostAddr,*MyAddr; u_short payload_s; u_long src_ip,dst_ip; u_short src_prt,dst_prt; char errbuf[libnet_E...

by danvie99 - C/C++ - 2007-06-05 12:07:11 阅读(3321) 回复(6)

fc4 的 libnet 在那个rpm中?? 记得以前找到过,后来忘了,那位兄弟知道啊? 我从 http://sourceforge.net/project/showfiles.php?group_id=4223 下的 libnet 已经装上了 只是上次 记得找到了fc4相关介绍说明 其中说libnet在哪个哪个中 这次找不到有点不甘心! 记得好像上次找到资料libnet 已经不再 叫libnet什么什么了 ,好像是!要不就是我记错了

by sbyond - 系统管理 - 2005-12-19 16:49:45 阅读(688) 回复(1)

fc4 的 libnet 在那个rpm中?? 记得以前找到过,后来忘了,那位兄弟知道啊? 我从 http://sourceforge.net/project/showfiles.php?group_id=4223 下的 libnet 已经装上了 只是上次 记得找到了fc4相关介绍说明 其中说libnet在哪个哪个中 这次找不到有点不甘心! 记得好像上次找到资料libnet 已经不再 叫libnet什么什么了 ,好像是!要不就是我记错了

by sbyond - Linux系统管理 - 2005-12-19 16:49:45 阅读(934) 回复(1)