blob: 2711a08e79d8b0adb430390a79849b23a1d95694 [file] [log] [blame]
Yi Tseng7a38f9a2017-06-09 14:36:40 -07001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2017-present Open Networking Foundation
Yi Tseng7a38f9a2017-06-09 14:36:40 -07003 *
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.
Yi Tseng51301292017-07-28 13:02:59 -070015 *
Yi Tseng7a38f9a2017-06-09 14:36:40 -070016 */
17
Yi Tseng51301292017-07-28 13:02:59 -070018package org.onosproject.dhcprelay.api;
Yi Tseng7a38f9a2017-06-09 14:36:40 -070019
Yi Tseng13a41a12017-07-26 13:45:01 -070020import org.onlab.packet.MacAddress;
Yi Tseng7a38f9a2017-06-09 14:36:40 -070021import org.onosproject.dhcprelay.store.DhcpRecord;
22import org.onosproject.net.HostId;
23
24import java.util.Collection;
Yi Tseng2fe8f3f2017-09-07 16:22:51 -070025import java.util.List;
Yi Tseng7a38f9a2017-06-09 14:36:40 -070026import java.util.Optional;
27
28public interface DhcpRelayService {
29 /**
30 * Gets DHCP record for specific host id (mac + vlan).
31 *
32 * @param hostId the id of host
33 * @return the DHCP record of the host
34 */
35 Optional<DhcpRecord> getDhcpRecord(HostId hostId);
36
37 /**
38 * Gets all DHCP records from store.
39 *
40 * @return all DHCP records from store
41 */
42 Collection<DhcpRecord> getDhcpRecords();
Yi Tseng13a41a12017-07-26 13:45:01 -070043
44 /**
45 * Gets mac address of DHCP server.
46 *
47 * @return the mac address of DHCP server; empty if not exist
Yi Tseng2fe8f3f2017-09-07 16:22:51 -070048 * @deprecated 1.12, use get DHCP server configs method
Yi Tseng13a41a12017-07-26 13:45:01 -070049 */
Yi Tseng2fe8f3f2017-09-07 16:22:51 -070050 @Deprecated
Yi Tseng13a41a12017-07-26 13:45:01 -070051 Optional<MacAddress> getDhcpServerMacAddress();
Yi Tseng2fe8f3f2017-09-07 16:22:51 -070052
53 /**
54 * Gets list of default DHCP server information.
55 *
56 * @return list of default DHCP server information
57 */
58 List<DhcpServerInfo> getDefaultDhcpServerInfoList();
59
60 /**
61 * Gets list of indirect DHCP server information.
62 *
63 * @return list of indirect DHCP server information
64 */
65 List<DhcpServerInfo> getIndirectDhcpServerInfoList();
Yi Tseng7a38f9a2017-06-09 14:36:40 -070066}