TDI Alternative for WskControlSocket-WskSetOption

Hello,

I am developing a kernel driver that performs a little bit of network
communication. Until very recently, I used WSK for all
communication-related tasks. However, the driver should also work for
Windows XP/2003, so I need to implement everything also via TDI. All
goes well except one case. I need to change TTL of a pakcet being sent.
This is not a problem for WSK – WskControlSocket with WskSetOption as
RequestType does the job. However, I am failing to find a way how to do
this via TDI. I hoped that TdiBuildSetInformation with propper
“information class” will help but it seems I am wrong.

Does anybody know about an alternative to WskControlSocket-WskSetOption?

Best regards
Martin Drab

IIRC it can be set with IOCTL_TCP_SET_INFORMATION_EX on the TDI Address Object Handle with CO_TL_ENTITY, INFO_CLASS_PROTOCOL, INFO_TYPE_ADDRESS_OBJECT, AO_OPTION_TTL, and the ‘value’ a sizeof(int) set to the desired TTL.

At one time this was discernible via a sample named WSHSMPLE in the Windows 2000 DDK - the key file being SMPLETCP.H which documented the (then) undocumented transport operations.

Even MSDN now refers to the operation. http://msdn.microsoft.com/en-us/library/bb432313(v=vs.85).aspx

You can likely find samples on the net (GIYF) if that is not enough of a bootstrap.

Good Luck,
Dave Cattley

And the list archive returns at least this:

http://www.osronline.com/showThread.cfm?link=112948
http://www.osronline.com/showthread.cfm?link=129462
http://www.osronline.com/showthread.cfm?link=169409

and probably many more.

Good Luck,
Dave Cattley

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of David R. Cattley
Sent: Monday, August 19, 2013 7:29 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] TDI Alternative for WskControlSocket-WskSetOption

IIRC it can be set with IOCTL_TCP_SET_INFORMATION_EX on the TDI Address Object Handle with CO_TL_ENTITY, INFO_CLASS_PROTOCOL, INFO_TYPE_ADDRESS_OBJECT, AO_OPTION_TTL, and the ‘value’ a sizeof(int) set to the desired TTL.

At one time this was discernible via a sample named WSHSMPLE in the Windows 2000 DDK - the key file being SMPLETCP.H which documented the (then) undocumented transport operations.

Even MSDN now refers to the operation. http://msdn.microsoft.com/en-us/library/bb432313(v=vs.85).aspx

You can likely find samples on the net (GIYF) if that is not enough of a bootstrap.

Good Luck,
Dave Cattley


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer