Jonathan Hart | c36c955 | 2018-07-31 15:07:53 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018-present Open Networking Foundation |
| 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.opencord.dhcpl2relay; |
| 18 | |
| 19 | import org.onosproject.event.ListenerService; |
Matteo Scandolo | ab34651 | 2020-04-17 13:39:55 -0700 | [diff] [blame] | 20 | import org.onosproject.net.ConnectPoint; |
Jonathan Hart | c36c955 | 2018-07-31 15:07:53 -0400 | [diff] [blame] | 21 | |
Jonathan Hart | 617bc3e | 2020-02-14 10:42:23 -0800 | [diff] [blame] | 22 | import java.util.Map; |
| 23 | |
Jonathan Hart | c36c955 | 2018-07-31 15:07:53 -0400 | [diff] [blame] | 24 | /** |
| 25 | * DHCP L2 relay service. |
| 26 | */ |
| 27 | public interface DhcpL2RelayService extends |
| 28 | ListenerService<DhcpL2RelayEvent, DhcpL2RelayListener> { |
Jonathan Hart | 617bc3e | 2020-02-14 10:42:23 -0800 | [diff] [blame] | 29 | |
| 30 | /** |
| 31 | * Returns information about DHCP leases that have been allocated. |
| 32 | * |
| 33 | * @return map of subscriber ID to DHCP allocation information |
| 34 | */ |
| 35 | Map<String, DhcpAllocationInfo> getAllocationInfo(); |
Matteo Scandolo | ab34651 | 2020-04-17 13:39:55 -0700 | [diff] [blame] | 36 | |
| 37 | /** |
| 38 | * Remove all the DHCP leases that have been allocated from the local state. |
| 39 | */ |
| 40 | void clearAllocations(); |
| 41 | |
| 42 | /** |
Andrea Campanella | 3b7868d | 2020-08-27 17:05:09 +0200 | [diff] [blame] | 43 | * Remove multiple DHCP leases from the local state. |
| 44 | * @param cp the ConnectPoint associated with the set of leases. |
Matteo Scandolo | ab34651 | 2020-04-17 13:39:55 -0700 | [diff] [blame] | 45 | * @return boolean |
| 46 | */ |
Matteo Scandolo | 64bba8c | 2020-08-19 11:50:33 -0700 | [diff] [blame] | 47 | boolean removeAllocationsByConnectPoint(ConnectPoint cp); |
Jonathan Hart | c36c955 | 2018-07-31 15:07:53 -0400 | [diff] [blame] | 48 | } |