Click here to Skip to main content
15,893,814 members
Articles / Desktop Programming / MFC

Traceroute - Using RAW Socket & UDP

Rate me:
Please Sign up or sign in to vote.
4.67/5 (12 votes)
21 May 20076 min read 84.9K   5.2K   46  
Traceroute using RAW Socket and UDP. Raw UDP packets with increasing TTL values are targetted at strange port numbers. The resulting ICMP responses from intermediate hosts contain host identity in the form of its IP address.
// stdafx.h : include file for standard system include files,
//  or project specific include files that are used frequently, but
//      are changed infrequently
//

#if !defined(AFX_STDAFX_H__7F6B5A04_D861_4139_8D36_EE883F0DB31E__INCLUDED_)
#define AFX_STDAFX_H__7F6B5A04_D861_4139_8D36_EE883F0DB31E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define WIN32_LEAN_AND_MEAN		// Exclude rarely-used stuff from Windows headers

#include <stdio.h>

// TODO: reference additional headers your program requires here

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STDAFX_H__7F6B5A04_D861_4139_8D36_EE883F0DB31E__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Technical Lead
India India
Likes painting and photography too.

Comments and Discussions