sunish vk | 30637eb | 2016-02-16 15:19:32 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Foundation |
sunish vk | 30637eb | 2016-02-16 15:19:32 +0530 | [diff] [blame] | 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.ospf.controller; |
| 17 | |
| 18 | import org.onlab.packet.IpAddress; |
| 19 | |
| 20 | import java.util.List; |
| 21 | |
| 22 | /** |
| 23 | * Abstraction of an OSPF Link. |
| 24 | */ |
| 25 | public interface OspfLink { |
| 26 | |
| 27 | /** |
| 28 | * Gets IP address of the Router. |
| 29 | * |
| 30 | * @return IP address of router |
| 31 | */ |
| 32 | IpAddress remoteRouterId(); |
| 33 | |
| 34 | /** |
| 35 | * Gets the area id for this device. |
| 36 | * |
| 37 | * @return the area id |
| 38 | */ |
| 39 | int areaIdOfInterface(); |
| 40 | |
| 41 | /** |
| 42 | * Gets IP address of the interface. |
| 43 | * |
| 44 | * @return IP address of the interface |
| 45 | */ |
| 46 | IpAddress interfaceIp(); |
| 47 | |
| 48 | /** |
| 49 | * Gets list of the link TED. |
| 50 | * |
| 51 | * @return list of the link TED |
| 52 | */ |
| 53 | List<OspfLinkTed> linkTedLists(); |
| 54 | |
| 55 | /** |
| 56 | * Sets IP address of the router. |
| 57 | * |
| 58 | * @param routerIp router's IP address |
| 59 | */ |
| 60 | void setRouterIp(IpAddress routerIp); |
| 61 | |
| 62 | /** |
| 63 | * Sets the area id for this device. |
| 64 | * |
| 65 | * @param areaIdOfInterface area id |
| 66 | */ |
| 67 | void setAreaIdOfInterface(int areaIdOfInterface); |
| 68 | |
| 69 | /** |
| 70 | * Sets IP address of the interface. |
| 71 | * |
| 72 | * @param interfaceIp IP address of the interface. |
| 73 | */ |
| 74 | void setInterfaceIp(IpAddress interfaceIp); |
| 75 | |
| 76 | /** |
| 77 | * Sets list of the link TED. |
| 78 | * |
| 79 | * @param linkTedLists list of the link TED |
| 80 | */ |
| 81 | void setLinkTedLists(List<OspfLinkTed> linkTedLists); |
| 82 | } |