[zeromq-dev] PGM and sending interface

Jim Hague jim.hague at acm.org
Tue Jan 5 15:41:51 CET 2016


On Tuesday 22 Dec 2015 08:53:47 Steven McCoy wrote:
> On 22 December 2015 at 05:31, Jim Hague <jim.hague at acm.org> wrote:
> > Unfortunately, I have some configurations that have more than one IP
> > address assigned to an interface. To be clear, I don't mean a Linux
> > aliased interface like eth0:1. I mean
> > 
> > $ ip addr
> > ...
> > 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state
> > UP
> > group default qlen 1000
> >     link/ether 00:30:67:9f:51:49 brd ff:ff:ff:ff:ff:ff
> >     inet 192.168.1.2/24 brd 192.168.1.255 scope global dynamic eth0
> >        valid_lft 33011sec preferred_lft 33011sec
> >     inet 10.169.10.2/24 scope global eth0
> >        valid_lft forever preferred_lft forever
> 
> I would recommend using a network name (/etc/networks) or network address
> if a unique adapter name is not available.  This page introduces the
> different means available in OpenPGM:
> 
> https://code.google.com/p/openpgm/wiki/OpenPgmConceptsTransport#Network_Para
> meters

Thanks for responding, and Happy New Year.

I've read the network parameters docs, and I don't think it helps in my case. 
ZMQ pgm_socket.cpp calls pgm_getaddrinfo() to parse the transport, and then 
uses the interface number when setting up the call to pgm_bind3(). Inside 
pgm_bind3(), pgm_if_indextoaddr() is used to get the address used in the call 
to bind(). The socket is therefore always bound to the first IP address 
associated with the interface, and packets sent out have that address as their 
origin. And I need the packet origin address to be the second IP address. Am I 
missing something?

> Google has closed Google Code, but you can still use the interface for the
> docs.  The repository has moved over to GitHub, there was a link on the
> Google site but it appears to have vanished:
> 
> https://github.com/steve-o/openpgm

Great, thanks.
-- 
Jim Hague - jim.hague at acm.org          Never trust a computer you can't lift.




More information about the zeromq-dev mailing list