TTL for IP addr from DNS through C code


 
Thread Tools Search this Thread
Special Forums IP Networking TTL for IP addr from DNS through C code
# 1  
Old 02-23-2009
TTL for IP addr from DNS through C code

Hi All,
I know that getaddrinfo() return the multiple IP addresses (if present) for a hostname. But, I want to know how to get the TTL value for this list from DNS. I want to get this TTL value and cache this IP address list for that much time and then again go for DNS resolution if TTL expires.

Have any body come across such solution.Plz reply.

Thanks ...
# 2  
Old 02-23-2009
Hint:

Look at the source code for traceroute
# 3  
Old 02-24-2009
get TTL from DNS for list of IP address

Hi,
I just went through the "traceroute" code straight away. But, could not get much help. Can you me give some pointers through any sample code that you would have.

Thanks a lot.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ksh: How do I resolve ip addr in a text file?

Hi, I need to resolve IP to names in a text file. I was thinking of using some unix commands. Ksh. Text in file contains a lot of these entries: .. 20 6 <166>%ASA-6-302013: Built inbound TCP connection 12690562 for inside2:10.86.6.20/3678 (10.86.6.20/3678) to inside:10.107.22.12/1947... (3 Replies)
Discussion started by: hasselhaven
3 Replies

2. Red Hat

DHCP & DNS - Clients get IP but don't register in DNS

I am trying to setup a CentOS 6.2 server that will be doing 3 things DHCP, DNS & Samba for a very small office (2 users). The idea being this will replace a very old Win2k server. The users are all windows based clients so only the server will be Linux based. I've installed CentOS 6.2 with... (4 Replies)
Discussion started by: FireBIade
4 Replies

3. Solaris

Set up TTL on process

Is there a way to setup the TTL (Time To Live) on a process. We have many ssh processes that seem to just stack up. These processes do not need a static connection all the time and it might cause problems on our servers. Does anybody know how to setup the TTL on a process? (10 Replies)
Discussion started by: jastanle84
10 Replies

4. Solaris

BAD TRAP: type=30 rp=2a10001b840 addr=2a000012040 mmu_fsr=0

Hello Gurus, I got a system reboot due to "unix: BAD TRAP: type=30 rp=2a10001b840 addr=2a000012040 mmu_fsr=0" on SUNW,Netra-CP2300. I guess it is caused by HW fault but not very sure, and don't know which part should be relaced incase it is HW reason really. Sincerely appreciate for your... (7 Replies)
Discussion started by: fangfang
7 Replies

5. UNIX for Advanced & Expert Users

Internal heap ERROR 17113 addr=0x0

Hi, I'm running a COBOL process (with subroutines in standard C accessing an oracle database using OCI calls, using shared memories and sem etc....) on an AIX 5.1 machine. Under unusually heavy conditions (millions of loops in the process) I've got the following error: Execution error : file... (0 Replies)
Discussion started by: Isax50
0 Replies

6. UNIX for Dummies Questions & Answers

my_server.1.131.10.in-addr.arpa

Hi all, I am a newbie of setting up DNS server. Everything went fine except one thing. When I do "nslookup", my server name apears as "my_server.1.131.10.in-addr.arpa" rather than "my_server.my_domian.com" on my clients. Do you know how to fix it? Thanks. (2 Replies)
Discussion started by: stancwong
2 Replies

7. AIX

AIX 5.3 , gensyms command, translate 32 bit addr to 64 bit addr

I am trying to map the information from the gensyms command, Its gives information about the various symbols info like symbol type, addr offset, and the main libraries addr starting point. My problem is , how do I map this 32 bit addr to a 64 bit addr, I am trying to extract Segment # information... (0 Replies)
Discussion started by: mrmeswani
0 Replies

8. UNIX for Dummies Questions & Answers

finger, getting name and pts from ip addr

im ultra new at unix and was wondering if its possible to create aliases of the write command that send messeges to users using an ip address. i was thinking to use the '|awk' with the command finger but as i've said im a total newbie. thanks a lot in advance. (2 Replies)
Discussion started by: swag:þ
2 Replies

9. UNIX for Advanced & Expert Users

TTL field???

Hi all, I wonder, how I can change Time To Live field for icmp packet in Redhat 7.1, kernel 2.4.2-2? I looked up in /proc/sys/net/ipv4 and did find this field in there. There should be a way to change TTL. If it's in header file, in which one? Thank you all :p (11 Replies)
Discussion started by: solvman
11 Replies
Login or Register to Ask a Question