Committed by
Jonathan Hart
[ONOS-2606] Bgp local rib interface.
Change-Id: I1e501051e767f627367853c62ef90a0be15ffdb1
Showing
1 changed file
with
60 additions
and
0 deletions
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 | + | ||
16 | +import org.onosproject.bgpio.protocol.BGPLSNlri; | ||
17 | +import org.onosproject.bgpio.protocol.linkstate.PathAttrNlriDetails; | ||
18 | +import org.onosproject.bgpio.types.RouteDistinguisher; | ||
19 | + | ||
20 | +/** | ||
21 | + * Abstraction of BGP local RIB. | ||
22 | + */ | ||
23 | +public interface BgpLocalRib { | ||
24 | + | ||
25 | + /** | ||
26 | + * Add NLRI to local RIB. | ||
27 | + * | ||
28 | + * @param sessionInfo session info | ||
29 | + * @param nlri network layer reach info | ||
30 | + * @param details nlri details | ||
31 | + */ | ||
32 | + void add(BgpSessionInfo sessionInfo, BGPLSNlri nlri, PathAttrNlriDetails details); | ||
33 | + | ||
34 | + /** | ||
35 | + * Removes NLRI identifier if it exists. | ||
36 | + * | ||
37 | + * @param nlri info | ||
38 | + */ | ||
39 | + void delete(BGPLSNlri nlri); | ||
40 | + | ||
41 | + /** | ||
42 | + * Update NLRI identifier mapped with route distinguisher if it exists in tree otherwise add NLRI infomation mapped | ||
43 | + * to respective route distinguisher. | ||
44 | + * | ||
45 | + * @param sessionInfo BGP session info | ||
46 | + * @param nlri info | ||
47 | + * @param details has pathattribute, protocol id and identifier | ||
48 | + * @param routeDistinguisher unique for each VPN | ||
49 | + */ | ||
50 | + void add(BgpSessionInfo sessionInfo, BGPLSNlri nlri, PathAttrNlriDetails details, | ||
51 | + RouteDistinguisher routeDistinguisher); | ||
52 | + | ||
53 | + /** | ||
54 | + * Removes VPN NLRI identifier mapped to route distinguisher if it exists. | ||
55 | + * | ||
56 | + * @param nlri info | ||
57 | + * @param routeDistinguisher unique for each VPN | ||
58 | + */ | ||
59 | + void delete(BGPLSNlri nlri, RouteDistinguisher routeDistinguisher); | ||
60 | +} |
-
Please register or login to post a comment