Skip to content

ARP Requests are Windows-only #16

@georg-jung

Description

@georg-jung

Trying to execute them on linux results in the following exception:

System.DllNotFoundException: Unable to load shared library 'iphlpapi.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libiphlpapi.dll: cannot open shared object file: No such file or directory
   at System.Net.NativeMethods.SendARP(Int32 destinationIp, Int32 sourceIp, Byte[] macAddress, Int32& physicalAddrLength)
   at System.Net.ArpRequest.Send(IPAddress destination)
   at System.Net.ArpRequest.<>c__DisplayClass1_0.<SendAsync>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location where exception was thrown ---
   at WoL.Services.AddressLookupService.GetMac(IPAddress ip)
   at WoL.Pages.AddHost.GetHostByName()
   at WoL.Pages.AddHost.GetHost()
   at WoL.Pages.AddHost.HandleValidSubmit(EditContext context)

While I understand why this is the case it might be nice to provide a different solution for non-windows platforms or at least throwing a platform not supported exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions