嵌入式 hi3518平台以太网网络模块设计包括重连机制和网线检测机制

[html] view plain copy

 
 

  1. <span style="font-family:Courier New;">  
  2. #include <sys/types.h>    
  3. #include <string.h>    
  4. #include <stdlib.h>    
  5. #include <sys/ioctl.h>    
  6. #include <sys/stat.h>    
  7. #include <stdio.h>    
  8. #include <string.h>    
  9. #include <errno.h>    
  10. #include <net/if.h>    
  11. #include <sys/utsname.h>    
  12. #include <limits.h>    
  13. #include <ctype.h>       
  14. #include <sys/socket.h>    
  15. #include <arpa/inet.h>       
  16. #include <linux/sockios.h>    
  17. #include <sys/socket.h>     
  18. #include <netinet/ip.h>     
  19. #include <netinet/ip_icmp.h>     
  20. #include <netdb.h>    
  21. #include <netinet/in.h>  
  22.   
  23. #define JOSEPH_LOOP_INTERFACE           "lo"  
  24. #define JOSEPH_ETH_INTERFACE            "eth0"  
  25. #define JOSEPH_WIRLESS_INTERFACE        "wlan0"  
  26.   
  27. #define ETHTOOL_GLINK                   0x0000000a   /* Get link status (ethtool_value) */    
  28. #define JSOEPH_NET_CHECK_PACKET_SIZE    4096     
  29. #define JOSEPH_NET_CHECK_TIME           3000  
  30.   
  31. typedef struct Joseph_Net_Interface_Info  
  32. {  
  33.     int net_device_type;// 0 ~ eth0 ; 1 ~ wlan ;3 ~ ppp0  
  34.     int net_device_priority;// 0 ~ eth0 ; 1 ~ wlan ;3 ~ ppp0  
  35.     int net_device_status;//0 ~ down; 1 ~ up  
  36.     int net_device_link_status;//0 ~ no ;1 ~ yes  
  37.     char net_device_name[8];  
  38.     char net_device_ip[16];  
  39.     char net_device_mac_info[32];  
  40.     char net_device_gw_info[16];  
  41.     char net_device_mask_info[16];  
  42.     char net_device_broadcast_info[16];  
  43.           
  44. }JOSEPH_NET_INTERFACE_INFO;  
  45.   
  46. typedef struct Joseph_Ethtool_Value {    
  47.     unsigned int   cmd;    
  48.     unsigned int   data;     
  49. }JOSEPH_ETHTOOL_VALUE;  
  50.   
  51. enum Joseph_Net_Device_Type  
  52. {  
  53.     JOSEPH_ETH = 0,  
  54.     JOSEPH_WIFI = 1,  
  55.     JOSEPH_3G = 2,  
  56. }JOSEPH_NET_DEVICE_TYPE;  
  57.   
  58. unsigned short Joseph_Cal_Chksum(unsigned short *addr, int len)   
  59. {    
  60.     int nleft=len;    
  61.     int sum=0;    
  62.     unsigned short *w=addr;    
  63.     unsigned short answer=0;      
  64.   
  65.     while(nleft > 1)   
  66.     {    
  67.       sum += *w++;    
  68.       nleft -= 2;    
  69.     }    
  70.   
  71.     if( nleft == 1)    
  72.     {         
  73.       *(unsigned char *)(&answer) = *(unsigned char *)w;    
  74.       sum += answer;    
  75.     }    
  76.   
  77.     sum = (sum >> 16) + (sum & 0xffff);    
  78.     sum += (sum >> 16);    
  79.     answer = ~sum;    
  80.   
  81.     return answer;    
  82. }    
  83.   
  84. int Joseph_Ping( char *ips,char *srcip , int timeout)  
  85. {        
  86.   
  87.     int n;  
  88.     pid_t pid;    
  89.     int maxfds = 0;    
  90.     fd_set readfds;    
  91.   
  92.     struct ip *iph;    
  93.     struct icmp *icmp;    
  94.     struct timeval *tval;          
  95.     struct sockaddr_in addr;        
  96.     struct sockaddr_in from;  
  97.     struct ifreq ifr;  
  98.       
  99.     bzero(&addr,sizeof(addr));  
  100.     addr.sin_family = AF_INET;    
  101.     addr.sin_addr.s_addr = inet_addr(ips);    
  102.   
  103.     int sockfd;    
  104.     sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);   
  105.     if (sockfd < 0)     
  106.     {      
  107.       printf("ip:%s,socket error\n",ips);      
  108.       return -1;      
  109.     }      
  110.   
  111.     struct timeval timeo;  
  112.     timeo.tv_sec = timeout / 1000;  
  113.     timeo.tv_usec = timeout % 1000;    
  114.   
  115. #if 0  
  116.   
  117.     /*set src ip*/  
  118.     bzero(&from,sizeof(from));  /* 设定Ip信息 */  
  119.     from.sin_family = AF_INET;    
  120.     from.sin_addr.s_addr = inet_addr(srcip);      
  121.   
  122.     if (setsockopt(sockfd, IPPROTO_IP, IP_MULTICAST_IF,(struct sockaddr *)&from, sizeof(from)) == -1)      
  123.     {      
  124.       printf("ip:%s,setsockopt error \n",srcip);       
  125.       return ERROR;  
  126.     }    
  127.     bind(sockfd,(struct sockaddr *)&addr, sizeof(addr));  
  128. #else  
  129.   
  130.     strcpy(ifr.ifr_name, srcip);  
  131.     if (setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE, &ifr, sizeof(ifr)) == -1)  
  132.     {  
  133.         printf("can't bind to interface %s\n",ifr.ifr_name);  
  134.     }  
  135.       
  136. #endif  
  137.   
  138.     if (setsockopt(sockfd, SOL_SOCKET, SO_SNDTIMEO, &timeo, sizeof(timeo)) == -1)      
  139.     {      
  140.         printf("ip:%s,setsockopt error\n",ips);    
  141.         return -1;      
  142.     }  
  143.     else  
  144.     {  
  145.         ;  
  146.     }  
  147.   
  148.     char sendpacket[JSOEPH_NET_CHECK_PACKET_SIZE];      
  149.     char recvpacket[JSOEPH_NET_CHECK_PACKET_SIZE];      
  150.   
  151.     memset(sendpacket, 0, sizeof(sendpacket));    
  152.   
  153.     pid = getpid();     
  154.   
  155.     icmp=(struct icmp*)sendpacket;   
  156.     icmp->icmp_type = ICMP_ECHO;  
  157.     icmp->icmp_code = 0;   
  158.     icmp->icmp_cksum = 0;       
  159.     icmp->icmp_seq = 0;      
  160.     icmp->icmp_id = pid;     
  161.     tval = (struct timeval *)icmp->icmp_data;        
  162.     gettimeofday(tval,NULL);        
  163.     icmp->icmp_cksum=Joseph_Cal_Chksum((unsigned short *)icmp,sizeof(struct icmp));  
  164.   
  165.     n = sendto(sockfd, (char *)&sendpacket, sizeof(struct icmp), 0, (struct sockaddr *)&addr, sizeof(addr));        
  166.     if (n < 1)     
  167.     {      
  168.         printf("ip:%s,sendto error\n",ips);    
  169.         return -1;      
  170.     }      
  171.          
  172.     while(1)   
  173.     {      
  174.       FD_ZERO(&readfds);  
  175.       FD_SET(sockfd, &readfds);      
  176.       maxfds = sockfd + 1;      
  177.       n = select(maxfds, &readfds, NULL, NULL, &timeo);      
  178.       if (n <= 0)       
  179.       {      
  180.           printf("ip:%s,Time out error\n",ips);      
  181.           close(sockfd);      
  182.           return -1;      
  183.       }      
  184.           
  185.       memset(recvpacket, 0, sizeof(recvpacket));      
  186.       int fromlen = sizeof(from);  
  187.       n = recvfrom(sockfd, recvpacket, sizeof(recvpacket), 0, (struct sockaddr *)&from, (socklen_t *)&fromlen);      
  188.       if (n < 1)  
  189.       {     
  190.           return -1;  
  191.       }      
  192.               
  193.       char *from_ip = (char *)inet_ntoa(from.sin_addr);        
  194.       if (strcmp(from_ip,ips) != 0)   
  195.       {      
  196.           printf("NowPingip:%s Fromip:%s\nNowPingip is not same to Fromip,so Joseph_Ping wrong!\n",ips,from_ip);       
  197.           continue;    
  198.       }      
  199.           
  200.       iph = (struct ip *)recvpacket;          
  201.       icmp = (struct icmp *)(recvpacket + (iph->ip_hl << 2));  
  202.   
  203.       if (icmp->icmp_type == ICMP_ECHOREPLY && icmp->icmp_id == pid)  
  204.           return 0;  
  205.       else         
  206.           continue;    
  207.     }   
  208.   
  209.     return 0;  
  210. }  
  211.     
  212. int Joseph_Check_Net_Status(char *if_name)    
  213. {    
  214.     int Qy_Ret = 0;  
  215.     if(strlen(if_name) <= 0)  
  216.     {  
  217.         Qy_Ret = -1;  
  218.         return Qy_Ret;  
  219.     }  
  220.       
  221.     char aPing[16]="202.108.22.5";  /* Joseph_Ping form ip  */  
  222.   
  223.     if(Joseph_Ping(aPing,if_name,JOSEPH_NET_CHECK_TIME) == 0)    
  224.     {    
  225.         printf("Network is Ok!\n");   
  226.         Qy_Ret = 0;  
  227.     }    
  228.     else      
  229.     {    
  230.         printf("Network is Bad!\n");  
  231.         Qy_Ret = -1;  
  232.     }  
  233.   
  234.     return Qy_Ret;  
  235. }  
  236.   
  237.   
  238. /*  
  239. Author : kj  
  240. Time : 2014-08-09  
  241. Function :  
  242.     get ip gw mac broadcast  
  243. */  
  244. int Joseph_Get_Net_Device_Info(JOSEPH_NET_INTERFACE_INFO *Joseph_Net_Interface_Info_In)  
  245. {  
  246.     int Qy_Ret = 0;  
  247.     int device_itertion = 0;  
  248.     int Joseph_Net_Interface_Sfd = 0;  
  249.     int Joseph_Net_Interface_exist = 0;  
  250.     struct ifreq Joseph_Net_Ifr;  
  251.     struct ifconf Joseph_Ifc;  
  252.     struct sockaddr_in *sin = (struct sockaddr_in*)&Joseph_Net_Ifr.ifr_addr;  
  253.     struct sockaddr_in *broadcast = (struct sockaddr_in*)&Joseph_Net_Ifr.ifr_broadaddr;  
  254.   
  255.     if(Joseph_Net_Interface_Info_In == NULL)  
  256.     {  
  257.         Qy_Ret = -1;  
  258.         return Qy_Ret;  
  259.     }  
  260.       
  261.     Joseph_Net_Interface_Sfd = socket(AF_INET,SOCK_DGRAM,0);  
  262.     if(Joseph_Net_Interface_Sfd < 0){  
  263.         perror("socket error");  
  264.         return -1;  
  265.     }  
  266.       
  267.     memset(&Joseph_Net_Ifr,0,sizeof(Joseph_Net_Ifr));  
  268.   
  269.     Joseph_Ifc.ifc_len = sizeof(Joseph_Net_Ifr);  
  270.     Joseph_Ifc.ifc_buf = (caddr_t)&Joseph_Net_Ifr;  
  271.   
  272.               
  273.     for(device_itertion = 1;device_itertion < 5;device_itertion++)  
  274.     {  
  275.         Joseph_Net_Ifr.ifr_ifindex = device_itertion;  
  276.         Qy_Ret = ioctl(Joseph_Net_Interface_Sfd,SIOCGIFNAME,&Joseph_Net_Ifr);  
  277.         if(Qy_Ret)  
  278.         {  
  279.             Joseph_Net_Interface_exist = 0;  
  280.         }  
  281.         else  
  282.         {  
  283.             if(strcmp(Joseph_Net_Ifr.ifr_name,Joseph_Net_Interface_Info_In->net_device_name) == 0)  
  284.             {  
  285.                 printf("The %dst net device is : %s\n",Joseph_Net_Ifr.ifr_ifindex,Joseph_Net_Ifr.ifr_name);  
  286.                 Joseph_Net_Interface_exist = 1;  
  287.   
  288.                 /*Judge card type of net device*/  
  289.                 Qy_Ret = ioctl (Joseph_Net_Interface_Sfd, SIOCGIFFLAGS,&Joseph_Net_Ifr);  
  290.   
  291.                 if(!Qy_Ret)  
  292.                 {  
  293.                     /*judge the status of net device*/  
  294.                     if (Joseph_Net_Ifr.ifr_flags & IFF_UP)  
  295.                     {  
  296.                         puts("the interface status is UP");  
  297.                       
  298.                     }  
  299.                     else  
  300.                     {  
  301.                         puts("the interface status is DOWN");  
  302.                     }  
  303.                 }  
  304.                 break;  
  305.             }  
  306.         }  
  307.   
  308.     }  
  309.     if(Joseph_Net_Interface_exist == 0)  
  310.     {  
  311.         printf("%s:[%d] No Such Device of %s !\n",__FUNCTION__,__LINE__,Joseph_Net_Interface_Info_In->net_device_name);  
  312.         return -1;  
  313.     }  
  314.   
  315.   
  316.     /*get net device mac addr*/  
  317.     Qy_Ret = ioctl(Joseph_Net_Interface_Sfd,SIOCGIFHWADDR,&Joseph_Net_Ifr);  
  318.     if(!Qy_Ret)  
  319.     {  
  320.         sprintf(Joseph_Net_Interface_Info_In->net_device_mac_info,"%02x:%02x:%02x:%02x:%02x:%02x",\  
  321.             (unsigned char)Joseph_Net_Ifr.ifr_hwaddr.sa_data[0],\  
  322.             (unsigned char)Joseph_Net_Ifr.ifr_hwaddr.sa_data[1],\  
  323.             (unsigned char)Joseph_Net_Ifr.ifr_hwaddr.sa_data[2],\  
  324.             (unsigned char)Joseph_Net_Ifr.ifr_hwaddr.sa_data[3],\  
  325.             (unsigned char)Joseph_Net_Ifr.ifr_hwaddr.sa_data[4],\  
  326.             (unsigned char)Joseph_Net_Ifr.ifr_hwaddr.sa_data[5]);  
  327.           
  328.         printf("Mac address is : %02x:%02x:%02x:%02x:%02x:%02x\n",\  
  329.             (unsigned char)Joseph_Net_Ifr.ifr_hwaddr.sa_data[0],\  
  330.             (unsigned char)Joseph_Net_Ifr.ifr_hwaddr.sa_data[1],\  
  331.             (unsigned char)Joseph_Net_Ifr.ifr_hwaddr.sa_data[2],\  
  332.             (unsigned char)Joseph_Net_Ifr.ifr_hwaddr.sa_data[3],\  
  333.             (unsigned char)Joseph_Net_Ifr.ifr_hwaddr.sa_data[4],\  
  334.             (unsigned char)Joseph_Net_Ifr.ifr_hwaddr.sa_data[5]);  
  335.   
  336.     }  
  337.     else  
  338.     {  
  339.         printf("Mac address is : 00:00:00:00:00:00\n");  
  340.     }  
  341.   
  342.     /*get net device ip */  
  343.     memset(Joseph_Net_Interface_Info_In->net_device_ip,0,16);  
  344.     Qy_Ret = ioctl(Joseph_Net_Interface_Sfd,SIOCGIFADDR,&Joseph_Net_Ifr);  
  345.     if(!Qy_Ret)  
  346.     {  
  347.         inet_ntop(AF_INET,&sin->sin_addr.s_addr,Joseph_Net_Interface_Info_In->net_device_ip,16);  
  348.         printf("IP address is : %s\n",Joseph_Net_Interface_Info_In->net_device_ip);  
  349.     }else  
  350.     {  
  351.         printf("IP address is : 0.0.0.0\n");  
  352.     }  
  353.   
  354.     /*get broadcast addr*/  
  355.     memset(Joseph_Net_Interface_Info_In->net_device_broadcast_info,0,16);  
  356.     Qy_Ret = ioctl(Joseph_Net_Interface_Sfd,SIOCGIFBRDADDR,&Joseph_Net_Ifr);  
  357.     if(!Qy_Ret)  
  358.     {  
  359.         inet_ntop(AF_INET,&broadcast->sin_addr.s_addr,Joseph_Net_Interface_Info_In->net_device_broadcast_info,16);  
  360.         printf("BROADCAST IP is : %s\n",Joseph_Net_Interface_Info_In->net_device_broadcast_info);  
  361.     }else  
  362.     {  
  363.         printf("BROADCAST IP is : 0.0.0.0\n");  
  364.     }  
  365.   
  366.     /*get mask info*/  
  367.     Qy_Ret = ioctl(Joseph_Net_Interface_Sfd,SIOCGIFNETMASK,&Joseph_Net_Ifr);  
  368.   
  369.     if (!Qy_Ret)      
  370.     {    
  371.         inet_ntop(AF_INET,&sin->sin_addr.s_addr,Joseph_Net_Interface_Info_In->net_device_mask_info,16);  
  372.         printf("NetMask is : %s\n",Joseph_Net_Interface_Info_In->net_device_mask_info);   
  373.     }    
  374.   
  375.     return Qy_Ret;  
  376. }  
  377.   
  378. /****************************************************************   
  379.    return value:    
  380.    -1 -- error , details can check errno    
  381.    1  -- interface link up    
  382.    0  -- interface link down.    
  383. ****************************************************************/  
  384. int Joseph_Get_Netlink_Status(const char *if_name)    
  385. {    
  386.     int skfd;    
  387.     struct ifreq ifr;    
  388.     JOSEPH_ETHTOOL_VALUE edata;    
  389.     edata.cmd = ETHTOOL_GLINK;    
  390.     edata.data = 0;    
  391.     memset(&ifr, 0, sizeof(ifr));    
  392.     strncpy(ifr.ifr_name, if_name, sizeof(ifr.ifr_name) - 1);    
  393.     ifr.ifr_data = (char *)&edata;    
  394.     if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) == 0)    
  395.         return -1;    
  396.     if (ioctl(skfd, SIOCETHTOOL, &ifr) == -1)    
  397.     {    
  398.        close(skfd);         
  399.        return -1;    
  400.     }    
  401.     close(skfd);    
  402.     return edata.data;    
  403. }    
  404.   
  405. int main(int argc,char *argv[])  
  406. {  
  407.     int Qy_Ret = 0;  
  408.   
  409.     JOSEPH_NET_INTERFACE_INFO Joseph_Net_Interface_Info;  
  410.     memset(&Joseph_Net_Interface_Info,0,sizeof(JOSEPH_NET_INTERFACE_INFO));  
  411.   
  412.     if(argc < 2)  
  413.     {  
  414.         Qy_Ret = -1;  
  415.         return Qy_Ret;  
  416.     }  
  417.       
  418.     system("ifconfig eth0 up");  
  419.     sleep(3);  
  420.   
  421.     strcpy(Joseph_Net_Interface_Info.net_device_name,argv[1]);  
  422.   
  423.   
  424.     Qy_Ret = Joseph_Get_Netlink_Status(argv[1]);  
  425.     if(Qy_Ret == 1)  
  426.     {  
  427.         printf("%s:[%d] The netlink is up !\n",__FUNCTION__,__LINE__);  
  428.     }  
  429.     else  
  430.     {  
  431.         printf("%s:[%d] The netlink is down , Begin go to wifi !\n",__FUNCTION__,__LINE__);  
  432.         return -1;  
  433.     }  
  434.   
  435. NET_INIT:  
  436.   
  437.     /*after 5s , if no ip ,then killall udhcpc ,then go to wifi*/  
  438.     system("killall -9 udhcpc");  
  439.       
  440.     system("udhcpc -i eth0");  
  441.   
  442.     Qy_Ret = Joseph_Check_Net_Status(argv[1]);  
  443.     if(Qy_Ret == 0)  
  444.     {  
  445.         Joseph_Get_Net_Device_Info(&Joseph_Net_Interface_Info);       
  446.     }  
  447.   
  448. NET_RUN:  
  449.     while(1)  
  450.     {  
  451.         Qy_Ret = Joseph_Get_Netlink_Status(argv[1]);  
  452.         if(Qy_Ret == 1)  
  453.         {  
  454.             printf("Net link status: %s\n", Qy_Ret == 1 ? "up" : "down");  
  455.             Qy_Ret = Joseph_Check_Net_Status(argv[1]);  
  456.             if(Qy_Ret < 0)  
  457.             {  
  458.                 break;//do nothing  
  459.             }  
  460.               
  461.         }  
  462.         else  
  463.         {  
  464.             printf("%s:[%d] The netlink is down !\n",__FUNCTION__,__LINE__);      
  465.         }  
  466.         sleep(1);  
  467.     }  
  468.       
  469.     goto NET_INIT;  
  470.   
  471.     return Qy_Ret;  
  472. }  
  473.   
  474. </span>  
时间: 2024-09-16 18:02:35

嵌入式 hi3518平台以太网网络模块设计包括重连机制和网线检测机制的相关文章

嵌入式 hi3518平台uboot引导nfs文件系统

首先贴出来我的bootargs的设置(注没有换行符!!!): setenv bootargs noinitrd mem=64M root=/dev/nfs init=/linuxrc rw nfsroot=10.10.2.59:/opt/rootfs/ ip=10.10.1.156:10.10.2.59:10.10.1.1:255.255.255.0:skdkjzz:eth0:off console=ttyAMA0,115200   Linux编译生成zImage,但是uboot不能识别,ubo

嵌入式 hi3518平台多路码流添加osd

[html] view plain copy     <span style="font-family:Courier New;">      /******************************************************************************   function : overlay process   1) create some overlay regions   2) display overlay regi

嵌入式 hi3518平台指定网卡测试是否通外网

版权声明:本文为博主原创文章,未经博主允许不得转载. [html] view plain copy        [html] view plain copy     /********************************** (C) COPYRIGHT *******************************     * File Name          : netstatus_check.c     * Author             : skdkjzz     

嵌入式 hi3518平台检测网线是否插上

[html] view plain copy        [html] view plain copy     /********************************** (C) COPYRIGHT *******************************   * File Name          : linkstatus_check.c   * Author             : skdkjzz   * Date               : 2014/08/0

多平台通用性交互设计思考

本文作者@一大坨黄 供职@微博UDC设计中心 .近年来,在技术方式,网页自适应的兴起.微软Win8系统的发布,都在试图解决一个问题:让同一产品能在平板.PC等多平台下同时使用. 由此可见,替换掉冗余的多版本开发模式,发展通用性,是未来产品发展的一种趋势.因此,设计师也要在不同的平台规范和习惯中寻找共同点. 针对多平台这一问题,很多网站的解决方法,是为不同的设备提供不同的网页,比如专门提供一个Mobile版本,或者iPhone .iPad版本.这样做固然保证了单一平台的使用效果,但是他妨碍了用户对

iOS/android/wp三大移动平台的交互设计差异

  iOS,Android,WindowsPhone是现在移动互联网上面主流的三个平台了,我也都分别参与过这三个平台的设计.在设计的过程中,因为这三个平台的不同特性,往往要角色切换,不断的换位思维. 可能新手和外行人觉得iOS和Android没什么区别,有的甚至拿Android直接照抄iOS设计就可以了.还有一些人可能对WindowsPhone平台一直觉得魔幻无比,但就是找不到应该如何下手.今天我总结了一下这三个平台之间交互设计上的差异性,在开展交互设计的过程中,必须要注意的问题: 一.布局形式

换个视角看 Maven:一个领域平台的优美设计

作为一个Java程序员,Maven是再熟悉不过的工具了, 它提供了构建项目的一个框架, 在默认情况下为我们提供了许多常用的Plugin,其中便包括构建Java项目的Plugin,还有War,Ear等.除此之外还提供内建的项目生命周期管理. 以上是我们最熟悉的maven的一面. 下面我们要从领域平台设计的角度,分析Maven的优美设计,为我们做领域平台化提供参考,最后我们再来思考如何做招商的领域平台. Maven是领域驱动设计实现的,作为一个强大的项目管理构建平台而实现 我们先会介绍maven的基

ABC设计院私有云平台规划与设计

ABC设计院私有云平台规划与设计 电子科技大学   孟伟 本文的主要内容包括以下几个方面: 首先,从宏观环境和微观环境两个方面对云计算和企业信息化建设作概括性论述,分析云计算给企业信息化带来的变革和好处,说明基于云计算技术进行企业信息化建设时需要注意的问题.对传统IT架构平台和云计算平台进行对比,详细分析传统IT架构平台存在的问题,分析云计算平台在成本方面,部署安装方面,管理方面与传统IT架构平台的差异,详细介绍云计算平台的技术优势.通过云计算平台的成本效益分析,我们发现针对中大型企业而言,私有

Wince MFC OLE DB SQLCE数据库访问技术(一):嵌入式目标平台安装sqlCE

首先到微软官方下载sqlCE 3.0 下载地址:http://www.microsoft.com/downloads/details.aspx?displaylang=zh-cn&FamilyID=e9aa3f8d-363d-49f3-ae89-64e1d149e09b   先在PC机上安装sdk.   当然由于需要将CAB包安装到嵌入式目标跑平台,Microsoft ActiveSync也需要安装,Microsoft ActiveSync微软官方也可以下载到最新版本是 V4.2的.   然后找