soviet_bloke
Thu Nov 16 02:24:58 CST 2006
Thomas,
> Actually, the WDK includes an interesting example on a non-NDIS network
> driver. It is the KMDF "PCIDRV" sample driver. It is a WDM (non-NDIS) driver
> for the Intel 82557/82558 based PCI Ethernet Adapter (10/100) and Intel
> compatibles.
>
As far as I understand, in the end of the day such drivers are still
meant to be indirectly made NDIS-compliant with the help of additional
drivers that expose NDIS interface on their upper edges. I think it
must be quite usefull approach for someone who wants to present some
device (say, USB modem) as NIC. As far as I understand, my ADSL
connection works in more or less similar fashion - I have a modem plus
2 separate drivers( one of them deals with the modem itself, and
another one presents itself as a miniport on its upper edge and deals
with the other driver on its lower one). Actually, the whole thing
appears as a dial-up connection in the Control Panel.
However, if I got it right, the OP wants to do exactly the opposite -
he has a network card, and he wants to make its driver ignore NDIS
altogether, effectively making it unusable by the network stack. This
is why I said that he is, probably, the first person in the world who
wants to introduce such design
Anton Bassov
Thomas F. Divine [MVP] wrote:
> <soviet_bloke@hotmail.com> wrote in message
> news:1163656641.818182.107280@m7g2000cwm.googlegroups.com...
> >> The purpose it to keep the application still generic and to use the
> >> customised API which works both for NIC and non-NIC cards.
> >
> >
> > NIC stands for 'Network Interface Card" , so that, apparently, by " NIC
> > and non-NIC cards"
> > you meant NDIS-compliant and NDIS-non-compliant network cards (in fact,
> > I've never heard about the latter type - you are, probably, the first
> > person in the world to introduce the one).
>
> Actually, the WDK includes an interesting example on a non-NDIS network
> driver. It is the KMDF "PCIDRV" sample driver. It is a WDM (non-NDIS) driver
> for the Intel 82557/82558 based PCI Ethernet Adapter (10/100) and Intel
> compatibles.
>
> Very educational sample, IMHO.
>
> No, it doesn't appear in the Network Control Panel.
>
> The WDK "NDISEDGE" sample shows how to glue PCIDRV into the NDIS framework.
>
> I personally wouldn't follow this model for production purposes, but it does
> illustrate useful techniques.
>
> I think that the OP should simply take his existing driver and adapt it to
> be a true NDIS miniport...
>
> Thomas
>
>
> > In actuality, the purpose of NDIS is to provide a standard network
> > interface, so that protocol drivers can seamlessly communicate with
> > network adapters, although both protocol drivers and network adapters
> > may be supplied by various vendors.
> >
> >
> > Therefore, in most cases designing NDIS-non-compliant network card is
> > among those things that just defeat the common sense. The only
> > *THEORETICALLY* possible exception to the rule is the situation when
> > you need something really, really custom (including a client
> > application). To be honest, I just cannot imagine the situation when
> > you may need something like that - as Thomas has already explained it
> > to you, the most reasonable thing to do is just to add NDIS support to
> > your driver
> >
> >
> >
> > However, if you need just "customised API"...... well, then this is a
> > bit different story, but you have to stop thinking of your driver as of
> > network adapter - let the system think of it as
> > of anything but NIC (and, indeed, this is what it is, from the system's
> > perspective). Instead of fooling the whole system, you can limit
> > yourself to fooling the target application - for the purpose of your
> > task it will work just fine
> >
> >
> >
> >
> > What you can do is just to hook Winsock in the address space of your
> > target application, so that you can redirect Winsock calls to your
> > driver, effectively bypassing the network stack whenever you are
> > interested in doing it . It sounds easy, but, in actuality, it is not -
> > if you really want to make your app believe that it deals with the
> > network stack, you have to implement all protocol-related details
> > yourself (it can be done either by your hooking code or by your
> > driver). In the extreme case, you may be required to implement the
> > whole functionality of TCPIP.SYS. Do you really need it????
> >
> >
> > To summarize, I would advise you to think it over again - as Thomas has
> > already told you, the best thing to do is to add NDIS support to your
> > driver. This is how you are supposed to do things
> >
> >
> > Anton Bassov
> >
> >
> > sriivii@hotmail.com wrote:
> >> The purpose it to keep the application still generic and to use the
> >> customised API which works both for NIC and non-NIC cards.
> >>
> >> soviet_bloke@hotmail.com wrote:
> >> > Thomas,
> >> >
> >> > Please look at the statement that the OP made in his original post:
> >> >
> >> > [begin quote]
> >> >
> >> > I need this because I have a generic application that gets the list of
> >> > network adapters from Network Connections in the Control Panel, and
> >> > communicates with them
> >> >
> >> > [end quote]
> >> >
> >> > I just wonder how the OP sees the possibility of "communication"
> >> > between this generic application and his "network adapter"......
> >> >
> >> > OK, he can trick this app into believing that it deals with a network
> >> > adapter if he adds support for the appropriate OIDs in his Dispatch()
> >> > routine (in order to make it look more real, he can even assign a
> >> > symbolic link in the form "\\Device\\{GUID}" to it), but what is he
> >> > going to do when it comes to actually communicating with this "adapter"
> >> > in some way, other than DeviceIoControl() ???? Once his "adapter" does
> >> > not provide support for NDIS, this application
> >> > would be unable to use anything that somehow involves protocol drivers
> >> > (for example, to use Winsock or NetBios with it), and, apparently, it
> >> > would be unable to send WMI queries to his "adapter" either.
> >> >
> >> >
> >> > Therefore, the only thing the OP can do is to write a custom, rather
> >> > than generic, application that communicates with this "adapter" only
> >> > via ReadFile()/WriteFile()/DeviceIoControl() calls, and, at this point,
> >> > the very term "network adapter" becomes just inappropriate in relation
> >> > to his driver.
> >> >
> >> > Anton Bassov
> >> >
> >> > Thomas F. Divine [MVP] wrote:
> >> > > No, trying that would really hose the system. NDIS has it's own
> >> > > enumerator
> >> > > and installer. A ton of APIs would probably break. It would be a
> >> > > nightmare.
> >> > >
> >> > > Thos
> >> > >
> >> > > <sriivii@hotmail.com> wrote in message
> >> > > news:1163631848.751423.276600@h54g2000cwb.googlegroups.com...
> >> > > >I was just wondering if I could make the adapter appear in 'Network
> >> > > > connection' just by creating some registry keys or something of
> >> > > > that
> >> > > > sort.
> >> > > >
> >> > > >
> >> > > > Thomas F. Divine [MVP] wrote:
> >> > > >> You would have to glue your driver into the NDIS miniport
> >> > > >> architecture
> >> > > >> for
> >> > > >> it to appear as a network adapter to the system.
> >> > > >>
> >> > > >> Your alternative is to modify your generic application to detect
> >> > > >> your
> >> > > >> "network" card through some private mechanism and include your
> >> > > >> card along
> >> > > >> with real NDIS miniports...
> >> > > >>
> >> > > >> Thomas F. Divine
> >> > > >>
http://www.rawether.net
> >> > > >>
> >> > > >> <sriivii@hotmail.com> wrote in message
> >> > > >> news:1163630206.967824.168880@h54g2000cwb.googlegroups.com...
> >> > > >> > Hello,
> >> > > >> >
> >> > > >> > I have written a driver for a proprietary network card (which is
> >> > > >> > not a
> >> > > >> > standard NIC card). This is a monolithic driver and it neither
> >> > > >> > does
> >> > > >> > register itself as a NDIS driver nor does it communicate with
> >> > > >> > NDIS
> >> > > >> > stack.
> >> > > >> >
> >> > > >> > Now, the question is this ? What should I do to display my
> >> > > >> > network
> >> > > >> > adapter in 'Network Connections' (in the control panel) ? Should
> >> > > >> > it
> >> > > >> > necessarily be registered as a NDIS driver or is there any other
> >> > > >> > solution for this ?
> >> > > >> >
> >> > > >> > I need this because I have a generic application that gets the
> >> > > >> > list of
> >> > > >> > network adapters from Network Connections in the Control Panel,
> >> > > >> > and
> >> > > >> > communicates with them.
> >> > > >> >
> >> > > >> > Thanks,
> >> > > >> > Srivi.
> >> > > >> >
> >> > > >
> >