linux内核结构体
-------------------------------------------------------------------------------------------------------
//By:yuyongbao
//QQ:673360056
LINUX 内核结构体
struct attribute
{
const char * name;
struct module * owner;
mode_t mode;
};
struct attribute_group
{
const char * name;
struct attribute ** attrs;
};
struct blocking_notifier_head
{
struct rw_semaphore rwsem;
struct notifier_block *head;
};
struct bus_attribute
{
struct attribute attr;
ssize_t (*show)(struct bus_type *, char * buf);
ssize_t (*store)(struct bus_type *, const char * buf, size_t count);
};
struct bus_type
{
const char * name;
struct module * owner;
struct kset subsys;
struct kset drivers;
struct kset devices;
struct klist klist_devices;
struct klist klist_drivers;
struct blocking_notifier_head bus_notifier;
struct bus_attribute * bus_attrs;
struct device_attribute * dev_attrs;
struct driver_attribute * drv_attrs;
struct bus_attribute drivers_autoprobe_attr;
struct bus_attribute drivers_probe_attr;
int (*match)(struct device * dev, struct device_driver * drv);
int (*uevent)(stru
相关文档:
以下在centos5.3上实验。在linux中signal函数是通过调用sigaction来实现的,由此它不存在信号丢失以及每次信号处理后会把信号处理改成默认处理方式。但对于系统调用函数被信号打断时,系统调用是否会自动启动好像没怎么说明。不过可以自己动手看一下:
signal(SIGTERM, term_handle ......
在一个程序崩溃时,默认情况下是不产生core文件。
下面的命令可以检查生成core文件的选项是否打开:
$ulimit -a该命令将显示所有的用户定制,其中选项-a代表“all”。
$ulimit -c unlimited来让特定的用户可以产生core文件
core文件仅仅是一个内存映象(同时加上调试信息),主要是用来调试的。如果您根本就不想 ......
ls
ls 命令可以说是linux下最常用的命令之一。它有众多的选项,其中有很多是很有用的,你是否熟悉呢?下面列出了 ls 命令的绝大多数选项。
-a 列出目录下的所有文件,包括以 . 开头的隐含文件。
-b 把文件名中不可输出的字符用反斜杠加字符编号(就象在C语言里一样)的形式列出。
-c 输出文件的 i 节 ......
NO
分类
PS1
命令名
用法及参数
功能注解
1
显示目录信息
#
ls
ls -a
列出当前目录下的所有文件,包括以.头的隐含文件
#
ls
ls -l或ll
列出当前目录下文件的详细信息
#
ls
ls -a
显示所有文件,包含隐藏。
#
ls
ls -al
显示所有文件的详细信息。
2
查看路径
#
pwd
pwd
......
from:http://blog.chinaunix.net/u2/62281/showart_1096746.html
sock_raw原始套接字编程可以接收到本机网卡上的数据帧或者数据包,对与监听网络的流量和分析是很有作用的.一共可以有3种方式创建这种socket
1.socket(AF_INET, SOCK_RAW, IPPROTO_TCP|IPPROTO_UDP|IPPROTO_ICMP)发送接收ip数据包
2.socket(PF_PACK ......