I have a NDIS intermediate driver and I have more than one dial-up connection installed. I want to be able to know, at the NDIS IM level, when a dial-up connection connects and, for each packet sent / received on that computer, if it came on a dial-up connection and on which dial-up connection it came.
Отличать WAN соединения можно по парам MAC адресов. При создании соединения можно пропарсить данные переданные в ProtocolStatus при wan line up event, однако имени соединения оттуда не вытащить, нужно делпть агента в user-mode.
You can differ WAN connections by the pair of MAC’s used (source and destination are unique for each WAN link). When the new dial-up connection is created you get a call to you ProtocolStatus handler with wan line up event and you can parse and extract the data passed to this call. However, this won’t alllow you to get the exact connection name, you’ll need a user-mode mode agent for this.
I see in the NDIS_WAN_LINE_UP structure at my ProtocolStatus handler the member DeviceName is not unique for a connection, in time. That is, a specific connection may get a value at this param when it makes a connection and a different one other time, when it makes another connection. That is, the DeviceName is not unique, in time ( between shut down and reconnections ), for a connection. I need an identifier, unique in time for any connection that may go through my NDIS im driver, that cannot be changed unless you remove that connection from the system. It would be best if this ID could be available from a user mode process as well as from my NDIS IM driver.