On 15 May 2011 12:29, Martin Sustrik <[email protected]> wrote:
> Hi Steven,
>
> I've exposed PGM_MULTICAST_HOPS option from 0MQ API. The documentation was
> not clear about whether the option is of type 'int'.
>
>
It's missed on pgm(7) but it's mentioned in the remarks of pgm_setsockopt(2).
I guess it's following typical Unix style of being vague :-)
http://code.google.com/p/openpgm/wiki/OpenPgm5CReferencePgmGetSockOpt
> Can you please check it?
>
>
You already have hops set on line 329 of pgm_socket.cpp, so the patch can be
smaller. The default in ZeroMQ is 16, not 1, for Cisco hardware performance
workarounds, expiring packets on TTL is apparently expensive for some
routers.
- multicast_hops = 16,
+ multicast_hops = (int) options.multicast_hops,
The order of socket options is odd because of the different socket levels
and follows Stevens' style.
--
Steve-o
From f5230e17fd63d33aa2138fb53feb94b2df147d0b Mon Sep 17 00:00:00 2001
From: Steven McCoy <steve-o@akina.(none)>
Date: Sun, 15 May 2011 14:15:37 -0400
Subject: [PATCH] Use multicast hops option on PGM sockets.
Signed-off-by: Steven McCoy <steve-o@akina.(none)>
---
src/pgm_socket.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/pgm_socket.cpp b/src/pgm_socket.cpp
index 5a82907..40b4688 100644
--- a/src/pgm_socket.cpp
+++ b/src/pgm_socket.cpp
@@ -326,7 +326,7 @@ int zmq::pgm_socket_t::init (bool udp_encapsulation_, const char *network_)
{
const int nonblocking = 1,
multicast_loop = options.use_multicast_loop ? 1 : 0,
- multicast_hops = 16,
+ multicast_hops = (int) options.multicast_hops,
// Expedited Forwarding PHB for network elements, no ECN.
dscp = 0x2e << 2;
--
1.7.4.1
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev