Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2014-present Open Networking Laboratory |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 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'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 16 | package org.onosproject.net.host; |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 17 | |
Yuta HIGUCHI | 5fa3dc0 | 2014-10-15 17:08:13 -0700 | [diff] [blame] | 18 | import java.util.Set; |
| 19 | |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 20 | import org.onosproject.net.Description; |
| 21 | import org.onosproject.net.HostLocation; |
Pavlin Radoslavov | 33f228a | 2014-10-27 19:33:16 -0700 | [diff] [blame] | 22 | import org.onlab.packet.IpAddress; |
Ayaka Koshibe | a9c199f | 2014-09-16 16:21:40 -0700 | [diff] [blame] | 23 | import org.onlab.packet.MacAddress; |
| 24 | import org.onlab.packet.VlanId; |
Deepa Vaddireddy | 50ad080 | 2016-08-08 19:27:36 +0530 | [diff] [blame] | 25 | import org.onosproject.store.service.WallClockTimestamp; |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 26 | |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 27 | /** |
| 28 | * Information describing host and its location. |
| 29 | */ |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 30 | public interface HostDescription extends Description { |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 31 | |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 32 | /** |
| 33 | * Returns the MAC address associated with this host (NIC). |
| 34 | * |
| 35 | * @return the MAC address of this host |
| 36 | */ |
Ayaka Koshibe | a9c199f | 2014-09-16 16:21:40 -0700 | [diff] [blame] | 37 | MacAddress hwAddress(); |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 38 | |
| 39 | /** |
| 40 | * Returns the VLAN associated with this host. |
| 41 | * |
| 42 | * @return the VLAN ID value |
| 43 | */ |
Ayaka Koshibe | a9c199f | 2014-09-16 16:21:40 -0700 | [diff] [blame] | 44 | VlanId vlan(); |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 45 | |
| 46 | /** |
| 47 | * Returns the location of the host on the network edge. |
| 48 | * |
| 49 | * @return the network location |
| 50 | */ |
| 51 | HostLocation location(); |
| 52 | |
| 53 | /** |
tom | 093340b | 2014-10-10 00:15:36 -0700 | [diff] [blame] | 54 | * Returns the IP address associated with this host's MAC. |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 55 | * |
tom | 093340b | 2014-10-10 00:15:36 -0700 | [diff] [blame] | 56 | * @return host IP address |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 57 | */ |
Pavlin Radoslavov | 33f228a | 2014-10-27 19:33:16 -0700 | [diff] [blame] | 58 | Set<IpAddress> ipAddress(); |
Deepa Vaddireddy | 50ad080 | 2016-08-08 19:27:36 +0530 | [diff] [blame] | 59 | |
| 60 | /** |
| 61 | * Returns the host recent updated Time. |
| 62 | * @return host last updated time. |
| 63 | */ |
| 64 | default WallClockTimestamp timestamp() { |
| 65 | return null; |
| 66 | } |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 67 | } |