blob: 9bad00974cb7070ede3c7bfb41bc0519084d74f9 [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;
25import java.util.Optional;
26
27public interface DhcpRelayService {
28 /**
29 * Gets DHCP record for specific host id (mac + vlan).
30 *
31 * @param hostId the id of host
32 * @return the DHCP record of the host
33 */
34 Optional<DhcpRecord> getDhcpRecord(HostId hostId);
35
36 /**
37 * Gets all DHCP records from store.
38 *
39 * @return all DHCP records from store
40 */
41 Collection<DhcpRecord> getDhcpRecords();
Yi Tseng13a41a12017-07-26 13:45:01 -070042
43 /**
44 * Gets mac address of DHCP server.
45 *
46 * @return the mac address of DHCP server; empty if not exist
47 */
48 Optional<MacAddress> getDhcpServerMacAddress();
Yi Tseng7a38f9a2017-06-09 14:36:40 -070049}