Hello:
Could anyone please talk about the differences between (802.11)MAC entity and Wireless Network interface card or adapter.
I try to create a new MAC through OID_DOT11_CREATE_MAC in win7, and I get the port number and mac address .But, it seems that this MAC entity couldn’t be used as a virtual adapter or virtual wireless NIC to connect wireless network.
So, how can I do if I want to make this new MAC entity be a adapter?
THanks very much.
![]()
I found more information about Mac entity from MSDN doc: The operating system treats each of the MAC entities as a separate virtual adapter, and it controls each MAC individually[http://msdn.microsoft.com/en-us/library/ee220462.aspx]. I have a test, and I find that this virtual adapter could not be enumerated by the function WlanEnumInterfaces(). This new MAC inforamtion :
- port number :1
- Mac address:0-14-78-7a-2-a2
The question now is how to use this MAC entity/virtual adapter?
I still have no idea, any suggestion is welcome.
The operating system (meaning the WiFi infrastructure) can leverage this facility if it so chooses to create the illusion of multiple WIFi interfaces. That does not mean a third party can sneak behind the WiFi infrastructure, send the OID, and poof, have a WiFi adapter appear.
And for what it is worth “treating it as a virtual adapter” us not the same thing as it being a separate adapter. The actual NDIS6 facility leveraged is that a new “Port” is created which is akin to having a multi-port ethernet card that may or may not represent multiple distinct networks (it could be a failover channel for instance). Although how this interplays with the Native WiFi usage Ports in other places (I recall something about micro-cell roaming using Ports to represent the individual APs that are being authenticated against too) I cannot say.
So to your very first question, the difference between a MAC Entity and Interface Card (NIC) is simple (conceptualy):
The MAC entity is a fancy name given to the state and context owned by a WiFi adapter which represents an independent ability to operate as a MAC (a transciever & associated guts). Since these things are built as hybrid software radios, well, have more than one share the actual RF hardware is a ‘possiblity’ and so some NICs are capable of instaniating multiple SW ‘stations’ sharing the RF hardware. They are, however, a single physical device (NIC) and so MAC entity has been invented to provide a control mechanism to instaniate and identify the ‘context’.
You still have one NIC.
It still looks like a NDIS Adapter for WiFi.
It now has a standardized way of telling the NIC to ‘cook me up a new virtual radio and expose it as a NDIS6 Port’.
If the rest of the system is not expecting that Port to show up, however, well, ain’t much good going to come of it.
How about you back up and explain what it is you are trying to accomplish.
Hello, David, thanks for your detailed explanation.
And, I am trying to create a virtual WiFi to connect to multiple IEEE802.11 networks( http://research.microsoft.com/en-us/um/redmond/projects/virtualwifi/ )on the platform of Win7. So far, I have just created a new MAC entity with OID. I don’t think MSDN document is detailed enough to help me move on.
![]()
I have not been ignoring this. I have been spending some time in the
holiday break here to try and see if I could find where the facility
actually got used.
I only found one scenario where the MSFT supplied (Win7) WiFi subsystem
created a ‘virtual’ WiFi adapter and it was on a system with an A/B/G/N
multi-band adapter.
I have also been reading through the WDK supplied Atheros chip-set driver
(ATHWIFI) which is AFAIK the only sample showing how this facility is
implemented.
My suggestion is that you go find yourself an Atheros chip based NIC that is
supported by this driver, build the sample, go through the hoopla to replace
an inbox driver (hmm, perhaps just .kdfiles) and watch what happens under
Win7 from the NIC driver perspective.
You can also (probably) divine what is going on in the native WiFi client by
looking at the bits & pieces installed in Win7 - an NDIS LWF
(netvwififlt.inf) , a filter driver / child device enumerator (bus driver)
(netvwifibus.inf) , and a virtual miniport (netvwifimp.inf).
This all seems to be a scheme to interpose a PnP filter driver on the
physical adapter stack to enumerate ‘child’ virtual WiFi adapters. I am
going to take a guess that the LWF is the ‘mux’ in the scheme whereby a NDIS
‘port’ (and thus MAC entity) on the physical adapter gets associated with a
virtual adapter.
I note with some curiosity that the virtual WiFi adapter is actually a WiFi
adapter (not an Ethernet adapter) and that evidently this is controlled by
the Native WiFi client like any other ‘adapter’. I.E., it seems like the
native WiFi client is not particularly involved although this is entirely
speculation.
What I cannot figure out is if this feature actually implements the facility
you want -e.g., to provide virtual stations on the same band and with the
same radio, or if it only allows (for example) a NIC with multiple radios to
expose them separately.
One thing seems likely, however, and that is whatever you are doing is going
to seriously get in the way of what is happening on Win7 where this facility
is introduced. It will be an interesting tug-of-war in the LWF stack.
Good Luck,
Dave Cattley
ps: The INF files for the ‘inbox’ NETVWIFIFLT.INF component was so
transparently copied from the NDISLWF.INF ‘sample’ INF that it still carries
that name in the header comments and the same non-sense comment line, from
that sample, that says it is the INF from NDISUIO. Go figure. Even MSFT
driver devs forget to rewrite those sample INFs. At least netvwifibus does
not seem to use the Toaster Bus GUID … ![]()
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of feixianyexin@163.com
Sent: Thursday, December 24, 2009 8:56 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] MAC enity and wireless adapter
Hello, David, thanks for your detailed explanation.
And, I am trying to create a virtual WiFi to connect to multiple IEEE802.11
networks(
http://research.microsoft.com/en-us/um/redmond/projects/virtualwifi/ )on the
platform of Win7. So far, I have just created a new MAC entity with OID. I
don’t think MSDN document is detailed enough to help me move on.
![]()
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
I think It is more possible to see what is going on in the native wifi client. But I don’t understand why those three INF files? Are those from WDK samples?
I check the version of my wireless NIC driver is :6.20, and there are two inf fiels:
a. netr73.inf—>netr73.sys
b. netvwifibus.inf –>vwifibus.sys
Just as you mentioned, this virtual adapter is separate from others and independently control a MAC. But this adapter could not be enumerated by the function WlanEnumInterfaces. I am wondering whether this MAC Entity should be initialized before it could be used just like calling NdisIMInitializeDeviceInstanceEx() to initialzie a VELAN before upper layer protocol could bind itself to it in the ‘MUX 6’ sample.
Thanks.
I get more information about Ndis Port States. I suddently find that I just create a Ndis port, and the state of this port is allocated, not active. So, I think it should be activated before it could be used to send and receive packets, etc.