blob: c4ab2d1d8573877aca6a97ceaec9de36ab124c5f [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.
15 */
16
17package org.onosproject.dhcprelay;
18
Yi Tseng13a41a12017-07-26 13:45:01 -070019import org.onlab.packet.MacAddress;
Yi Tseng7a38f9a2017-06-09 14:36:40 -070020import org.onosproject.dhcprelay.store.DhcpRecord;
21import org.onosproject.net.HostId;
22
23import java.util.Collection;
24import java.util.Optional;
25
26public 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 Tseng13a41a12017-07-26 13:45:01 -070041
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 Tseng7a38f9a2017-06-09 14:36:40 -070048}