Linuxϵķɸë¼òÒªÉè¼Æ¿ò¼Ü
ÒÔÏÂÊÇÎÒ´Ó±ðµÄblogÉÏתÔصÄ, ¹ØÓÚLinuxϵķɸë¼òÒªÉè¼Æ¿ò¼Ü, Ö®ËùÒÔ˵ÊÇLinuxϵÄ, ÒòΪ´úÂëÊÇLinuxϵÄ. µ«ÊÇ, Éè¼Æ¿ò¼Ü½«×ñÑwindows°æ·É¸ë´«ÊéµÄÐÒéºÍ¿ò¼Ü.Êý¾Ý°ü¸ñʽ£º
°æ±¾ºÅ£º°ü±àºÅ£ºÓû§Ãû£º»úÆ÷Ãû£ºÃüÁî×Ö£º¸½¼ÓÐÅÏ¢
Èç 1£º2067943£ºliu £ºd14£º32£ºhello
ÒÔÉÏÊÇÒ»¸ö·¢ËÍÏûÏ¢µÄÊý¾Ý°ü¸ñʽ£¬ÆäÖÐ32ÊDZêʾµÄ·¢ÏûÏ¢ÃüÁî×Ö¡£¸½¼ÓÐÅÏ¢»áËæ×ÅÃüÁî×ֵIJ»Í¬¶øÓÐËù²»Í¬£¬ÀýÈ磬µ±¶Ô·½·¢ËÍÁËÒ»ÌõÏûÏ¢£¬ÄãÐèÒª·µ»ØÈ·ÈÏÏûϢʱ£¬¾ÍÐèÒªÔÚ¸½¼ÓÐÅϢλÖüÓÉ϶Է½¸øÄã·¢ÏûϢʱµÄ°ü±àºÅ£¬Ö»Óаü±àºÅÕýÈ·£¬¶Ô·½²Å²»»áÖØ·¢¡£
Õû¸ö¹ý³Ì¶¼ÒªÒÔÒÔÉÏÊý¾Ý°ü¸ñʽ·¢ËÍÊý¾Ý£¬Òò´Ë£¬½«Êý¾Ý°ü¶¨ÒåΪһ¸ö½á¹¹Ìå
typedef struct cmd
{
Unsigned int verision;
Unsigned int packetno;
Char sendName[];
Char machineName[];
Unsigned int fcommandNo; //ÃüÁî×Ö
Struct socketaddr_in peer; //ÕâÊÇÌ×½Ó×ÖÐÅÏ¢´æ´¢½á¹¹Ìå
}CMD£»
ΪÁ˽«ÊµÊ±µÄÔÚÏßÓû§ÐÅÏ¢·µ»Ø£¬¾ÍÐèÒª½¨Á¢Ò»¸öÓû§Á´±í£¬
Óû§ÐÅÏ¢´æ´¢½á¹¹ÌåÈçÏ£º
Typedef struct info
{
Int no;
Char user[];
Char machine[];
Char IP[];
Struct info *next;
}INFO;
×öÍêÒÔÉϹ¤×÷£¬½ÓÏÂÀ´½«½øÐÐ×ÜÌåµÄ¼Ü¹¹¡£ÒòΪ£¬×ÜÌå¼Ü¹¹²»ºÏ¸ñ£¬½«»áÖ±½ÓÓ°ÏìºóÃ湤×÷µÄ½øÐС£Í¨¹ý¶þ´ÎÖØд£¬Ê¹ÎÒÉî¿ÌÈÏʶµ½£¬¹¦Äܺ¯ÊýµÄÖØÒªÐÔ£¬ÔÚÒ»¸öÏîÄ¿ÖУ¬ÓÐʱ»á¶Ôijһ¹¦ÄÜ¿é½øÐжà´Îµ÷Ó㬵«ÄãÓÖ²»ÖªµÀ¾ßÌåʹÄÇÒ»¿é£¬ÕâÊǸú×ÅÏîÄ¿½ø¶È²Å¿É׼ȷ֪µÀµÄ¡£Òò¶ø£¬ÎªÁË·½±ã£¬¾ÍÒª½«Ò»¸ö¹¦ÄÜ·â×°³ÉÒ»¸ö¹¦Äܺ¯Êý£¬Õâ¼´ÓÐÀûÓÚ³ÌÐòµÄ¿É¶ÁÐÔ£¬ÓÖʹµÃ³ÌÐòµÄ¼Ü¹¹±äµÃÈÝÒ×Щ¡£
Ê×ÏÈ£¬ÎÒÃÇÐèÒªÖªµÀ±¾µØµÄÓû§ÃûµÈÐÅÏ¢£¬ÕâÊÇÓÃÀ´Ìî³äCMD½á¹¹ÌåÖеÄÓû§ÃûºÍ»úÆ÷ÃûÐÅÏ¢¡£ÕâÀïÓÐÓõ½µÄÁ½¸öº¯ÊýʵÀý
#include<pwd.h>
#include<sys/utsname.h>
Struct passwd *pwd;
Struct utsname sysName;
uname(&syaName);
pwd = getpwuid(getuid());
ͨ¹ýÉÏÃæµÄ²Ù×÷£¬ÒѾ½«Óû§Ãû´æÈëpwd-->pw_name;»úÆ÷Ãû´æÈësysName.nodenameÖС£
ÔÚ½øÐÐÁÄÌì»òÕßÎļþ´«Êéʱ£¬ÎÒÃÇÐèÒªÓõ½·þÎñÆ÷ģʽ£¬Æäʵudp ·þÎñÆ÷ģʽ
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâƪ·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´ËתÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨Õâƪ²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì ......
µÚÒ»²½£º²Ã¼õÄÚºË
´ò¿ªÖնˣ¬ÊäÈ룺cd /usr/src/linux2.4,È»ºóÊäÈëmake xconfig.ÏÖÔÚ±àÒëÄÚºËÕýʽ¿ªÊ¼ÁË
1.1 “code maturity level options”Ñ¡Ï´ú±í´úÂëµÄ³ÉÊìµÈ¼¶£¬ÒòΪÕâÊÇÒ»¸öÊÔÑéµÄ²¿·Ö£¬ÎÒÃDz»ÐèÒª£¬ËùÒԹرÕËü¡£
1.2 “Loadable module support”¿É¼ÓÔØÄ£¿éÖ§³Ö
¿É¼ÓÔØÄ£¿éÊÇÖ¸Äں˴ú ......
¸´ÖÆÎļþºÍĿ¼ÃüÁî cp
¸ñʽ£º cp [²ÎÊý] Ô´Îļþ»òĿ¼ Ä¿±êÎļþ»òĿ¼
˵Ã÷£º¸ÃÃüÁî°ÑÖ¸¶¨µÄÔ´Îļþ¸´ÖƵ½Ä¿±êÎļþ»ò°Ñ¶à¸öÔ´Îļþ¸´ÖƵ½Ä¿±êĿ¼ÖС£
³£ÓõIJÎÊý£º
- a ¸ÃÑ¡Ïîͨ³£ÔÚ¿½±´Ä¿Â¼Ê±Ê¹Óá£Ëü±£ÁôÁ´½Ó¡¢ÎļþÊôÐÔ£¬²¢µÝ¹éµØ¿½±´Ä¿Â¼£¬Æä×÷ÓõÈÓÚdpRÑ¡ÏîµÄ×éºÏ¡£
- d ¿½±´Ê±±£ÁôÁ´½Ó¡£
- f ɾ³ýÒѾ´æÔÚµÄÄ¿±ê ......
LinuxÖеȴý¶ÓÁлúÖÆ·ÖÎö
ʲôÊǵȴý¶ÓÁУ¿
ÔÚÈí¼þ¿ª·¢ÖÐÈÎÎñ¾³£ÓÉÓÚijÖÖÌõ¼þûÓеõ½Âú×ã¶ø²»µÃ²»½øÈë˯Ãß״̬£¬È»ºóµÈ´ýÌõ¼þµÃµ½Âú×ãµÄʱºòÔÙ¼ÌÐøÔËÐУ¬½øÈëÔËÐÐ״̬¡£ÕâÖÖÐèÇóÐèÒªµÈ´ý¶ÓÁлúÖƵÄÖ§³Ö¡£LinuxÖÐÌṩÁ˵ȴý¶ÓÁеĻúÖÆ£¬¸Ã»úÖÆÔÚÄÚºËÖÐÓ¦Óúܹ㷺¡£
......