blob: dd253393af8c419cf2e3f1adfdaa8f26998c4b4e [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2014-present Open Networking Laboratory
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -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 */
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;
Deepa Vaddireddy50ad0802016-08-08 19:27:36 +053025import org.onosproject.store.service.WallClockTimestamp;
Ayaka Koshibe74a23922014-09-09 16:45:39 -070026
tom0eb04ca2014-08-25 14:34:51 -070027/**
28 * Information describing host and its location.
29 */
Ayaka Koshibe74a23922014-09-09 16:45:39 -070030public interface HostDescription extends Description {
tom0eb04ca2014-08-25 14:34:51 -070031
Ayaka Koshibe74a23922014-09-09 16:45:39 -070032 /**
33 * Returns the MAC address associated with this host (NIC).
34 *
35 * @return the MAC address of this host
36 */
Ayaka Koshibea9c199f2014-09-16 16:21:40 -070037 MacAddress hwAddress();
Ayaka Koshibe74a23922014-09-09 16:45:39 -070038
39 /**
40 * Returns the VLAN associated with this host.
41 *
42 * @return the VLAN ID value
43 */
Ayaka Koshibea9c199f2014-09-16 16:21:40 -070044 VlanId vlan();
Ayaka Koshibe74a23922014-09-09 16:45:39 -070045
46 /**
47 * Returns the location of the host on the network edge.
48 *
49 * @return the network location
50 */
51 HostLocation location();
52
53 /**
tom093340b2014-10-10 00:15:36 -070054 * Returns the IP address associated with this host's MAC.
Ayaka Koshibe74a23922014-09-09 16:45:39 -070055 *
tom093340b2014-10-10 00:15:36 -070056 * @return host IP address
Ayaka Koshibe74a23922014-09-09 16:45:39 -070057 */
Pavlin Radoslavov33f228a2014-10-27 19:33:16 -070058 Set<IpAddress> ipAddress();
Deepa Vaddireddy50ad0802016-08-08 19:27:36 +053059
60 /**
61 * Returns the host recent updated Time.
62 * @return host last updated time.
63 */
64 default WallClockTimestamp timestamp() {
65 return null;
66 }
tom0eb04ca2014-08-25 14:34:51 -070067}