English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I've just started C programming and how can I make a program to trace the ip of the receiver of the packets/data that I send across the internet? For example, I open the program and send an email and the program traces the data and gives me the receiver ip.

2007-04-05 16:53:00 · 2 answers · asked by Albert 4 in Computers & Internet Programming & Design

2 answers

You really can't do what you say you want to do. When you send an email, it goes first to your ISP's mail server, then from there to the recipient's mail server. Later, when they pick up the email from their ISP, there's no way for you to know what IP address they're using to retrieve the email.

2007-04-05 18:56:31 · answer #1 · answered by monkey_tester 4 · 0 0

If you are writing an email client, you can get the ip of your smtp mailserver.

If you want the ip of the recipient's mail server you do:
host -t mx domain (note the hostname)
and then host hostname

See the link for how to resolve a hostname in C

2007-04-05 17:10:05 · answer #2 · answered by Vegan 7 · 0 0

fedest.com, questions and answers