blob: f0dc8eeb43a4788de94dfc2e2090893000143ff7 [file] [log] [blame]
tom0eb04ca2014-08-25 14:34:51 -07001package org.onlab.onos.net.device;
2
tomca20e0c2014-09-03 23:22:24 -07003import org.onlab.onos.net.PortNumber;
4
tom0eb04ca2014-08-25 14:34:51 -07005/**
6 * Information about a port.
7 */
8public interface PortDescription {
9
10 // TODO: possibly relocate this to a common ground so that this can also used by host tracking if required
11
tomca20e0c2014-09-03 23:22:24 -070012 /**
13 * Returns the port number.
14 *
15 * @return port number
16 */
17 PortNumber portNumber();
18
19 /**
tomd40fc7a2014-09-04 16:41:10 -070020 * Indicates whether or not the port is up and active.
tomca20e0c2014-09-03 23:22:24 -070021 *
tomd40fc7a2014-09-04 16:41:10 -070022 * @return true if the port is active and has carrier signal
tomca20e0c2014-09-03 23:22:24 -070023 */
tomd40fc7a2014-09-04 16:41:10 -070024 boolean isEnabled();
tomca20e0c2014-09-03 23:22:24 -070025
tom0eb04ca2014-08-25 14:34:51 -070026}