Discussion:
NDIS IM driver and USB net modem.
(too old to reply)
Anand Choubey
2009-02-08 13:59:10 UTC
Permalink
HI,

I developed NDIS IM driver using passthru sample. I am facing an
issue.
If i install my driver then USB cable modem/application are not able
to work.

I have not seen that any activity with my ndis driver using windbg.

I am clueless about it.

Regards,
Anand Choubey
David R. Cattley
2009-02-09 16:47:29 UTC
Permalink
Do not bind to the virtual miniports exported by NDISWAN (RAS) unless your
IM driver knows explicitly how to deal with those miniports.

Remove the string value "wan" from the

HKR, Ndi\Interfaces\FilterMediaTypes,, "ethernet, tokenrign, fddi, wan"

in your NetService INF.

If your IM driver is designed to bind over Ethernet devices only, this line
should only contain "ethernet" for the value. Unless you have written your
IM driver to know how to deal with tokenring, fddi, and wan type bindings,
you are far better off to just bind to "ethernet" only.

Good Luck,
Dave Cattley
Consulting Engineer
Systems Software Development
Post by Anand Choubey
HI,
I developed NDIS IM driver using passthru sample. I am facing an
issue.
If i install my driver then USB cable modem/application are not able
to work.
I have not seen that any activity with my ndis driver using windbg.
I am clueless about it.
Regards,
Anand Choubey
Anand Choubey
2009-02-09 19:11:13 UTC
Permalink
Hi,

Thanks for reply.

I took it from passthru sample and passthru does not create any issue
but my driver creates issue.
I could not get any clue.

Could you please elaborate more?

Regards,
Anand Choubey
Anand Choubey
2009-02-09 19:15:05 UTC
Permalink
I am not using any notify object.
Post by Anand Choubey
Hi,
Thanks for reply.
I took it from passthru sample and passthru does not create any issue
but my driver creates issue.
I could not get any clue.
Could you please elaborate more?
Regards,
Anand Choubey
Anand Choubey
2009-02-09 19:23:34 UTC
Permalink
Just curiosity!!! Could you please provide pointers/links where I get
pointers for NDISWAN binding with normal filter NDIS IM driver?

Regards,
Anand Choubey
David R. Cattley
2009-02-09 23:15:14 UTC
Permalink
There is no such thing as a "normal filter NDIS IM driver". Each one does
something specific to that drivers requirements. What your driver is
logically trying to do has not been made known in any of your posts so
trying to advise you on how (or if you even need to) do that operation on a
NDISWAN virtual miniport is rather a challenge.

Does your driver *need* to bind to any NDISWANxxx virtual miniports? In
other words, does your driver need to process packets that will be
encapsulated into PPP (or SLIP or NBF) and sent over a RAS connection?

If so, then, you must consider carefully how this is done. NDISWAN
exposes a single virtual miniport for each type of protocol that it can be
bound to. This basically means that on Virtual Miniport handles IPv4
frames, one handles IPv6 frames, one handles IPX frames, and one handles NBF
frames. A fourth handles packet monitoring only.

Assuming that your IM only cares about IPv4 traffic you then need to be
aware that multiple PPP connections are multiplexed up through a single
NDISWAN Virtual Adapter. The MAC addresses in the packets (they look like
802.3 packets) are not MAC addresses at all but identifiers that NDISWAN.SYS
and WANARP.SYS use to identify the connection. Your IM driver must ensure
that the MAC address information is not corrupted otherwise NDISWAN.SYS and
WANARP.SYS will have no idea where the packets are to go.

If your IM driver is expecting to learn the IP address(es) assigned to the
'adapter' by monitoring OID_GEN_NETWORK_LAYER_ADDRESSES you are out of luck
for NDISWAN bindings. Instead, you must monitor IP address changes (or IPX
if you are into that sort of thing) using TDI callbacks in conjunction with
NDIS_STATUS_WAN_LINE_{UP|DOWN}. See the DDK docs for NDIS_WAN_LINE_UP and
NDIS_WAN_LINE_DOWN as well as NdisMIndicateStatus. Keep in mind that your
ProtocolStatus() function *must* assume that it can be called at IRQL <=
DISPATCH_LEVEL so processing an ProtocolStatus(....,
NDIS_STATUS_WAN_LINE_{UP|DOWN}...) can be a bit tricky.

Good Luck,
Dave Cattley
Consulting Engineer
Systems Software Development
Post by Anand Choubey
Just curiosity!!! Could you please provide pointers/links where I get
pointers for NDISWAN binding with normal filter NDIS IM driver?
Regards,
Anand Choubey
Olga K
2011-07-25 09:07:21 UTC
Permalink
Hi, I have a similar problem. I develop IM driver for GSM USB modem using passthru sample. I want to capture and modify modem packets.
GSM modem is defined as RAS adapter by OS. I install passthru sample to GSM modem as service. Everything is ok. Passthru service appears in GSM modem connection properties. But passthru driver doesn't work: I have not seen any activity of passthru driver using DebugView.
There are two inf-files in sample: netsf.inf(NetService class) and netsf_m.inf(Net class). Can any changes in passthru inf-files help to install passthru driver to proper place in modem stack? Perhaps, I should change Net class to Modem class in netsf_m.inf.
Is it possible to filter modem packets through net stack? Or can I use USB/COM-port stack to capture modem packets? Any kind of COM-port filter? Any help is appreciated.

Thank you,
Olga
Post by David R. Cattley
Do not bind to the virtual miniports exported by NDISWAN (RAS) unless your
IM driver knows explicitly how to deal with those miniports.
Remove the string value "wan" from the
HKR, Ndi\Interfaces\FilterMediaTypes,, "ethernet, tokenrign, fddi, wan"
in your NetService INF.
If your IM driver is designed to bind over Ethernet devices only, this line
should only contain "ethernet" for the value. Unless you have written your
IM driver to know how to deal with tokenring, fddi, and wan type bindings,
you are far better off to just bind to "ethernet" only.
Good Luck,
Dave Cattley
Consulting Engineer
Systems Software Development
Post by David R. Cattley
There is no such thing as a "normal filter NDIS IM driver". Each one does
something specific to that drivers requirements. What your driver is
logically trying to do has not been made known in any of your posts so
trying to advise you on how (or if you even need to) do that operation on a
NDISWAN virtual miniport is rather a challenge.
Does your driver *need* to bind to any NDISWANxxx virtual miniports? In
other words, does your driver need to process packets that will be
encapsulated into PPP (or SLIP or NBF) and sent over a RAS connection?
If so, then, you must consider carefully how this is done. NDISWAN
exposes a single virtual miniport for each type of protocol that it can be
bound to. This basically means that on Virtual Miniport handles IPv4
frames, one handles IPv6 frames, one handles IPX frames, and one handles NBF
frames. A fourth handles packet monitoring only.
Assuming that your IM only cares about IPv4 traffic you then need to be
aware that multiple PPP connections are multiplexed up through a single
NDISWAN Virtual Adapter. The MAC addresses in the packets (they look like
802.3 packets) are not MAC addresses at all but identifiers that NDISWAN.SYS
and WANARP.SYS use to identify the connection. Your IM driver must ensure
that the MAC address information is not corrupted otherwise NDISWAN.SYS and
WANARP.SYS will have no idea where the packets are to go.
If your IM driver is expecting to learn the IP address(es) assigned to the
'adapter' by monitoring OID_GEN_NETWORK_LAYER_ADDRESSES you are out of luck
for NDISWAN bindings. Instead, you must monitor IP address changes (or IPX
if you are into that sort of thing) using TDI callbacks in conjunction with
NDIS_STATUS_WAN_LINE_{UP|DOWN}. See the DDK docs for NDIS_WAN_LINE_UP and
NDIS_WAN_LINE_DOWN as well as NdisMIndicateStatus. Keep in mind that your
ProtocolStatus() function *must* assume that it can be called at IRQL <=
DISPATCH_LEVEL so processing an ProtocolStatus(....,
NDIS_STATUS_WAN_LINE_{UP|DOWN}...) can be a bit tricky.
Good Luck,
Dave Cattley
Consulting Engineer
Systems Software Development
Post by Anand Choubey
HI,
I developed NDIS IM driver using passthru sample. I am facing an
issue.
If i install my driver then USB cable modem/application are not able
to work.
I have not seen that any activity with my ndis driver using windbg.
I am clueless about it.
Regards,
Anand Choubey
Post by Anand Choubey
Hi,
Thanks for reply.
I took it from passthru sample and passthru does not create any issue
but my driver creates issue.
I could not get any clue.
Could you please elaborate more?
Regards,
Anand Choubey
Post by Anand Choubey
I am not using any notify object.
Post by Anand Choubey
Just curiosity!!! Could you please provide pointers/links where I get
pointers for NDISWAN binding with normal filter NDIS IM driver?
Regards,
Anand Choubey
Olga K
2011-07-25 09:09:00 UTC
Permalink
Hi, I have a similar problem. I develop IM driver for GSM USB modem using passthru sample. I want to capture and modify modem packets. GSM modem is defined as RAS adapter by OS. I install passthru sample to GSM modem as service. Everything is ok. Passthru service appears in GSM modem connection properties. But passthru driver doesn't work: I have not seen any activity of passthru driver using DebugView.
There are two inf-files in sample: netsf.inf(NetService class) and netsf_m.inf(Net class). Can any changes in passthru inf-files help to install passthru driver to proper place in modem stack? May be change Net class to Modem class in netsf_m.inf.
Is it possible to filter modem packets through net stack? Or can I use USB/COM-port stack to capture modem packets? Any kind of COM-port filter? Any help is appreciated.

Thank you,
Olga
Post by David R. Cattley
Do not bind to the virtual miniports exported by NDISWAN (RAS) unless your
IM driver knows explicitly how to deal with those miniports.
Remove the string value "wan" from the
HKR, Ndi\Interfaces\FilterMediaTypes,, "ethernet, tokenrign, fddi, wan"
in your NetService INF.
If your IM driver is designed to bind over Ethernet devices only, this line
should only contain "ethernet" for the value. Unless you have written your
IM driver to know how to deal with tokenring, fddi, and wan type bindings,
you are far better off to just bind to "ethernet" only.
Good Luck,
Dave Cattley
Consulting Engineer
Systems Software Development
Post by David R. Cattley
There is no such thing as a "normal filter NDIS IM driver". Each one does
something specific to that drivers requirements. What your driver is
logically trying to do has not been made known in any of your posts so
trying to advise you on how (or if you even need to) do that operation on a
NDISWAN virtual miniport is rather a challenge.
Does your driver *need* to bind to any NDISWANxxx virtual miniports? In
other words, does your driver need to process packets that will be
encapsulated into PPP (or SLIP or NBF) and sent over a RAS connection?
If so, then, you must consider carefully how this is done. NDISWAN
exposes a single virtual miniport for each type of protocol that it can be
bound to. This basically means that on Virtual Miniport handles IPv4
frames, one handles IPv6 frames, one handles IPX frames, and one handles NBF
frames. A fourth handles packet monitoring only.
Assuming that your IM only cares about IPv4 traffic you then need to be
aware that multiple PPP connections are multiplexed up through a single
NDISWAN Virtual Adapter. The MAC addresses in the packets (they look like
802.3 packets) are not MAC addresses at all but identifiers that NDISWAN.SYS
and WANARP.SYS use to identify the connection. Your IM driver must ensure
that the MAC address information is not corrupted otherwise NDISWAN.SYS and
WANARP.SYS will have no idea where the packets are to go.
If your IM driver is expecting to learn the IP address(es) assigned to the
'adapter' by monitoring OID_GEN_NETWORK_LAYER_ADDRESSES you are out of luck
for NDISWAN bindings. Instead, you must monitor IP address changes (or IPX
if you are into that sort of thing) using TDI callbacks in conjunction with
NDIS_STATUS_WAN_LINE_{UP|DOWN}. See the DDK docs for NDIS_WAN_LINE_UP and
NDIS_WAN_LINE_DOWN as well as NdisMIndicateStatus. Keep in mind that your
ProtocolStatus() function *must* assume that it can be called at IRQL <=
DISPATCH_LEVEL so processing an ProtocolStatus(....,
NDIS_STATUS_WAN_LINE_{UP|DOWN}...) can be a bit tricky.
Good Luck,
Dave Cattley
Consulting Engineer
Systems Software Development
Post by Anand Choubey
HI,
I developed NDIS IM driver using passthru sample. I am facing an
issue.
If i install my driver then USB cable modem/application are not able
to work.
I have not seen that any activity with my ndis driver using windbg.
I am clueless about it.
Regards,
Anand Choubey
Post by Anand Choubey
Hi,
Thanks for reply.
I took it from passthru sample and passthru does not create any issue
but my driver creates issue.
I could not get any clue.
Could you please elaborate more?
Regards,
Anand Choubey
Post by Anand Choubey
I am not using any notify object.
Post by Anand Choubey
Just curiosity!!! Could you please provide pointers/links where I get
pointers for NDISWAN binding with normal filter NDIS IM driver?
Regards,
Anand Choubey
Post by Olga K
Hi, I have a similar problem. I develop IM driver for GSM USB modem using passthru sample. I want to capture and modify modem packets.
GSM modem is defined as RAS adapter by OS. I install passthru sample to GSM modem as service. Everything is ok. Passthru service appears in GSM modem connection properties. But passthru driver doesn't work: I have not seen any activity of passthru driver using DebugView.
There are two inf-files in sample: netsf.inf(NetService class) and netsf_m.inf(Net class). Can any changes in passthru inf-files help to install passthru driver to proper place in modem stack? Perhaps, I should change Net class to Modem class in netsf_m.inf.
Is it possible to filter modem packets through net stack? Or can I use USB/COM-port stack to capture modem packets? Any kind of COM-port filter? Any help is appreciated.
Thank you,
Olga
Loading...