2

Although the Ping.Send() is easy and straightforward, I can't seem to figure out how to Ping.Send() out of the interface I choose. specifically my WLAN interface or my Ethernet interface when both are connected to separate networks.

Would I have to use the Sockets namespace and the Bind(localEndpoint)?

It seems odd that that binding functionality isn't available in the NetworkInformation.Ping utility. Or is it & I just can't find it?

Thank you

Steve H
  • 5,479
  • 4
  • 20
  • 26

1 Answers1

1

ICMP is not socket based. The ping will be sent to the appropriate port based on the routing table.

dbasnett
  • 11,334
  • 2
  • 25
  • 33
  • Ah, so if I understand you correctly, I can look at the routing table to see which interface it would go through and *route add* if necessary. Thanks. – Steve H Aug 14 '10 at 17:57