You can’t. The devices that TCPIP.SYS creates conform to the TDI
standard, and therefore they only accept IRP_MJ_INTERNAL_DEVICE_CONTROL
IRPs. This kind of I/O control request can only be generated by a
kernel-mode component. Therefore, the direct clients of TCPIP.SYS can
only be kernel-mode components.
The Microsoft stack exposes sockets to user-mode by way of the AFD.
AFD.SYS is a kernel-mode component which interacts with TCPIP.SYS, and
which exposes file handles to user-mode processes, via the WinSock 2
stack.
You CAN implement your own kernel-mode stack, and there is plenty of
documentation on how to do this in the DDK; look up TDI. There are also
several well-known implementations available on the web that do the same
thing (KERNSOCK, etc.). To my knowledge, none of them are free.
– arlie
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Sergo
Sent: Sunday, December 07, 2003 10:48 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] tcpip.sys IOCTL codes
Hello Windows programmers (sorry if it’s a copy )
First time posting maybe not the best place
( was pointed in this direction form win32.programmer.networks) to ask,
but to find out I have to ask first 
Where I can find IOCTL codes ( not just infro query) and examples of
their use for devices created by ‘tcpip.sys’ : ‘tcp’, 'ip, ‘udp’ ‘rawIp’
etc. ( and by ‘ndis’ if the info is close by) for the use by
DeviceIoControl from user-mode app, so I can skip Winsock alltogether. (
I already looked at tdi*.h DDK headers, need more…) Is it considered
as classified information by MS?
–
Alwasy sincerely,
Sergo.
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@sublinear.org To
unsubscribe send a blank email to xxxxx@lists.osr.com