1ZMQ_PGM(7)                        0MQ Manual                        ZMQ_PGM(7)
2
3
4

NAME

6       zmq_pgm - 0MQ reliable multicast transport using PGM
7

SYNOPSIS

9       PGM (Pragmatic General Multicast) is a protocol for reliable multicast
10       transport of data over IP networks.
11

DESCRIPTION

13       0MQ implements two variants of PGM, the standard protocol where PGM
14       datagrams are layered directly on top of IP datagrams as defined by RFC
15       3208 (the pgm transport) and "Encapsulated PGM" where PGM datagrams are
16       encapsulated inside UDP datagrams (the epgm transport).
17
18       The pgm and epgm transports can only be used with the ZMQ_PUB and
19       ZMQ_SUB socket types.
20
21       Further, PGM sockets are rate limited by default and incur a
22       performance penalty when used over a loop-back interface. For details,
23       refer to the ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP options
24       documented in zmq_setsockopt(3).
25
26           Caution
27           The pgm transport implementation requires access to raw IP sockets.
28           Additional privileges may be required on some operating systems for
29           this operation. Applications not requiring direct interoperability
30           with other PGM implementations are encouraged to use the epgm
31           transport instead which does not require any special privileges.
32

ADDRESSING

34       A 0MQ address string consists of two parts as follows:
35       transport://endpoint. The transport part specifies the underlying
36       transport protocol to use. For the standard PGM protocol, transport
37       shall be set to pgm. For the "Encapsulated PGM" protocol transport
38       shall be set to epgm. The meaning of the endpoint part for both the pgm
39       and epgm transport is defined below.
40
41   Connecting a socket
42       When connecting a socket to a peer address using zmq_connect() with the
43       pgm or epgm transport, the endpoint shall be interpreted as an
44       interface followed by a semicolon, followed by a multicast address,
45       followed by a colon and a port number.
46
47       An interface may be specified by either of the following:
48
49       ·   The interface name as defined by the operating system.
50
51       ·   The primary IPv4 address assigned to the interface, in it’s numeric
52           representation.
53
54           Note
55           Interface names are not standardised in any way and should be
56           assumed to be arbitrary and platform dependent. On Win32 platforms
57           no short interface names exist, thus only the primary IPv4 address
58           may be used to specify an interface.
59
60       A multicast address is specified by an IPv4 multicast address in it’s
61       numeric representation.
62

WIRE FORMAT

64       Consecutive PGM datagrams are interpreted by 0MQ as a single continuous
65       stream of data where 0MQ messages are not necessarily aligned with PGM
66       datagram boundaries and a single 0MQ message may span several PGM
67       datagrams. This stream of data consists of 0MQ messages encapsulated in
68       frames as described in zmq_tcp(7).
69
70   PGM datagram payload
71       The following ABNF grammar represents the payload of a single PGM
72       datagram as used by 0MQ:
73
74           datagram               = (offset data)
75           offset                 = 2OCTET
76           data                   = *OCTET
77
78       In order for late joining consumers to be able to identify message
79       boundaries, each PGM datagram payload starts with a 16-bit unsigned
80       integer in network byte order specifying either the offset of the first
81       message frame in the datagram or containing the value 0xFFFF if the
82       datagram contains solely an intermediate part of a larger message.
83
84       The following diagram illustrates the layout of a single PGM datagram
85       payload:
86
87           +------------------+----------------------+
88           | offset (16 bits) |         data         |
89           +------------------+----------------------+
90
91       The following diagram further illustrates how three example 0MQ frames
92       are laid out in consecutive PGM datagram payloads:
93
94           First datagram payload
95           +--------------+-------------+---------------------+
96           | Frame offset |   Frame 1   |   Frame 2, part 1   |
97           |    0x0000    | (Message 1) | (Message 2, part 1) |
98           +--------------+-------------+---------------------+
99
100           Second datagram payload
101           +--------------+---------------------+
102           | Frame offset |   Frame 2, part 2   |
103           | 0xFFFF       | (Message 2, part 2) |
104           +--------------+---------------------+
105
106           Third datagram payload
107           +--------------+----------------------------+-------------+
108           | Frame offset |   Frame 2, final 8 bytes   |   Frame 3   |
109           | 0x0008       | (Message 2, final 8 bytes) | (Message 3) |
110           +--------------+----------------------------+-------------+
111

EXAMPLE

113       Connecting a socket.
114
115           /* Connecting to the multicast address 239.192.1.1, port 5555, */
116           /* using the first Ethernet network interface on Linux */
117           /* and the Encapsulated PGM protocol */
118           rc = zmq_connect(socket, "epgm://eth0;239.192.1.1:5555");
119           assert (rc == 0);
120           /* Connecting to the multicast address 239.192.1.1, port 5555, */
121           /* using the network interface with the address 192.168.1.1 */
122           /* and the standard PGM protocol */
123           rc = zmq_connect(socket, "pgm://192.168.1.1;239.192.1.1:5555");
124           assert (rc == 0);
125
126

SEE ALSO

128       zmq_connect(3) zmq_setsockopt(3) zmq_tcp(7) zmq_ipc(7) zmq_inproc(7)
129       zmq(7)
130

AUTHORS

132       This 0MQ manual page was written by Martin Sustrik
133       <sustrik@250bpm.com[1]> and Martin Lucina <mato@kotelna.sk[2]>.
134

NOTES

136        1. sustrik@250bpm.com
137           mailto:sustrik@250bpm.com
138
139        2. mato@kotelna.sk
140           mailto:mato@kotelna.sk
141
142
143
1440MQ 2.1.4                         03/30/2011                        ZMQ_PGM(7)
Impressum