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

linux ¼¸ÖÖIPCÀý×Ó×ܽá

1.¹ÜµÀ
1.1ÆÕͨ¹ÜµÀ
#include <unistd.h>
#include <sys/types.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
 
int main()
{
       int pipe_fd[2];
       pid_t pid;
       char buf_r[100];
       char *p_wbuf;
       int r_num;
 
       memset(buf_r, 0, sizeof(buf_r));
       if(pipe(pipe_fd) < 0)
       {
              printf("pipe create error!\n");
              return -1;
       }
 
       if((pid = fork()) == 0)
       {
              printf("\n");
              close(pipe_fd[1]);
              sleep(2);
              if((r_num = read(pipe_fd[0], buf_r, 100)) > 0)
              {
                     printf("%d numbers read from the pipe is %s\n", r_num, buf_r);
              }
              close(pipe_fd[0]);
              exit(0);
       }
      


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨Èý£© HCI²ã±à³Ì

1. HCI²ãЭÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI)  ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈЭÒé ......

ʵսLinux Bluetooth±à³Ì(Áù) 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 ......

linux cÎÊÌ⼯½õ

1.ΪʲôÎÒдµÄMakefile£¬Ôڱ༭ÁËÔ´´úÂëÎļþºó£¬Ê¹ÓÃmake£¬makeÈ´ÌáʾĿ±êÎļþÒѾ­Îª×îеÄÁË£¡
2.OpenGL,ÔÚ´°¿ÚÖл­µãʱ£¬ÔõÑùʹÓÃglVertexi()º¯Êý£¿ÒòΪ´«µÝµÄ²ÎÊýÈç¹ûÊÇ´óÓÚ1µÄintÐÍ£¬Ôò²»ÐУ¬¶ø±ØÐë´«µÝ[-0.1~0.1]Ö®¼äµÄfloat£¬¶øÇÒʹÓú¯Êý
gVertex2f().
3.OpenGL,ʹÓò˵¥Ê±£¬ÔõÑù½â¾öµã»÷²Ëµ¥ºó²»Òª²¶×½GLUT_UPÊ ......

Linuxѧϰ±Ê¼Ç

µÚËĽ² Ŀ¼ £¨video07,08,09,10£© Ç¿ÖÆÎ»ÓëðÏÕλ£ºÕë¶Ôu,g,o·Ö±ðÓÐset uid,set gid,¼°sticky¡£
set uid: chmod u+s DirName 
set gid: chmod g+s DirName 
sticky:   chmod o+t DirName
ÀýÈç:ls –l /bin/ping ʹÓÃÁËset uid,±£Ö¤ÈκÎÓû§Ö´ÐÐpingÃüÁîʱ¶¼ÊÇÒÔrootÓû§Éí·Ý. ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ