blob: 14c6f7ad798b9116eae7c6764102d292fa672a10 [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
2 * Copyright 2014 Open Networking Laboratory
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 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.net.host;
tom0eb04ca2014-08-25 14:34:51 -070017
Yuta HIGUCHI5fa3dc02014-10-15 17:08:13 -070018import java.util.Set;
19
Brian O'Connorabafb502014-12-02 22:26:20 -080020import org.onosproject.net.Description;
21import org.onosproject.net.HostLocation;
Pavlin Radoslavov33f228a2014-10-27 19:33:16 -070022import org.onlab.packet.IpAddress;
Ayaka Koshibea9c199f2014-09-16 16:21:40 -070023import org.onlab.packet.MacAddress;
24import org.onlab.packet.VlanId;
Ayaka Koshibe74a23922014-09-09 16:45:39 -070025
tom0eb04ca2014-08-25 14:34:51 -070026/**
27 * Information describing host and its location.
28 */
Ayaka Koshibe74a23922014-09-09 16:45:39 -070029public interface HostDescription extends Description {
tom0eb04ca2014-08-25 14:34:51 -070030
Ayaka Koshibe74a23922014-09-09 16:45:39 -070031 /**
32 * Returns the MAC address associated with this host (NIC).
33 *
34 * @return the MAC address of this host
35 */
Ayaka Koshibea9c199f2014-09-16 16:21:40 -070036 MacAddress hwAddress();
Ayaka Koshibe74a23922014-09-09 16:45:39 -070037
38 /**
39 * Returns the VLAN associated with this host.
40 *
41 * @return the VLAN ID value
42 */
Ayaka Koshibea9c199f2014-09-16 16:21:40 -070043 VlanId vlan();
Ayaka Koshibe74a23922014-09-09 16:45:39 -070044
45 /**
46 * Returns the location of the host on the network edge.
47 *
48 * @return the network location
49 */
50 HostLocation location();
51
52 /**
tom093340b2014-10-10 00:15:36 -070053 * Returns the IP address associated with this host's MAC.
Ayaka Koshibe74a23922014-09-09 16:45:39 -070054 *
tom093340b2014-10-10 00:15:36 -070055 * @return host IP address
Ayaka Koshibe74a23922014-09-09 16:45:39 -070056 */
Pavlin Radoslavov33f228a2014-10-27 19:33:16 -070057 Set<IpAddress> ipAddress();
tom0eb04ca2014-08-25 14:34:51 -070058}