From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8668 invoked by alias); 1 Nov 2008 20:14:18 -0000 Received: (qmail 8499 invoked by uid 22791); 1 Nov 2008 20:14:17 -0000 X-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from qb-out-1314.google.com (HELO qb-out-1314.google.com) (72.14.204.169) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 01 Nov 2008 20:13:40 +0000 Received: by qb-out-1314.google.com with SMTP id f15so782946qba.22 for ; Sat, 01 Nov 2008 13:13:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=o2ouvDg9Lo5DZF6N8aJYLgMjnXoBL5FUVsvef/2h0L8=; b=v+27X5nhkLcRhGJnFnEkvcfyEMxHNENFAjcM8hduRUOXGMKWPw3ddhjLSgXXgaN1VR 8VkduOkBtSIZu62P1AHj1zO66UhOxxq6gdagPgwQSA/qoWtLochyXZrKU8exLVkj3CYe emsAhCjwjnNlNYMFzBEuHTYoW8IG7z7b3AeCk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=nca9om7WJr6ePGYmnLinJYNJZV+4exuHl5kwHw17JLuo1gyqN9u/pnWpw1e2G7ha4A rVKZcasWTmWPch2/jiHtGZvBMcYXJw9RGIKzy5E0whX4KIMTmYJmTpotka7zdVqL4pkZ sqSCuWgHprdhXGUGruwn1aVSpGmCLdJutdGJ8= Received: by 10.103.229.12 with SMTP id g12mr6278207mur.6.1225570417180; Sat, 01 Nov 2008 13:13:37 -0700 (PDT) Received: by 10.103.117.12 with HTTP; Sat, 1 Nov 2008 13:13:37 -0700 (PDT) Message-ID: <29445d0d0811011313s1e3b0e33v7745378587abf983@mail.gmail.com> Date: Sat, 01 Nov 2008 20:14:00 -0000 From: "Dongtao Liu" To: "Breno Leitao" Subject: Re: Does anyone have idea of how to trace the funtion "gethostbyname"? Cc: systemtap@sources.redhat.com In-Reply-To: <490B1746.5020900@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <29445d0d0810291844y54d811fbqd2771a38615a3e79@mail.gmail.com> <490B1746.5020900@linux.vnet.ibm.com> X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2008-q4/txt/msg00249.txt.bz2 yes, it is the function in libc. I downloaded the source code of glibc-2.7.3 and found gethostbyname() function in /resolv/gethnamaddr.c dliu@dliu-desktop:/usr/src/glibc/glibc-2.7/resolv$ ls arpa gai_misc.c getaddrinfo_a.c inet_net_pton.c netdb.h ns_samedomain.c res_debug.c res_mkquery.c tst-aton.c Banner gai_misc.h gethnamaddr.c inet_ntop.c nsap_addr.c nss_dns res_debug.h resolv.h tst-inet_ntop.c base64.c gai_notify.c herror.c inet_pton.c ns_name.c ns_ttl.c res_hconf.c res_query.c tst-leaks2.c Depend gai_sigqueue.c inet_addr.c Makefile ns_netint.c README res_hconf.h res_send.c tst-leaks.c gai_cancel.c gai_suspend.c inet_neta.c mapv4v6addr.h ns_parse.c res_comp.c res_init.c res-state.c Versions gai_error.c ga_test.c inet_net_ntop.c mapv4v6hostent.h ns_print.c res_data.c res_libc.c sys 2008/10/31 Breno Leitao : > Dongtao Liu wrote: >> I recently doing some work to record all DNS lookups in the system. >> Could anyone tell me how to trace the function of gethostbyname using >> SystemTap? > Since this is not a kernel function, you might want to probe userspace > functions. >