Linux ÏÂʵÏÖÁ½¸ö¹ÜµÀË«ÏòÊý¾ÝÁ÷
ÔÎĵØÖ·£ºhttp://www.wangzhongyuan.com/archives/488.html
ÒÔÏÂÊÇÒ»¸öLinux/UnixÏÂÓÉÁ½¸ö¹ÜµÀÌṩ˫ÏòÊý¾ÝÁ÷µÄC³ÌÐò£¬ÕâÊDzÙ×÷ϵͳ¿Î³ÌÖо³£Ê¹ÓõĻù±¾³ÌÐò
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <stdio.h>
#include <string.h>
int main()
{
int fd1[2],fd2[2],cld_pid,status;
char buf[200], len;
if (pipe(fd1) == -1) // ´´½¨¹ÜµÀ1
{
printf("creat pipe1 error\n");
exit(1);
}
if (pipe(fd2) == -1) // ´´½¨¹ÜµÀ2
{
printf("creat pipe2 error\n");
exit(1);
}
if ((cld_pid=fork()) == 0) //×Ó½ø³Ì
{
close(fd1[1]); // ×Ó½ø³Ì¹Ø±Õ¹ÜµÀ1µÄдÈë¶Ë
close(fd2[0]); // ×Ó½ø³Ì¹Ø±Õ¹ÜµÀ1µÄ¶Á³ö¶Ë
//×Ó½ø³Ì¶Á¹ÜµÀ1
len = read(fd1[0],buf,sizeof(buf));
printf("\nÕâÊÇÔÚ×Ó½ø³Ì£º×Ó½ø³Ì´Ó¹ÜµÀ1ÖжÁ³öµÄ×Ö·û´® -- %s",buf);
//×Ó½ø³Ìд¹ÜµÀ2
strcpy(buf,"×Ó½ø³ÌдÈë¹ÜµÀ2µÄ×Ö·û´®");
write(fd2[1],buf,strlen(buf));
printf("\nÕâÊÇÔÚ×Ó½ø³Ì£º×Ó½ø³Ì³É¹¦Ð´ÈëÈçÏÂÓï¾ä£º%s\n",buf);
exit(0);
}
else //¸¸½ø³Ì
{
close(fd1[0]); // ¸¸½ø³Ì¹Ø±Õ¹ÜµÀ1µÄ¶Á³ö¶Ë
close(fd2[1]); // ¸¸½ø³Ì¹Ø±Õ¹ÜµÀ2µÄдÈë¶Ë
//¸¸½ø³Ìд¹ÜµÀ1
strcpy(buf,"¸¸½ø³ÌдÈë¹ÜµÀ1µÄ×Ö·û´®");
write(fd1[1],buf, strlen(buf));
printf("miaojing\n");
//¸¸½ø³Ì¶Á¹ÜµÀ2
len = read(fd2[0],buf,sizeof(buf));
printf("\nÕâÊÇÔÚ¸¸½ø³Ì£º¸¸½ø³Ì´Ó¹ÜµÀ2ÖжÁ³öµÄ×Ö·û´® -- %s\n",buf);
exit(0);
}
}
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......
4¡¢mcrypt°²×°
1£©°²×°mcrypt֮ǰ£¬±ØÐë°²×°libmcryptºÍmhash£¬ÏÈÈ¥http://www.sourceforge.net
ÏÂÔØLibmcrypt£¬mhash£¬mcrypt°²×°°ü
2£©ÏÈ°²×°Libmcrypt
>tar -zxvf libmcrypt-2.5.8.tar.gz
>cd libmcrypt-2.5.8
>./conf ......
·¢²¼Ê±¼ä£º2007.07.30 06:16
À´Ô´£ºÈüµÏÍø
×÷Õߣºsixth
ºÍËùÓеÄÁ÷ÐÐÎı¾±à¼Æ÷Ò»
Ñù£¬Vim ¿ÉÒԺܺõı༸÷ÖÖ×Ö·û±àÂëµÄÎļþ£¬Õ⵱Ȼ°üÀ¨UCS-2¡¢UTF-8 µÈÁ÷ÐÐµÄ Unicode ±àÂ뷽ʽ¡£È»¶ø²»ÐÒµÄÊÇ£¬ºÍºÜ¶àÀ´×Ô
Linux ÊÀ½çµÄÈí¼þÒ»Ñù£¬ÕâÐèÒªÄã×Ô¼º¶¯ÊÖÉèÖ ......
Ubuntu9.10 ¾ÙÀý£¨ÒòΪËü·½±ã£¬N¶à¶«Î÷Ò»Ö±½ÓÔÚÏß°²×°£¬Ê¡µÃ±àÒëÁË£©£¬ÆäËûlinux»ù±¾Ïàͬ£¨²»Í¬µÄ¾ÍÊÇÓÐЩҪ½øÐÐÔ´Âë°²×°£¬µ«Óõ½µÄÈí¼þÊÇÒ»ÑùµÄ£©£¬Õû¸ö°²×°ÎÒÒÔ¾×ö³É½Å±¾·Å·½±ãÏÂÔØ°²×°
°²×°ies4linuxÖв¿·Ö²Î¿¼×Ô£ºhttp://hi.baidu.com/unknown379/blog/item/df70c3ef54742d31adafd506.html
Éæ¼°µÄÈí¼þ
1¡¢wine£¬ÊÇÒ ......