live
GroupEId.hh
Go to the documentation of this file.
1/**********
2This library is free software; you can redistribute it and/or modify it under
3the terms of the GNU Lesser General Public License as published by the
4Free Software Foundation; either version 3 of the License, or (at your
5option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
6
7This library is distributed in the hope that it will be useful, but WITHOUT
8ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10more details.
11
12You should have received a copy of the GNU Lesser General Public License
13along with this library; if not, write to the Free Software Foundation, Inc.,
1451 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15**********/
16// "multikit" Multicast Application Shell
17// Copyright (c) 1996-2024, Live Networks, Inc. All rights reserved
18// "Group Endpoint Id"
19// C++ header
20
21#ifndef _GROUPEID_HH
22#define _GROUPEID_HH
23
24#ifndef _BOOLEAN_HH
25#include "Boolean.hh"
26#endif
27
28#ifndef _NET_ADDRESS_HH
29#include "NetAddress.hh"
30#endif
31
32class GroupEId {
33public:
34 GroupEId(struct sockaddr_storage const& groupAddr,
35 portNumBits portNum, u_int8_t ttl);
36 // used for a 'source-independent multicast' group
37 GroupEId(struct sockaddr_storage const& groupAddr,
38 struct sockaddr_storage const& sourceFilterAddr,
40 // used for a 'source-specific multicast' group
41 GroupEId(); // tmp default constructor, until "Groupsock" interface uses "sockaddr_storage"
42
43 struct sockaddr_storage const& groupAddress() const { return fGroupAddress; }
44 struct sockaddr_storage const& sourceFilterAddress() const { return fSourceFilterAddress; }
45
46 Boolean isSSM() const;
47
49
50 u_int8_t ttl() const { return fTTL; }
51
52private:
53 void init(struct sockaddr_storage const& groupAddr,
54 struct sockaddr_storage const& sourceFilterAddr,
56 u_int8_t ttl);
57
58private:
59 struct sockaddr_storage fGroupAddress; // also includes port number (in network byte order)
60 struct sockaddr_storage fSourceFilterAddress;
61 u_int8_t fTTL;
62};
63
64#endif
unsigned char Boolean
Definition: Boolean.hh:25
u_int16_t portNumBits
Definition: NetAddress.hh:102
u_int8_t fTTL
Definition: GroupEId.hh:61
struct sockaddr_storage const & sourceFilterAddress() const
Definition: GroupEId.hh:44
struct sockaddr_storage const & groupAddress() const
Definition: GroupEId.hh:43
portNumBits portNum() const
GroupEId(struct sockaddr_storage const &groupAddr, portNumBits portNum, u_int8_t ttl)
struct sockaddr_storage fGroupAddress
Definition: GroupEId.hh:59
struct sockaddr_storage fSourceFilterAddress
Definition: GroupEId.hh:60
void init(struct sockaddr_storage const &groupAddr, struct sockaddr_storage const &sourceFilterAddr, portNumBits portNum, u_int8_t ttl)
Boolean isSSM() const
GroupEId(struct sockaddr_storage const &groupAddr, struct sockaddr_storage const &sourceFilterAddr, portNumBits portNum)
u_int8_t ttl() const
Definition: GroupEId.hh:50