You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We send the WOL packet to every network adaptor.
`
For Each adapter As NetworkInterface In nics
' Only display informatin for interfaces that support IPv4.
If adapter.Supports(NetworkInterfaceComponent.IPv4) = False Then
Continue For
End If
Dim addresses As UnicastIPAddressInformationCollection = adapter.GetIPProperties.UnicastAddresses
For Each address As UnicastIPAddressInformation In addresses
If address.Address.AddressFamily = Net.Sockets.AddressFamily.InterNetwork Then
localEndPoint = New IPEndPoint(IPAddress.Parse(address.Address.ToString()), udpPort)
Debug.WriteLine("Interface: " & localEndPoint.ToString())
Try
client = New UdpClient()
client.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, True)
client.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, True)
client.ExclusiveAddressUse = False
client.Client.Bind(localEndPoint)
client.Connect(network, udpPort)
client.EnableBroadcast = True
client.Ttl = ttl
client.Send(packet, packet.Length)
Catch
End Try
End If
Next
Next adapter
Activity
basildane commentedon Aug 14, 2023
I'm not sure what's wrong here.
In https://github.com/basildane/WakeOnLAN/tree/master/WOL/AquilaWOL.vb line 89
We send the WOL packet to every network adaptor.
`
For Each adapter As NetworkInterface In nics
' Only display informatin for interfaces that support IPv4.
If adapter.Supports(NetworkInterfaceComponent.IPv4) = False Then
Continue For
End If
`