Yi Tseng | 7a38f9a | 2017-06-09 14:36:40 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame^] | 2 | * Copyright 2017-present Open Networking Foundation |
Yi Tseng | 7a38f9a | 2017-06-09 14:36:40 -0700 | [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 | |
| 17 | package org.onosproject.dhcprelay; |
| 18 | |
Yi Tseng | 13a41a1 | 2017-07-26 13:45:01 -0700 | [diff] [blame] | 19 | import org.onlab.packet.MacAddress; |
Yi Tseng | 7a38f9a | 2017-06-09 14:36:40 -0700 | [diff] [blame] | 20 | import org.onosproject.dhcprelay.store.DhcpRecord; |
| 21 | import org.onosproject.net.HostId; |
| 22 | |
| 23 | import java.util.Collection; |
| 24 | import java.util.Optional; |
| 25 | |
| 26 | public interface DhcpRelayService { |
| 27 | /** |
| 28 | * Gets DHCP record for specific host id (mac + vlan). |
| 29 | * |
| 30 | * @param hostId the id of host |
| 31 | * @return the DHCP record of the host |
| 32 | */ |
| 33 | Optional<DhcpRecord> getDhcpRecord(HostId hostId); |
| 34 | |
| 35 | /** |
| 36 | * Gets all DHCP records from store. |
| 37 | * |
| 38 | * @return all DHCP records from store |
| 39 | */ |
| 40 | Collection<DhcpRecord> getDhcpRecords(); |
Yi Tseng | 13a41a1 | 2017-07-26 13:45:01 -0700 | [diff] [blame] | 41 | |
| 42 | /** |
| 43 | * Gets mac address of DHCP server. |
| 44 | * |
| 45 | * @return the mac address of DHCP server; empty if not exist |
| 46 | */ |
| 47 | Optional<MacAddress> getDhcpServerMacAddress(); |
Yi Tseng | 7a38f9a | 2017-06-09 14:36:40 -0700 | [diff] [blame] | 48 | } |