zte's code,first commit

Change-Id: I9a04da59e459a9bc0d67f101f700d9d7dc8d681b
diff --git a/ap/app/c-ares/test_call.c b/ap/app/c-ares/test_call.c
new file mode 100644
index 0000000..047c2b9
--- /dev/null
+++ b/ap/app/c-ares/test_call.c
@@ -0,0 +1,51 @@
+#include <stdio.h>

+#include <stdlib.h>

+#include <string.h>

+#include <netdb.h>

+#include <arpa/inet.h>

+#include <ares.h>

+#include <sys/time.h>

+#include <fcntl.h>

+int dns_with_cid(char *name, int cid, int family)

+{

+    struct hostent *host = NULL;

+    char *dev = malloc(10);

+    char num[3] = "";

+    char *ptr, **pptr;

+    char str[30];

+    memset(dev, 0, 10);

+    cfg_get_item("pswan", dev, 10); 

+    sprintf(num, "%d", cid);

+    strcat(dev, num);

+    printf("dev : %s\n", dev);

+    host = compat_gethostbyname3(name, dev, family);

+    if(host != NULL){

+        printf("host->h_name = %s\n", host->h_name);

+        if(host->h_aliases){

+            for(pptr = host->h_aliases; *pptr != NULL; pptr++)

+                printf("\talias:%s\n", *pptr);

+            }

+        else 

+            printf("no aliase\n");

+        if(host->h_addrtype){

+            switch(host->h_addrtype){

+            case AF_INET:

+                pptr =  host->h_addr_list;

+                for(; *pptr != NULL; pptr++)

+                    printf("\t address: %s \n", inet_ntop(AF_INET, *pptr, str, sizeof(str)));

+            break;

+            }

+        }else {

+            printf("no h_addr_list\n");

+        }

+        free_hostent(host);

+    }

+    return 1;

+}

+int main(int argc, char **argv)

+{

+    char *dev = malloc(5);

+    char name[20] = "www.baidu.com";

+    dns_with_cid(name, 1, AF_INET);

+    return 0;

+  }