blob: eedde141fa4789dc3de9280ecdd4dcfb0fae6da1 [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 VH0a82a8e2016-02-02 20:42:53 +053016import java.util.List;
17
Shashikanth VH5dd8dbe2015-11-26 13:22:18 +053018import org.onosproject.bgpio.protocol.BgpVersion;
Shashikanth VH0a82a8e2016-02-02 20:42:53 +053019import org.onosproject.bgpio.types.BgpValueType;
Shashikanth VH9f8afb42015-11-04 18:00:30 +053020
21/**
22 * Abstraction of an BGP session info. Maintian session parameters obtained during session creation.
23 */
24public interface BgpSessionInfo {
25 /**
26 * Gets the bgp session type iBGP/eBGP.
27 *
28 * @return isiBGPSession, true if session is of type internal, otherwise false.
29 */
30 boolean isIbgpSession();
31
32 /**
33 * Gets the negotiated hold time for the session.
34 *
35 * @return negotiated hold time.
36 */
37 short negotiatedholdTime();
38
39 /**
40 * Gets the BGP ID of BGP peer.
41 *
42 * @return bgp ID.
43 */
Shashikanth VH5dd8dbe2015-11-26 13:22:18 +053044 BgpId remoteBgpId();
Shashikanth VH9f8afb42015-11-04 18:00:30 +053045
46 /**
47 * Gets the BGP version of peer.
48 *
49 * @return bgp version.
50 */
Shashikanth VH5dd8dbe2015-11-26 13:22:18 +053051 BgpVersion remoteBgpVersion();
Shashikanth VH9f8afb42015-11-04 18:00:30 +053052
53 /**
54 * Gets the BGP remote bgp AS number.
55 *
56 * @return remoteBgpASNum peer AS number.
57 */
58 long remoteBgpASNum();
59
60 /**
61 * Gets the BGP peer hold time.
62 *
63 * @return bgp hold time.
64 */
65 short remoteBgpHoldTime();
66
67 /**
68 * Gets the BGP version for this bgp peer.
69 *
70 * @return bgp identifier.
71 */
72 int remoteBgpIdentifier();
Shashikanth VH0a82a8e2016-02-02 20:42:53 +053073
74 /**
75 * Gets the BGP capabilities for this BGP peer.
76 *
77 * @return BGP peer capabilities.
78 */
79 List<BgpValueType> remoteBgpCapability();
Shashikanth VH9f8afb42015-11-04 18:00:30 +053080}