I like the previous reply that suggested using a user-mode process to do
this with the socket interface. This solution is trivial. By
comparison it is much less work than interfacing to and using the poorly
documented TDI. It is also safer in that when (not if) you make a
mistake, it is better to do it outside the Kernel. Additionally, you
may find other uses for this user-mode process or other facilities you
want to access that are readily available in user-mode.
You could, for example, write a Win32 service which loads your driver
when the system boots and then makes a DEVICEIOCONTROL call to your
driver with a code indicating that it is ready to do work on your
drivers behalf. When the driver needs to issue a user-mode request, it
simply handles the pending IRP passing back the necessary information.
Once you have a facility like this in place, you might use it over and
over again for different projects.
This solution may not be faster, but I think, in the long run, it will
prove to be better and simpler.
Just a suggestion.
-Michael
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Parton, Charles W.
Sent: Monday, October 22, 2001 9:51 AM
To: NT Developers Interest List
Subject: [ntdev] RE: DNS Lookup from kernel mode?
I don’t know of any API, but dns query and answer packets are moderately
easy to build
and decipher. You could save yourself some work and get a c library
package
that would
probably require tweaking to get it compiled with the ddk.
-----Original Message-----
From: Taed Wynnell [mailto:xxxxx@vertical.com]
Sent: Monday, October 22, 2001 12:12 PM
To: NT Developers Interest List
Subject: [ntdev] DNS Lookup from kernel mode?
I have the need to do the occassional DNS lookup from kernel mode. Is
there
some easy way to do that, such as an API that I’m not aware of?
The obvious work-around is to send a message up to some user-mode
service
and have it do it for the driver, but I was just curious if there was a
better / simpler / faster way…
Thanks!
You are currently subscribed to ntdev as: xxxxx@xetron.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: xxxxx@home.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com