I don't know what reminded me of this, but a means of reading the default gateway modem's MAC address was needed because one common ADSL modem would not behave with one widely-used service only. Recently (6 weeks ago?), a firmware upgrade to that modem made the problem go away.
Anyway (months ago now), I took the combined suggestions of Les Hughes and David Connors - see below - which gave rise to a very simple .NET DLL that called on the Windows system file, iphlpapi.dll That component is available in all 32/64 bit Windows since Windows 2000 I think. And pInvoke info was helpful. It will lovely to get the NBN here in the next 12 months and hopefully to do away with cantankerous copper connections. I have a neighbour in the same rollout FSA 6VIC-02 with a max ADSL speed of about 2x dial-up. _____ Ian Thomas Victoria Park, Western Australia _____ From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of David Connors Sent: Wednesday, May 02, 2012 6:10 AM To: ozDotNet Subject: Re: [OT] Detect ADSL modem in use On Wed, May 2, 2012 at 7:56 AM, Les Hughes <l...@datarev.com.au> wrote: ------------------------------------- Step 2: Send the machine a message so it's details are in your local arp table. [ ... ] This will do: "ping IP.AD.DR.ESS -n 1" Step 3: Check your ARP table. [ ... ] This can be done by doing a "arp -a" in windows. Your output will be something like: There are a few other ways you can do this with several dlls around, which avoids the 'hacky-type' process calls, but this should work, and ping.exe and arp.exe have been around and worked for a long time. Both of those steps are pretty ugly. Forking a process to send 20 bytes as a by-product of its intended function is pretty epic. :) You really want the app to make the arp request directly. Did a quick Google and found this: http://msdn.microsoft.com/en-us/library/windows/desktop/aa366358(v=vs.85).as px C++ sample code at the end that compiles to a command line app. I'd gut that sample and turn it into a .dll you can call from .net. Nice and neat to be used with your step 1 above. -- David Connors | <mailto:da...@codify.com> da...@codify.com | <http://www.codify.com> www.codify.com Codify Pty Ltd Phone: +61 (7) 3210 6268 | Facsimile: +61 (7) 3210 6269 | Mobile: +61 417 189 363 V-Card: <https://www.codify.com/cards/davidconnors> https://www.codify.com/cards/davidconnors Address Info: <https://www.codify.com/contact> https://www.codify.com/contact