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; |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 25 | |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 26 | /** |
| 27 | * Information describing host and its location. |
| 28 | */ |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 29 | public interface HostDescription extends Description { |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 30 | |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 31 | /** |
| 32 | * Returns the MAC address associated with this host (NIC). |
| 33 | * |
| 34 | * @return the MAC address of this host |
| 35 | */ |
Ayaka Koshibe | a9c199f | 2014-09-16 16:21:40 -0700 | [diff] [blame] | 36 | MacAddress hwAddress(); |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 37 | |
| 38 | /** |
| 39 | * Returns the VLAN associated with this host. |
| 40 | * |
| 41 | * @return the VLAN ID value |
| 42 | */ |
Ayaka Koshibe | a9c199f | 2014-09-16 16:21:40 -0700 | [diff] [blame] | 43 | VlanId vlan(); |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 44 | |
| 45 | /** |
| 46 | * Returns the location of the host on the network edge. |
| 47 | * |
| 48 | * @return the network location |
| 49 | */ |
| 50 | HostLocation location(); |
| 51 | |
| 52 | /** |
tom | 093340b | 2014-10-10 00:15:36 -0700 | [diff] [blame] | 53 | * Returns the IP address associated with this host's MAC. |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 54 | * |
tom | 093340b | 2014-10-10 00:15:36 -0700 | [diff] [blame] | 55 | * @return host IP address |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 56 | */ |
Pavlin Radoslavov | 33f228a | 2014-10-27 19:33:16 -0700 | [diff] [blame] | 57 | Set<IpAddress> ipAddress(); |
sdn | 5e93545 | 2016-08-30 04:12:54 -0700 | [diff] [blame] | 58 | |
| 59 | /** |
| 60 | * Returns true if configured by NetworkConfiguration. |
| 61 | * @return configured/learnt dynamically |
| 62 | */ |
| 63 | default boolean configured() { |
| 64 | return false; |
| 65 | } |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 66 | } |