Shashikanth VH | 9f8afb4 | 2015-11-04 18:00:30 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Open Networking Laboratory |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with |
| 5 | * the License. You may obtain a copy of the License at |
| 6 | * |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | * |
| 9 | * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on |
| 10 | * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the |
| 11 | * specific language governing permissions and limitations under the License. |
| 12 | */ |
| 13 | |
| 14 | package org.onosproject.bgp.controller; |
| 15 | |
Shashikanth VH | 5dd8dbe | 2015-11-26 13:22:18 +0530 | [diff] [blame] | 16 | import org.onosproject.bgpio.protocol.BgpVersion; |
Shashikanth VH | 9f8afb4 | 2015-11-04 18:00:30 +0530 | [diff] [blame] | 17 | |
| 18 | /** |
| 19 | * Abstraction of an BGP session info. Maintian session parameters obtained during session creation. |
| 20 | */ |
| 21 | public interface BgpSessionInfo { |
| 22 | /** |
| 23 | * Gets the bgp session type iBGP/eBGP. |
| 24 | * |
| 25 | * @return isiBGPSession, true if session is of type internal, otherwise false. |
| 26 | */ |
| 27 | boolean isIbgpSession(); |
| 28 | |
| 29 | /** |
| 30 | * Gets the negotiated hold time for the session. |
| 31 | * |
| 32 | * @return negotiated hold time. |
| 33 | */ |
| 34 | short negotiatedholdTime(); |
| 35 | |
| 36 | /** |
| 37 | * Gets the BGP ID of BGP peer. |
| 38 | * |
| 39 | * @return bgp ID. |
| 40 | */ |
Shashikanth VH | 5dd8dbe | 2015-11-26 13:22:18 +0530 | [diff] [blame] | 41 | BgpId remoteBgpId(); |
Shashikanth VH | 9f8afb4 | 2015-11-04 18:00:30 +0530 | [diff] [blame] | 42 | |
| 43 | /** |
| 44 | * Gets the BGP version of peer. |
| 45 | * |
| 46 | * @return bgp version. |
| 47 | */ |
Shashikanth VH | 5dd8dbe | 2015-11-26 13:22:18 +0530 | [diff] [blame] | 48 | BgpVersion remoteBgpVersion(); |
Shashikanth VH | 9f8afb4 | 2015-11-04 18:00:30 +0530 | [diff] [blame] | 49 | |
| 50 | /** |
| 51 | * Gets the BGP remote bgp AS number. |
| 52 | * |
| 53 | * @return remoteBgpASNum peer AS number. |
| 54 | */ |
| 55 | long remoteBgpASNum(); |
| 56 | |
| 57 | /** |
| 58 | * Gets the BGP peer hold time. |
| 59 | * |
| 60 | * @return bgp hold time. |
| 61 | */ |
| 62 | short remoteBgpHoldTime(); |
| 63 | |
| 64 | /** |
| 65 | * Gets the BGP version for this bgp peer. |
| 66 | * |
| 67 | * @return bgp identifier. |
| 68 | */ |
| 69 | int remoteBgpIdentifier(); |
| 70 | } |