Priyanka B | 0bee1f8 | 2015-10-13 15:39:49 +0530 | [diff] [blame] | 1 | /* |
| 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 | */ |
| 16 | package org.onosproject.bgpio.protocol; |
| 17 | |
Shashikanth VH | 5dd8dbe | 2015-11-26 13:22:18 +0530 | [diff] [blame^] | 18 | import org.onosproject.bgpio.exceptions.BgpParseException; |
| 19 | import org.onosproject.bgpio.protocol.linkstate.BgpNodeLSNlriVer4.ProtocolType; |
Priyanka B | 0bee1f8 | 2015-10-13 15:39:49 +0530 | [diff] [blame] | 20 | import org.onosproject.bgpio.types.RouteDistinguisher; |
| 21 | |
| 22 | /** |
| 23 | * Abstraction of an entity providing BGP-LS NLRI. |
| 24 | */ |
Shashikanth VH | 5dd8dbe | 2015-11-26 13:22:18 +0530 | [diff] [blame^] | 25 | public interface BgpLSNlri { |
Priyanka B | 0bee1f8 | 2015-10-13 15:39:49 +0530 | [diff] [blame] | 26 | /** |
| 27 | * Returns NlriType of BGP-LS NLRI. |
| 28 | * |
| 29 | * @return NlriType of BGP-LS NLRI |
| 30 | */ |
| 31 | NlriType getNlriType(); |
| 32 | |
| 33 | /** |
| 34 | * Returns Identifier in Nlri. |
| 35 | * |
| 36 | * @return Identifier in Nlri |
| 37 | */ |
| 38 | long getIdentifier(); |
| 39 | |
| 40 | /** |
| 41 | * Returns Protocol Id in Nlri. |
| 42 | * |
| 43 | * @return Protocol Id in Nlri |
Shashikanth VH | 5dd8dbe | 2015-11-26 13:22:18 +0530 | [diff] [blame^] | 44 | * @throws BgpParseException while getting protocol ID |
Priyanka B | 0bee1f8 | 2015-10-13 15:39:49 +0530 | [diff] [blame] | 45 | */ |
Shashikanth VH | 5dd8dbe | 2015-11-26 13:22:18 +0530 | [diff] [blame^] | 46 | ProtocolType getProtocolId() throws BgpParseException; |
Priyanka B | 0bee1f8 | 2015-10-13 15:39:49 +0530 | [diff] [blame] | 47 | |
| 48 | /** |
| 49 | * Returns Route distinguisher in Nlri. |
| 50 | * |
| 51 | * @return Route distinguisher in Nlri |
| 52 | */ |
| 53 | RouteDistinguisher getRouteDistinguisher(); |
Jonathan Hart | 317f476 | 2015-11-09 16:05:36 -0800 | [diff] [blame] | 54 | } |