blob: d2999d0036e1642722abf8e39509945f53a2b4f2 [file] [log] [blame]
alshabiba9b2b5d2015-09-23 15:01:47 -07001/*
2 * Copyright 2015 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.mcast;
17
18import org.onlab.packet.IpPrefix;
19
20/**
21 * An entity representing a multicast route consisting of a source
22 * and a multicast group address.
23 */
24public class McastRoute {
25
26 public final IpPrefix source;
27 public final IpPrefix group;
28
29 public McastRoute(IpPrefix source, IpPrefix group) {
30 this.source = source;
31 this.group = group;
32 }
33
34 /**
35 * Fetches the source address of this route.
36 *
37 * @return an ip address
38 */
39 public IpPrefix source() {
40 return source;
41 }
42
43 /**
44 * Fetches the group address of this route.
45 *
46 * @return an ip address
47 */
48 public IpPrefix group() {
49 return group;
50 }
51
52}