Package org.onlab.packet.dhcp
Class CircuitId
- java.lang.Object
-
- org.onlab.packet.dhcp.CircuitId
-
public class CircuitId extends java.lang.Object
Representation of DHCP option 82 Circuit id.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
connectPoint()
Gets the connect point of circuit id.static CircuitId
deserialize(byte[] circuitId)
Deserialize circuit id from byte string.boolean
equals(java.lang.Object obj)
int
hashCode()
byte[]
serialize()
Combines connect point with vlan id with separator ':' as circuit id.VlanId
vlanId()
Gets the vlan id of circuit id.
-
-
-
Constructor Detail
-
CircuitId
public CircuitId(java.lang.String connectPoint, VlanId vlanId)
Creates a circuit id by given information.- Parameters:
connectPoint
- the connect point of circuit idvlanId
- the vlan id of circuit id
-
-
Method Detail
-
serialize
public byte[] serialize()
Combines connect point with vlan id with separator ':' as circuit id. e.g. of:0000000000000204/1:100- Returns:
- serialized circuit id for connect point and vlan ID
-
deserialize
public static CircuitId deserialize(byte[] circuitId)
Deserialize circuit id from byte string.- Parameters:
circuitId
- the circuit id byte string- Returns:
- a Circuit Id
-
connectPoint
public java.lang.String connectPoint()
Gets the connect point of circuit id.- Returns:
- the connect point
-
vlanId
public VlanId vlanId()
Gets the vlan id of circuit id.- Returns:
- the vlan id
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-