http://qs321.pair.com?node_id=572345


in reply to Net::Ping broken on Solaris?

Indeed, Net::Ping hardware binding seems to work on linux only; the setsockopt call uses SO_BINDTODEVICE which constant isn't defined on solaris. The subroutine that provides the constant is

# h2ph "asm/socket.h" # require "asm/socket.ph"; sub SO_BINDTODEVICE {25;}

Hmm... asm/socket.h ? This file doesn't exist on solaris (nor *BSD).

But in Net::Ping there's $p->bind($local_addr) - maybe that suffices to select the interface.

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}