随笔分类 -  网络编程

摘要: 阅读全文
posted @ 2011-12-15 19:18 lxgeek 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2011-12-15 16:44 lxgeek 阅读(1271) 评论(0) 推荐(0) 编辑
摘要:开始不知道怎么弄,后来看看应该是对select()函数的最后一个参数进行设置才对,改成可以命令行中输入 -w time_out的情况。不知道对不对哦。源码在这里:https://github.com/lxlenovostar/m_ping 阅读全文
posted @ 2011-12-13 19:16 lxgeek 阅读(389) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2011-11-07 20:13 lxgeek 阅读(880) 评论(0) 推荐(0) 编辑
摘要:pthread_key_tThread local storage key (opaque)DeclarationSource position: ptypes.inc line 233typepthread_key_t=cuint;cuintC type: unsigned integer (natural size)DeclarationSource position: ctypes.inc line 40typecuint=cuint32;--------------------------------------------------------------------------- 阅读全文
posted @ 2011-05-15 16:43 lxgeek 阅读(509) 评论(0) 推荐(0) 编辑
摘要:实现: int s, con; struct sockaddr_in cliaddr, servaddr; if ( argc != 3 ) { printf( "uasage: httpd <IPaddress> <Port>"); exit( 0 ); } s = socket(AF_INET, SOCK_STREAM, 0); bzero(&servaddr, sizeof(servaddr)); servaddr.sin_family = AF_INET; inet_pton( AF_INET, argv[1], &(serv 阅读全文
posted @ 2011-05-12 22:14 lxgeek 阅读(3190) 评论(0) 推荐(0) 编辑
摘要:先介绍opendpi如何设置各个协议的处理,然后介绍如何处理每一个包,最后是软件的流程图。第一:首先看下要用到的重要的宏View Code #define IPOQUE_SAVE_AS_BITMASK(bitmask,value) (bitmask)=(((IPOQUE_PROTOCOL_BITMASK)1)<<(value)) #define IPOQUE_BITMASK_COMPARE(a,b) ((a) & (b)) #define IPOQUE_BITMASK_MATCH(x,y) ((x) == (y)) #define IPOQUE_BITMASK_COMPAR 阅读全文
posted @ 2011-04-21 20:55 lxgeek 阅读(2759) 评论(1) 推荐(0) 编辑
摘要:先贴会有用的相关内容:struct iphdr {#if BYTE_ORDER == LITTLE_ENDIAN uint8_t ihl:4, version:4;#elif BYTE_ORDER == BIG_ENDIAN uint8_t version:4, ihl:4;#else# error "BYTE_ORDER must be defined"#endif uint8_t tos; uint16_t tot_len; uint16_t id; uint16_t frag_off; uint8_t ttl; uint8_t protocol; uint16_t c 阅读全文
posted @ 2011-04-18 19:58 lxgeek 阅读(5197) 评论(1) 推荐(2) 编辑
摘要:sudo ntop -u ntop -d -i wlan0关闭sudo /etc/init.d/ntop stop 阅读全文
posted @ 2011-03-28 19:09 lxgeek 阅读(157) 评论(0) 推荐(0) 编辑
摘要:sudo nprobe -n 127.0.0.1:2055 -i lxG2.pcapsudo flow-capture -V 5 -w /home/lx/ntop/date 127.0.0.1/127.0.0.1/2055 阅读全文
posted @ 2011-03-21 16:04 lxgeek 阅读(407) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示