摘要: glib是gtk下的一个库,也是开发中常用的一个工具库。glib提供的基本的数据结构和算法(只说我现在用到的),例如更有效的内存管理、配置文件处理、异步队列、哈希表、字符串处理、编码转换等。它就像野外生存的瑞士军刀,一个日常开发过程中不可多得的利刃。当然完全抛弃,独立实现也可以,我之前就是这样做的,各有好处。 但是,在服务器操作系统中并不总自带有glib库,总要经常安装,因此如果能编译成静态库连接到程序,这样最好。经过一番努力,我已经成功,现把简要过程写在下面,随意分享。1.下载、编译、安装wget http://ftp.gnome.org/pub/gnome/sources/glib/... 阅读全文
posted @ 2012-04-23 18:50 田涛@武汉 阅读(3440) 评论(0) 推荐(0) 编辑
摘要: anaconda,[ænə'kɑndə],RH下的一个安装管理程序。initrd,initial RAM disk,http://baike.baidu.com/view/891200.htm,Linux初始RAM磁盘(initrd)是在系统引导过程中挂载的一个临时根文件系统.CentOS修改Linux命令行分辨率http://www.docin.com/p-337967507.htmlCentOS网卡配置:http://www.linlook.com/detail_MTIyNg==.html配置源:http://mirrors.163.com/.help/centos.ht 阅读全文
posted @ 2013-10-24 15:40 田涛@武汉 阅读(246) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include #include #include #include #include #include #include int raw_fd;int sumcnt;int ipcnt;int tcpcnt;int init_rawsocket(char *ethname){ struct sockaddr_ll sll; struct ifreq ifstruct; int netfd, i; memset(&sll, 0, sizeof(struct so... 阅读全文
posted @ 2013-10-24 15:40 田涛@武汉 阅读(196) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #define __USE_GNU#include #include #include #include void * singal_cpu(void *para){ int index, ret; cpu_set_t cpuset; index = (int)para; CPU_ZERO(&cpuset); CPU_SET(index, &cpuset); ret = sched_setaffinity(syscall(SYS_gettid), sizeof(cpu_set_t), &cpuse... 阅读全文
posted @ 2013-10-24 15:38 田涛@武汉 阅读(377) 评论(0) 推荐(0) 编辑
摘要: 使用TagListhttp://blog.csdn.net/fbfsber008/article/details/7044723 阅读全文
posted @ 2013-10-24 15:38 田涛@武汉 阅读(424) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include #include #include #include #include #include #include /*void proc_eth(){}void proc_ip(){}void proc_udp(){}void proc_tcp(){}void proc_http(){}*/int sumcnt;int ipcnt;int tcpcnt;void proc_packet(uint8_t *para, const struct pcap_pkthdr *pkth 阅读全文
posted @ 2013-10-24 15:37 田涛@武汉 阅读(517) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include #include #include #include #include #include #include int raw_fd;int sumcnt;int ipcnt;int tcpcnt;int init_rawsocket(char *ethname){ struct sockaddr_ll sll; struct ifreq ifstruct; int netfd, i; memset(&sll, 0, sizeof(struct so... 阅读全文
posted @ 2013-10-24 15:36 田涛@武汉 阅读(357) 评论(0) 推荐(0) 编辑
摘要: 1.下载wget http://mirror.bjtu.edu.cn/apache//apr/apr-1.4.6.tar.gzwget http://mirror.bjtu.edu.cn/apache//apr/apr-util-1.4.1.tar.gzwget http://mirror.bit.edu.cn/apache//httpd/httpd-2.2.22.tar.gz2.编译tar zxvf apr-1.4.6.tar.gzcd apr-1.4.6./configure --prefix=/usr/local/apr-httpd/makemake installtar zxvf ap 阅读全文
posted @ 2013-10-24 15:35 田涛@武汉 阅读(561) 评论(0) 推荐(0) 编辑
摘要: 解决方法:1、打开windows设备管理器。2、查看-显示隐藏的设备3、非即插即用驱动程序4、NetGroup Packet Filter Driver 右键属性---驱动程序---启动类型5、设置驱动类型为 自动 或者 系统。其默认值为请求,意思就是每次用的时候,需要其他程序请求时才启动否则不启动。如果同是ring0级别的服务请求并加把内核锁,那么程序就僵死了NPF(NetGroup Packet Filter Driver)首先,你得确认自己安装了winpcap(最好下载一个最新版本:官方下载,这会官方好像打不开,也可以华军下载),然后(1)如果你使用的是Linux、Ubuntu系统,请用 阅读全文
posted @ 2013-10-24 15:35 田涛@武汉 阅读(1543) 评论(0) 推荐(0) 编辑
摘要: http://hi.baidu.com/chongxing01/blog/item/dbf1778b55f61d1ac9fc7aaa.html11.5.1 缓冲http://book.51cto.com/art/200904/121083.htmsetvbuf 设定缓冲函数setvbuf ( pFile , NULL , _IOFBF , 1024 );if (setvbuf(input, bufr, _IOFBF, 512) != 0)printf("failed to set up buffer for input file\n");Buffer size in byt 阅读全文
posted @ 2013-10-24 15:34 田涛@武汉 阅读(175) 评论(0) 推荐(0) 编辑
摘要: SET PASSWORD = PASSWORD("newpassword");自动添加当前时间alter table tablename modify field timestamp not null default current_timestamp;varchar(255)最多255个字节,若使用256则创建约束时会失败wireless password: c301059610GreeNettcpdump -i eth0 -n -v -s 3000 ether[18:2]=0x3412// 远程主机访问MYSQLCREATE USER user [IDENTIFIED 阅读全文
posted @ 2013-10-24 15:34 田涛@武汉 阅读(201) 评论(0) 推荐(0) 编辑