Initial code drop
[bgpcep.git] / bgp / parser-impl / src / main / java / org / opendaylight / protocol / bgp / parser / impl / BGPIPv6PrefixMP.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.protocol.bgp.parser.impl;
9
10 import java.util.Set;
11
12 import org.opendaylight.protocol.bgp.linkstate.SourceProtocol;
13 import org.opendaylight.protocol.bgp.linkstate.IPv6PrefixIdentifier;
14
15 /**
16  * IPv6 implementation of {@link MPReach}.
17  */
18 public class BGPIPv6PrefixMP extends AbstractLinkstateMP<IPv6PrefixIdentifier> {
19
20         private final Set<IPv6PrefixIdentifier> prefixes;
21
22         /**
23          * Creates BGP IPv6 Prefix.
24          * 
25          * @param identifier long
26          * @param sourceProtocol {@link SourceProtocol}
27          * @param prefixes set of prefix descriptors
28          * @param reachable true if the attribute is MPReach, false if the attribute is MPUnreach
29          */
30         public BGPIPv6PrefixMP(final long identifier, final SourceProtocol sourceProtocol, final Set<IPv6PrefixIdentifier> prefixes,
31                         final boolean reachable) {
32                 super(identifier, sourceProtocol, reachable);
33                 this.prefixes = prefixes;
34         }
35
36         @Override
37         public Set<IPv6PrefixIdentifier> getNlri() {
38                 return this.prefixes;
39         }
40 }