Вот так всегда.. пока сам себе не поможешь, никто тебе не поможет. Наткнулся на письмо в PCAUSA и ответ на него (может комуто будет интересно). На вопрос "как определить IP адрес низлежащего адаптера" они отвечают : НИКАК!
)) Но есть пару трюков (я о них думал, но меня такие варианты смущали...) Привожу текст ответа на письмо:
If you are asking if NDIS provides a method for you to ask the lower-level NDIS MAC driver for its IP address, then the answer is:
ABSOLUTELY NOT!!!
With the exception of optional NDIS Task Offload services, NDIS MAC drivers are protocol-independent. They just send and receive the MAC frames that come along. Only higher-level transport drivers understand the MAC frame payload.
There are several ways to determine the IP address of a particular TCP/IP "interface". For example, n user-mode you can use the "IP Helper" API to find the IP address. You can use an IOCTL call from a user-mode application or service to tell your NDIS IM driver what the IP address list is for each interface.
In kernel mode you can use TDI to fetch the same information.
However, the simplest method that you can use to find the IP address of the lower-level NDIS MAC driver from within in your NDIS IM driver is to simply parse IP packets that are being sent. Each IP packet that is being sent includes the source MAC and source IP address. Extract this information and keep it around in your per-adapter structure. Be sure to accomodate multiple IP addresses for a single interface.
Good luck,
Thomas F. Divine