自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(14)
  • 收藏
  • 关注

转载 GPU CUDA常量内存使用

#include <cuda.h>#include <stdio.h>int getMulprocessorCount(){ cudaDeviceProp prop; cudaGetDeviceProperties(&prop,0); return prop.multiProcessorCo...

2013-10-21 15:23:00 226

转载 awk的使用备忘

[转]http://www.cnblogs.com/mydomain/archive/2012/09/24/2699467.htmlawk引用外部变量一、用awk有以下几种方法去调用变量:1. awk '{print a, b}' a=111 b=222 yourfile注意,变量位置要在file名之前,否则就不能调用。还有,于BEG...

2013-07-12 12:31:00 126

转载 调试经验--缺少头文件导致的段错误

今天在调试程序遇到一个段错误。而检查程序逻辑没有可能产生错误可能性。最终通过google找到了该问题的愿意。以下是转来的:发现出错在 inet_ntoa 那一行。查看了 inet_ntoa 的帮助,没有发现什么特别的地方。试着打开编译的warning开关看看有没有什么发现:[shengkui@uranus ~]$ gcc -g -o getaddr geta...

2012-03-08 14:13:00 194

转载 长度为0的数组

/* * size_0_test.c * * Created on: 2012-2-23 * Author: root */#include <stdio.h>#include <stdlib.h>#include <string.h>struct line{ int length; char contents[0];};i...

2012-02-23 13:38:00 96

转载 C语言位字段[转]

下面先总结下“位字段”的几个概念:定义:位字段简称字段,是“字”中相邻位的集合;所谓“字”是由实现定义的单一存储单元。字段定义和访问的语法基于结构。位字段所允许的类型:C语言允许unsigned int类型,signed int类型或int类型的位字段,分别称为无符号字段,带符号字段和普通位字段。和普通字符一样,普通位字段可以无符号或带符号。C99允许_Bool类型的位字段。...

2012-02-03 10:10:00 102

转载 网络数据包获取问题及解决方案-------持续更新

转载注明出处:http://www.cnblogs.com/renhao/archive/2011/12/16/2289823.html问题1:Packet size limited during capture解决方案(来源):http://blogold.chinaunix.net/u2/71257/showart.php?id=2320384...

2011-12-16 10:27:00 161

转载 DNS解析API文档

DNS解析 API文档参考英文文档:http://docstore.mik.ua/orelly/networking_2ndEd/dns/ch15_02.htmhttp://www.opensource.apple.com/source/libresolv/libresolv-46/ns_name.c一.工具函数集合(1)int ns_name_ntop(...

2011-11-14 16:01:00 422

转载 ubuntu11.10+eclipse 读取配置C环境变量配置

(1)ubuntu下配置文件目录:/etc/profile(2)命令:sudo vim /etc/profile(3)编辑如下:a.对于头文件的搜索路径:C_INCLUDE_PATH=<your include path>;export C_INCLUDE_PATH对于库文件的搜索路径:LIBRARY_PATH=<your l...

2011-10-24 16:32:00 104

转载 libnids运行机制 函数调用流程

(1)系统调用 int nids_init() 初始化程序(2)int nids_init() 调用函数 init_procs();  以下是该函数的实现代码: 1 staticvoid init_procs() 2 { 3 ip_frag_procs = mknew(struct proc_node); 4 ip_frag_procs->ite...

2011-08-29 16:39:00 240

转载 libnids注册删除回调函数

1 void 2 register_callback(struct proc_node **procs, void (*x)) 3 { 4 struct proc_node *ipp; 5 6 for (ipp =*procs; ipp; ipp = ipp->next)//判断该回调函数是否存在 7 if (x == ipp->item) 8 return; 9 ...

2011-08-29 13:55:00 112

转载 libnids TCP报文首报文识别

if (!(a_tcp = find_stream(this_tcphdr, this_iphdr, &from_client))) {//没有找到 if ((this_tcphdr->th_flags & TH_SYN) && //报文头SYN为1!(this_tcphdr->th_flags & TH_ACK) &am...

2011-08-26 14:38:00 263

转载 libnids学习笔记------【hash算法】

[1] IP四元组hashu_intmkhash (u_int src, u_short sport, u_int dest, u_short dport){ u_int res = 0; int i; u_char data[12]; u_int *stupid_strict_aliasing_warnings=(u_int*)data; *stupid_strict_a...

2011-08-26 11:46:00 189

转载 PCRE的安装及使用

1、主页地址:http://www.pcre.org/ 下载pcre-7.8.tar.bz22、解压缩: tar xjpf pcre-7.8.tar.bz23、配置: cd pcre-7.8 ./configure --prefix=/usr/local/pcre-7.8 --libdir=/usr/local/lib/pcre --includedir=...

2011-08-17 16:26:00 688

转载 函数指针返回

#include <stdio.h>void f(int a){printf("number is:%d\n",a);}typedef void(*k)();k getfunc(){return f;}int main(){k k1;k1=getfunc();k1(4);}转载于:https://www....

2011-07-20 15:17:00 76

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除