自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 socket创建-内核中

asmlinkage long sys_socket(int family,int type,int protocol){ int retval; struct socket*sock; retval=sock_create(family,type,protocol,&sock); if(retval<0) goto out; retval=sock

2014-09-27 20:19:39 591

转载 VFS虚拟文件系统

Linux 允许众多不同的文件系统共存,并支持跨文件系统的文件操作,这是因为有虚拟文件系统的存在。虚拟文件系统,即VFS(Virtual File System)是 Linux 内核中的一个软件抽象层。它通过一些数据结构及其方法向实际的文件系统如 ext2,vfat 提供接口机制。本文在简要介绍 VFS 的相关数据结构后,以文件 I/O 为切入点深入 Linux 内核源代码,追踪了 sys_ope

2014-09-27 17:10:31 772

转载 Linux内存管理图解(逻辑-线性-物理)

Linux内存管理图解作者:wdy转自:http://hi.baidu.com/delphiss/blo ... d0dfff1a4cff8a.html研究内核时间不长,前几天画了个内存管理大图,感觉太乱,准备细分写点东西也算是整理一下自己的思路。都是一个人瞎琢磨的,周围没有可以交流的,不正确的地方请指出来。一、逻辑地址转线性地址    机器语言指令中出现的内存地址

2014-09-25 11:06:28 874

转载 IO端口,IO内存 ,IO映射 内存映射

Linux系统下IO Memory和IO Port的区别2014年07月06日 ⁄Linux知识⁄ 共 721字 ⁄ 字号 小 中 大 ⁄评论 7 条下面以x86架构为例,其它的架构可能并不适用。先说一下本人对IO Memory和IO Port的理解。IO Port叫做IO端口,主要用来指外设(如网卡、HBA卡)等的寄存器空间,而IO Memory叫做I

2014-09-22 14:36:58 1647

原创 list 用法

#include "list.h"#include #include struct kool_list{ struct list_head list; int from,to;};/* * mylist 是 链表的表头,通过这个宏,也将其定义为了list_head类型 * * 故只有简单的next 和prev指针,INIT_LIST_HEAD宏将表头初始化了

2014-09-19 17:36:24 674

原创 设备驱动之底半步

/*在看使用了tasklet的方案*/void short_do_tasklet(unsigned long);DECLARE_TASKLET(short_tasklet,short_do_tasklet,0);/*声明和定义一个tasklet,名字为short_tasklet,其处理函数为short_do_tasklet * 没有传递参数(0) */irqreturn_t sho

2014-09-19 09:10:21 508

原创 设备驱动之共享

int request_irq(unsigned int irq, irqreturn_t (*handler)(int,void*,struct pt_regs*), unsigned long flags, const char *dev_name,void*dev_id);/*irq:要申请的中断号 * handler:中断处理函数 * flags:若值为SA_SHIRQ,表明

2014-09-18 22:23:00 632

原创 设备驱动1

#include struct light_dev{ struct cdev cdev; unsigned char value;/*led on set 1,off set 0*/};struct light_dev *light_devp; /* device */int light_major=100; /*for dev id*/int light

2014-09-16 17:19:03 624

转载 字符设备驱动 2

大部分字符驱动设计三个重要的数据结构struct file_operationsstruct filestruct inode 一、文件操作           在之前的一篇文章中已经有介绍了如何去生情字符设备设备号,但是没有做任何的工作,也就只能写一个不能工作的字符设备;struct file_operations 结构域用来连接设备与操作,实现系统调

2014-09-16 11:25:04 455

原创 what is a device drive

Device drivers, in lay terms, are the code that the device uses to interface with the operating system. Basically, it's how the OS communicates with the device, talking, and working together nicely. I

2014-09-16 11:24:39 510

转载 TCP: Reliable Data transfer 3

TCP: Reliable Data transferReliable Data Transfer with TCP Data transfer in TCP uses theGo-back-N sliding window protocol whereeach byte is assigned asequence numberExamp

2014-09-13 21:09:25 989

转载 Connection Establishment in TCP 2

Connection Establishment in TCPIdentifying a TCP Connection TCP connection:A TCP connection is a logical connection between 2 communicating entities.Packets f

2014-09-13 21:09:00 1446

转载 Port Address Translation: saving IP addresses

Port Address Translation: saving IP addressesHome networking When you want to access the Internet using multiple computers on a site, you must assign each computer a unique IP addr

2014-09-13 21:08:53 1573

转载 Flow Control in TCP 3

Flow Control in TCPSend and Receive buffers When a user application sends data to anotheruser application, the data isfirst stored in a send buffer inside Operating System kernel

2014-09-13 21:08:12 943 1

转载 TCP: terminating a connection 3

TCP: terminating a connectionTerminating a TCP connection Closing a TCP connection is amuch easiest than establishing a TCP connection(it is usually easier to destroy than to bui

2014-09-13 21:07:43 897

转载 Introduction to the Transport Control Protocol (TCP) 1

Introduction to the Transport Control Protocol (TCP)Origin of the TCP protocol The second more commonly usedtransport protocol available on the Internet isthe Transport Control Pro

2014-09-13 18:39:55 809

转载 arp&icmp

Date: Fri, 19 Sep 1997 05:12:07 -0500From: Yuri Volobuev To: BUGTRAQ@NETSPACE.ORGSubject: Redir games with ARP and ICMP Playing redir games with ARP and ICMP

2014-09-13 10:03:11 785

转载 c程序组织

一般习惯将不同功能模块放到一个头文件和一个C文件中。例如是写一些数学计算函数://mymath.h#ifndef _mymath_H#define _mymath_Hextern int Global_A; //声明必要的全局变量......extern void fun(); //声明必要的外部函数.....#endif//mymath.c#inclu

2014-09-11 10:32:28 675

转载 Linux共享库路径配置

http://blog.csdn.net/yanxiangtianji/article/details/8316562Linux共享库路径配置分类: linux 2012-12-18 22:27 3060人阅读 评论(0)收藏 举报Linux共享库路径配置  Linux下找不到共享库文件的典型现象为明明已经安装某个软包(如libnet,mysql),

2014-09-10 12:23:52 582

转载 Flow Control in TCP(tcp的流量控制实现)

Flow Control in TCPSend and Receive buffers When a user application sends data to anotheruser application, the data isfirst stored in a send buffer inside Operating System kernel

2014-09-08 10:41:56 3100

转载 strcpy和memcpy的区别

strcpy和memcpy的区别http://www.cnblogs.com/stoneJin/archive/2011/09/16/2179248.htmlstrcpy和memcpy都是标准C库函数,它们有下面的特点。strcpy提供了字符串的复制。即strcpy只用于字符串复制,并且它不仅复制字符串内容之外,还会复制字符串的结束符。已知strcpy函数的原型是:

2014-09-08 10:02:57 614

转载 Linux下使用socket传输文件的C语言简单实现

Linux下使用socket传输文件的C语言简单实现分类: socket编程 2012-03-03 17:44 4743人阅读 评论(6)收藏 举报socket语言linuxcserverbuffer简单的C语言实现,客户端通过TCP协议向服务器端请求传输的文件,服务器端收到请求后向客户端发送文件。 服务器程序和客户端程序应当分别运行在两台计算机上。

2014-09-08 10:01:45 4347 4

原创 list.h 简单运用

#include #include #include "list.h"struct kool_list{    struct list_head list;    int to,from;};//这个定义把list_head结构放在第一位很有讲究,因为后面//可以直接利用list_for_each宏来直接得到koo_list的位置,因为//每个koo

2014-09-02 21:11:03 1376

原创 iptables加载模块实践总结

给iptables加载模块的方法:1,首先,要编写出用户态的模块 .so, 这个模块把它放入iptables工具的lib中,一般这个位置在 /lib/xtables中,如果是手动编译而且没有更改路径的化,那么一般是在/usr/local/lib/xtables中。当然,当你手动安装iptables的时候,最好是能够把要生成.so的的文件放入到iptalbes的源码包的extentsion

2014-09-02 10:12:28 3866

空空如也

空空如也

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

TA关注的人

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