On 8 December 2010 17:08, Steven McCoy <steven.mc...@miru.hk> wrote:

> On 8 December 2010 16:21, Martin Sustrik <sust...@250bpm.com> wrote:
>
>> Similar problem is resolving the NIC names. These are different on
>> different OSes (eth0, en0, e1000g etc.) but auto-resolve is kind of
>> convenient. Still, I've seen people arguing that raw IP addresses should
>> be used instead.
>>
>>
> The designed solution for this is NSS networks but many people don't bother
> so much that neither IPv6 or Windows have public API support for it.
>
>
With 0MQ 2.x & OpenPGM you can do this for a IPv4 network for any platform
but Windows:

remote_thr "epgm://private:7500" 100 100

With 0MQ 2.1 and OpenPGM 5.1.97 you can also specify IPv6 networks or use on
Windows (PGM_NETDB need not be specified on Windows if you wish to use the
default location)

PGM_NETDB="/etc/networks6" remote_thr "epgm://ip6-private:7500" 100 100

PGM_NETDB="%SystemRoot%\system32\drivers\etc\networks" remote_thr
"epgm://ip6-private:7500" 100 100

With /etc/networks6 being same format as /etc/networks.  Environment
variables are only expanded on Windows.

default         0.0.0.0
loopback        127.0.0.0
link-local      169.254.0.0
private         10.6.28.0
ip6-private     2002:dce8:d28e:: ip6-privatenet

You can actually specify the default networks file to just bypass libnss,

PGM_NETDB="/etc/networks" remote_thr "epgm://ip6-private:7500" 100 100

-- 
Steve-o
_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to