tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.host; |
| 2 | |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 3 | import java.util.Set; |
| 4 | |
| 5 | import org.onlab.onos.net.Description; |
| 6 | import org.onlab.onos.net.HostLocation; |
Ayaka Koshibe | 1d56fe4 | 2014-09-19 16:51:58 -0700 | [diff] [blame] | 7 | import org.onlab.packet.IpPrefix; |
Ayaka Koshibe | a9c199f | 2014-09-16 16:21:40 -0700 | [diff] [blame] | 8 | import org.onlab.packet.MacAddress; |
| 9 | import org.onlab.packet.VlanId; |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 10 | |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 11 | /** |
| 12 | * Information describing host and its location. |
| 13 | */ |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 14 | public interface HostDescription extends Description { |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 15 | |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 16 | /** |
| 17 | * Returns the MAC address associated with this host (NIC). |
| 18 | * |
| 19 | * @return the MAC address of this host |
| 20 | */ |
Ayaka Koshibe | a9c199f | 2014-09-16 16:21:40 -0700 | [diff] [blame] | 21 | MacAddress hwAddress(); |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 22 | |
| 23 | /** |
| 24 | * Returns the VLAN associated with this host. |
| 25 | * |
| 26 | * @return the VLAN ID value |
| 27 | */ |
Ayaka Koshibe | a9c199f | 2014-09-16 16:21:40 -0700 | [diff] [blame] | 28 | VlanId vlan(); |
Ayaka Koshibe | 74a2392 | 2014-09-09 16:45:39 -0700 | [diff] [blame] | 29 | |
| 30 | /** |
| 31 | * Returns the location of the host on the network edge. |
| 32 | * |
| 33 | * @return the network location |
| 34 | */ |
| 35 | HostLocation location(); |
| 36 | |
| 37 | /** |
| 38 | * Returns zero or more IP address(es) associated with this host's MAC. |
| 39 | * |
| 40 | * @return a set of IP addresses. |
| 41 | */ |
Ayaka Koshibe | 1d56fe4 | 2014-09-19 16:51:58 -0700 | [diff] [blame] | 42 | Set<IpPrefix> ipAddresses(); |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 43 | |
| 44 | } |