[erlang-questions] default gateway

Gleb Peregud gleber.p@REDACTED
Wed Feb 15 22:22:26 CET 2012

On Wed, Feb 15, 2012 at 22:15, Dmitry Kolesnikov <dmkolesnikov@REDACTED> wrote:
> Hello,
> do you have any idea, how to get a default gateway using erlang native code?
> I know how to handle it through external program

A bit convoluted solution would be to send ICMP ping to "the Internet"
with TTL equal to one and receive a response. Of course it can get
messy in multiple ways, but it'll be "native" Erlang code.

Are you interested in cross-platform solution? Or do you want to avoid
spawning port (or using os:cmd) ?

Gleb Peregud

More information about the erlang-questions mailing list