上一页 1 ··· 6 7 8 9 10 11 12 下一页
摘要: #define _NSIG 64#define _NSIG_BPW 64#define _NSIG_WORDS (_NSIG / _NSIG_BPW)typedef unsigned long old_sigset_t; /* at least 32 bits */typedef struct { unsigned long sig[_NSIG_WORDS];} sigset_t; 阅读全文
posted @ 2011-04-09 18:44 lxgeek 阅读(206) 评论(0) 推荐(0) 编辑
摘要: /** auhtor:lx date 4.9 2011 brief hash table*/#include <stdio.h>#include <stdlib.h>#include <stdbool.h>#define hash_num 5typedef char Bool;struct hash_node{ int date; /*结点值*/ struct hash_node *next; /*下一个节点*/ Bool found;};struct hash_node* hash_table[hash_num]; /*存储hash table 所有信息* 阅读全文
posted @ 2011-04-09 16:12 lxgeek 阅读(346) 评论(0) 推荐(0) 编辑
摘要: #include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include "ourhdr.h"#include "error.c"#include "f10.17.c"static void lockabyte(const char *, int, off_t );int lock_reg( int fd, int cmd, int type, off_t offset, int whence, off_t len ){ struct 阅读全文
posted @ 2011-04-04 20:14 lxgeek 阅读(203) 评论(0) 推荐(0) 编辑
摘要: sudo ntop -u ntop -d -i wlan0关闭sudo /etc/init.d/ntop stop 阅读全文
posted @ 2011-03-28 19:09 lxgeek 阅读(155) 评论(0) 推荐(0) 编辑
摘要: /** author lx date 3.24 2011 contact lxlenovostar@gmail.com biref cp a big file to anthor file.*/#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <stdlib.h>#include <unistd.h>#include <stdio.h>#include <errno.h>#include <string.h># 阅读全文
posted @ 2011-03-24 18:42 lxgeek 阅读(718) 评论(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) 编辑
摘要: int printf ( const char * format, ... );Return ValueOn success, the total number of characters written is returned.On failure, a negative number is returned. 阅读全文
posted @ 2011-03-19 11:25 lxgeek 阅读(872) 评论(3) 推荐(1) 编辑
摘要: 比如这样:/* the struct of the node by adjacency-list representation */typedef struct{ /* the name of node */ string nodename; /* the list of each node */ vector< string > nodelist; /* the begin probability of the node */ vector< float > nodeprob;} nbnode; 阅读全文
posted @ 2011-03-16 15:03 lxgeek 阅读(2928) 评论(2) 推荐(0) 编辑
摘要: /** select a number < 8 return a randle number that <= 7*/int selrand(){ int iSecret, iGuess; bool iselect = true; static vector< int > selected; static vector< int >::iterator itsel; /* initialize random seed: */ srand( time( NULL ) ); /* generate secret number: */ do { iSecret = 阅读全文
posted @ 2011-03-12 12:53 lxgeek 阅读(229) 评论(0) 推荐(0) 编辑
摘要: This is your nprobe 4.9.4 configuration:Host System Type : i686-pc-linux-gnuCompiler (cflags) : gcc -g -O2 -pipe -DHAVE_CONFIG_HInclude path : -I/usr/local/includeSystem Libs : -lresolv -ldl -lpthread Core Libs : -L/usr/local/lib -lpcapAdditional Libs : LBL pcap in : /usr/localInstall path : /usr/lo 阅读全文
posted @ 2011-03-11 13:00 lxgeek 阅读(2213) 评论(3) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 下一页