Android DNS maid

Source: Internet
Author: User

Android DNS maid

Android DNS 'úâ ~~~úbionic/libc/netbsd öð

£» Android Ó **á £.

Netbsd úâ Â ë» É é ¬ än ~£*ö» Ó Ð Ò ò» ± ß Ð '{%%%%%%%%%%%%%» ± %'{log }éö bytes


~~~Á~~» ~ö~~{μ ¥ {{%%%%%%%%â android ~â %%%%%%mmm ±  {{{{%%%%%%%%%%%%%%%%%%%%%| export py_getaddr ¿éö' then Î Ä ä£ £ £ó Ó Ã adb µçâ µ µ½ devices then µ µ½ system/bin Â È mö' then Ð

payne@payne-desktop:~/njb/getaddr$ cat py_getaddr.c #include 
 
  #include 
  
   #include 
   
    #include 
    
     #include 
     
      #include 
      
       int main(int argc, char **argv){if (argc != 2) {fprintf(stderr, "Usage: %s hostname\n",argv[1]);exit(1); }struct addrinfo *answer, hint, *curr;char ipstr[16]; bzero(&hint, sizeof(hint));hint.ai_family = AF_INET;hint.ai_socktype = SOCK_STREAM;int ret = getaddrinfo(argv[1], NULL, &hint, &answer);if (ret != 0) {fprintf(stderr,"getaddrinfo: &s\n",gai_strerror(ret));exit(1);}for (curr = answer; curr != NULL; curr = curr->ai_next) {inet_ntop(AF_INET,&(((struct sockaddr_in *)(curr->ai_addr))->sin_addr),ipstr, 16);printf("%s\n", ipstr);}freeaddrinfo(answer);exit(0);}
      
     
    
   
  
 


cat Android.mk LOCAL_PATH:= $(call my-dir)include $(CLEAR_VARS)LOCAL_SRC_FILES:= py_getaddr.cLOCAL_MODULE := py_getaddrLOCAL_STATIC_LIBRARIES := libcutils libcinclude $(BUILD_EXECUTABLE)

Μ%%%%%%py_getadd sohu.com µä%± ° %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%â



_ Files_getaddrinfo schemaváès/system/etc/hosts missing variable <symbol · blank "http://www.bkjia.com/kf/ware/vc/" target = "_ blank" class = "keylink"> vcD4KPHA + Signature + 1Nq199PDuf2zzNbQIF9fcmVzX3Zpbml0IMq508PBy8 + hybrid + pgltzybzcm9 "http://www.2cto.com/uploadfile/Collfiles/20141126/20141126084453260.png" alt = "">


Please refer to the following example for more information: *********************************

Py_getaddr sohu.com
=====================================_ Files_getaddrinfo
=====================================_ Dns_getaddrinfo
============ Getaddrinfo cp 8.8.8.8, subf 53
==================== Res_searchN sohu.com
==================== Res_querydomainN name sohu.com, domain (null)
==================== Res_queryN sohu.com
; Res_nmkquery (QUERY, sohu.com, IN,)
==================== Getanswer sohu.com
220.181.90.240
123.125.116.19

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.