Does anyone have idea of how to trace the funtion "gethostbyname"?
Dongtao Liu
l.dongtao@gmail.com
Sat Nov 1 20:14:00 GMT 2008
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 <leitao@linux.vnet.ibm.com>:
> 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.
>
More information about the Systemtap
mailing list