Intercept PPP negotiation?
Question:
Is there any way to intercept, and alter, the PPP IP
address negotiation?
(I am prepared to write some in-between driver, if
neccessary.)
I have a dial-up ISDN line, and I need Windows to be using
a specific IP address for this connection, but allowing
the far end to negotiate a different IP address.
(The reason for this being that I have an Intermediate
Driver (PASSTHRU) that performs NAT and IP routing.)
I need to, if possible, intercept the PPP negotiation, to
agree on one IP address for our side of the PPP link,
while telling Windows another address.
I would guess that my IM driver is located above the WAN
driver, while the PPP negotiation is happening between WAN
and the ISDN driver.
Thanks!
Hannes. Tag: Can I use something like Mutex or Spinlock in ISR rountine? Tag: 33419
Compiling WDM in ASM
Hi ... I'm writing my first WDM driver in all assembly.
Of course, nowhere can I find what options to compile and
link this thing with. Does it need an ORG statement?
Where's the entry point? Any help would be most
appreciated. Thanks much!!!
-- Chris Tag: Can I use something like Mutex or Spinlock in ISR rountine? Tag: 33405
Why is my IRP being cancelled?
Continuing my quest to enumerate the path between the HCD and my usb device,
I'm stuck at the last step in the process.
I am using the device serial number to determine whether the device attached
to the port I'm currently enumerating is actually the device for my device
object.
When I detect a usb device, I create an Irp to send a
IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION to request the serial number
of the device attached to the port on the hub being enumerated.
If my device is connected to a port on an external hub, everything goes
great and I am able to get the serial number string descriptor.
However, if my device is connected directly to a port on the root hub for an
HCD, IoCallDriver returns STATUS_CANCELLED.
Any idea why my irp would be cancelled in this case?
Here's the relevant code I use to build the Irp:
// Build the string descriptor request
ULONG ulBytesRequested = sizeof(USB_DESCRIPTOR_REQUEST)
+ sizeof(USB_STRING_DESCRIPTOR)
+ MAXIMUM_USB_STRING_LENGTH;
PUSB_DESCRIPTOR_REQUEST pstStringDescRequest = (PUSB_DESCRIPTOR_REQUEST)
ExAllocatePool ( NonPagedPool, ulBytesRequested );
RtlZeroMemory ( pstStringDescRequest, ulBytesRequested );
pstStringDescRequest->ConnectionIndex = ulConnectionIndex_;
pstStringDescRequest->SetupPacket.wValue = (USB_STRING_DESCRIPTOR_TYPE<<
8) | iSerialNumberIndex_;
pstStringDescRequest->SetupPacket.wIndex = usLanguageId_;
pstStringDescRequest->SetupPacket.wLength = (USHORT)
MAXIMUM_USB_STRING_LENGTH;
// Build the IRP
KeInitializeEvent ( &event, NotificationEvent, FALSE );
Irp = IoBuildDeviceIoControlRequest
IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION, // ioctl
pHubFdo_,
// target device object
pstStringDescRequest, ulBytesRequested,
// input buffer and length
pstStringDescRequest, ulBytesRequested,
// output buffer and length
FALSE,
// not an internal device control
&event,
// event to signal completion
&iostatus );
// completion status
// Send it and wait for a response
NTSTATUS status = IoCallDriver ( pHubFdo_, Irp );
if ( status == STATUS_PENDING )
{
KeWaitForSingleObject ( &event, Executive, KernelMode, FALSE, NULL );
status = iostatus.Status;
} Tag: Can I use something like Mutex or Spinlock in ISR rountine? Tag: 33403
can't achieve direct i/o on lpt1 with windows 2000
Hello,
I have been given a difficult problem at work; any insights would be
appreciated. We have a 8 year old EEPROM burner at work; actually, a
whole dept. full of them, that are only fully functional with windows
98 and below. On these older OS's we are able to transfer rom file
data from the computer to the burner via the parallel port (fast). On
windows NT and above, we are limited to transfers using the serial
port (slow!). The dos-based, primitive-gui application we do this
with is called MTLINK, for which we have no documentation anymore (nor
does the company we originall bought it from!.
I found the problem quickly enough, mainly from newsgroups like this
one. The burner never had a proper lpt1 driver and never needed one
before Windows NT. But none of the solutions I have found on the net
have worked:
Porttalk --- seems to be designed only for single command line
executables. MTLINK.exe opens up a full application (which probably
emits numerous other dos commands behinds the scenes). My app never
fully opens
GiveIO --- With this turned on, MTLINK cannot access the burner even
via the serial port. Since GiveIO opens up everything--there doesn't
seem to be a way to limit its range--I suspect it isplaying havoc with
my program's use of the COM port. Just a theory though.
UserPort --- This had the best gui of all the solutions. Just type
in the address range that I wanted access to and hit "Update".
However my application lost all connnectivity to the burner as soon as
UserPort was turned on, without inputting ANY addresses!
Direct IO --- I thought for sure this was going to work for a while.
It took me some time to configure, but once I did, it launched itself
when I launched MTLINK.exe. However the the burner still failed to
access via parallel port. There was no difference in performance at
all, and no error messages to give me a clue as to why it didn't work.
I have also ofcourse ran across various DLLs and programming classes,
but I have never written a driver, and wouldn't know where to begin.
Particularly with an app that I have no source code or documentation
for.
Sorry for the long story; its been a frustrating few days. My basic
questions are:
1. Does anyone know any options, other than the ones above, that I
should try?
2. Some of the apps above allow you to configure memory ranges as
well. Is this a vital part of the solution? I did not configure
these because I didn't know what to put for them. Does anyone know
how I would find these in Windows 2000?
3. Can anyone tell me if it is possible to build a device driver for
an app that you have no source code for? If so, could you suggest any
books, resources to start with?
Please let me know.
Thank you,
Mike Cooper Tag: Can I use something like Mutex or Spinlock in ISR rountine? Tag: 33392
Printer Driver: gdiinfo.denStyleStep
Hi,
Recently, a big customer of us reported a bug of our win2k monolithic
PCL driver, stating that a EKG printout by our driver is different
from HP LaserJet 5Si (actually a PCL5e unidriver from MS, unidrv.dll
is v5.00.2149.1)
So, I dumped unidrv.dll's GDI structures (DEVMODE, GDIINFO, and
DEVINFO) at run time under 600DPI and compared with ours. Uh huh... I
noticed that unidrv reported to GDI: gdiinfo.denStyleStep = 0x0c
(under 600DPI).
Ours gdiinfo.denStyleStep=0x18 (under 600DPI)
Then I traced the latest HP drivers(not from MS), all of them are the
same as ours under 600DPI.
When I modified unidrv.dll's or our drivers denStyleStep to the same
value. I got the same results.
Well, I checked MS DDK examples, this value should be set to sth like,
gdiinfo.denStyleStep = resolution/25.
But the customer just wants exactly the same printout as HP LaserJet
5Si's.
Our tech support and sales insist this is our driver's bug, although
our driver has the same result as HP latest driver's.
Please someone from MS help me out this hassle. Whether it's the
application's bug or GDI's problem or maybe unidrv.dll is wrong.
Thanks in advance,
Zhao Tag: Can I use something like Mutex or Spinlock in ISR rountine? Tag: 33391
Mirror.dll
I have a quick question. In looking at the mirror sample more closely it
looks like you can specify any miniport file (.sys) but the system will only
use mirror.dll for a mirror driver. Is this correct? Also, where are some
sample INF files for installing a complete video driver?
Thanks
--
Brian V. Minier
Interactive Imaging Systems, Inc
www.iisvr.com Tag: Can I use something like Mutex or Spinlock in ISR rountine? Tag: 33382
IRP_MJ_DEVICE_CONTROL for serial port
Hi
I have a virtual serial port up and running.
I have searched high and low, but I cant seem to find any documentation on
what codes are used for IRP_MJ_DEVICE_CONTROL
What does the major, minor and flags mean ?
TIA
Lars Tag: Can I use something like Mutex or Spinlock in ISR rountine? Tag: 33373
Registry entries for a serial port
Hi gurus
I have a virtual port up and running, seems to install and work fine.
Problem is, that ex HyperTerminal expects an registry entry
HKLM / HARDWARE / DEVICEMAP / SERIALCOMM / COMx
How is this entry generated ?
Do I miss a line in my INF file ?
TIA
Lars Tag: Can I use something like Mutex or Spinlock in ISR rountine? Tag: 33372
USB Disk
Hello:
How can I check a USB disk is online or not from my application?
Any suggestion or reference, documents, URL.....please.
Thank you very much.
Willie. Tag: Can I use something like Mutex or Spinlock in ISR rountine? Tag: 33371
KeStackAttachProcess
Hi! I have a problem with porting driver(none plug and
plug driver) from w2k(nt) to w2k3.
We used ntddk when developing w2k product.
I am going to porting this product to w2k3 using w2k3 ddk.
PsLookupProcessByProcessId, KeAttachProcess,
KeDetachProcess, ObDereferenceObject functions were used
in W2K version to get process information.
But in W2K3 ddk, KeAttachProcess and KeDetachProcess
function are obsolete.
In some documentation, they say that "Use
KeStackAttachProcess and KeUnstackDetachProcess function
instead of them".
As I know, KeStackAttachProcess and KeUnstackDetachProcess
function are undocumented. I searched these functions in
Web sites but I couldn't find how to use.
Please let me know how to use these functions.
I have been troubled with with this problem for several
weeks. ^^;;;;;
In W2K, I used as follows.
typedef PVOID POBJET;
/*==== FORWARD DEFINES ===================*/
NTSYSAPI NTSTATUS NTAPI PsLookupProcessByProcessId(IN
ULONG ProcessId, OUT POBJECT * object);
NTSYSAPI NTSTATUS NTAPI KeAttachProcess(POBJECT Process);
Thank you for your help in advance. Tag: Can I use something like Mutex or Spinlock in ISR rountine? Tag: 33369
problem with installing signed driver
Hi,
I have a setup program that will install a Wireless LAN
driver that is digitally signed. I am using
SetupCopyOemInf() & while the function is executing, it
does it silently (it does not complain that the driver
isn't signed). Later on when a hardware scan is done &
when the DeviceManager is trying to install the driver, I
get this message that the driver isn't signed.
I checked for the files & i see that the inf file is
copied as oem0.inf in \windows\inf & the cat file as
oem0.cat under \windows\system32\catroot\{some guid}. What
else does the installer need?
TIA
HV Tag: Can I use something like Mutex or Spinlock in ISR rountine? Tag: 33365
To AVStream or not to AVStream
I am involved in a USB2 camera project and am trying to decide if it makes
sense to attempt to fit into the standard Microsoft video framework or to
use a proprietary approach. A second company is making this camera for me
and is going to be responsible for the driver. I will be responsible for
integrating the result into our product. Both of us are broadly (albeit
somewhat shallowly) experienced with writing KM/hardware driver code but
have very little experience with the ins and outs of AVStream drivers.
The camera has programmable image size and frame rate from 640x480 at ~60Hz
to 640x1 at kHz. There are also much slower rates with integration and
what-not. Also the pixel bit size can change from 8 to 10 bits depending on
the pixel clock. There are various other bells and whistles. It is highly
desirable handle images on a image by image basis in kernel mode for
realtime processing purposes (this may even be essential at the highest
frame rates).
My question is, does it make sense to try and do this via a AVStream/KS1
style driver or is it better to just create a completely proprietary
interface to the driver? My gut reaction is to push for a AVStream style
driver and we have experimented with this some using usbcam2. The problems
thus far are (from the driver side) dealing with the custom properties for
the camera and being a kernel streaming (or whatever the AVStream term is)
server, and (from my client side) being a ks client. On the last point (ks
client), I understand there is nearly zero documentation. I am prepared to
hunker down with the docs and try to figure this out and (or) hire a
consultant but if the answer is going to be "this won't work" then I can cut
to the chase and just go for a proprietary interface. This would certainly
be easier in the short run.
If the answer is to go for the AVStream style device, are there any
consultants reading this list who are familiar with such a project - both
from the device driver side and the client side?
Regards,
Tom Udale Tag: Can I use something like Mutex or Spinlock in ISR rountine? Tag: 33363
How to disable printing services to detect ECP support
I currently have an option to detect ECP support during
setup of a print driver on Windows 2000 and XP. The
current implementation requires all print drivers to be
moved off of the selected parallel port because I just open
the port and issue IOCTL calls to verify which ECP modes
are supported. I would like to detect ECP compatibility
without any extra user intervention. First is their an
easy way to detect if the computer's BIOS has support for
ECP. If not is there an easy way to disable Windows'
printing services to gain access to the parallel port.
Just stopping the spooler service does not release the
ports so there must be some other way to temporarily stop
print drivers.
Thanks,
Tom Olinger Tag: Can I use something like Mutex or Spinlock in ISR rountine? Tag: 33357
MmMapLockedPagesSpecifyCache Fails on Server 2003
My driver uses MmMapLockedPagesSpecifyCache to map a
memory allocation from the non paged pool to a user
virtual address. This has worked fine in the past, but
now I have found an Enterprise Server 2003 machine that
fails the call.
This driver is deployed on thousands of W2K and XP
machines, and even works on some Server 2003 machines.
Is there something new on Server 2003 that I should be
aware of?
Thanks
Harry Tag: Can I use something like Mutex or Spinlock in ISR rountine? Tag: 33353
Cannot programmatically get a valid connection to a WPA enabled access point.
I am extending our wifi application to support WPA enabled cards and
access points. The code that I am trying does not give a valid DHCP
address, and hence I am not connected. I presume I can do this
through an application and do not have to be a driver. I am currently
using the PCAUSA libraries to communicate with the drivers.
I am currently trying to connect to a WPA enabled access point. The
access point has the authentication set as WPA-PSK, and it uses TKIP
data encryption. The card that we use supports WPA and supports TKIP
data encryption.
I am doing the following to connect to a WPA enabled access point.
Setting the InfrastuctureMode to Ndis802_11Infrastructure.
Setting the AuthenticationMode to Ndis802_11AuthModeWPAPSK.
Setting the EncryptionStatus to Ndis802_11Encryption2Enabled.
I then set the SSID of the access point.
Each of the above statements execute properly and do not return an
error, and when queried, return the appropiate value. At this point I
query connection status and it states that it is connected to the
access point.
At this point I have not added the key, which I think maybe where the
problem is.
int iLength = sizeof (NDIS_802_11_KEY) + 10;
PNDIS_802_11_KEY pKey = (PNDIS_802_11_KEY) new UCHAR[iLength];
memset(pKey,0,iLength);
pKey->KeyIndex = 0x80000001;
pKey->Length = iLength;
pKey->KeyLength = 10;
memcpy(pKey->KeyMaterial,”0123456789”,10);
memcpy(pKey->BSSID,BSSID,sizeof(NDIS_802_11_MAC_ADDRESS));
Even though setting the above key with the OID_802_11_ADD_KEY returns
a success, I still do not get a valid DHCP address.
Could someone tell me what I am missing, or if I have got the order of
execution incorrectly. I have read the Microsoft
802_11_network_adapter_v21.doc, but still am stuck.
Shane Tag: Can I use something like Mutex or Spinlock in ISR rountine? Tag: 33351