当前位置:首页 » 专业资讯
开发技术指南» 文章正文
    引言: I love linux and open source,but
 

 

 ·keyboard interrupt    »显示摘要«
    摘要:编译成功。插入内核====>系统panic  哭了 .....以下这段代码能够在x86上很好的运行,他主要是重新分配键盘的irq,读取键盘的数据寄存器,安排队列的运行,最终打印出scancode的值和按键状态。 #include <linux/kernel.h>#include <linux/module.h>#include <linux/irq.h>#include <linux/keyboard.h> ......
    摘要:虽然迟了点,还是放出来。方便linuxer。呵呵!~http://it.cnlinux.net/iso/rhel3/ ......


linux系统ioctl使用示例
i love linux and open source,but i love my girl more.

   

【相关文章:personal FAQs

【扩展阅读:port linux 2.6.11.7

  these were writed and collected by kf701, 【扩展信息:在SLES 9下查看线程的cpu利用率

you can use and modify them but no warranty.

  contact with me : kf_701@21cn.com

程序1:检测接口的 inet_addr,netmask,broad_addr

程序2:检查接口的物理连接是否正常

程序3:更简单一点测试物理连接

程序4:调节音量

***************************程序1****************************************

#include <stdio.h>

#include <string.h>

#include <stdlib.h>

#include <errno.h>

#include <unistd.h>

#include <sys/types.h>

#include <sys/socket.h>

#include <netinet/in.h>

#include <arpa/inet.h>

#include <sys/ioctl.h>

#include <net/if.h>

static void usage(){

        printf("usage : ipconfig interface \n");

        exit(0);

}

int main(int argc,char **argv)

{

        struct sockaddr_in *addr;

        struct ifreq ifr;

        char *name,*address;

        int sockfd;

        if(argc != 2)

                usage();

        else

                name = argv[1];

        sockfd = socket(af_inet,sock_dgram,0);

        strncpy(ifr.ifr_name,name,ifnamsiz-1);

        if(ioctl(sockfd,siocgifaddr,&ifr) == -1)

                perror("ioctl error"),exit(1);


...   下一页
 ·您现在的浏览器安全吗    »显示摘要«
    摘要:尽管防止网络欺诈已经成为网络安全问题的重矢之地,但是目前的大多数浏览器仍然存在这一安全漏洞。本周二,丹麦安全公司secunia警告用户,当前流行的各种浏览器中都存在一个漏洞,这一漏洞可以被用javascript编写的恶意程序以弹出窗口的形式用来网络欺诈。secunia称,用javascript编写的程序可以利用这一漏洞弹出提示窗口,使用户误以为是来自受信网站弹出的窗口。为了能够更加有效的利用这一漏洞,当用户访问含有恶意程序的网站时,在弹出的窗口中,黑客或者......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE