blob: a21a23d2a24f6dcca7a3abbaf7cecfb374e73387 [file] [log] [blame]
Shashikanth VH9f8afb42015-11-04 18:00:30 +05301/*
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
14package org.onosproject.bgp.controller;
15
Shashikanth VH5dd8dbe2015-11-26 13:22:18 +053016import org.onosproject.bgpio.protocol.BgpVersion;
Shashikanth VH9f8afb42015-11-04 18:00:30 +053017
18/**
19 * Abstraction of an BGP session info. Maintian session parameters obtained during session creation.
20 */
21public 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 VH5dd8dbe2015-11-26 13:22:18 +053041 BgpId remoteBgpId();
Shashikanth VH9f8afb42015-11-04 18:00:30 +053042
43 /**
44 * Gets the BGP version of peer.
45 *
46 * @return bgp version.
47 */
Shashikanth VH5dd8dbe2015-11-26 13:22:18 +053048 BgpVersion remoteBgpVersion();
Shashikanth VH9f8afb42015-11-04 18:00:30 +053049
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}