PC Review


Reply
Thread Tools Rate Thread

How to determine TTL value of a received IP packet?

 
 
Anand R
Guest
Posts: n/a
 
      28th Aug 2003
Hi All,
I would like to know if Windows provides the capability to determine the
TTL value of a *received* IP packet. In Linux, one can do this using the
ancillary data(Posix standard "cmsghdr" structure). I did some search and found
that there is a "WSAMSG" structure that is supported in XP. But this provides
the capability to determine only the destination IP address and the Rx Interface
Index. Is there any other mechanism that is available in Windows that can tell
the TTL value in a received packet?

I know Windows provides the option to "set" the TTL value of an *outgoing*
packet.

Thanks in advance for any help.
-Anand


 
Reply With Quote
 
 
 
 
Arkady Frenkel
Guest
Posts: n/a
 
      31st Aug 2003
Search for DefaultTTL registry key to set with needed value as
TCP/IP & NBT Configuration Parameters for Windows NT and Windows 2000

Q120642 of KB MSDN describe.

Arkady

"Anand R" <(E-Mail Removed)> wrote in message
news:bijofj$381$(E-Mail Removed)...
> Hi All,
> I would like to know if Windows provides the capability to determine

the
> TTL value of a *received* IP packet. In Linux, one can do this using the
> ancillary data(Posix standard "cmsghdr" structure). I did some search and

found
> that there is a "WSAMSG" structure that is supported in XP. But this

provides
> the capability to determine only the destination IP address and the Rx

Interface
> Index. Is there any other mechanism that is available in Windows that can

tell
> the TTL value in a received packet?
>
> I know Windows provides the option to "set" the TTL value of an *outgoing*
> packet.
>
> Thanks in advance for any help.
> -Anand
>
>



 
Reply With Quote
 
Alun Jones [MS MVP]
Guest
Posts: n/a
 
      31st Aug 2003
In article <bijofj$381$(E-Mail Removed)>, "Anand R" <(E-Mail Removed)>
wrote:
> I would like to know if Windows provides the capability to determine the
>TTL value of a *received* IP packet. In Linux, one can do this using the
>ancillary data(Posix standard "cmsghdr" structure). I did some search and found
>that there is a "WSAMSG" structure that is supported in XP. But this provides
>the capability to determine only the destination IP address and the Rx
> Interface
>Index. Is there any other mechanism that is available in Windows that can tell
>the TTL value in a received packet?


It would seem to me that you're most likely to have to implement some form
of raw socket to do that. This will require you to inspect the IP header on
each packet.

Can I ask what you're planning on using this for? There are some
interesting uses for TTL, but since each OS seems to choose a different
value, sometimes changing values with service packs, and the value decreases
each hop, the TTL is somewhat of a random value by the time you get to read
it.

Alun.
~~~~

[Please don't email posters, if a Usenet response is appropriate.]
--
Texas Imperial Software | Find us at http://www.wftpd.com or email
1602 Harvest Moon Place | (E-Mail Removed).
Cedar Park TX 78613-1419 | WFTPD, WFTPD Pro are Windows FTP servers.
Fax/Voice +1(512)258-9858 | Try our NEW client software, WFTPD Explorer.
 
Reply With Quote
 
zoran
Guest
Posts: n/a
 
      5th Sep 2003
(E-Mail Removed) (Alun Jones [MS MVP]) wrote in message news:<INs4b.21$(E-Mail Removed)>...
> In article <bijofj$381$(E-Mail Removed)>, "Anand R" <(E-Mail Removed)>
> wrote:
> > I would like to know if Windows provides the capability to determine the
> >TTL value of a *received* IP packet. In Linux, one can do this using the
> >ancillary data(Posix standard "cmsghdr" structure). I did some search and found
> >that there is a "WSAMSG" structure that is supported in XP. But this provides
> >the capability to determine only the destination IP address and the Rx
> > Interface
> >Index. Is there any other mechanism that is available in Windows that can tell
> >the TTL value in a received packet?

>
> It would seem to me that you're most likely to have to implement some form
> of raw socket to do that. This will require you to inspect the IP header on
> each packet.
>
> Can I ask what you're planning on using this for? There are some
> interesting uses for TTL, but since each OS seems to choose a different
> value, sometimes changing values with service packs, and the value decreases
> each hop, the TTL is somewhat of a random value by the time you get to read
> it.
>
> Alun.
> ~~~~
>


Check out some of the packet sniffing code that is available online,
since packet sniffers can capture every TCP/IP packet you can probably
figure out how to get the TTL field.
 
Reply With Quote
 
zoran
Guest
Posts: n/a
 
      5th Sep 2003
Look into this link it might help:

http://support.microsoft.com/default...en-us%3B224829

Zoran

"Anand R" <(E-Mail Removed)> wrote in message news:<bijofj$381$(E-Mail Removed)>...
> Hi All,
> I would like to know if Windows provides the capability to determine the
> TTL value of a *received* IP packet. In Linux, one can do this using the
> ancillary data(Posix standard "cmsghdr" structure). I did some search and found
> that there is a "WSAMSG" structure that is supported in XP. But this provides
> the capability to determine only the destination IP address and the Rx Interface
> Index. Is there any other mechanism that is available in Windows that can tell
> the TTL value in a received packet?
>
> I know Windows provides the option to "set" the TTL value of an *outgoing*
> packet.
>
> Thanks in advance for any help.
> -Anand

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IP packet inside MAC packet? Poppe Windows XP Networking 4 11th Mar 2010 06:30 AM
Socket call back that received packet data gets 0 byte packets Zytan Microsoft C# .NET 2 24th Apr 2007 01:46 AM
A driver packet received from the I/O subsystem was invalid. Reima Windows XP Help 1 26th Sep 2005 12:57 AM
Getting a MAC address from a received UDP packet in C# =?Utf-8?B?Um9u?= Microsoft C# .NET 1 4th Dec 2004 09:23 PM
Determine Packets sent and received on computer Brian Microsoft VB .NET 2 29th Jun 2004 06:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:47 AM.