Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linux Ìí¼ÓÄÚºËÄ£¿é

Ä£¿éÊÇLINUXÌØÓеÄÒ»ÖÖ»úÖÆ£¬¿ÉÒÔ¶¯Ì¬µÄÔö¼ÓÄں˵ŦÄÜ
¿ÉÒÔ×÷Ϊ¶ÀÁ¢³ÌÐòÀ´±àÒ룬µ«¿ÉÒÔËæʱ±»Á´½Óµ½ÄÚºËÖУ¬³ÉΪÄں˵ÄÒ»²¿·Ö£¨INSMOD ./[Ä£¿éÃû].ko£©,Ò²¿ÉÒÔ±»Ð¶ÔØ£¨RMMOD ./[Ä£¿éÃû].ko£©£¬Ä£¿é¼òµ¥Áé»î£¬Ïà±Èϵͳµ÷Ó㬱ÜÃâÁ˱àÒëºÍÆô¶¯Äں˵ÄÂé·³£¬È´Ò»Ñù¿ÉÒÔÔÙºÍÐÄ̬¹¤×÷¡£
ÏÂÃæдд¸öÀý×Ó
Áгöij½ø³Ì¼Ò×åµÄÐÅÏ¢£¬°üÀ¨×Ó½ø³Ì£¬Ðֵܽø³Ì£¬ºÍ×Ó½ø³Ì
Êä³ö³ÌÐòÃû£¬PIDºÅ¡£
ÏÂÃæÓõ½Á½¸öºêlist_entry ºÍlist_for_each
ÏêϸÓ÷¨Çë²Î¿´LINUX-KERNEL 2¡£4 µÄÎĵµ
#include <linux/init.h>
#include<linux/module.h>
#include<linux/sched.h>
#include<linux/string.h>
#include <linux/prefetch.h>
MODULE_LICENSE("GPL");
static int tpid=1;
module_param(tpid, int, S_IRUGO);
MODULE_PARM_DESC(tpid, "The pid of the task");
static int list_family_init(void){
 
 struct task_struct *task_ptr=find_task_by_pid(tpid);
 //*******************************************Father!!******************************************************************//
 printk(KERN_ALERT"Task father info :\n\t Father PID =  %ld  is executing program %s \n",task_ptr->parent->pid,task_ptr->parent->comm);
 //*******************************************************************************************************************//
 //*******************************************Children!!***************************************************************//
   /*  list_entry(task_ptr,task_struct,children);
     struct list_head *pos;
     struct list_head *head=task_ptr->children; 
     for (pos = (head)->next; prefetch(pos->next), pos != (head);pos = pos->next)
     {
      printk(KERN_ALERT"Task children info :\n\t Children PID = %d is executing program %s \n",pos->pid,pos->comm);
     }
   */ 
 struct list_head * temp_ptr;
 struc


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì (Æß) SDPЭÒé

Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖЭÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀЭÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......

LinuxϵͳÎļþĿ¼¼ò½é[ת]

Ò»¡¢¼ò½é: Linux²Ù×÷ϵͳÖÐ,ÒÔÎļþÀ´±íʾËùÓеÄÂß¼­ÊµÌåÓë·ÇÂß¼­ÊµÌå¡£Âß¼­ÊµÌåϵָÎļþÓëĿ¼; ·ÇÂß¼­ÊµÌåÔò·ºÖ¸Ó²ÅÌ¡¢Öն˻ú¡¢´òÓ¡»úµÈ¡£
Ò»°ã¶øÑÔ,LinuxÎļþÃû³ÆµÄ×é³É³ýÓÉÁ¬Ðø×Öĸ¡¢±êµã·ûºÅ¡¢Êý×ֵȹ¹³ÉÍâ,Öм䲻ÄÜÓпոñ·û¡¢Â·¾¶Ãû³Æ·ûºÅ / »ò # * % & {} [] ¡­¡­..µÈÓëShellÓйصÄÌØÊâ×Ö·û¡£
LinuxÎļþÏµÍ ......

LINUXÍøÂç±à³Ì,¼òµ¥µÄÁÄÌì³ÌÐò

·þÎñÆ÷¶Ë£º
   ½¨Á¢socket£¬±¾µØµØÖ·°ó¶¨bind£¬È»ºó½¨Á¢¼àÌý£¬Èç¹ûÓпͻ§¶ËÇëÇóÔòÏìÓ¦Ö®£¬È»ºó½øÐÐÊý¾ÝµÄ·¢ËͺͽÓÊÕ
Ô´´úÂë:
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/time.h&g ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ