Yi Ding | 4 Jan 16:20 2012
Picon

How to read client's IP address from zmqsocket using tcp

Hi,

Saw this thread in the archives.  Has there been any work done on
this?  I'd also find it pretty useful for creating a directory server,
as described in the guide.  (the example in the guide provides a way
to respond to requests but does not provide a way to actually create
the directory)

Thanks,
Yi

----

On Thu, Jun 16, 2011 at 14:19 AM Pieter Hintjens wrote:

On Thu, Jun 16, 2011 at 10:36 AM, Maciej Gajewski
<Maciej.Gajewski at tibra.com> wrote:

> But still it would be possible (and very usefull) to get address of origin of received message. Or - in case
of ROUTER socket - have a mechanism that would translate the sender identity in the first message part into
actual source address.

Interesting thread, because I'm looking at ROUTER emulation for the
VTX layer, and the natural key for a connection is the remote
hostnbr:port. This is in fact what I'd like to use as the identity. It
has the  advantage of being free to compute, and being transient (for
UDP and TCP at least).

It also seems to make sense to expose the origin of any message,
consider the need to log hostile payloads.
(Continue reading)

Pieter Hintjens | 7 Jan 20:21 2012

Re: How to read client's IP address from zmqsocket using tcp

On Wed, Jan 4, 2012 at 9:20 AM, Yi Ding <yi.s.ding <at> gmail.com> wrote:

> Saw this thread in the archives.  Has there been any work done on
> this?  I'd also find it pretty useful for creating a directory server,
> as described in the guide.  (the example in the guide provides a way
> to respond to requests but does not provide a way to actually create
> the directory)

It's how I implemented addresses in the VTX experiment (which stalled,
for reasons of time). It works nicely.

-Pieter
Yi Ding | 9 Jan 00:37 2012
Picon

Re: How to read client's IP address from zmqsocket using tcp

Hi Pieter,

What ZMQ apis did you use to implement these addresses in VTX?  Is
this something which is in ZMQ 2.1 or only in 3.1?

Thanks,
Yi

On Sat, Jan 7, 2012 at 1:21 PM, Pieter Hintjens <ph <at> imatix.com> wrote:
> On Wed, Jan 4, 2012 at 9:20 AM, Yi Ding <yi.s.ding <at> gmail.com> wrote:
>
>> Saw this thread in the archives.  Has there been any work done on
>> this?  I'd also find it pretty useful for creating a directory server,
>> as described in the guide.  (the example in the guide provides a way
>> to respond to requests but does not provide a way to actually create
>> the directory)
>
> It's how I implemented addresses in the VTX experiment (which stalled,
> for reasons of time). It works nicely.
>
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev <at> lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Pieter Hintjens | 9 Jan 18:48 2012

Re: How to read client's IP address from zmqsocket using tcp

On Sun, Jan 8, 2012 at 5:37 PM, Yi Ding <yi.s.ding <at> gmail.com> wrote:

> What ZMQ apis did you use to implement these addresses in VTX?  Is
> this something which is in ZMQ 2.1 or only in 3.1?

VTX (in the v3 branch of the imatix/vtx repo) implements 0MQ patterns
over UDP, so is not using any 0MQ apis at all for this.

-Pieter
Yi Ding | 9 Jan 20:50 2012
Picon

Re: How to read client's IP address from zmqsocket using tcp

OK, got confused because the git page indicates that VTX depends on
ZMQ.  Is it possible for us to "backport" this feature to ZMQ?

On Mon, Jan 9, 2012 at 11:48 AM, Pieter Hintjens <ph <at> imatix.com> wrote:
> On Sun, Jan 8, 2012 at 5:37 PM, Yi Ding <yi.s.ding <at> gmail.com> wrote:
>
>> What ZMQ apis did you use to implement these addresses in VTX?  Is
>> this something which is in ZMQ 2.1 or only in 3.1?
>
> VTX (in the v3 branch of the imatix/vtx repo) implements 0MQ patterns
> over UDP, so is not using any 0MQ apis at all for this.
>
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev <at> lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Pieter Hintjens | 9 Jan 21:15 2012

Re: How to read client's IP address from zmqsocket using tcp

On Mon, Jan 9, 2012 at 1:50 PM, Yi Ding <yi.s.ding <at> gmail.com> wrote:
> OK, got confused because the git page indicates that VTX depends on
> ZMQ.  Is it possible for us to "backport" this feature to ZMQ?

Perhaps, but we would need more agreement on whether or not that is
the way identities should work.

-Pieter
Yi Ding | 10 Jan 01:04 2012
Picon

Re: How to read client's IP address from zmqsocket using tcp

On Mon, Jan 9, 2012 at 2:15 PM, Pieter Hintjens <ph <at> imatix.com> wrote:
> On Mon, Jan 9, 2012 at 1:50 PM, Yi Ding <yi.s.ding <at> gmail.com> wrote:
>> OK, got confused because the git page indicates that VTX depends on
>> ZMQ.  Is it possible for us to "backport" this feature to ZMQ?
>
> Perhaps, but we would need more agreement on whether or not that is
> the way identities should work.
>
> -Pieter

Apologies in advance for being a newb, but do we need to have IP
addresses supersede identities?  Could we not get both the IP address,
and the identity?  This way we can use identities for routing, if
people want to call their endpoint "cat" they can still do so and send
to that endpoint, while allowing us to get IP addresses for things
like creating a directory server, or a service discovery server.

Gmane