Re: Can't get MAC Address when connected via VPN
- From: "Harry Bates" <None>
- Date: Thu, 21 Apr 2005 16:09:31 -0400
Just a guess, but depending on the VPN client you are using, it may create
it's own adapter & MAC address on the fly. Older Nortel clients do something
similar. In essence, the IP will not translate back to the NICs MAC address,
but back to the virtual adapters addressing layer. Also, some VPN clients
"lock out" all other network protocols and adapters to void creating a
multihomed exploitable workstation. Nortel also does this in some cases.
This might prohibit you from direct access via normal calls.
If you are looking for local MAC, you might want to enumerate the subkeys of
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards
then pull the GUID from the adapters. Compare the GUID to the subkeys of:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<GUID>
to get your IP Addressing. Use this addressing to poll for MAC.
Not sure if any of this helps, but it may help shed a little light on your
situation.
-Harry Bates
Lockheed-Martin
"Joseph Geretz" <jgeretz@xxxxxxxxxx> wrote in message
news:OO4tW$8OFHA.2700@xxxxxxxxxxxxxxxxxxxxxxx
> I'm using Randy Birch's GetMacAddress function to get the MAC address of
the
> database server when the client software starts up.
>
> http://vbnet.mvps.org/code/network/macaddressremote.htm
>
> The crux of the function is the SendARP function:
>
> Private Declare Function SendARP Lib "iphlpapi.dll" _
> (ByVal DestIP As Long, _
> ByVal SrcIP As Long, _
> pMacAddr As Long, _
> PhyAddrLen As Long) As Long
>
> This is working fine, except for remote office clients which connect to
the
> internal subnet via VPN. these clients are able to cross lookup IP address
> to the Host name and vice versa, but are unable to translate the IP
address
> to MAC address. Any ideas why SendARP would fail under this condition and
> are there any workarounds which you can suggest?
>
> Thanks immensely for any help which you can offer.
>
> Joe Geretz
>
>
.
- References:
- Can't get MAC Address when connected via VPN
- From: Joseph Geretz
- Can't get MAC Address when connected via VPN
- Prev by Date: Re: DragFinish crash
- Next by Date: Re: Constants and strings
- Previous by thread: Can't get MAC Address when connected via VPN
- Next by thread: Problem with Shell_NotifyICON function
- Index(es):
Relevant Pages
|